Exhibit


Exhibit 10.4


AMENDMENT NO. 6 
TO CREDIT AGREEMENT
THIS AMENDMENT NO. 6 TO CREDIT AGREEMENT (this “Amendment”) is dated as of March 11, 2015 and is entered into among SUNEDISON, INC., a Delaware corporation (the “Borrower’’), the Guarantors party hereto and the Lenders party hereto, and is acknowledged by the Administrative Agent, and is made with reference to that certain Credit Agreement dated as of February 28, 2014 (as amended through the date hereof, the “Credit Agreement”) among the Borrower, the Lenders, the Administrative Agent and the other Agents named therein.  Capitalized terms used herein without definition shall have the same meanings herein as set forth in the Credit Agreement.
RECITALS
WHEREAS, the Loan Parties have requested that the Required Lenders agree to amend certain provisions of the Credit Agreement as provided for herein; and
WHEREAS, the Required Lenders are willing to agree to amend the provisions of the Credit Agreement as set forth herein, upon terms and subject to conditions set forth herein. 
NOW, THEREFORE, in consideration of the premises and the agreements, provisions and covenants herein contained, the parties hereto agree as follows:
		
	SECTION I.    
	AMENDMENTS TO THE CREDIT AGREEMENT


The Credit Agreement is hereby amended as follows: 


A.    The definition of “Consolidated Funded Indebtedness” in Section 1.01 of the Credit Agreement is hereby amended by amending and restating clause (ii) after the proviso thereof to read in its entirety as follows: 
“(ii)    Indebtedness permitted by Section 7.03(l), (o), (p), (q) and (r).” 
B.    The definition of “Permitted Margin Loan Financing” in Section 1.01 of the Credit Agreement is hereby amended by deleting the number “$400,000,000” appearing therein and replacing it with “$410,000,000”.
C.    The defined term “First Wind Credit Facility” is hereby inserted in Section 1.01 of the Credit Agreement in its appropriate alphabetical place to read in its entirety as follows: 
“First Wind Credit Facility” means loans borrowed by the First Wind Subs in an aggregate principal amount of up to $65,000,000 which (i) loans and related obligations are secured by the assets of the First Wind Subs and not by the Collateral and (ii) are Guaranteed solely by the Borrower on an unsecured basis and not by any other Loan Party or a Subsidiary of a Loan Party.
D.    The defined term “First Wind Subs” is hereby inserted in Section 1.01 of the Credit Agreement in its appropriate alphabetical place to read in its entirety as follows: 
“First Wind Subs” means each subsidiary of SunEdison Utility Holdings, Inc.”
E.    The definition of “Unrestricted Subsidiary” in Section 1.01 of the Credit Agreement is hereby amended by:



 CH\2043922.4




(a)    deleting the word “and” appearing immediately before clause (vi) thereof and replacing it with a comma; and
(b)    inserting the word “and” immediately after clause (vi) thereof and inserting new clause (vii), which shall read in its entirety as follows:
“(vii) the First Wind Subs.”
F.    Section 7.02 of the Credit Agreement is hereby amended by amending and restating clause (x) thereof through the end of Section 7.02 to read in its entirety as follows:
(x) the unsecured Guarantee by the Borrower of the Indebtedness and all obligations in connection therewith of the Margin Loan SPV under the Permitted Margin Loan Financing and capital contributions (whether in the form of cash or Margin Loan Pledged Equity or otherwise) to the Margin Loan SPV to the extent necessary for the Margin Loan SPV to make required payments pursuant to the loan agreement governing the Permitted Margin Loan Financing; 
(y)  the unsecured Guarantee by the Borrower of the Indebtedness and all obligations in connection therewith of the First Wind Subs under the First Wind Credit Facility and capital contributions (whether in the form of cash or otherwise) to the First Wind Subs to the extent necessary for the First Wind Subs to make required payments pursuant to the loan agreement governing the First Wind Credit Facility; and
(z) other Investments not exceeding $200,000,000 in the aggregate outstanding at any time.
Notwithstanding anything to the contrary, neither the Borrower nor any Subsidiary may make any Investments in any Unrestricted Subsidiary other than Investments permitted by Sections 7.02(n), 7.02(p), 7.02(q),  7.02(u), 7.02(v), 7.02(w), 7.02(x), 7.02(y) or 7.02(z).
G.    Section 7.03 of the Credit Agreement is hereby amended by: 
(a)    deleting the word “and” appearing immediately before clause (r) thereof; 
(b)    re-lettering the existing clause (r) as clause (s); and
(c)    inserting new clause (r) therein, which shall read in its entirety as follows:
“(r)    the unsecured Guarantee by the Borrower of the Indebtedness and all obligations in connection therewith of the First Wind Subs under the First Wind Credit Facility; and”
H.    Section 7.06 of the Credit Agreement is hereby amended by:
(a)    deleting “and” at the end of clause (n) therein;
(b)    replacing the period at the end of clause (o) with the phrase “; and”; and 
(c)    inserting new clause (p) which shall read in its entirety as follows: 
“(p)  the Borrower may make capital contributions to the First Wind Subs to the extent necessary for the First Wind Subs to make required payments pursuant to the loan agreement governing the First Wind Credit Facility.”

