// File: /workspace/github_cpp_makefile_star2_O2/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 $0x2e8, %rsp            # imm = 0x2E8
movq %rdi, 0x28(%rsp)
cmpl $0x1, %r8d
jne 0x218c2
movq %r9, %r13
movl %ecx, %ebp
movq %rdx, %rbx
movzbl 0x2561d(%rip), %esi     # 0x46758
leaq 0x110(%rsp), %r14
pushq $0x1
popq %rdx
movq %r14, %rdi
callq 0x25d34
movq %r14, %rdi
movq %r13, %rsi
callq 0x25ef0
movzwl %bp, %edx
leaq 0x110(%rsp), %rdi
movq %rbx, %rsi
callq 0x25efa
leaq 0x110(%rsp), %rdi
callq 0x25fce
movq %rax, %r14
leaq 0xe0(%rsp), %rsi
andq $0x0, (%rsi)
leaq 0x3c(%rsp), %rdx
andl $0x0, (%rdx)
movq 0x50(%rax), %rdi
callq 0xb3d0
movl 0x3c(%rsp), %edi
testq %rdi, %rdi
je 0x218f2
movq 0xe0(%rsp), %rsi
leaq 0xd2da(%rip), %rcx      # 0x2e48f
pushq $0x2
popq %rdx
callq 0x21b23
testb %al, %al
jne 0x2190e
leaq 0x170(%rsp), %rdi
callq 0xb8f0
leaq 0xc0bf(%rip), %rsi      # 0x2d298
leaq 0x170(%rsp), %rdi
callq 0xb5e0
leaq 0x178(%rsp), %rsi
leaq 0x40(%rsp), %rdi
callq 0xbaa0
movups 0x40(%rsp), %xmm0
movq %rsp, %rsi
movups %xmm0, (%rsi)
movq %r14, %rdi
xorl %edx, %edx
callq 0x21b2d
leaq 0x40(%rsp), %rdi
callq 0xb2f0
movq %r14, %rdi
callq 0x21b72
xorl %r12d, %r12d
leaq 0x40(%rsp), %rbp
xorl %ebx, %ebx
movl %ebx, %eax
andb %r12b, %al
testb $0x1, %al
jne 0x2126f
movq %rbp, %rdi
movq %r14, %rsi
callq 0x21bab
cmpb $0x4, 0x43(%rsp)
jne 0x2125d
movb $0x1, %r15b
testb $0x1, 0x44(%rsp)
jne 0x21260
movb $0x1, %bl
movq %r14, %rdi
callq 0x21d07
movl %r12d, %r15d
jmp 0x21260
movl %r12d, %r15d
leaq 0x50(%rsp), %rdi
callq 0xf41c
movl %r15d, %r12d
jmp 0x21229
pushq $0x1
popq %rsi
movl $0x4000, %r9d           # imm = 0x4000
movq %r14, %rdi
movq %r13, %rdx
movq 0x320(%rsp), %rcx
movq 0x328(%rsp), %r8
callq 0x21d5c
xorps %xmm0, %xmm0
movaps %xmm0, 0x80(%rsp)
andq $0x0, 0x90(%rsp)
leaq 0x40(%rsp), %rdi
movq %r14, %rsi
callq 0x21bab
cmpb $0x1, 0x43(%rsp)
jne 0x2193e
movzbl 0x44(%rsp), %ecx
movq 0x50(%rsp), %rdx
testb $0x8, %cl
jne 0x212d4
xorl %eax, %eax
xorl %esi, %esi
jmp 0x212da
movzbl (%rdx), %eax
pushq $0x1
popq %rsi
leaq 0x5(%rsi), %r8
testb $0x20, %cl
cmoveq %rsi, %r8
leaq 0x80(%rsp), %rdi
movq 0x8(%rdi), %rsi
addq %r8, %rdx
movq 0x58(%rsp), %rcx
subq %rax, %rcx
callq 0x220a4
testb $0x4, 0x44(%rsp)
jne 0x2135b
leaq 0x10(%rsp), %rbx
movq %rsp, %r15
leaq 0x80(%rsp), %r12
movq %r15, %rdi
movq %r14, %rsi
callq 0x21bab
cmpb $0x9, 0x3(%rsp)
jne 0x2188d
movq 0x88(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq 0x18(%rsp), %rcx
movq %r12, %rdi
callq 0x220a4
movb 0x4(%rsp), %bpl
movq %rbx, %rdi
callq 0xf41c
testb $0x4, %bpl
je 0x21318
movq 0x80(%rsp), %rsi
movq 0x88(%rsp), %rdx
subq %rsi, %rdx
leaq 0xf8(%rsp), %rdi
callq 0x247dc
leaq 0x30(%rsp), %rdi
callq 0x247d0
leaq 0x68(%rsp), %rdi
leaq 0xf8(%rsp), %rsi
leaq 0x30(%rsp), %rdx
callq 0x247e4
leaq 0xbf7b(%rip), %rsi      # 0x2d31e
movq %rsp, %rdi
leaq 0xa0(%rsp), %rdx
callq 0xd416
movq %rsp, %rdi
callq 0x1e6a7
movq %rsp, %rdi
callq 0xb2f0
movq 0x30(%rsp), %rdi
callq 0x220c4
leaq 0xbedc(%rip), %rsi      # 0x2d2b0
movq %rsp, %rdi
leaq 0xa0(%rsp), %rdx
callq 0xd416
movq %rsp, %rdi
callq 0x1e6a7
movq %rsp, %rdi
callq 0xb2f0
leaq 0xbf37(%rip), %rsi      # 0x2d332
movq %rsp, %rdi
leaq 0xa0(%rsp), %rdx
callq 0xd416
movq %rsp, %rdi
callq 0x1e6a7
movq %rsp, %rbx
movq %rbx, %rdi
callq 0xb2f0
movq 0x68(%rsp), %r15
movq 0x70(%rsp), %rbp
leaq 0xc363(%rip), %r12      # 0x2d792
leaq 0xa0(%rsp), %r13
cmpq %rbp, %r15
je 0x2147a
movq %r13, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x220f1
addq $0x20, %r15
movq %rbx, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x220d2
movq %rbx, %rdi
callq 0x1e6a7
movq %rbx, %rdi
callq 0xb2f0
movq %r13, %rdi
callq 0xb2f0
addq $0x20, %r15
jmp 0x21437
leaq 0xbe2f(%rip), %rsi      # 0x2d2b0
movq %rsp, %rdi
leaq 0xa0(%rsp), %rdx
callq 0xd416
movq %rsp, %rdi
callq 0x1e6a7
movq %rsp, %rbx
movq %rbx, %rdi
callq 0xb2f0
leaq 0xa0(%rsp), %r12
andq $0x0, 0x10(%r12)
xorps %xmm0, %xmm0
movaps %xmm0, (%r12)
leaq 0x10(%rsp), %r15
pushq $0x1
popq %rbp
movq %rbx, %rdi
movq %r14, %rsi
callq 0x21bab
cmpb $0x0, 0x3(%rsp)
jne 0x2185d
testb $0x8, 0x4(%rsp)
jne 0x21841
movq 0xa8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq 0x18(%rsp), %rcx
movq %r12, %rdi
callq 0x220a4
testb $0x1, 0x4(%rsp)
jne 0x2154b
movzbl 0x2(%rsp), %eax
shll $0x10, %eax
movzwl (%rsp), %edx
orl %eax, %edx
bswapl %edx
shrl $0x8, %edx
movq %r14, %rdi
movl %ebp, %esi
callq 0x22129
movzbl 0x2(%rsp), %eax
shll $0x10, %eax
movzwl (%rsp), %edx
orl %eax, %edx
bswapl %edx
shrl $0x8, %edx
movq %r14, %rdi
xorl %esi, %esi
callq 0x22129
movq %r15, %rdi
callq 0xf41c
jmp 0x214c2
movq %r15, %rdi
callq 0xf41c
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x221e8
movq 0x28(%rsp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0xd0(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rax)
movups %xmm0, 0x18(%rax)
movups %xmm0, 0x8(%rax)
movq 0x68(%rsp), %rbx
movq 0x70(%rsp), %r15
movq %r15, %r14
subq %rbx, %r14
movq %r14, %rbp
sarq $0x8, %rbp
leaq 0xbe16(%rip), %r12      # 0x2d3b2
testq %rbp, %rbp
jle 0x2160e
movq %rbx, %rdi
movq %r12, %rsi
callq 0xd486
testb %al, %al
jne 0x2164e
leaq 0x40(%rbx), %r13
movq %r13, %rdi
movq %r12, %rsi
callq 0xd486
testb %al, %al
jne 0x2166f
leaq 0x80(%rbx), %r13
movq %r13, %rdi
movq %r12, %rsi
callq 0xd486
testb %al, %al
jne 0x2166f
leaq 0xc0(%rbx), %r13
movq %r13, %rdi
movq %r12, %rsi
callq 0xd486
testb %al, %al
jne 0x2166f
addq $0x100, %rbx            # imm = 0x100
decq %rbp
addq $-0x100, %r14
jmp 0x2159c
sarq $0x6, %r14
cmpq $0x1, %r14
je 0x21657
cmpq $0x2, %r14
je 0x2163b
cmpq $0x3, %r14
jne 0x2166c
leaq 0xbd87(%rip), %rsi      # 0x2d3b2
movq %rbx, %rdi
callq 0xd486
testb %al, %al
jne 0x2164e
addq $0x40, %rbx
leaq 0xbd70(%rip), %rsi      # 0x2d3b2
movq %rbx, %rdi
callq 0xd486
testb %al, %al
je 0x21653
movq %rbx, %r13
jmp 0x2166f
addq $0x40, %rbx
leaq 0xbd54(%rip), %rsi      # 0x2d3b2
movq %rbx, %rdi
callq 0xd486
testb %al, %al
cmovneq %rbx, %r15
movq %r15, %r13
cmpq 0x70(%rsp), %r13
je 0x21690
addq $0x20, %r13
pushq $0xa
popq %rdx
movq %r13, %rdi
xorl %esi, %esi
callq 0x12364
movq 0x28(%rsp), %rcx
movl %eax, (%rcx)
jmp 0x216b1
leaq 0xbd02(%rip), %rsi      # 0x2d399
leaq 0xe8(%rsp), %rdi
callq 0xb270
leaq 0xe8(%rsp), %rdi
callq 0xbdc8
movq 0x68(%rsp), %r12
movq 0x70(%rsp), %r14
leaq 0xbcf0(%rip), %rbx      # 0x2d3b2
movq %rsp, %rbp
leaq 0xd8(%rsp), %r15
movq %r14, 0xc8(%rsp)
cmpq %r14, %r12
je 0x217b2
movq %r12, %rdi
movq %rbx, %rsi
callq 0xd486
testb %al, %al
jne 0x217a9
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
andq $0x0, 0x8(%rsp)
movb $0x0, 0x10(%rsp)
movq (%r12), %rax
xorl %r14d, %r14d
cmpb $0x3a, (%rax)
sete %r14b
movb $0x1, %r13b
cmpq 0x8(%r12), %r14
jae 0x2176a
movq (%r12), %rax
movb (%rax,%r14), %bl
movsbl %bl, %edi
leal -0x61(%rbx), %eax
cmpb $0x1a, %al
setb %al
andb %r13b, %al
cmpb $0x1, %al
jne 0x2174c
callq 0xbc40
movsbl %al, %esi
movq %rbp, %rdi
callq 0xb550
xorl %r13d, %r13d
jmp 0x2175c
callq 0xb9d0
movsbl %al, %esi
movq %rbp, %rdi
callq 0xb550
cmpb $0x2d, %bl
sete %al
orb %al, %r13b
incq %r14
jmp 0x21716
leaq 0x20(%r12), %rdx
movq %r15, %rdi
movq %rbp, %rsi
callq 0x22266
movq 0xd0(%rsp), %rdi
movq %r15, %rsi
callq 0x20b7a
leaq 0xbc21(%rip), %rbx      # 0x2d3b2
movq 0xc8(%rsp), %r14
movq %r15, %rdi
callq 0xd46c
movq %rbp, %rdi
callq 0xb2f0
addq $0x40, %r12
jmp 0x216d5
leaq 0x50(%rsp), %rbx
movq 0x28(%rsp), %r14
movq 0x30(%r14), %rax
leaq 0xa0(%rsp), %rdi
movaps (%rdi), %xmm0
movq 0x10(%rdi), %rcx
movq %rcx, 0x30(%r14)
movups 0x20(%r14), %xmm1
movups %xmm0, 0x20(%r14)
movaps %xmm1, (%rdi)
movq %rax, 0x10(%rdi)
callq 0xf41c
leaq 0x68(%rsp), %rdi
callq 0x178fa
leaq 0x30(%rsp), %rdi
callq 0x247d6
movq %rbx, %rdi
callq 0xf41c
leaq 0x80(%rsp), %rdi
callq 0xf41c
leaq 0x170(%rsp), %rdi
callq 0xb120
leaq 0x110(%rsp), %rdi
callq 0x1ef62
movq %r14, %rax
addq $0x2e8, %rsp            # imm = 0x2E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0xb330
movq %rax, %rbx
leaq 0xbb2a(%rip), %rsi      # 0x2d37d
movq %rax, %rdi
callq 0xb270
jmp 0x21877
pushq $0x10
popq %rdi
callq 0xb330
movq %rax, %rbx
leaq 0xbadd(%rip), %rsi      # 0x2d34c
movq %rax, %rdi
callq 0xb270
movq 0x2476a(%rip), %rsi     # 0x45fe8
movq 0x246c3(%rip), %rdx     # 0x45f48
movq %rbx, %rdi
callq 0xbb50
pushq $0x10
popq %rdi
callq 0xb330
movq %rax, %r15
leaq 0xba46(%rip), %rsi      # 0x2d2e5
movq %rax, %rdi
callq 0xb270
movq 0x2473a(%rip), %rsi     # 0x45fe8
movq 0x24693(%rip), %rdx     # 0x45f48
movq %r15, %rdi
callq 0xbb50
jmp 0x2196e
pushq $0x10
popq %rdi
callq 0xb330
movq %rax, %rbx
leaq 0xb987(%rip), %rsi      # 0x2d25b
movq %rax, %rdi
callq 0xbcc0
movq 0x246d5(%rip), %rsi     # 0x45fb8
movq 0x246a6(%rip), %rdx     # 0x45f90
movq %rbx, %rdi
callq 0xbb50
pushq $0x10
popq %rdi
callq 0xb330
movq %rax, %rbx
leaq 0xb97c(%rip), %rsi      # 0x2d280
movq %rax, %rdi
callq 0xb270
jmp 0x21928
pushq $0x10
popq %rdi
callq 0xb330
movq %rax, %rbx
leaq 0xb960(%rip), %rsi      # 0x2d280
movq %rax, %rdi
callq 0xb270
movq 0x246b9(%rip), %rsi     # 0x45fe8
movq 0x24612(%rip), %rdx     # 0x45f48
movq %rbx, %rdi
callq 0xbb50
pushq $0x10
popq %rdi
callq 0xb330
movq %rax, %rbx
leaq 0xb961(%rip), %rsi      # 0x2d2b1
movq %rax, %rdi
callq 0xb270
movq 0x24689(%rip), %rsi     # 0x45fe8
movq 0x245e2(%rip), %rdx     # 0x45f48
movq %rbx, %rdi
callq 0xbb50
jmp 0x21a60
movq %rax, %r14
movq %rbx, %rdi
callq 0xb4d0
jmp 0x21aea
jmp 0x21985
movq %rax, %r14
movq %rbx, %rdi
callq 0xb4d0
jmp 0x21b0e
movq %rax, %r14
movq %rbx, %rdi
callq 0xb4d0
jmp 0x21b1b
movq %rax, %r14
jmp 0x21abf
jmp 0x21a9e
jmp 0x219cc
jmp 0x21a75
jmp 0x219cc
jmp 0x21a75
jmp 0x219cc
jmp 0x21a75
jmp 0x21a75
movq %rax, %r14
movq %rsp, %rdi
jmp 0x21a92
jmp 0x21a75
movq %rax, %r14
jmp 0x21ae0
jmp 0x21a60
jmp 0x21a60
jmp 0x21a60
movq %rax, %r14
jmp 0x21af4
jmp 0x21a99
movq %rax, %r14
leaq 0x40(%rsp), %rdi
callq 0xb2f0
jmp 0x21b01
jmp 0x21a99
jmp 0x21a19
jmp 0x21a19
jmp 0x21a99
jmp 0x21a19
movq %rax, %r14
jmp 0x21b0e
movq %rax, %r14
leaq 0x50(%rsp), %rdi
jmp 0x21afc
jmp 0x21a68
movq %rax, %r14
movq %r15, %rdi
callq 0xb4d0
jmp 0x21a6b
movq %rax, %r14
leaq 0xd8(%rsp), %rdi
callq 0xd46c
jmp 0x21ab7
jmp 0x21ab4
jmp 0x21a53
movq %rax, %r14
movq %rbx, %rdi
callq 0xb4d0
jmp 0x21aaa
movq %rax, %r14
jmp 0x21aea
movq %rax, %r14
movq %rbx, %rdi
callq 0xf41c
jmp 0x21aea
movq %rax, %r14
jmp 0x21ad6
movq %rax, %r14
jmp 0x21a8a
movq %rax, %r14
movq %rsp, %rdi
callq 0xb2f0
leaq 0xa0(%rsp), %rdi
callq 0xb2f0
jmp 0x21ad6
movq %rax, %r14
jmp 0x21b01
movq %rax, %r14
jmp 0x21ac9
jmp 0x21aa7
jmp 0x21aa7
movq %rax, %r14
movq %r15, %rdi
callq 0xf41c
jmp 0x21ac9
movq %rax, %r14
movq %rsp, %rdi
callq 0xb2f0
movq 0x28(%rsp), %rdi
callq 0xd544
leaq 0xa0(%rsp), %rdi
callq 0xf41c
leaq 0x68(%rsp), %rdi
callq 0x178fa
leaq 0x30(%rsp), %rdi
callq 0x247d6
leaq 0x50(%rsp), %rdi
callq 0xf41c
leaq 0x80(%rsp), %rdi
callq 0xf41c
leaq 0x170(%rsp), %rdi
callq 0xb120
leaq 0x110(%rsp), %rdi
callq 0x1ef62
movq %r14, %rdi
callq 0xbba0