Exhibit 10.4

 
SECOND AMENDED & RESTATED LIMITED GUARANTY
 
This SECOND AMENDED & RESTATED LIMITED GUARANTY (this “Limited Guaranty”), dated
as of December 3, 2018, is made by AEMETIS, INC. (the “Parent Guarantor”) and
Aemetis Advanced Products Keyes, Inc. (“AAPK” and collectively with the Parent
Guarantor, the “Guarantors”), in favor of THIRD EYE CAPITAL CORPORATION, as
administrative agent and collateral agent for and on behalf of the Noteholders
(as defined in the Note Purchase Agreement referred to below) (in such aforesaid
capacities, or any successor or assign in such capacities, the “Agent”).
 
PRELIMINARY STATEMENTS:
 
(1)           Goodland Advanced Fuels, Inc., a Delaware corporation (the
“Borrower”), the Noteholders from time to time party thereto, and the Agent have
entered into that certain Note Purchase Agreement dated as of June 30, 2017 (as
amended by the Amendment No. 1 to Note Purchase Agreement dated June 28, 2018
(the “First Amendment”), the Amendment No. 2 to Note Purchase Agreement dated as
of December 3, 2018 (the “Second Amendment”) and as may be further amended,
varied, supplemented, restated, renewed or replaced at any time and from time to
time, the “Note Purchase Agreement”).
 
(2)           Pursuant to the Note Purchase Agreement, the Noteholders have
agreed to make Loans from time to time to the Borrower, upon the terms and
subject to the conditions set forth therein.
 
(3)           The Borrower and each Guarantor have entered into separate
Intercompany Revolving Promissory Notes dated as of June 30, 2017 (as amended,
varied, supplemented, restated, renewed or replaced at any time and from time to
time, the “Intercompany Revolving Notes”) pursuant to which the Borrower may,
from time to time, lend a portion of the proceeds of Revolving Advances incurred
under the Note Purchase Agreement to each Guarantor.
 
(4)           This Limited Guaranty is secured by a first priority lien, subject
to liens existing in connection with the Existing Agreement, pursuant to
separate General Security Agreements entered into by each Guarantor.
 
(5)           Pursuant to the First Amendment, the Noteholders and the Agent
agreed to increase the Term Loan Commitment by an amount equal to $1,575,000,
being the Subsequent Term Loan amount, and the Borrower agreed to issue Term
Notes evidencing such Subsequent Term Loan amount to the Noteholders in order to
provide working capital to the Parent Guarantor and its subsidiaries in order to
satisfy and pay certain outstanding property tax arrears.
 
(6)           Pursuant to the Second Amendment, the Noteholders and the Agent
agreed to increase the Term Loan Commitment by an amount equal to $3,500,000,
being the CO2 Term Loan amount, and the Borrower agreed to issue Term Notes
evidencing such CO2 Term Loan amount to the Noteholders in order to advance
funds to Aemetis Property Keyes, Inc., an indirect, wholly-owned subsidiary of
Parent Guarantor (“APKI”) in order to permit APKI to complete the CO2
Transaction (as defined in the Second Amendment) in accordance with the terms
and conditions set forth in the Second Amendment. In connection therewith, each
Guarantor agreed to enter into this Limited Guaranty, thereby guaranteeing the
obligations of the Borrower with respect to the Guaranteed Obligations (as
defined below), in addition to and not in derogation of, their other obligations
herein and in the Note Purchase Documents.
 
(7)           Prior to the Aemetis Option Exercise Date, this Limited Guaranty
guarantees the Guaranteed Obligations in an amount not to exceed the Guaranty
Limit. On and after the Aemetis Option Exercise Date, this Limited Guaranty
shall guarantee the Guaranteed Obligations without giving effect to the Guaranty
Limit.
 
 
 

 
 
(8)           It is a condition precedent to the obligation of the Noteholders
to make Loans under the Note Purchase Agreement that the Guarantors shall have
executed and delivered this Limited Guaranty to the Agent, for the benefit of
the Agent, the Noteholders from time to time party to the Note Purchase
Agreement and any other holder of any Note Indebtedness (collectively with the
Agent and the Noteholders, the “Secured Parties”).
 
