LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/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 0x60e4
movq %rax, %r14
movq %rax, %r15
addq $0x8, %r15
xorpd %xmm1, %xmm1
xorl %r12d, %r12d
movsd 0x150b(%rip), %xmm2     # 0x70b8
cmpq $0x1d, %r12
je 0x5c23
movq 0x2c0(%r14), %rax
btq %r12, %rax
movapd %xmm2, %xmm0
jae 0x5c10
movq (%r15), %rax
movapd %xmm2, %xmm0
testq %rax, %rax
je 0x5c10
movsd %xmm1, 0x10(%rsp)
movq %rax, %xmm1
punpckldq 0x151d(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x1525(%rip), %xmm1     # 0x7110
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
movsd 0x8(%rsp), %xmm1
callq 0x2260
movsd 0x14ae(%rip), %xmm2     # 0x70b8
movsd 0x10(%rsp), %xmm1
movsd %xmm0, (%rbx,%r12,8)
addsd %xmm0, %xmm1
incq %r12
addq $0x18, %r15
jmp 0x5bad
movsd 0x13dd(%rip), %xmm0     # 0x7008
divsd %xmm1, %xmm0
xorl %eax, %eax
cmpq $0x1d, %rax
je 0x5c4a
movsd (%rbx,%rax,8), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, (%rbx,%rax,8)
incq %rax
jmp 0x5c31
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %r12
pushq %rbx
movl %ecx, %ebx
movl %edx, %r12d
movl %esi, %r15d
movq %rdi, %r14
callq 0x4622
movl %eax, %ebp
testb %al, %al
je 0x61ae
movzbl %r15b, %r15d
movq %r14, %rdi
movl %r15d, %esi
callq 0x61ba
movq %r14, %rdi
movl %r15d, %esi
testb %r12b, %r12b
je 0x6198
callq 0x6214
movq %r14, %rdi
movl %r15d, %esi
callq 0x6278
pushq $0x1
popq %rdx
movq %r14, %rdi
movl %r15d, %esi
callq 0x63ae
movq %r14, %rdi
movl %r15d, %esi
callq 0x6418
movq %r14, %rdi
movl %r15d, %esi
callq 0x6454
jmp 0x61aa
xorl %edx, %edx
callq 0x63ae
movq %r14, %rdi
movl %r15d, %esi
callq 0x6418
movb %bl, 0x9(%r14)
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x63da
testb %dl, %dl
je 0x63ed
movzbl %sil, %ecx
decl %ecx
cmpl $0x18, %ecx
ja 0x640d
leaq 0xe0f(%rip), %rdx       # 0x71dc
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
incb %al
jmp 0x640a
cmpb $0xb, %sil
je 0x63fc
movzbl %sil, %eax
cmpl $0x17, %eax
jne 0x6416
movb $0x3, %cl
jmp 0x6413
cmpb $0x12, %sil
jne 0x6416
movzwl %ax, %ecx
incl %ecx
shrl %ecx
jmp 0x6413
movb $0x1, %cl
jmp 0x6413
addb $0x2, %al
jmp 0x640a
xorl %ecx, %ecx
jmp 0x6413
addb %al, %al
movb %al, 0x8(%rdi)
movb $0xb, %cl
cmpb $0xb, %al
jbe 0x6416
movb %cl, 0x8(%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/hantaoyin[P]ffxiv-crafting-mcts/ffxiv-crafting-mcts.C
// Function: State::ApplyPersistentBuffEffect(Action)
void ApplyPersistentBuffEffect(Action ac) {
    if (buff[Buff2ID(Buff::Manipulation)] > 0 && ac != Action::Manipulation) {
      durability += 5;
      if (durability > params.max_durability) {
        durability = params.max_durability;
      }
    }
    // Decrease all active buff counters by 1.
    for (auto& b : buff) {
      if (b > 0) --b;
    }

// Assembly:
cmpl $0xe, %esi
je 0x6438
cmpb $0x0, 0xd(%rdi)
je 0x6438
movzwl 0x6(%rdi), %eax
addl $0x5, %eax
cmpw $0x46, %ax
pushq $0x46
popq %rcx
cmovll %eax, %ecx
movw %cx, 0x6(%rdi)
xorl %eax, %eax
cmpq $0x9, %rax
je 0x6453
movb 0xa(%rdi,%rax), %cl
testb %cl, %cl
je 0x644e
decb %cl
movb %cl, 0xa(%rdi,%rax)
incq %rax
jmp 0x643a
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
cmpq $0x3, %rcx
je 0x4a99
xorl %edx, %edx
xorl %esi, %esi
cmpq $0x4, %rsi
je 0x4a90
movl %edx, (%rax,%rsi,4)
incq %rsi
addl %ecx, %edx
jmp 0x4a80
incq %rcx
addq $0x10, %rax
jmp 0x4a76
movb $0x1, %bl
movq %rsp, %rax
xorl %ecx, %ecx
cmpq $0x3, %rcx
je 0x4acf
xorl %edx, %edx
xorl %esi, %esi
cmpq $0x4, %rsi
je 0x4ac6
movl (%rax,%rsi,4), %r8d
cmpq %r8, %rdx
sete %r8b
andb %r8b, %bl
incq %rsi
addq %rcx, %rdx
jmp 0x4aaa
incq %rcx
addq $0x10, %rax
jmp 0x4aa0
testb $0x1, %bl
jne 0x4ae0
leaq 0xd63f(%rip), %rsi      # 0x1211a
callq 0x4290
andb $0x1, %bl
movl %ebx, %eax
addq $0x30, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
cmpq $0x3, %rcx
je 0x4b18
xorl %edx, %edx
xorl %esi, %esi
cmpq $0x4, %rsi
je 0x4b0f
movl %edx, (%rax,%rsi,4)
incq %rsi
addl %ecx, %edx
jmp 0x4aff
incq %rcx
addq $0x10, %rax
jmp 0x4af5
movb $0x1, %bl
movq %rsp, %rax
xorl %ecx, %ecx
cmpq $0x3, %rcx
je 0x4b3e
xorl %edx, %edx
cmpq $0x3, %rdx
je 0x4b35
andb $0x1, %bl
incq %rdx
jmp 0x4b27
incq %rcx
addq $0x10, %rax
jmp 0x4b1f
testb $0x1, %bl
jne 0x4b4f
leaq 0xd616(%rip), %rsi      # 0x12160
callq 0x4290
andb $0x1, %bl
movl %ebx, %eax
addq $0x30, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/ef-gy[P]libefgy/src/test-case/matrix.cpp
// Function: testStream(std::ostream&)
bool testStream(std::ostream &log) {
  std::ostringstream stream;

  matrix<int, 3, 4> m;
  for (int i = 0; i < 3; i++) {
    for (int k = 0; k < 4; k++) {
      m[i][k] = i * k;
    }
  }

  stream << m;

  std::stringstream expected;

  expected << "0\t0\t0\t0\t\n";
  expected << "0\t1\t2\t3\t\n";
  expected << "0\t2\t4\t6\t\n";

  if (stream.str() != expected.str()) {
    log << "Unexpected characters in printable representation of matrix.\n";
    log << "Matrix: \n";
    log << m;
    log << "\nExpected:\n";
    log << expected.str();

    return false;
  }
  return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x370, %rsp            # imm = 0x370
movq %rdi, %rbx
leaq 0x70(%rsp), %rdi
callq 0x4380
leaq 0x40(%rsp), %rax
xorl %ecx, %ecx
cmpq $0x3, %rcx
je 0x4ec3
xorl %edx, %edx
xorl %esi, %esi
cmpq $0x4, %rsi
je 0x4eba
movl %edx, (%rax,%rsi,4)
incq %rsi
addl %ecx, %edx
jmp 0x4eaa
incq %rcx
addq $0x10, %rax
jmp 0x4ea0
leaq 0x70(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x5446
leaq 0x1e8(%rsp), %rdi
callq 0x41f0
leaq 0x1f8(%rsp), %r14
leaq 0xd3b5(%rip), %rsi      # 0x122a3
movq %r14, %rdi
callq 0x4290
leaq 0xd3b0(%rip), %rsi      # 0x122ad
movq %r14, %rdi
callq 0x4290
leaq 0xd3ab(%rip), %rsi      # 0x122b7
movq %r14, %rdi
callq 0x4290
leaq 0x78(%rsp), %rsi
movq %rsp, %rdi
callq 0x43e0
leaq 0x200(%rsp), %r14
leaq 0x20(%rsp), %rdi
movq %r14, %rsi
callq 0x43e0
movq %rsp, %r15
leaq 0x20(%rsp), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x54b8
movl %eax, %ebp
movq %r12, %rdi
callq 0x4120
movq %r15, %rdi
callq 0x4120
testb %bpl, %bpl
je 0x4fb8
leaq 0xd35a(%rip), %rsi      # 0x122c1
movq %rbx, %rdi
callq 0x4290
leaq 0xd389(%rip), %rsi      # 0x122ff
movq %rbx, %rdi
callq 0x4290
leaq 0x40(%rsp), %rsi
movq %rbx, %rdi
callq 0x5446
leaq 0xd377(%rip), %rsi      # 0x12309
movq %rbx, %rdi
callq 0x4290
movq %rsp, %rdi
movq %r14, %rsi
callq 0x43e0
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x4270
movq %rsp, %rdi
callq 0x4120
xorb $0x1, %bpl
leaq 0x1e8(%rsp), %rdi
callq 0x4220
leaq 0x70(%rsp), %rdi
callq 0x4070
movl %ebp, %eax
addq $0x370, %rsp            # imm = 0x370
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4fe9
jmp 0x4fff
movq %rax, %rbx
movq %rsp, %rdi
callq 0x4120
jmp 0x5002
jmp 0x4fff
jmp 0x4ffa
movq %rax, %rbx
jmp 0x500f
movq %rax, %rbx
leaq 0x1e8(%rsp), %rdi
callq 0x4220
leaq 0x70(%rsp), %rdi
callq 0x4070
movq %rbx, %rdi
callq 0x4450
// File: /workspace/github_cpp_makefile_star2_O2/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
cmpq $0x3, %rax
je 0x505f
movl %edx, %edi
xorl %esi, %esi
cmpq $0x4, %rsi
je 0x5054
leaq (%rdi,%rsi), %r8
movl %r8d, (%rcx,%rsi,4)
incq %rsi
jmp 0x5041
incq %rax
addq $0x10, %rcx
addl %esi, %edx
jmp 0x5037
pushq $0xc
popq %rdx
movq %rsp, %rcx
movabsq $0x100000000, %r8       # imm = 0x100000000
xorl %edi, %edi
movq %rcx, %rsi
xorl %r9d, %r9d
callq 0x11c72
movl %eax, %ebp
testb %al, %al
jne 0x511e
leaq 0xd288(%rip), %rsi      # 0x12315
movq %rbx, %rdi
callq 0x4290
xorl %r12d, %r12d
leaq 0xd2bd(%rip), %r14      # 0x1235c
cmpq $0xc, %r12
je 0x50d5
movl %r12d, %eax
andl $0x3, %eax
movq %r12, %rcx
andq $-0x4, %rcx
leaq (%rsp,%rcx,4), %rcx
movl (%rcx,%rax,4), %r15d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4290
movq %rax, %rdi
movl %r15d, %esi
callq 0x4430
incq %r12
jmp 0x509f
leaq 0xd282(%rip), %rsi      # 0x1235e
movq %rbx, %rdi
callq 0x4290
xorl %r14d, %r14d
leaq 0xd26e(%rip), %r15      # 0x1235c
cmpq $0xc, %r14
je 0x510f
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4290
movq %rax, %rdi
movl %r14d, %esi
callq 0x4430
incq %r14
jmp 0x50ee
leaq 0xd195(%rip), %rsi      # 0x122ab
movq %rbx, %rdi
callq 0x4290
movl %ebp, %eax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/ef-gy[P]libefgy/include/ef.gy/matrix.h
// Function: efgy::math::matrix<int, 3ul, 4ul> efgy::math::operator+<int, 3ul, 4ul>(efgy::math::matrix<int, 3ul, 4ul> const&, efgy::math::matrix<int, 3ul, 4ul> const&)
matrix<Q, n, m> operator+(const matrix<Q, n, m> &a, const matrix<Q, n, m> &b) {
  matrix<Q, n, m> r;

  for (std::size_t i = 0; i < n; i++) {
    for (std::size_t j = 0; j < m; j++) {
      r[i][j] = a[i][j] + b[i][j];
    }
  }

  return r;
}

// Assembly:
movq %rdi, %rax
xorl %ecx, %ecx
cmpq $0x3, %rcx
je 0x5445
xorl %r8d, %r8d
cmpq $0x4, %r8
je 0x5434
movl (%rdx,%r8,4), %r9d
addl (%rsi,%r8,4), %r9d
movl %r9d, (%rdi,%r8,4)
incq %r8
jmp 0x541d
incq %rcx
addq $0x10, %rdi
addq $0x10, %rdx
addq $0x10, %rsi
jmp 0x5414
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x28d0
callq 0x2a76
leaq 0x28c2(%rip), %rdi      # 0x5010
callq 0x2260
leaq 0x28c5(%rip), %rsi      # 0x501f
leaq 0x260(%rsp), %rdi
pushq $0x8
popq %rdx
callq 0x22c0
leaq 0x28b8(%rip), %rsi      # 0x5029
leaq 0x60(%rsp), %rdi
pushq $0x10
popq %rdx
callq 0x21e0
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
pushq $0x1
popq %rbx
leaq 0x260(%rsp), %r14
movq %rsp, %r15
leaq 0x20(%rsp), %rbp
leaq 0x40(%rsp), %r13
leaq 0x60(%rsp), %r12
movq %r14, %rdi
movq %r15, %rsi
callq 0x2060
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x2825
movq %r15, %rdi
leaq 0x286d(%rip), %rsi      # 0x503c
callq 0x2a8f
testb %al, %al
je 0x2825
leaq 0x2855(%rip), %rdi      # 0x5034
movl %ebx, %esi
xorl %eax, %eax
callq 0x2040
movq %rbp, %rdi
movq %r15, %rsi
callq 0x2210
movq %r13, %rdi
movq %rbp, %rsi
callq 0x2a99
movq %r12, %rdi
movq %r13, %rsi
callq 0x2190
movq %rax, %rdi
callq 0x20e0
movq %r13, %rdi
callq 0x20d0
movq %rbp, %rdi
callq 0x20d0
incl %ebx
jmp 0x27ac
movq %rsp, %rdi
callq 0x20d0
leaq 0x60(%rsp), %rdi
callq 0x2240
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 0x2892
jmp 0x2864
movq %rax, %rbx
jmp 0x2876
movq %rax, %rbx
jmp 0x2880
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x20d0
leaq 0x20(%rsp), %rdi
callq 0x20d0
movq %rsp, %rdi
callq 0x20d0
leaq 0x60(%rsp), %rdi
callq 0x2240
leaq 0x260(%rsp), %rdi
callq 0x2070
movq %rbx, %rdi
callq 0x22a0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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
movl %edi, 0x4(%rsp)
movslq %edi, %rax
imulq $0x18, %rax, %rax
leaq 0x2dce774(%rip), %rcx   # 0x2dd2c60
movq 0x8(%rax,%rcx), %r14
subq (%rax,%rcx), %r14
shrq $0x2, %r14
xorl %r15d, %r15d
testl %r14d, %r14d
cmovlel %r15d, %r14d
leaq (%rcx,%rax), %r12
shlq $0x2, %r14
leaq 0x59acf2e(%rip), %r13   # 0x59b1440
xorl %eax, %eax
cltq
cmpq %r15, %r14
je 0x456c
imulq $0x48, %rax, %rbx
addq %r13, %rbx
movq (%r12), %rsi
addq %r15, %rsi
movq %rbx, %rdi
callq 0x4592
cmpl $0x0, (%rax)
jne 0x4555
movl 0xc0ac204(%rip), %ebp   # 0xc0b0740
incl %ebp
movl %ebp, 0xc0ac1fc(%rip)   # 0xc0b0740
movq (%r12), %rsi
addq %r15, %rsi
movq %rbx, %rdi
callq 0x4592
movl %ebp, (%rax)
movq (%r12), %rsi
addq %r15, %rsi
movq %rbx, %rdi
callq 0x4592
movl (%rax), %eax
addq $0x4, %r15
jmp 0x4514
imulq $0x48, %rax, %rax
leaq (%rax,%r13), %rdi
addq $0x30, %rdi
leaq 0x4(%rsp), %rsi
callq 0x45e0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
testq %rdi, %rdi
je 0xcb21
movq %rdi, %rsi
movq 0x394d4(%rip), %rdi     # 0x45fe0
callq 0xb5e0
movq %rax, %rdi
callq 0xb320
movq %rax, %rdi
callq 0xb320
movq 0x394b8(%rip), %rbx     # 0x45fe0
leaq 0x1e52d(%rip), %rsi     # 0x2b05c
movq %rbx, %rdi
callq 0xb5e0
movq %rax, %rdi
callq 0xb320
leaq 0x1e51d(%rip), %rsi     # 0x2b063
movq %rbx, %rdi
callq 0xb5e0
movq %rax, %rdi
callq 0xb320
movq %rax, %rdi
callq 0xb320
leaq 0x1e51a(%rip), %rsi     # 0x2b07f
movq %rbx, %rdi
callq 0xb5e0
movq %rax, %rdi
callq 0xb320
leaq 0x1e51a(%rip), %rsi     # 0x2b096
movq %rbx, %rdi
callq 0xb5e0
movq %rax, %rdi
callq 0xb320
leaq 0x1e51c(%rip), %rsi     # 0x2b0af
movq %rbx, %rdi
callq 0xb5e0
movq %rax, %rdi
callq 0xb320
leaq 0x1e527(%rip), %rsi     # 0x2b0d1
movq %rbx, %rdi
callq 0xb5e0
movq %rax, %rdi
callq 0xb320
leaq 0x1e536(%rip), %rsi     # 0x2b0f7
movq %rbx, %rdi
callq 0xb5e0
movq %rax, %rdi
callq 0xb320
leaq 0x1e549(%rip), %rsi     # 0x2b121
movq %rbx, %rdi
callq 0xb5e0
movq %rax, %rdi
callq 0xb320
pushq $0x1
popq %rdi
callq 0xb7d0
// File: /workspace/github_cpp_makefile_star2_O2/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 0x1dd42
cmpq $0x0, (%rbx)
je 0x1df54
movq %rbx, %rax
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x20(%rsp), %rdi
callq 0xb8f0
leaq 0xee74(%rip), %rsi      # 0x2cdd9
leaq 0x20(%rsp), %rdi
callq 0xb5e0
movq %rax, %rdi
movq %r14, %rsi
callq 0xb570
leaq 0xd19e(%rip), %rsi      # 0x2b11f
movq %rax, %rdi
callq 0xb5e0
pushq $0x10
popq %rdi
callq 0xb330
movq %rax, %r14
leaq 0x28(%rsp), %rsi
movq %rsp, %rdi
callq 0xbaa0
movb $0x1, %bpl
movq %rsp, %rsi
movq %r14, %rdi
callq 0xbb80
xorl %ebp, %ebp
movq 0x28000(%rip), %rsi     # 0x45fb8
movq 0x27fd1(%rip), %rdx     # 0x45f90
movq %r14, %rdi
callq 0xbb50
movq %rax, %r15
movq %rsp, %rdi
callq 0xb2f0
testb %bpl, %bpl
jne 0x1dfdc
jmp 0x1dfe9
movq %rax, %r15
movq %r14, %rdi
callq 0xb4d0
jmp 0x1dfe9
movq %rax, %r15
leaq 0x20(%rsp), %rdi
callq 0xb120
jmp 0x1dff8
movq %rax, %r15
movq %rbx, %rdi
callq 0xd46c
movq %r15, %rdi
callq 0xbba0
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
movq %rdi, %rbx
pushq $-0x1
popq %rdx
callq 0x1e1ca
cmpq $-0x1, %rax
je 0x1e196
incq %rax
movq %rbx, %rdi
xorl %esi, %esi
movq %rax, %rdx
callq 0x1e040
jmp 0x1e19d
movq (%rbx), %rax
movq 0x8(%rbx), %rdx
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
movq %rdi, %rbx
xorl %edx, %edx
callq 0x1e26c
cmpq $-0x1, %rax
je 0x1e1c0
pushq $-0x1
popq %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1e040
jmp 0x1e1c7
movq (%rbx), %rax
movq 0x8(%rbx), %rdx
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
pushq $-0x1
popq %rax
movq %rsi, %rdi
movq %rdx, %rsi
movq %rax, %rdx
callq 0xbc00
cmpq $-0x1, %rax
je 0x1e320
incq %rax
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0xb670
jmp 0x1e32b
movq %rbx, %rdi
movq %r14, %rsi
callq 0xb920
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
movq %rdx, %rsi
xorl %edx, %edx
callq 0xb400
cmpq $-0x1, %rax
je 0x1e366
pushq $-0x1
popq %rcx
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0xb670
jmp 0x1e371
movq %rbx, %rdi
movq %r14, %rsi
callq 0xb920
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
movq %rdi, %r14
movq 0x27bcd(%rip), %rbx     # 0x45f78
leaq 0xea83(%rip), %rsi      # 0x2ce35
movq %rbx, %rdi
callq 0xb5e0
movq %rax, %rdi
callq 0xb320
leaq 0xea7a(%rip), %rsi      # 0x2ce43
movq %rbx, %rdi
callq 0xb5e0
movl (%r14), %esi
movq %rax, %rdi
callq 0xb470
movq %rax, %rdi
callq 0xb320
leaq 0xea60(%rip), %rsi      # 0x2ce4b
movq %rbx, %rdi
callq 0xb5e0
movq %rax, %rdi
callq 0xb320
movq 0x8(%r14), %r15
movq 0x10(%r14), %r14
cmpq %r14, %r15
je 0x1e421
movq (%r15), %rsi
movq %rbx, %rdi
callq 0x1e008
movq %rax, %rdi
callq 0xb320
addq $0x8, %r15
jmp 0x1e403
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/kztomita[P]http-dump/./http_protocol.h
// Function: create_socket(http_scheme, bool)
inline std::unique_ptr<sync_stream_wrapper> create_socket(http_scheme scheme, bool use_http2 = false) {
  if (scheme == http_scheme::https) {
    return std::make_unique<ssl_stream>(g_verify_cert, use_http2);
  } else {
    return std::make_unique<tcp_socket>();
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movb %dl, 0x7(%rsp)
cmpl $0x1, %esi
jne 0x1e67b
leaq 0x28100(%rip), %rsi     # 0x46758
leaq 0x8(%rsp), %r14
leaq 0x7(%rsp), %rdx
movq %r14, %rdi
callq 0x1ee7c
movq (%r14), %r15
andq $0x0, (%r14)
movq %r14, %rdi
callq 0x1eed2
jmp 0x1e697
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x1eeec
movq (%r14), %r15
andq $0x0, (%r14)
movq %r14, %rdi
callq 0x1ef2a
movq %r15, (%rbx)
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/kztomita[P]http-dump/./socket.h
// Function: bool read_line<sync_stream_wrapper>(sync_stream_wrapper&, boost::asio::basic_streambuf<std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
bool read_line(SyncReadStream& socket, boost::asio::streambuf& receive_buffer, std::string& line) {
  namespace asio = boost::asio;

  boost::system::error_code error;

  // receive_bufferにdelimiterより先のデータもまとめて読み込まれ場合がある。
  // この場合、sizeとreceive_buffer.size()が異ることがあるのでsizeの方を
  // 参照する必要がある。
  std::size_t size = asio::read_until(socket, receive_buffer, "\r\n", error);
  if (error && error != asio::error::eof) {
    throw std::runtime_error(error.message());
  }
  if (error == asio::error::eof) {
    return false;
  }

  const char* data = asio::buffer_cast<const char*>(receive_buffer.data());
  line.assign(data, size - 2);

  receive_buffer.consume(size);

  return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rdx, %r14
movq %rsi, %rbx
movq %rsp, %r12
andl $0x0, (%r12)
movb $0x0, 0x4(%r12)
leaq 0x246e0(%rip), %rax     # 0x44300
movq %rax, 0x8(%r12)
leaq 0xd682(%rip), %rcx      # 0x2d2ae
pushq $0x2
popq %rdx
movq %r12, %r8
callq 0x20448
movq %rax, %r15
cmpb $0x1, 0x4(%r12)
jne 0x1fc62
pushq $0x2
popq %rdi
callq 0x209f3
leaq 0x10(%rsp), %rsi
movq %rax, (%rsi)
movq %rdx, 0x8(%rsi)
movq %rsp, %rdi
callq 0x2045c
testb %al, %al
jne 0x1fcc5
pushq $0x2
popq %rdi
callq 0x209f3
cmpl %eax, (%rsp)
jne 0x1fc98
movq 0x8(%rsp), %rax
movq 0x8(%rdx), %rcx
xorl %esi, %esi
cmpq %rdx, %rax
sete %sil
xorl %edx, %edx
cmpq %rcx, 0x8(%rax)
sete %dl
testq %rcx, %rcx
cmovel %esi, %edx
testb %dl, %dl
je 0x1fc98
xorl %eax, %eax
jmp 0x1fcb8
movq 0x10(%rbx), %rsi
movq %r15, %rdx
addq $-0x2, %rdx
movq %r14, %rdi
callq 0xb8e0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1ff34
movb $0x1, %al
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0xb330
movq %rax, %rbx
movq 0x8(%rsp), %rsi
movl (%rsp), %edx
movq (%rsi), %rax
leaq 0x10(%rsp), %rdi
callq *0x20(%rax)
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0xbac0
xorl %ebp, %ebp
movq 0x262ec(%rip), %rsi     # 0x45fe8
movq 0x26245(%rip), %rdx     # 0x45f48
movq %rbx, %rdi
callq 0xbb50
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0xb2f0
testb %bpl, %bpl
jne 0x1fd22
jmp 0x1fd2a
movq %rax, %r14
movq %rbx, %rdi
callq 0xb4d0
movq %r14, %rdi
callq 0xbba0
// File: /workspace/github_cpp_makefile_star2_O2/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, %r15
movq %rsi, %r14
movq %rdi, %r13
leaq 0x18(%rsp), %r12
leaq 0xf(%rsp), %rdx
movq %r12, %rdi
movq %r15, %rsi
callq 0xd416
movq 0x8(%r12), %rbx
movq %r12, %rdi
callq 0xb2f0
testq %rbx, %rbx
je 0x1fe16
andq $0x0, 0x10(%r13)
xorps %xmm0, %xmm0
movq %r13, 0x10(%rsp)
movups %xmm0, (%r13)
xorl %ebp, %ebp
leaq 0x18(%rsp), %r12
movq %r14, %rdi
movq %r15, %rsi
movq %rbp, %rdx
callq 0xbd70
cmpq $-0x1, %rax
je 0x1fdd5
movq %rax, %r13
movq %rax, %rcx
subq %rbp, %rcx
movq %r12, %rdi
movq %r14, %rsi
movq %rbp, %rdx
callq 0xb670
movq 0x10(%rsp), %rdi
movq %r12, %rsi
callq 0x20a3e
movq %r12, %rdi
callq 0xb2f0
addq %rbx, %r13
movq %r13, %rbp
jmp 0x1fd8d
leaq 0x18(%rsp), %rdi
pushq $-0x1
popq %rcx
movq %r14, %rsi
movq %rbp, %rdx
callq 0xb670
leaq 0x18(%rsp), %rsi
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0x20a3e
leaq 0x18(%rsp), %rdi
callq 0xb2f0
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0xb330
movq %rax, %rbx
leaq 0xd368(%rip), %rsi      # 0x2d190
movq %rax, %rdi
callq 0xbcc0
movq 0x26181(%rip), %rsi     # 0x45fb8
movq 0x26152(%rip), %rdx     # 0x45f90
movq %rbx, %rdi
callq 0xbb50
movq %rax, %r14
movq %rbx, %rdi
callq 0xb4d0
jmp 0x1fe73
jmp 0x1fe5c
jmp 0x1fe57
movq %rax, %r14
jmp 0x1fe69
movq %rax, %r14
leaq 0x18(%rsp), %rdi
callq 0xb2f0
movq 0x10(%rsp), %rdi
callq 0x1643c
movq %r14, %rdi
callq 0xbba0
// File: /workspace/github_cpp_makefile_star2_O2/kztomita[P]http-dump/./string_util_tolower.h
// Function: string_util::tolower(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
inline std::string tolower(const std::string& str) {
  std::string s;

  std::transform(str.begin(), str.end(), std::back_inserter(s),
                 [](unsigned char c){ return std::tolower(c); });

  return s;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq (%rsi), %rdi
movq 0x8(%rsi), %rsi
addq %rdi, %rsi
movq %rbx, %rdx
callq 0x20b34
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0xb2f0
movq %r14, %rdi
callq 0xbba0
// File: /workspace/github_cpp_makefile_star2_O2/kztomita[P]http-dump/./http2_socket.h
// Function: void send_http2_window_update<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, unsigned int)
void send_http2_window_update(SyncWriteStream& stream, uint32_t stream_id, uint32_t increment) {
  if (increment & 0x80000000) {
    throw std::invalid_argument("increment too large");
  }

  http2_frame window_update;

  auto& header = window_update.header();
  header.set_length(4);
  header.type = http2_frame_header::TYPE_WINDOW_UPDATE;
  header.flags = 0x00;
  header.set_stream_id(stream_id);

  auto& payload = window_update.payload();
  payload.resize(4);
  uint32_t value;
  value = htonl(increment);
  std::memcpy(&payload[0], &value, 4);

  write_http2_frame(stream, window_update);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
testl %edx, %edx
js 0x22194
movl %edx, %ebp
movq %rdi, %r14
leaq 0x18(%rsp), %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
andq $0x0, 0x10(%rbx)
movb $0x4, -0xe(%rbx)
andw $0x0, -0x10(%rbx)
movw $0x8, -0xd(%rbx)
leaq 0x8(%rsp), %rdi
callq 0x22e38
pushq $0x4
popq %rsi
movq %rbx, %rdi
callq 0x1ff78
bswapl %ebp
leaq 0x8(%rsp), %rsi
movq 0x10(%rsi), %rax
movl %ebp, (%rax)
movq %r14, %rdi
callq 0x22ef8
movq %rbx, %rdi
callq 0xf41c
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0xb330
movq %rax, %rbx
leaq 0xb30d(%rip), %rsi      # 0x2d4b3
movq %rax, %rdi
callq 0xbcc0
movq 0x23e03(%rip), %rsi     # 0x45fb8
movq 0x23dd4(%rip), %rdx     # 0x45f90
movq %rbx, %rdi
callq 0xbb50
movq %rax, %r14
movq %rbx, %rdi
callq 0xb4d0
jmp 0x221e0
jmp 0x221d5
jmp 0x221d5
movq %rax, %r14
movq %rbx, %rdi
callq 0xf41c
movq %r14, %rdi
callq 0xbba0
// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
subq $0x30, %rsp
movl %esi, %ebp
movq %rdi, %r14
leaq 0x18(%rsp), %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
andq $0x0, 0x10(%rbx)
movb $0x8, -0xe(%rbx)
andw $0x0, -0x10(%rbx)
movw $0x7, -0xd(%rbx)
andl $0x0, -0xb(%rbx)
pushq $0x8
popq %rsi
movq %rbx, %rdi
callq 0x1ff78
bswapl %ebp
leaq 0x8(%rsp), %rsi
movq 0x10(%rsi), %rax
movl %ebp, (%rax)
movq 0x10(%rsi), %rax
andl $0x0, 0x4(%rax)
movq %r14, %rdi
callq 0x22ef8
movq %rbx, %rdi
callq 0xf41c
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
jmp 0x22253
movq %rax, %r14
movq %rbx, %rdi
callq 0xf41c
movq %r14, %rdi
callq 0xbba0
// File: /workspace/github_cpp_makefile_star2_O2/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 0x22e4d
bswapl %esi
movl %esi, 0x5(%rdi)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
pushq $0x10
popq %rdi
callq 0xb330
movq %rax, %rbx
leaq 0xa5d5(%rip), %rsi      # 0x2d434
movq %rax, %rdi
callq 0xbcc0
movq 0x2314a(%rip), %rsi     # 0x45fb8
movq 0x2311b(%rip), %rdx     # 0x45f90
movq %rbx, %rdi
callq 0xbb50
movq %rax, %r14
movq %rbx, %rdi
callq 0xb4d0
movq %r14, %rdi
callq 0xbba0
// File: /workspace/github_cpp_makefile_star2_O2/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 0x22eb5
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
pushq $0x10
popq %rdi
callq 0xb330
movq %rax, %rbx
leaq 0xa57b(%rip), %rsi      # 0x2d442
movq %rax, %rdi
callq 0xbcc0
movq 0x230e2(%rip), %rsi     # 0x45fb8
movq 0x230b3(%rip), %rdx     # 0x45f90
movq %rbx, %rdi
callq 0xbb50
movq %rax, %r14
movq %rbx, %rdi
callq 0xb4d0
movq %r14, %rdi
callq 0xbba0
// File: /workspace/github_cpp_makefile_star2_O2/kztomita[P]http-dump/./http2_socket.h
// Function: void write_http2_frame<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>>>>>&, http2_frame const&)
void write_http2_frame(SyncWriteStream& socket, const http2_frame& frame) {
  namespace asio = boost::asio;

  if (frame.header().length() != frame.payload().size()) {
    std::cerr << "payload length mismatch." << std::endl;
  }

  asio::write(socket, asio::buffer(reinterpret_cast<const char*>(&frame.header()), sizeof(http2_frame_header)));

  if (frame.payload().size()) {
    asio::write(socket, asio::buffer(reinterpret_cast<const char*>(frame.payload_buffer()), frame.payload().size()));
  }

  debug_message("SEND");
  debug_dump(frame);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movzwl (%rsi), %eax
movzbl 0x2(%rsi), %ecx
shll $0x10, %ecx
orl %eax, %ecx
bswapl %ecx
shrl $0x8, %ecx
movq 0x18(%rsi), %rax
subq 0x10(%rsi), %rax
cmpq %rcx, %rax
je 0x22f3e
movq 0x230b6(%rip), %rdi     # 0x45fe0
leaq 0xa522(%rip), %rsi      # 0x2d453
callq 0xb5e0
movq %rax, %rdi
callq 0xb320
leaq 0x8(%rsp), %rsi
movq %rbx, (%rsi)
movq $0x9, 0x8(%rsi)
movq %r14, %rdi
xorl %edx, %edx
callq 0x21b2d
movq 0x10(%rbx), %rax
movq 0x18(%rbx), %rcx
subq %rax, %rcx
je 0x22f7b
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
movq %rcx, 0x8(%rsi)
movq %r14, %rdi
xorl %edx, %edx
callq 0x21b2d
leaq 0xa4ea(%rip), %rsi      # 0x2d46c
leaq 0x8(%rsp), %r14
leaq 0x7(%rsp), %rdx
movq %r14, %rdi
callq 0xd416
movq %r14, %rdi
callq 0x1e6a7
leaq 0x8(%rsp), %rdi
callq 0xb2f0
movq %rbx, %rdi
callq 0x22fcb
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xb2f0
movq %rbx, %rdi
callq 0xbba0
// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
movq (%rdx), %r12
movq 0x8(%rdx), %r13
leaq 0xf(%rsp), %r14
pushq $0x7
popq %r15
cmpq %r13, %r12
je 0x235ad
movb $0x0, 0xf(%rsp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x23736
movl 0x8(%r12), %esi
xorl %edi, %edi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x236b5
movq (%r12), %rdi
movq 0x8(%r12), %rsi
addq %rdi, %rsi
movq %rbx, %rdx
callq 0x23824
movl 0x28(%r12), %esi
xorl %edi, %edi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x236b5
movq 0x20(%r12), %rdi
movq 0x28(%r12), %rsi
addq %rdi, %rsi
movq %rbx, %rdx
callq 0x23824
addq $0x40, %r12
jmp 0x23545
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x235c0
movq %rax, %r14
movq %rbx, %rdi
callq 0xf41c
movq %r14, %rdi
callq 0xbba0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
subq $0x10, %rsp
movq %rcx, %rbx
movq %rdx, %rcx
pushq $-0x1
popq %rdx
shll %cl, %edx
movl %edx, %eax
notl %eax
movl %esi, %ebp
subl %eax, %ebp
jae 0x236e5
movzbl %dil, %ecx
andl %ecx, %edx
andl %esi, %eax
orl %edx, %eax
leaq 0xf(%rsp), %rsi
movb %al, (%rsi)
jmp 0x23724
orb %dil, %al
leaq 0xe(%rsp), %rsi
movb %al, (%rsi)
movq %rbx, %rdi
callq 0x23736
leaq 0xc(%rsp), %r14
cmpl $0x80, %ebp
jb 0x2371c
movl %ebp, %eax
orb $-0x80, %al
movb %al, 0xc(%rsp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x23736
shrl $0x7, %ebp
jmp 0x236fc
leaq 0xd(%rsp), %rsi
movb %bpl, (%rsi)
movq %rbx, %rdi
callq 0x23736
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop