LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/hantaoyin[P]ffxiv-crafting-mcts/ffxiv-crafting-mcts.C
// Function: State::ExecuteAction(Action)
bool ExecuteAction(Action ac) {
    const short percentage = SuccessPercentage(ac);
    const bool is_action_successful = percentage >= 100 ? true : random_real() * 100 < percentage;
    Condition next_condition = RandomlyGenNextCondition(condition);
    return DeterministicExecuteAction(ac, is_action_successful, next_condition);
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movzbl %sil, %ebp
andb $-0x2, %sil
cmpb $0x6, %sil
jne 0x60d7
movw $0x64, %r14w
cmpb $0x0, 0x11(%rbx)
jne 0x60e9
movl %ebp, %eax
shll $0x4, %eax
leaq 0x59d5(%rip), %rcx      # 0xbab8
movzwl 0xa(%rax,%rcx), %r14d
movb $0x1, %r15b
cmpw $0x63, %r14w
jg 0x6136
leaq 0x7416(%rip), %rdi      # 0xd510
callq 0x3219
movsd 0x7419(%rip), %xmm1     # 0xd520
movsd 0x7409(%rip), %xmm2     # 0xd518
subsd %xmm2, %xmm1
mulsd %xmm0, %xmm1
addsd %xmm2, %xmm1
mulsd 0x1f7d(%rip), %xmm1     # 0x80a0
movswl %r14w, %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
ucomisd %xmm1, %xmm0
seta %r15b
movzbl 0x9(%rbx), %edi
callq 0x24fc
movzbl %r15b, %edx
movzbl %al, %ecx
movq %rbx, %rdi
movl %ebp, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x686e
// File: /workspace/github_cpp_makefile_star2_O1/hantaoyin[P]ffxiv-crafting-mcts/ffxiv-crafting-mcts.C
// Function: UCT::set_target_probability(State const&, double, std::array<double, 29ul>&)
void set_target_probability(const State& s, double inv_temp,
                              std::array<double, TotalActionCount>& p) {
    ASSERT(!s.done()) << s.DebugString();
    ASSERT(all_states.find(s) != all_states.end()) << s.DebugString();
    StateStatistics& stat = all_states.at(s);
    ASSERT(stat.total_count > 0) << s.DebugString() << " " << stat.DebugString();
    double sum = 0.;
    for (size_t ac_id = 0; ac_id < TotalActionCount; ++ac_id) {
      Action ac = static_cast<Action>(ac_id);
      if (stat.valid(ac) && stat.count(ac) > 0) {
        p[ac_id] = std::pow((double)stat.count(ac), inv_temp);
      } else {
        p[ac_id] = 0.1;
      }
      sum += p[ac_id];
    }
    ASSERT(sum >= 1) << s.DebugString() << " " << stat.DebugString();
    sum = 1. / sum;
    for (size_t ac_id = 0; ac_id < TotalActionCount; ++ac_id) {
      p[ac_id] *= sum;
    }
  }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movsd %xmm0, 0x8(%rsp)
addq $0x138, %rdi            # imm = 0x138
callq 0x6834
testq %rax, %rax
je 0x6241
movq %rax, %r14
movq %rax, %r15
addq $0x28, %r15
xorpd %xmm1, %xmm1
xorl %r12d, %r12d
movsd 0x1f0c(%rip), %xmm2     # 0x80a8
movq 0x2e0(%r14), %rax
btq %r12, %rax
movapd %xmm2, %xmm0
jae 0x61f9
movq (%r15), %rax
movapd %xmm2, %xmm0
testq %rax, %rax
je 0x61f9
movsd %xmm1, 0x10(%rsp)
movq %rax, %xmm1
punpckldq 0x1f24(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x1f2c(%rip), %xmm1     # 0x8100
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
movsd 0x8(%rsp), %xmm1
callq 0x2280
movsd 0x1eb5(%rip), %xmm2     # 0x80a8
movsd 0x10(%rsp), %xmm1
movsd %xmm0, (%rbx,%r12,8)
addsd %xmm0, %xmm1
incq %r12
addq $0x18, %r15
cmpq $0x1d, %r12
jne 0x619c
movsd 0x1e20(%rip), %xmm0     # 0x8038
divsd %xmm1, %xmm0
xorl %eax, %eax
movsd (%rbx,%rax,8), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, (%rbx,%rax,8)
incq %rax
cmpq $0x1d, %rax
jne 0x621e
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x238b(%rip), %rdi      # 0x85d3
callq 0x21e0
nop
// File: /workspace/github_cpp_makefile_star2_O1/hantaoyin[P]ffxiv-crafting-mcts/ffxiv-crafting-mcts.C
// Function: State::DeterministicExecuteAction(Action, bool, Condition)
bool DeterministicExecuteAction(Action ac, bool is_action_successful, Condition next_condition) {
    Check();
    ASSERT(!done()) << DebugString();
    ASSERT(SuccessPercentage(ac) < 100 || is_action_successful)
      << "Action can not fail: " << ALL_ACTIONS[Action2ID(ac)].name;
    ASSERT(CheckConditionTransition(next_condition))
      << "Impossible condition transition: " << DebugString() << " " << static_cast<unsigned>(next_condition);
    if (CanExecuteAction(ac)) {
      // Apply any effect in cp, durability, progress, quality, and inner quiet stack.  Change in cp
      // and durability is always carried out, while others only when the action is successful.
      ApplyCPDurabilityChange(ac);
      if (is_action_successful) {
        ApplyProgressChange(ac);
        ApplyQualityChange(ac);
      }
      ApplyInnerQuietChange(ac, is_action_successful);
      ApplyPersistentBuffEffect(ac);
      if (is_action_successful) {
        ApplyBuffChange(ac);
      }
      condition = next_condition;
      return true;
    } else {
      return false;
    }
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebx
movl %edx, %r13d
movl %esi, %r15d
movq %rdi, %r14
callq 0x4a92
movl %eax, %ebp
testb %al, %al
je 0x698f
movzbl %r15b, %r12d
movq %r14, %rdi
movl %r12d, %esi
callq 0x69a0
testb %r13b, %r13b
je 0x691b
movq %r14, %rdi
movl %r12d, %esi
callq 0x6a00
movq %r14, %rdi
movl %r12d, %esi
callq 0x6a66
movzbl %r13b, %edx
movq %r14, %rdi
movl %r12d, %esi
callq 0x6ba2
cmpb $0xe, %r15b
je 0x68f2
cmpb $0x0, 0xd(%r14)
je 0x68f2
movzwl 0x6(%r14), %eax
addl $0x5, %eax
cmpw $0x46, %ax
movl $0x46, %ecx
cmovll %eax, %ecx
movw %cx, 0x6(%r14)
movl $0xa, %eax
movb (%r14,%rax), %cl
testb %cl, %cl
je 0x6905
decb %cl
movb %cl, (%r14,%rax)
incq %rax
cmpq $0x13, %rax
jne 0x68f7
movq %r14, %rdi
movl %r12d, %esi
callq 0x6c0e
jmp 0x698b
movzbl 0x8(%r14), %eax
testw %ax, %ax
je 0x6934
cmpb $0x12, %r15b
jne 0x694a
movzwl %ax, %eax
incl %eax
shrl %eax
jmp 0x6946
cmpb $0xb, %r15b
je 0x6944
cmpl $0x17, %r12d
jne 0x694a
movb $0x3, %al
jmp 0x6946
movb $0x1, %al
movb %al, 0x8(%r14)
cmpb $0xe, %r15b
je 0x6970
cmpb $0x0, 0xd(%r14)
je 0x6970
movzwl 0x6(%r14), %eax
addl $0x5, %eax
cmpw $0x46, %ax
movl $0x46, %ecx
cmovll %eax, %ecx
movw %cx, 0x6(%r14)
xorl %eax, %eax
movb 0xa(%r14,%rax), %cl
testb %cl, %cl
je 0x6982
decb %cl
movb %cl, 0xa(%r14,%rax)
incq %rax
cmpq $0x9, %rax
jne 0x6972
movb %bl, 0x9(%r14)
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/hantaoyin[P]ffxiv-crafting-mcts/ffxiv-crafting-mcts.C
// Function: State::ApplyInnerQuietChange(Action, bool)
void ApplyInnerQuietChange(Action ac, bool is_action_successful) {
    if (inner_quiet > 0) {
      if (is_action_successful) {
        switch (ac) {
        case Action::BasicTouch:
        case Action::DelicateSynthesis:
        case Action::FocusedTouch:
        case Action::HastyTouch:
        case Action::PrudentTouch:
        case Action::StandardTouch:
          inner_quiet += 1;
          break;
        case Action::PreparatoryTouch:
        case Action::PreciseTouch:
          inner_quiet += 2;
          break;
        case Action::ByregotsBlessing:
          inner_quiet = 0;
          break;
        case Action::PatientTouch:
          inner_quiet *= 2;
          break;
        case Action::InnerQuiet:
          ASSERT(false) << DebugString();
          break;
        default:
          break;
        }
        if (inner_quiet > 11) {
          inner_quiet = 11;
        }
      } else if (ac == Action::PatientTouch) {
        inner_quiet = (inner_quiet + 1) / 2;
      }
    } else if (ac == Action::InnerQuiet) {
      inner_quiet = 1;
    } else if (ac == Action::Reflect) {
      inner_quiet = 3;
    }
  }

// Assembly:
movzbl 0x8(%rdi), %eax
testw %ax, %ax
je 0x6bce
testb %dl, %dl
je 0x6be1
movzbl %sil, %ecx
decl %ecx
cmpl $0x18, %ecx
ja 0x6c01
leaq 0x162b(%rip), %rdx      # 0x81ec
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
incb %al
jmp 0x6bfe
cmpb $0xb, %sil
je 0x6bf0
movzbl %sil, %eax
cmpl $0x17, %eax
jne 0x6c0c
movb $0x3, %al
jmp 0x6c09
cmpb $0x12, %sil
jne 0x6c0c
movzwl %ax, %eax
incl %eax
shrl %eax
jmp 0x6c09
movb $0x1, %al
jmp 0x6c09
addb $0x2, %al
jmp 0x6bfe
xorl %eax, %eax
jmp 0x6bfe
addb %al, %al
movb %al, 0x8(%rdi)
movb $0xb, %al
cmpb $0xb, 0x8(%rdi)
jbe 0x6c0c
movb %al, 0x8(%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/ef-gy[P]libefgy/src/test-case/matrix.cpp
// Function: testConstruction(std::ostream&)
bool testConstruction(std::ostream &log) {
  matrix<int, 3, 4> m;
  for (int i = 0; i < 3; i++) {
    for (int k = 0; k < 4; k++) {
      m[i][k] = i * k;
    }
  }

  matrix<int, 3, 4> m2(m);

  bool allCorrect = true;
  for (int i = 0; i < 3; i++) {
    for (int k = 0; k < 4; k++) {
      allCorrect &= (m2[i][k] == (i * k));
    }
  }

  if (!allCorrect) {
    log << "Actual and expected value in result of copy constructor are "
           "different";
    return false;
  }
  return true;
}

// Assembly:
pushq %rbx
subq $0x30, %rsp
movq %rsp, %rax
xorl %ecx, %ecx
xorl %edx, %edx
xorl %esi, %esi
movl %edx, (%rax,%rsi,4)
incq %rsi
addl %ecx, %edx
cmpq $0x4, %rsi
jne 0x4d4c
incq %rcx
addq $0x10, %rax
cmpq $0x3, %rcx
jne 0x4d48
movb $0x1, %bl
movq %rsp, %rax
xorl %ecx, %ecx
xorl %edx, %edx
xorl %esi, %esi
movl (%rax,%rsi,4), %r8d
cmpq %r8, %rdx
sete %r8b
andb %r8b, %bl
incq %rsi
addq %rcx, %rdx
cmpq $0x4, %rsi
jne 0x4d72
incq %rcx
addq $0x10, %rax
cmpq $0x3, %rcx
jne 0x4d6e
testb %bl, %bl
jne 0x4dae
leaq 0xf376(%rip), %rsi      # 0x1411a
movl $0x45, %edx
callq 0x42d0
movl %ebx, %eax
addq $0x30, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/ef-gy[P]libefgy/src/test-case/matrix.cpp
// Function: testAssignment(std::ostream&)
bool testAssignment(std::ostream &log) {
  matrix<int, 3, 4> m;
  for (int i = 0; i < 3; i++) {
    for (int k = 0; k < 4; k++) {
      m[i][k] = i * k;
    }
  }

  matrix<int, 3, 4> m2 = m;

  bool allCorrect = true;
  for (int i = 0; i < 3; i++) {
    for (int k = 0; k < 3; k++) {
      allCorrect &= (m2[i][k] == m[i][k]);
    }
  }

  if (!allCorrect) {
    log << "Values were not copied correctly during assignment.";
    return false;
  }

  return true;
}

// Assembly:
pushq %rbx
subq $0x30, %rsp
movq %rsp, %rax
xorl %ecx, %ecx
xorl %edx, %edx
xorl %esi, %esi
movl %edx, (%rax,%rsi,4)
incq %rsi
addl %ecx, %edx
cmpq $0x4, %rsi
jne 0x4dc4
incq %rcx
addq $0x10, %rax
cmpq $0x3, %rcx
jne 0x4dc0
movb $0x1, %bl
movq %rsp, %rax
xorl %ecx, %ecx
xorl %edx, %edx
incq %rdx
cmpq $0x3, %rdx
jne 0x4de8
incq %rcx
addq $0x10, %rax
cmpq $0x3, %rcx
jne 0x4de6
testb $0x1, %bl
jne 0x4e14
leaq 0xf356(%rip), %rsi      # 0x14160
movl $0x33, %edx
callq 0x42d0
andb $0x1, %bl
movl %ebx, %eax
addq $0x30, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/ef-gy[P]libefgy/src/test-case/matrix.cpp
// Function: testIterator(std::ostream&)
bool testIterator(std::ostream &log) {
  matrix<int, 3, 4> m;
  int j = 0;
  for (int i = 0; i < 3; i++) {
    for (int k = 0; k < 4; k++) {
      m[i][k] = j++;
    }
  }

  auto r = range<int>(0, 3 * 4, false);

  if (!std::equal(m.begin(), m.end(), r.begin())) {
    log << "matrix iterator and range iterator did not produce the same "
           "sequence:\n";
    for (auto i : m) {
      log << "\t" << i;
    }
    log << "\nvs. expected:\n";
    for (auto i : r) {
      log << "\t" << i;
    }
    log << "\n";
    return false;
  }

  return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
xorl %eax, %eax
movq %rsp, %rcx
xorl %edx, %edx
movl %edx, %edx
xorl %esi, %esi
leal (%rdx,%rsi), %edi
movl %edi, (%rcx,%rsi,4)
incq %rsi
cmpq $0x4, %rsi
jne 0x5464
incq %rax
addq $0x10, %rcx
addl %esi, %edx
cmpq $0x3, %rax
jne 0x5460
cmpl $0x0, (%rsp)
jne 0x54b2
movl $0x1, %eax
cmpq $0xc, %rax
sete %bpl
je 0x54b4
movl %eax, %ecx
andl $0x3, %ecx
movq %rax, %rdx
andq $-0x4, %rdx
leaq (%rsp,%rdx,4), %rdx
incq %rax
leal -0x1(%rax), %esi
cmpl (%rdx,%rcx,4), %esi
je 0x548d
xorl %ebp, %ebp
testb %bpl, %bpl
jne 0x556a
leaq 0xee51(%rip), %rsi      # 0x14315
movl $0x46, %edx
movq %rbx, %rdi
callq 0x42d0
xorl %r12d, %r12d
leaq 0xee81(%rip), %r14      # 0x1435c
movl %r12d, %eax
andl $0x3, %eax
movq %r12, %rcx
andq $-0x4, %rcx
leaq (%rsp,%rcx,4), %rcx
movl (%rcx,%rax,4), %r15d
movl $0x1, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x42d0
movq %rbx, %rdi
movl %r15d, %esi
callq 0x43f0
incq %r12
cmpq $0xc, %r12
jne 0x54db
leaq 0xee43(%rip), %rsi      # 0x1435e
movl $0xf, %edx
movq %rbx, %rdi
callq 0x42d0
xorl %r14d, %r14d
leaq 0xee2a(%rip), %r15      # 0x1435c
movl $0x1, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x42d0
movq %rbx, %rdi
movl %r14d, %esi
callq 0x43f0
incq %r14
cmpq $0xc, %r14
jne 0x5532
leaq 0xed4e(%rip), %rsi      # 0x142ab
movl $0x1, %edx
movq %rbx, %rdi
callq 0x42d0
movl %ebp, %eax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Konano[P]Artificial-Intelligence-Input-Method/main.cpp
// Function: main
int main()
{
	ReadData();

	BuildTree();

	#ifdef __DEBUG
	puts("�������ݵ��룡");
	#endif

	ifstream fin("input.txt");
	ofstream fout("output.txt");

	string str; int tot = 0;
	while (getline(fin, str) && str != "")
	{
		printf("Now: %d\n", ++tot);
		fout << Translate(str) << endl;
	}
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x468, %rsp            # imm = 0x468
callq 0x2a71
cmpl $0x0, 0x69bf(%rip)      # 0x91b8
jle 0x280e
xorl %ebx, %ebx
incl %ebx
movl %ebx, %edi
callq 0x4a79
cmpl 0x69ac(%rip), %ebx      # 0x91b8
jl 0x27fd
leaq 0x383b(%rip), %rdi      # 0x6050
callq 0x2270
leaq 0x383e(%rip), %rsi      # 0x605f
leaq 0x260(%rsp), %rbx
movq %rbx, %rdi
movl $0x8, %edx
callq 0x22f0
leaq 0x382c(%rip), %rsi      # 0x6069
leaq 0x60(%rsp), %rdi
movl $0x10, %edx
callq 0x2200
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x50(%rsp), %r15
movl $0x1, %ebp
movq %rsp, %r14
leaq 0x40(%rsp), %r13
movq 0x260(%rsp), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2300
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x2970
movq %r14, %rdi
leaq 0x37c7(%rip), %rsi      # 0x607c
callq 0x2090
testl %eax, %eax
je 0x2970
leaq 0x37ab(%rip), %rdi      # 0x6074
movl %ebp, %esi
xorl %eax, %eax
callq 0x2050
movq %r15, 0x40(%rsp)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
addq %rsi, %rdx
movq %r13, %rdi
callq 0x52ec
leaq 0x20(%rsp), %rdi
movq %r13, %rsi
callq 0x2d8c
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
leaq 0x60(%rsp), %rdi
callq 0x2210
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %r12, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2130
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x2952
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x21d0
movq 0x40(%rsp), %rdi
cmpq %r15, %rdi
je 0x2969
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x21d0
incl %ebp
jmp 0x2872
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x298b
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21d0
movq 0x6646(%rip), %rax      # 0x8fd8
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0x68(%rsp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, 0x60(%rsp,%rcx)
callq 0x2190
leaq 0x158(%rsp), %rdi
callq 0x20b0
leaq 0x260(%rsp), %rdi
callq 0x2070
xorl %eax, %eax
addq $0x468, %rsp            # imm = 0x468
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x2a4a
jmp 0x29ea
movq %rax, %rbx
jmp 0x2a0e
movq %rax, %rbx
jmp 0x2a25
movq %rax, %rbx
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x2a0e
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x21d0
movq 0x40(%rsp), %rdi
cmpq %r15, %rdi
je 0x2a25
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x21d0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x2a40
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21d0
leaq 0x60(%rsp), %rdi
callq 0x2250
leaq 0x260(%rsp), %rdi
callq 0x2070
movq %rbx, %rdi
callq 0x22d0
nop
// File: /workspace/github_cpp_makefile_star2_O1/Konano[P]Artificial-Intelligence-Input-Method/main.cpp
// Function: Insert(int)
inline void Insert(int id)
{
	int now = 0;
	int L = (int)Word_pinyin[id].size();
	for(int i = 0; i < L; i++)
	{
		if (Tree[now].children[Word_pinyin[id][i]] == 0)
			Tree[now].children[Word_pinyin[id][i]] = ++TreeTotal;
		now = Tree[now].children[Word_pinyin[id][i]];
	}
	Tree[now].wd.push_back(id);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movslq %edi, %rax
leaq (%rax,%rax,2), %rax
leaq 0x2dcf1de(%rip), %r14   # 0x2dd3c70
movq 0x8(%r14,%rax,8), %r15
subq (%r14,%rax,8), %r15
movl %edi, 0x4(%rsp)
shrq $0x2, %r15
xorl %eax, %eax
testl %r15d, %r15d
jle 0x4b33
andl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
leaq 0x59ad994(%rip), %r12   # 0x59b2450
xorl %r13d, %r13d
cltq
leaq (%rax,%rax,8), %rax
leaq (%r12,%rax,8), %rbx
movslq 0x4(%rsp), %rax
leaq (%rax,%rax,2), %rax
movq (%r14,%rax,8), %rsi
addq %r13, %rsi
movq %rbx, %rdi
callq 0x4b7a
cmpl $0x0, (%rax)
jne 0x4b0e
movl 0xc0acc64(%rip), %ebp   # 0xc0b1750
incl %ebp
movl %ebp, 0xc0acc5c(%rip)   # 0xc0b1750
movslq 0x4(%rsp), %rax
leaq (%rax,%rax,2), %rax
movq (%r14,%rax,8), %rsi
addq %r13, %rsi
movq %rbx, %rdi
callq 0x4b7a
movl %ebp, (%rax)
movslq 0x4(%rsp), %rax
leaq (%rax,%rax,2), %rax
movq (%r14,%rax,8), %rsi
addq %r13, %rsi
movq %rbx, %rdi
callq 0x4b7a
movl (%rax), %eax
addq $0x4, %r13
decq %r15
jne 0x4abf
cltq
leaq (%rax,%rax,8), %rax
leaq 0x59ad912(%rip), %rcx   # 0x59b2450
leaq (%rcx,%rax,8), %rdi
addq $0x30, %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x4b60
movl 0x4(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rdi)
jmp 0x4b6a
leaq 0x4(%rsp), %rdx
callq 0x4de4
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/kztomita[P]http-dump/main.cc
// Function: usage(char const*)
void usage(const char* message = nullptr) {
  if (message) {
    std::cerr << message << std::endl << std::endl;
  }
  std::cerr << "Usage:" << std::endl;
  std::cerr << "http-client <options> <url>" << std::endl << std::endl;
  std::cerr << "-v:       verbose mode" << std::endl;
  std::cerr << "-h:       show this help" << std::endl;
  std::cerr << "--http2:  use http/2 (https only)" << std::endl;
  std::cerr << "--keylog <filename>:  TLS keylog file" << std::endl;
  std::cerr << "-H:       add header (Ex.-H \"X-Foo: bar\")" << std::endl;
  std::cerr << "-k:       skip certificate verification" << std::endl;

  exit(1);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0xcdd3
movq %rdi, %rbx
callq 0xb2c0
movq 0x3b274(%rip), %r14     # 0x47fe8
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0xb730
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0xb5b0
movsbl %al, %esi
movq %r14, %rdi
callq 0xb050
movq %rax, %rdi
callq 0xb450
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 0x3b20e(%rip), %rbx     # 0x47fe8
leaq 0x2527b(%rip), %rsi     # 0x3205c
movq %rbx, %rdi
callq 0xb5d0
movq %rax, %rdi
callq 0xb2f0
leaq 0x2526b(%rip), %rsi     # 0x32063
movq %rbx, %rdi
callq 0xb5d0
movq %rax, %rdi
callq 0xb2f0
movq %rax, %rdi
callq 0xb2f0
leaq 0x25268(%rip), %rsi     # 0x3207f
movq %rbx, %rdi
callq 0xb5d0
movq %rax, %rdi
callq 0xb2f0
leaq 0x25268(%rip), %rsi     # 0x32096
movq %rbx, %rdi
callq 0xb5d0
movq %rax, %rdi
callq 0xb2f0
leaq 0x2526a(%rip), %rsi     # 0x320af
movq %rbx, %rdi
callq 0xb5d0
movq %rax, %rdi
callq 0xb2f0
leaq 0x25275(%rip), %rsi     # 0x320d1
movq %rbx, %rdi
callq 0xb5d0
movq %rax, %rdi
callq 0xb2f0
leaq 0x25284(%rip), %rsi     # 0x320f7
movq %rbx, %rdi
callq 0xb5d0
movq %rax, %rdi
callq 0xb2f0
leaq 0x25297(%rip), %rsi     # 0x32121
movq %rbx, %rdi
callq 0xb5d0
movq %rax, %rdi
callq 0xb2f0
movl $0x1, %edi
callq 0xb7c0
// File: /workspace/github_cpp_makefile_star2_O1/kztomita[P]http-dump/http_header.cc
// Function: create_http_header_from_header_line(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
http_header_ptr create_http_header_from_header_line(const std::string& line) {
  auto h = create_http_header_from_header_line_or_null(line);
  if (!h) {
    std::ostringstream os;
    os << "invalid format (" << line << ")";
    throw std::invalid_argument(os.str());
  }
  return h;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x198, %rsp            # imm = 0x198
movq %rsi, %r14
movq %rdi, %rbx
callq 0x20f2f
cmpq $0x0, (%rbx)
je 0x2120d
movq %rbx, %rax
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x20(%rsp), %rdi
callq 0xb8c0
leaq 0x12bbb(%rip), %rsi     # 0x33dd9
leaq 0x20(%rsp), %rdi
movl $0x10, %edx
callq 0xb730
movq (%r14), %rsi
movq 0x8(%r14), %rdx
leaq 0x20(%rsp), %rdi
callq 0xb730
leaq 0x10eda(%rip), %rsi     # 0x3211f
movl $0x1, %edx
movq %rax, %rdi
callq 0xb730
movl $0x10, %edi
callq 0xb300
movq %rax, %r15
leaq 0x28(%rsp), %rsi
movq %rsp, %rdi
callq 0xba80
movb $0x1, %bpl
movq %rsp, %rsi
movq %r15, %rdi
callq 0xbb90
xorl %ebp, %ebp
movq 0x26d3d(%rip), %rsi     # 0x47fc0
movq 0x26d0e(%rip), %rdx     # 0x47f98
movq %r15, %rdi
callq 0xbb60
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x212b8
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xb600
jmp 0x212b8
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x212ca
movq %r15, %rdi
callq 0xb4b0
jmp 0x212ca
movq %rax, %r14
movq 0x26c97(%rip), %rsi     # 0x47f68
leaq 0x20(%rsp), %rdi
callq 0xb380
leaq 0x90(%rsp), %rdi
callq 0xb1f0
jmp 0x212ed
movq %rax, %r14
movq (%rbx), %rsi
testq %rsi, %rsi
je 0x212fd
movq %rbx, %rdi
callq 0x10490
movq $0x0, (%rbx)
movq %r14, %rdi
callq 0xbbb0
// File: /workspace/github_cpp_makefile_star2_O1/kztomita[P]http-dump/./string_util_trim.h
// Function: std::basic_string_view<char, std::char_traits<char>> string_util::rtrim<char, std::char_traits<char>>(std::basic_string_view<char, std::char_traits<char>> const&, char const*)
std::basic_string_view<CharT, Traits>
rtrim(const std::basic_string_view<CharT, Traits>& s, const CharT* chars) {
  using _SView = std::basic_string_view<CharT, Traits>;

  auto pos = s.find_last_not_of(chars);
  if (pos == _SView::npos) {
    return s;
  }

  return s.substr(0, pos + 1);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0xb2c0
movq %rbx, %rdi
movq %r14, %rsi
movq $-0x1, %rdx
movq %rax, %rcx
callq 0x2147e
cmpq $-0x1, %rax
je 0x21405
incq %rax
movq (%rbx), %rcx
cmpq %rax, %rcx
cmovbq %rcx, %rax
jmp 0x21408
movq (%rbx), %rax
movq 0x8(%rbx), %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/kztomita[P]http-dump/./string_util_trim.h
// Function: std::basic_string_view<char, std::char_traits<char>> string_util::ltrim<char, std::char_traits<char>>(std::basic_string_view<char, std::char_traits<char>> const&, char const*)
std::basic_string_view<CharT, Traits>
ltrim(const std::basic_string_view<CharT, Traits>& s, const CharT* chars) {
  using _SView = std::basic_string_view<CharT, Traits>;

  auto pos = s.find_first_not_of(chars);
  if (pos == _SView::npos) {
    return s;
  }

  return s.substr(pos);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0xb2c0
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x214ec
movq %rax, %rcx
movq (%rbx), %rax
cmpq $-0x1, %rcx
je 0x21456
movq %rax, %rsi
subq %rcx, %rsi
jb 0x21462
movq 0x8(%rbx), %rdx
addq %rcx, %rdx
movq %rsi, %rax
jmp 0x2145a
movq 0x8(%rbx), %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x1299b(%rip), %rdi     # 0x33e04
leaq 0x1297a(%rip), %rsi     # 0x33dea
movq %rcx, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0xba20
nop
// File: /workspace/github_cpp_makefile_star2_O1/kztomita[P]http-dump/./string_util_trim.h
// Function: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> string_util::rtrim<char, std::char_traits<char>, std::allocator<char>>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const*)
std::basic_string<CharT, Traits, Alloc>
rtrim(const std::basic_string<CharT, Traits, Alloc>& s, const CharT* chars) {
  using _String = std::basic_string<CharT, Traits, Alloc>;

  auto pos = s.find_last_not_of(chars);
  if (pos == _String::npos) {
    return s;
  }

  return s.substr(0, pos + 1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq %rdx, %rdi
callq 0xb2c0
movq %r14, %rdi
movq %r15, %rsi
movq $-0x1, %rdx
movq %rax, %rcx
callq 0xbab0
cmpq $-0x1, %rax
je 0x2159d
incq %rax
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0xb660
jmp 0x215b6
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0xe53c
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/kztomita[P]http-dump/./string_util_trim.h
// Function: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> string_util::ltrim<char, std::char_traits<char>, std::allocator<char>>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const*)
std::basic_string<CharT, Traits, Alloc>
ltrim(const std::basic_string<CharT, Traits, Alloc>& s, const CharT* chars) {
  using _String = std::basic_string<CharT, Traits, Alloc>;

  auto pos = s.find_first_not_of(chars);
  if (pos == _String::npos) {
    return s;
  }

  return s.substr(pos);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq %rdx, %rdi
callq 0xb2c0
movq %r14, %rdi
movq %r15, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0xbb40
cmpq $-0x1, %rax
je 0x21602
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
movq $-0x1, %rcx
callq 0xb660
jmp 0x2161b
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0xe53c
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/kztomita[P]http-dump/http_response.cc
// Function: dump(http_response const&)
void dump(const http_response& r) {
  std::cout << "HTTP Response" << std::endl;
  std::cout << "Status " << r.code_ << std::endl;
  std::cout << "Headers" << std::endl;
  for (const auto& h : r.headers_) {
    std::cout << *h << std::endl;
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x26932(%rip), %r14     # 0x47f88
leaq 0x127d8(%rip), %rsi     # 0x33e35
movl $0xd, %edx
movq %r14, %rdi
callq 0xb730
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0xb5b0
movsbl %al, %esi
movq %r14, %rdi
callq 0xb050
movq %rax, %rdi
callq 0xb450
leaq 0x127ab(%rip), %rsi     # 0x33e43
movl $0x7, %edx
movq %r14, %rdi
callq 0xb730
movl (%rbx), %esi
movq %r14, %rdi
callq 0xb440
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0xb5b0
movsbl %al, %esi
movq %r15, %rdi
callq 0xb050
movq %rax, %rdi
callq 0xb450
leaq 0x1276b(%rip), %rsi     # 0x33e4b
movl $0x7, %edx
movq %r14, %rdi
callq 0xb730
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0xb5b0
movsbl %al, %esi
movq %r14, %rdi
callq 0xb050
movq %rax, %rdi
callq 0xb450
movq 0x8(%rbx), %r15
movq 0x10(%rbx), %r12
cmpq %r12, %r15
je 0x21766
movq 0x26860(%rip), %rbx     # 0x47f88
movq (%r15), %rsi
movq %rbx, %rdi
callq 0x2130c
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0xb5b0
movsbl %al, %esi
movq %r14, %rdi
callq 0xb050
movq %rax, %rdi
callq 0xb450
addq $0x8, %r15
cmpq %r12, %r15
jne 0x21728
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/kztomita[P]http-dump/./string_util_split.h
// Function: std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> string_util::split<char, std::char_traits<char>, std::allocator<char>>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const*)
std::vector<std::basic_string<CharT, Traits, Alloc> >
split(const std::basic_string<CharT, Traits, Alloc>& s,
      const CharT* delimiter) {
  using _String = std::basic_string<CharT, Traits, Alloc>;

  auto delimiter_size = _String(delimiter).size();
  if (delimiter_size == 0) {
    throw std::invalid_argument("empty delimiter");
  }

  std::vector<_String> results;

  typename _String::size_type pos = 0;

  while (true) {
    typename _String::size_type next = s.find(delimiter, pos);
    if (next == _String::npos) {
      results.push_back(s.substr(pos));
      break;
    }
    results.push_back(s.substr(pos, next - pos));

    pos = next + delimiter_size;
  }

  return results;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x10(%rsp), %r12
leaq 0xf(%rsp), %rdx
movq %r12, %rdi
movq %r14, %rsi
callq 0xda18
movq (%r12), %rdi
movq 0x8(%r12), %rax
movq %rax, 0x30(%rsp)
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x236ee
movq 0x20(%rsp), %rsi
incq %rsi
callq 0xb600
cmpq $0x0, 0x30(%rsp)
je 0x237cf
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
xorl %ebp, %ebp
leaq 0x10(%rsp), %r12
movq %r14, %rdi
callq 0xb2c0
movq %r15, %rdi
movq %r14, %rsi
movq %rbp, %rdx
movq %rax, %rcx
callq 0xbba0
movq %rax, %r13
cmpq $-0x1, %rax
je 0x23777
movq %r13, %rcx
subq %rbp, %rcx
movq %r12, %rdi
movq %r15, %rsi
movq %rbp, %rdx
callq 0xb660
movq %rbx, %rdi
movq %r12, %rsi
callq 0x24542
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x2376c
movq 0x20(%rsp), %rsi
incq %rsi
callq 0xb600
movq 0x30(%rsp), %rax
leaq (%rax,%r13), %rbp
jmp 0x237b3
movq %r12, %rdi
movq %r15, %rsi
movq %rbp, %rdx
movq $-0x1, %rcx
callq 0xb660
movq %rbx, %rdi
movq %r12, %rsi
callq 0x24542
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x237b3
movq 0x20(%rsp), %rsi
incq %rsi
callq 0xb600
cmpq $-0x1, %r13
jne 0x2370f
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0xb300
movq %rax, %rbx
leaq 0x109ad(%rip), %rsi     # 0x34190
movq %rax, %rdi
callq 0xbcd0
movq 0x247ce(%rip), %rsi     # 0x47fc0
movq 0x2479f(%rip), %rdx     # 0x47f98
movq %rbx, %rdi
callq 0xbb60
movq %rax, %r14
movq %rbx, %rdi
callq 0xb4b0
jmp 0x2383e
jmp 0x23833
jmp 0x23812
movq %rax, %r14
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x23836
movq 0x20(%rsp), %rsi
incq %rsi
callq 0xb600
jmp 0x23836
movq %rax, %r14
movq %rbx, %rdi
callq 0x18866
movq %r14, %rdi
callq 0xbbb0
// File: /workspace/github_cpp_makefile_star2_O1/kztomita[P]http-dump/./http2_socket.h
// Function: void send_http2_goaway<boost::asio::ssl::stream<boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::execution::any_executor<boost::asio::execution::context_as_t<boost::asio::execution_context&>, boost::asio::execution::detail::blocking::never_t<0>, boost::asio::execution::prefer_only<boost::asio::execution::detail::blocking::possibly_t<0>>, boost::asio::execution::prefer_only<boost::asio::execution::detail::outstanding_work::tracked_t<0>>, boost::asio::execution::prefer_only<boost::asio::execution::detail::outstanding_work::untracked_t<0>>, boost::asio::execution::prefer_only<boost::asio::execution::detail::relationship::fork_t<0>>, boost::asio::execution::prefer_only<boost::asio::execution::detail::relationship::continuation_t<0>>>>>>(boost::asio::ssl::stream<boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::execution::any_executor<boost::asio::execution::context_as_t<boost::asio::execution_context&>, boost::asio::execution::detail::blocking::never_t<0>, boost::asio::execution::prefer_only<boost::asio::execution::detail::blocking::possibly_t<0>>, boost::asio::execution::prefer_only<boost::asio::execution::detail::outstanding_work::tracked_t<0>>, boost::asio::execution::prefer_only<boost::asio::execution::detail::outstanding_work::untracked_t<0>>, boost::asio::execution::prefer_only<boost::asio::execution::detail::relationship::fork_t<0>>, boost::asio::execution::prefer_only<boost::asio::execution::detail::relationship::continuation_t<0>>>>>&, unsigned int)
void send_http2_goaway(SyncWriteStream& stream, uint32_t stream_id) {
  http2_frame goaway;

  auto& header = goaway.header();
  header.set_length(8);
  header.type = http2_frame_header::TYPE_GOAWAY;
  header.flags = 0x00;
  header.set_stream_id(0);

  auto& payload = goaway.payload();
  payload.resize(8);
  uint32_t value;
  value = htonl(stream_id);   // Last Stream Id
  std::memcpy(&payload[0], &value, 4);
  value = htonl(0);           // Error Code
  std::memcpy(&payload[4], &value, 4);

  write_http2_frame(stream, goaway);
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x28, %rsp
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x10(%rsp), %rdi
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movb $0x8, -0xe(%rdi)
movw $0x0, -0x10(%rdi)
movw $0x7, -0xd(%rdi)
movl $0x0, -0xb(%rdi)
movl $0x8, %esi
callq 0x23970
bswapl %ebp
movq %rsp, %rsi
movq 0x10(%rsi), %rax
movl %ebp, (%rax)
movq 0x10(%rsi), %rax
movl $0x0, 0x4(%rax)
movq %rbx, %rdi
callq 0x2746c
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x2655e
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0xb600
addq $0x28, %rsp
popq %rbx
popq %rbp
retq
jmp 0x26567
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x26581
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0xb600
movq %rbx, %rdi
callq 0xbbb0
nop
// File: /workspace/github_cpp_makefile_star2_O1/kztomita[P]http-dump/./http2_frame.h
// Function: http2_frame_header::set_stream_id(unsigned int)
void set_stream_id(uint32_t sid) {
    if (sid & 0x80000000) {
      throw std::invalid_argument("sid too large");
    }
    uint32_t value = htonl(sid);
    std::memcpy(psid, &value, 4);
  }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testl %esi, %esi
js 0x273bd
bswapl %esi
movl %esi, 0x5(%rdi)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0x10, %edi
callq 0xb300
movq %rax, %rbx
leaq 0xd063(%rip), %rsi      # 0x34434
movq %rax, %rdi
callq 0xbcd0
movq 0x20be0(%rip), %rsi     # 0x47fc0
movq 0x20bb1(%rip), %rdx     # 0x47f98
movq %rbx, %rdi
callq 0xbb60
movq %rax, %r14
movq %rbx, %rdi
callq 0xb4b0
movq %r14, %rdi
callq 0xbbb0
// File: /workspace/github_cpp_makefile_star2_O1/kztomita[P]http-dump/./http2_frame.h
// Function: http2_frame_header::set_length(unsigned int)
void set_length(uint32_t length) {
    if (length & 0xff000000) {
      throw std::invalid_argument("length too large");
    }
    uint32_t value = htonl(length);
    std::memcpy(plength, (reinterpret_cast<uint8_t*>(&value)) + 1, 3);
  }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpl $0x1000000, %esi        # imm = 0x1000000
jae 0x27427
bswapl %esi
movl %esi, %eax
shrl $0x8, %eax
shrl $0x18, %esi
movb %sil, 0x2(%rdi)
movw %ax, (%rdi)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0x10, %edi
callq 0xb300
movq %rax, %rbx
leaq 0xd007(%rip), %rsi      # 0x34442
movq %rax, %rdi
callq 0xbcd0
movq 0x20b76(%rip), %rsi     # 0x47fc0
movq 0x20b47(%rip), %rdx     # 0x47f98
movq %rbx, %rdi
callq 0xbb60
movq %rax, %r14
movq %rbx, %rdi
callq 0xb4b0
movq %r14, %rdi
callq 0xbbb0
// File: /workspace/github_cpp_makefile_star2_O1/kztomita[P]http-dump/./hpack_encoder.h
// Function: std::vector<unsigned char, std::allocator<unsigned char>> hpack::hpack_encoder::encode<std::vector<unsigned char, std::allocator<unsigned char>>>(std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>> const&)
Container encode(const header_list& headers) {
    Container buffer;

    for (const auto& h : headers) {
      buffer.push_back(0x00);    // Literal Header Field without Indexing

      // Name Length
      encode_integer(0x00, h.first.size(), 7, buffer);

      // Name String
      std::copy(h.first.begin(), h.first.end(), std::back_inserter(buffer));

      // Value Length
      encode_integer(0x00, h.second.size(), 7, buffer);

      // Value String
      std::copy(h.second.begin(), h.second.end(), std::back_inserter(buffer));
    }

    return buffer;
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq (%rdx), %r13
movq 0x8(%rdx), %rax
movq %rax, 0x10(%rsp)
cmpq %rax, %r13
je 0x2813f
leaq 0xe(%rsp), %r15
leaq 0xf(%rsp), %r12
movb $0x0, 0xd(%rsp)
movq %rbx, %rdi
leaq 0xd(%rsp), %rsi
callq 0x282f2
movl 0x8(%r13), %esi
movl $0x7, %edx
xorl %edi, %edi
movq %rbx, %rcx
callq 0x2825d
movq 0x8(%r13), %r14
testq %r14, %r14
jle 0x280ef
movq (%r13), %rbp
incq %r14
movb (%rbp), %al
movb %al, 0xe(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x282f2
incq %rbp
decq %r14
cmpq $0x1, %r14
jg 0x280d1
movl 0x28(%r13), %esi
movl $0x7, %edx
xorl %edi, %edi
movq %rbx, %rcx
callq 0x2825d
movq 0x28(%r13), %r14
testq %r14, %r14
jle 0x28130
movq 0x20(%r13), %rbp
incq %r14
movb (%rbp), %al
movb %al, 0xf(%rsp)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x282f2
incq %rbp
decq %r14
cmpq $0x1, %r14
jg 0x28112
addq $0x40, %r13
cmpq 0x10(%rsp), %r13
jne 0x2809c
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x28157
jmp 0x28157
jmp 0x28157
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x2816e
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0xb600
movq %r14, %rdi
callq 0xbbb0
// File: /workspace/github_cpp_makefile_star2_O1/kztomita[P]http-dump/./hpack_encoder.h
// Function: void hpack::encode_integer<std::vector<unsigned char, std::allocator<unsigned char>>>(unsigned char, unsigned int, unsigned long, std::vector<unsigned char, std::allocator<unsigned char>>&)
void encode_integer(uint8_t src, unsigned int i, std::size_t n, Container& buffer) {
  // 2 ^ n - 1
  unsigned int mask = (1 << n) - 1;

  if (i < mask) {
    buffer.push_back((src & ~mask) + (i & mask));
  } else {
    buffer.push_back(src | mask);
    i -= mask;
    while (i >= 128) {
      buffer.push_back(i % 128 + 128);
      i /= 128;
    }
    buffer.push_back(i);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %rcx
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
shll %cl, %edx
movl %edx, %eax
notl %eax
movl %esi, %ebp
subl %eax, %ebp
jae 0x2828e
movzbl %dil, %ecx
andl %ecx, %edx
andl %esi, %eax
orl %edx, %eax
leaq 0x7(%rsp), %rsi
movb %al, (%rsi)
jmp 0x282df
orb %dil, %al
leaq 0x6(%rsp), %rsi
movb %al, (%rsi)
movq %rbx, %rdi
callq 0x282f2
cmpl $0x80, %ebp
jb 0x282d4
leaq 0x4(%rsp), %r14
movl %ebp, %r15d
movl %ebp, %eax
orb $-0x80, %al
movb %al, 0x4(%rsp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x282f2
shrl $0x7, %r15d
cmpl $0x3fff, %ebp           # imm = 0x3FFF
movl %r15d, %ebp
ja 0x282b0
jmp 0x282d7
movl %ebp, %r15d
leaq 0x5(%rsp), %rsi
movb %r15b, (%rsi)
movq %rbx, %rdi
callq 0x282f2
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/kztomita[P]http-dump/http2_frame.cc
// Function: (anonymous namespace)::dump_headers_payload(std::vector<unsigned char, std::allocator<unsigned char>> const&, unsigned char)
void dump_headers_payload(const http2_frame::payload_type& payload, uint8_t flags) {
  auto buffer = buffer_view(&payload[0], payload.size());

  std::size_t offset = 0;

  if (flags & 0x08) {  // PADDED
    std::cout << "Pad Length: " << buffer.at(offset) << std::endl;
    offset++;
  }
  if (flags & 0x20) {  // PRIORITY
    uint32_t dependency = buffer.at_uint32(offset);
    uint8_t weight =  buffer.at_uint32(offset + 4);
    std::cout << "E: " << ((dependency & 0x80000000) ? 1 : 0) << std::endl
              << "Stream Dependency: " << (dependency & 0x7fffffff) << std::endl
              << "Weight: " << weight << std::endl;
    offset += 5;
  }
  // HEADERSは複数フレームになることがあるので、Header Block Fragmentは
  // ここでは出力できない
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movl %esi, %ebx
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
subq %rax, %rcx
movq %rax, 0x10(%rsp)
movq %rcx, 0x18(%rsp)
testb $0x8, %bl
jne 0x28e78
xorl %r15d, %r15d
jmp 0x28ee3
movq 0x1f109(%rip), %r14     # 0x47f88
leaq 0xb7cc(%rip), %rsi      # 0x34652
movl $0xc, %edx
movq %r14, %rdi
callq 0xb730
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
callq 0x296f6
leaq 0xf(%rsp), %rsi
movb %al, (%rsi)
movl $0x1, %r15d
movl $0x1, %edx
movq %r14, %rdi
callq 0xb730
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0xb5b0
movsbl %al, %esi
movq %r14, %rdi
callq 0xb050
movq %rax, %rdi
callq 0xb450
testb $0x20, %bl
je 0x2900b
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x29754
movl %eax, %r14d
orq $0x4, %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x29754
movl %eax, %ebx
movq 0x1f071(%rip), %r15     # 0x47f88
leaq 0xb872(%rip), %rsi      # 0x34790
movl $0x3, %edx
movq %r15, %rdi
callq 0xb730
movl %r14d, %esi
shrl $0x1f, %esi
movq %r15, %rdi
callq 0xbb80
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0xb5b0
movsbl %al, %esi
movq %r15, %rdi
callq 0xb050
movq %rax, %rdi
callq 0xb450
movq %rax, %r15
leaq 0xb6f2(%rip), %rsi      # 0x3465f
movl $0x13, %edx
movq %rax, %rdi
callq 0xb730
andl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
movq %r15, %rdi
movq %r14, %rsi
callq 0xb440
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0xb5b0
movsbl %al, %esi
movq %r14, %rdi
callq 0xb050
movq %rax, %rdi
callq 0xb450
movq %rax, %r14
leaq 0xb6b3(%rip), %rsi      # 0x34673
movl $0x8, %edx
movq %rax, %rdi
callq 0xb730
leaq 0xf(%rsp), %rsi
movb %bl, (%rsi)
movl $0x1, %edx
movq %r14, %rdi
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
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/kztomita[P]http-dump/http2_frame.cc
// Function: (anonymous namespace)::stringify_error_code[abi:cxx11](unsigned int)
std::string stringify_error_code(uint32_t code) {
  switch (code) {
  case NO_ERROR:
    return std::string("NO ERROR");
  case PROTOCOL_ERROR:
    return std::string("PROTOCOL ERROR");
  case INTERNAL_ERROR:
    return std::string("INTERNAL ERROR");
  case FLOW_CONTROL_ERROR:
    return std::string("FLOW CONTROL ERROR");
  case SETTINGS_TIMEOUT:
    return std::string("SETTINGS TIMEOUT");
  case STREAM_CLOSED:
    return std::string("STREAM CLOSED");
  case FRAME_SIZE_ERROR:
    return std::string("FRAME SIZE ERROR");
  case REFUSED_STREAM:
    return std::string("REFUSED STREAM");
  case CANCEL:
    return std::string("CANCEL");
  case COMPRESSION_ERROR:
    return std::string("COMPRESSION ERROR");
  case CONNECT_ERROR:
    return std::string("CONNECT ERROR");
  case ENHANCE_YOUR_CALM:
    return std::string("ENHANCE YOUR CALM");
  case INADEQUATE_SECURITY:
    return std::string("INADEQUATE SECURITY");
  case HTTP_1_1_REQUIRED:
    return std::string("HTTP1.1 REQUIRED");
  default:
    return std::string("Unknown");
  }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
cmpl $0xd, %esi
ja 0x29565
movl %esi, %eax
leaq 0xb0fe(%rip), %rcx      # 0x34568
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0xb21e(%rip), %rsi      # 0x34698
leaq 0xb21f(%rip), %rdx      # 0x346a0
jmp 0x29573
leaq 0xb2ab(%rip), %rsi      # 0x34738
leaq 0xb2b5(%rip), %rdx      # 0x34749
jmp 0x29573
leaq 0xb232(%rip), %rsi      # 0x346d2
leaq 0xb23b(%rip), %rdx      # 0x346e2
jmp 0x29573
leaq 0xb297(%rip), %rsi      # 0x3474a
leaq 0xb2a3(%rip), %rdx      # 0x3475d
jmp 0x29573
leaq 0xb252(%rip), %rsi      # 0x34718
leaq 0xb25c(%rip), %rdx      # 0x34729
jmp 0x29573
leaq 0xb1d7(%rip), %rsi      # 0x346b0
leaq 0xb1de(%rip), %rdx      # 0x346be
jmp 0x29573
leaq 0xb1d3(%rip), %rsi      # 0x346bf
leaq 0xb1de(%rip), %rdx      # 0x346d1
jmp 0x29573
leaq 0xb206(%rip), %rsi      # 0x34702
leaq 0xb20d(%rip), %rdx      # 0x34710
jmp 0x29573
leaq 0xb195(%rip), %rsi      # 0x346a1
leaq 0xb19c(%rip), %rdx      # 0x346af
jmp 0x29573
leaq 0xb1c7(%rip), %rsi      # 0x346e3
leaq 0xb1cd(%rip), %rdx      # 0x346f0
jmp 0x29573
leaq 0xb232(%rip), %rsi      # 0x3475e
leaq 0xb23b(%rip), %rdx      # 0x3476e
jmp 0x29573
leaq 0xb1b5(%rip), %rsi      # 0x346f1
leaq 0xb1be(%rip), %rdx      # 0x34701
jmp 0x29573
leaq 0xb1de(%rip), %rsi      # 0x3472a
leaq 0xb1e4(%rip), %rdx      # 0x34737
jmp 0x29573
leaq 0xb1b5(%rip), %rsi      # 0x34711
leaq 0xb1b4(%rip), %rdx      # 0x34717
jmp 0x29573
leaq 0xb203(%rip), %rsi      # 0x3476f
leaq 0xb203(%rip), %rdx      # 0x34776
movq %rbx, %rdi
callq 0x10322
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/kztomita[P]http-dump/./string_util_join.h
// Function: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> string_util::join<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>(char const*, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&)
std::string join(const char* delimiter, const Container& c) {
  std::ostringstream os;
  if (!c.empty()) {
    auto last = std::prev(c.cend());
    std::copy(c.cbegin(), last, std::ostream_iterator<std::string>(os, ","));
    os << *last;
  }
  return os.str();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x190, %rsp            # imm = 0x190
movq %rdx, %r12
movq %rdi, %rbx
leaq 0x18(%rsp), %r15
movq %r15, %rdi
callq 0xb8c0
movq (%r12), %r14
movq 0x8(%r12), %r12
cmpq %r12, %r14
je 0x29689
movq %r15, 0x8(%rsp)
leaq 0xb00a(%rip), %rax      # 0x34647
movq %rax, 0x10(%rsp)
movq %r12, %r13
subq %r14, %r13
addq $-0x20, %r13
sarq $0x5, %r13
testq %r13, %r13
jle 0x29675
incq %r13
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x2982a
addq $0x20, %r14
decq %r13
cmpq $0x1, %r13
jg 0x2965d
movq -0x20(%r12), %rsi
movq -0x18(%r12), %rdx
leaq 0x18(%rsp), %rdi
callq 0xb730
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0xba80
movq 0x1e8cb(%rip), %rsi     # 0x47f68
leaq 0x18(%rsp), %rdi
callq 0xb380
leaq 0x88(%rsp), %rdi
callq 0xb1f0
movq %rbx, %rax
addq $0x190, %rsp            # imm = 0x190
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x296cc
jmp 0x296cc
movq %rax, %rbx
movq 0x1e892(%rip), %rsi     # 0x47f68
leaq 0x18(%rsp), %rdi
callq 0xb380
leaq 0x88(%rsp), %rdi
callq 0xb1f0
movq %rbx, %rdi
callq 0xbbb0
nop
// File: /workspace/github_cpp_makefile_star2_O1/kztomita[P]http-dump/./buffer_view.h
// Function: buffer_view<unsigned char>::at_uint32(unsigned long) const
uint32_t at_uint32(std::size_t offset) const {
    std::size_t end = offset + 3;
    if (end < offset || end >= length_) {
      throw std::range_error("invalid offset");
    }
    uint32_t value = 0;
    memcpy(&value, buffer_ + offset, 4);
    return ntohl(value);
  }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpq $-0x4, %rsi
ja 0x29778
leaq 0x3(%rsi), %rax
cmpq 0x8(%rdi), %rax
jae 0x29778
movq (%rdi), %rax
movl (%rax,%rsi), %eax
bswapl %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0x10, %edi
callq 0xb300
movq %rax, %rbx
leaq 0xaef0(%rip), %rsi      # 0x3467c
movq %rax, %rdi
callq 0xbb70
movq 0x1e805(%rip), %rsi     # 0x47fa0
movq 0x1e79e(%rip), %rdx     # 0x47f40
movq %rbx, %rdi
callq 0xbb60
movq %rax, %r14
movq %rbx, %rdi
callq 0xb4b0
movq %r14, %rdi
callq 0xbbb0
nop