(9)           The Guarantors will derive substantial direct and indirect benefit
from the transactions contemplated by the Note Purchase Agreement, including
without limiting the generality of the foregoing, with respect to the
transactions contemplated by the Second Amendment.
 
(10)           Effective on the date hereof, the Amended and Restated Limited
Guaranty dated June 28, 2018 (the “Original Guaranty”) has been amended and
restated in its entirety hereby pursuant to the terms and conditions hereof.
Such amendment and restatement of the Original Guaranty shall not be construed
to discharge or otherwise affect any obligations of the Guarantors accrued or
otherwise owing under the Original Guaranty that have not been paid or otherwise
satisfied, it being understood that such obligations shall continue as
obligations under this Limited Guaranty. Without limiting the generality of the
foregoing, this Limited Guaranty is not intended to and shall not constitute a
novation of the Original Guaranty.
 
1.            
DEFINITIONS. Capitalized terms used but not otherwise defined herein shall have
the meanings assigned to them in the Note Purchase Agreement. In addition, when
used herein:
 
“Aemetis Option Exercise Date” shall mean the date upon which the Aemetis Option
is exercised in accordance with its terms;
 
“Existing Agreement” shall mean that certain Amended and Restated Note Purchase
Agreement dated as of July 6, 2012, as amended, restated, supplemented, revised
or replaced from time to time, among the borrowers party thereto, Parent
Guarantor, the noteholders party thereto and Third Eye Capital Corporation, an
Ontario corporation, in its capacity as agent for and on behalf of the
noteholders party thereto and each document or agreement entered into in
connection therewith; and
 
“Guaranty Limit” shall mean an amount equal to the sum of: (a) the aggregate
amount of Note Indebtedness advanced by the Borrower to each Guarantor under and
in accordance with the Intercompany Revolving Notes (irrespective of which
Guarantor is the obligor under any particular Intercompany Revolving Note); (b)
the aggregate amount of Note Indebtedness with respect to the Subsequent Term
Loan; (c) the aggregate amount of Note Indebtedness with respect to the CO2 Term
Loan; and (d) the obligations of the Guarantors under Section 4.12 hereof.
 
2.            
THE GUARANTY.
 
2.1            Limited Guaranty of Guaranteed Obligations. The Guarantors
unconditionally, jointly and severally, guarantee to the Agent, on behalf of the
Secured Parties, and their respective successors, endorsees, transferees and
assigns, the prompt payment and performance of all Note Indebtedness, whether
such obligations constitute principal, interest, expenses, indemnification
expenses or other obligations (collectively, the “Guaranteed Obligations”);
provided that prior to the Aemetis Option Exercise Date, the aggregate
obligations and liabilities of the Guarantor hereunder shall not at any time or
in any event or circumstance exceed the Guaranty Limit and provided, further,
that on and after the Aemetis Option Exercise Date, this Limited Guaranty will
no longer give effect to and shall be construed as excluding the term “Guaranty
Limit”. All payments under this Limited Guaranty shall be made in United States
Dollars in immediately available funds within five (5) Business Days after the
Agent’s demand therefor.
 
 
2

 
 
2.2           Guarantee Absolute. The Guarantors guarantee that the Guaranteed
Obligations will be paid strictly in accordance with their terms regardless of
any law, regulation or order now or hereafter in effect in any jurisdiction
affecting any of such terms or the rights of the Agent and/or Secured Parties
with respect thereto. The liability of the Guarantors hereunder shall be
primary, absolute and unconditional irrespective of:
 
(a)           any lack of validity or enforceability of the Note Indebtedness or
the Guaranteed Obligations or any agreement or instrument relating thereto;
 
(b)           any change in the time, manner or place of the payment of, or in
any other term of, all or any of the Note Indebtedness or the Guaranteed
Obligations, or any amendment or modification of or any consent to departure
from this Limited Guaranty or any other Note Purchase Document;
 
(c)           any exchange, release, unopposability or nonperfection of any
Collateral or any release or amendment to, waiver of, or consent to departure
from, or any guarantee for, all or any part of the Note Indebtedness or the
Guaranteed Obligations;
 
(d)           any whole or partial termination of this Limited Guaranty; or
 
