// File: /workspace/github_cpp_makefile_star2_O3/nvanbenschoten[P]byzantine-agreement/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 faulty(parser, "faulty", faulty_desc, {'f', "faulty"});
  IntFlag cmdr_id(parser, "commander_id", cmdr_id_desc, {'C', "commander_id"});
  StringFlag order(parser, "order", order_desc, {'o', "order"});
  StringFlagList malicious(parser, "malicious", malicious_desc,
                           {'m', "malicious"});
  IntFlag id(parser, "id", id_desc, {'i', "id"});
  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 (!faulty) throw args::UsageError("--faulty is a required flag");
    if (!cmdr_id) throw args::UsageError("--commander_id is a required flag");
    auto hostfile_val = args::get(hostfile);
    auto faulty_val = args::get(faulty);
    auto commander_id_val = args::get(cmdr_id);

    // 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 my_id;
    if (id) {
      my_id = args::get(id);
      CheckProcessId(processes, my_id);
    } else {
      my_id = GetProcessId(processes);
    }
    auto server_port = processes.at(my_id).port();

    // Validate commander_id and faulty count flags.
    ValidateCommanderId(processes, commander_id_val);
    ValidateFaultyCount(processes, faulty_val);

    // Determine if the current process is the commander, and if so, what order
    // they should use.
    bool is_commander = my_id == commander_id_val;
    auto order_val = ValidateOrder(order, is_commander);

    // Determine which malicious behavior this process will exhibit.
    generals::MaliciousBehavior behavior =
        GetMaliciousBehavior(malicious, is_commander);

    // Create the General depending on it is the Commander or a Lieutenant.
    std::unique_ptr<generals::General> general;
    if (is_commander) {
      general = std::make_unique<generals::Commander>(processes, faulty_val,
                                                      *order_val, behavior);
    } else {
      general = std::make_unique<generals::Lieutenant>(
          processes, my_id, server_port, faulty_val, behavior);
    }

    // Run the algorithm by calling Decide() and print the results.
    msg::Order decision = general->Decide();
    PrintOrder(my_id, decision);
  } 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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa48, %rsp            # imm = 0xA48
