XML 33 R7.htm IDEA: XBRL DOCUMENT v3.22.4
CONSOLIDATED STATEMENTS OF CASH FLOWS - USD ($)
$ in Thousands
12 Months Ended
Dec. 31, 2022
Dec. 31, 2021
Dec. 31, 2020
Cash flows from operating activities:      
Net income (loss) $ 364,189 $ (81,297) $ (409,086)
Adjustments to reconcile net income (loss) to cash provided by (used in) operating activities:      
Depreciation and amortization 99,769 94,241 90,036
Impairment expense 0 1,838 85,806
Debt extinguishment and commitment costs 5,329 8,144 0
Non-cash interest expense 4,218 5,663 6,902
Non-cash lower of cost and net realizable value adjustment (463) (10,132) 10,595
Change in value of common stock warrants 0 0 (4,270)
Deferred taxes 274 (260) (20,895)
Gain on sale of assets, net (169) (64,697) 0
Stock-based compensation 9,353 8,165 7,342
Unrealized (gain) loss on derivative contracts 9,336 (1,393) (3,322)
Equity losses from Laramie Energy, LLC 0 0 46,905
Net changes in operating assets and liabilities:      
Trade accounts receivable (57,391) (83,955) 117,801
Prepaid and other assets (35,356) (6,321) 36,500
Inventories (254,437) (350,652) 171,880
Deferred turnaround expenditures (29,608) (9,451) (49,770)
Obligations under inventory financing agreements 74,680 252,920 (190,831)
Accounts payable, other accrued liabilities, and operating lease ROU assets and liabilities 262,882 209,565 67,193
Net cash provided by (used in) operating activities 452,606 (27,622) (37,214)
Cash flows from investing activities:      
Acquisitions of businesses, net of cash acquired (35,546) 0 0
Capital expenditures (53,025) (29,533) (63,522)
Proceeds from sale of assets 1,263 104,161 58
Net cash provided by (used in) investing activities (87,308) 74,628 (63,464)
Cash flows from financing activities:      
Proceeds from sale of common stock, net of offering costs 0 87,193 0
Proceeds from borrowings 384,874 186,773 250,387
Repayments of borrowings (446,863) (329,315) (159,489)
Net borrowings (repayments) on deferred payment arrangements and receivable advances 80,681 61,098 (41,645)
Purchase of common stock for retirement (7,834) (2,145) (1,156)
Payments for debt extinguishment and commitment costs (3,483) (5,618) 0
Other financing activities, net 6,032 920 (5,538)
Net cash provided by (used in) financing activities 13,407 (1,094) 42,559
Net increase (decrease) in cash, cash equivalents, and restricted cash 378,705 45,912 (58,119)
Cash, cash equivalents, and restricted cash at beginning of period 116,221 70,309 128,428
Cash, cash equivalents, and restricted cash at end of period 494,926 116,221 70,309
Net cash received (paid) for:      
Interest (63,323) (65,221) (54,256)
Taxes (51) (795) 190
Non-cash investing and financing activities:      
Accrued capital expenditures 5,418 8,177 4,686
Value of warrants reclassified to equity 0 0 3,936
ROU assets obtained in exchange for new finance lease liabilities 594 1,936 3,476
ROU assets obtained in exchange for new operating lease liabilities 64,567 97,011 22,529
ROU assets terminated in exchange for release from finance lease liabilities 0 0 0
ROU assets terminated in exchange for release from operating lease liabilities $ 32,902 $ 6,847 $ 7,738