// File: /workspace/github_cpp_makefile_star2_O3/nurseiit[P]cpp-server/client.cpp
// Function: main
int main(int argc, char *argv[]) {
  try {
    if (argc != 3) {
      std::cout << "Usage: " << argv[0] << " <url> <port>\n";
      std::cout << "Examples:\n";
      std::cout << "  " << argv[0] << " www.example.com 80\n";
      std::cout << "  " << argv[0] << " www.google.com/test.html 80\n";
      return EXIT_FAILURE;
    }

    std::string hostname = hostname_from_url(argv[1]);
    std::string path = path_from_url(argv[1]);
    std::string port = argv[2];

    asio::io_context io_context;

    // Get endpoints for server name
    tcp::resolver resolver(io_context);
    tcp::resolver::results_type endpoints = resolver.resolve(hostname, port);

    // Find first successful endpoint
    tcp::socket socket(io_context);
    asio::connect(socket, endpoints);

    // Set bare minimum request headers for GET to work
    // https://stackoverflow.com/questions/6686261/what-at-the-bare-minimum-is-required-for-an-http-request
    asio::streambuf request;
    std::ostream request_stream(&request);
    request_stream << "GET " << path << " HTTP/1.0\r\n";
    request_stream << "Host: " << hostname << "\r\n";
    // Set "Connection: close" so server ends response with EOF
    request_stream << "Connection: close\r\n\r\n";

    // Send request
    asio::write(socket, request);

    // Read response status line
    asio::streambuf response;
    asio::read_until(socket, response, "\r\n");

    // Check response
    std::istream response_stream(&response);
    std::string http_version;
    response_stream >> http_version;
    unsigned int status_code;
    response_stream >> status_code;
    std::string status_message;
    std::getline(response_stream, status_message);

    if (!response_stream || http_version.substr(0, 5) != "HTTP/") {
      std::cout << "Invalid response\n";
      return EXIT_FAILURE;
    }

    std::cout << "STATUS CODE: " << status_code << std::endl;

    // Read & Print to console response headers
    asio::read_until(socket, response, "\r\n\r\n");

    std::string header;
    while (std::getline(response_stream, header) && header != "\r")
      std::cout << header << "\n";
    std::cout << "\n";

    // Read and print response till EOF
    if (response.size() > 0)
      std::cout << &response;

    asio::error_code error;
    while (asio::read(socket, response, asio::transfer_at_least(1), error))
      std::cout << &response;

    // If read throws EOF, it's expected
    if (error != asio::error::eof)
      throw asio::system_error(error);
  } catch (std::exception &e) {
    std::cout << "ERROR: " << e.what() << "\n";
    return EXIT_FAILURE;
  }

  return EXIT_SUCCESS;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x478, %rsp            # imm = 0x478
movq %rsi, %rbx
cmpl $0x3, %edi
jne 0x65bc
movq 0x8(%rbx), %rsi
leaq 0x1c8(%rsp), %rdi
leaq 0x368(%rsp), %rdx
callq 0x5150
leaq 0xb8(%rsp), %rdi
leaq 0x1c8(%rsp), %rsi
callq 0x5f50
leaq 0x1d8(%rsp), %r15
movq -0x10(%r15), %rdi
cmpq %r15, %rdi
je 0x600c
callq 0x52f0
movq 0x8(%rbx), %rsi
leaq 0x1c8(%rsp), %rdi
leaq 0x368(%rsp), %rdx
callq 0x5150
leaq 0x120(%rsp), %rdi
leaq 0x1c8(%rsp), %rsi
callq 0x5eec
movq 0x1c8(%rsp), %rdi
cmpq %r15, %rdi
je 0x604c
callq 0x52f0
movq 0x10(%rbx), %rsi
leaq 0x1a0(%rsp), %rdi
leaq 0x1c8(%rsp), %rdx
callq 0x5150
leaq 0x30(%rsp), %rdi
callq 0x6ce6
leaq 0x2e0(%rsp), %rdi
leaq 0x30(%rsp), %rsi
xorl %edx, %edx
callq 0x8fec
leaq 0x108(%rsp), %rdi
leaq 0x2e0(%rsp), %rsi
leaq 0xb8(%rsp), %rdx
leaq 0x1a0(%rsp), %rcx
xorl %r8d, %r8d
callq 0x9e60
leaq 0xd8(%rsp), %rdi
leaq 0x30(%rsp), %rsi
xorl %edx, %edx
callq 0xaaa4
leaq 0x1c8(%rsp), %rdi
leaq 0xd8(%rsp), %rsi
leaq 0x108(%rsp), %rdx
xorl %ecx, %ecx
callq 0x6e1a
leaq 0x308(%rsp), %rdi
leaq 0x1c8(%rsp), %rdx
movq $-0x1, %rsi
callq 0x6eb0
leaq 0x368(%rsp), %rdi
leaq 0x308(%rsp), %rbx
movq %rbx, %rsi
callq 0x5140
leaq 0x7fbb(%rip), %rsi      # 0xe0d4
leaq 0x368(%rsp), %rdi
movl $0x4, %edx
callq 0x5350
movq 0x120(%rsp), %rsi
movq 0x128(%rsp), %rdx
leaq 0x368(%rsp), %rdi
callq 0x5350
leaq 0x7f8a(%rip), %rsi      # 0xe0d9
movl $0xb, %edx
movq %rax, %rdi
callq 0x5350
leaq 0x7f82(%rip), %rsi      # 0xe0e5
leaq 0x368(%rsp), %rdi
movl $0x6, %edx
callq 0x5350
movq 0xb8(%rsp), %rsi
movq 0xc0(%rsp), %rdx
leaq 0x368(%rsp), %rdi
callq 0x5350
leaq 0x7f66(%rip), %rsi      # 0xe0ff
movl $0x2, %edx
movq %rax, %rdi
callq 0x5350
leaq 0x7f3f(%rip), %rsi      # 0xe0ec
leaq 0x368(%rsp), %rdi
movl $0x15, %edx
callq 0x5350
leaq 0x8(%rsp), %r14
movq %rbx, (%r14)
leaq 0x140(%rsp), %rbx
movl $0x0, (%rbx)
callq 0x51d0
movq %rax, %r13
movq %rax, 0x8(%rbx)
leaq 0xd8(%rsp), %rdi
movq %r14, %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0xca66
movl 0x140(%rsp), %esi
testl %esi, %esi
je 0x6237
movq 0x148(%rsp), %rdx
leaq 0x8472(%rip), %rcx      # 0xe682
leaq 0x1c8(%rsp), %rdi
callq 0x7568
leaq 0x1c8(%rsp), %rdi
callq 0x7701
leaq 0x1c8(%rsp), %rdi
callq 0x5610
leaq 0x140(%rsp), %rbx
leaq 0x1c8(%rsp), %rdx
movq %rbx, %rdi
movq $-0x1, %rsi
callq 0x6eb0
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x7e99(%rip), %rsi      # 0xe0ff
leaq 0x7e94(%rip), %rdx      # 0xe101
leaq 0x8(%rsp), %rdi
callq 0x8da6
leaq 0x98(%rsp), %rsi
movq %rbx, (%rsi)
leaq 0x70(%rsp), %rcx
movl $0x0, (%rcx)
movq %r13, 0x8(%rcx)
leaq 0xd8(%rsp), %rdi
leaq 0x8(%rsp), %rdx
xorl %r8d, %r8d
callq 0xcdfc
movl 0x70(%rsp), %esi
testl %esi, %esi
je 0x62e1
movq 0x78(%rsp), %rdx
leaq 0x83ce(%rip), %rcx      # 0xe688
leaq 0x1c8(%rsp), %rdi
callq 0x7568
leaq 0x1c8(%rsp), %rdi
callq 0x7701
leaq 0x1c8(%rsp), %rdi
callq 0x5610
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x62f5
callq 0x52f0
leaq 0x1c8(%rsp), %rdi
leaq 0x140(%rsp), %r14
movq %r14, %rsi
callq 0x55c0
leaq 0x80(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq $0x0, -0x8(%rbp)
movb $0x0, (%rbp)
leaq 0x1c8(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x53d0
leaq 0x1c8(%rsp), %rbx
leaq 0x2c(%rsp), %rsi
movq %rbx, %rdi
callq 0x5530
leaq 0xa8(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq 0x1c8(%rsp), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x5300
movsbl %al, %edx
leaq 0x1c8(%rsp), %r15
leaq 0x98(%rsp), %rsi
movq %r15, %rdi
callq 0x55a0
movq 0x1c8(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x1e8(%rsp,%rax)
jne 0x63f4
leaq 0x8(%rsp), %rdi
leaq 0x70(%rsp), %rsi
movl $0x5, %ecx
xorl %edx, %edx
callq 0x5330
leaq 0x7d38(%rip), %rsi      # 0xe102
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x50d0
movl %eax, %ebx
movq (%r12), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x63ec
callq 0x52f0
testl %ebx, %ebx
je 0x6742
movl $0x1, %ebx
movq 0xdbb0(%rip), %rdi      # 0x13fb0
leaq 0x7d01(%rip), %rsi      # 0xe108
movl $0x11, %edx
callq 0x5350
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0x642b
callq 0x52f0
movq 0x70(%rsp), %rdi
cmpq %rbp, %rdi
je 0x643a
callq 0x52f0
movq 0xdb87(%rip), %rax      # 0x13fc8
movq (%rax), %rcx
movq 0x8(%rax), %rax
leaq 0x1d8(%rsp), %rdi
movq %rcx, -0x10(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, 0x1c8(%rsp,%rcx)
movq $0x0, -0x8(%rdi)
callq 0x5100
leaq 0xd4b4(%rip), %r14      # 0x13928
movq %r14, 0x140(%rsp)
movq 0x188(%rsp), %rdi
testq %rdi, %rdi
je 0x648e
callq 0x52f0
movq 0xdaeb(%rip), %r15      # 0x13f80
addq $0x10, %r15
leaq 0x178(%rsp), %rdi
movq %r15, -0x38(%rdi)
callq 0x5450
leaq 0x370(%rsp), %rdi
callq 0x5100
movq %r14, 0x308(%rsp)
movq 0x350(%rsp), %rdi
testq %rdi, %rdi
je 0x64d1
callq 0x52f0
leaq 0x340(%rsp), %rdi
movq %r15, -0x38(%rdi)
callq 0x5450
leaq 0xd8(%rsp), %rdi
callq 0xb74e
movq 0x110(%rsp), %rdi
testq %rdi, %rdi
je 0x6501
callq 0x8ca0
leaq 0x2e0(%rsp), %rdi
callq 0x9e26
movq 0x30(%rsp), %r14
movq 0x38(%r14), %r15
testq %r15, %r15
je 0x6560
movq (%r15), %rax
movq %r15, %rdi
callq *0x10(%rax)
movq 0x20(%r15), %r15
testq %r15, %r15
jne 0x651c
movq 0x30(%rsp), %r14
movq 0x38(%r14), %rdi
testq %rdi, %rdi
je 0x6560
movq (%rdi), %rax
movq 0x20(%rdi), %r15
callq *0x8(%rax)
movq %r15, 0x38(%r14)
movq %r15, %rdi
testq %r15, %r15
jne 0x653c
movq 0x30(%rsp), %r14
testq %r14, %r14
je 0x673a
leaq 0x8(%r14), %rdi
callq 0x5370
movq %r14, %rdi
callq 0x52f0
leaq 0x1b0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6587
callq 0x52f0
leaq 0x130(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x659d
callq 0x52f0
leaq 0xc8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6726
callq 0x52f0
jmp 0x6726
movq 0xd9ed(%rip), %r14      # 0x13fb0
leaq 0x7ab2(%rip), %rsi      # 0xe07c
movl $0x7, %edx
movq %r14, %rdi
callq 0x5350
movq (%rbx), %r15
testq %r15, %r15
je 0x65fb
movq %r15, %rdi
callq 0x5170
movq 0xd9c2(%rip), %rdi      # 0x13fb0
movq %r15, %rsi
movq %rax, %rdx
callq 0x5350
jmp 0x6613
movq (%r14), %rax
movq -0x18(%rax), %rax
leaq (%r14,%rax), %rdi
movl 0x20(%r14,%rax), %esi
orl $0x1, %esi
callq 0x5510
movq 0xd996(%rip), %rdi      # 0x13fb0
leaq 0x7a63(%rip), %rsi      # 0xe084
movl $0xe, %edx
callq 0x5350
movq 0xd97e(%rip), %rdi      # 0x13fb0
leaq 0x7a5a(%rip), %rsi      # 0xe093
movl $0xa, %edx
callq 0x5350
movq 0xd966(%rip), %r14      # 0x13fb0
leaq 0x7a4d(%rip), %rsi      # 0xe09e
movl $0x2, %edx
movq %r14, %rdi
callq 0x5350
movq (%rbx), %r15
testq %r15, %r15
je 0x6682
movq %r15, %rdi
callq 0x5170
movq 0xd93b(%rip), %rdi      # 0x13fb0
movq %r15, %rsi
movq %rax, %rdx
callq 0x5350
jmp 0x669a
movq (%r14), %rax
movq -0x18(%rax), %rax
leaq (%r14,%rax), %rdi
movl 0x20(%r14,%rax), %esi
orl $0x1, %esi
callq 0x5510
movq 0xd90f(%rip), %rdi      # 0x13fb0
leaq 0x79f9(%rip), %rsi      # 0xe0a1
movl $0x14, %edx
callq 0x5350
movq 0xd8f7(%rip), %r14      # 0x13fb0
leaq 0x79de(%rip), %rsi      # 0xe09e
movl $0x2, %edx
movq %r14, %rdi
callq 0x5350
movq (%rbx), %rbx
testq %rbx, %rbx
je 0x66f1
movq %rbx, %rdi
callq 0x5170
movq 0xd8cc(%rip), %rdi      # 0x13fb0
movq %rbx, %rsi
movq %rax, %rdx
callq 0x5350
jmp 0x6709
movq (%r14), %rax
movq -0x18(%rax), %rax
leaq (%r14,%rax), %rdi
movl 0x20(%r14,%rax), %esi
orl $0x1, %esi
callq 0x5510
movl $0x1, %ebx
movq 0xd89b(%rip), %rdi      # 0x13fb0
leaq 0x799a(%rip), %rsi      # 0xe0b6
movl $0x1d, %edx
callq 0x5350
movl %ebx, %eax
addq $0x478, %rsp            # imm = 0x478
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %r14d, %r14d
jmp 0x6569
movq 0xd867(%rip), %rdi      # 0x13fb0
leaq 0x79ca(%rip), %rsi      # 0xe11a
movl $0xd, %edx
callq 0x5350
movl 0x2c(%rsp), %esi
movq 0xd84b(%rip), %rdi      # 0x13fb0
callq 0x5210
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x5300
movsbl %al, %esi
movq %rbx, %rdi
callq 0x5040
movq %rax, %rdi
callq 0x5220
leaq 0x60(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x7958(%rip), %rsi      # 0xe0fd
leaq 0x7955(%rip), %rdx      # 0xe101
leaq 0x50(%rsp), %rdi
callq 0x8da6
leaq 0x1c0(%rsp), %rsi
movq %r14, (%rsi)
leaq 0x40(%rsp), %rcx
movl $0x0, (%rcx)
movq %r13, 0x8(%rcx)
leaq 0xd8(%rsp), %rdi
leaq 0x50(%rsp), %rdx
xorl %r8d, %r8d
callq 0xcdfc
movl 0x40(%rsp), %esi
testl %esi, %esi
je 0x6817
movq 0x48(%rsp), %rdx
leaq 0x7e8f(%rip), %rcx      # 0xe688
leaq 0x8(%rsp), %rdi
callq 0x7568
leaq 0x8(%rsp), %rdi
callq 0x7701
leaq 0x8(%rsp), %rdi
callq 0x5610
movq %r13, 0x90(%rsp)
movq 0x50(%rsp), %rdi
cmpq %r12, %rdi
je 0x682e
callq 0x52f0
leaq 0x8(%rsp), %r12
leaq 0x18(%rsp), %rax
movq %rax, (%r12)
movq $0x0, 0x8(%r12)
movb $0x0, 0x10(%r12)
leaq 0x78d6(%rip), %r13      # 0xe128
movq 0xd757(%rip), %rbp      # 0x13fb0
leaq 0x78a0(%rip), %rbx      # 0xe100
movq 0x1c8(%rsp), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x5300
movsbl %al, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x55a0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x68c8
movq %r12, %rdi
movq %r13, %rsi
callq 0x50d0
testl %eax, %eax
je 0x68c8
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbp, %rdi
callq 0x5350
movl $0x1, %edx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x5350
jmp 0x6860
movq 0xd6e1(%rip), %rdi      # 0x13fb0
leaq 0x782a(%rip), %rsi      # 0xe100
movl $0x1, %edx
callq 0x5350
movq 0x168(%rsp), %rax
cmpq 0x150(%rsp), %rax
je 0x6906
movq 0xd6b7(%rip), %rdi      # 0x13fb0
leaq 0x140(%rsp), %rsi
callq 0x5080
leaq 0x50(%rsp), %rbx
movl $0x0, (%rbx)
movq 0x90(%rsp), %rax
movq %rax, 0x8(%rbx)
leaq 0xd8(%rsp), %r15
leaq 0x40(%rsp), %r12
movq 0xd67f(%rip), %r13      # 0x13fb0
leaq 0x80(%rsp), %rbp
movq %r14, 0x40(%rsp)
movl $0x1, %edx
movq %r15, %rdi
movq %r12, %rsi
movq %rbx, %rcx
xorl %r8d, %r8d
callq 0xd54d
testq %rax, %rax
je 0x6966
movq %r13, %rdi
movq %r14, %rsi
callq 0x5080
jmp 0x6939
leaq 0x40(%rsp), %rbx
movq %rbx, %rdi
movl $0x2, %esi
callq 0x6f80
movq 0x58(%rsp), %rax
cmpq 0x8(%rbx), %rax
jne 0x69a8
movl 0x40(%rsp), %eax
cmpl %eax, 0x50(%rsp)
jne 0x69a8
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x69a1
callq 0x52f0
xorl %ebx, %ebx
jmp 0x6411
movl $0x20, %edi
callq 0x5190
movq %rax, %r15
movl 0x50(%rsp), %esi
movq 0x58(%rsp), %rdx
movq %rax, %rdi
callq 0x6fae
movq 0xd5a3(%rip), %rsi      # 0x13f70
movq 0xd5c4(%rip), %rdx      # 0x13f98
movq %r15, %rdi
callq 0x5520
jmp 0x6b43
movq %rdx, %rbx
movq %rax, %r14
movq %r15, %rdi
callq 0x5250
jmp 0x6b49
movq %rdx, %rbx
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x5610
jmp 0x6a16
jmp 0x6b2e
jmp 0x6b43
movq %rdx, %rbx
movq %rax, %r14
movq 0x50(%rsp), %rdi
cmpq %r12, %rdi
jne 0x6b58
jmp 0x6b5d
jmp 0x6b2e
movq %rdx, %rbx
movq %rax, %r14
leaq 0x1c8(%rsp), %rdi
callq 0x5610
jmp 0x6b11
movq %rdx, %rbx
movq %rax, %r14
leaq 0x1c8(%rsp), %rdi
callq 0x5610
jmp 0x6bce
jmp 0x6a60
movq %rdx, %rbx
movq %rax, %r14
jmp 0x6b77
jmp 0x6a6d
movq %rdx, %rbx
movq %rax, %r14
jmp 0x6bc1
jmp 0x6b36
movq %rdx, %rbx
movq %rax, %r14
jmp 0x6bdb
jmp 0x6a8a
movq %rdx, %rbx
movq %rax, %r14
jmp 0x6be8
movq %rdx, %rbx
movq %rax, %r14
jmp 0x6bf5
movq %rdx, %rbx
movq %rax, %r14
jmp 0x6c07
movq %rdx, %rbx
movq %rax, %r14
jmp 0x6c14
movq %rdx, %rbx
movq %rax, %r14
jmp 0x6c1e
movq %rdx, %rbx
movq %rax, %r14
jmp 0x6c34
movq %rdx, %rbx
movq %rax, %r14
movq 0x1c8(%rsp), %rdi
cmpq %r15, %rdi
jne 0x6c45
jmp 0x6c4a
movq %rdx, %rbx
movq %rax, %r14
jmp 0x6c4a
movq %rdx, %rbx
movq %rax, %r14
leaq 0x1d8(%rsp), %rax
jmp 0x6c52
jmp 0x6c62
movq %rdx, %rbx
movq %rax, %r14
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x6bc1
callq 0x52f0
jmp 0x6bc1
movq %rdx, %rbx
movq %rax, %r14
jmp 0x6b5d
movq %rdx, %rbx
movq %rax, %r14
jmp 0x6bce
jmp 0x6b43
movq %rdx, %rbx
movq %rax, %r14
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x6b5d
callq 0x52f0
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0x6b77
callq 0x52f0
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x6b8e
callq 0x52f0
movq 0xd433(%rip), %rax      # 0x13fc8
movq (%rax), %rcx
movq 0x8(%rax), %rax
leaq 0x1d8(%rsp), %rdi
movq %rcx, -0x10(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, 0x1c8(%rsp,%rcx)
movq $0x0, -0x8(%rdi)
callq 0x5100
leaq 0x140(%rsp), %rdi
callq 0x7030
leaq 0x370(%rsp), %rdi
callq 0x5100
leaq 0x308(%rsp), %rdi
callq 0x7030
leaq 0xd8(%rsp), %rdi
callq 0xb74e
movq 0x110(%rsp), %rdi
testq %rdi, %rdi
je 0x6c07
callq 0x8ca0
leaq 0x2e0(%rsp), %rdi
callq 0x9e26
leaq 0x30(%rsp), %rdi
callq 0x7068
leaq 0x1b0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6c34
callq 0x52f0
leaq 0x130(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6c4a
callq 0x52f0
leaq 0xc8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6c68
callq 0x52f0
jmp 0x6c68
movq %rdx, %rbx
movq %rax, %r14
cmpl $0x1, %ebx
jne 0x6cd3
movq %r14, %rdi
callq 0x5160
movq %rax, %rbx
movq 0xd331(%rip), %rdi      # 0x13fb0
leaq 0x74a4(%rip), %rsi      # 0xe12a
movl $0x7, %edx
callq 0x5350
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
movq 0xd310(%rip), %rdi      # 0x13fb0
movq %rax, %rsi
callq 0x5310
leaq 0x7451(%rip), %rsi      # 0xe100
movl $0x1, %edx
movq %rax, %rdi
callq 0x5350
callq 0x54f0
movl $0x1, %ebx
jmp 0x6726
movq %rax, %r14
callq 0x54f0
movq %r14, %rdi
callq 0x5540
jmp 0x6cdd
movq %rax, %rdi
callq 0x70da
nop