2
 CH\2043922.4




		
	SECTION II.
	CONDITIONS TO EFFECTIVENESS


This Amendment shall become effective as of the date hereof upon the Administrative Agent receiving a counterpart signature page of this Amendment duly executed by the Loan Parties and the Required Lenders and the acknowledgment of this Amendment by the Administrative Agent (the date of satisfaction of each such condition being referred to herein as the “Amendment Effective Date”). 
		
	SECTION III.
	REPRESENTATIONS AND WARRANTIES


In order to induce Lenders to enter into this Amendment, Borrower represents and warrants to each Lender that:
A.    Corporate Power and Authority.  Borrower has all requisite power and authority to enter into this Amendment and to carry out the transactions contemplated by, and perform its obligations under, the Credit Agreement and the other Loan Documents. 
B.    Authorization; No Contravention.  The execution and delivery by Borrower of this Amendment have been duly authorized by all necessary corporate or other organizational action, and do not and will not (a) contravene the terms of any of Borrower’s Organization Documents; (b) conflict with or result in any breach or contravention of, or the creation of any Lien under, or require any payment to be made under (i) any material Contractual Obligation to which Borrower is a party or affecting Borrower or the properties of Borrower or any of its Subsidiaries or (ii) any order, injunction, writ or decree of any Governmental Authority or any arbitral award to which Borrower or its property is subject; or (c) violate any Law. 
C.    Governmental Authorization; Other Consents.  No approval, consent, exemption, authorization, or other action by, or notice to, or filing with, any Governmental Authority or any other Person is necessary or required in connection with the execution and delivery by Borrower or performance by, or enforcement against, Borrower of this Amendment, the Credit Agreement or any other Loan Document, except those that, if not obtained or made, would not reasonably be expected to have a Material Adverse Effect. 
D.    Binding Effect.  This Amendment, when delivered hereunder, will have been duly executed and delivered by Borrower, and when so delivered will constitute a legal, valid and binding obligation of Borrower, enforceable against Borrower in accordance with its terms, except to the extent that the enforceability hereof may be limited by applicable bankruptcy, insolvency, reorganization, moratorium or other similar laws generally affecting creditors’ rights and by equitable principles (regardless of whether enforcement is sought in equity or at law). 
E.    Incorporation of Representations and Warranties from Credit Agreement.  The representations and warranties contained in Article V of the Credit Agreement are and will be true and correct in all material respects on and as of the Amendment Effective Date and both before and after giving effect to the Amendment to the same extent as though made on and as of that date, except to the extent such representations and warranties specifically relate to an earlier date, in which case they were true and correct in all material respects on and as of such earlier date. 
F.    Absence of Default.  Both before and after giving effect to this Amendment, no event has occurred and is continuing or would result from the transactions contemplated by this Amendment that would constitute an Event of Default or a Default. 
		
	SECTION IV.
	ACKNOWLEDGMENT AND CONSENT


