Consolidated Statements of Cash Flows - USD ($)
$ in Thousands
6 Months Ended
Jun. 30, 2017
Jun. 30, 2016
Cash flows from operating activities    
Net income (loss) $ 35,679 $ (9,691)
Adjustments to reconcile net income (loss) to net cash used in operating activities    
Depreciation and amortization 13,531 12,252
Provision for severance benefits 10,776 9,827
Amortization of debt issuance costs and original issue discount 950 347
Gain on foreign currency, net (35,813) (1,140)
Restructuring gain and other (17,010) (7,785)
Stock-based compensation 1,179 1,504
Other 220 164
Changes in operating assets and liabilities    
Accounts receivable, net (9,730) 8,505
Inventories, net 2,646 (11,946)
Other receivables 4,361 (3,635)
Other current assets 1,135 2,160
Accounts payable (1,919) 7,779
Other accounts payable (7,790) (5,156)
Accrued expenses (10,776) 1,913
Deferred revenue (265) 1,477
Other current liabilities (436) (1,364)
Other non-current liabilities (268) (661)
Payment of severance benefits (18,082) (13,102)
Other (61) (137)
Net cash used in operating activities (31,673) (8,689)
Cash flows from investing activities    
Proceeds from disposal of plant, property and equipment 18,750  
Purchase of plant, property and equipment (10,807) (5,834)
Payment for intellectual property registration (566) (478)
Collection of guarantee deposits 1,400 383
Proceeds from settlement of hedge collateral 6,781 5,917
Payment of hedge collateral (10,036)  
Payment of guarantee deposits (41) (11)
Other 22 11
Net cash provided by (used in) investing activities 5,503 (12)
Cash flows from financing activities    
Proceeds from issuance of senior notes 86,250  
Payment of debt issuance costs (5,902)  
Proceeds from exercise of stock options 2,525  
Acquisition of treasury stock (11,401)  
Net cash provided by financing activities 71,472  
Effect of exchange rates on cash and cash equivalents 2,866 1,733
Net increase (decrease) in cash and cash equivalents 48,168 (6,968)
Cash and cash equivalents    
Beginning of the period 83,355 90,882
End of the period 131,523 83,914
Supplemental cash flow information    
Cash paid for interest 7,980 7,453
Cash paid for income taxes 790 469
Non-cash operating activities    
Insurance proceeds in restricted cash reclassified from other receivables   (29,571)
Non-cash investing activities    
Property, plant and equipment additions in other accounts payable $ 2,092 $ 993