(e)           any other circumstance which might otherwise constitute a defense
available to, or a discharge of, any Obligor in respect of the Note
Indebtedness.
 
2.3           Consents, Waivers and Renewals. The Guarantors hereby renounce the
benefits of division and discussion. The Guarantors hereby waive promptness,
diligence, notice of the acceptance hereof, notice of intent to accelerate and
notice of acceleration and any other notice with respect to any of the Note
Indebtedness or the Guaranteed Obligations, this Limited Guaranty or the other
Note Purchase Documents and any requirement that the Agent and/or Secured
Parties protect, secure, perfect, render opposable or insure any Agent’s Lien or
Lien on any Property subject thereto or exhaust any right or take any action
against any other Person or any Collateral before proceeding hereunder. The
Guarantors agree that the Agent and/or Secured Parties may at any time and from
time to time, either before or after the maturity of the Note Indebtedness,
without notice to or further consent of any Guarantor or any other Person extend
the time of payment of, exchange or surrender any Collateral for, or renew any
of the Note Indebtedness or the Guaranteed Obligations, and may also make any
agreements with any other party to or Person liable on any of the Note
Indebtedness, or interested therein, for the extension, renewal, payment,
compromise, discharge, or release thereof, in whole or in part, or for any
modification of the terms thereof or of any agreement between the Agent and/or
any Noteholders and the Borrower or any such other party or Person, without in
any way impairing or affecting this Limited Guaranty. The Guarantors agree to
make payment to the Agent, for the ratable benefit of the Secured Parties, of
any of the Note Indebtedness and the Guaranteed Obligations whether or not the
Agent and/or any Secured Parties shall have resorted to any collateral security,
or shall have proceeded against any other obligor principally or secondarily
obligated with respect to any of the Note Indebtedness or the Guaranteed
Obligations. Each Guarantor hereby irrevocably renounces every right it may
acquire to be released from its guarantee pursuant to applicable law. At the
request of the Agent or any Secured Party, made at any time, the Guarantors
shall renew the Limited Guaranty hereunder by executing such documents for this
purpose as may be reasonably requested by the Agent.
 
2.4           Reinstatement. If at any time any payment in respect of any of the
Guaranteed Obligations is rescinded or must otherwise be returned for any reason
whatsoever, in whole or in part, the Guarantors’ obligations hereunder shall (x)
revive and remain in full force and effect or (y) be reinstated (as the case may
be) with respect to such Guaranteed Obligations, in any case, subject to the
Guaranty Limit.
 
 
 
3

 
 
2.5           Payments. All payments made by, or on behalf of, the Guarantors
hereunder will be made without setoff, counterclaim or other defense.
 
2.6           Subrogation. The Guarantors shall not exercise any rights which it
may acquire by way of subrogation under this Limited Guaranty or the other Note
Purchase Documents, by any payment made hereunder or otherwise, until all the
Note Indebtedness and the Guaranteed Obligations shall have been paid in full.
If any amount shall be paid to the Borrower on account of such subrogation
rights in violation of the foregoing restriction, such amount shall be held in
trust and as mandatary for the benefit of the Agent (for itself and the other
Secured Parties) and shall forthwith be paid to the Agent (for itself and the
other Secured Parties) to be credited and applied to the Note Indebtedness,
whether matured or unmatured.
 
