Turning to the balance sheet. Cash, cash equivalents and marketable securities, including long-term securities ended the quarter at $1.5 billion. Cash declined $279 million compared to the previous quarter, which was primarily the result of operational cash flows. Given the reduced size of our current business and OpEx reductions, we are adjusting our optimal cash balance from $1.5 billion to approximately $1.1 billion. Additional cash outflows that will occur in the fourth quarter of 2012 include a $50 million cash payment to GLOBALFOUNDRIES in the fourth quarter related to the 28-nanometer product limited waiver of exclusivity, as provided in the 2012 amendment to the Wafer Supply Agreement, with the final payment of $175 million related to the waiver to be paid by December 31, 2012.
Debt as of the end of the quarter was $2.04 billion. In the third quarter, AMD repaid in full all of the outstanding principal and accrued interest of the company's 5.75% convertible senior notes due 2012 or approximately $499 million and issued a $500 million aggregate principal amount, 7.5% senior notes due 2022.
Accounts receivable at the end of the quarter was $683 million, down $61 million compared to the end of the second quarter of 2012, due to lower revenue. Inventory was $744 million exiting the quarter, down $89 million, primarily as a result of the $100 million inventory write-down.
Now turning to the outlook. For the fourth quarter of 2012, AMD expects revenue to decrease 9% sequentially, plus or minus 4%. Operating expenses are expected to be approximately flat sequentially.