LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/ambersun1234[P]AVL_Tree/./googletest/googletest/src/gtest.cc
// Function: testing::internal::OpenFileForWriting(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
static FILE* OpenFileForWriting(const std::string& output_file) {
  FILE* fileout = NULL;
  FilePath output_file_path(output_file);
  FilePath output_dir(output_file_path.RemoveFileName());

  if (output_dir.CreateDirectoriesRecursively()) {
    fileout = posix::FOpen(output_file.c_str(), "w");
  }
  if (fileout == NULL) {
    GTEST_LOG_(FATAL) << "Unable to open file \"" << output_file << "\"";
  }
  return fileout;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdi, %r14
leaq 0x28(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2ab1a
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0x27d2c
leaq 0x8(%rsp), %rdi
callq 0x27f28
testb %al, %al
je 0x18955
movq (%r14), %rdi
leaq 0x1e063(%rip), %rsi     # 0x369ae
callq 0x75c0
movq %rax, %rbx
jmp 0x18957
xorl %ebx, %ebx
testq %rbx, %rbx
jne 0x189c0
leaq 0x1d2b9(%rip), %rdx     # 0x35c1c
leaq 0x4(%rsp), %rdi
movl $0x3, %esi
movl $0xcf, %ecx
callq 0x283be
movq 0x3066a(%rip), %rdi     # 0x48fe8
leaq 0x1ea22(%rip), %rsi     # 0x373a7
movl $0x15, %edx
callq 0x7560
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq 0x3064b(%rip), %rdi     # 0x48fe8
callq 0x7560
leaq 0x1dd67(%rip), %rsi     # 0x36710
movl $0x1, %edx
movq %rax, %rdi
callq 0x7560
leaq 0x4(%rsp), %rdi
callq 0x28500
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x189db
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x7480
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x189f6
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x7480
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r14
retq
jmp 0x18a03
movq %rax, %rbx
jmp 0x18a1a
movq %rax, %rbx
jmp 0x18a35
movq %rax, %rbx
leaq 0x4(%rsp), %rdi
callq 0x28500
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x18a35
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x7480
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x18a50
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x7480
movq %rbx, %rdi
callq 0x7960
// File: /workspace/github_cpp_makefile_star2_O1/ambersun1234[P]AVL_Tree/./googletest/googletest/src/gtest.cc
// Function: testing::internal::XmlUnitTestResultPrinter::ListTestsMatchingFilter(std::vector<testing::TestCase*, std::allocator<testing::TestCase*>> const&)
void XmlUnitTestResultPrinter::ListTestsMatchingFilter(
    const std::vector<TestCase*>& test_cases) {
  FILE* xmlout = OpenFileForWriting(output_file_);
  std::stringstream stream;
  PrintXmlTestsList(&stream, test_cases);
  fprintf(xmlout, "%s", StringStreamToString(&stream).c_str());
  fclose(xmlout);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
movq %rsi, %r14
addq $0x8, %rdi
callq 0x1890c
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x7320
leaq 0x30(%rsp), %rdi
movq %r14, %rsi
callq 0x19140
movq %rsp, %rdi
leaq 0x20(%rsp), %rsi
callq 0x114c9
leaq 0x10(%rsp), %r14
movq -0x10(%r14), %rdi
movq %rbx, %rsi
callq 0x7530
movq -0x10(%r14), %rdi
cmpq %r14, %rdi
je 0x190e4
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x7480
movq %rbx, %rdi
callq 0x7440
movq 0x2fea5(%rip), %rsi     # 0x48f98
leaq 0x20(%rsp), %rdi
callq 0x7360
leaq 0xa0(%rsp), %rdi
callq 0x7170
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r14
retq
jmp 0x19117
movq %rax, %rbx
movq 0x2fe77(%rip), %rsi     # 0x48f98
leaq 0x20(%rsp), %rdi
callq 0x7360
leaq 0xa0(%rsp), %rdi
callq 0x7170
movq %rbx, %rdi
callq 0x7960
// File: /workspace/github_cpp_makefile_star2_O1/ambersun1234[P]AVL_Tree/./googletest/googletest/src/gtest.cc
// Function: testing::internal::JsonUnitTestResultPrinter::OnTestIterationEnd(testing::UnitTest const&, int)
void JsonUnitTestResultPrinter::OnTestIterationEnd(const UnitTest& unit_test,
                                                  int /*iteration*/) {
  FILE* jsonout = OpenFileForWriting(output_file_);
  std::stringstream stream;
  PrintJsonUnitTest(&stream, unit_test);
  fprintf(jsonout, "%s", StringStreamToString(&stream).c_str());
  fclose(jsonout);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
movq %rsi, %r14
addq $0x8, %rdi
callq 0x1890c
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x7320
leaq 0x30(%rsp), %rdi
movq %r14, %rsi
callq 0x1bd5e
movq %rsp, %rdi
leaq 0x20(%rsp), %rsi
callq 0x114c9
leaq 0x10(%rsp), %r14
movq -0x10(%r14), %rdi
movq %rbx, %rsi
callq 0x7530
movq -0x10(%r14), %rdi
cmpq %r14, %rdi
je 0x1bd02
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x7480
movq %rbx, %rdi
callq 0x7440
movq 0x2d287(%rip), %rsi     # 0x48f98
leaq 0x20(%rsp), %rdi
callq 0x7360
leaq 0xa0(%rsp), %rdi
callq 0x7170
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r14
retq
jmp 0x1bd35
movq %rax, %rbx
movq 0x2d259(%rip), %rsi     # 0x48f98
leaq 0x20(%rsp), %rdi
callq 0x7360
leaq 0xa0(%rsp), %rdi
callq 0x7170
movq %rbx, %rdi
callq 0x7960
// File: /workspace/github_cpp_makefile_star2_O1/ambersun1234[P]AVL_Tree/./googletest/googletest/src/gtest.cc
// Function: testing::internal::JsonUnitTestResultPrinter::TestPropertiesAsJson(testing::TestResult const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
std::string JsonUnitTestResultPrinter::TestPropertiesAsJson(
    const TestResult& result, const std::string& indent) {
  Message attributes;
  for (int i = 0; i < result.test_property_count(); ++i) {
    const TestProperty& property = result.GetTestProperty(i);
    attributes << ",\n" << indent << "\"" << property.key() << "\": "
               << "\"" << EscapeJson(property.value()) << "\"";
  }
  return attributes.GetString();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, 0x30(%rsp)
leaq 0x8(%rsp), %rdi
callq 0x11254
movq 0x58(%r15), %rax
subq 0x50(%r15), %rax
shrq $0x6, %rax
testl %eax, %eax
jle 0x1e36a
movq 0x8(%rsp), %r12
addq $0x10, %r12
xorl %ebp, %ebp
movq %r15, %rdi
movl %ebp, %esi
callq 0x14a6e
movq %rax, %r13
movl $0x2, %edx
movq %r12, %rdi
leaq 0x184bd(%rip), %rsi     # 0x36713
callq 0x7560
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %r12, %rdi
callq 0x7560
movl $0x1, %edx
movq %r12, %rdi
leaq 0x18497(%rip), %rsi     # 0x36710
callq 0x7560
movq (%r13), %rbx
testq %rbx, %rbx
je 0x1e294
movq %rbx, %rdi
callq 0x71e0
movq %rax, %rdx
jmp 0x1e2a0
movl $0x6, %edx
leaq 0x16400(%rip), %rbx     # 0x346a0
movq %r12, %rdi
movq %rbx, %rsi
callq 0x7560
movl $0x3, %edx
movq %r12, %rdi
leaq 0x18431(%rip), %rsi     # 0x366eb
callq 0x7560
movl $0x1, %edx
movq %r12, %rdi
leaq 0x18442(%rip), %rsi     # 0x36710
callq 0x7560
movq 0x20(%r13), %rsi
leaq 0x38(%rsp), %rbx
movq %rbx, %rdi
leaq 0x7(%rsp), %rdx
callq 0x2a9f6
leaq 0x10(%rsp), %rdi
movq %rbx, %rsi
callq 0x1d014
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq %r12, %rdi
callq 0x7560
movl $0x1, %edx
movq %r12, %rdi
leaq 0x183f9(%rip), %rsi     # 0x36710
callq 0x7560
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x1e338
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x7480
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x1e354
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x7480
incl %ebp
movq 0x58(%r15), %rax
subq 0x50(%r15), %rax
shrq $0x6, %rax
cmpl %eax, %ebp
jl 0x1e23a
movq 0x8(%rsp), %rbx
movq 0x30(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x114c9
testq %rbx, %rbx
je 0x1e396
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x8(%rax)
movq $0x0, 0x8(%rsp)
movq %r14, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1e3f0
jmp 0x1e3f0
movq %rax, %rbx
jmp 0x1e3d0
movq %rax, %rbx
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x1e3d0
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x7480
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x1e3f3
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x7480
jmp 0x1e3f3
jmp 0x1e3f0
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x1e40c
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, 0x8(%rsp)
movq %rbx, %rdi
callq 0x7960
// File: /workspace/github_cpp_makefile_star2_O1/ambersun1234[P]AVL_Tree/./googletest/googletest/src/gtest.cc
// Function: testing::internal::StreamingListener::UrlEncode[abi:cxx11](char const*)
std::string StreamingListener::UrlEncode(const char* str) {
  std::string result;
  result.reserve(strlen(str) + 1);
  for (char ch = *str; ch != '\0'; ch = *++str) {
    switch (ch) {
      case '%':
      case '=':
      case '&':
      case '\n':
        result.append("%" + String::FormatByte(static_cast<unsigned char>(ch)));
        break;
      default:
        result.push_back(ch);
        break;
    }
  }
  return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rsp)
movq %rax, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq %rsi, %rdi
callq 0x71e0
leaq 0x1(%rax), %rsi
movq %rbx, %rdi
callq 0x7860
leaq 0x18(%rsp), %r13
movabsq $0x2000006000000400, %rbp # imm = 0x2000006000000400
leaq 0x28(%rsp), %r15
leaq 0x17932(%rip), %r12     # 0x36730
movzbl (%r14), %eax
cmpq $0x3d, %rax
ja 0x1eec5
btq %rax, %rbp
jae 0x1eec0
movzbl %al, %esi
movq %r15, %rdi
callq 0x148bc
movl $0x1, %r8d
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
movq %r12, %rcx
callq 0x7540
movq %r13, 0x8(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1ee59
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x1ee61
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x7150
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x1eea2
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x7480
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x1eed0
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x7480
jmp 0x1eed0
testq %rax, %rax
je 0x1eed8
movsbl %al, %esi
movq %rbx, %rdi
callq 0x73e0
incq %r14
jmp 0x1edfe
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1ef0a
jmp 0x1ef0a
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x1ef12
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x7480
jmp 0x1ef12
movq %rax, %r14
jmp 0x1ef2e
movq %rax, %r14
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x1ef2e
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x7480
movq (%rsp), %rax
movq (%rbx), %rdi
cmpq %rax, %rdi
je 0x1ef45
movq (%rax), %rsi
incq %rsi
callq 0x7480
movq %r14, %rdi
callq 0x7960
nop
// File: /workspace/github_cpp_makefile_star2_O1/ambersun1234[P]AVL_Tree/./googletest/googletest/src/gtest.cc
// Function: testing::internal::UnitTestImpl::ConfigureXmlOutput()
void UnitTestImpl::ConfigureXmlOutput() {
  const std::string& output_format = UnitTestOptions::GetOutputFormat();
  if (output_format == "xml") {
    listeners()->SetDefaultXmlGenerator(new XmlUnitTestResultPrinter(
        UnitTestOptions::GetAbsolutePathToOutputFile().c_str()));
  } else if (output_format == "json") {
    listeners()->SetDefaultXmlGenerator(new JsonUnitTestResultPrinter(
        UnitTestOptions::GetAbsolutePathToOutputFile().c_str()));
  } else if (output_format != "") {
    GTEST_LOG_(WARNING) << "WARNING: unrecognized output format \""
                        << output_format << "\" ignored.";
  }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
leaq 0x20(%rsp), %r14
movq %r14, %rdi
callq 0xf356
leaq 0x14d87(%rip), %rsi     # 0x34dcc
movq %r14, %rdi
callq 0x7140
testl %eax, %eax
je 0x200ef
leaq 0x16808(%rip), %rsi     # 0x36864
leaq 0x20(%rsp), %rdi
callq 0x7140
testl %eax, %eax
je 0x20129
leaq 0x16392(%rip), %rsi     # 0x36407
leaq 0x20(%rsp), %rdi
callq 0x7140
testl %eax, %eax
je 0x2017c
leaq 0x15b8e(%rip), %rdx     # 0x35c1c
movq %rsp, %rdi
movl $0x1, %esi
movl $0x1346, %ecx           # imm = 0x1346
callq 0x283be
movq 0x28f41(%rip), %rdi     # 0x48fe8
leaq 0x167bb(%rip), %rsi     # 0x36869
movl $0x25, %edx
callq 0x7560
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
movq 0x28f1f(%rip), %rdi     # 0x48fe8
callq 0x7560
leaq 0x167ba(%rip), %rsi     # 0x3688f
movl $0xa, %edx
movq %rax, %rdi
callq 0x7560
movq %rsp, %rdi
callq 0x28500
jmp 0x2017c
movl $0x28, %edi
callq 0x7450
movq %rax, %r14
movq %rsp, %rdi
callq 0xf3c2
movb $0x1, %bpl
movq (%rsp), %rsi
movq %r14, %rdi
callq 0x187ae
addq $0x190, %rbx            # imm = 0x190
xorl %ebp, %ebp
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1f276
jmp 0x20161
movl $0x28, %edi
callq 0x7450
movq %rax, %r14
movq %rsp, %rdi
callq 0xf3c2
movb $0x1, %bpl
movq (%rsp), %rsi
movq %r14, %rdi
callq 0x1bc00
addq $0x190, %rbx            # imm = 0x190
xorl %ebp, %ebp
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1f276
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2017c
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x7480
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x20197
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x7480
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
jmp 0x201a4
jmp 0x201ae
movq %rax, %rbx
movb $0x1, %bpl
jmp 0x201de
jmp 0x201c0
movq %rax, %rbx
jmp 0x201f0
movq %rax, %rbx
movq %rsp, %rdi
callq 0x28500
jmp 0x201f0
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x201de
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x7480
testb %bpl, %bpl
je 0x201f0
movl $0x28, %esi
movq %r14, %rdi
callq 0x7480
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2020b
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x7480
movq %rbx, %rdi
callq 0x7960
nop
// File: /workspace/github_cpp_makefile_star2_O1/ambersun1234[P]AVL_Tree/./googletest/googletest/src/gtest-death-test.cc
// Function: testing::internal::InDeathTestChild()
bool InDeathTestChild() {
# if GTEST_OS_WINDOWS || GTEST_OS_FUCHSIA

  // On Windows and Fuchsia, death tests are thread-safe regardless of the value
  // of the death_test_style flag.
  return !GTEST_FLAG(internal_run_death_test).empty();

# else

  if (GTEST_FLAG(death_test_style) == "threadsafe")
    return !GTEST_FLAG(internal_run_death_test).empty();
  else
    return g_in_fast_death_test_child;
#endif
}

// Assembly:
pushq %rax
leaq 0x282ec(%rip), %rdi     # 0x498e8
leaq 0x154e3(%rip), %rsi     # 0x36ae6
callq 0x7140
xorl %ecx, %ecx
cmpq $0x0, 0x282be(%rip)     # 0x498d0
setne %cl
testl %eax, %eax
movzbl 0x282eb(%rip), %eax     # 0x49909
cmovel %ecx, %eax
andb $0x1, %al
popq %rcx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/ambersun1234[P]AVL_Tree/./googletest/googletest/src/gtest-port.cc
// Function: testing::internal::CaptureStream(int, char const*, testing::internal::CapturedStream**)
static void CaptureStream(int fd, const char* stream_name,
                          CapturedStream** stream) {
  if (*stream != NULL) {
    GTEST_LOG_(FATAL) << "Only one " << stream_name
                      << " capturer can exist at a time.";
  }
  *stream = new CapturedStream(fd);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %edi, %ebp
cmpq $0x0, (%rdx)
je 0x28615
movq %rsi, %r14
leaq 0xe967(%rip), %rdx      # 0x36ef2
leaq 0x4(%rsp), %rdi
movl $0x3, %esi
movl $0x437, %ecx            # imm = 0x437
callq 0x283be
movq 0x20a42(%rip), %r15     # 0x48fe8
leaq 0xf44b(%rip), %rsi      # 0x379f8
movl $0x9, %edx
movq %r15, %rdi
callq 0x7560
testq %r14, %r14
je 0x285db
movq %r14, %rdi
callq 0x71e0
movq 0x20a1a(%rip), %rdi     # 0x48fe8
movq %r14, %rsi
movq %rax, %rdx
callq 0x7560
jmp 0x285f3
movq (%r15), %rax
movq -0x18(%rax), %rax
leaq (%r15,%rax), %rdi
movl 0x20(%r15,%rax), %esi
orl $0x1, %esi
callq 0x78f0
movq 0x209ee(%rip), %rdi     # 0x48fe8
leaq 0xf401(%rip), %rsi      # 0x37a02
movl $0x1e, %edx
callq 0x7560
leaq 0x4(%rsp), %rdi
callq 0x28500
movl $0x28, %edi
callq 0x7450
movq %rax, %r14
movq %rax, %rdi
movl %ebp, %esi
callq 0x30a5e
movq %r14, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movl $0x28, %esi
movq %r14, %rdi
callq 0x7480
jmp 0x28659
movq %rax, %rbx
leaq 0x4(%rsp), %rdi
callq 0x28500
movq %rbx, %rdi
callq 0x7960
// File: /workspace/github_cpp_makefile_star2_O1/ambersun1234[P]AVL_Tree/./googletest/googletest/src/gtest-printers.cc
// Function: testing::internal::CharFormat testing::internal::PrintCharsAsStringTo<char>(char const*, unsigned long, std::ostream*)
static CharFormat PrintCharsAsStringTo(
    const CharType* begin, size_t len, ostream* os) {
  const char* const kQuoteBegin = sizeof(CharType) == 1 ? "\"" : "L\"";
  *os << kQuoteBegin;
  bool is_previous_hex = false;
  CharFormat print_format = kAsIs;
  for (size_t index = 0; index < len; ++index) {
    const CharType cur = begin[index];
    if (is_previous_hex && IsXDigit(cur)) {
      // Previous character is of '\x..' form and this character can be
      // interpreted as another hexadecimal digit in its number. Break string to
      // disambiguate.
      *os << "\" " << kQuoteBegin;
    }
    is_previous_hex = PrintAsStringLiteralTo(cur, os) == kHexEscape;
    // Remember if any characters required hex escaping.
    if (is_previous_hex) {
      print_format = kHexEscape;
    }
  }
  *os << "\"";
  return print_format;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0xdba7(%rip), %rsi      # 0x36710
movl $0x1, %edx
movq %rbx, %rdi
callq 0x7560
testq %r14, %r14
je 0x28bde
xorl %ecx, %ecx
xorl %r13d, %r13d
xorl %ebp, %ebp
movzbl (%r15,%r13), %r12d
testb $0x1, %cl
je 0x28bc0
movl %r12d, %edi
callq 0x70f0
testl %eax, %eax
je 0x28bc0
movl $0x2, %edx
movq %rbx, %rdi
leaq 0xf0bf(%rip), %rsi      # 0x37c66
callq 0x7560
movl $0x1, %edx
movq %rbx, %rdi
leaq 0xdb55(%rip), %rsi      # 0x36710
callq 0x7560
movl %r12d, %edi
movq %rbx, %rsi
callq 0x2a9ac
cmpl $0x1, %eax
sete %cl
cmovel %eax, %ebp
incq %r13
cmpq %r13, %r14
jne 0x28b82
jmp 0x28be0
xorl %ebp, %ebp
leaq 0xdb29(%rip), %rsi      # 0x36710
movl $0x1, %edx
movq %rbx, %rdi
callq 0x7560
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/ambersun1234[P]AVL_Tree/./googletest/googletest/src/gtest.cc
// Function: bool testing::internal::ParseStringFlag<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(char const*, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*)
static bool ParseStringFlag(const char* str, const char* flag, String* value) {
  // Gets the value of the flag as a string.
  const char* const value_str = ParseFlagValue(str, flag, false);

  // Aborts if the parsing failed.
  if (value_str == NULL) return false;

  // Sets *value to the value of the flag.
  *value = value_str;
  return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
xorl %edx, %edx
callq 0x2134f
movq %rax, %r14
testq %rax, %rax
je 0x2a55a
movq 0x8(%rbx), %r15
movq %r14, %rdi
callq 0x71e0
movq %rbx, %rdi
xorl %esi, %esi
movq %r15, %rdx
movq %r14, %rcx
movq %rax, %r8
callq 0x7850
testq %r14, %r14
setne %al
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/ambersun1234[P]AVL_Tree/./googletest/googletest/src/gtest-printers.cc
// Function: testing::internal::CharFormat testing::internal::PrintAsCharLiteralTo<wchar_t, wchar_t>(wchar_t, std::ostream*)
static CharFormat PrintAsCharLiteralTo(Char c, ostream* os) {
  switch (static_cast<wchar_t>(c)) {
    case L'\0':
      *os << "\\0";
      break;
    case L'\'':
      *os << "\\'";
      break;
    case L'\\':
      *os << "\\\\";
      break;
    case L'\a':
      *os << "\\a";
      break;
    case L'\b':
      *os << "\\b";
      break;
    case L'\f':
      *os << "\\f";
      break;
    case L'\n':
      *os << "\\n";
      break;
    case L'\r':
      *os << "\\r";
      break;
    case L'\t':
      *os << "\\t";
      break;
    case L'\v':
      *os << "\\v";
      break;
    default:
      if (IsPrintableAscii(c)) {
        *os << static_cast<char>(c);
        return kAsIs;
      } else {
        ostream::fmtflags flags = os->flags();
        *os << "\\x" << std::hex << std::uppercase
            << static_cast<int>(static_cast<UnsignedChar>(c));
        os->flags(flags);
        return kHexEscape;
      }
  }
  return kSpecialEscape;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movl %edi, %r14d
cmpl $0xd, %edi
ja 0x2a8b7
movl %r14d, %eax
leaq 0xa393(%rip), %rcx      # 0x34c38
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0xb57b(%rip), %rsi      # 0x35e30
jmp 0x2a934
cmpl $0x27, %r14d
je 0x2a92d
cmpl $0x5c, %r14d
jne 0x2a8cc
leaq 0xd377(%rip), %rsi      # 0x37c41
jmp 0x2a934
leal -0x20(%r14), %eax
cmpl $0x5e, %eax
ja 0x2a94f
leaq 0xf(%rsp), %rsi
movb %r14b, (%rsi)
movl $0x1, %edx
movq %rbx, %rdi
callq 0x7560
xorl %eax, %eax
jmp 0x2a946
leaq 0xd352(%rip), %rsi      # 0x37c47
jmp 0x2a934
leaq 0xbdbc(%rip), %rsi      # 0x366ba
jmp 0x2a934
leaq 0xbdb6(%rip), %rsi      # 0x366bd
jmp 0x2a934
leaq 0xd334(%rip), %rsi      # 0x37c44
jmp 0x2a934
leaq 0xbd9e(%rip), %rsi      # 0x366b7
jmp 0x2a934
leaq 0xbd8f(%rip), %rsi      # 0x366b1
jmp 0x2a934
leaq 0xbd89(%rip), %rsi      # 0x366b4
jmp 0x2a934
leaq 0xd30a(%rip), %rsi      # 0x37c3e
movl $0x2, %edx
movq %rbx, %rdi
callq 0x7560
movl $0x2, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq (%rbx), %rax
movq -0x18(%rax), %rax
movl 0x18(%rbx,%rax), %ebp
leaq 0xd2e9(%rip), %rsi      # 0x37c4a
movl $0x2, %edx
movq %rbx, %rdi
callq 0x7560
movq (%rbx), %rax
movq -0x18(%rax), %rcx
movl 0x18(%rbx,%rcx), %edx
andl $-0x4b, %edx
orl $0x8, %edx
movl %edx, 0x18(%rbx,%rcx)
movq -0x18(%rax), %rax
orl $0x4000, 0x18(%rbx,%rax) # imm = 0x4000
movq %rbx, %rdi
movl %r14d, %esi
callq 0x7920
movq (%rbx), %rax
movq -0x18(%rax), %rax
movl %ebp, 0x18(%rbx,%rax)
movl $0x1, %eax
jmp 0x2a946
// File: /workspace/github_cpp_makefile_star2_O1/ambersun1234[P]AVL_Tree/./googletest/googletest/src/gtest.cc
// Function: testing::internal::ScopedPrematureExitFile::ScopedPrematureExitFile(char const*)
explicit ScopedPrematureExitFile(const char* premature_exit_filepath)
      : premature_exit_filepath_(premature_exit_filepath ?
                                 premature_exit_filepath : "") {
    // If a path to the premature-exit file is specified...
    if (!premature_exit_filepath_.empty()) {
      // create the file with a single "0" character in it.  I/O
      // errors are ignored as there's nothing better we can do and we
      // don't want to fail the test because of this.
      FILE* pfile = posix::FOpen(premature_exit_filepath, "w");
      fwrite("0", 1, 1, pfile);
      fclose(pfile);
    }
  }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
testq %rsi, %rsi
leaq 0x9a8c(%rip), %r15      # 0x36407
cmovneq %rsi, %r15
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
movq %r15, %rdi
callq 0x71e0
leaq (%rax,%r15), %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x30c22
cmpq $0x0, 0x8(%r14)
je 0x2c9d0
leaq 0xa003(%rip), %rsi      # 0x369ae
movq %rbx, %rdi
callq 0x75c0
movq %rax, %rbx
movl $0x30, %edi
movq %rax, %rsi
callq 0x7650
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x7440
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/ambersun1234[P]AVL_Tree/./googletest/googletest/src/gtest.cc
// Function: testing::internal::ScopedPrematureExitFile::~ScopedPrematureExitFile()
~ScopedPrematureExitFile() {
    if (!premature_exit_filepath_.empty()) {
      int retval = remove(premature_exit_filepath_.c_str());
      if (retval) {
        GTEST_LOG_(ERROR) << "Failed to remove premature exit filepath \""
                          << premature_exit_filepath_ << "\" with error "
                          << retval;
      }
    }
  }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
cmpq $0x0, 0x8(%rdi)
je 0x2cbe1
movq (%rbx), %rdi
callq 0x7990
testl %eax, %eax
je 0x2cbe1
movl %eax, %ebp
leaq 0x90a5(%rip), %rdx      # 0x35c1c
leaq 0xc(%rsp), %rdi
movl $0x2, %esi
movl $0x112d, %ecx           # imm = 0x112D
callq 0x283be
movq 0x1c456(%rip), %rdi     # 0x48fe8
leaq 0xa881(%rip), %rsi      # 0x3741a
movl $0x2a, %edx
callq 0x7560
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq 0x1c437(%rip), %rdi     # 0x48fe8
callq 0x7560
movq %rax, %r14
leaq 0xa885(%rip), %rsi      # 0x37445
movl $0xd, %edx
movq %rax, %rdi
callq 0x7560
movq %r14, %rdi
movl %ebp, %esi
callq 0x7920
leaq 0xc(%rsp), %rdi
callq 0x28500
movq (%rbx), %rdi
addq $0x10, %rbx
cmpq %rbx, %rdi
je 0x2cc00
movq (%rbx), %rsi
incq %rsi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x7480
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rdi
callq 0xc14c
nop
// File: /workspace/github_cpp_makefile_star2_O1/ambersun1234[P]AVL_Tree/./googletest/googletest/src/gtest.cc
// Function: void testing::internal::InitGoogleTestImpl<char>(int*, char**)
void InitGoogleTestImpl(int* argc, CharType** argv) {
  // We don't want to run the initialization code twice.
  if (GTestIsInitialized()) return;

  if (*argc <= 0) return;

  g_argvs.clear();
  for (int i = 0; i != *argc; i++) {
    g_argvs.push_back(StreamableToString(argv[i]));
  }

#if GTEST_HAS_ABSL
  absl::InitializeSymbolizer(g_argvs[0].c_str());
#endif  // GTEST_HAS_ABSL

  ParseGoogleTestFlagsOnly(argc, argv);
  GetUnitTestImpl()->PostFlagParsingInit();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r13
movq %rdi, %r14
leaq 0x1c0df(%rip), %rsi     # 0x49858
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x2aa90
movq 0x8(%r15), %rbx
movq (%r15), %r12
movq %r15, %rdi
callq 0x2aa34
cmpq %r12, %rbx
jne 0x2d835
cmpl $0x0, (%r14)
jle 0x2d835
movq %r13, (%rsp)
movq 0x1c0a5(%rip), %rsi     # 0x49858
leaq 0x1c09e(%rip), %rdi     # 0x49858
callq 0x334e8
cmpl $0x0, (%r14)
je 0x2d818
leaq 0x18(%rsp), %rbp
xorl %ebx, %ebx
leaq 0x8(%rsp), %r15
leaq 0x1c080(%rip), %r12     # 0x49858
movq (%rsp), %r13
movq %r15, %rdi
movq %r13, %rsi
callq 0x333c7
movq %r12, %rdi
movq %r15, %rsi
callq 0x3111c
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x2d809
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x7480
incq %rbx
movl (%r14), %eax
addq $0x8, %r13
cmpq %rax, %rbx
jne 0x2d7dc
movq %r14, %rdi
movq (%rsp), %rsi
callq 0x2d48e
callq 0xeba0
movq 0x1c088(%rip), %rdi     # 0x498b8
callq 0x203d6
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x2d85e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x7480
movq %rbx, %rdi
callq 0x7960
// File: /workspace/github_cpp_makefile_star2_O1/ambersun1234[P]AVL_Tree/./googletest/googletest/src/gtest-internal-inl.h
// Function: testing::internal::StreamingListener::SocketWriter::Send(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
virtual void Send(const std::string& message) {
      GTEST_CHECK_(sockfd_ != -1)
          << "Send() can be called only when there is a connection.";

      const int len = static_cast<int>(message.length());
      if (write(sockfd_, message.c_str(), len) != len) {
        GTEST_LOG_(WARNING)
            << "stream_result_to: failed to stream to "
            << host_name_ << ":" << port_num_;
      }
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
cmpl $-0x1, 0x8(%rdi)
jne 0x30628
leaq 0x6ceb(%rip), %rdx      # 0x372c5
leaq 0xc(%rsp), %rdi
movl $0x3, %esi
movl $0x42d, %ecx            # imm = 0x42D
callq 0x283be
movq 0x189f3(%rip), %rdi     # 0x48fe8
leaq 0x6e57(%rip), %rsi      # 0x37453
movl $0x20, %edx
callq 0x7560
movq 0x189db(%rip), %rdi     # 0x48fe8
leaq 0x6e60(%rip), %rsi      # 0x37474
movl $0x35, %edx
callq 0x7560
leaq 0xc(%rsp), %rdi
callq 0x28500
movslq 0x8(%r14), %r15
movl 0x8(%rbx), %edi
movq (%r14), %rsi
movq %r15, %rdx
callq 0x7190
cmpq %r15, %rax
je 0x306b7
leaq 0x6c7f(%rip), %rdx      # 0x372c5
leaq 0x8(%rsp), %rdi
movl $0x1, %esi
movl $0x432, %ecx            # imm = 0x432
callq 0x283be
movq 0x18987(%rip), %rdi     # 0x48fe8
leaq 0x6e42(%rip), %rsi      # 0x374aa
movl $0x26, %edx
callq 0x7560
movq 0x10(%rbx), %rsi
movq 0x18(%rbx), %rdx
movq 0x18967(%rip), %rdi     # 0x48fe8
callq 0x7560
movq %rax, %r14
leaq 0x6183(%rip), %rsi      # 0x36813
movl $0x1, %edx
movq %rax, %rdi
callq 0x7560
movq 0x30(%rbx), %rsi
movq 0x38(%rbx), %rdx
movq %r14, %rdi
callq 0x7560
leaq 0x8(%rsp), %rdi
callq 0x28500
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0xc(%rsp), %rdi
jmp 0x306d3
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x28500
movq %rbx, %rdi
callq 0x7960
// File: /workspace/github_cpp_makefile_star2_O1/ambersun1234[P]AVL_Tree/./googletest/googletest/include/gtest/gtest-printers.h
// Function: testing::internal::UniversalTersePrinter<char const*>::Print(char const*, std::ostream*)
static void Print(const char* str, ::std::ostream* os) {
    if (str == NULL) {
      *os << "NULL";
    } else {
      UniversalPrint(std::string(str), os);
    }
  }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
testq %rdi, %rdi
je 0x30d19
movq %rdi, %r14
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
callq 0x71e0
leaq (%rax,%r14), %rdx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x30c22
movq %r15, %rdi
movq %rbx, %rsi
callq 0x28d1e
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x30d0d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x7480
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x3987(%rip), %rsi      # 0x346a7
movl $0x4, %edx
movq %rbx, %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x7560
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x30d52
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x7480
movq %rbx, %rdi
callq 0x7960
// File: /workspace/github_cpp_makefile_star2_O1/xocoder[P]m_kcptun/vendor/kcp/ikcp.c
// Function: ikcp_log
void ikcp_log(ikcpcb *kcp, int mask, const char *fmt, ...)
{
	char buffer[1024];
	va_list argptr;
	if ((mask & kcp->logmask) == 0 || kcp->writelog == 0) return;
	va_start(argptr, fmt);
	vsprintf(buffer, fmt, argptr);
	va_end(argptr);
	kcp->writelog(buffer, kcp, kcp->user);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x4d0, %rsp            # imm = 0x4D0
movq %rcx, -0xc8(%rbp)
movq %r8, -0xc0(%rbp)
movq %r9, -0xb8(%rbp)
testb %al, %al
je 0x2670
movaps %xmm0, -0xb0(%rbp)
movaps %xmm1, -0xa0(%rbp)
movaps %xmm2, -0x90(%rbp)
movaps %xmm3, -0x80(%rbp)
movaps %xmm4, -0x70(%rbp)
movaps %xmm5, -0x60(%rbp)
movaps %xmm6, -0x50(%rbp)
movaps %xmm7, -0x40(%rbp)
testl %esi, 0xf4(%rdi)
je 0x26d1
movq %rdi, %rbx
cmpq $0x0, 0x100(%rdi)
je 0x26d1
leaq -0xe0(%rbp), %rcx
leaq -0x30(%rbp), %rax
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movabsq $0x3000000018, %rcx     # imm = 0x3000000018
movq %rcx, (%rax)
leaq -0x4e0(%rbp), %r14
movq %r14, %rdi
movq %rdx, %rsi
movq %rax, %rdx
callq 0x2130
movq 0xd8(%rbx), %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq *0x100(%rbx)
addq $0x4d0, %rsp            # imm = 0x4D0
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/xocoder[P]m_kcptun/vendor/kcp/ikcp.c
// Function: ikcp_peeksize
int ikcp_peeksize(const ikcpcb *kcp)
{
	struct IQUEUEHEAD *p;
	IKCPSEG *seg;
	int length = 0;

	assert(kcp);

	if (iqueue_is_empty(&kcp->rcv_queue)) return -1;

	seg = iqueue_entry(kcp->rcv_queue.next, IKCPSEG, node);
	if (seg->frg == 0) return seg->len;

	if (kcp->nrcv_que < seg->frg + 1) return -1;

	for (p = kcp->rcv_queue.next; p != &kcp->rcv_queue; p = p->next) {
		seg = iqueue_entry(p, IKCPSEG, node);
		length += seg->len;
		if (seg->frg == 0) break;
	}

	return length;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testq %rdi, %rdi
je 0x2ca5
leaq 0x98(%rdi), %rdx
movq 0x98(%rdi), %rcx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rcx, %rdx
je 0x2ca3
movl 0x18(%rcx), %esi
testl %esi, %esi
je 0x2ca0
incl %esi
cmpl %esi, 0x64(%rdi)
jb 0x2ca3
xorl %eax, %eax
cmpq %rdx, %rcx
je 0x2ca3
addl 0x2c(%rcx), %eax
cmpl $0x0, 0x18(%rcx)
je 0x2ca3
movq (%rcx), %rcx
jmp 0x2c8d
movl 0x2c(%rcx), %eax
popq %rbp
retq
leaq 0x8394(%rip), %rdi      # 0xb040
leaq 0x8391(%rip), %rsi      # 0xb044
leaq 0x83f9(%rip), %rcx      # 0xb0b3
movl $0x1bd, %edx            # imm = 0x1BD
callq 0x21b0
// File: /workspace/github_cpp_makefile_star2_O1/xocoder[P]m_kcptun/vendor/kcp/ikcp.c
// Function: ikcp_parse_data(IKCPCB*, IKCPSEG*)
void ikcp_parse_data(ikcpcb *kcp, IKCPSEG *newseg)
{
	struct IQUEUEHEAD *p, *prev;
	IUINT32 sn = newseg->sn;
	int repeat = 0;
	
	if (_itimediff(sn, kcp->rcv_nxt + kcp->rcv_wnd) >= 0 ||
		_itimediff(sn, kcp->rcv_nxt) < 0) {
		ikcp_segment_delete(kcp, newseg);
		return;
	}

	for (p = kcp->rcv_buf.prev; p != &kcp->rcv_buf; p = prev) {
		IKCPSEG *seg = iqueue_entry(p, IKCPSEG, node);
		prev = p->prev;
		if (seg->sn == sn) {
			repeat = 1;
			break;
		}
		if (_itimediff(sn, seg->sn) > 0) {
			break;
		}
	}

	if (repeat == 0) {
		iqueue_init(&newseg->node);
		iqueue_add(&newseg->node, p);
		kcp->nrcv_buf++;
	}	else {
		ikcp_segment_delete(kcp, newseg);
	}

#if 0
	ikcp_qprint("rcvbuf", &kcp->rcv_buf);
	printf("rcv_nxt=%lu\n", kcp->rcv_nxt);
#endif

	// move available data from rcv_buf -> rcv_queue
	while (! iqueue_is_empty(&kcp->rcv_buf)) {
		IKCPSEG *seg = iqueue_entry(kcp->rcv_buf.next, IKCPSEG, node);
		if (seg->sn == kcp->rcv_nxt && kcp->nrcv_que < kcp->rcv_wnd) {
			iqueue_del(&seg->node);
			kcp->nrcv_buf--;
			iqueue_add_tail(&seg->node, &kcp->rcv_queue);
			kcp->nrcv_que++;
			kcp->rcv_nxt++;
		}	else {
			break;
		}
	}

#if 0
	ikcp_qprint("queue", &kcp->rcv_queue);
	printf("rcv_nxt=%lu\n", kcp->rcv_nxt);
#endif

#if 1
//	printf("snd(buf=%d, queue=%d)\n", kcp->nsnd_buf, kcp->nsnd_que);
//	printf("rcv(buf=%d, queue=%d)\n", kcp->nrcv_buf, kcp->nrcv_que);
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl 0x24(%rsi), %eax
movl 0x18(%rdi), %ecx
cmpl %ecx, %eax
js 0x2fde
movq %rdi, %rbx
addl 0x3c(%rdi), %ecx
movl %eax, %edx
subl %ecx, %edx
jns 0x2fde
leaq 0xb8(%rbx), %r14
leaq 0xc0(%rbx), %r8
xorl %edx, %edx
movl $0x1, %edi
movq (%r8), %rcx
cmpq %r14, %rcx
je 0x2fc7
movl %eax, %r9d
subl 0x24(%rcx), %r9d
cmovel %edi, %edx
je 0x2fc7
leaq 0x8(%rcx), %r8
testl %r9d, %r9d
jle 0x2faa
testl %edx, %edx
je 0x2ffc
movq 0xd2be(%rip), %rax      # 0x10290
movq %rsi, %rdi
testq %rax, %rax
je 0x3018
callq *%rax
jmp 0x301d
movq 0xd2ab(%rip), %rax      # 0x10290
movq %rsi, %rdi
testq %rax, %rax
je 0x2ff3
popq %rbx
popq %r14
popq %rbp
jmpq *%rax
popq %rbx
popq %r14
popq %rbp
jmp 0x2310
movq %rsi, (%rsi)
movq %rcx, 0x8(%rsi)
movq (%rcx), %rax
movq %rax, (%rsi)
movq (%rcx), %rax
movq %rsi, 0x8(%rax)
movq %rsi, (%rcx)
incl 0x5c(%rbx)
jmp 0x301d
callq 0x2310
movq 0xb8(%rbx), %rdx
cmpq %rdx, %r14
je 0x3089
leaq 0x98(%rbx), %rax
movl 0x18(%rbx), %ecx
xorps %xmm0, %xmm0
cmpl 0x24(%rdx), %ecx
jne 0x3089
movl 0x64(%rbx), %esi
cmpl 0x3c(%rbx), %esi
jae 0x3089
movq (%rdx), %rdi
movq 0x8(%rdx), %r8
movq %r8, 0x8(%rdi)
movq 0x8(%rdx), %r8
movq %rdi, (%r8)
movups %xmm0, (%rdx)
decl 0x5c(%rbx)
movq 0xa0(%rbx), %rdi
movq %rdi, 0x8(%rdx)
movq %rax, (%rdx)
movq %rdx, (%rdi)
movq %rdx, 0xa0(%rbx)
incl %esi
movl %esi, 0x64(%rbx)
incl %ecx
movl %ecx, 0x18(%rbx)
movq 0xb8(%rbx), %rdx
cmpq %rdx, %r14
jne 0x3036
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/xocoder[P]m_kcptun/vendor/kcp/ikcp.c
// Function: ikcp_output(IKCPCB*, void const*, int)
static int ikcp_output(ikcpcb *kcp, const void *data, int size)
{
	assert(kcp);
	assert(kcp->output);
	if (ikcp_canlog(kcp, IKCP_LOG_OUTPUT)) {
		ikcp_log(kcp, IKCP_LOG_OUTPUT, "[RO] %ld bytes", (long)size);
	}
	if (size == 0) return 0;
	return kcp->output((const char*)data, size, kcp, kcp->user);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x3cea
movq %rdi, %r14
cmpq $0x0, 0xf8(%rdi)
je 0x3d09
movl %edx, %ebx
movq %rsi, %r15
testb $0x1, 0xf4(%r14)
je 0x3cb9
cmpq $0x0, 0x100(%r14)
je 0x3cb9
movslq %ebx, %rcx
leaq 0x7544(%rip), %rdx      # 0xb1ee
movq %r14, %rdi
movl $0x1, %esi
xorl %eax, %eax
callq 0x2620
testl %ebx, %ebx
je 0x3cdf
movq 0xd8(%r14), %rcx
movq 0xf8(%r14), %rax
movq %r15, %rdi
movl %ebx, %esi
movq %r14, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmpq *%rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x734f(%rip), %rdi      # 0xb040
leaq 0x734c(%rip), %rsi      # 0xb044
leaq 0x74b6(%rip), %rcx      # 0xb1b5
movl $0xcd, %edx
callq 0x21b0
leaq 0x74d2(%rip), %rdi      # 0xb1e2
leaq 0x732d(%rip), %rsi      # 0xb044
leaq 0x7497(%rip), %rcx      # 0xb1b5
movl $0xce, %edx
callq 0x21b0
// File: /workspace/github_cpp_makefile_star2_O1/xocoder[P]m_kcptun/vendor/kcp/ikcp.c
// Function: ikcp_update
void ikcp_update(ikcpcb *kcp, IUINT32 current)
{
	IINT32 slap;

	kcp->current = current;

	if (kcp->updated == 0) {
		kcp->updated = 1;
		kcp->ts_flush = kcp->current;
	}

	slap = _itimediff(kcp->current, kcp->ts_flush);

	if (slap >= 10000 || slap < -10000) {
		kcp->ts_flush = kcp->current;
		slap = 0;
	}

	if (slap >= 0) {
		kcp->ts_flush += kcp->interval;
		if (_itimediff(kcp->current, kcp->ts_flush) >= 0) {
			kcp->ts_flush = kcp->current + kcp->interval;
		}
		ikcp_flush(kcp);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %esi, 0x4c(%rdi)
cmpl $0x0, 0x70(%rdi)
jne 0x3d3f
movl $0x1, 0x70(%rdi)
movl %esi, 0x54(%rdi)
movl %esi, %eax
subl 0x54(%rdi), %eax
movslq %eax, %rcx
addq $-0x2710, %rcx          # imm = 0xD8F0
cmpq $-0x4e21, %rcx          # imm = 0xB1DF
ja 0x3d5c
movl %esi, 0x54(%rdi)
xorl %eax, %eax
testl %eax, %eax
js 0x3d78
movl 0x50(%rdi), %eax
movl 0x54(%rdi), %ecx
addl %eax, %ecx
addl %esi, %eax
cmpl %ecx, %esi
cmovsl %ecx, %eax
movl %eax, 0x54(%rdi)
popq %rbp
jmp 0x372a
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/xocoder[P]m_kcptun/vendor/kcp/ikcp.c
// Function: ikcp_check
IUINT32 ikcp_check(const ikcpcb *kcp, IUINT32 current)
{
	IUINT32 ts_flush = kcp->ts_flush;
	IINT32 tm_flush = 0x7fffffff;
	IINT32 tm_packet = 0x7fffffff;
	IUINT32 minimal = 0;
	struct IQUEUEHEAD *p;

	if (kcp->updated == 0) {
		return current;
	}

	if (_itimediff(current, ts_flush) >= 10000 ||
		_itimediff(current, ts_flush) < -10000) {
		ts_flush = current;
	}

	if (_itimediff(current, ts_flush) >= 0) {
		return current;
	}

	tm_flush = _itimediff(ts_flush, current);

	for (p = kcp->snd_buf.next; p != &kcp->snd_buf; p = p->next) {
		const IKCPSEG *seg = iqueue_entry(p, const IKCPSEG, node);
		IINT32 diff = _itimediff(seg->resendts, current);
		if (diff <= 0) {
			return current;
		}
		if (diff < tm_packet) tm_packet = diff;
	}

	minimal = (IUINT32)(tm_packet < tm_flush ? tm_packet : tm_flush);
	if (minimal >= kcp->interval) minimal = kcp->interval;

	return current + minimal;
}

// Assembly:
cmpl $0x0, 0x70(%rdi)
je 0x3d98
movl 0x54(%rdi), %ecx
movl %esi, %eax
subl %ecx, %eax
addl $0xffffd8f0, %eax       # imm = 0xFFFFD8F0
cmpl $0xffffb1e0, %eax       # imm = 0xFFFFB1E0
cmovbl %esi, %ecx
cmpl %ecx, %esi
js 0x3d9b
movl %esi, %eax
retq
pushq %rbp
movq %rsp, %rbp
subl %esi, %ecx
leaq 0xa8(%rdi), %r8
movl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
movq %r8, %r9
movq (%r9), %r9
cmpq %r8, %r9
je 0x3dd7
movl 0x30(%r9), %r10d
subl %esi, %r10d
cmpl %r10d, %edx
movl %r10d, %r11d
cmovll %edx, %r11d
testl %r10d, %r10d
cmovgl %r11d, %edx
cmovlel %esi, %eax
jg 0x3db0
jmp 0x3de8
cmpl %ecx, %edx
cmovll %edx, %ecx
movl 0x50(%rdi), %eax
cmpl %eax, %ecx
cmovael %eax, %ecx
addl %esi, %ecx
movl %ecx, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/xocoder[P]m_kcptun/vendor/kcp/ikcp.c
// Function: ikcp_setmtu
int ikcp_setmtu(ikcpcb *kcp, int mtu)
{
	char *buffer;
	if (mtu < 50 || mtu < (int)IKCP_OVERHEAD) 
		return -1;
	buffer = (char*)ikcp_malloc((mtu + IKCP_OVERHEAD) * 3);
	if (buffer == NULL) 
		return -2;
	kcp->mtu = mtu;
	kcp->mss = kcp->mtu - IKCP_OVERHEAD;
	ikcp_free(kcp->buffer);
	kcp->buffer = buffer;
	return 0;
}

// Assembly:
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl $0x32, %esi
jl 0x3e6a
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r14d
movq %rdi, %rbx
leal (%r14,%r14,2), %edi
addl $0x48, %edi
movq 0xc476(%rip), %rax      # 0x10288
testq %rax, %rax
je 0x3e1b
callq *%rax
jmp 0x3e20
callq 0x2350
movq %rax, %r15
testq %rax, %rax
je 0x3e4b
movl %r14d, 0x4(%rbx)
addl $-0x18, %r14d
movl %r14d, 0x8(%rbx)
movq 0xe0(%rbx), %rdi
movq 0xc44e(%rip), %rax      # 0x10290
testq %rax, %rax
je 0x3e52
callq *%rax
jmp 0x3e57
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
jmp 0x3e60
callq 0x2310
movq %r15, 0xe0(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/xocoder[P]m_kcptun/vendor/kcp/ikcp.c
// Function: ikcp_nodelay
int ikcp_nodelay(ikcpcb *kcp, int nodelay, int interval, int resend, int nc)
{
	if (nodelay >= 0) {
		kcp->nodelay = nodelay;
		if (nodelay) {
			kcp->rx_minrto = IKCP_RTO_NDL;	
		}	
		else {
			kcp->rx_minrto = IKCP_RTO_MIN;
		}
	}
	if (interval >= 0) {
		if (interval > 5000) interval = 5000;
		else if (interval < 10) interval = 10;
		kcp->interval = interval;
	}
	if (resend >= 0) {
		kcp->fastresend = resend;
	}
	if (nc >= 0) {
		kcp->nocwnd = nc;
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testl %esi, %esi
js 0x3ea6
movl %esi, 0x6c(%rdi)
movl $0x64, %eax
movl $0x1e, %esi
cmovel %eax, %esi
movl %esi, 0x34(%rdi)
testl %edx, %edx
js 0x3ec2
cmpl $0xb, %edx
movl $0xa, %eax
cmovgel %edx, %eax
movl $0x1388, %edx           # imm = 0x1388
cmpl %edx, %eax
cmovgel %edx, %eax
movl %eax, 0x50(%rdi)
testl %ecx, %ecx
js 0x3ecc
movl %ecx, 0xe8(%rdi)
testl %r8d, %r8d
js 0x3ed8
movl %r8d, 0xec(%rdi)
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/xocoder[P]m_kcptun/vendor/kcp/ikcp.c
// Function: ikcp_wndsize
int ikcp_wndsize(ikcpcb *kcp, int sndwnd, int rcvwnd)
{
	if (kcp) {
		if (sndwnd > 0) {
			kcp->snd_wnd = sndwnd;
		}
		if (rcvwnd > 0) {   // must >= max fragment size
			kcp->rcv_wnd = _imax_(rcvwnd, IKCP_WND_RCV);
		}
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testq %rdi, %rdi
je 0x3f01
testl %esi, %esi
jle 0x3eec
movl %esi, 0x38(%rdi)
testl %edx, %edx
jle 0x3f01
cmpl $0x81, %edx
movl $0x80, %eax
cmovael %edx, %eax
movl %eax, 0x3c(%rdi)
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/xocoder[P]m_kcptun/vendor/m_net/src/mnet_core.c
// Function: mnet_init
int
mnet_init() {
   mnet_t *ss = _gmnet();
   if ( !ss->init ) {
#if MNET_OS_WIN
      WSADATA wdata;
      if (WSAStartup(MAKEWORD(2,2), &wdata) != 0) {
         mm_log(NULL, MNET_LOG_ERR, "fail to init !\n");
         return 0;
      }
      mm_log(NULL, MNET_LOG_VERBOSE, "init with select\n");
#else
      signal(SIGPIPE, SIG_IGN);
      _evt_init();
#endif
      ss->init = 1;
      return 1;
   }
   return 0;
}

// Assembly:
xorl %eax, %eax
cmpl $0x0, 0xc373(%rip)      # 0x10298
je 0x3f28
retq
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl $0x1, %esi
movl $0xd, %edi
callq 0x2300
cmpl $0x0, 0xc364(%rip)      # 0x102a8
jg 0x3fc5
movl $0x100, %edi            # imm = 0x100
callq 0x2440
movl %eax, 0xc352(%rip)      # 0x102a8
leaq 0x7433(%rip), %rdx      # 0xb390
xorl %edi, %edi
movl $0x3, %esi
movl %eax, %ecx
xorl %eax, %eax
callq 0x420f
movl $0x4, 0xc339(%rip)      # 0x102b0
movl $0x30, %edi
callq *0xc2c6(%rip)           # 0x10248
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x20(%rax)
movq %rax, 0xc321(%rip)      # 0x102b8
movl $0x100, 0xc31f(%rip)    # imm = 0x100
movl $0xc00, %edi            # imm = 0xC00
callq *0xc29c(%rip)           # 0x10248
movq %rax, %rbx
movl $0xc00, %edx            # imm = 0xC00
movq %rax, %rdi
xorl %esi, %esi
callq 0x2180
movq %rbx, 0xc303(%rip)      # 0x102c8
movl $0x1, 0xc2c9(%rip)      # 0x10298
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/xocoder[P]m_kcptun/vendor/m_net/src/mnet_core.c
// Function: mnet_fini
void
mnet_fini() {
   mnet_t *ss = _gmnet();
   if ( ss->init ) {
      chann_t *n = ss->channs;
      while ( n ) {
         chann_t *next = n->next;
         _chann_disconnect_socket(ss, n);
         _chann_close_socket(ss, n);
         _chann_destroy(ss, n);
         n = next;
      }
#if MNET_OS_WIN
      WSACleanup();
#else
      _kev_get_flags(NULL); // for compile warning
      _kev_get_events(NULL);
      _evt_fini();
#endif
      ss->init = 0;
      memset(ss, 0, sizeof(*ss));
      mm_log(NULL, MNET_LOG_VERBOSE, "fini\n");
   }
}

// Assembly:
cmpl $0x0, 0xc2b6(%rip)      # 0x10298
je 0x40b6
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq 0xc2aa(%rip), %rbx      # 0x102a0
testq %rbx, %rbx
je 0x401f
movq 0x58(%rbx), %r14
movq %rbx, %rdi
callq 0x40b7
movq %rbx, %rdi
callq 0x4120
movq %rbx, %rdi
callq 0x4171
movq %r14, %rbx
testq %r14, %r14
jne 0x3ffb
movl 0xc283(%rip), %edi      # 0x102a8
testl %edi, %edi
je 0x407e
callq 0x2460
movq 0xc283(%rip), %rdi      # 0x102b8
callq *0xc21d(%rip)           # 0x10258
movq 0xc286(%rip), %rdi      # 0x102c8
callq *0xc210(%rip)           # 0x10258
xorps %xmm0, %xmm0
movups %xmm0, 0xc26e(%rip)     # 0x102c0
movups %xmm0, 0xc257(%rip)     # 0x102b0
movl 0xc249(%rip), %ecx      # 0x102a8
leaq 0x7386(%rip), %rdx      # 0xb3ec
xorl %edi, %edi
movl $0x3, %esi
xorl %eax, %eax
callq 0x420f
movl $0x0, 0xc22a(%rip)      # 0x102a8
xorps %xmm0, %xmm0
movups %xmm0, 0xc240(%rip)     # 0x102c8
movups %xmm0, 0xc229(%rip)     # 0x102b8
movups %xmm0, 0xc212(%rip)     # 0x102a8
movups %xmm0, 0xc1fb(%rip)     # 0x10298
leaq 0x7159(%rip), %rdx      # 0xb1fd
xorl %edi, %edi
movl $0x3, %esi
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x420f
retq
// File: /workspace/github_cpp_makefile_star2_O1/xocoder[P]m_kcptun/vendor/m_net/src/mnet_core.c
// Function: chann_disconnect_socket(s_mnet*, s_mchann*)
static int
_chann_disconnect_socket(mnet_t *ss, chann_t *n) {
   if (n->fd > 0) {
      mm_log(n, MNET_LOG_VERBOSE, "chann disconnect fd:%d\n", n->fd);
      close(n->fd);
      _rwb_destroy(&n->rwb_send);
      n->fd = -1;
      n->state = CHANN_STATE_DISCONNECT;
#if (MNET_OS_MACOX || MNET_OS_LINUX || MNET_OS_FreeBSD)
      n->epoll_events = 0;
#endif
      return 1;
   }
   return 0;
}

// Assembly:
movl (%rdi), %ecx
testl %ecx, %ecx
jle 0x411f
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x72da(%rip), %rdx      # 0xb3a8
movl $0x3, %esi
xorl %eax, %eax
callq 0x420f
movl (%rbx), %edi
callq 0x2460
cmpl $0x0, 0x48(%rbx)
jle 0x4104
leaq 0x38(%rbx), %r14
movq 0x38(%rbx), %rax
movq $0x0, (%rax)
movq %r14, %rdi
callq 0x55be
cmpl $0x0, 0x48(%rbx)
jg 0x40eb
movl $0xffffffff, (%rbx)     # imm = 0xFFFFFFFF
movl $0x1, 0x10(%rbx)
movl $0x0, 0x88(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/xocoder[P]m_kcptun/vendor/m_net/src/mnet_core.c
// Function: chann_close_socket(s_mnet*, s_mchann*)
static void
_chann_close_socket(mnet_t *ss, chann_t *n) {
   if (n->state > CHANN_STATE_CLOSED) {
#if (MNET_OS_MACOX || MNET_OS_LINUX || MNET_OS_FreeBSD)
      n->del_next = ss->del_channs;
      if (ss->del_channs) {
         ss->del_channs->del_prev = n;
      }
      ss->del_channs = n;
#endif
      n->state = CHANN_STATE_CLOSED;
      n->cb = NULL;
      n->opaque = NULL;
      mm_log(n, MNET_LOG_VERBOSE, "chann close fd:%d\n", n->fd);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpl $0x0, 0x10(%rdi)
jle 0x416f
movq 0xc19f(%rip), %rax      # 0x102d0
movq %rax, 0x80(%rdi)
testq %rax, %rax
je 0x4141
movq %rdi, 0x78(%rax)
movq %rdi, 0xc188(%rip)      # 0x102d0
movl $0x0, 0x10(%rdi)
xorl %eax, %eax
movq %rax, 0x18(%rdi)
movq %rax, 0x8(%rdi)
movl (%rdi), %ecx
leaq 0x725e(%rip), %rdx      # 0xb3c0
movl $0x3, %esi
xorl %eax, %eax
popq %rbp
jmp 0x420f
popq %rbp
retq