2.7           Postponement and Subordination. Guarantors hereby postpone any
right of enforcement, remedy and action and subordinate any claims, including
any right of payment, subrogation, contribution and indemnity that they may have
at any time against any Obligor or any other guarantor, howsoever arising, to
irrevocable payment in full of the Note Indebtedness. Any such claims (whether
secured or unsecured) and any such remedial rights are hereby assigned or
hypothecated to Agent and the Secured Parties (and shall be assigned or
hypothecated pursuant to documentation satisfactory to Agent), and any such
claims owing and paid to the Guarantors in contravention of the terms of this
Limited Guaranty shall be received and held by such Guarantor in trust and as
agent and mandatary for the benefit of Agent and the Secured Parties and the
proceeds thereof shall forthwith be paid over to Agent to be credited and
applied to the Note Indebtedness, whether matured or unmatured, in accordance
with the terms of this Limited Guaranty. In furtherance of the foregoing, any
and all Liens held by the Guarantors shall for all purposes be, and at all times
remain, inferior, junior and subordinate to the Liens from time to time held by
the Agent under the Security Documents; without limiting the generality of the
foregoing, the foregoing priority shall prevail in all circumstances and
irrespective of: (i) the priorities otherwise accorded to any such Liens by any
applicable law; (ii) the time or order of the creation, granting, execution or
delivery of the Note Indebtedness, the Note Purchase Documents or any other
deed, document, instrument, act or notice; (iii) the time or order of the
attachment or perfection or setting-up of the security interests and hypothecs
constituted by any such Liens; (iv) the time or order of registration,
notification or publication of any such Liens or the filing of financing
statements or other instruments and documents with respect thereto; (v) the time
of the making of advances and other credits under the Note Indebtedness; or (vi)
the giving of, or the failure to give, any notice to the Guarantors or the time
of giving of any such notice; in addition, the Guarantors hereby cede priority
of rank and payment to the Agent and the Secured Parties in all respects to the
extent necessary to give full effect to the foregoing.
 
2.8           Waivers. In addition to the waivers contained in Section 2.3
hereof, the Guarantors waive, and agree to the fullest extent permitted by law
that they shall not at any time insist upon, plead or in any manner whatever
claim or take the benefit or advantage of, any appraisal, valuation, stay,
extension, marshaling of assets or redemption laws, or exemption, whether now or
at any time hereafter in force, which may delay, prevent or otherwise affect the
performance by the Guarantors of the Guaranteed Obligations hereunder (subject
to the Guaranty Limit) or the enforcement by the Agent of, this Limited
Guaranty. The Guarantors hereby waive, to the fullest extent permitted by law,
diligence, presentment and demand (whether for the benefit of any statute of
limitations affecting each Guarantor’s liability hereunder or the enforcement
hereof, non-payment or protest or of acceptance, extension of time, change in
nature or form of the Guaranteed Obligations, acceptance of further security,
release of further security, composition or agreement arrived at as to the
amount of, or the terms of, the Guaranteed Obligations, notice of adverse change
in the Borrower’s financial condition or any other fact which might increase the
risk to the Guarantors) with respect to any of the Guaranteed Obligations or all
other demands whatsoever and waives, to the fullest extent permitted by law, the
benefit of all provisions of law which are or might be in conflict with the
terms of this Limited Guaranty.
 
 
 
4

 
 
3.            
REPRESENTATIONS AND WARRANTIES.
 
3.1           To induce the Agent and the other Secured Parties to enter into
the transactions contemplated by the Note Purchase Documents, each Guarantor
makes the following representations and warranties to the Agent and each Secured
Party, each and all of which shall survive the execution and delivery of this
Limited Guaranty: Each Guarantor (i) has relied exclusively on such Guarantor’s
own independent investigation of the Borrower for such Guarantor’s decision to
guarantee the Guaranteed Obligations now existing or thereafter arising (subject
to the Guaranty Limit), (ii) has sufficient knowledge of the Borrower to make an
informed decision about this Limited Guaranty, and neither the Agent nor any
other Secured Party has any duty or obligation to disclose any information in
its possession or control about the Borrower to any Guarantor, and (iii) has
adequate means to obtain from the Borrower on a continuing basis information
concerning the financial condition of the Borrower and is not relying on the
Agent or any other Secured Party to provide such information either now or in
the future.
 
3.2           In addition, each Guarantor represents and warrants to the Agent
and the Secured Parties as follows:
 
(a)           Each Guarantor has had the opportunity to discuss the terms and
conditions of the Note Purchase Documents and the Aemetis Option with its own
counsel and has relied on such counsel’s advice with respect to the Note
Purchase Documents and the Aemetis Option in conjunction with the execution of
this Limited Guaranty.
 
(b)            Each Guarantor makes the additional representations and
warranties set forth on Exhibit A hereto.
 
4.            
OTHER TERMS.
 
4.1           Covenants.
 
(a)           Each Guarantor makes the covenants set forth on Exhibit B hereto.
 
