// File: WeihuaZhu[P]hpc_prog2/./gtest/gtest-all.cc
// Function: testing::internal::Random::Generate(unsigned int)
UInt32 Random::Generate(UInt32 range) {
  // These constants are the same as are used in glibc's rand(3).
  state_ = (1103515245U*state_ + 12345U) % kMaxRange;

  GTEST_CHECK_(range > 0)
      << "Cannot generate a number in the range [0, 0).";
  GTEST_CHECK_(range <= kMaxRange)
      << "Generation of a number in [0, " << range << ") was requested, "
      << "but this can only generate numbers in [0, " << kMaxRange << ").";

  // Converting via modulus introduces a bit of downward bias, but
  // it's simple, and a linear congruential generator isn't too good
  // to begin with.
  return state_ % range;
}

// Assembly:
subq $0x88, %rsp
movq %rdi, 0x80(%rsp)
movl %esi, 0x7c(%rsp)
movq 0x80(%rsp), %rax
movq %rax, 0x60(%rsp)
imull $0x41c64e6d, (%rax), %eax # imm = 0x41C64E6D
addl $0x3039, %eax           # imm = 0x3039
movl $0x80000000, %ecx       # imm = 0x80000000
xorl %edx, %edx
divl %ecx
movq 0x60(%rsp), %rax
movl %edx, (%rax)
cmpl $0x0, 0x7c(%rsp)
seta %al
movzbl %al, %edi
andl $0x1, %edi
callq 0x16400
testb $0x1, %al
jne 0x16234
jmp 0x16239
jmp 0x162be
leaq 0x366bf(%rip), %rdx     # 0x4c8ff
leaq 0x78(%rsp), %rdi
movq %rdi, 0x50(%rsp)
movl $0x3, %esi
movl $0x6f3, %ecx            # imm = 0x6F3
callq 0x2fd30
movq 0x50(%rsp), %rdi
callq 0x32a40
movq %rax, 0x58(%rsp)
jmp 0x1626a
movq 0x58(%rsp), %rdi
leaq 0x3669e(%rip), %rsi     # 0x4c914
callq 0xea00
movq %rax, 0x48(%rsp)
jmp 0x16282
movq 0x48(%rsp), %rdi
leaq 0x366a3(%rip), %rsi     # 0x4c931
callq 0xea00
jmp 0x16295
leaq 0x78(%rsp), %rdi
callq 0x2fea0
jmp 0x162be
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x70(%rsp)
movl %eax, 0x6c(%rsp)
leaq 0x78(%rsp), %rdi
callq 0x2fea0
jmp 0x163eb
cmpl $0x80000000, 0x7c(%rsp) # imm = 0x80000000
setbe %al
movzbl %al, %edi
andl $0x1, %edi
callq 0x16400
testb $0x1, %al
jne 0x162da
jmp 0x162df
jmp 0x163d4
leaq 0x36619(%rip), %rdx     # 0x4c8ff
leaq 0x68(%rsp), %rdi
movq %rdi, 0x38(%rsp)
movl $0x3, %esi
movl $0x6f5, %ecx            # imm = 0x6F5
callq 0x2fd30
movq 0x38(%rsp), %rdi
callq 0x32a40
movq %rax, 0x40(%rsp)
jmp 0x16310
movq 0x40(%rsp), %rdi
leaq 0x36643(%rip), %rsi     # 0x4c95f
callq 0xea00
movq %rax, 0x30(%rsp)
jmp 0x16328
movq 0x30(%rsp), %rdi
leaq 0x36651(%rip), %rsi     # 0x4c985
callq 0xea00
movq %rax, 0x28(%rsp)
jmp 0x16340
movq 0x28(%rsp), %rdi
movl 0x7c(%rsp), %esi
callq 0xef10
movq %rax, 0x20(%rsp)
jmp 0x16355
movq 0x20(%rsp), %rdi
leaq 0x36643(%rip), %rsi     # 0x4c9a4
callq 0xea00
movq %rax, 0x18(%rsp)
jmp 0x1636d
movq 0x18(%rsp), %rdi
leaq 0x3663d(%rip), %rsi     # 0x4c9b6
callq 0xea00
movq %rax, 0x10(%rsp)
jmp 0x16385
movq 0x10(%rsp), %rdi
movl $0x80000000, %esi       # imm = 0x80000000
callq 0xef10
movq %rax, 0x8(%rsp)
jmp 0x1639b
movq 0x8(%rsp), %rdi
leaq 0x365b5(%rip), %rsi     # 0x4c95c
callq 0xea00
jmp 0x163ae
leaq 0x68(%rsp), %rdi
callq 0x2fea0
jmp 0x163d4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x70(%rsp)
movl %eax, 0x6c(%rsp)
leaq 0x68(%rsp), %rdi
callq 0x2fea0
jmp 0x163eb
movq 0x60(%rsp), %rax
movl (%rax), %eax
xorl %edx, %edx
divl 0x7c(%rsp)
movl %edx, %eax
addq $0x88, %rsp
retq
movq 0x70(%rsp), %rdi
callq 0xf410
nopw %cs:(%rax,%rax)