XML 43 R8.htm IDEA: XBRL DOCUMENT v3.21.2
CONDENSED CONSOLIDATED STATEMENTS OF CASH FLOWS (Unaudited) - USD ($)
$ in Thousands
6 Months Ended
Jun. 30, 2021
Jun. 30, 2020
Cash flows from operating activities    
Net income (loss) $ (28,124) $ 12,032
Adjustments to reconcile net income (loss) to net cash provided by (used in) operating activities:    
Depreciation and amortization 12,486 13,292
Stock-based compensation expense 5,617 6,305
Deferred taxes 989 1,544
Others 171 179
Gain on sale of assets and other write-offs (14) (24)
Allowance for doubtful accounts (1) (6)
Write-down of inventories 6,096 4,173
Amortization of operating lease right-of-use assets 1,025 931
Foreign currency remeasurement (129) (991)
Change in operating assets and liabilities:    
Accounts receivable (2,532) 7,655
Inventories (3,836) (7,899)
Prepaid expenses and other assets 4,058 (3,268)
Accounts payable 2,294 3,693
Accrued and other liabilities (19,775) (3,122)
Net cash provided by (used in) operating activities (21,675) 34,494
Cash flows from investing activities    
Purchase of property, plant and equipment (5,461) (5,535)
Proceeds from sale of property, plant and equipment and other assets 1,013 110
Purchase of marketable securities (22,504) (27)
Proceeds from sale of marketable securities 22,501 0
Net cash used in investing activities (4,451) (5,452)
Cash flows from financing activities    
Proceeds from exercise of stock options and issuance of stock under ESPP 4,143 2,679
Tax withholding on restricted stock units (3,683) (786)
Repayment of bank loans (2,662) (6,554)
Repayment of finance lease liabilities (46) (43)
Net cash used in financing activities (2,248) (4,704)
Effect of exchange rates on cash, cash equivalents and restricted cash 99 (186)
Net increase (decrease) in cash, cash equivalents and restricted cash (28,275) 24,152
Cash, cash equivalents and restricted cash at the beginning of the period 95,606 81,439
Cash, cash equivalents and restricted cash at the end of the period 67,331 105,591
Supplemental disclosure of non-cash investing and financing activities:    
Unpaid property, plant and equipment in accounts payable 1,952 1,296
Right-of-use asset in exchange for a lease liability $ 1,645 $ 0