// File: WeihuaZhu[P]hpc_prog2/./gtest/gtest-all.cc
// Function: testing::internal::ParseInt32(testing::Message const&, char const*, int*)
bool ParseInt32(const Message& src_text, const char* str, Int32* value) {
  // Parses the environment variable as a decimal integer.
  char* end = NULL;
  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?
  const Int32 result = static_cast<Int32>(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.
      ) {
    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:
subq $0xf8, %rsp
movq %rdi, 0xe8(%rsp)
movq %rsi, 0xe0(%rsp)
movq %rdx, 0xd8(%rsp)
movq $0x0, 0xd0(%rsp)
movq 0xe0(%rsp), %rdi
leaq 0xd0(%rsp), %rsi
movl $0xa, %edx
callq 0xeff0
movq %rax, 0xc8(%rsp)
movq 0xd0(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x289e8
leaq 0xc0(%rsp), %rdi
movq %rdi, 0x50(%rsp)
callq 0x192e0
movq 0x50(%rsp), %rdi
leaq 0x25300(%rip), %rsi     # 0x4dbaf
callq 0x32e90
movq %rax, 0x58(%rsp)
jmp 0x288bb
movq 0x58(%rsp), %rdi
movq 0xe8(%rsp), %rsi
callq 0x3abf0
movq %rax, 0x48(%rsp)
jmp 0x288d4
movq 0x48(%rsp), %rdi
leaq 0x252d9(%rip), %rsi     # 0x4dbb9
callq 0x3ac30
movq %rax, 0x40(%rsp)
jmp 0x288ec
movq 0x40(%rsp), %rdi
leaq 0x252f3(%rip), %rsi     # 0x4dbeb
callq 0x35c60
movq %rax, 0x38(%rsp)
jmp 0x28904
movq 0x38(%rsp), %rdi
leaq 0xe0(%rsp), %rsi
callq 0x33560
movq %rax, 0x30(%rsp)
jmp 0x2891d
movq 0x30(%rsp), %rdi
leaq 0x252cf(%rip), %rsi     # 0x4dbf8
callq 0x36f10
jmp 0x28930
leaq 0x90(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
callq 0x196c0
jmp 0x28947
leaq 0x90(%rsp), %rdi
callq 0xe370
movq %rax, %rsi
leaq 0x24dd1(%rip), %rdi     # 0x4d72f
xorl %eax, %eax
callq 0xe090
jmp 0x28967
leaq 0x90(%rsp), %rdi
callq 0xf698
movq 0x3c605(%rip), %rax     # 0x64f80
movq (%rax), %rdi
callq 0xecc0
jmp 0x28985
movb $0x0, 0xf7(%rsp)
leaq 0xc0(%rsp), %rdi
callq 0x105d0
jmp 0x28b91
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb8(%rsp)
movl %eax, 0xb4(%rsp)
jmp 0x289d6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb8(%rsp)
movl %eax, 0xb4(%rsp)
leaq 0x90(%rsp), %rdi
callq 0xf698
leaq 0xc0(%rsp), %rdi
callq 0x105d0
jmp 0x28ba2
movq 0xc8(%rsp), %rax
movl %eax, 0x8c(%rsp)
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
cmpq %rax, 0xc8(%rsp)
je 0x28a35
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
cmpq %rax, 0xc8(%rsp)
je 0x28a35
movslq 0x8c(%rsp), %rax
cmpq 0xc8(%rsp), %rax
je 0x28b78
leaq 0x80(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x192e0
movq 0x20(%rsp), %rdi
leaq 0x2515c(%rip), %rsi     # 0x4dbaf
callq 0x32e90
movq %rax, 0x28(%rsp)
jmp 0x28a5f
movq 0x28(%rsp), %rdi
movq 0xe8(%rsp), %rsi
callq 0x3abf0
movq %rax, 0x18(%rsp)
jmp 0x28a78
movq 0x18(%rsp), %rdi
leaq 0x25135(%rip), %rsi     # 0x4dbb9
callq 0x3ac30
movq %rax, 0x10(%rsp)
jmp 0x28a90
movq 0x10(%rsp), %rdi
leaq 0x25160(%rip), %rsi     # 0x4dbfc
callq 0x10500
movq %rax, 0x8(%rsp)
jmp 0x28aa8
movq 0x8(%rsp), %rdi
leaq 0xe0(%rsp), %rsi
callq 0x33560
movq %rax, (%rsp)
jmp 0x28ac0
movq (%rsp), %rdi
leaq 0x2513d(%rip), %rsi     # 0x4dc08
callq 0x3ac70
jmp 0x28ad2
leaq 0x60(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x196c0
jmp 0x28ae6
leaq 0x60(%rsp), %rdi
callq 0xe370
movq %rax, %rsi
leaq 0x24c35(%rip), %rdi     # 0x4d72f
xorl %eax, %eax
callq 0xe090
jmp 0x28b03
leaq 0x60(%rsp), %rdi
callq 0xf698
movq 0x3c46c(%rip), %rax     # 0x64f80
movq (%rax), %rdi
callq 0xecc0
jmp 0x28b1e
movb $0x0, 0xf7(%rsp)
leaq 0x80(%rsp), %rdi
callq 0x105d0
jmp 0x28b91
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb8(%rsp)
movl %eax, 0xb4(%rsp)
jmp 0x28b69
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb8(%rsp)
movl %eax, 0xb4(%rsp)
leaq 0x60(%rsp), %rdi
callq 0xf698
leaq 0x80(%rsp), %rdi
callq 0x105d0
jmp 0x28ba2
movl 0x8c(%rsp), %ecx
movq 0xd8(%rsp), %rax
movl %ecx, (%rax)
movb $0x1, 0xf7(%rsp)
movb 0xf7(%rsp), %al
andb $0x1, %al
addq $0xf8, %rsp
retq
movq 0xb8(%rsp), %rdi
callq 0xf410
nop