// File: /workspace/github_cpp_makefile_star2_O3/jliesch[P]ofxget/ofxhome.cc
// Function: ofxget::UploadSuccessfulRequest(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
string UploadSuccessfulRequest(const string& api_key, const string& url, const string& request) {
    CURL *curl = curl_easy_init();
    if (! curl) {
      throw string("Could not initialize curl");
    }

    char *api_key_output = curl_easy_escape(curl, api_key.c_str(), api_key.size());
    string anonymized_request = AnonymizeRequest(request);
    char *request_output = curl_easy_escape(curl, anonymized_request.c_str(), anonymized_request.size());
    char *url_output = curl_easy_escape(curl, url.c_str(), url.size());
    if (!api_key_output || !request_output || !url_output) {
      throw string("Could not curl_easy_escape request");
    }
    string output = string("api_key=") + api_key_output + "&url=" + url_output + "&request=" + request_output;
    string response;
#ifdef OFXHOME_DEBUG
    curl_easy_setopt(curl, CURLOPT_URL, "http://localhost/ofxhome/index.php/api/successfulRequest");
#else
    curl_easy_setopt(curl, CURLOPT_URL, "http://www.ofxhome.com/beta/index.php/api/successfulRequest");
#endif
    curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, CurlWriteToString);
    curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void *)&response);
    curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE_LARGE, (long) output.size());
    curl_easy_setopt(curl, CURLOPT_POSTFIELDS, output.c_str());

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

    curl_free(api_key_output);
    curl_free(request_output);
    curl_easy_cleanup(curl);

    return response;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %r15