Each Guarantor hereby acknowledges that it has reviewed the terms and provisions of the Credit Agreement and the Pledge and Security Agreement and this Amendment and consents to the  amendments to the Credit Agreement and the Pledge and Security Agreement effected pursuant to this Amendment.  Each Guarantor hereby confirms that 

3
 CH\2043922.4




each Loan Document to which it is a party or otherwise bound and all Collateral encumbered thereby will continue to guarantee or secure, as the case may be, to the fullest extent possible in accordance with the Loan Documents the payment and performance of all “Obligations” under each of the Loan Documents to which is a party (in each case as such terms are defined in the applicable Loan Document).
Each Guarantor acknowledges and agrees that any of the Loan Documents to which it is a party or otherwise bound shall continue in full force and effect and that all of its obligations thereunder shall be valid and enforceable and shall not be impaired or limited by the execution or effectiveness of this Amendment, except as expressly amended by this Amendment.  Each Guarantor represents and warrants that all representations and warranties contained in the Credit Agreement and the Loan Documents to which it is a party or otherwise bound are true and correct in all material respects on and as of the Amendment Effective Date to the same extent as though made on and as of that date, except to the extent such representations and warranties specifically relate to an earlier date, in which case they were true and correct in all material respects on and as of such earlier date.
Each Guarantor acknowledges and agrees that (i) notwithstanding the conditions to effectiveness set forth in this Amendment, such Guarantor is not required by the terms of the Credit Agreement or any other Loan Document to consent to the amendments to the Credit Agreement effected pursuant to this Amendment and (ii) nothing in the Credit Agreement, this Amendment or any other Loan Document shall be deemed to require the consent of such Guarantor to any future  amendments to the Credit Agreement.
		
	SECTION V.
	MISCELLANEOUS


A.    Effect on the Credit Agreement and the Other Loan Documents. Except as expressly amended by this Amendment, the Credit Agreement and the other Loan Documents shall remain in full force and effect and are hereby ratified and confirmed.  The execution, delivery and effectiveness of this Amendment shall not, except as expressly provided herein, operate as a waiver of any right, power or remedy of any Lender or the Administrative Agent under any of the Loan Documents, nor constitute a waiver of any provision of any of the Loan Documents. On and after the effectiveness of this Amendment, this Amendment shall for all purposes constitute a Loan Document.
B.    Headings.  Section and Subsection headings in this Amendment are included herein for convenience of reference only and shall not constitute a part of this Amendment for any other purpose or be given any substantive effect. 
C.    Applicable Law.  THIS AMENDMENT AND THE RIGHTS AND OBLIGATIONS OF THE PARTIES HEREUNDER SHALL BE GOVERNED BY, AND SHALL BE CONSTRUED AND ENFORCED IN ACCORDANCE WITH, THE INTERNAL LAWS OF THE STATE OF NEW YORK, WITHOUT REGARD TO CONFLICTS OF LAWS PRINCIPLES THEREOF. 
D.    Counterparts.  This Amendment may be executed in any number of counterparts and by different parties hereto in separate counterparts, each of which when so executed and delivered shall be deemed an original, but all such counterparts together shall constitute but one and the same instrument; signature pages may be detached from multiple separate counterparts and attached to a single counterpart so that all signature pages are physically attached to the same document. 
[Remainder of this page intentionally left blank.]

4
 CH\2043922.4






IN WITNESS WHEREOF, the parties hereto have caused this Amendment to be duly executed and delivered by their respective officers thereunto duly authorized as of the date first written above.


SUNEDISON, INC., 
as the Borrower


By: /s/ Brian Wuebbels
               Name: Brian Wuebbels
               Title: EVP, CFO & CAO







SunEdison, Inc.
Amendment No. 6 to Credit Agreement
Signature Page






GOLDMAN SACHS BANK USA, 
as a Lender




By: /s/ Michelle Latzoni
               Name: Michelle Latzoni
               Title: Authorized Signatory













MEMC Electronic Materials, Inc.
Credit Agreement
Signature Page


 CH\2043922.4




DEUTSCHE BANK AG NEW YORK BRANCH,
as a Lender




By: /s/ Anca Trifan
               Name: Anca Trifan
               Title: Managing Director




