// File: /workspace/github_cpp_makefile_star2_O2/halfflat[P]tinyopt/test/googletest/googletest/src/gtest-port.cc
// Function: testing::internal::ParseInt32(testing::Message const&, char const*, int*)
bool ParseInt32(const Message& src_text, const char* str, int32_t* value) {
  // Parses the environment variable as a decimal integer.
  char* end = nullptr;
  const long long_value = strtol(str, &end, 10);  // NOLINT

  // Has strtol() consumed all characters in the string?
  if (*end != '\0') {
    // No - an invalid character was encountered.
    Message msg;
    msg << "WARNING: " << src_text
        << " is expected to be a 32-bit integer, but actually"
        << " has value \"" << str << "\".\n";
    printf("%s", msg.GetString().c_str());
    fflush(stdout);
    return false;
  }

  // Is the parsed value in the range of an int32_t?
  const auto result = static_cast<int32_t>(long_value);
  if (long_value == LONG_MAX || long_value == LONG_MIN ||
      // The parsed value overflows as a long.  (strtol() returns
      // LONG_MAX or LONG_MIN when the input overflows.)
      result != long_value
      // The parsed value overflows as an int32_t.
  ) {
    Message msg;
    msg << "WARNING: " << src_text
        << " is expected to be a 32-bit integer, but actually"
        << " has value " << str << ", which overflows.\n";
    printf("%s", msg.GetString().c_str());
    fflush(stdout);
    return false;
  }

  *value = result;
  return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdx, %r14
movq %rdi, %rbx
movq %rsi, 0x10(%rsp)
leaq 0x38(%rsp), %r15
andq $0x0, (%r15)
pushq $0xa
popq %rdx
movq %rsi, %rdi
movq %r15, %rsi
callq 0xd8c0
movq (%r15), %rcx
cmpb $0x0, (%rcx)
je 0x3a219
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x3d5f6
movq (%r14), %r14
addq $0x10, %r14
leaq 0x212aa(%rip), %rsi     # 0x5b460
movq %r14, %rdi
callq 0xd550
movq %r14, %rdi
movq %rbx, %rsi
callq 0x52784
leaq 0x2129a(%rip), %rsi     # 0x5b46a
movq %r14, %rdi
callq 0xd550
leaq 0x212bd(%rip), %rsi     # 0x5b49c
movq %r14, %rdi
callq 0xd550
leaq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x4c162
leaq 0x212ac(%rip), %rsi     # 0x5b4a9
movq %rax, %rdi
callq 0x4c574
movq 0x8(%rsp), %rsi
leaq 0x18(%rsp), %rdi
callq 0x3d7ba
jmp 0x3a2a4
movslq %eax, %rcx
cmpq %rax, %rcx
jne 0x3a22b
movl %eax, (%r14)
movb $0x1, %al
jmp 0x3a2e3
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x3d5f6
movq (%r14), %r14
addq $0x10, %r14
leaq 0x2121a(%rip), %rsi     # 0x5b460
movq %r14, %rdi
callq 0xd550
movq %r14, %rdi
movq %rbx, %rsi
callq 0x52784
leaq 0x2120a(%rip), %rsi     # 0x5b46a
movq %r14, %rdi
callq 0xd550
leaq 0x2123e(%rip), %rsi     # 0x5b4ad
movq %r14, %rdi
callq 0xd550
leaq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x4c162
leaq 0x2122c(%rip), %rsi     # 0x5b4b9
movq %rax, %rdi
callq 0x4c5a0
movq 0x8(%rsp), %rsi
leaq 0x18(%rsp), %rdi
callq 0x3d7ba
leaq 0x18(%rsp), %rbx
movq (%rbx), %rsi
leaq 0x227b0(%rip), %rdi     # 0x5ca63
xorl %eax, %eax
callq 0xd070
movq %rbx, %rdi
callq 0xdbe8
movq 0x49cb7(%rip), %rax     # 0x83f80
movq (%rax), %rdi
callq 0xd6b0
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x3a2e1
movq (%rdi), %rax
callq *0x8(%rax)
xorl %eax, %eax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x3a2f3
jmp 0x3a2f3
jmp 0x3a2f3
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x3a306
movq (%rdi), %rax
callq *0x8(%rax)
movq %rbx, %rdi
callq 0xdaa0