(b)           Subject to the terms of the Existing Agreement, each Guarantor
shall be required to, and hereby agrees to, contribute (i) 100% of the net cash
proceeds received by such Guarantor from (i) the EB-5 Program Issuance to the
Borrower and thereafter cause the Borrower to use 100% of such proceeds to make
a mandatory prepayment on the Term Loan under and in accordance with Section
2.4(b)(ii) of the Note Purchase Agreement and (ii) certain of the net cash
proceeds received by such Guarantor from the Linde Contract (as defined in the
Second Amendment) in accordance with Section 2.4(d) of the Note Purchase
Agreement.
 
4.2           Amendments. This Limited Guaranty may not be amended or modified
except by the written agreement of the Guarantors and the Agent.
 
4.3           Waiver. No waiver of any provision of this Limited Guaranty, and
no consent to any departure by the Guarantors herefrom, shall in any event be
effective unless the same shall be in writing and signed by the Agent, and then
such waiver or consent shall be effective only in the specific instance and for
the specific purpose for which given. No failure on the part of the Agent or any
other Secured Party to exercise, and no delay in exercising any right hereunder,
shall operate as a waiver thereof; nor shall any single or partial exercise of
any such right preclude any other or further exercise thereof or the exercise of
any other right.
 
 
 
5

 
 
4.4           Notices. All notices, requests and demands and other
communications to or upon the Agent or any Obligor hereunder shall be effected
in the manner provided for in Section 8.2 of the Note Purchase Agreement;
provided that any notice, request, demand or other communication to the
Guarantors shall be addressed to each Guarantor at its address on the signature
page to this Limited Guaranty. Notices sent by hand or overnight courier
service, or mailed by certified or registered mail, shall be deemed to have been
given when received; notices sent by facsimile shall be deemed to have been
given when sent (except that, if not given during normal business hours for the
recipient, shall be deemed to have been given at the opening of business on the
next Business Day for the recipient).
 
4.5           Severability.                                Any provision of this
Limited Guaranty which is prohibited or unenforceable in any jurisdiction shall,
as to such jurisdiction, be ineffective to the extent of such prohibition or
unenforceability without invalidating the remaining provisions hereof, and any
such prohibition or unenforceability in any jurisdiction shall not invalidate or
render unenforceable such provision in any other jurisdiction.
 
4.6           Section Headings. The Section headings used in this Limited
Guaranty are for convenience of reference only and are not to affect the
construction hereof or be taken into consideration in the interpretation hereof.
 
4.7           Counterparts. This Limited Guaranty may be executed in any number
of counterparts and by different parties hereto in separate counterparts, each
of which when so executed shall be deemed to be an original and all of which
taken together shall constitute one and the same agreement. Delivery of an
executed counterpart of a signature page of this document by facsimile or other
electronic means shall be effective as delivery of a manually executed
counterpart of this Limited Guaranty.
 
4.8           Submission to Jurisdiction; Waivers.
 
(a)           Jurisdiction. EACH GUARANTOR IRREVOCABLY AND UNCONDITIONALLY
AGREES THAT IT WILL NOT COMMENCE ANY ACTION, LITIGATION OR PROCEEDING OF ANY
KIND OR DESCRIPTION, WHETHER IN LAW OR EQUITY, WHETHER IN CONTRACT OR IN TORT OR
OTHERWISE, AGAINST ANY SECURED PARTY OR ANY RELATED PARTY OF ANY SECURED PARTY
IN ANY WAY RELATING TO THIS LIMITED GUARANTY OR ANY OTHER NOTE PURCHASE DOCUMENT
OR THE TRANSACTIONS RELATING HERETO OR THERETO, IN ANY FORUM OTHER THAN THE
COURTS OF THE STATE OF NEW YORK SITTING IN NEW YORK COUNTY AND OF THE UNITED
STATES DISTRICT COURT OF THE SOUTHERN DISTRICT OF NEW YORK, AND ANY APPELLATE
COURT FROM ANY THEREOF, AND EACH OF THE PARTIES HERETO IRREVOCABLY AND
UNCONDITIONALLY SUBMITS TO THE JURISDICTION OF SUCH COURTS AND AGREES THAT ALL
CLAIMS IN RESPECT OF ANY SUCH ACTION, LITIGATION OR PROCEEDING MAY BE HEARD AND
DETERMINED IN SUCH NEW YORK STATE COURT OR, TO THE FULLEST EXTENT PERMITTED BY
APPLICABLE LAW, IN SUCH FEDERAL COURT. EACH OF THE PARTIES HERETO AGREES THAT A
FINAL JUDGMENT IN ANY SUCH ACTION, LITIGATION OR PROCEEDING SHALL BE CONCLUSIVE
AND MAY BE ENFORCED IN OTHER JURISDICTIONS BY SUIT ON THE JUDGMENT OR IN ANY
OTHER MANNER PROVIDED BY LAW. NOTHING IN THIS LIMITED GUARANTY OR IN ANY OTHER
NOTE PURCHASE DOCUMENT SHALL AFFECT ANY RIGHT THAT ANY SECURED PARTY MAY
OTHERWISE HAVE TO BRING ANY ACTION OR PROCEEDING RELATING TO THIS LIMITED
GUARANTY OR ANY OTHER NOTE PURCHASE DOCUMENT AGAINST THE PLEDGOR OR ANY OTHER
OBLIGOR OR ITS PROPERTIES IN THE COURTS OF ANY JURISDICTION.
 
 
 
