// File: /workspace/github_cpp_makefile_star2_O3/deanturpin[P]curly/./curly.h
// Function: curly(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool)
std::string curly(const std::string &url, const bool use_network = true) {

  // Known errors
  const std::vector<std::pair<unsigned int, std::string>> errors {
  {0, "ok"},
  {1536, "no-network"},
  {32512, "path-to-curl-incorrect"},
  };

  // Construct the command with redirects to stdout and stderr
  const std::string file = "/tmp/stdout.txt";
  const std::string command =
    "/usr/bin/curl \'" + url + "\' 2> /tmp/stderr.txt 1> " + file;

  // Attempt to run command (unless network access is disable)
  const unsigned int error_code = use_network ? system(command.c_str()) : 0;

  // Look up string for error code
  const auto it = std::find_if(errors.cbegin(), errors.cend(), [&error_code](const auto &e){
                                return e.first == error_code;
                               });

  const std::string error_string =
    (it != errors.cend() ? it->second : std::to_string(error_code));

  // Read the response written to the stdout file
  std::stringstream ss("{\"error\" : \"" + error_string + "\"}");
  std::ifstream in(file);
  if (error_code == 0 && in.good()) {
    ss.str("");
    ss << in.rdbuf();
  }

  // Return the response (or error)
  return ss.str();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x428, %rsp            # imm = 0x428
movl %edx, %r14d
movq %rsi, %r15
movq %rdi, %rbx
leaq 0xa0(%rsp), %rdi
movl $0x0, -0x8(%rdi)
leaq 0xb0(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x3b10(%rip), %rsi      # 0x6048
leaq 0x3b0b(%rip), %rdx      # 0x604a
callq 0x3fc4
leaq 0xc0(%rsp), %r12
movl $0x600, (%r12)          # imm = 0x600
leaq 0xc8(%rsp), %rdi
leaq 0xd8(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x3adc(%rip), %rsi      # 0x604b
leaq 0x3adf(%rip), %rdx      # 0x6055
callq 0x3fc4
leaq 0xe8(%rsp), %r12
movl $0x7f00, (%r12)         # imm = 0x7F00
leaq 0xf0(%rsp), %rdi
leaq 0x100(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x3ab0(%rip), %rsi      # 0x6056
leaq 0x3abf(%rip), %rdx      # 0x606c
callq 0x3fc4
leaq 0x80(%rsp), %rdi
leaq 0x98(%rsp), %rsi
leaq 0x2a0(%rsp), %rcx
movl $0x3, %edx
callq 0x3978
movq $-0x78, %r12
movq -0x10(%r13), %rdi
cmpq %rdi, %r13
je 0x25f0
movq (%r13), %rsi
incq %rsi
callq 0x2180
addq $-0x28, %r13
addq $0x28, %r12
jne 0x25db
leaq 0x70(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x3a62(%rip), %rsi      # 0x606d
leaq 0x3a6a(%rip), %rdx      # 0x607c
leaq 0x60(%rsp), %rdi
callq 0x3fc4
leaq 0x3a5a(%rip), %rsi      # 0x607d
leaq 0x2a0(%rsp), %rdi
movq %r15, %rdx
callq 0x39c1
leaq 0x3a53(%rip), %rsi      # 0x608d
leaq 0x2a0(%rsp), %rdi
callq 0x22d0
leaq 0xa8(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x2677
movq %rdx, 0x98(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xa8(%rsp)
jmp 0x267f
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
leaq 0x98(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x60(%rsp), %rsi
movq 0x68(%rsp), %rdx
callq 0x2080
leaq 0x50(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x26d4
movq %rdx, 0x40(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x50(%rsp)
jmp 0x26db
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
movq %rdx, 0x48(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x98(%rsp), %rdi
cmpq %r13, %rdi
je 0x2710
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x2180
leaq 0x2b0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2731
movq 0x2b0(%rsp), %rsi
incq %rsi
callq 0x2180
xorl %ebp, %ebp
testb %r14b, %r14b
je 0x2744
movq 0x40(%rsp), %rdi
callq 0x2150
movl %eax, %ebp
movq 0x80(%rsp), %rdx
movq 0x88(%rsp), %rax
movq %rax, %r8
subq %rdx, %r8
movq %r8, %rdi
sarq $0x3, %rdi
movabsq $-0x3333333333333333, %rsi # imm = 0xCCCCCCCCCCCCCCCD
imulq %rsi, %rdi
sarq $0x2, %rdi
testq %rdi, %rdi
jle 0x27b5
leaq (%rdi,%rdi,4), %rcx
shlq $0x5, %rcx
addq %rdx, %rcx
incq %rdi
addq $0x50, %rdx
cmpl %ebp, -0x50(%rdx)
je 0x27ed
cmpl %ebp, -0x28(%rdx)
je 0x27f3
cmpl %ebp, (%rdx)
je 0x27fd
cmpl %ebp, 0x28(%rdx)
je 0x27f9
decq %rdi
addq $0xa0, %rdx
cmpq $0x1, %rdi
jg 0x278a
movq %rax, %r8
subq %rcx, %r8
jmp 0x27b8
movq %rdx, %rcx
sarq $0x3, %r8
imulq %rsi, %r8
cmpq $0x1, %r8
je 0x27e2
cmpq $0x2, %r8
je 0x27da
cmpq $0x3, %r8
jne 0x2822
cmpl %ebp, (%rcx)
je 0x27e8
addq $0x28, %rcx
cmpl %ebp, (%rcx)
je 0x27e8
addq $0x28, %rcx
cmpl %ebp, (%rcx)
cmovneq %rax, %rcx
movq %rcx, %rdx
jmp 0x27fd
addq $-0x50, %rdx
jmp 0x27fd
addq $-0x28, %rdx
jmp 0x27fd
addq $0x28, %rdx
cmpq %rax, %rdx
je 0x2822
leaq 0x30(%rsp), %rax
movq %rax, -0x10(%rax)
movq 0x8(%rdx), %rsi
movq 0x10(%rdx), %rdx
addq %rsi, %rdx
leaq 0x20(%rsp), %rdi
callq 0x3f2e
jmp 0x2897
movl $0x1, %eax
cmpl $0xa, %ebp
jb 0x2870
movl $0x4, %eax
movl $0xd1b71759, %ecx       # imm = 0xD1B71759
movl %ebp, %edx
cmpl $0x63, %edx
jbe 0x2869
cmpl $0x3e7, %edx            # imm = 0x3E7
jbe 0x286e
cmpl $0x2710, %edx           # imm = 0x2710
jb 0x2870
movl %edx, %esi
imulq %rcx, %rsi
shrq $0x2d, %rsi
addl $0x4, %eax
cmpl $0x1869f, %edx          # imm = 0x1869F
movl %esi, %edx
ja 0x2838
addl $-0x3, %eax
jmp 0x2870
addl $-0x2, %eax
jmp 0x2870
decl %eax
movl %eax, %esi
leaq 0x30(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x20(%rsp), %rdi
xorl %edx, %edx
callq 0x21b0
movq 0x20(%rsp), %rdi
movl 0x28(%rsp), %esi
movl %ebp, %edx
callq 0x3c38
leaq 0x3808(%rip), %rsi      # 0x60a6
movq %rsp, %rdi
leaq 0x20(%rsp), %rdx
callq 0x39c1
leaq 0x3801(%rip), %rsi      # 0x60b3
movq %rsp, %rdi
callq 0x22d0
movq %r13, 0x98(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x28e6
movq %rdx, 0x98(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xa8(%rsp)
jmp 0x28ee
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
leaq 0x98(%rsp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x2a0(%rsp), %rdi
movl $0x18, %edx
callq 0x2240
movq 0x98(%rsp), %rdi
cmpq %r13, %rdi
je 0x293c
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x2180
leaq 0x10(%rsp), %r14
movq -0x10(%r14), %rdi
cmpq %r14, %rdi
je 0x2957
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2180
leaq 0x98(%rsp), %rdi
leaq 0x60(%rsp), %rsi
movl $0x8, %edx
callq 0x2260
testl %ebp, %ebp
jne 0x29d8
movq 0x98(%rsp), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0xb8(%rsp,%rax)
jne 0x29d8
movq %rsp, %rdi
movq %r14, (%rdi)
leaq 0x376f(%rip), %rdx      # 0x6104
movq %rdx, %rsi
callq 0x3fc4
leaq 0x2b8(%rsp), %rdi
movq %rsp, %rsi
callq 0x21f0
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x29c3
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2180
leaq 0x2b0(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0x2050
leaq 0x2b8(%rsp), %rsi
movq %rbx, %rdi
callq 0x2230
leaq 0x98(%rsp), %rdi
callq 0x2060
movq 0x65c4(%rip), %rsi      # 0x8fc0
leaq 0x2a0(%rsp), %rdi
callq 0x2110
leaq 0x320(%rsp), %rdi
callq 0x2090
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2a31
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x2180
movq 0x40(%rsp), %rdi
cmpq %r15, %rdi
je 0x2a48
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x2180
movq 0x60(%rsp), %rdi
cmpq %r12, %rdi
je 0x2a5f
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x2180
leaq 0x80(%rsp), %rdi
callq 0x3a4a
movq %rbx, %rax
addq $0x428, %rsp            # imm = 0x428
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x2bc7
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2180
jmp 0x2bc7
jmp 0x2bc4
jmp 0x2b03
movq %rax, %rbx
jmp 0x2bd4
movq %rax, %rbx
movq 0x98(%rsp), %rdi
cmpq %r13, %rdi
je 0x2ad7
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x2180
jmp 0x2ad7
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2bf5
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2180
jmp 0x2bf5
movq %rax, %rbx
jmp 0x2bf5
movq %rax, %rbx
jmp 0x2c10
movq %rax, %rbx
movq 0x98(%rsp), %rdi
cmpq %r13, %rdi
je 0x2b30
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x2180
jmp 0x2b30
movq %rax, %rbx
leaq 0x2b0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2c27
movq 0x2b0(%rsp), %rsi
jmp 0x2c1f
movq %rax, %rbx
jmp 0x2c27
movq %rax, %rbx
jmp 0x2c3e
movq %rax, %rbx
leaq 0x110(%rsp), %rdi
leaq 0x98(%rsp), %rsi
callq 0x22f0
jmp 0x2c4b
jmp 0x2b81
movq %rax, %rbx
addq $-0x10, %r12
leaq 0x98(%rsp), %r14
movq -0x10(%r12), %rdi
cmpq %rdi, %r12
je 0x2ba6
movq (%r12), %rsi
incq %rsi
callq 0x2180
leaq -0x28(%r12), %rax
addq $-0x18, %r12
cmpq %r14, %r12
movq %rax, %r12
jne 0x2b90
jmp 0x2c4b
movq %rax, %rbx
jmp 0x2c4b
movq %rax, %rbx
leaq 0x98(%rsp), %rdi
callq 0x2060
movq 0x63e5(%rip), %rsi      # 0x8fc0
leaq 0x2a0(%rsp), %rdi
callq 0x2110
leaq 0x320(%rsp), %rdi
callq 0x2090
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2c10
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x2180
movq 0x40(%rsp), %rdi
cmpq %r15, %rdi
je 0x2c27
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x2180
movq 0x60(%rsp), %rdi
cmpq %r12, %rdi
je 0x2c3e
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x2180
leaq 0x80(%rsp), %rdi
callq 0x3a4a
movq %rbx, %rdi
callq 0x2290