// File: /workspace/github_cpp_makefile_star2_O3/kztomita[P]http-dump/httpv2.cc
// Function: httpv2::get(boost::asio::ip::address const&, unsigned short, http_scheme, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::list<std::unique_ptr<http_header, std::default_delete<http_header>>, std::allocator<std::unique_ptr<http_header, std::default_delete<http_header>>>> const&)
http_response httpv2::get(const boost::asio::ip::address& ip, uint16_t port, http_scheme scheme, const std::string& host, const std::string& path, const http_header_list& req_headers) {
  if (scheme != http_scheme::https) {
    throw std::invalid_argument("http scheme not supported on http/2.");
  }

  ssl_stream ssl_stream_wrapper(g_verify_cert, true);
  ssl_stream_wrapper.set_host(host);
  ssl_stream_wrapper.connect(ip, port);

  asio::ssl::stream<asio::ip::tcp::socket>& stream = ssl_stream_wrapper.inner_stream();

  const unsigned char* alpn_data = nullptr;
  unsigned int alpn_len = 0;
  SSL_get0_alpn_selected(stream.native_handle(), &alpn_data, &alpn_len);
  if (alpn_len == 0) {
    throw std::runtime_error("http/2 is not selected.");
  }
  if (std::string_view(reinterpret_cast<const char*>(alpn_data), alpn_len) != "h2") {
    throw std::runtime_error("http/2 is not selected.");
  }

  std::ostringstream request_stream;
  request_stream << "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n";
  asio::write(stream, asio::buffer(request_stream.str()));

  // SETTINGS送信
#if 1
  send_http2_settings(stream);
#else
  // パラメータを指定する場合
  std::vector<settings_parameter> params{
    {SETTINGS_MAX_CONCURRENT_STREAMS, 10},
    {SETTINGS_MAX_FRAME_SIZE, 16384},
  };
  send_http2_settings(stream, params);
#endif

  // SETTINGS受信
  bool rcv_settings = false;
  bool rcv_settings_ack = false;
  while (!rcv_settings || !rcv_settings_ack) {
    auto frame = read_http2_frame(stream);
    if (frame.type() == http2_frame_header::TYPE_SETTINGS) {
      if (frame.flags() & HTTP2_SETTINGS_ACK_FLAG) {
        rcv_settings_ack = true;
      } else {
        rcv_settings = true;
        // SETTINGS ACK送信
        send_http2_settings_ack(stream);
      }
    }
  }

  uint32_t stream_id = 1;

  // HEADERS送信
  send_http2_headers(stream, stream_id, host, path, req_headers);

  // HEADERS受信
  // Header Block FragmentからHeader Blockを構築
  http2_frame::payload_type header_block;
  auto headers_frame = read_http2_frame(stream);
  if (headers_frame.type() != http2_frame_header::TYPE_HEADERS) {
    throw std::runtime_error("The frame which isn't a HEADERS frame was received.");
  }
  std::size_t fragment_offset = 0;
  std::size_t pad_length = 0;
  if (headers_frame.flags() & HTTP2_HEADERS_PADDED_FLAG) {
    pad_length = headers_frame.payload()[fragment_offset];
    fragment_offset += 1;
  }
  if (headers_frame.flags() & HTTP2_HEADERS_PRIORITY_FLAG) {
    fragment_offset += 5;
  }
  header_block.insert(header_block.end(),
                      headers_frame.payload().begin() + fragment_offset,
                      headers_frame.payload().end() - pad_length);

  if (!(headers_frame.flags() & HTTP2_HEADERS_END_HEADERS_FLAG)) {
    // CONTINUATIONが続く
    while (true) {
      auto continuation_frame = read_http2_frame(stream);
      if (continuation_frame.type() != http2_frame_header::TYPE_CONTINUATION) {
        throw std::runtime_error("The frame which isn't a CONTINUATION frame was received.");
      }

      header_block.insert(header_block.end(),
                          continuation_frame.payload().begin(),
                          continuation_frame.payload().end());

      if (continuation_frame.flags() & HTTP2_CONTINUATION_END_HEADERS_FLAG) {
        break;
      }
    }
  }

  hpack::hpack_decoder decoder(&header_block[0], header_block.size());
  hpack::decoding_context context;
  auto header_list = decoder.decode(context);

  debug_message("HPACK Dynamic Table");
  debug_dump(*context.dynamic_table);
  debug_message("");

  debug_message("HPACK Decoded header list");
  for (const auto& h : header_list) {
    debug_message(h.first + " " + h.second);
  }
  debug_message("");

  // DATA受信
  http_response::payload_type response_body;

  while (true) {
    auto data_frame = read_http2_frame(stream);
    if (data_frame.type() != http2_frame_header::TYPE_DATA) {
      throw std::runtime_error("The frame which isn't a DATA frame was received.");
    }
    if (data_frame.flags() & HTTP2_DATA_PADDED_FLAG) {
      throw std::runtime_error("padding flag not supported.");
    }
    response_body.insert(response_body.end(), data_frame.payload().begin(), data_frame.payload().end());
    if (data_frame.flags() & HTTP2_DATA_END_STREAM_FLAG) {
      break;
    }

    // WINDOW UPDATE送信
    send_http2_window_update(stream, stream_id, data_frame.length());
    send_http2_window_update(stream, 0, data_frame.length());         // connection level
  }

  // GOAWAY送信
  send_http2_goaway(stream, stream_id);

  http_response r;

  auto status_header = std::find_if(header_list.begin(), header_list.end(),
                                    [] (const hpack::header_type& h) {
                                      return h.first == ":status";
                                    });
  if (status_header != header_list.end()) {
    r.code_ = std::stoi(status_header->second);
  } else {
    std::runtime_error("status header not found.");
  }

  for (const auto& h : header_list) {
    if (h.first == ":status") {
      continue;
    }
    r.headers_.push_back(std::make_unique<http_header>(convert_header_name(h.first), h.second));
  }

  swap(r.payload_, response_body);

  return r;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2f8, %rsp            # imm = 0x2F8
movq %rdi, 0x38(%rsp)
cmpl $0x1, %r8d
jne 0x2554e
movq %r9, %r15
movl %ecx, %ebp
movq %rdx, %r14
movzbl 0x22d55(%rip), %esi     # 0x47748
leaq 0x120(%rsp), %rbx
movq %rbx, %rdi
movl $0x1, %edx
callq 0x2b2e6
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2b678
movzwl %bp, %edx
leaq 0x120(%rsp), %rdi
movq %r14, %rsi
callq 0x2b682
leaq 0x120(%rsp), %rdi
callq 0x2b7d0
movq %rax, %r14
leaq 0xf0(%rsp), %rsi
movq $0x0, (%rsi)
leaq 0x8c(%rsp), %rdx
movl $0x0, (%rdx)
movq 0x50(%rax), %rdi
callq 0xb3b0
movl 0x8c(%rsp), %eax
cmpl $0x2, %eax
jne 0x254fa
movq 0xf0(%rsp), %rax
cmpw $0x3268, (%rax)         # imm = 0x3268
jne 0x2551c
leaq 0x180(%rsp), %rdi
callq 0xb8c0
leaq 0xe805(%rip), %rsi      # 0x33298
leaq 0x180(%rsp), %rdi
movl $0x18, %edx
callq 0xb730
leaq 0x188(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0xba80
movups 0x8(%rsp), %xmm0
leaq 0x70(%rsp), %rsi
movups %xmm0, (%rsi)
leaq 0x40(%rsp), %rcx
movl $0x0, (%rcx)
movb $0x0, 0x4(%rcx)
leaq 0x20836(%rip), %rax     # 0x45310
movq %rax, 0x8(%rcx)
leaq 0xa8(%rsp), %rdx
movq %rsi, (%rdx)
movq %r14, %rdi
callq 0x263c5
cmpb $0x1, 0x44(%rsp)
je 0x25580
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x24b17
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb600
movq %r14, %rdi
callq 0x2591a
xorl %ebx, %ebx
leaq 0xa8(%rsp), %rbp
xorl %r12d, %r12d
movq %rbp, %rdi
movq %r14, %rsi
callq 0x25972
cmpb $0x4, 0xab(%rsp)
jne 0x24b5d
movb $0x1, %r13b
testb $0x1, 0xac(%rsp)
jne 0x24b60
movb $0x1, %bl
movq %r14, %rdi
callq 0x25c9a
movl %r12d, %r13d
jmp 0x24b60
movl %r12d, %r13d
movq 0xb8(%rsp), %rdi
testq %rdi, %rdi
je 0x24b7d
movq 0xc8(%rsp), %rsi
subq %rdi, %rsi
callq 0xb600
movl %ebx, %eax
andb %r13b, %al
movl %r13d, %r12d
testb $0x1, %al
je 0x24b2c
movl $0x4000, %r9d           # imm = 0x4000
movq %r14, %rdi
movl $0x1, %esi
movq %r15, %rdx
movq 0x330(%rsp), %rcx
movq 0x338(%rsp), %r8
callq 0x25d0d
xorps %xmm0, %xmm0
movaps %xmm0, 0x70(%rsp)
movq $0x0, 0x80(%rsp)
leaq 0xa8(%rsp), %rdi
movq %r14, %rsi
callq 0x25972
leaq 0x18(%rsp), %r13
cmpb $0x1, 0xab(%rsp)
jne 0x255d5
movzbl 0xac(%rsp), %ecx
movq 0xb8(%rsp), %rdx
testb $0x8, %cl
jne 0x24c01
xorl %eax, %eax
xorl %esi, %esi
jmp 0x24c09
movzbl (%rdx), %eax
movl $0x1, %esi
leaq 0x5(%rsi), %r8
testb $0x20, %cl
cmoveq %rsi, %r8
leaq 0x70(%rsp), %rdi
movq 0x8(%rdi), %rsi
addq %r8, %rdx
movq 0xc0(%rsp), %rcx
subq %rax, %rcx
callq 0x28188
testb $0x4, 0xac(%rsp)
jne 0x24c91
leaq 0x8(%rsp), %r15
leaq 0x70(%rsp), %r12
movq %r15, %rdi
movq %r14, %rsi
callq 0x25972
cmpb $0x9, 0xb(%rsp)
jne 0x254c3
movq 0x78(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq 0x20(%rsp), %rcx
movq %r12, %rdi
callq 0x28188
movb 0xc(%rsp), %bl
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x24c8c
movq 0x28(%rsp), %rsi
subq %rdi, %rsi
callq 0xb600
testb $0x4, %bl
je 0x24c44
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
subq %rsi, %rdx
leaq 0x108(%rsp), %rdi
callq 0x294e2
leaq 0x68(%rsp), %rdi
callq 0x294b0
leaq 0x90(%rsp), %rdi
leaq 0x108(%rsp), %rsi
leaq 0x68(%rsp), %rdx
callq 0x294ea
leaq 0x8(%rsp), %rdi
movq %r13, (%rdi)
leaq 0xe640(%rip), %rsi      # 0x3331e
leaq 0xe64c(%rip), %rdx      # 0x33331
callq 0x1025a
cmpb $0x1, 0x22ed7(%rip)     # 0x47bc8
jne 0x24d33
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq 0x2227c(%rip), %rdi     # 0x46f80
callq 0xb730
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0xb5b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0xb050
movq %rax, %rdi
callq 0xb450
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x24d4a
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb600
cmpb $0x1, 0x22e77(%rip)     # 0x47bc8
jne 0x24d5d
movq 0x68(%rsp), %rdi
callq 0x2a31e
leaq 0x8(%rsp), %rdi
movq %r13, (%rdi)
leaq 0xe544(%rip), %rdx      # 0x332b0
movq %rdx, %rsi
callq 0x1025a
cmpb $0x1, 0x22e4d(%rip)     # 0x47bc8
jne 0x24dbd
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq 0x221f2(%rip), %rdi     # 0x46f80
callq 0xb730
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0xb5b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0xb050
movq %rax, %rdi
callq 0xb450
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x24dd4
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb600
leaq 0x8(%rsp), %rdi
movq %r13, (%rdi)
leaq 0xe54f(%rip), %rsi      # 0x33332
leaq 0xe561(%rip), %rdx      # 0x3334b
callq 0x1025a
cmpb $0x1, 0x22dd2(%rip)     # 0x47bc8
jne 0x24e38
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq 0x22177(%rip), %rdi     # 0x46f80
callq 0xb730
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0xb5b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0xb050
movq %rax, %rdi
callq 0xb450
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x24e4f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb600
movq 0x90(%rsp), %r13
movq 0x98(%rsp), %r12
cmpq %r12, %r13
je 0x24f78
leaq 0x50(%rsp), %rbp
leaq 0x40(%rsp), %r15
movq %rbp, 0x40(%rsp)
movq (%r13), %rsi
movq 0x8(%r13), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0xe500
movq %r15, %rdi
leaq 0xe8fe(%rip), %rsi      # 0x33792
callq 0xbcf0
movq 0x20(%r13), %rsi
movq 0x28(%r13), %rdx
movq %r15, %rdi
callq 0xb1b0
leaq 0x18(%rsp), %rsi
movq %rsi, 0x8(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x24ed1
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x24ed7
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
cmpb $0x1, 0x22cd2(%rip)     # 0x47bc8
jne 0x24f38
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq 0x22077(%rip), %rdi     # 0x46f80
callq 0xb730
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0xb5b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0xb050
movq %rax, %rdi
callq 0xb450
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x24f54
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb600
movq 0x40(%rsp), %rdi
cmpq %rbp, %rdi
je 0x24f6b
movq 0x50(%rsp), %rsi
incq %rsi
callq 0xb600
addq $0x40, %r13
cmpq %r12, %r13
jne 0x24e72
leaq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %r15
movq %r15, (%rdi)
leaq 0xe324(%rip), %rdx      # 0x332b0
movq %rdx, %rsi
callq 0x1025a
cmpb $0x1, 0x22c2d(%rip)     # 0x47bc8
jne 0x24fdd
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq 0x21fd2(%rip), %rdi     # 0x46f80
callq 0xb730
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0xb5b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0xb050
movq %rax, %rdi
callq 0xb450
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x24ff4
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb600
xorps %xmm0, %xmm0
leaq 0x40(%rsp), %r15
movaps %xmm0, (%r15)
movq $0x0, 0x10(%r15)
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x25972
cmpb $0x0, 0xb(%rsp)
jne 0x25491
testb $0x8, 0xc(%rsp)
jne 0x25473
movq 0x48(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq 0x20(%rsp), %rcx
movq %r15, %rdi
callq 0x28188
movb 0xc(%rsp), %bl
testb $0x1, %bl
jne 0x2508d
movzbl 0xa(%rsp), %eax
shll $0x10, %eax
movzwl 0x8(%rsp), %edx
orl %eax, %edx
bswapl %edx
shrl $0x8, %edx
movq %r14, %rdi
movl $0x1, %esi
callq 0x26188
movzbl 0xa(%rsp), %eax
shll $0x10, %eax
movzwl 0x8(%rsp), %edx
orl %eax, %edx
bswapl %edx
shrl $0x8, %edx
movq %r14, %rdi
xorl %esi, %esi
callq 0x26188
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x250a4
movq 0x28(%rsp), %rsi
subq %rdi, %rsi
callq 0xb600
testb $0x1, %bl
je 0x2500d
movq %r14, %rdi
movl $0x1, %esi
callq 0x2626a
xorps %xmm0, %xmm0
movq 0x38(%rsp), %rax
movups %xmm0, 0x28(%rax)
movups %xmm0, 0x18(%rax)
movups %xmm0, 0x8(%rax)
movq 0x90(%rsp), %r14
movq 0x98(%rsp), %rbx
movq %rbx, %r13
subq %r14, %r13
movq %r13, %rbp
sarq $0x8, %rbp
testq %rbp, %rbp
jle 0x25167
incq %rbp
leaq 0xe2b8(%rip), %r15      # 0x333b2
movq %r14, %rdi
movq %r15, %rsi
callq 0xb190
testl %eax, %eax
je 0x251b2
leaq 0x40(%r14), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0xb190
testl %eax, %eax
je 0x251b5
leaq 0x80(%r14), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0xb190
testl %eax, %eax
je 0x251b5
leaq 0xc0(%r14), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0xb190
testl %eax, %eax
je 0x251b5
addq $0x100, %r14            # imm = 0x100
decq %rbp
addq $-0x100, %r13
cmpq $0x1, %rbp
jg 0x250fa
sarq $0x6, %r13
cmpq $0x1, %r13
je 0x251bc
cmpq $0x2, %r13
leaq 0x18(%rsp), %r15
je 0x25199
cmpq $0x3, %r13
jne 0x251d6
leaq 0xe229(%rip), %rsi      # 0x333b2
movq %r14, %rdi
callq 0xb190
testl %eax, %eax
je 0x251db
addq $0x40, %r14
leaq 0xe212(%rip), %rsi      # 0x333b2
movq %r14, %rdi
callq 0xb190
testl %eax, %eax
je 0x251db
addq $0x40, %r14
jmp 0x251c1
movq %r14, %r12
leaq 0x18(%rsp), %r15
jmp 0x251de
leaq 0x18(%rsp), %r15
leaq 0xe1ea(%rip), %rsi      # 0x333b2
movq %r14, %rdi
callq 0xb190
testl %eax, %eax
cmoveq %r14, %rbx
movq %rbx, %r12
jmp 0x251de
movq %r14, %r12
cmpq 0x98(%rsp), %r12
je 0x25248
movq 0x20(%r12), %rbx
callq 0xb090
movq %rax, %r15
movl (%rax), %ebp
movl $0x0, (%rax)
leaq 0x8(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
movl $0xa, %edx
callq 0xb920
cmpq %rbx, (%r14)
je 0x25607
movslq %eax, %rcx
cmpq %rax, %rcx
jne 0x25613
movl (%r15), %ecx
cmpl $0x22, %ecx
je 0x25613
testl %ecx, %ecx
jne 0x2523a
movl %ebp, (%r15)
movq 0x38(%rsp), %rcx
movl %eax, (%rcx)
leaq 0x18(%rsp), %r15
jmp 0x25269
leaq 0xe14a(%rip), %rsi      # 0x33399
leaq 0xf8(%rsp), %rdi
callq 0xb270
leaq 0xf8(%rsp), %rdi
callq 0xbd98
movq 0x90(%rsp), %r14
movq 0x98(%rsp), %r12
cmpq %r12, %r14
je 0x253a1
movq 0x38(%rsp), %rax
addq $0x8, %rax
movq %rax, 0xe8(%rsp)
leaq 0x8(%rsp), %r13
movq %r14, %rdi
leaq 0xe110(%rip), %rsi      # 0x333b2
callq 0xb190
testl %eax, %eax
je 0x25394
movq %r15, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movb $0x0, 0x18(%rsp)
movq (%r14), %rax
xorl %ebx, %ebx
cmpb $0x3a, (%rax)
sete %bl
cmpq %rbx, 0x8(%r14)
jbe 0x25328
movb $0x1, %bpl
movq (%r14), %rax
movb (%rax,%rbx), %r15b
movsbl %r15b, %edi
leal -0x61(%r15), %eax
cmpb $0x1a, %al
setb %al
andb %bpl, %al
cmpb $0x1, %al
jne 0x25305
callq 0xbc40
movsbl %al, %esi
movq %r13, %rdi
callq 0xb540
xorl %ebp, %ebp
jmp 0x25315
callq 0xb9b0
movsbl %al, %esi
movq %r13, %rdi
callq 0xb540
cmpb $0x2d, %r15b
sete %al
orb %al, %bpl
incq %rbx
cmpq 0x8(%r14), %rbx
jb 0x252d6
movl $0x40, %edi
callq 0xb5e0
movq %rax, %rbx
leaq 0x20(%r14), %rdx
movq %rax, %rdi
movq %r13, %rsi
callq 0x20d98
movq %rbx, 0x30(%rsp)
movq 0xe8(%rsp), %rdi
leaq 0x30(%rsp), %rsi
leaq 0x18(%rsp), %r15
callq 0x24532
movq 0x30(%rsp), %rsi
testq %rsi, %rsi
je 0x25374
leaq 0x30(%rsp), %rdi
callq 0x103c6
movq $0x0, 0x30(%rsp)
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x25394
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb600
addq $0x40, %r14
cmpq %r12, %r14
jne 0x25298
movq 0x38(%rsp), %rdx
movq 0x20(%rdx), %rdi
movq 0x28(%rdx), %rax
movq 0x30(%rdx), %rsi
movaps 0x40(%rsp), %xmm0
movups %xmm0, 0x20(%rdx)
movq 0x50(%rsp), %rcx
movq %rcx, 0x30(%rdx)
movq %rdi, 0x40(%rsp)
movq %rax, 0x48(%rsp)
movq %rsi, 0x50(%rsp)
testq %rdi, %rdi
je 0x253e0
subq %rdi, %rsi
callq 0xb600
leaq 0x90(%rsp), %rdi
callq 0x19a48
leaq 0x68(%rsp), %rdi
callq 0x294dc
movq 0xb8(%rsp), %rdi
testq %rdi, %rdi
je 0x25414
movq 0xc8(%rsp), %rsi
subq %rdi, %rsi
callq 0xb600
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x2542e
movq 0x80(%rsp), %rsi
subq %rdi, %rsi
callq 0xb600
movq 0x21b2b(%rip), %rsi     # 0x46f60
leaq 0x180(%rsp), %rdi
callq 0xb380
leaq 0x1f0(%rsp), %rdi
callq 0xb1f0
leaq 0x120(%rsp), %rdi
callq 0x2255a
movq 0x38(%rsp), %rax
addq $0x2f8, %rsp            # imm = 0x2F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0xb300
movq %rax, %rbx
leaq 0xdef6(%rip), %rsi      # 0x3337d
movq %rax, %rdi
callq 0xb270
jmp 0x254ad
movl $0x10, %edi
callq 0xb300
movq %rax, %rbx
leaq 0xdea7(%rip), %rsi      # 0x3334c
movq %rax, %rdi
callq 0xb270
movq 0x21b34(%rip), %rsi     # 0x46fe8
movq 0x21a8d(%rip), %rdx     # 0x46f48
movq %rbx, %rdi
callq 0xbb60
movl $0x10, %edi
callq 0xb300
movq %rax, %rbx
leaq 0xde0e(%rip), %rsi      # 0x332e5
movq %rax, %rdi
callq 0xb270
movq 0x21b02(%rip), %rsi     # 0x46fe8
movq 0x21a5b(%rip), %rdx     # 0x46f48
movq %rbx, %rdi
callq 0xbb60
jmp 0x25607
testl %eax, %eax
jne 0x2551c
movl $0x10, %edi
callq 0xb300
movq %rax, %rbx
leaq 0xdd6e(%rip), %rsi      # 0x33280
movq %rax, %rdi
callq 0xb270
jmp 0x25538
movl $0x10, %edi
callq 0xb300
movq %rax, %rbx
leaq 0xdd50(%rip), %rsi      # 0x33280
movq %rax, %rdi
callq 0xb270
movq 0x21aa9(%rip), %rsi     # 0x46fe8
movq 0x21a02(%rip), %rdx     # 0x46f48
movq %rbx, %rdi
callq 0xbb60
movl $0x10, %edi
callq 0xb300
movq %rax, %rbx
leaq 0xdcf9(%rip), %rsi      # 0x3325b
movq %rax, %rdi
callq 0xbcd0
movq 0x21a47(%rip), %rsi     # 0x46fb8
movq 0x21a18(%rip), %rdx     # 0x46f90
movq %rbx, %rdi
callq 0xbb60
movq 0x40(%rsp), %rbx
movq 0x48(%rsp), %r14
leaq 0xd97a(%rip), %rsi      # 0x32f0b
leaq 0xa8(%rsp), %rdi
callq 0xbc90
leaq 0x1fd3b(%rip), %rax     # 0x452e0
leaq 0xd8(%rsp), %rcx
movq %rax, -0x30(%rcx)
movq %rbx, -0x20(%rcx)
movq %r14, -0x18(%rcx)
movq %rcx, -0x10(%rcx)
movq $0x0, -0x8(%rcx)
movb $0x0, (%rcx)
leaq 0xa8(%rsp), %rdi
callq 0xe1b4
movl $0x10, %edi
callq 0xb300
movq %rax, %rbx
leaq 0xdcc8(%rip), %rsi      # 0x332b1
movq %rax, %rdi
callq 0xb270
movq 0x219f0(%rip), %rsi     # 0x46fe8
movq 0x21949(%rip), %rdx     # 0x46f48
movq %rbx, %rdi
callq 0xbb60
leaq 0xca4f(%rip), %rdi      # 0x3205d
callq 0xb3e0
leaq 0xca43(%rip), %rdi      # 0x3205d
callq 0xb9a0
movq %rax, %r14
jmp 0x25875
jmp 0x257e4
jmp 0x257b9
movq %rax, %r14
movq %rbx, %rdi
callq 0xb4b0
jmp 0x258ad
movq %rax, %r14
leaq 0xa8(%rsp), %rdi
callq 0xde38
jmp 0x256d9
jmp 0x256af
movq %rax, %r14
movq %rbx, %rdi
callq 0xb4b0
jmp 0x25912
jmp 0x257f3
jmp 0x257e4
jmp 0x257e4
jmp 0x257e4
jmp 0x257e4
movq %rax, %r14
jmp 0x258a3
jmp 0x257b9
jmp 0x257b9
jmp 0x257b9
movq %rax, %r14
jmp 0x258ca
jmp 0x2581b
jmp 0x2581b
jmp 0x25730
movq %rax, %r14
movq %rbx, %rdi
callq 0xb4b0
jmp 0x25905
jmp 0x25730
movq %rax, %r14
cmpl $0x0, (%r15)
jne 0x25875
movl %ebp, (%r15)
jmp 0x25875
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x258e4
movq 0x18(%rsp), %rsi
incq %rsi
jmp 0x258df
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
jne 0x2571f
jmp 0x25896
jmp 0x2570e
jmp 0x2570e
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x25896
movq 0x18(%rsp), %rsi
jmp 0x25851
jmp 0x2581b
jmp 0x25730
movq %rax, %r14
jmp 0x25905
jmp 0x257c1
movq %rax, %r14
movq %rbx, %rdi
callq 0xb4b0
jmp 0x257c4
movq %rax, %r14
movq 0xb8(%rsp), %rdi
testq %rdi, %rdi
je 0x258e4
movq 0xc8(%rsp), %rsi
jmp 0x258dc
jmp 0x25856
movq %rax, %r14
movl $0x40, %esi
movq %rbx, %rdi
callq 0xb600
jmp 0x25859
movq %rax, %r14
movq 0x30(%rsp), %rsi
testq %rsi, %rsi
je 0x2579c
leaq 0x30(%rsp), %rdi
callq 0x103c6
movq $0x0, 0x30(%rsp)
jmp 0x25859
jmp 0x257ac
movq %rax, %r14
movq %rbx, %rdi
callq 0xb4b0
jmp 0x25802
movq %rax, %r14
jmp 0x258ad
movq %rax, %r14
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x258ad
movq 0x28(%rsp), %rsi
subq %rdi, %rsi
callq 0xb600
jmp 0x258ad
movq %rax, %r14
jmp 0x25896
jmp 0x257ee
movq %rax, %r14
jmp 0x25842
movq %rax, %r14
jmp 0x2587f
jmp 0x257ff
jmp 0x257ff
movq %rax, %r14
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x2587f
movq 0x28(%rsp), %rsi
subq %rdi, %rsi
callq 0xb600
jmp 0x2587f
movq %rax, %r14
jmp 0x258e4
movq %rax, %r14
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x25842
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb600
movq 0x40(%rsp), %rdi
cmpq %rbp, %rdi
je 0x25896
movq 0x50(%rsp), %rsi
incq %rsi
jmp 0x25891
movq %rax, %r14
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x25875
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb600
movq 0x38(%rsp), %rdi
callq 0xdbb6
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x25896
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0xb600
leaq 0x90(%rsp), %rdi
callq 0x19a48
leaq 0x68(%rsp), %rdi
callq 0x294dc
movq 0xb8(%rsp), %rdi
testq %rdi, %rdi
je 0x258ca
movq 0xc8(%rsp), %rsi
subq %rdi, %rsi
callq 0xb600
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x258e4
movq 0x80(%rsp), %rsi
subq %rdi, %rsi
callq 0xb600
movq 0x21675(%rip), %rsi     # 0x46f60
leaq 0x180(%rsp), %rdi
callq 0xb380
leaq 0x1f0(%rsp), %rdi
callq 0xb1f0
leaq 0x120(%rsp), %rdi
callq 0x2255a
movq %r14, %rdi
callq 0xbbb0