By: /s/ Marcus M. Tarkington
               Name: Marcus M. Tarkington
               Title: Director



SunEdison, Inc.
Amendment No. 6 to Credit Agreement
Signature Page






CITICORP NORTH AMERICA INC., 
as a Lender 




By: /s Carl Cho
               Name: Carl Cho
               Title: Vice President

SunEdison, Inc.
Amendment No. 6 to Credit Agreement
Signature Page








BARCLAYS BANK PLC, 
as a Lender 




By: /s/ Christopher Lee
               Name: Christopher Lee
               Title: Assistant Vice President





SunEdison, Inc.
Amendment No. 6 to Credit Agreement
Signature Page






KEYBANK NATIONAL  ASSOCIATION, as a Lender 




By: /s/ Lisa A. Ryder
               Name: Lisa A. Ryder
               Title: Vice President

SunEdison, Inc.
Amendment No. 6 to Credit Agreement
Signature Page






MORGAN STANLEY SENIOR FUNDING, INC., 
as a Lender 




By: /s/ Dmitriy Barskiy
               Name: Dmitriy Barskiy
               Title: Vice President







SunEdison, Inc.
Amendment No. 6 to Credit Agreement
Signature Page




SUNEDISON HOLDINGS CORPORATION,
as a Guarantor




By: /s/ Brian Wuebbels
      Name: Brian Wuebbels
      Title: EVP, CAO & CFO




SUNEDISON INTERNATIONAL, INC.,
as a Guarantor




By: /s/ Brian Wuebbels
      Name: Brian Wuebbels
      Title: EVP, CAO & CFO




MEMC PASADENA, INC.,
as a Guarantor




By: /s/ Brian Wuebbels
      Name: Brian Wuebbels
      Title: EVP, CAO & CFO




ENFLEX CORPORATION,
as a Guarantor




By: /s/ Brian Wuebbels
      Name: Brian Wuebbels
      Title: EVP, CAO & CFO




NVT, LLC,
as a Guarantor




By: /s/ Brian Wuebbels
      Name: Brian Wuebbels
      Title: EVP, CAO & CFO






SOLAICX,
as a Guarantor




By: /s/ Brian Wuebbels
      Name: Brian Wuebbels
      Title: EVP, CAO & CFO



SunEdison, Inc.
Amendment No. 6 to Credit Agreement
Signature Page






SUN EDISON LLC,
as a Guarantor




By: /s/ Brian Wuebbels
      Name: Brian Wuebbels
      Title: EVP, CAO & CFO




SUNEDISON CANADA, LLC,
as a Guarantor




By: /s/ Brian Wuebbels
      Name: Brian Wuebbels
      Title: EVP, CAO & CFO




SUNEDISON INTERNATIONAL, LLC,
as a Guarantor




By: /s/ Brian Wuebbels
      Name: Brian Wuebbels
      Title: EVP, CAO & CFO






FOTOWATIO RENEWABLE VENTURES, INC.,
as a Guarantor




By: /s/ Brian Wuebbels
      Name: Brian Wuebbels
      Title: EVP, CAO & CFO


SUNEDISON CONTRACTING, LLC,
as a Guarantor




By: /s/ Brian Wuebbels
      Name: Brian Wuebbels
      Title: EVP, CAO & CFO




NVT LICENSES, LLC,
as a Guarantor




By: /s/ Brian Wuebbels
      Name: Brian Wuebbels
      Title: EVP, CAO & CFO



SunEdison, Inc.
Amendment No. 6 to Credit Agreement
Signature Page






TEAM-SOLAR, INC.,
as a Guarantor




By: /s// Brian Wuebbels
      Name: Brian Wuebbels
      Title: EVP, CAO & CFO







SunEdison, Inc.
Amendment No. 6 to Credit Agreement
Signature Page




Acknowledged by:


WELLS FARGO BANK, NATIONAL ASSOCIATION,  
as Administrative Agent




By: /s/ Peter Sherman
      Name: Peter Sherman
      Title: Vice President



SunEdison, Inc.
Amendment No. 6 to Credit Agreement
Signature Page