// File: /workspace/github_cpp_makefile_star2_O1/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 0xbeab
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 0xb8f4
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 0xbef5
testq %r12, %r12
je 0xbef5
movq %rax, %r13
testq %rax, %rax
je 0xbef5
leaq 0x78(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x25a2d(%rip), %rsi     # 0x315cc
leaq 0x25a2e(%rip), %rdx     # 0x315d4
leaq 0x68(%rsp), %rdi
callq 0xa06a
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 0xbbe4
movq %rdx, 0x48(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x58(%rsp)
jmp 0xbbea
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 0x259c8(%rip), %rsi     # 0x315d5
callq 0x6460
leaq 0x98(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xbc42
movq %rdx, 0x88(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x98(%rsp)
jmp 0xbc49
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 0xbca0
movq %rdx, 0xa8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xb8(%rsp)
jmp 0xbca8
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 0x2590d(%rip), %rsi     # 0x315db
callq 0x6460
leaq 0x18(%rsp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xbcfa
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0xbd00
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 0xbd4b
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0xbd51
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 0xbd7d
callq 0x63b0
movq 0xa8(%rsp), %rdi
cmpq %r13, %rdi
je 0xbd8f
callq 0x63b0
movq 0x88(%rsp), %rdi
cmpq %rbp, %rdi
je 0xbda1
callq 0x63b0
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
leaq 0x78(%rsp), %r13
je 0xbdba
callq 0x63b0
movq 0x68(%rsp), %rdi
cmpq %r13, %rdi
je 0xbdc9
callq 0x63b0
leaq 0x10(%rbx), %r13
movq %r13, (%rbx)
movq $0x0, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
leaq 0x25802(%rip), %rdx     # 0x315e5
movq %r14, %rdi
movl $0x2712, %esi           # imm = 0x2712
xorl %eax, %eax
callq 0x65e0
leaq -0x110a(%rip), %rdx     # 0xacef
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 0xbf3c
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 0xbe80
callq 0x63b0
leaq 0xd8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xbe96
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)
movb $0x1, %bpl
leaq 0x2528e(%rip), %rsi     # 0x31157
leaq 0x252a0(%rip), %rdx     # 0x31170
movq %rbx, %rdi
callq 0xa06a
xorl %ebp, %ebp
leaq 0x3a60f(%rip), %rsi     # 0x464f0
movq 0x3b0b0(%rip), %rdx     # 0x46f98
movq %rbx, %rdi
callq 0x6420
jmp 0xbf84
movl $0x20, %edi
callq 0x6260
movq %rax, %rbx
addq $0x10, %rax
movq %rax, (%rbx)
movb $0x1, %bpl
leaq 0x25696(%rip), %rsi     # 0x315a9
leaq 0x256b1(%rip), %rdx     # 0x315cb
movq %rbx, %rdi
callq 0xa06a
xorl %ebp, %ebp
leaq 0x3a5c5(%rip), %rsi     # 0x464f0
movq 0x3b066(%rip), %rdx     # 0x46f98
movq %rbx, %rdi
callq 0x6420
jmp 0xbf84
movl $0x20, %edi
callq 0x6260
movq %rax, %r15
leaq 0x8(%rsp), %rdi
movl %ebp, %esi
callq 0xc3a2
movb $0x1, %bpl
leaq 0x25251(%rip), %rsi     # 0x311b0
leaq 0x8(%rsp), %rdx
movq %r15, %rdi
callq 0xc332
xorl %ebp, %ebp
leaq 0x3a57b(%rip), %rsi     # 0x464f0
movq 0x3b01c(%rip), %rdx     # 0x46f98
movq %r15, %rdi
callq 0x6420
movq %rax, %r14
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xbfa3
callq 0x63b0
jmp 0xbfa3
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0xc05a
movq %r15, %rdi
callq 0x6600
jmp 0xc05a
movq %rax, %r14
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xbfd5
callq 0x63b0
jmp 0xbfd5
movq %rax, %r14
movq 0xa8(%rsp), %rdi
cmpq %r13, %rdi
je 0xbfec
callq 0x63b0
jmp 0xbfec
movq %rax, %r14
movq 0x88(%rsp), %rdi
cmpq %rbp, %rdi
je 0xc003
callq 0x63b0
jmp 0xc003
movq %rax, %r14
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0xc01c
callq 0x63b0
jmp 0xc01c
movq %rax, %r14
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
jmp 0xc071
jmp 0xc03e
movq %rax, %r14
testb %bpl, %bpl
je 0xc07b
movq %rbx, %rdi
callq 0x6600
jmp 0xc07b
jmp 0xc03e
movq %rax, %r14
jmp 0xc07b
movq %rax, %r14
testb %bpl, %bpl
je 0xc091
movq %rbx, %rdi
callq 0x6600
jmp 0xc091
jmp 0xc057
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r13, %rdi
je 0xc067
callq 0x63b0
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0xc07b
callq 0x63b0
leaq 0xd8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc091
callq 0x63b0
movq %r14, %rdi
callq 0x6430