// File: nvanbenschoten[P]total-order-multicast/src/main.cc
// Function: main
int main(int argc, const char** argv) {
  args::ArgumentParser parser(program_desc);
  args::HelpFlag help(parser, "help", help_desc, {"help"});
  IntFlag port(parser, "port", port_desc, {'p', "port"});
  StringFlag hostfile(parser, "hostfile", hostfile_desc, {'h', "hostfile"});
  IntFlag id(parser, "id", id_desc, {'i', "id"});
  IntFlag count(parser, "count", count_desc, {'c', "count"});
  args::Flag delays(parser, "delays", delays_desc, {'d', "delays"});
  args::Flag verbose(parser, "verbose", verbose_desc, {'v', "verbose"});

  try {
    parser.ParseCLI(argc, argv);

    // Set up logging.
    logging::out.enable(verbose);

    // Check required fields.
    if (!hostfile) throw args::UsageError("--hostfile is a required flag");
    if (!count) throw args::UsageError("--count is a required flag");
    auto hostfile_val = args::get(hostfile);
    auto count_val = args::get(count);

    // Get the default process port, if one is supplied.
    std::experimental::optional<unsigned short> default_port;
    if (port) {
      default_port = args::get(port);
    }

    // Create the process list from the hostfile.
    auto processes = GetProcesses(hostfile_val, default_port);

    // Determine the current process's ID.
    int id_val;
    if (id) {
      id_val = args::get(id);
      CheckProcessId(processes, id_val);
    } else {
      id_val = GetProcessId(processes);
    }
    auto server_port = processes.at(id_val).port();

    // Create the process with the command line options.
    process::Process p(processes, id_val, server_port, delays);

    // Run the total order algorithm.
    p.TotalOrder(count_val, [id_val](msg::SeqMessage& seq_msg) {
      std::cout << id_val << ": Processed message " << seq_msg.msg_id
                << " from sender " << seq_msg.sender << " with seq ("
                << seq_msg.final_seq << ", " << seq_msg.final_seq_proposer
                << ")" << std::endl;
    });
  } catch (const args::Help) {
    std::cout << parser;
    return 0;
  } catch (const args::UsageError& e) {
    std::cerr << "\n  " << red_start << e.what() << red_end << "\n\n";
    std::cerr << parser;
    return 1;
  } catch (const std::exception& e) {
    std::cerr << red_start << e.what() << red_end << "\n";
    return 1;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1350, %rsp           # imm = 0x1350
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x1c0(%rbp), %rdi
movq %rdi, -0x1098(%rbp)
callq 0x6610
movq -0x1098(%rbp), %rdx
leaq 0x2fb7e(%rip), %rsi     # 0x464a8
leaq -0x1a0(%rbp), %rdi
callq 0x1a110
jmp 0x16938
leaq -0x1c0(%rbp), %rdi
callq 0x68c8
leaq -0x2b9(%rbp), %rdi
movq %rdi, -0x10a0(%rbp)
callq 0x67b0
movq -0x10a0(%rbp), %rdx
leaq 0x192b2(%rip), %rsi     # 0x2fc17
leaq -0x2b8(%rbp), %rdi
callq 0xb990
jmp 0x16973
leaq -0x368(%rbp), %rdi
movq %rdi, -0x370(%rbp)
leaq 0x1928f(%rip), %rsi     # 0x2fc17
callq 0x1a4a0
jmp 0x1698f
leaq -0x368(%rbp), %rax
movq %rax, -0x340(%rbp)
movq $0x1, -0x338(%rbp)
movq -0x340(%rbp), %rsi
movq -0x338(%rbp), %rdx
leaq -0x330(%rbp), %rdi
callq 0x1a540
jmp 0x169c4
leaq 0x2fafd(%rip), %rcx     # 0x464c8
leaq -0x298(%rbp), %rdi
leaq -0x1a0(%rbp), %rsi
leaq -0x2b8(%rbp), %rdx
leaq -0x330(%rbp), %r8
callq 0x1a5c0
jmp 0x169ee
leaq -0x330(%rbp), %rdi
callq 0x1a620
leaq -0x368(%rbp), %rax
movq %rax, -0x10b0(%rbp)
addq $0x28, %rax
movq %rax, -0x10a8(%rbp)
movq -0x10a8(%rbp), %rdi
addq $-0x28, %rdi
movq %rdi, -0x10b8(%rbp)
callq 0x1a520
movq -0x10b0(%rbp), %rcx
movq -0x10b8(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x10a8(%rbp)
jne 0x16a13
leaq -0x2b8(%rbp), %rdi
callq 0x68c8
leaq -0x2b9(%rbp), %rdi
callq 0x6490
leaq -0x461(%rbp), %rdi
movq %rdi, -0x10c0(%rbp)
callq 0x67b0
movq -0x10c0(%rbp), %rdx
leaq 0x1919f(%rip), %rsi     # 0x2fc1c
leaq -0x460(%rbp), %rdi
callq 0xb990
jmp 0x16a8b
leaq -0x538(%rbp), %rdi
movq %rdi, -0x540(%rbp)
movl $0x70, %esi
callq 0x1a650
jmp 0x16aa5
leaq -0x510(%rbp), %rdi
movq %rdi, -0x540(%rbp)
leaq 0x19162(%rip), %rsi     # 0x2fc1c
callq 0x1a4a0
jmp 0x16ac1
leaq -0x538(%rbp), %rax
movq %rax, -0x4e8(%rbp)
movq $0x2, -0x4e0(%rbp)
movq -0x4e8(%rbp), %rsi
movq -0x4e0(%rbp), %rdx
leaq -0x4d8(%rbp), %rdi
callq 0x1a540
jmp 0x16af6
movl $0x0, -0x544(%rbp)
movq %rsp, %rax
movl $0x0, (%rax)
leaq 0x2f9d8(%rip), %rcx     # 0x464e8
leaq -0x440(%rbp), %rdi
leaq -0x1a0(%rbp), %rsi
leaq -0x460(%rbp), %rdx
leaq -0x4d8(%rbp), %r8
leaq -0x544(%rbp), %r9
callq 0x1a680
jmp 0x16b3a
leaq -0x4d8(%rbp), %rdi
callq 0x1a620
leaq -0x538(%rbp), %rax
movq %rax, -0x10d0(%rbp)
addq $0x50, %rax
movq %rax, -0x10c8(%rbp)
movq -0x10c8(%rbp), %rdi
addq $-0x28, %rdi
movq %rdi, -0x10d8(%rbp)
callq 0x1a520
movq -0x10d0(%rbp), %rcx
movq -0x10d8(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x10c8(%rbp)
jne 0x16b5f
leaq -0x460(%rbp), %rdi
callq 0x68c8
leaq -0x461(%rbp), %rdi
callq 0x6490
leaq -0x659(%rbp), %rdi
movq %rdi, -0x10e0(%rbp)
callq 0x67b0
movq -0x10e0(%rbp), %rdx
leaq 0x18f8d(%rip), %rsi     # 0x2fb56
leaq -0x658(%rbp), %rdi
callq 0xb990
jmp 0x16bd7
leaq -0x730(%rbp), %rdi
movq %rdi, -0x738(%rbp)
movl $0x68, %esi
callq 0x1a650
jmp 0x16bf1
leaq -0x708(%rbp), %rdi
movq %rdi, -0x738(%rbp)
leaq 0x18f50(%rip), %rsi     # 0x2fb56
callq 0x1a4a0
jmp 0x16c0d
leaq -0x730(%rbp), %rax
movq %rax, -0x6e0(%rbp)
movq $0x2, -0x6d8(%rbp)
movq -0x6e0(%rbp), %rsi
movq -0x6d8(%rbp), %rdx
leaq -0x6d0(%rbp), %rdi
callq 0x1a540
jmp 0x16c42
leaq -0x758(%rbp), %rdi
movq %rdi, -0x10e8(%rbp)
callq 0x6610
movq -0x10e8(%rbp), %r9
movq %rsp, %rax
movl $0x0, (%rax)
leaq 0x2f89c(%rip), %rcx     # 0x46508
leaq -0x638(%rbp), %rdi
leaq -0x1a0(%rbp), %rsi
leaq -0x658(%rbp), %rdx
leaq -0x6d0(%rbp), %r8
callq 0x1a720
jmp 0x16c8f
leaq -0x758(%rbp), %rdi
callq 0x68c8
leaq -0x6d0(%rbp), %rdi
callq 0x1a620
leaq -0x730(%rbp), %rax
movq %rax, -0x10f8(%rbp)
addq $0x50, %rax
movq %rax, -0x10f0(%rbp)
movq -0x10f0(%rbp), %rdi
addq $-0x28, %rdi
movq %rdi, -0x1100(%rbp)
callq 0x1a520
movq -0x10f8(%rbp), %rcx
movq -0x1100(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x10f0(%rbp)
jne 0x16cc0
leaq -0x658(%rbp), %rdi
callq 0x68c8
leaq -0x659(%rbp), %rdi
callq 0x6490
leaq -0x849(%rbp), %rdi
movq %rdi, -0x1108(%rbp)
callq 0x67b0
movq -0x1108(%rbp), %rdx
leaq 0x185ca(%rip), %rsi     # 0x2f2f4
leaq -0x848(%rbp), %rdi
callq 0xb990
jmp 0x16d38
leaq -0x920(%rbp), %rdi
movq %rdi, -0x928(%rbp)
movl $0x69, %esi
callq 0x1a650
jmp 0x16d52
leaq -0x8f8(%rbp), %rdi
movq %rdi, -0x928(%rbp)
leaq 0x1858d(%rip), %rsi     # 0x2f2f4
callq 0x1a4a0
jmp 0x16d6e
leaq -0x920(%rbp), %rax
movq %rax, -0x8d0(%rbp)
movq $0x2, -0x8c8(%rbp)
movq -0x8d0(%rbp), %rsi
movq -0x8c8(%rbp), %rdx
leaq -0x8c0(%rbp), %rdi
callq 0x1a540
jmp 0x16da3
movl $0x0, -0x92c(%rbp)
movq %rsp, %rax
movl $0x0, (%rax)
leaq 0x2f76b(%rip), %rcx     # 0x46528
leaq -0x828(%rbp), %rdi
leaq -0x1a0(%rbp), %rsi
leaq -0x848(%rbp), %rdx
leaq -0x8c0(%rbp), %r8
leaq -0x92c(%rbp), %r9
callq 0x1a680
jmp 0x16de7
leaq -0x8c0(%rbp), %rdi
callq 0x1a620
leaq -0x920(%rbp), %rax
movq %rax, -0x1118(%rbp)
addq $0x50, %rax
movq %rax, -0x1110(%rbp)
movq -0x1110(%rbp), %rdi
addq $-0x28, %rdi
movq %rdi, -0x1120(%rbp)
callq 0x1a520
movq -0x1118(%rbp), %rcx
movq -0x1120(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x1110(%rbp)
jne 0x16e0c
leaq -0x848(%rbp), %rdi
callq 0x68c8
leaq -0x849(%rbp), %rdi
callq 0x6490
leaq -0xa21(%rbp), %rdi
movq %rdi, -0x1128(%rbp)
callq 0x67b0
movq -0x1128(%rbp), %rdx
leaq 0x18dab(%rip), %rsi     # 0x2fc21
leaq -0xa20(%rbp), %rdi
callq 0xb990
jmp 0x16e84
leaq -0xaf8(%rbp), %rdi
movq %rdi, -0xb00(%rbp)
movl $0x63, %esi
callq 0x1a650
jmp 0x16e9e
leaq -0xad0(%rbp), %rdi
movq %rdi, -0xb00(%rbp)
leaq 0x18d6e(%rip), %rsi     # 0x2fc21
callq 0x1a4a0
jmp 0x16eba
leaq -0xaf8(%rbp), %rax
movq %rax, -0xaa8(%rbp)
movq $0x2, -0xaa0(%rbp)
movq -0xaa8(%rbp), %rsi
movq -0xaa0(%rbp), %rdx
leaq -0xa98(%rbp), %rdi
callq 0x1a540
jmp 0x16eef
movl $0x0, -0xb04(%rbp)
movq %rsp, %rax
movl $0x0, (%rax)
leaq 0x2f63f(%rip), %rcx     # 0x46548
leaq -0xa00(%rbp), %rdi
leaq -0x1a0(%rbp), %rsi
leaq -0xa20(%rbp), %rdx
leaq -0xa98(%rbp), %r8
leaq -0xb04(%rbp), %r9
callq 0x1a680
jmp 0x16f33
leaq -0xa98(%rbp), %rdi
callq 0x1a620
leaq -0xaf8(%rbp), %rax
movq %rax, -0x1138(%rbp)
addq $0x50, %rax
movq %rax, -0x1130(%rbp)
movq -0x1130(%rbp), %rdi
addq $-0x28, %rdi
movq %rdi, -0x1140(%rbp)
callq 0x1a520
movq -0x1138(%rbp), %rcx
movq -0x1140(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x1130(%rbp)
jne 0x16f58
leaq -0xa20(%rbp), %rdi
callq 0x68c8
leaq -0xa21(%rbp), %rdi
callq 0x6490
leaq -0xbf1(%rbp), %rdi
movq %rdi, -0x1148(%rbp)
callq 0x67b0
movq -0x1148(%rbp), %rdx
leaq 0x18c65(%rip), %rsi     # 0x2fc27
leaq -0xbf0(%rbp), %rdi
callq 0xb990
jmp 0x16fd0
leaq -0xcc8(%rbp), %rdi
movq %rdi, -0xcd0(%rbp)
movl $0x64, %esi
callq 0x1a650
jmp 0x16fea
leaq -0xca0(%rbp), %rdi
movq %rdi, -0xcd0(%rbp)
leaq 0x18c28(%rip), %rsi     # 0x2fc27
callq 0x1a4a0
jmp 0x17006
leaq -0xcc8(%rbp), %rax
movq %rax, -0xc78(%rbp)
movq $0x2, -0xc70(%rbp)
movq -0xc78(%rbp), %rsi
movq -0xc70(%rbp), %rdx
leaq -0xc68(%rbp), %rdi
callq 0x1a540
jmp 0x1703b
leaq 0x2f526(%rip), %rcx     # 0x46568
leaq -0xbd0(%rbp), %rdi
leaq -0x1a0(%rbp), %rsi
leaq -0xbf0(%rbp), %rdx
leaq -0xc68(%rbp), %r8
xorl %r9d, %r9d
callq 0x1a7e0
jmp 0x17068
leaq -0xc68(%rbp), %rdi
callq 0x1a620
leaq -0xcc8(%rbp), %rax
movq %rax, -0x1158(%rbp)
addq $0x50, %rax
movq %rax, -0x1150(%rbp)
movq -0x1150(%rbp), %rdi
addq $-0x28, %rdi
movq %rdi, -0x1160(%rbp)
callq 0x1a520
movq -0x1158(%rbp), %rcx
movq -0x1160(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x1150(%rbp)
jne 0x1708d
leaq -0xbf0(%rbp), %rdi
callq 0x68c8
leaq -0xbf1(%rbp), %rdi
callq 0x6490
leaq -0xdb9(%rbp), %rdi
movq %rdi, -0x1168(%rbp)
callq 0x67b0
movq -0x1168(%rbp), %rdx
leaq 0x18b37(%rip), %rsi     # 0x2fc2e
leaq -0xdb8(%rbp), %rdi
callq 0xb990
jmp 0x17105
leaq -0xe90(%rbp), %rdi
movq %rdi, -0xe98(%rbp)
movl $0x76, %esi
callq 0x1a650
jmp 0x1711f
leaq -0xe68(%rbp), %rdi
movq %rdi, -0xe98(%rbp)
leaq 0x18afa(%rip), %rsi     # 0x2fc2e
callq 0x1a4a0
jmp 0x1713b
leaq -0xe90(%rbp), %rax
movq %rax, -0xe40(%rbp)
movq $0x2, -0xe38(%rbp)
movq -0xe40(%rbp), %rsi
movq -0xe38(%rbp), %rdx
leaq -0xe30(%rbp), %rdi
callq 0x1a540
jmp 0x17170
leaq 0x2f411(%rip), %rcx     # 0x46588
leaq -0xd98(%rbp), %rdi
leaq -0x1a0(%rbp), %rsi
leaq -0xdb8(%rbp), %rdx
leaq -0xe30(%rbp), %r8
xorl %r9d, %r9d
callq 0x1a7e0
jmp 0x1719d
leaq -0xe30(%rbp), %rdi
callq 0x1a620
leaq -0xe90(%rbp), %rax
movq %rax, -0x1178(%rbp)
addq $0x50, %rax
movq %rax, -0x1170(%rbp)
movq -0x1170(%rbp), %rdi
addq $-0x28, %rdi
movq %rdi, -0x1180(%rbp)
callq 0x1a520
movq -0x1178(%rbp), %rcx
movq -0x1180(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x1170(%rbp)
jne 0x171c2
leaq -0xdb8(%rbp), %rdi
callq 0x68c8
leaq -0xdb9(%rbp), %rdi
callq 0x6490
movl -0x8(%rbp), %esi
movq -0x10(%rbp), %rdx
leaq -0x1a0(%rbp), %rdi
callq 0x1a870
jmp 0x17220
leaq -0xd98(%rbp), %rdi
callq 0x1a9c0
movzbl %al, %esi
leaq 0x2f3c2(%rip), %rdi     # 0x465f8
callq 0x1a990
jmp 0x1723d
leaq -0x638(%rbp), %rdi
callq 0x1a9c0
testb $0x1, %al
jne 0x17aed
movb $0x1, -0xeba(%rbp)
movl $0x10, %edi
callq 0x6230
movq %rax, -0x1190(%rbp)
leaq -0xeb9(%rbp), %rdi
movq %rdi, -0x1188(%rbp)
callq 0x67b0
movq -0x1188(%rbp), %rdx
leaq 0x189ac(%rip), %rsi     # 0x2fc36
leaq -0xeb8(%rbp), %rdi
callq 0xb990
jmp 0x17298
movq -0x1190(%rbp), %rdi
leaq -0xeb8(%rbp), %rsi
callq 0x19fc0
jmp 0x172ad
movq -0x1190(%rbp), %rdi
movb $0x0, -0xeba(%rbp)
leaq 0x2e376(%rip), %rsi     # 0x45638
leaq 0x2d37(%rip), %rdx      # 0x1a000
callq 0x6770
jmp 0x18254
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
leaq -0x1c0(%rbp), %rdi
callq 0x68c8
jmp 0x18240
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
jmp 0x173f6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
movq -0x370(%rbp), %rax
leaq -0x368(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x1198(%rbp)
je 0x1736a
movq -0x1198(%rbp), %rdi
addq $-0x28, %rdi
movq %rdi, -0x11a0(%rbp)
callq 0x1a520
movq -0x11a0(%rbp), %rax
leaq -0x368(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x1198(%rbp)
jne 0x17339
jmp 0x173ea
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
jmp 0x1739e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
leaq -0x330(%rbp), %rdi
callq 0x1a620
leaq -0x368(%rbp), %rax
movq %rax, -0x11b0(%rbp)
addq $0x28, %rax
movq %rax, -0x11a8(%rbp)
movq -0x11a8(%rbp), %rdi
addq $-0x28, %rdi
movq %rdi, -0x11b8(%rbp)
callq 0x1a520
movq -0x11b0(%rbp), %rcx
movq -0x11b8(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x11a8(%rbp)
jne 0x173b7
jmp 0x173ea
leaq -0x2b8(%rbp), %rdi
callq 0x68c8
leaq -0x2b9(%rbp), %rdi
callq 0x6490
jmp 0x18234
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
jmp 0x17507
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
movq -0x540(%rbp), %rax
leaq -0x538(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x11c0(%rbp)
je 0x1747b
movq -0x11c0(%rbp), %rdi
addq $-0x28, %rdi
movq %rdi, -0x11c8(%rbp)
callq 0x1a520
movq -0x11c8(%rbp), %rax
leaq -0x538(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x11c0(%rbp)
jne 0x1744a
jmp 0x174fb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
jmp 0x174af
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
leaq -0x4d8(%rbp), %rdi
callq 0x1a620
leaq -0x538(%rbp), %rax
movq %rax, -0x11d8(%rbp)
addq $0x50, %rax
movq %rax, -0x11d0(%rbp)
movq -0x11d0(%rbp), %rdi
addq $-0x28, %rdi
movq %rdi, -0x11e0(%rbp)
callq 0x1a520
movq -0x11d8(%rbp), %rcx
movq -0x11e0(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x11d0(%rbp)
jne 0x174c8
jmp 0x174fb
leaq -0x460(%rbp), %rdi
callq 0x68c8
leaq -0x461(%rbp), %rdi
callq 0x6490
jmp 0x18228
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
jmp 0x17627
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
movq -0x738(%rbp), %rax
leaq -0x730(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x11e8(%rbp)
je 0x1758c
movq -0x11e8(%rbp), %rdi
addq $-0x28, %rdi
movq %rdi, -0x11f0(%rbp)
callq 0x1a520
movq -0x11f0(%rbp), %rax
leaq -0x730(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x11e8(%rbp)
jne 0x1755b
jmp 0x1761b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
jmp 0x175cf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
leaq -0x758(%rbp), %rdi
callq 0x68c8
leaq -0x6d0(%rbp), %rdi
callq 0x1a620
leaq -0x730(%rbp), %rax
movq %rax, -0x1200(%rbp)
addq $0x50, %rax
movq %rax, -0x11f8(%rbp)
movq -0x11f8(%rbp), %rdi
addq $-0x28, %rdi
movq %rdi, -0x1208(%rbp)
callq 0x1a520
movq -0x1200(%rbp), %rcx
movq -0x1208(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x11f8(%rbp)
jne 0x175e8
jmp 0x1761b
leaq -0x658(%rbp), %rdi
callq 0x68c8
leaq -0x659(%rbp), %rdi
callq 0x6490
jmp 0x1821c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
jmp 0x17738
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
movq -0x928(%rbp), %rax
leaq -0x920(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x1210(%rbp)
je 0x176ac
movq -0x1210(%rbp), %rdi
addq $-0x28, %rdi
movq %rdi, -0x1218(%rbp)
callq 0x1a520
movq -0x1218(%rbp), %rax
leaq -0x920(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x1210(%rbp)
jne 0x1767b
jmp 0x1772c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
jmp 0x176e0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
leaq -0x8c0(%rbp), %rdi
callq 0x1a620
leaq -0x920(%rbp), %rax
movq %rax, -0x1228(%rbp)
addq $0x50, %rax
movq %rax, -0x1220(%rbp)
movq -0x1220(%rbp), %rdi
addq $-0x28, %rdi
movq %rdi, -0x1230(%rbp)
callq 0x1a520
movq -0x1228(%rbp), %rcx
movq -0x1230(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x1220(%rbp)
jne 0x176f9
jmp 0x1772c
leaq -0x848(%rbp), %rdi
callq 0x68c8
leaq -0x849(%rbp), %rdi
callq 0x6490
jmp 0x18210
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
jmp 0x17849
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
movq -0xb00(%rbp), %rax
leaq -0xaf8(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x1238(%rbp)
je 0x177bd
movq -0x1238(%rbp), %rdi
addq $-0x28, %rdi
movq %rdi, -0x1240(%rbp)
callq 0x1a520
movq -0x1240(%rbp), %rax
leaq -0xaf8(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x1238(%rbp)
jne 0x1778c
jmp 0x1783d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
jmp 0x177f1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
leaq -0xa98(%rbp), %rdi
callq 0x1a620
leaq -0xaf8(%rbp), %rax
movq %rax, -0x1250(%rbp)
addq $0x50, %rax
movq %rax, -0x1248(%rbp)
movq -0x1248(%rbp), %rdi
addq $-0x28, %rdi
movq %rdi, -0x1258(%rbp)
callq 0x1a520
movq -0x1250(%rbp), %rcx
movq -0x1258(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x1248(%rbp)
jne 0x1780a
jmp 0x1783d
leaq -0xa20(%rbp), %rdi
callq 0x68c8
leaq -0xa21(%rbp), %rdi
callq 0x6490
jmp 0x18204
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
jmp 0x1795a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
movq -0xcd0(%rbp), %rax
leaq -0xcc8(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x1260(%rbp)
je 0x178ce
movq -0x1260(%rbp), %rdi
addq $-0x28, %rdi
movq %rdi, -0x1268(%rbp)
callq 0x1a520
movq -0x1268(%rbp), %rax
leaq -0xcc8(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x1260(%rbp)
jne 0x1789d
jmp 0x1794e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
jmp 0x17902
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
leaq -0xc68(%rbp), %rdi
callq 0x1a620
leaq -0xcc8(%rbp), %rax
movq %rax, -0x1278(%rbp)
addq $0x50, %rax
movq %rax, -0x1270(%rbp)
movq -0x1270(%rbp), %rdi
addq $-0x28, %rdi
movq %rdi, -0x1280(%rbp)
callq 0x1a520
movq -0x1278(%rbp), %rcx
movq -0x1280(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x1270(%rbp)
jne 0x1791b
jmp 0x1794e
leaq -0xbf0(%rbp), %rdi
callq 0x68c8
leaq -0xbf1(%rbp), %rdi
callq 0x6490
jmp 0x181f8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
jmp 0x17a6b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
movq -0xe98(%rbp), %rax
leaq -0xe90(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x1288(%rbp)
je 0x179df
movq -0x1288(%rbp), %rdi
addq $-0x28, %rdi
movq %rdi, -0x1290(%rbp)
callq 0x1a520
movq -0x1290(%rbp), %rax
leaq -0xe90(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x1288(%rbp)
jne 0x179ae
jmp 0x17a5f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
jmp 0x17a13
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
leaq -0xe30(%rbp), %rdi
callq 0x1a620
leaq -0xe90(%rbp), %rax
movq %rax, -0x12a0(%rbp)
addq $0x50, %rax
movq %rax, -0x1298(%rbp)
movq -0x1298(%rbp), %rdi
addq $-0x28, %rdi
movq %rdi, -0x12a8(%rbp)
callq 0x1a520
movq -0x12a0(%rbp), %rcx
movq -0x12a8(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x1298(%rbp)
jne 0x17a2c
jmp 0x17a5f
leaq -0xdb8(%rbp), %rdi
callq 0x68c8
leaq -0xdb9(%rbp), %rdi
callq 0x6490
jmp 0x181ec
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
jmp 0x17ed1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
jmp 0x17ac5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
leaq -0xeb8(%rbp), %rdi
callq 0x68c8
leaq -0xeb9(%rbp), %rdi
callq 0x6490
testb $0x1, -0xeba(%rbp)
jne 0x17adc
jmp 0x17ae8
movq -0x1190(%rbp), %rdi
callq 0x6300
jmp 0x17ed1
leaq -0xa00(%rbp), %rdi
callq 0x1a9c0
testb $0x1, %al
jne 0x17bdd
movb $0x1, -0xee2(%rbp)
movl $0x10, %edi
callq 0x6230
movq %rax, -0x12b8(%rbp)
leaq -0xee1(%rbp), %rdi
movq %rdi, -0x12b0(%rbp)
callq 0x67b0
movq -0x12b0(%rbp), %rdx
leaq 0x1811a(%rip), %rsi     # 0x2fc54
leaq -0xee0(%rbp), %rdi
callq 0xb990
jmp 0x17b48
movq -0x12b8(%rbp), %rdi
leaq -0xee0(%rbp), %rsi
callq 0x19fc0
jmp 0x17b5d
movq -0x12b8(%rbp), %rdi
movb $0x0, -0xee2(%rbp)
leaq 0x2dac6(%rip), %rsi     # 0x45638
leaq 0x2487(%rip), %rdx      # 0x1a000
callq 0x6770
jmp 0x18254
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
jmp 0x17bb5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
leaq -0xee0(%rbp), %rdi
callq 0x68c8
leaq -0xee1(%rbp), %rdi
callq 0x6490
testb $0x1, -0xee2(%rbp)
jne 0x17bcc
jmp 0x17bd8
movq -0x12b8(%rbp), %rdi
callq 0x6300
jmp 0x17ed1
leaq -0x638(%rbp), %rdi
callq 0x1a9e0
movq %rax, -0x12c0(%rbp)
jmp 0x17bf2
movq -0x12c0(%rbp), %rsi
leaq -0xf08(%rbp), %rdi
callq 0x61c0
jmp 0x17c07
leaq -0xa00(%rbp), %rdi
callq 0x1aa00
movq %rax, -0x12c8(%rbp)
jmp 0x17c1c
movq -0x12c8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0xf0c(%rbp)
leaq -0xf10(%rbp), %rdi
callq 0x1aa20
leaq -0x440(%rbp), %rdi
callq 0x1a9c0
testb $0x1, %al
jne 0x17c49
jmp 0x17c8c
leaq -0x440(%rbp), %rdi
callq 0x1aa00
movq %rax, -0x12d0(%rbp)
jmp 0x17c5e
movq -0x12d0(%rbp), %rsi
leaq -0xf10(%rbp), %rdi
callq 0x1aa40
jmp 0x17c73
jmp 0x17c8c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
jmp 0x17ec5
leaq -0xf48(%rbp), %rdi
leaq -0xf08(%rbp), %rsi
callq 0x61c0
jmp 0x17ca1
leaq -0xf4c(%rbp), %rdi
leaq -0xf10(%rbp), %rsi
callq 0x19ee0
jmp 0x17cb6
leaq -0xf28(%rbp), %rdi
leaq -0xf48(%rbp), %rsi
leaq -0xf4c(%rbp), %rdx
callq 0x16010
jmp 0x17cd2
leaq -0xf48(%rbp), %rdi
callq 0x68c8
leaq -0x828(%rbp), %rdi
callq 0x1a9c0
testb $0x1, %al
jne 0x17cf0
jmp 0x17d64
leaq -0x828(%rbp), %rdi
callq 0x1aa00
movq %rax, -0x12d8(%rbp)
jmp 0x17d05
movq -0x12d8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0xf50(%rbp)
movl -0xf50(%rbp), %esi
leaq -0xf28(%rbp), %rdi
callq 0x16430
jmp 0x17d28
jmp 0x17d84
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
leaq -0xf48(%rbp), %rdi
callq 0x68c8
jmp 0x17ec5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
jmp 0x17eb9
leaq -0xf28(%rbp), %rdi
callq 0x16660
movl %eax, -0x12dc(%rbp)
jmp 0x17d78
movl -0x12dc(%rbp), %eax
movl %eax, -0xf50(%rbp)
movslq -0xf50(%rbp), %rsi
leaq -0xf28(%rbp), %rdi
callq 0x1aaa0
movq %rax, -0x12e8(%rbp)
jmp 0x17da0
movq -0x12e8(%rbp), %rdi
callq 0xe310
movw %ax, -0x12ea(%rbp)
jmp 0x17db5
movw -0x12ea(%rbp), %ax
movw %ax, -0xf52(%rbp)
movl -0xf50(%rbp), %eax
movl %eax, -0x12f4(%rbp)
movzwl -0xf52(%rbp), %eax
movl %eax, -0x12f0(%rbp)
leaq -0xbd0(%rbp), %rdi
callq 0x1a9c0
movl -0x12f4(%rbp), %edx
movl -0x12f0(%rbp), %ecx
movzbl %al, %r8d
leaq -0x1040(%rbp), %rdi
leaq -0xf28(%rbp), %rsi
callq 0x1aae0
jmp 0x17e0d
movl -0xf0c(%rbp), %eax
movl %eax, -0x1304(%rbp)
movl -0xf50(%rbp), %eax
movl %eax, -0x1064(%rbp)
leaq -0x1060(%rbp), %rdi
movq %rdi, -0x1300(%rbp)
leaq -0x1064(%rbp), %rsi
callq 0x18260
movl -0x1304(%rbp), %esi
movq -0x1300(%rbp), %rdx
leaq -0x1040(%rbp), %rdi
callq 0x8090
jmp 0x17e5a
leaq -0x1060(%rbp), %rdi
callq 0xafd0
leaq -0x1040(%rbp), %rdi
callq 0x1abc0
leaq -0xf28(%rbp), %rdi
callq 0x1a020
leaq -0xf08(%rbp), %rdi
callq 0x68c8
jmp 0x1816a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
leaq -0x1060(%rbp), %rdi
callq 0xafd0
leaq -0x1040(%rbp), %rdi
callq 0x1abc0
leaq -0xf28(%rbp), %rdi
callq 0x1a020
leaq -0xf08(%rbp), %rdi
callq 0x68c8
movl -0x1cc(%rbp), %eax
movl %eax, -0x1308(%rbp)
movl $0x3, %ecx
cmpl %ecx, %eax
jne 0x17f50
movq -0x1c8(%rbp), %rdi
movq %rdi, -0x1310(%rbp)
callq 0x6540
movq %rax, %rsi
leaq -0x1090(%rbp), %rdi
callq 0x1ac20
movq -0x1310(%rbp), %rdi
callq 0x6190
movq 0x2e07d(%rip), %rdi     # 0x45f98
leaq -0x1a0(%rbp), %rsi
callq 0x15fe0
jmp 0x17f29
movl $0x0, -0x4(%rbp)
movl $0x1, -0x1074(%rbp)
leaq -0x1090(%rbp), %rdi
callq 0x1ac60
callq 0x66f0
jmp 0x18166
movl -0x1308(%rbp), %eax
movl $0x2, %ecx
cmpl %ecx, %eax
jne 0x18037
movq -0x1c8(%rbp), %rdi
callq 0x6190
movq %rax, -0x1080(%rbp)
movq 0x2e063(%rip), %rdi     # 0x45fe0
leaq 0x17ceb(%rip), %rsi     # 0x2fc6f
callq 0x6410
movq %rax, -0x1318(%rbp)
jmp 0x17f92
movq -0x1318(%rbp), %rdi
leaq 0x2e608(%rip), %rsi     # 0x465a8
callq 0x63d0
movq %rax, -0x1320(%rbp)
jmp 0x17fae
movq -0x1080(%rbp), %rdi
movq (%rdi), %rax
movq 0x10(%rax), %rax
callq *%rax
movq -0x1320(%rbp), %rdi
movq %rax, %rsi
callq 0x6410
movq %rax, -0x1328(%rbp)
jmp 0x17fd6
movq -0x1328(%rbp), %rdi
leaq 0x2e5e4(%rip), %rsi     # 0x465c8
callq 0x63d0
movq %rax, -0x1330(%rbp)
jmp 0x17ff2
movq -0x1330(%rbp), %rdi
leaq 0x17c89(%rip), %rsi     # 0x2fc89
callq 0x6410
jmp 0x18007
movq 0x2dfd2(%rip), %rdi     # 0x45fe0
leaq -0x1a0(%rbp), %rsi
callq 0x15fe0
jmp 0x1801c
movl $0x1, -0x4(%rbp)
movl $0x1, -0x1074(%rbp)
callq 0x66f0
jmp 0x1813a
movl -0x1308(%rbp), %eax
movl $0x1, %ecx
cmpl %ecx, %eax
jne 0x181e0
movq -0x1c8(%rbp), %rdi
callq 0x6190
movq %rax, -0x1070(%rbp)
movq 0x2df7c(%rip), %rdi     # 0x45fe0
leaq 0x2e53d(%rip), %rsi     # 0x465a8
callq 0x63d0
movq %rax, -0x1338(%rbp)
jmp 0x18079
movq -0x1070(%rbp), %rdi
movq (%rdi), %rax
movq 0x10(%rax), %rax
callq *%rax
movq -0x1338(%rbp), %rdi
movq %rax, %rsi
callq 0x6410
movq %rax, -0x1340(%rbp)
jmp 0x180a1
movq -0x1340(%rbp), %rdi
leaq 0x2e519(%rip), %rsi     # 0x465c8
callq 0x63d0
movq %rax, -0x1348(%rbp)
jmp 0x180bd
movq -0x1348(%rbp), %rdi
leaq 0x17bbf(%rip), %rsi     # 0x2fc8a
callq 0x6410
jmp 0x180d2
movl $0x1, -0x4(%rbp)
movl $0x1, -0x1074(%rbp)
callq 0x66f0
jmp 0x18103
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
callq 0x66f0
jmp 0x1811c
jmp 0x18174
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
jmp 0x181e0
jmp 0x181e0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
callq 0x66f0
jmp 0x1813c
jmp 0x18174
jmp 0x181e0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
leaq -0x1090(%rbp), %rdi
callq 0x1ac60
callq 0x66f0
jmp 0x18168
jmp 0x18174
jmp 0x181e0
movl $0x0, -0x1074(%rbp)
leaq -0xd98(%rbp), %rdi
callq 0x1ac80
leaq -0xbd0(%rbp), %rdi
callq 0x1ac80
leaq -0xa00(%rbp), %rdi
callq 0x1aca0
leaq -0x828(%rbp), %rdi
callq 0x1aca0
leaq -0x638(%rbp), %rdi
callq 0x1acc0
leaq -0x440(%rbp), %rdi
callq 0x1aca0
leaq -0x298(%rbp), %rdi
callq 0x1ad00
leaq -0x1a0(%rbp), %rdi
callq 0x1ad20
movl -0x4(%rbp), %eax
addq $0x1350, %rsp           # imm = 0x1350
popq %rbp
retq
leaq -0xd98(%rbp), %rdi
callq 0x1ac80
leaq -0xbd0(%rbp), %rdi
callq 0x1ac80
leaq -0xa00(%rbp), %rdi
callq 0x1aca0
leaq -0x828(%rbp), %rdi
callq 0x1aca0
leaq -0x638(%rbp), %rdi
callq 0x1acc0
leaq -0x440(%rbp), %rdi
callq 0x1aca0
leaq -0x298(%rbp), %rdi
callq 0x1ad00
leaq -0x1a0(%rbp), %rdi
callq 0x1ad20
movq -0x1c8(%rbp), %rdi
callq 0x67a0
movq %rax, %rdi
callq 0xb3b0
nopw %cs:(%rax,%rax)