// File: /workspace/github_cpp_makefile_star2_O1/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 0x403c
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 0x403c
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 0x403c
leaq 0x80(%rsp), %rdi
leaq 0x98(%rsp), %rsi
leaq 0x2a0(%rsp), %rcx
movl $0x3, %edx
callq 0x39c8
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 0x403c
leaq 0x3a5a(%rip), %rsi      # 0x607d
leaq 0x2a0(%rsp), %rdi
movq %r15, %rdx
callq 0x3a11
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), %rcx
movq 0x88(%rsp), %rax
movq %rax, %rdi
subq %rcx, %rdi
sarq $0x3, %rdi
movabsq $-0x3333333333333333, %rsi # imm = 0xCCCCCCCCCCCCCCCD
imulq %rsi, %rdi
sarq $0x2, %rdi
testq %rdi, %rdi
jle 0x27b0
leaq (%rdi,%rdi,4), %r8
shlq $0x5, %r8
addq %rcx, %r8
incq %rdi
addq $0x50, %rcx
movq %rcx, %rdx
cmpl %ebp, -0x50(%rdx)
je 0x27ee
cmpl %ebp, -0x28(%rdx)
je 0x27f4
cmpl %ebp, (%rdx)
je 0x27fe
cmpl %ebp, 0x28(%rdx)
je 0x27fa
decq %rdi
addq $0xa0, %rdx
cmpq $0x1, %rdi
jg 0x278a
movq %r8, %rcx
movq %rax, %rdi
subq %rcx, %rdi
sarq $0x3, %rdi
imulq %rsi, %rdi
cmpq $0x1, %rdi
je 0x27e3
cmpq $0x2, %rdi
je 0x27db
movq %rax, %rdx
cmpq $0x3, %rdi
jne 0x27fe
cmpl %ebp, (%rcx)
je 0x27e9
addq $0x28, %rcx
cmpl %ebp, (%rcx)
je 0x27e9
addq $0x28, %rcx
cmpl %ebp, (%rcx)
cmovneq %rax, %rcx
movq %rcx, %rdx
jmp 0x27fe
addq $-0x50, %rdx
jmp 0x27fe
addq $-0x28, %rdx
jmp 0x27fe
addq $0x28, %rdx
cmpq %rax, %rdx
je 0x2823
leaq 0x30(%rsp), %rax
movq %rax, -0x10(%rax)
movq 0x8(%rdx), %rsi
movq 0x10(%rdx), %rdx
addq %rsi, %rdx
leaq 0x20(%rsp), %rdi
callq 0x3fac
jmp 0x2898
movl $0x1, %eax
cmpl $0xa, %ebp
jb 0x2871
movl $0x4, %eax
movl $0xd1b71759, %ecx       # imm = 0xD1B71759
movl %ebp, %edx
cmpl $0x63, %edx
jbe 0x286a
cmpl $0x3e7, %edx            # imm = 0x3E7
jbe 0x286f
cmpl $0x2710, %edx           # imm = 0x2710
jb 0x2871
movl %edx, %esi
imulq %rcx, %rsi
shrq $0x2d, %rsi
addl $0x4, %eax
cmpl $0x1869f, %edx          # imm = 0x1869F
movl %esi, %edx
ja 0x2839
addl $-0x3, %eax
jmp 0x2871
addl $-0x2, %eax
jmp 0x2871
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 0x3c7f
leaq 0x3807(%rip), %rsi      # 0x60a6
movq %rsp, %rdi
leaq 0x20(%rsp), %rdx
callq 0x3a11
leaq 0x3800(%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 0x28e7
movq %rdx, 0x98(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xa8(%rsp)
jmp 0x28ef
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 0x293d
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x2180
leaq 0x10(%rsp), %r14
movq -0x10(%r14), %rdi
cmpq %r14, %rdi
je 0x2958
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 0x29d9
movq 0x98(%rsp), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0xb8(%rsp,%rax)
jne 0x29d9
movq %rsp, %rdi
movq %r14, (%rdi)
leaq 0x376e(%rip), %rdx      # 0x6104
movq %rdx, %rsi
callq 0x403c
leaq 0x2b8(%rsp), %rdi
movq %rsp, %rsi
callq 0x21f0
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x29c4
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 0x65c3(%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 0x2a32
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x2180
movq 0x40(%rsp), %rdi
cmpq %r15, %rdi
je 0x2a49
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x2180
movq 0x60(%rsp), %rdi
cmpq %r12, %rdi
je 0x2a60
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x2180
leaq 0x80(%rsp), %rdi
callq 0x3a9a
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 0x2bdc
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2180
jmp 0x2bdc
jmp 0x2bd9
jmp 0x2b04
movq %rax, %rbx
jmp 0x2be9
movq %rax, %rbx
movq 0x98(%rsp), %rdi
cmpq %r13, %rdi
je 0x2ad8
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x2180
jmp 0x2ad8
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2c0a
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2180
jmp 0x2c0a
movq %rax, %rbx
jmp 0x2c0a
movq %rax, %rbx
jmp 0x2c25
movq %rax, %rbx
movq 0x98(%rsp), %rdi
cmpq %r13, %rdi
je 0x2b31
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x2180
jmp 0x2b31
movq %rax, %rbx
leaq 0x2b0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2c3c
movq 0x2b0(%rsp), %rsi
jmp 0x2c34
movq %rax, %rbx
jmp 0x2c3c
movq %rax, %rbx
jmp 0x2c53
movq %rax, %rbx
leaq 0x110(%rsp), %rdi
leaq 0x98(%rsp), %rsi
callq 0x22f0
movb $0x1, %al
jmp 0x2b93
jmp 0x2b81
movq %rax, %rbx
jmp 0x2b91
movq %rax, %rbx
leaq 0x98(%rsp), %r12
xorl %eax, %eax
leaq 0x98(%rsp), %r14
cmpq %r12, %r14
sete %cl
orb %al, %cl
jne 0x2c60
addq $-0x10, %r12
movq -0x10(%r12), %rdi
cmpq %rdi, %r12
je 0x2bc3
movq (%r12), %rsi
incq %rsi
callq 0x2180
leaq -0x28(%r12), %rax
addq $-0x18, %r12
cmpq %r14, %r12
movq %rax, %r12
jne 0x2bad
jmp 0x2c60
movq %rax, %rbx
leaq 0x98(%rsp), %rdi
callq 0x2060
movq 0x63d0(%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 0x2c25
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x2180
movq 0x40(%rsp), %rdi
cmpq %r15, %rdi
je 0x2c3c
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x2180
movq 0x60(%rsp), %rdi
cmpq %r12, %rdi
je 0x2c53
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x2180
leaq 0x80(%rsp), %rdi
callq 0x3a9a
movq %rbx, %rdi
callq 0x2290