XML 24 R8.htm IDEA: XBRL DOCUMENT v3.22.2.2
CONSOLIDATED STATEMENTS OF CASH FLOWS - USD ($)
$ in Thousands
12 Months Ended
Jun. 30, 2022
Jun. 30, 2021
Jun. 30, 2020
Cash flows from operating activities      
Net income (loss) $ 453,183 $ 56,289 $ (18,257)
Adjustments to reconcile net income (loss) to net cash provided by operating activities:      
Gain on deconsolidation of the JV Company (399,093) 0 0
Loss on changes of equity interest in the JV Company, net 3,140 0 0
Deferred income tax on deconsolidation and changes of equity interest in the JV Company 29,973 0 0
Depreciation and amortization 42,851 52,685 45,090
Equity method investment loss from equity investee 2,629 0 0
Share-based compensation expense 31,324 15,324 10,454
Deferred income taxes, net 1,592 1,551 85
(Gain) loss on disposal of property and equipment 18 426 (102)
Impairment of privately-held investment 0 0 600
Changes in assets and liabilities:      
Accounts receivable (30,085) (22,517) 11,024
Inventories (57,416) (18,765) (22,793)
Other current and long-term assets (9,408) (5,843) 27,306
Payable related to equity investee, net 48,192 0 0
Accounts payable 23,755 (528) (1,777)
Income taxes payable (1,687) 1,660 (270)
Income taxes payable on deconsolidation and changes of equity interest in the JV Company 3,490 0 0
Accrued and other liabilities 76,407 48,462 10,955
Net cash provided by operating activities 218,865 128,744 62,315
Cash flows from investing activities      
Proceeds from sale of equity interest in the JV Company 26,347 0 0
Deconsolidation of cash and cash equivalents of the JV Company (20,734) 0 0
Purchases of property and equipment (138,014) (72,700) (62,398)
Proceeds from sale of property and equipment 135 42 295
Government grant related to equipment 1,444 119 1,254
Net cash used in investing activities (130,822) (72,539) (60,849)
Cash flows from financing activities      
Withholding tax on restricted stock units (8,641) (6,924) (1,509)
Proceeds from exercise of stock options and ESPP 6,143 5,092 3,350
Proceeds from borrowings 64,276 65,876 96,232
Repayments of borrowings (35,748) (66,584) (49,394)
Principal payments on capital leases (4,176) (16,451) (11,028)
Net cash provided by (used in) financing activities 21,854 (18,991) 37,651
Effect of exchange rate changes on cash, cash equivalents and restricted cash (59) 4,895 (708)
Net increase in cash, cash equivalents and restricted cash 109,838 42,109 38,409
Cash, cash equivalents and restricted cash at beginning of year 204,813 162,704 124,295
Cash, cash equivalents and restricted cash at end of year 314,651 204,813 162,704
Supplemental disclosures of cash flow information:      
Cash paid for interest 3,404 5,641 2,223
Cash paid for income taxes 5,768 970 2,258
Supplemental disclosures of non-cash investing and financing information:      
Property and equipment purchased but not yet paid 62,165 20,204 17,370
Reissuance of treasury stock 64 120 56
Cash, Cash Equivalents, Restricted Cash, and Restricted Cash Equivalents [Abstract]      
Cash and cash equivalents 314,352 202,412 158,536
Restricted cash 299 233 2,190
Restricted cash - long-term 0 2,168 1,978
Total cash, cash equivalents, and restricted cash $ 314,651 $ 204,813 $ 162,704