// File: halfflat[P]tinyopt/test/googletest/googletest/src/gtest-port.cc
// Function: testing::internal::Int32FromGTestEnv(char const*, int)
int32_t Int32FromGTestEnv(const char* flag, int32_t default_value) {
#if defined(GTEST_GET_INT32_FROM_ENV_)
  return GTEST_GET_INT32_FROM_ENV_(flag, default_value);
#else
  const std::string env_var = FlagToEnvVar(flag);
  const char* const string_value = posix::GetEnv(env_var.c_str());
  if (string_value == nullptr) {
    // The environment variable is not set.
    return default_value;
  }

  int32_t result = default_value;
  if (!ParseInt32(Message() << "Environment variable " << env_var, string_value,
                  &result)) {
    printf("The default value %s is used.\n",
           (Message() << default_value).GetString().c_str());
    fflush(stdout);
    return default_value;
  }

  return result;
#endif  // defined(GTEST_GET_INT32_FROM_ENV_)
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rsi
leaq -0x38(%rbp), %rdi
movq %rdi, -0x98(%rbp)
callq 0x7e260
movq -0x98(%rbp), %rdi
callq 0x102c0
movq %rax, %rdi
callq 0xa4300
movq %rax, -0x90(%rbp)
jmp 0x7e413
movq -0x90(%rbp), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0x7e448
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
movl $0x1, -0x50(%rbp)
jmp 0x7e5ac
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x7e5c1
movl -0x14(%rbp), %eax
movl %eax, -0x54(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x84210
jmp 0x7e459
leaq 0x4fa2d(%rip), %rsi     # 0xcde8d
leaq -0x60(%rbp), %rdi
callq 0xa4320
movq %rax, -0xa0(%rbp)
jmp 0x7e472
movq -0xa0(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0xa2ef0
movq %rax, -0xa8(%rbp)
jmp 0x7e48b
movq -0xa8(%rbp), %rdi
movq -0x40(%rbp), %rsi
leaq -0x54(%rbp), %rdx
callq 0x7df50
movb %al, -0xa9(%rbp)
jmp 0x7e4a7
movb -0xa9(%rbp), %al
xorb $-0x1, %al
movb %al, -0xaa(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x1d500
movb -0xaa(%rbp), %al
testb $0x1, %al
jne 0x7e4cd
jmp 0x7e59f
leaq -0x88(%rbp), %rdi
callq 0x84210
jmp 0x7e4db
leaq -0x88(%rbp), %rdi
leaq -0x14(%rbp), %rsi
callq 0xa4070
movq %rax, -0xb8(%rbp)
jmp 0x7e4f4
movq -0xb8(%rbp), %rsi
leaq -0x80(%rbp), %rdi
callq 0x77710
jmp 0x7e506
leaq -0x80(%rbp), %rdi
callq 0x102c0
movq %rax, %rsi
leaq 0x4f98a(%rip), %rdi     # 0xcdea3
xorl %eax, %eax
callq 0x10090
jmp 0x7e522
leaq -0x80(%rbp), %rdi
callq 0x10fc8
leaq -0x88(%rbp), %rdi
callq 0x1d500
movq 0x98a42(%rip), %rax     # 0x116f80
movq (%rax), %rdi
callq 0x10930
jmp 0x7e548
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
movl $0x1, -0x50(%rbp)
jmp 0x7e5ac
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x1d500
jmp 0x7e5c1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x7e591
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x10fc8
leaq -0x88(%rbp), %rdi
callq 0x1d500
jmp 0x7e5c1
movl -0x54(%rbp), %eax
movl %eax, -0x4(%rbp)
movl $0x1, -0x50(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x10fc8
movl -0x4(%rbp), %eax
addq $0xc0, %rsp
popq %rbp
retq
leaq -0x38(%rbp), %rdi
callq 0x10fc8
movq -0x48(%rbp), %rdi
callq 0x10e00
nopw %cs:(%rax,%rax)