// File: /workspace/github_c_makefile_star2_O0/stfwi[P]duktape-cc/build/duktape/mod/ext/app_attachment/././app_attachment.hh
// Function: int sw::util::detail::basic_executable_attachment<void>::patch_application<void>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
static inline int patch_application(std::string path, bool verbose=false, std::string attachment_contents="")
    {
      using namespace std;

      // hexdump
      auto hexdump = [](const vector<char>& data, std::ostream& os) {
        size_t n = 0;
        for(auto e:data) {
          if(!(n & 63)) os << "\n" << hex << setw(8) << setfill('0') << n << ": ";
          os << hex << setw(2) << setfill('0') << ((int)(e&0xff));
          ++n;
        }
        os << dec << "\n";
      };

      // file size using stat to double check later read
      size_t filesize = 0;
      {
        struct ::stat st;
        if(::stat(path.c_str(), &st) != 0) {
          cerr << "stat failed for " << path << "\n";
          return 1;
        } else {
          filesize = st.st_size;
          if(verbose) {
            cerr << "File size: " << dec << ((long)filesize) << " (0x" << hex << ((long)filesize) << ")\n";
          }
        }
      }

      // same placeholder as in the application
      vector<char> reverse_boundary_key(256);
      std::copy_n(
        basic_executable_attachment<void>::boundary_marker,
        sizeof(basic_executable_attachment<void>::boundary_marker),
        reverse_boundary_key.begin()
      );

      if(verbose) {
        cerr << "----------------------\n";
        cerr << "reverse_boundary_key:\n";
        hexdump(reverse_boundary_key, cerr);
        cerr << "----------------------\n";
      }

      // Read whole application
      vector<char> contents;
      {
        std::ifstream fis(path.c_str(), std::ios::in|std::ios::binary);
        contents.assign((std::istreambuf_iterator<char>(fis)), std::istreambuf_iterator<char>());
        if(contents.size() != filesize) {
          cerr << "file size mismatch\n"
              << "- file size : " << filesize << "\n"
              << "- file size read: " << contents.size() << "\n";
          return 1;
        }
      }

      if(verbose) {
        std::ofstream fos((path+".unpatched.tmp").c_str(), std::ios::out|std::ios::binary);
        hexdump(contents, fos);
        fos.close();
      }

      // Fill up the file until it has 4k size (app checks the start of each read 4k block to save time).
      while((contents.size() & (4095u)) != 0) contents.push_back(0);
      if(verbose) cerr << "File size after alignment fill: " << dec << ((long)contents.size()) << " (0x" << hex << ((long)contents.size()) << ")\n";

      // Find placeholder
      auto key_patch_position_it = std::search(contents.begin(), contents.end(), reverse_boundary_key.begin(), reverse_boundary_key.end());
      {
        if(key_patch_position_it == contents.end()) {
          cerr << "reverse boundary placeholder not found\n";
          return 1;
        }
        if(verbose) {
          size_t pos = static_cast<size_t>(key_patch_position_it - contents.begin()) / sizeof(decltype(contents)::iterator::difference_type);
          cerr << "Boundary placeholder at: " << pos << "\n";
        }
      }

      // Make random boundary key, check that it is unique in the whole file.
      vector<char> patch_key;
      {
        int retries = 10;
        const std::string ofs = std::string("[<") + std::to_string(long(contents.size())) + ">]";
        while(--retries) {
          patch_key.clear();
          patch_key.reserve(reverse_boundary_key.size());
          default_random_engine rd(std::chrono::high_resolution_clock::now().time_since_epoch().count());
          mt19937 mt(rd());
          uniform_int_distribution<char> db(33, 124);
          while(patch_key.size() < reverse_boundary_key.size()) patch_key.push_back(char(db(mt)));
          reverse(patch_key.begin(), patch_key.end());
          std::copy(ofs.begin(), ofs.end(), patch_key.begin());
          auto check_it = std::search(contents.begin(), contents.end(), patch_key.begin(), patch_key.end());
          auto check_sym = patch_key;
          reverse(check_sym.begin(), check_sym.end());
          if((check_it == contents.end()) && (check_sym != patch_key)) break;
        }
        if(!retries) {
          cerr << "failed to generate collisionless boundary\n";
          return 1;
        }
        if(verbose) {
          cerr << "----------------------\n";
          cerr << "patch key:'" << ofs << "'\n";
          hexdump(patch_key, cerr);
          cerr << "----------------------\n";
        }
      }
      // Patch the placeholder position with the generated key.
      std::copy_n(patch_key.begin(), patch_key.size(), key_patch_position_it);
      // Reverse the key and write it at the end.
      reverse(patch_key.begin(), patch_key.end());
      for(auto e:patch_key) contents.push_back(e);
      if(verbose) cerr << "File size after adding the boundary: " << dec << ((long)contents.size()) << " (0x" << hex << ((long)contents.size()) << ")\n";
      std::ofstream fos(path.c_str(), ofstream::out|ofstream::binary);
      if(!fos.write(contents.data(), contents.size())) { cerr << "failed to write file\n" ; return 1; }
      if(verbose) {
        std::ofstream dump_fos((path+".patched.tmp").c_str(), std::ios::out|std::ios::binary);
        hexdump(contents, dump_fos);
        dump_fos.close();
      }
      if(!attachment_contents.empty()) {
        if(verbose) cerr << "[verb] Attaching " << long(attachment_contents.size()>>10) << "kb data ...\n";
        reverse(patch_key.begin(), patch_key.end());
        const auto wdata = basic_executable_attachment<void>::serialize<vector<char>, string>(attachment_contents, patch_key.data());
        copy(wdata.begin(), wdata.end(), ostreambuf_iterator<char>(fos));
      }
      return 0;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2130, %rsp           # imm = 0x2130
movq %rdx, -0x1f58(%rbp)
movq %rdi, -0x1f50(%rbp)
movb %sil, %al
movq %rdi, -0x10(%rbp)
andb $0x1, %al
movb %al, -0x11(%rbp)
movq %rdx, -0x20(%rbp)
movq $0x0, -0x30(%rbp)
callq 0x30f0
movq %rax, %rdi
leaq -0xc0(%rbp), %rsi
callq 0x3240
cmpl $0x0, %eax
je 0x4027
movq 0xefff(%rip), %rdi      # 0x12ff0
leaq 0x90c3(%rip), %rsi      # 0xd0bb
callq 0x3260
movq -0x1f50(%rbp), %rsi
movq %rax, %rdi
callq 0x3230
movq %rax, %rdi
leaq 0x905c(%rip), %rsi      # 0xd072
callq 0x3260
movl $0x1, -0x4(%rbp)
jmp 0x5314
movq -0x90(%rbp), %rax
movq %rax, -0x30(%rbp)
testb $0x1, -0x11(%rbp)
je 0x409f
movq 0xefb1(%rip), %rdi      # 0x12ff0
leaq 0x9086(%rip), %rsi      # 0xd0cc
callq 0x3260
movq %rax, %rdi
leaq 0x32cb(%rip), %rsi      # 0x7320
callq 0x30b0
movq %rax, %rdi
movq -0x30(%rbp), %rsi
callq 0x3470
movq %rax, %rdi
leaq 0x9068(%rip), %rsi      # 0xd0d8
callq 0x3260
movq %rax, %rdi
leaq 0x32d1(%rip), %rsi      # 0x7350
callq 0x30b0
movq %rax, %rdi
movq -0x30(%rbp), %rsi
callq 0x3470
movq %rax, %rdi
leaq 0x9043(%rip), %rsi      # 0xd0dd
callq 0x3260
jmp 0x40a1
leaq -0xd9(%rbp), %rdi
movq %rdi, -0x1f60(%rbp)
callq 0x3450
movq -0x1f60(%rbp), %rdx
leaq -0xd8(%rbp), %rdi
movl $0x100, %esi            # imm = 0x100
callq 0x7380
jmp 0x40ce
leaq -0xd9(%rbp), %rdi
callq 0x32a0
leaq -0xd8(%rbp), %rdi
callq 0x7470
movq %rax, -0xf8(%rbp)
movq -0xf8(%rbp), %rdx
leaq 0x91d5(%rip), %rdi      # 0xd2d0
movl $0x100, %esi            # imm = 0x100
callq 0x73f0
movq %rax, -0x1f68(%rbp)
jmp 0x410e
movq -0x1f68(%rbp), %rax
movq %rax, -0x100(%rbp)
testb $0x1, -0x11(%rbp)
je 0x41ba
movq 0xeec3(%rip), %rdi      # 0x12ff0
leaq 0x8fac(%rip), %rsi      # 0xd0e0
callq 0x3260
jmp 0x413b
movq 0xeeae(%rip), %rdi      # 0x12ff0
leaq 0x8faf(%rip), %rsi      # 0xd0f8
callq 0x3260
jmp 0x4150
movq 0xee99(%rip), %rdx      # 0x12ff0
leaq -0x21(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
callq 0x74a0
jmp 0x4169
movq 0xee80(%rip), %rdi      # 0x12ff0
leaq 0x8f69(%rip), %rsi      # 0xd0e0
callq 0x3260
jmp 0x417e
jmp 0x41ba
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe8(%rbp)
movl %eax, -0xec(%rbp)
leaq -0xd9(%rbp), %rdi
callq 0x32a0
jmp 0x5320
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe8(%rbp)
movl %eax, -0xec(%rbp)
jmp 0x5306
leaq -0x118(%rbp), %rdi
callq 0x7630
movq -0x1f50(%rbp), %rdi
callq 0x30f0
movq %rax, -0x1f70(%rbp)
movl $0x8, %edi
movl $0x4, %esi
callq 0x3e40
movq -0x1f70(%rbp), %rsi
movl %eax, %edx
leaq -0x320(%rbp), %rdi
callq 0x3480
jmp 0x41ff
leaq -0x330(%rbp), %rdi
leaq -0x320(%rbp), %rsi
callq 0x3f10
leaq -0x340(%rbp), %rdi
callq 0x3f70
movq -0x330(%rbp), %rsi
movl -0x328(%rbp), %edx
movq -0x340(%rbp), %rcx
movl -0x338(%rbp), %r8d
leaq -0x118(%rbp), %rdi
callq 0x7650
jmp 0x4247
leaq -0x118(%rbp), %rdi
callq 0x76b0
cmpq -0x30(%rbp), %rax
je 0x436c
movq 0xed8c(%rip), %rdi      # 0x12ff0
leaq 0x8ea4(%rip), %rsi      # 0xd10f
callq 0x3260
movq %rax, -0x1f78(%rbp)
jmp 0x4279
movq -0x1f78(%rbp), %rdi
leaq 0x8e9c(%rip), %rsi      # 0xd123
callq 0x3260
movq %rax, -0x1f80(%rbp)
jmp 0x4295
movq -0x1f80(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x3070
movq %rax, -0x1f88(%rbp)
jmp 0x42ae
movq -0x1f88(%rbp), %rdi
leaq 0x8db6(%rip), %rsi      # 0xd072
callq 0x3260
movq %rax, -0x1f90(%rbp)
jmp 0x42ca
movq -0x1f90(%rbp), %rdi
leaq 0x8e5a(%rip), %rsi      # 0xd132
callq 0x3260
movq %rax, -0x1f98(%rbp)
jmp 0x42e6
leaq -0x118(%rbp), %rdi
callq 0x76b0
movq -0x1f98(%rbp), %rdi
movq %rax, %rsi
callq 0x3070
movq %rax, -0x1fa0(%rbp)
jmp 0x430a
movq -0x1fa0(%rbp), %rdi
leaq 0x8d5a(%rip), %rsi      # 0xd072
callq 0x3260
jmp 0x431f
movl $0x1, -0x4(%rbp)
movl $0x1, -0x344(%rbp)
jmp 0x4376
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe8(%rbp)
movl %eax, -0xec(%rbp)
jmp 0x52fa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe8(%rbp)
movl %eax, -0xec(%rbp)
leaq -0x320(%rbp), %rdi
callq 0x3080
jmp 0x52fa
movl $0x0, -0x344(%rbp)
leaq -0x320(%rbp), %rdi
callq 0x3080
movl -0x344(%rbp), %eax
testl %eax, %eax
jne 0x52e0
jmp 0x4392
testb $0x1, -0x11(%rbp)
je 0x4478
movq -0x1f50(%rbp), %rsi
leaq 0x8d9b(%rip), %rdx      # 0xd145
leaq -0x568(%rbp), %rdi
callq 0x76d0
jmp 0x43b8
leaq -0x568(%rbp), %rdi
callq 0x30f0
movq %rax, -0x1fa8(%rbp)
movl $0x10, %edi
movl $0x4, %esi
callq 0x3e40
movq -0x1fa8(%rbp), %rsi
movl %eax, %edx
leaq -0x548(%rbp), %rdi
callq 0x32b0
jmp 0x43f1
leaq -0x568(%rbp), %rdi
callq 0x31a0
leaq -0x21(%rbp), %rdi
leaq -0x118(%rbp), %rsi
leaq -0x548(%rbp), %rdx
callq 0x74a0
jmp 0x4416
leaq -0x548(%rbp), %rdi
callq 0x3330
jmp 0x4424
leaq -0x548(%rbp), %rdi
callq 0x3360
jmp 0x4478
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe8(%rbp)
movl %eax, -0xec(%rbp)
leaq -0x568(%rbp), %rdi
callq 0x31a0
jmp 0x52fa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe8(%rbp)
movl %eax, -0xec(%rbp)
leaq -0x548(%rbp), %rdi
callq 0x3360
jmp 0x52fa
jmp 0x447a
leaq -0x118(%rbp), %rdi
callq 0x76b0
andq $0xfff, %rax            # imm = 0xFFF
cmpq $0x0, %rax
je 0x44b0
movb $0x0, -0x569(%rbp)
leaq -0x118(%rbp), %rdi
leaq -0x569(%rbp), %rsi
callq 0x7750
jmp 0x44ae
jmp 0x447a
testb $0x1, -0x11(%rbp)
je 0x4589
movq 0xeb2f(%rip), %rdi      # 0x12ff0
leaq 0x8c8c(%rip), %rsi      # 0xd154
callq 0x3260
movq %rax, -0x1fb0(%rbp)
jmp 0x44d6
movq -0x1fb0(%rbp), %rdi
leaq 0x2e3c(%rip), %rsi      # 0x7320
callq 0x30b0
movq %rax, -0x1fb8(%rbp)
jmp 0x44f2
leaq -0x118(%rbp), %rdi
callq 0x76b0
movq -0x1fb8(%rbp), %rdi
movq %rax, %rsi
callq 0x3470
movq %rax, -0x1fc0(%rbp)
jmp 0x4516
movq -0x1fc0(%rbp), %rdi
leaq 0x8bb4(%rip), %rsi      # 0xd0d8
callq 0x3260
movq %rax, -0x1fc8(%rbp)
jmp 0x4532
movq -0x1fc8(%rbp), %rdi
leaq 0x2e10(%rip), %rsi      # 0x7350
callq 0x30b0
movq %rax, -0x1fd0(%rbp)
jmp 0x454e
leaq -0x118(%rbp), %rdi
callq 0x76b0
movq -0x1fd0(%rbp), %rdi
movq %rax, %rsi
callq 0x3470
movq %rax, -0x1fd8(%rbp)
jmp 0x4572
movq -0x1fd8(%rbp), %rdi
leaq 0x8b5d(%rip), %rsi      # 0xd0dd
callq 0x3260
jmp 0x4587
jmp 0x4589
leaq -0x118(%rbp), %rdi
movq %rdi, -0x1ff0(%rbp)
callq 0x7470
movq -0x1ff0(%rbp), %rdi
movq %rax, -0x580(%rbp)
callq 0x77e0
movq %rax, -0x588(%rbp)
leaq -0xd8(%rbp), %rdi
movq %rdi, -0x1fe8(%rbp)
callq 0x7470
movq -0x1fe8(%rbp), %rdi
movq %rax, -0x590(%rbp)
callq 0x77e0
movq %rax, -0x598(%rbp)
movq -0x580(%rbp), %rdi
movq -0x588(%rbp), %rsi
movq -0x590(%rbp), %rdx
movq -0x598(%rbp), %rcx
callq 0x7780
movq %rax, -0x1fe0(%rbp)
jmp 0x460d
movq -0x1fe0(%rbp), %rax
movq %rax, -0x578(%rbp)
leaq -0x118(%rbp), %rdi
callq 0x77e0
movq %rax, -0x5a0(%rbp)
leaq -0x578(%rbp), %rdi
leaq -0x5a0(%rbp), %rsi
callq 0x7810
testb $0x1, %al
jne 0x4647
jmp 0x4672
movq 0xe9a2(%rip), %rdi      # 0x12ff0
leaq 0x8b20(%rip), %rsi      # 0xd175
callq 0x3260
jmp 0x465c
movl $0x1, -0x4(%rbp)
movl $0x1, -0x344(%rbp)
jmp 0x52e0
testb $0x1, -0x11(%rbp)
je 0x46fc
leaq -0x118(%rbp), %rdi
callq 0x7470
movq %rax, -0x5b0(%rbp)
leaq -0x578(%rbp), %rdi
leaq -0x5b0(%rbp), %rsi
callq 0x7850
shrq $0x3, %rax
movq %rax, -0x5a8(%rbp)
movq 0xe93c(%rip), %rdi      # 0x12ff0
leaq 0x8ae2(%rip), %rsi      # 0xd19d
callq 0x3260
movq %rax, -0x1ff8(%rbp)
jmp 0x46c9
movq -0x1ff8(%rbp), %rdi
movq -0x5a8(%rbp), %rsi
callq 0x3070
movq %rax, -0x2000(%rbp)
jmp 0x46e5
movq -0x2000(%rbp), %rdi
leaq 0x897f(%rip), %rsi      # 0xd072
callq 0x3260
jmp 0x46fa
jmp 0x46fc
leaq -0x5c8(%rbp), %rdi
callq 0x7630
movl $0xa, -0x5cc(%rbp)
leaq -0x631(%rbp), %rdi
movq %rdi, -0x2008(%rbp)
callq 0x3450
movq -0x2008(%rbp), %rdx
leaq 0x8a84(%rip), %rsi      # 0xd1b7
leaq -0x630(%rbp), %rdi
callq 0x3310
jmp 0x4741
leaq -0x118(%rbp), %rdi
callq 0x76b0
movq %rax, %rsi
leaq -0x658(%rbp), %rdi
callq 0x79b0
jmp 0x475e
leaq -0x610(%rbp), %rdi
leaq -0x630(%rbp), %rsi
leaq -0x658(%rbp), %rdx
callq 0x78e0
jmp 0x477a
leaq 0x8a39(%rip), %rdx      # 0xd1ba
leaq -0x5f0(%rbp), %rdi
leaq -0x610(%rbp), %rsi
callq 0x7890
jmp 0x4796
leaq -0x610(%rbp), %rdi
callq 0x31a0
leaq -0x658(%rbp), %rdi
callq 0x31a0
leaq -0x630(%rbp), %rdi
callq 0x31a0
leaq -0x631(%rbp), %rdi
callq 0x32a0
movl -0x5cc(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x5cc(%rbp)
cmpl $0x0, %eax
je 0x4c15
leaq -0x5c8(%rbp), %rdi
movq %rdi, -0x2010(%rbp)
callq 0x7ae0
leaq -0xd8(%rbp), %rdi
callq 0x76b0
movq -0x2010(%rbp), %rdi
movq %rax, %rsi
callq 0x7b00
jmp 0x480e
callq 0x3040
movq %rax, -0x670(%rbp)
leaq -0x670(%rbp), %rdi
callq 0x7be0
movq %rax, -0x2018(%rbp)
jmp 0x482f
movq -0x2018(%rbp), %rax
movq %rax, -0x668(%rbp)
leaq -0x668(%rbp), %rdi
callq 0x7c00
movq %rax, -0x2020(%rbp)
jmp 0x4852
movq -0x2020(%rbp), %rsi
leaq -0x660(%rbp), %rdi
callq 0x7c20
jmp 0x4867
leaq -0x660(%rbp), %rdi
callq 0x7c50
movq %rax, -0x2028(%rbp)
jmp 0x487c
movq -0x2028(%rbp), %rsi
leaq -0x19f8(%rbp), %rdi
callq 0x7c80
jmp 0x4891
leaq -0x19fa(%rbp), %rdi
movl $0x21, %esi
movl $0x7c, %edx
callq 0x7cb0
jmp 0x48a9
jmp 0x48ab
leaq -0x5c8(%rbp), %rdi
callq 0x76b0
movq %rax, -0x2030(%rbp)
leaq -0xd8(%rbp), %rdi
callq 0x76b0
movq %rax, %rcx
movq -0x2030(%rbp), %rax
cmpq %rcx, %rax
jae 0x49b5
leaq -0x19fa(%rbp), %rdi
leaq -0x19f8(%rbp), %rsi
callq 0x7ce0
movb %al, -0x2031(%rbp)
jmp 0x48f8
movb -0x2031(%rbp), %al
movb %al, -0x19fb(%rbp)
leaq -0x5c8(%rbp), %rdi
leaq -0x19fb(%rbp), %rsi
callq 0x7750
jmp 0x4919
jmp 0x48ab
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe8(%rbp)
movl %eax, -0xec(%rbp)
jmp 0x498d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe8(%rbp)
movl %eax, -0xec(%rbp)
jmp 0x4981
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe8(%rbp)
movl %eax, -0xec(%rbp)
jmp 0x4975
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe8(%rbp)
movl %eax, -0xec(%rbp)
leaq -0x610(%rbp), %rdi
callq 0x31a0
leaq -0x658(%rbp), %rdi
callq 0x31a0
leaq -0x630(%rbp), %rdi
callq 0x31a0
leaq -0x631(%rbp), %rdi
callq 0x32a0
jmp 0x52d2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe8(%rbp)
movl %eax, -0xec(%rbp)
jmp 0x4e34
leaq -0x5c8(%rbp), %rdi
movq %rdi, -0x2040(%rbp)
callq 0x7470
movq -0x2040(%rbp), %rdi
movq %rax, -0x1a08(%rbp)
callq 0x77e0
movq %rax, -0x1a10(%rbp)
movq -0x1a08(%rbp), %rdi
movq -0x1a10(%rbp), %rsi
callq 0x7d10
jmp 0x49f7
leaq -0x5f0(%rbp), %rdi
movq %rdi, -0x2050(%rbp)
callq 0x3250
movq -0x2050(%rbp), %rdi
movq %rax, -0x1a18(%rbp)
callq 0x34a0
movq %rax, -0x1a20(%rbp)
leaq -0x5c8(%rbp), %rdi
callq 0x7470
movq %rax, -0x1a28(%rbp)
movq -0x1a18(%rbp), %rdi
movq -0x1a20(%rbp), %rsi
movq -0x1a28(%rbp), %rdx
callq 0x7d50
movq %rax, -0x2048(%rbp)
jmp 0x4a5a
movq -0x2048(%rbp), %rax
movq %rax, -0x1a30(%rbp)
leaq -0x118(%rbp), %rdi
movq %rdi, -0x2068(%rbp)
callq 0x7470
movq -0x2068(%rbp), %rdi
movq %rax, -0x1a40(%rbp)
callq 0x77e0
movq %rax, -0x1a48(%rbp)
leaq -0x5c8(%rbp), %rdi
movq %rdi, -0x2060(%rbp)
callq 0x7470
movq -0x2060(%rbp), %rdi
movq %rax, -0x1a50(%rbp)
callq 0x77e0
movq %rax, -0x1a58(%rbp)
movq -0x1a40(%rbp), %rdi
movq -0x1a48(%rbp), %rsi
movq -0x1a50(%rbp), %rdx
movq -0x1a58(%rbp), %rcx
callq 0x7780
movq %rax, -0x2058(%rbp)
jmp 0x4aec
movq -0x2058(%rbp), %rax
movq %rax, -0x1a38(%rbp)
leaq -0x1a70(%rbp), %rdi
leaq -0x5c8(%rbp), %rsi
callq 0x7dc0
jmp 0x4b0f
leaq -0x1a70(%rbp), %rdi
movq %rdi, -0x2070(%rbp)
callq 0x7470
movq -0x2070(%rbp), %rdi
movq %rax, -0x1a78(%rbp)
callq 0x77e0
movq %rax, -0x1a80(%rbp)
movq -0x1a78(%rbp), %rdi
movq -0x1a80(%rbp), %rsi
callq 0x7d10
jmp 0x4b51
leaq -0x118(%rbp), %rdi
callq 0x77e0
movq %rax, -0x1a88(%rbp)
leaq -0x1a38(%rbp), %rdi
leaq -0x1a88(%rbp), %rsi
callq 0x7810
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x2071(%rbp)
jne 0x4b88
jmp 0x4bb1
leaq -0x1a70(%rbp), %rdi
leaq -0x5c8(%rbp), %rsi
callq 0x7eb0
movb %al, -0x2072(%rbp)
jmp 0x4ba3
movb -0x2072(%rbp), %al
movb %al, -0x2071(%rbp)
jmp 0x4bb1
movb -0x2071(%rbp), %al
testb $0x1, %al
jne 0x4bbd
jmp 0x4bec
movl $0x5, -0x344(%rbp)
jmp 0x4bf6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe8(%rbp)
movl %eax, -0xec(%rbp)
leaq -0x1a70(%rbp), %rdi
callq 0x7ee0
jmp 0x4e34
movl $0x0, -0x344(%rbp)
leaq -0x1a70(%rbp), %rdi
callq 0x7ee0
movl -0x344(%rbp), %eax
testl %eax, %eax
je 0x4c10
jmp 0x4c0e
jmp 0x4c15
jmp 0x47c6
cmpl $0x0, -0x5cc(%rbp)
jne 0x4c49
movq 0xe3cb(%rip), %rdi      # 0x12ff0
leaq 0x8591(%rip), %rsi      # 0xd1bd
callq 0x3260
jmp 0x4c33
movl $0x1, -0x4(%rbp)
movl $0x1, -0x344(%rbp)
jmp 0x4cef
testb $0x1, -0x11(%rbp)
je 0x4ce5
movq 0xe396(%rip), %rdi      # 0x12ff0
leaq 0x847f(%rip), %rsi      # 0xd0e0
callq 0x3260
jmp 0x4c68
movq 0xe381(%rip), %rdi      # 0x12ff0
leaq 0x8572(%rip), %rsi      # 0xd1e8
callq 0x3260
movq %rax, -0x2080(%rbp)
jmp 0x4c84
movq -0x2080(%rbp), %rdi
leaq -0x5f0(%rbp), %rsi
callq 0x3230
movq %rax, -0x2088(%rbp)
jmp 0x4ca0
movq -0x2088(%rbp), %rdi
leaq 0x83c3(%rip), %rsi      # 0xd071
callq 0x3260
jmp 0x4cb5
movq 0xe334(%rip), %rdx      # 0x12ff0
leaq -0x21(%rbp), %rdi
leaq -0x5c8(%rbp), %rsi
callq 0x74a0
jmp 0x4cce
movq 0xe31b(%rip), %rdi      # 0x12ff0
leaq 0x8404(%rip), %rsi      # 0xd0e0
callq 0x3260
jmp 0x4ce3
jmp 0x4ce5
movl $0x0, -0x344(%rbp)
leaq -0x5f0(%rbp), %rdi
callq 0x31a0
movl -0x344(%rbp), %eax
testl %eax, %eax
jne 0x52c4
jmp 0x4d0b
leaq -0x5c8(%rbp), %rdi
movq %rdi, -0x2098(%rbp)
callq 0x7470
movq -0x2098(%rbp), %rdi
movq %rax, -0x1a90(%rbp)
callq 0x76b0
movq %rax, %rsi
movq -0x578(%rbp), %rax
movq %rax, -0x1a98(%rbp)
movq -0x1a90(%rbp), %rdi
movq -0x1a98(%rbp), %rdx
callq 0x7f40
movq %rax, -0x2090(%rbp)
jmp 0x4d5e
movq -0x2090(%rbp), %rax
movq %rax, -0x1aa0(%rbp)
leaq -0x5c8(%rbp), %rdi
movq %rdi, -0x20a0(%rbp)
callq 0x7470
movq -0x20a0(%rbp), %rdi
movq %rax, -0x1aa8(%rbp)
callq 0x77e0
movq %rax, -0x1ab0(%rbp)
movq -0x1aa8(%rbp), %rdi
movq -0x1ab0(%rbp), %rsi
callq 0x7d10
jmp 0x4dae
leaq -0x5c8(%rbp), %rax
movq %rax, -0x1ab8(%rbp)
movq -0x1ab8(%rbp), %rdi
callq 0x7470
movq %rax, -0x1ac0(%rbp)
movq -0x1ab8(%rbp), %rdi
callq 0x77e0
movq %rax, -0x1ac8(%rbp)
leaq -0x1ac0(%rbp), %rdi
leaq -0x1ac8(%rbp), %rsi
callq 0x7fc0
testb $0x1, %al
jne 0x4dfb
jmp 0x4e5c
leaq -0x1ac0(%rbp), %rdi
callq 0x8000
movb (%rax), %al
movb %al, -0x1ac9(%rbp)
leaq -0x118(%rbp), %rdi
leaq -0x1ac9(%rbp), %rsi
callq 0x8020
jmp 0x4e24
jmp 0x4e26
leaq -0x1ac0(%rbp), %rdi
callq 0x8090
jmp 0x4de2
leaq -0x5f0(%rbp), %rdi
callq 0x31a0
jmp 0x52d2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe8(%rbp)
movl %eax, -0xec(%rbp)
jmp 0x52d2
testb $0x1, -0x11(%rbp)
je 0x4f35
movq 0xe183(%rip), %rdi      # 0x12ff0
leaq 0x8380(%rip), %rsi      # 0xd1f4
callq 0x3260
movq %rax, -0x20a8(%rbp)
jmp 0x4e82
movq -0x20a8(%rbp), %rdi
leaq 0x2490(%rip), %rsi      # 0x7320
callq 0x30b0
movq %rax, -0x20b0(%rbp)
jmp 0x4e9e
leaq -0x118(%rbp), %rdi
callq 0x76b0
movq -0x20b0(%rbp), %rdi
movq %rax, %rsi
callq 0x3470
movq %rax, -0x20b8(%rbp)
jmp 0x4ec2
movq -0x20b8(%rbp), %rdi
leaq 0x8208(%rip), %rsi      # 0xd0d8
callq 0x3260
movq %rax, -0x20c0(%rbp)
jmp 0x4ede
movq -0x20c0(%rbp), %rdi
leaq 0x2464(%rip), %rsi      # 0x7350
callq 0x30b0
movq %rax, -0x20c8(%rbp)
jmp 0x4efa
leaq -0x118(%rbp), %rdi
callq 0x76b0
movq -0x20c8(%rbp), %rdi
movq %rax, %rsi
callq 0x3470
movq %rax, -0x20d0(%rbp)
jmp 0x4f1e
movq -0x20d0(%rbp), %rdi
leaq 0x81b1(%rip), %rsi      # 0xd0dd
callq 0x3260
jmp 0x4f33
jmp 0x4f35
movq -0x1f50(%rbp), %rdi
callq 0x30f0
movq %rax, -0x20d8(%rbp)
movl $0x10, %edi
movl $0x4, %esi
callq 0x3e40
movq -0x20d8(%rbp), %rsi
movl %eax, %edx
leaq -0x1cd0(%rbp), %rdi
callq 0x32b0
jmp 0x4f6e
leaq -0x118(%rbp), %rdi
movq %rdi, -0x20f0(%rbp)
callq 0x80b0
movq -0x20f0(%rbp), %rdi
movq %rax, -0x20e8(%rbp)
callq 0x76b0
movq -0x20e8(%rbp), %rsi
movq %rax, %rdx
leaq -0x1cd0(%rbp), %rdi
callq 0x3300
movq %rax, -0x20e0(%rbp)
jmp 0x4fb3
movq -0x20e0(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x3130
movb %al, -0x20f1(%rbp)
jmp 0x4fd1
movb -0x20f1(%rbp), %al
testb $0x1, %al
jne 0x4fdd
jmp 0x501f
movq 0xe00c(%rip), %rdi      # 0x12ff0
leaq 0x822f(%rip), %rsi      # 0xd21a
callq 0x3260
jmp 0x4ff2
movl $0x1, -0x4(%rbp)
movl $0x1, -0x344(%rbp)
jmp 0x52a8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe8(%rbp)
movl %eax, -0xec(%rbp)
jmp 0x52b6
testb $0x1, -0x11(%rbp)
je 0x5105
movq -0x1f50(%rbp), %rsi
leaq 0x81f9(%rip), %rdx      # 0xd230
leaq -0x1ef0(%rbp), %rdi
callq 0x76d0
jmp 0x5045
leaq -0x1ef0(%rbp), %rdi
callq 0x30f0
movq %rax, -0x2100(%rbp)
movl $0x10, %edi
movl $0x4, %esi
callq 0x3e40
movq -0x2100(%rbp), %rsi
movl %eax, %edx
leaq -0x1ed0(%rbp), %rdi
callq 0x32b0
jmp 0x507e
leaq -0x1ef0(%rbp), %rdi
callq 0x31a0
leaq -0x21(%rbp), %rdi
leaq -0x118(%rbp), %rsi
leaq -0x1ed0(%rbp), %rdx
callq 0x74a0
jmp 0x50a3
leaq -0x1ed0(%rbp), %rdi
callq 0x3330
jmp 0x50b1
leaq -0x1ed0(%rbp), %rdi
callq 0x3360
jmp 0x5105
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe8(%rbp)
movl %eax, -0xec(%rbp)
leaq -0x1ef0(%rbp), %rdi
callq 0x31a0
jmp 0x52b6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe8(%rbp)
movl %eax, -0xec(%rbp)
leaq -0x1ed0(%rbp), %rdi
callq 0x3360
jmp 0x52b6
movq -0x1f58(%rbp), %rdi
callq 0x3400
testb $0x1, %al
jne 0x5297
testb $0x1, -0x11(%rbp)
je 0x517a
movq 0xdeca(%rip), %rdi      # 0x12ff0
leaq 0x8110(%rip), %rsi      # 0xd23d
callq 0x3260
movq %rax, -0x2108(%rbp)
jmp 0x513b
movq -0x1f58(%rbp), %rdi
callq 0x31d0
movq -0x2108(%rbp), %rdi
movq %rax, %rsi
shrq $0xa, %rsi
callq 0x3470
movq %rax, -0x2110(%rbp)
jmp 0x5163
movq -0x2110(%rbp), %rdi
leaq 0x80de(%rip), %rsi      # 0xd24f
callq 0x3260
jmp 0x5178
jmp 0x517a
leaq -0x5c8(%rbp), %rdi
movq %rdi, -0x2118(%rbp)
callq 0x7470
movq -0x2118(%rbp), %rdi
movq %rax, -0x1ef8(%rbp)
callq 0x77e0
movq %rax, -0x1f00(%rbp)
movq -0x1ef8(%rbp), %rdi
movq -0x1f00(%rbp), %rsi
callq 0x7d10
jmp 0x51bc
leaq -0x5c8(%rbp), %rdi
callq 0x80b0
movq -0x1f58(%rbp), %rsi
movq %rax, %rdx
leaq -0x1f18(%rbp), %rdi
callq 0x80d0
jmp 0x51e0
leaq -0x1f18(%rbp), %rdi
movq %rdi, -0x2130(%rbp)
callq 0x8260
movq -0x2130(%rbp), %rdi
movq %rax, -0x1f20(%rbp)
callq 0x8290
movq %rax, -0x1f28(%rbp)
leaq -0x1f38(%rbp), %rdi
leaq -0x1cd0(%rbp), %rsi
callq 0x82c0
movq -0x1f20(%rbp), %rdi
movq -0x1f28(%rbp), %rsi
movq -0x1f38(%rbp), %rdx
movl -0x1f30(%rbp), %ecx
callq 0x81d0
movb %dl, -0x2121(%rbp)
movq %rax, -0x2120(%rbp)
jmp 0x524f
movb -0x2121(%rbp), %al
movq -0x2120(%rbp), %rcx
movq %rcx, -0x1f48(%rbp)
movb %al, -0x1f40(%rbp)
leaq -0x1f18(%rbp), %rdi
callq 0x7ee0
jmp 0x5297
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe8(%rbp)
movl %eax, -0xec(%rbp)
leaq -0x1f18(%rbp), %rdi
callq 0x7ee0
jmp 0x52b6
movl $0x0, -0x4(%rbp)
movl $0x1, -0x344(%rbp)
leaq -0x1cd0(%rbp), %rdi
callq 0x3360
jmp 0x52c4
leaq -0x1cd0(%rbp), %rdi
callq 0x3360
jmp 0x52d2
leaq -0x5c8(%rbp), %rdi
callq 0x7ee0
jmp 0x52e0
leaq -0x5c8(%rbp), %rdi
callq 0x7ee0
jmp 0x52fa
leaq -0x118(%rbp), %rdi
callq 0x7ee0
leaq -0xd8(%rbp), %rdi
callq 0x7ee0
jmp 0x5314
leaq -0x118(%rbp), %rdi
callq 0x7ee0
leaq -0xd8(%rbp), %rdi
callq 0x7ee0
jmp 0x5320
movl -0x4(%rbp), %eax
addq $0x2130, %rsp           # imm = 0x2130
popq %rbp
retq
movq -0xe8(%rbp), %rdi
callq 0x3440
nopl (%rax)