$4.1 million decrease in prepaid expenses and other assets. These sources of cash were partially offset by a $12.0 million increase in inventories and a $2.5 million decrease in taxes payable and accrued liabilities.
Operating activities generated $125.0 million of cash in the six months ended June 30, 2021. Net income for this period was $81.7 million; we also incurred non-cash stock-based compensation expense, depreciation, intangibles amortization, and deferred income taxes of $17.7 million, $15.3 million, $1.9 million, and $1.2 million, respectively. Sources of cash also included a $13.2 million decrease in inventory reflecting strong demand for the period and a $8.1 million increase in accounts payable (excluding payables related to property and equipment) due to the timing of payments. These sources of cash were partially offset by a $5.5 million increase in accounts receivable due to increased customer shipments, a $4.5 million increase in prepaid expenses and other assets, primarily due to prepaid income taxes, and a $4.4 million decrease in taxes payable and accrued liabilities.
Cash From Investing Activities
Our investing activities in the six months ended June 30, 2022, generated $78.1 million of cash, primarily consisting of $104.8 million from sales and maturities of marketable securities, net of purchases, offset by $27.9 million for purchases of property and equipment, primarily production-related machinery and equipment, partially offset by proceeds of $1.2 million from the sale of an office building.
Our investing activities in the six months ended June 30, 2021, resulted in a $47.9 million net use of cash, primarily consisting of $28.7 million for the purchase of marketable securities, net of sales and maturities, and $19.3 million for purchases of property and equipment, primarily production-related machinery and equipment as well as construction of a new office building in Switzerland.
Cash From Financing Activities
Our financing activities in the six months ended June 30, 2022, resulted in a $310.2 million net use of cash, consisting of $292.3 million for the repurchase of our common stock and $20.9 million for the payment of dividends to stockholders, partially offset by $3.1 million from the issuance of shares through our employee stock purchase plan.
Our financing activities in the six months ended June 30, 2021, resulted in a $38.4 million net use of cash, consisting of $26.4 million for the repurchase of our common stock and $15.7 million for the payment of dividends to stockholders, partially offset by $3.7 million from the issuance of common stock, including the exercise of employee stock options and the issuance of shares through our employee stock purchase plan.
Dividends
In January 2021, our board of directors raised the quarterly cash dividend by an additional $0.02 per share with the declaration of four cash dividends of $0.13 per share to be paid to stockholders of record at the end of each quarter in 2021. In October 2021, our board of directors raised the quarterly cash dividend again with the declaration of five cash dividends of $0.15 per share (in lieu of the $0.13 per share announced in January 2021) to be paid to stockholders of record at the end of the fourth quarter in 2021 and at the end of each quarter in 2022.
In January 2022, our board of directors raised the quarterly cash dividend by an additional $0.03 per share with the declaration of four cash dividends of $0.18 per share (in lieu of the $0.15 per share announced in October 2021) to be paid to stockholders of record at the end of each quarter in 2022. A dividend payout of $10.7 million and $10.3 million occurred on March 31, 2022 and June 30, 2022, respectively. The declaration of any future cash dividend is at the discretion of the board of directors and will depend on our financial condition, results of operations, capital requirements, business conditions and other factors, as well as a determination that cash dividends are in the best interests of our stockholders.
Stock Repurchases
As of December 31, 2021, we had $67.3 million remaining under our stock-repurchase program. In January, February and April 2022, our board of directors authorized the use of an additional $100 million, $50 million and $75 million, respectively, for the repurchase of our common stock, with repurchases to be executed according to pre-defined price/volume guidelines. In the six months ended June 30, 2022, we repurchased 3.5 million shares of our common stock for $292.3 million, leaving no funds authorized as of June 30, 2022. Authorization of future repurchase programs is at the discretion of the board of directors and will depend on our financial condition, results of operations, capital requirements, business conditions and other factors.