6

 
 
(b)           Waiver of Venue. Each Guarantor irrevocably and unconditionally
waives, to the fullest extent permitted by applicable law, any objection that it
may now or hereafter have to the laying of venue of any action or proceeding
arising out of or relating to this Limited Guaranty in any court referred to in
paragraph (a) of this Section. Each of the parties hereto hereby irrevocably
waives, to the fullest extent permitted by applicable law, the defense of an
inconvenient forum to the maintenance of such action or proceeding in any such
court.
 
(c)           Service of Process. Each party irrevocably consents to service of
process in the manner provided for notices in Section 4.4. Nothing in this
Limited Guaranty will affect the right of any party hereto to serve process in
any other manner permitted by applicable law.
 
(d)           Waiver. Each Guarantor hereby waives, to the maximum extent not
prohibited by law, any right it may have to claim or recover in any legal action
or proceeding referred to in this Section any special, exemplary punitive or
consequential damages.
 
4.9           Governing Law. THIS LIMITED GUARANTY AND THE RIGHTS AND
OBLIGATIONS HEREUNDER OF THE GUARANTORS, THE BORROWER AND THE SECURED PARTIES
AND ANY CLAIMS, CONTROVERSY, DISPUTE OR CAUSE OF ACTION (WHETHER IN CONTRACT OR
TORT OR OTHERWISE) BASED UPON, ARISING OUT OF OR RELATING TO THIS LIMITED
GUARANTY AND THE TRANSACTIONS CONTEMPLATED HEREBY SHALL BE GOVERNED BY, AND
CONSTRUED IN ACCORDANCE WITH, THE LAW OF THE STATE OF NEW YORK.
 
4.10           WAIVER OF JURY TRIAL. EACH PARTY WAIVES, TO THE FULLEST EXTENT
PERMITTED BY APPLICABLE LAW, ANY RIGHT IT MAY HAVE TO A TRIAL BY JURY IN ANY
LEGAL PROCEEDING DIRECTLY OR INDIRECTLY ARISING OUT OF OR RELATING TO THIS
LIMITED GUARANTY OR ANY TRANSACTION CONTEMPLATED HEREBY (WHETHER BASED ON
CONTRACT, TORT OR ANY OTHER THEORY). EACH PARTY HERETO (A) CERTIFIES THAT NO
REPRESENTATIVE, AGENT OR ATTORNEY OF ANY SECURED PARTY HAS REPRESENTED,
EXPRESSLY OR OTHERWISE, THAT SUCH SECURED PARTY WOULD NOT, IN THE EVENT OF
LITIGATION, SEEK TO ENFORCE THE FOREGOING WAIVER AND (B) ACKNOWLEDGES THAT THE
SECURED PARTIES HERETO HAVE BEEN INDUCED TO ENTER INTO THIS LIMITED GUARANTY BY,
AMONG OTHER THINGS, THE MUTUAL WAIVERS AND CERTIFICATIONS IN THIS SECTION.
 
