// File: jliesch[P]ofxget/ofxhome.cc
// Function: ofxget::OfxHomeFullDumpString[abi:cxx11]()
string OfxHomeFullDumpString() {
    // Fake debugging response
    if (false) {
        return R"RESPONSE(<?xml version="1.0" encoding="utf-8"?>
                <institution id="421">
                <name>ING DIRECT (Canada)</name>
                <fid>061400152</fid>
                <org>INGDirectCanada</org>
                <url>https://ofx.ingdirect.ca</url>
                <ofxfail>1</ofxfail>
                <sslfail>5</sslfail>
                <lastofxvalidation>2014-10-26 22:57:57</lastofxvalidation>
                <lastsslvalidation>2014-12-03 23:01:03</lastsslvalidation>
                <profile addr1="3389 Steeles Avenue East" city="Toronto" state="ON" postalcode="M2H 3S8" country="CAN" csphone="800-464-3473" tsphone="800-464-3473" url="http://www.tangerine.ca" email="clientservices@ingdirect.ca" signonmsgset="true" bankmsgset="true"/>
                </institution>
                <institution id="422">
                <name>Safe Credit Union - OFX Beta</name>
                <fid>321173742</fid>
                <org>DI</org><url>https://ofxcert.diginsite.com/cmr/cmr.ofx</url>
                <ofxfail>3</ofxfail>
                <sslfail>0</sslfail>
                <lastofxvalidation>2010-03-18 16:25:00</lastofxvalidation>
                <lastsslvalidation>2018-03-17 00:12:01</lastsslvalidation>
                </institution>

<institution id="479">
<name>Vanguard Group, The</name>
<fid>15103</fid>
<org>Vanguard</org>
<brokerid>vanguard.com</brokerid>
<url>https://vesnc.vanguard.com/us/OfxDirectConnectServlet</url>
<ofxfail>0</ofxfail>
<sslfail>0</sslfail>
<lastofxvalidation>2018-03-18 00:34:54</lastofxvalidation>
<lastsslvalidation>2018-03-18 00:34:54</lastsslvalidation>
<profile finame="Vanguard" addr1="P.O. Box 1110" city="Valley Forge" state="PA" postalcode="19482-1110" country="USA" csphone="1-212-723-2898" tsphone="1-212-723-2898" url="https://vesnc.vanguard.com/us/OfxDirectConnectServlet" email="alex_shnir@smb.com" signonmsgset="true" bankmsgset="true" invstmtmsgset="true" emailmsgset="true" seclistmsgset="true"/>
</institution>

)RESPONSE";
    }
    CURL *curl = curl_easy_init();
    if (! curl) {
      throw string("Could not initialize curl");
    }

    string response;
    curl_easy_setopt(curl, CURLOPT_URL, "http://www.ofxhome.com/api.php?dump=yes");
    curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, CurlWriteToString);
    curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void *)&response);

    CURLcode res = curl_easy_perform(curl);
    if (res != CURLE_OK) {
        throw "Curl error: " + std::to_string(res);
    }

    curl_easy_cleanup(curl);

    return response;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x68(%rbp)
movq %rdi, %rax
movq %rax, -0x60(%rbp)
movq %rdi, -0x8(%rbp)
callq 0x7920
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0xecf2
movb $0x1, -0x25(%rbp)
movl $0x20, %edi
callq 0x7380
movq %rax, -0x78(%rbp)
movq %rax, -0x80(%rbp)
leaq -0x11(%rbp), %rdi
movq %rdi, -0x70(%rbp)
callq 0x78f0
movq -0x78(%rbp), %rdi
movq -0x70(%rbp), %rdx
leaq 0x5a4b7(%rip), %rsi     # 0x69157
callq 0x77b0
jmp 0xeca7
movq -0x80(%rbp), %rdi
movb $0x0, -0x25(%rbp)
leaq 0x858ca(%rip), %rsi     # 0x94580
movq 0x862e3(%rip), %rdx     # 0x94fa0
callq 0x75e0
jmp 0xee4e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x11(%rbp), %rdi
callq 0x7b70
testb $0x1, -0x25(%rbp)
jne 0xece4
jmp 0xeced
movq -0x80(%rbp), %rdi
callq 0x7840
jmp 0xee45
movq -0x68(%rbp), %rdi
movb $0x0, -0x26(%rbp)
callq 0x7320
movq -0x10(%rbp), %rdi
leaq 0x5a7b2(%rip), %rdx     # 0x694bc
xorl %eax, %eax
movl $0x2712, %esi           # imm = 0x2712
callq 0x7820
jmp 0xed18
movq -0x10(%rbp), %rdi
leaq 0x12d(%rip), %rdx       # 0xee50
xorl %eax, %eax
movl $0x4e2b, %esi           # imm = 0x4E2B
callq 0x7820
jmp 0xed31
movq -0x68(%rbp), %rdx
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl $0x2711, %esi           # imm = 0x2711
callq 0x7820
jmp 0xed47
movq -0x10(%rbp), %rdi
callq 0x7670
movl %eax, -0x84(%rbp)
jmp 0xed58
movl -0x84(%rbp), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
je 0xee11
movb $0x1, -0x51(%rbp)
movl $0x20, %edi
callq 0x7380
movq %rax, -0x90(%rbp)
movl -0x2c(%rbp), %esi
leaq -0x50(%rbp), %rdi
callq 0xb000
jmp 0xed8e
movq -0x90(%rbp), %rdi
leaq 0x5a414(%rip), %rsi     # 0x691b0
leaq -0x50(%rbp), %rdx
callq 0xb580
jmp 0xeda7
movq -0x90(%rbp), %rdi
movb $0x0, -0x51(%rbp)
leaq 0x857c7(%rip), %rsi     # 0x94580
movq 0x861e0(%rip), %rdx     # 0x94fa0
callq 0x75e0
jmp 0xee4e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0xee3c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0xedfb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x7b88
testb $0x1, -0x51(%rbp)
jne 0xee03
jmp 0xee0f
movq -0x90(%rbp), %rdi
callq 0x7840
jmp 0xee3c
movq -0x10(%rbp), %rdi
callq 0x7120
jmp 0xee1c
movb $0x1, -0x26(%rbp)
testb $0x1, -0x26(%rbp)
jne 0xee2f
movq -0x68(%rbp), %rdi
callq 0x7b88
movq -0x60(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
movq -0x68(%rbp), %rdi
callq 0x7b88
movq -0x20(%rbp), %rdi
callq 0x7600
nop