movq %rsi, %rbp
movl %edi, %ebx
leaq 0x4a0(%rsp), %r14
movq %r14, -0x10(%r14)
movq $0x0, -0x8(%r14)
movb $0x0, (%r14)
leaq 0x18d8b(%rip), %rsi     # 0x20388
leaq 0x720(%rsp), %rdi
leaq 0x490(%rsp), %rdx
callq 0x9cba
movq 0x490(%rsp), %rdi
cmpq %r14, %rdi
je 0x762f
movq 0x4a0(%rsp), %rsi
incq %rsi
callq 0x5340
leaq 0x130(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0xf46c(%rip), %rsi      # 0x16aae
leaq 0xf469(%rip), %rdx      # 0x16ab2
leaq 0x120(%rsp), %rdi
callq 0xe30c
leaq 0x210(%rsp), %rdi
movw $0x0, -0x8(%rdi)
leaq 0x220(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xf437(%rip), %rsi      # 0x16aae
leaq 0xf434(%rip), %rdx      # 0x16ab2
callq 0xe30c
leaq 0x490(%rsp), %rdi
leaq 0x208(%rsp), %rsi
movl $0x1, %edx
callq 0xa034
leaq 0x18d04(%rip), %rcx     # 0x203a8
leaq 0x8b0(%rsp), %rdi
leaq 0x720(%rsp), %rsi
leaq 0x120(%rsp), %rdx
leaq 0x490(%rsp), %r8
xorl %r9d, %r9d
callq 0xa208
leaq 0x17fa5(%rip), %rax     # 0x1f678
movq %rax, 0x8b0(%rsp)
leaq 0x4c8(%rsp), %rdi
callq 0xc0e2
leaq 0x490(%rsp), %rdi
callq 0xc156
movq 0x210(%rsp), %rdi
cmpq %r15, %rdi
je 0x7712
movq 0x220(%rsp), %rsi
incq %rsi
callq 0x5340
movq 0x120(%rsp), %rdi
cmpq %r14, %rdi
je 0x772f
movq 0x130(%rsp), %rsi
incq %rsi
callq 0x5340
leaq 0x120(%rsp), %rdi
movq %r14, (%rdi)
leaq 0xf372(%rip), %rsi      # 0x16ab3
leaq 0xf36f(%rip), %rdx      # 0x16ab7
callq 0xe30c
leaq 0x238(%rsp), %rdi
movw $0x7001, -0x30(%rdi)    # imm = 0x7001
movq %r15, -0x28(%rdi)
movq $0x0, -0x20(%rdi)
movb $0x0, -0x18(%rdi)
movw $0x0, -0x8(%rdi)
leaq 0x248(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0xf32e(%rip), %rsi      # 0x16ab3
leaq 0xf32b(%rip), %rdx      # 0x16ab7
callq 0xe30c
leaq 0x490(%rsp), %rdi
leaq 0x208(%rsp), %rsi
movl $0x2, %edx
callq 0xa034
xorl %eax, %eax
leaq 0x650(%rsp), %r9
movl %eax, (%r9)
movl %eax, (%rsp)
leaq 0x18c06(%rip), %rcx     # 0x203c8
leaq 0x978(%rsp), %rdi
leaq 0x720(%rsp), %rsi
leaq 0x120(%rsp), %rdx
leaq 0x490(%rsp), %r8
callq 0xa070
leaq 0x4c8(%rsp), %rdi
callq 0xc0e2
leaq 0x490(%rsp), %rdi
callq 0xc156
movq $-0x50, %r15
movq -0x10(%r12), %rdi
cmpq %rdi, %r12
je 0x781e
movq (%r12), %rsi
incq %rsi
callq 0x5340
addq $-0x28, %r12
addq $0x28, %r15
jne 0x7808
movq 0x120(%rsp), %rdi
cmpq %r14, %rdi
je 0x7845
movq 0x130(%rsp), %rsi
incq %rsi
callq 0x5340
leaq 0x660(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0xf040(%rip), %rsi      # 0x16899
leaq 0xf041(%rip), %rdx      # 0x168a1
leaq 0x650(%rsp), %rdi
callq 0xe30c
leaq 0x138(%rsp), %r14
movw $0x6801, -0x18(%r14)    # imm = 0x6801
movq %r14, -0x10(%r14)
movq $0x0, -0x8(%r14)
movb $0x0, (%r14)
movw $0x0, 0x10(%r14)
leaq 0x150(%rsp), %rdi
leaq 0x160(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0xefeb(%rip), %rsi      # 0x16899
leaq 0xefec(%rip), %rdx      # 0x168a1
callq 0xe30c
leaq 0x208(%rsp), %rdi
leaq 0x120(%rsp), %rsi
movl $0x2, %edx
callq 0xa034
leaq 0x590(%rsp), %r15
movq %r15, -0x10(%r15)
movq $0x0, -0x8(%r15)
movb $0x0, (%r15)
movl $0x0, (%rsp)
leaq 0x18aee(%rip), %rcx     # 0x203e8
leaq 0x490(%rsp), %rdi
leaq 0x720(%rsp), %rsi
leaq 0x650(%rsp), %rdx
leaq 0x208(%rsp), %r8
leaq 0x580(%rsp), %r9
callq 0xa0de
movl %ebx, 0x8c(%rsp)
movq 0x580(%rsp), %rdi
cmpq %r15, %rdi
je 0x794b
movq 0x590(%rsp), %rsi
incq %rsi
callq 0x5340
leaq 0x240(%rsp), %rdi
callq 0xc0e2
leaq 0x208(%rsp), %rdi
callq 0xc156
movq $-0x50, %rbx
movq -0x10(%r13), %rdi
cmpq %rdi, %r13
je 0x7981
movq (%r13), %rsi
incq %rsi
callq 0x5340
addq $-0x28, %r13
addq $0x28, %rbx
jne 0x796c
movq 0x650(%rsp), %rdi
cmpq %r12, %rdi
je 0x79a8
movq 0x660(%rsp), %rsi
incq %rsi
callq 0x5340
leaq 0x580(%rsp), %rdi
movq %r15, (%rdi)
leaq 0xf0fe(%rip), %rsi      # 0x16ab8
leaq 0xf0fd(%rip), %rdx      # 0x16abe
callq 0xe30c
leaq 0x150(%rsp), %rdi
movw $0x6601, -0x30(%rdi)    # imm = 0x6601
movq %r14, -0x28(%rdi)
movq $0x0, -0x20(%rdi)
movb $0x0, -0x18(%rdi)
movw $0x0, -0x8(%rdi)
leaq 0x160(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0xf0ba(%rip), %rsi      # 0x16ab8
leaq 0xf0b9(%rip), %rdx      # 0x16abe
callq 0xe30c
leaq 0x208(%rsp), %rdi
leaq 0x120(%rsp), %rsi
movl $0x2, %edx
callq 0xa034
xorl %eax, %eax
leaq 0x3c0(%rsp), %r9
movl %eax, (%r9)
movl %eax, (%rsp)
leaq 0x189cd(%rip), %rcx     # 0x20408
leaq 0x650(%rsp), %rdi
leaq 0x720(%rsp), %rsi
leaq 0x580(%rsp), %rdx
leaq 0x208(%rsp), %r8
callq 0xa070
leaq 0x240(%rsp), %rdi
callq 0xc0e2
leaq 0x208(%rsp), %rdi
callq 0xc156
movq $-0x50, %rbx
movq -0x10(%r12), %rdi
cmpq %rdi, %r12
je 0x7a97
movq (%r12), %rsi
incq %rsi
callq 0x5340
addq $-0x28, %r12
addq $0x28, %rbx
jne 0x7a81
movq 0x580(%rsp), %rdi
cmpq %r15, %rdi
je 0x7abe
movq 0x590(%rsp), %rsi
incq %rsi
callq 0x5340
leaq 0x3d0(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xefee(%rip), %rsi      # 0x16abf
leaq 0xeff3(%rip), %rdx      # 0x16acb
leaq 0x3c0(%rsp), %rdi
callq 0xe30c
leaq 0x150(%rsp), %rdi
movw $0x4301, -0x30(%rdi)    # imm = 0x4301
movq %r14, -0x28(%rdi)
movq $0x0, -0x20(%rdi)
movb $0x0, -0x18(%rdi)
movw $0x0, -0x8(%rdi)
leaq 0x160(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0xefa2(%rip), %rsi      # 0x16abf
leaq 0xefa7(%rip), %rdx      # 0x16acb
callq 0xe30c
leaq 0x208(%rsp), %rdi
leaq 0x120(%rsp), %rsi
movl $0x2, %edx
callq 0xa034
xorl %eax, %eax
leaq 0x2f8(%rsp), %r9
movl %eax, (%r9)
movl %eax, (%rsp)
leaq 0x188ce(%rip), %rcx     # 0x20428
leaq 0x580(%rsp), %rdi
leaq 0x720(%rsp), %rsi
leaq 0x3c0(%rsp), %rdx
leaq 0x208(%rsp), %r8
callq 0xa070
leaq 0x240(%rsp), %rdi
callq 0xc0e2
leaq 0x208(%rsp), %rdi
callq 0xc156
movq $-0x50, %rbx
movq -0x10(%r12), %rdi
cmpq %rdi, %r12
je 0x7bb6
movq (%r12), %rsi
incq %rsi
callq 0x5340
addq $-0x28, %r12
addq $0x28, %rbx
jne 0x7ba0
movq 0x3c0(%rsp), %rdi
cmpq %r15, %rdi
je 0x7bdd
movq 0x3d0(%rsp), %rsi
incq %rsi
callq 0x5340
leaq 0x308(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0xee44(%rip), %rsi      # 0x16a34
leaq 0xee42(%rip), %rdx      # 0x16a39
leaq 0x2f8(%rsp), %rdi
callq 0xe30c
leaq 0x3d8(%rsp), %r12
movw $0x6f01, -0x18(%r12)    # imm = 0x6F01
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
movw $0x0, 0x10(%r12)
leaq 0x3f0(%rsp), %rdi
leaq 0x400(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xedea(%rip), %rsi      # 0x16a34
leaq 0xede8(%rip), %rdx      # 0x16a39
callq 0xe30c
leaq 0x120(%rsp), %rdi
leaq 0x3c0(%rsp), %rsi
movl $0x2, %edx
callq 0xa034
leaq 0x28(%rsp), %r12
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
movl $0x0, (%rsp)
leaq 0x187b2(%rip), %rcx     # 0x20448
leaq 0x208(%rsp), %rdi
leaq 0x720(%rsp), %rsi
leaq 0x2f8(%rsp), %rdx
leaq 0x120(%rsp), %r8
leaq 0x18(%rsp), %r9
callq 0xa0de
movq 0x18(%rsp), %rdi
cmpq %r12, %rdi
je 0x7cd7
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x5340
leaq 0x158(%rsp), %rdi
callq 0xc0e2
leaq 0x120(%rsp), %rdi
callq 0xc156
movq $-0x50, %rbx
movq -0x10(%r15), %rdi
cmpq %rdi, %r15
je 0x7d0c
movq (%r15), %rsi
incq %rsi
callq 0x5340
addq $-0x28, %r15
addq $0x28, %rbx
jne 0x7cf8
movq 0x2f8(%rsp), %rdi
cmpq %r14, %rdi
je 0x7d33
movq 0x308(%rsp), %rsi
incq %rsi
callq 0x5340
leaq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
movq %rax, (%rdi)
leaq 0xed85(%rip), %rsi      # 0x16acc
leaq 0xed87(%rip), %rdx      # 0x16ad5
callq 0xe30c
leaq 0x310(%rsp), %r15
movw $0x6d01, -0x18(%r15)    # imm = 0x6D01
movq %r15, -0x10(%r15)
movq $0x0, -0x8(%r15)
movb $0x0, (%r15)
movw $0x0, 0x10(%r15)
leaq 0x328(%rsp), %rdi
leaq 0x338(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0xed38(%rip), %rsi      # 0x16acc
leaq 0xed3a(%rip), %rdx      # 0x16ad5
callq 0xe30c
leaq 0x3c0(%rsp), %rdi
leaq 0x2f8(%rsp), %rsi
movl $0x2, %edx
callq 0xa034
xorps %xmm0, %xmm0
leaq 0x90(%rsp), %r9
movaps %xmm0, (%r9)
movq $0x0, 0x10(%r9)
leaq 0x18690(%rip), %rcx     # 0x20468
leaq 0x120(%rsp), %rdi
leaq 0x720(%rsp), %rsi
leaq 0x18(%rsp), %rdx
leaq 0x3c0(%rsp), %r8
leaq 0x28(%rsp), %r15
callq 0xa18c
leaq 0x90(%rsp), %rdi
callq 0x8e14
leaq 0x3f8(%rsp), %rdi
callq 0xc0e2
leaq 0x3c0(%rsp), %rdi
callq 0xc156
movq $-0x50, %rbx
movq -0x10(%r14), %rdi
cmpq %rdi, %r14
je 0x7e41
movq (%r14), %rsi
incq %rsi
callq 0x5340
addq $-0x28, %r14
addq $0x28, %rbx
jne 0x7e2d
movq 0x18(%rsp), %rdi
cmpq %r15, %rdi
je 0x7e62
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x5340
leaq 0xa0(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0xec54(%rip), %rsi      # 0x16ac9
leaq 0xec4f(%rip), %rdx      # 0x16acb
leaq 0x90(%rsp), %rdi
callq 0xe30c
leaq 0x30(%rsp), %r12
movw $0x6901, -0x18(%r12)    # imm = 0x6901
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
movw $0x0, 0x10(%r12)
leaq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xec03(%rip), %rsi      # 0x16ac9
leaq 0xebfe(%rip), %rdx      # 0x16acb
callq 0xe30c
leaq 0x2f8(%rsp), %rdi
leaq 0x18(%rsp), %rsi
movl $0x2, %edx
callq 0xa034
xorl %eax, %eax
leaq 0xe0(%rsp), %r9
movl %eax, (%r9)
movl %eax, (%rsp)
leaq 0x18588(%rip), %rcx     # 0x20488
leaq 0x3c0(%rsp), %rdi
leaq 0x720(%rsp), %rsi
leaq 0x90(%rsp), %rdx
leaq 0x2f8(%rsp), %r8
callq 0xa070
leaq 0x330(%rsp), %rdi
callq 0xc0e2
leaq 0x2f8(%rsp), %rdi
callq 0xc156
movq $-0x50, %rbx
movq -0x10(%r15), %rdi
cmpq %rdi, %r15
je 0x7f5a
movq (%r15), %rsi
incq %rsi
callq 0x5340
addq $-0x28, %r15
addq $0x28, %rbx
jne 0x7f46
movq 0x90(%rsp), %rdi
cmpq %r14, %rdi
je 0x7f81
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x5340
leaq 0xf0(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0xeb42(%rip), %rsi      # 0x16ad6
leaq 0xeb42(%rip), %rdx      # 0x16add
leaq 0xe0(%rsp), %rdi
callq 0xe30c
leaq 0xa8(%rsp), %r12
movw $0x7601, -0x18(%r12)    # imm = 0x7601
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
movw $0x0, 0x10(%r12)
leaq 0xc0(%rsp), %rdi
leaq 0xd0(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xeae8(%rip), %rsi      # 0x16ad6
leaq 0xeae8(%rip), %rdx      # 0x16add
callq 0xe30c
leaq 0x18(%rsp), %rdi
leaq 0x90(%rsp), %rsi
movl $0x2, %edx
callq 0xa034
leaq 0x18490(%rip), %rcx     # 0x204a8
leaq 0x2f8(%rsp), %rdi
leaq 0x720(%rsp), %rsi
leaq 0xe0(%rsp), %rdx
leaq 0x18(%rsp), %r8
xorl %r9d, %r9d
callq 0xa208
leaq 0x50(%rsp), %rdi
callq 0xc0e2
leaq 0x18(%rsp), %rdi
callq 0xc156
movq $-0x50, %rbx
movq -0x10(%r15), %rdi
cmpq %rdi, %r15
je 0x806c
movq (%r15), %rsi
incq %rsi
callq 0x5340
addq $-0x28, %r15
addq $0x28, %rbx
jne 0x8058
movq 0xe0(%rsp), %rdi
cmpq %r14, %rdi
je 0x8093
movq 0xf0(%rsp), %rsi
incq %rsi
callq 0x5340
leaq 0x720(%rsp), %rdi
movl 0x8c(%rsp), %esi
movq %rbp, %rdx
callq 0xa25a
leaq 0x28(%rsp), %rbx
leaq 0x2f8(%rsp), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
leaq 0x184b4(%rip), %rcx     # 0x20578
xchgb %al, 0x8(%rcx)
leaq 0x490(%rsp), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
testb %al, %al
je 0x83f3
leaq 0x650(%rsp), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
testb %al, %al
je 0x8452
leaq 0x580(%rsp), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
testb %al, %al
je 0x84ae
leaq 0x18(%rsp), %rdi
movq %rbx, (%rdi)
movq 0x558(%rsp), %rsi
movq 0x560(%rsp), %rdx
addq %rsi, %rdx
callq 0xe276
movl 0x718(%rsp), %ebx
movl 0x648(%rsp), %r14d
leaq 0x978(%rsp), %r15
movq (%r15), %rax
movq %r15, %rdi
callq *0x10(%rax)
movl %eax, %ebp
movzwl 0xc8(%r15), %r12d
leaq 0x110(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
addq %rsi, %rdx
leaq 0x100(%rsp), %rdi
callq 0xe276
movb $0x0, 0x16(%rsp)
testb %bpl, %bpl
je 0x818e
movw %r12w, 0x14(%rsp)
movb $0x1, 0x16(%rsp)
leaq 0x90(%rsp), %rdi
leaq 0x100(%rsp), %rsi
leaq 0x14(%rsp), %rdx
callq 0x6480
movq 0x100(%rsp), %rdi
cmpq %r15, %rdi
je 0x81c5
movq 0x110(%rsp), %rsi
incq %rsi
callq 0x5340
leaq 0x3c0(%rsp), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
testb %al, %al
je 0x81ef
movl 0x488(%rsp), %ebp
leaq 0x90(%rsp), %rdi
movl %ebp, %esi
callq 0x67a3
jmp 0x81fe
leaq 0x90(%rsp), %rdi
callq 0x693f
movl %eax, %ebp
movslq %ebp, %rsi
movq 0x90(%rsp), %rax
movq 0x98(%rsp), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
movabsq $-0x3333333333333333, %rdx # imm = 0xCCCCCCCCCCCCCCCD
imulq %rcx, %rdx
cmpq %rsi, %rdx
jbe 0x8508
leaq (%rsi,%rsi,4), %rcx
movzwl 0x20(%rax,%rcx,8), %r13d
leaq 0x90(%rsp), %rdi
movl %r14d, %esi
callq 0x6b14
leaq 0x90(%rsp), %rdi
movl %ebx, %esi
callq 0x6c88
xorl %edx, %edx
cmpl %r14d, %ebp
sete %dl
leaq 0xe0(%rsp), %rdi
leaq 0x208(%rsp), %rsi
callq 0x6dbc
xorl %esi, %esi
cmpl %r14d, %ebp
sete %sil
leaq 0x120(%rsp), %rdi
callq 0x70ab
movl %eax, %r12d
cmpl %r14d, %ebp
jne 0x82d3
movl $0x70, %edi
callq 0x5330
movq %rax, %r15
movl 0xe0(%rsp), %r14d
leaq 0x90(%rsp), %rsi
movq %rax, %rdi
xorl %edx, %edx
movl %ebx, %ecx
movl %r12d, %r8d
callq 0xfc78
leaq 0x17942(%rip), %rax     # 0x1fc08
addq $0x10, %rax
movq %rax, (%r15)
movl %r14d, 0x68(%r15)
jmp 0x82ff
movl $0x120, %edi            # imm = 0x120
callq 0x5330
movq %rax, %r15
movzwl %r13w, %ecx
leaq 0x90(%rsp), %rsi
movq %rax, %rdi
movl %ebp, %edx
movl %ebx, %r8d
movl %r12d, %r9d
callq 0xff72
movq (%r15), %rax
movq %r15, %rdi
callq *0x10(%rax)
movl %ebp, %edi
movl %eax, %esi
callq 0x7507
movq (%r15), %rax
movq %r15, %rdi
callq *0x8(%rax)
leaq 0x90(%rsp), %rdi
callq 0x9b64
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x8340
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x5340
xorl %ebx, %ebx
leaq 0x2f8(%rsp), %rdi
callq 0xa2fa
leaq 0x3c0(%rsp), %rdi
callq 0xa2fa
leaq 0x17615(%rip), %rax     # 0x1f978
leaq 0x1e8(%rsp), %rdi
movq %rax, -0xc8(%rdi)
callq 0x8e14
leaq 0x120(%rsp), %rdi
callq 0xa2fa
leaq 0x208(%rsp), %rdi
callq 0xa356
leaq 0x580(%rsp), %rdi
callq 0xa2fa
leaq 0x650(%rsp), %rdi
callq 0xa2fa
leaq 0x490(%rsp), %rdi
callq 0xa356
leaq 0x978(%rsp), %rdi
callq 0xa2fa
leaq 0x8b0(%rsp), %rdi
callq 0xa2fa
leaq 0x720(%rsp), %rdi
callq 0xa38c
movl %ebx, %eax
addq $0xa48, %rsp            # imm = 0xA48
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x51a0
movq %rax, %r15
leaq 0x18(%rsp), %rdi
movq %rbx, (%rdi)
leaq 0xe6cf(%rip), %rsi      # 0x16ade
leaq 0xe6e5(%rip), %rdx      # 0x16afb
callq 0xe30c
movb $0x1, %bpl
leaq 0x18(%rsp), %rsi
movq %r15, %rdi
callq 0x5410
leaq 0x17106(%rip), %rax     # 0x1f538
movq %rax, (%r15)
xorl %ebp, %ebp
leaq 0x17032(%rip), %rsi     # 0x1f470
movq 0x17b3b(%rip), %rdx     # 0x1ff80
movq %r15, %rdi
callq 0x55d0
jmp 0x8508
movl $0x10, %edi
callq 0x51a0
movq %rax, %r15
leaq 0x18(%rsp), %rdi
movq %rbx, (%rdi)
leaq 0xe68e(%rip), %rsi      # 0x16afc
leaq 0xe6a2(%rip), %rdx      # 0x16b17
callq 0xe30c
movb $0x1, %bpl
leaq 0x18(%rsp), %rsi
movq %r15, %rdi
callq 0x5410
leaq 0x170a7(%rip), %rax     # 0x1f538
movq %rax, (%r15)
xorl %ebp, %ebp
leaq 0x16fd3(%rip), %rsi     # 0x1f470
movq 0x17adc(%rip), %rdx     # 0x1ff80
movq %r15, %rdi
callq 0x55d0
jmp 0x8508
movl $0x10, %edi
callq 0x51a0
movq %rax, %r15
leaq 0x18(%rsp), %rdi
movq %rbx, (%rdi)
leaq 0xe64e(%rip), %rsi      # 0x16b18
leaq 0xe668(%rip), %rdx      # 0x16b39
callq 0xe30c
movb $0x1, %bpl
leaq 0x18(%rsp), %rsi
movq %r15, %rdi
callq 0x5410
leaq 0x1704b(%rip), %rax     # 0x1f538
movq %rax, (%r15)
xorl %ebp, %ebp
leaq 0x16f77(%rip), %rsi     # 0x1f470
movq 0x17a80(%rip), %rdx     # 0x1ff80
movq %r15, %rdi
callq 0x55d0
leaq 0xe917(%rip), %rdi      # 0x16e26
xorl %eax, %eax
callq 0x5520
movq %rdx, %r14
movq %rax, %rbx
movl $0x120, %esi            # imm = 0x120
jmp 0x852e
movq %rdx, %r14
movq %rax, %rbx
movl $0x70, %esi
movq %r15, %rdi
callq 0x5340
jmp 0x8c1f
jmp 0x8c19
jmp 0x8c19
jmp 0x854d
jmp 0x8579
jmp 0x854d
jmp 0x8579
movq %rdx, %r14
movq %rax, %rbx
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x856f
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x5340
testb %bpl, %bpl
jne 0x857f
jmp 0x8c48
movq %rdx, %r14
movq %rax, %rbx
movq %r15, %rdi
callq 0x5270
jmp 0x8c48
jmp 0x8c19
jmp 0x8c19
jmp 0x8c19
movq %rdx, %r14
movq %rax, %rbx
movq 0x100(%rsp), %rdi
cmpq %r15, %rdi
je 0x8c2c
movq 0x110(%rsp), %rsi
incq %rsi
callq 0x5340
jmp 0x8c2c
movq %rdx, %r14
movq %rax, %rbx
jmp 0x8c2c
jmp 0x85d4
movq %rdx, %r14
movq %rax, %rbx
jmp 0x8c48
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0xc0e2
leaq 0x18(%rsp), %rdi
callq 0xc156
jmp 0x85fb
movq %rax, %rbx
xorl %r12d, %r12d
movq 0xc0(%rsp,%r12), %rdi
leaq (%r15,%r12), %rax
cmpq %rdi, %rax
je 0x861a
movq (%rax), %rsi
incq %rsi
callq 0x5340
addq $-0x28, %r12
cmpq $-0x50, %r12
jne 0x85fe
jmp 0x8646
movq %rax, %rbx
movq 0x98(%rsp), %rdi
cmpq %r12, %rdi
je 0x8646
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x5340
movq 0xe0(%rsp), %rdi
cmpq %r14, %rdi
je 0x8668
movq 0xf0(%rsp), %rsi
incq %rsi
callq 0x5340
jmp 0x8668
movq %rax, %rbx
leaq 0x3c0(%rsp), %rdi
callq 0xa2fa
jmp 0x8700
movq %rax, %rbx
leaq 0x330(%rsp), %rdi
callq 0xc0e2
leaq 0x2f8(%rsp), %rdi
callq 0xc156
jmp 0x869c
movq %rax, %rbx
xorl %r12d, %r12d
movq 0x48(%rsp,%r12), %rdi
leaq (%r15,%r12), %rax
cmpq %rdi, %rax
je 0x86b8
movq (%rax), %rsi
incq %rsi
callq 0x5340
addq $-0x28, %r12
cmpq $-0x50, %r12
jne 0x869f
jmp 0x86de
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0x86de
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x5340
movq 0x90(%rsp), %rdi
cmpq %r14, %rdi
je 0x8700
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x5340
jmp 0x8700
movq %rax, %rbx
leaq 0x17271(%rip), %rax     # 0x1f978
leaq 0x1e8(%rsp), %rdi
movq %rax, -0xc8(%rdi)
callq 0x8e14
leaq 0x120(%rsp), %rdi
callq 0xa2fa
leaq 0x208(%rsp), %rdi
callq 0xa356
leaq 0x580(%rsp), %rdi
callq 0xa2fa
leaq 0x650(%rsp), %rdi
callq 0xa2fa
leaq 0x490(%rsp), %rdi
callq 0xa356
leaq 0x978(%rsp), %rdi
callq 0xa2fa
leaq 0x8b0(%rsp), %rdi
callq 0xa2fa
leaq 0x720(%rsp), %rdi
callq 0xa38c
movq %rbx, %rdi
callq 0x5600
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
callq 0x8e14
leaq 0x3f8(%rsp), %rdi
callq 0xc0e2
leaq 0x3c0(%rsp), %rdi
callq 0xc156
jmp 0x87ba
movq %rax, %rbx
xorl %r15d, %r15d
movq 0x328(%rsp,%r15), %rdi
leaq (%r14,%r15), %rax
cmpq %rdi, %rax
je 0x87d9
movq (%rax), %rsi
incq %rsi
callq 0x5340
addq $-0x28, %r15
cmpq $-0x50, %r15
jne 0x87bd
jmp 0x8805
movq %rax, %rbx
movq 0x300(%rsp), %rdi
cmpq %r15, %rdi
je 0x8805
movq 0x310(%rsp), %rsi
incq %rsi
callq 0x5340
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x8728
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x5340
jmp 0x8728
movq %rax, %rbx
jmp 0x8728
movq %rax, %rbx
movq 0x18(%rsp), %rdi
cmpq %r12, %rdi
je 0x884c
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x5340
leaq 0x158(%rsp), %rdi
callq 0xc0e2
leaq 0x120(%rsp), %rdi
callq 0xc156
jmp 0x886b
movq %rax, %rbx
xorl %r12d, %r12d
movq 0x3f0(%rsp,%r12), %rdi
leaq (%r15,%r12), %rax
cmpq %rdi, %rax
je 0x888a
movq (%rax), %rsi
incq %rsi
callq 0x5340
addq $-0x28, %r12
cmpq $-0x50, %r12
jne 0x886e
jmp 0x88b6
movq %rax, %rbx
movq 0x3c8(%rsp), %rdi
cmpq %r12, %rdi
je 0x88b6
movq 0x3d8(%rsp), %rsi
incq %rsi
callq 0x5340
movq 0x2f8(%rsp), %rdi
cmpq %r14, %rdi
je 0x8735
movq 0x308(%rsp), %rsi
incq %rsi
callq 0x5340
jmp 0x8735
movq %rax, %rbx
jmp 0x8735
movq %rax, %rbx
leaq 0x240(%rsp), %rdi
callq 0xc0e2
leaq 0x208(%rsp), %rdi
callq 0xc156
jmp 0x8906
movq %rax, %rbx
xorl %r14d, %r14d
movq 0x150(%rsp,%r14), %rdi
leaq (%r12,%r14), %rax
cmpq %rdi, %rax
je 0x8925
movq (%rax), %rsi
incq %rsi
callq 0x5340
addq $-0x28, %r14
cmpq $-0x50, %r14
jne 0x8909
jmp 0x8951
movq %rax, %rbx
movq 0x128(%rsp), %rdi
cmpq %r14, %rdi
je 0x8951
movq 0x138(%rsp), %rsi
incq %rsi
callq 0x5340
movq 0x3c0(%rsp), %rdi
cmpq %r15, %rdi
je 0x8742
movq 0x3d0(%rsp), %rsi
incq %rsi
callq 0x5340
jmp 0x8742
movq %rax, %rbx
jmp 0x8742
movq %rax, %rbx
leaq 0x240(%rsp), %rdi
callq 0xc0e2
leaq 0x208(%rsp), %rdi
callq 0xc156
jmp 0x89a1
movq %rax, %rbx
xorl %r14d, %r14d
movq 0x150(%rsp,%r14), %rdi
leaq (%r12,%r14), %rax
cmpq %rdi, %rax
je 0x89c0
movq (%rax), %rsi
incq %rsi
callq 0x5340
addq $-0x28, %r14
cmpq $-0x50, %r14
jne 0x89a4
jmp 0x89ec
movq %rax, %rbx
movq 0x128(%rsp), %rdi
cmpq %r14, %rdi
je 0x89ec
movq 0x138(%rsp), %rsi
incq %rsi
callq 0x5340
movq 0x580(%rsp), %rdi
cmpq %r15, %rdi
je 0x874f
movq 0x590(%rsp), %rsi
incq %rsi
callq 0x5340
jmp 0x874f
movq %rax, %rbx
jmp 0x874f
movq %rax, %rbx
movq 0x580(%rsp), %rdi
cmpq %r15, %rdi
je 0x8a3a
movq 0x590(%rsp), %rsi
incq %rsi
callq 0x5340
leaq 0x240(%rsp), %rdi
callq 0xc0e2
leaq 0x208(%rsp), %rdi
callq 0xc156
jmp 0x8a59
movq %rax, %rbx
xorl %r14d, %r14d
movq 0x150(%rsp,%r14), %rdi
leaq (%r14,%r13), %rax
cmpq %rdi, %rax
je 0x8a78
movq (%rax), %rsi
incq %rsi
callq 0x5340
addq $-0x28, %r14
cmpq $-0x50, %r14
jne 0x8a5c
jmp 0x8aa4
movq %rax, %rbx
movq 0x128(%rsp), %rdi
cmpq %r14, %rdi
je 0x8aa4
movq 0x138(%rsp), %rsi
incq %rsi
callq 0x5340
movq 0x650(%rsp), %rdi
cmpq %r12, %rdi
je 0x875c
movq 0x660(%rsp), %rsi
incq %rsi
callq 0x5340
jmp 0x875c
movq %rax, %rbx
jmp 0x875c
movq %rax, %rbx
leaq 0x4c8(%rsp), %rdi
callq 0xc0e2
leaq 0x490(%rsp), %rdi
callq 0xc156
jmp 0x8af4
movq %rax, %rbx
xorl %r15d, %r15d
movq 0x238(%rsp,%r15), %rdi
leaq (%r12,%r15), %rax
cmpq %rdi, %rax
je 0x8b13
movq (%rax), %rsi
incq %rsi
callq 0x5340
addq $-0x28, %r15
cmpq $-0x50, %r15
jne 0x8af7
jmp 0x8b3f
movq %rax, %rbx
movq 0x210(%rsp), %rdi
cmpq %r15, %rdi
je 0x8b3f
movq 0x220(%rsp), %rsi
incq %rsi
callq 0x5340
movq 0x120(%rsp), %rdi
cmpq %r14, %rdi
je 0x8769
movq 0x130(%rsp), %rsi
incq %rsi
callq 0x5340
jmp 0x8769
movq %rax, %rbx
jmp 0x8769
movq %rax, %rbx
leaq 0x4c8(%rsp), %rdi
callq 0xc0e2
leaq 0x490(%rsp), %rdi
callq 0xc156
jmp 0x8b8f
movq %rax, %rbx
movq 0x210(%rsp), %rdi
cmpq %r15, %rdi
je 0x8bb1
movq 0x220(%rsp), %rsi
incq %rsi
callq 0x5340
jmp 0x8bb1
movq %rax, %rbx
movq 0x120(%rsp), %rdi
cmpq %r14, %rdi
je 0x8776
movq 0x130(%rsp), %rsi
incq %rsi
callq 0x5340
jmp 0x8776
movq %rax, %rbx
jmp 0x8776
movq %rax, %rbx
movq 0x490(%rsp), %rdi
cmpq %r14, %rdi
je 0x8783
movq 0x4a0(%rsp), %rsi
incq %rsi
callq 0x5340
jmp 0x8783
movq %rdx, %r14
movq %rax, %rbx
movq (%r15), %rax
movq %r15, %rdi
callq *0x8(%rax)
jmp 0x8c1f
movq %rdx, %r14
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
callq 0x9b64
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x8c48
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x5340
cmpl $0x3, %r14d
jne 0x8ca0
movq %rbx, %rdi
callq 0x5400
leaq 0x18(%rsp), %r14
movq %r14, %rdi
movq %rax, %rsi
callq 0x5430
leaq 0x16beb(%rip), %rax     # 0x1f858
movq %rax, (%r14)
movq %rbx, %rdi
callq 0x5160
movq 0x17319(%rip), %rsi     # 0x1ff98
leaq 0x720(%rsp), %rdi
callq 0x8e72
leaq 0x18(%rsp), %rdi
callq 0x5688
callq 0x5580
jmp 0x8340
cmpl $0x2, %r14d
jne 0x8d4b
movq %rbx, %rdi
callq 0x5160
movq %rax, %rbx
movq 0x17324(%rip), %rdi     # 0x1ffe0
leaq 0xde77(%rip), %rsi      # 0x16b3a
movl $0x3, %edx
callq 0x53c0
movq 0x177f4(%rip), %rsi     # 0x204c8
movq 0x177f5(%rip), %rdx     # 0x204d0
movq 0x172fe(%rip), %rdi     # 0x1ffe0
callq 0x53c0
movq %rax, %r14
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
movq %r14, %rdi
movq %rax, %rsi
callq 0x5320
movq 0x177e3(%rip), %rsi     # 0x204e8
movq 0x177e4(%rip), %rdx     # 0x204f0
movq %rax, %rdi
callq 0x53c0
leaq 0xde39(%rip), %rsi      # 0x16b54
movl $0x2, %edx
movq %rax, %rdi
callq 0x53c0
movq 0x172b1(%rip), %rsi     # 0x1ffe0
leaq 0x720(%rsp), %rdi
callq 0x8e72
movl $0x1, %ebx
callq 0x5580
jmp 0x8342
cmpl $0x1, %r14d
jne 0x8df9
movq %rbx, %rdi
callq 0x5160
movq %rax, %rbx
movq 0x17761(%rip), %rsi     # 0x204c8
movq 0x17762(%rip), %rdx     # 0x204d0
movq 0x1726b(%rip), %rdi     # 0x1ffe0
callq 0x53c0
movq %rax, %r14
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
movq %r14, %rdi
movq %rax, %rsi
callq 0x5320
movq 0x17750(%rip), %rsi     # 0x204e8
movq 0x17751(%rip), %rdx     # 0x204f0
movq %rax, %rdi
callq 0x53c0
leaq 0xdda7(%rip), %rsi      # 0x16b55
movl $0x1, %edx
movq %rax, %rdi
callq 0x53c0
movl $0x1, %ebx
callq 0x5580
jmp 0x8342
jmp 0x8dce
jmp 0x8dce
movq %rax, %rbx
jmp 0x8df9
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x5688
callq 0x5580
jmp 0x8df9
movq %rax, %rbx
callq 0x5580
jmp 0x8df9
movq %rax, %rbx
callq 0x5580
leaq 0x2f8(%rsp), %rdi
callq 0xa2fa
jmp 0x8668
movq %rax, %rdi
callq 0x9b59
nop