4.11             Assignment. This Limited Guaranty shall be binding on, and
shall inure to the benefit of the Guarantors, the Agent, each Secured Party and
their respective successors and assigns; provided that no Guarantor may assign
or transfer its rights or obligations under this Limited Guaranty without the
written consent of the Agent.
 
 
 
7

 
 
4.12             Indemnity and Expenses. (a) The Guarantors, jointly and
severally, agree to indemnify the Agent, each Noteholder and each Related Party
of any of the foregoing Persons (each such Person being called an “Indemnitee”)
against, and hold each Indemnitee harmless from, any and all losses, claims,
damages, liabilities and related costs and expenses (including the fees, charges
and disbursements of any counsel for any Indemnitee), incurred by any Indemnitee
or asserted against any Indemnitee by any Person (including an Obligor) arising
out of, in connection with, or as a result of (i) the execution or delivery of
this Limited Guaranty, any other Note Purchase Document or any agreement or
instrument contemplated hereby or thereby, the performance by the parties hereto
of their respective obligations hereunder or thereunder or the consummation of
the transactions contemplated hereby or thereby, (ii) the use or proposed use of
the proceeds therefrom, or (iii) any actual or prospective claim, litigation,
investigation or proceeding relating to any of the foregoing, whether based on
contract, tort or any other theory, whether brought by a third party or by any
Obligor; provided that such indemnity shall not, as to any Indemnitee, be
available to the extent that such losses, claims, damages, liabilities or
related expenses (x) are determined by a court of competent jurisdiction by
final and nonappealable judgment to have resulted from the gross negligence or
willful misconduct of such Indemnitee or (y) result from a claim brought by any
Obligor against an Indemnitee for a material breach in bad faith of such
Indemnitee’s obligations hereunder or under any other Note Purchase Document, if
any such Obligor has obtained a final and nonappealable judgment in its favor on
such claim as determined by a court of competent jurisdiction.
 
(b)           The Guarantors shall not, without the prior written consent of the
applicable Indemnitee(s), effect any settlement of any pending or threatened
claim, litigation, investigation or proceeding in respect of which such
Indemnitee is a party and indemnity could have been sought hereunder by such
Indemnitee, unless such settlement (i) includes an unconditional release of such
Indemnitee from all liability or claims that are the subject matter of such
proceeding and (ii) does not include a statement as to or an admission of fault,
culpability, or a failure to act by or on behalf of such Indemnitee.
 
(c)           The Guarantors will upon demand, jointly and severally, pay to the
Agent the amount of any and all expenses, including, without limitation, the
fees and expenses of its counsel and of any experts and agents, that the Agent
or any Secured Party may incur in connection with (i) the exercise or
enforcement of any of the rights of the Agent or the other Secured Parties
hereunder or (ii) the failure by any Guarantor to perform or observe any of the
provisions hereof.
 
(d)           The agreements in this Section 4.12 shall survive repayment of the
Note Indebtedness and all other amounts payable under the Note Purchase
Agreement and the other Note Purchase Documents.
 
[SIGNATURE PAGE FOLLOWS]
 
 
8

 
IN WITNESS WHEREOF, the parties hereto have executed and delivered this Limited
Guaranty as of the date first above written.
 
AEMETIS, INC., as a Guarantor
 
By: s/ Eric A. McAfee                       

Name: Eric McAfee
Title: CEO
 
 
AEMETIS ADVANCED PRODUCTS KEYES, INC., as a Guarantor
 
By: s/ Eric A. McAfee                       

Name: Eric McAfee
Title: CEO
 
Address for Notices to each Guarantor:
20400 Stevens Creek Blvd, Suite 700
Cupertino, CA 95014
Attention:  Chief Executive Officer
Telephone: 408-390-3275
Facsimile: 408-252-8044
 
 
THIRD EYE CAPITAL CORPORATION, as the Agent
 
By: /s/ Arif N. Bhalwani                        

Name: Arif N. Bhalwani
Title: Managing Director
 
 
 
 
 
 
 
 
Signature Page to Second A&R Limited Guaranty
 

 
 
Acknowledged and Agreed:
 
 
GOODLAND ADVANCED FUELS, INC.,
as the Borrower
 
 
By: /s/ Michael Peterson                            

Name: Michael Peterson
Title: CEO
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Signature Page to Second A&R Limited Guaranty