movq %rdi, %rbx
callq 0x66a0
testq %rax, %rax
je 0xc01c
movq %rax, %r14
movq (%r15), %rsi
movl 0x8(%r15), %edx
movq %rax, %rdi
callq 0x64e0
movq %rax, %r15
leaq 0xc8(%rsp), %rbp
movq %rbp, %rdi
movq %r12, %rsi
callq 0xba65
movq (%rbp), %rsi
movl 0x8(%rbp), %edx
movq %r14, %rdi
callq 0x64e0
movq %rax, %r12
movq (%r13), %rsi
movl 0x8(%r13), %edx
movq %r14, %rdi
callq 0x64e0
testq %r15, %r15
je 0xc05c
testq %r12, %r12
je 0xc05c
movq %rax, %r13
testq %rax, %rax
je 0xc05c
leaq 0x78(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x248bc(%rip), %rsi     # 0x305cc
leaq 0x248bd(%rip), %rdx     # 0x305d4
leaq 0x68(%rsp), %rdi
callq 0xa246
leaq 0x68(%rsp), %rdi
movq %r15, %rsi
callq 0x6460
leaq 0x58(%rsp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xbd55
movq %rdx, 0x48(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x58(%rsp)
jmp 0xbd5b
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
leaq 0x48(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x24857(%rip), %rsi     # 0x305d5
callq 0x6460
leaq 0x98(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xbdb3
movq %rdx, 0x88(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x98(%rsp)
jmp 0xbdba
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
movq 0x8(%rax), %rdx
leaq 0x88(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %r13, %rsi
callq 0x6460
leaq 0xb8(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xbe11
movq %rdx, 0xa8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xb8(%rsp)
jmp 0xbe19
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
leaq 0xa8(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x2479c(%rip), %rsi     # 0x305db
callq 0x6460
leaq 0x18(%rsp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xbe6b
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0xbe71
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
leaq 0x8(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %r12, %rsi
callq 0x6460
leaq 0x38(%rsp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xbebc
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0xbec2
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
leaq 0x18(%rsp), %rsi
movq 0x8(%rax), %rdx
movq %rdx, 0x30(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x8(%rsp), %rdi
cmpq %rsi, %rdi
je 0xbeee
callq 0x63b0
movq 0xa8(%rsp), %rdi
cmpq %r13, %rdi
je 0xbf00
callq 0x63b0
movq 0x88(%rsp), %rdi
cmpq %rbp, %rdi
je 0xbf12
callq 0x63b0
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
leaq 0x78(%rsp), %r13
je 0xbf2b
callq 0x63b0
movq 0x68(%rsp), %rdi
cmpq %r13, %rdi
je 0xbf3a
callq 0x63b0
leaq 0x10(%rbx), %r13
movq %r13, (%rbx)
movq $0x0, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
leaq 0x24691(%rip), %rdx     # 0x305e5
movq %r14, %rdi
movl $0x2712, %esi           # imm = 0x2712
xorl %eax, %eax
callq 0x65e0
leaq -0x10ee(%rip), %rdx     # 0xae7c
movq %r14, %rdi
movl $0x4e2b, %esi           # imm = 0x4E2B
xorl %eax, %eax
callq 0x65e0
movq %r14, %rdi
movl $0x2711, %esi           # imm = 0x2711
movq %rbx, %rdx
xorl %eax, %eax
callq 0x65e0
movq 0x30(%rsp), %rdx
movq %r14, %rdi
movl $0x75a8, %esi           # imm = 0x75A8
xorl %eax, %eax
callq 0x65e0
movq 0x28(%rsp), %rdx
movq %r14, %rdi
movl $0x271f, %esi           # imm = 0x271F
xorl %eax, %eax
callq 0x65e0
movq %r14, %rdi
callq 0x6490
movl %eax, %ebp
testl %eax, %eax
jne 0xc09e
movq %r15, %rdi
callq 0x6040
movq %r12, %rdi
callq 0x6040
movq %r14, %rdi
callq 0x60c0
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0xbff1
callq 0x63b0
leaq 0xd8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc007
callq 0x63b0
movq %rbx, %rax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x6260
movq %rax, %rbx
addq $0x10, %rax
movq %rax, (%rbx)
leaq 0x24120(%rip), %rsi     # 0x30157
leaq 0x24132(%rip), %rdx     # 0x30170
movq %rbx, %rdi
callq 0xa246
leaq 0x394d3(%rip), %rsi     # 0x45520
movq 0x39f44(%rip), %rdx     # 0x45f98
movq %rbx, %rdi
callq 0x6420
movl $0x20, %edi
callq 0x6260
movq %rax, %rbx
addq $0x10, %rax
movq %rax, (%rbx)
leaq 0x24532(%rip), %rsi     # 0x305a9
leaq 0x2454d(%rip), %rdx     # 0x305cb
movq %rbx, %rdi
callq 0xa246
leaq 0x39493(%rip), %rsi     # 0x45520
movq 0x39f04(%rip), %rdx     # 0x45f98
movq %rbx, %rdi
callq 0x6420
jmp 0xc0e6
movl $0x20, %edi
callq 0x6260
movq %rax, %r15
leaq 0x8(%rsp), %rdi
movl %ebp, %esi
callq 0xc4f2
movb $0x1, %bpl
leaq 0x240ef(%rip), %rsi     # 0x301b0
leaq 0x8(%rsp), %rdx
movq %r15, %rdi
callq 0xc482
xorl %ebp, %ebp
leaq 0x39449(%rip), %rsi     # 0x45520
movq 0x39eba(%rip), %rdx     # 0x45f98
movq %r15, %rdi
callq 0x6420
movq %rax, %r14
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xc0fd
callq 0x63b0
testb %bpl, %bpl
jne 0xc10a
jmp 0xc1b9
movq %rax, %r14
movq %r15, %rdi
callq 0x6600
jmp 0xc1b9
jmp 0xc1af
movq %rax, %r14
movq %rbx, %rdi
callq 0x6600
jmp 0xc1da
movq %rax, %r14
movq %rbx, %rdi
callq 0x6600
jmp 0xc1f0
movq %rax, %r14
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xc158
callq 0x63b0
jmp 0xc158
movq %rax, %r14
movq 0xa8(%rsp), %rdi
cmpq %r13, %rdi
je 0xc16f
callq 0x63b0
jmp 0xc16f
movq %rax, %r14
movq 0x88(%rsp), %rdi
cmpq %rbp, %rdi
je 0xc186
callq 0x63b0
jmp 0xc186
movq %rax, %r14
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0xc19f
callq 0x63b0
jmp 0xc19f
movq %rax, %r14
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
jmp 0xc1d0
jmp 0xc1af
jmp 0xc1af
movq %rax, %r14
jmp 0xc1da
jmp 0xc1b6
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r13, %rdi
je 0xc1c6
callq 0x63b0
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0xc1da
callq 0x63b0
leaq 0xd8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc1f0
callq 0x63b0
movq %r14, %rdi
callq 0x6430