// File: ambersun1234[P]AVL_Tree/./googletest/googletest/src/gtest.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).
  // Use wider types than necessary to prevent unsigned overflow diagnostics.
  state_ = static_cast<UInt32>(1103515245ULL*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:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movl (%rax), %eax
imulq $0x41c64e6d, %rax, %rax # imm = 0x41C64E6D
addq $0x3039, %rax           # imm = 0x3039
movl $0x80000000, %ecx       # imm = 0x80000000
xorl %edx, %edx
divl %ecx
movq -0x28(%rbp), %rax
movl %edx, (%rax)
cmpl $0x0, -0xc(%rbp)
seta %al
movzbl %al, %edi
andl $0x1, %edi
callq 0x16060
testb $0x1, %al
jne 0x15ec0
jmp 0x15ec2
jmp 0x15f3c
leaq 0x422a5(%rip), %rdx     # 0x5816e
leaq -0x10(%rbp), %rdi
movq %rdi, -0x38(%rbp)
movl $0x3, %esi
movl $0x166, %ecx            # imm = 0x166
callq 0x33f70
movq -0x38(%rbp), %rdi
callq 0x377b0
movq %rax, -0x30(%rbp)
jmp 0x15eef
movq -0x30(%rbp), %rdi
leaq 0x42299(%rip), %rsi     # 0x58193
callq 0x95e0
movq %rax, -0x40(%rbp)
jmp 0x15f05
movq -0x40(%rbp), %rdi
leaq 0x422a0(%rip), %rsi     # 0x581b0
callq 0x95e0
jmp 0x15f17
leaq -0x10(%rbp), %rdi
callq 0x340b0
jmp 0x15f3c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x340b0
jmp 0x16051
cmpl $0x80000000, -0xc(%rbp) # imm = 0x80000000
setbe %al
movzbl %al, %edi
andl $0x1, %edi
callq 0x16060
testb $0x1, %al
jne 0x15f57
jmp 0x15f5c
jmp 0x1603b
leaq 0x4220b(%rip), %rdx     # 0x5816e
leaq -0x20(%rbp), %rdi
movq %rdi, -0x50(%rbp)
movl $0x3, %esi
movl $0x168, %ecx            # imm = 0x168
callq 0x33f70
movq -0x50(%rbp), %rdi
callq 0x377b0
movq %rax, -0x48(%rbp)
jmp 0x15f89
movq -0x48(%rbp), %rdi
leaq 0x4224a(%rip), %rsi     # 0x581de
callq 0x95e0
movq %rax, -0x58(%rbp)
jmp 0x15f9f
movq -0x58(%rbp), %rdi
leaq 0x4225a(%rip), %rsi     # 0x58204
callq 0x95e0
movq %rax, -0x60(%rbp)
jmp 0x15fb5
movq -0x60(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x9980
movq %rax, -0x68(%rbp)
jmp 0x15fc7
movq -0x68(%rbp), %rdi
leaq 0x42251(%rip), %rsi     # 0x58223
callq 0x95e0
movq %rax, -0x70(%rbp)
jmp 0x15fdd
movq -0x70(%rbp), %rdi
leaq 0x4224d(%rip), %rsi     # 0x58235
callq 0x95e0
movq %rax, -0x78(%rbp)
jmp 0x15ff3
movq -0x78(%rbp), %rdi
movl $0x80000000, %esi       # imm = 0x80000000
callq 0x9980
movq %rax, -0x80(%rbp)
jmp 0x16007
movq -0x80(%rbp), %rdi
leaq 0x421c9(%rip), %rsi     # 0x581db
callq 0x95e0
jmp 0x16019
leaq -0x20(%rbp), %rdi
callq 0x340b0
jmp 0x1603b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x340b0
jmp 0x16051
movq -0x28(%rbp), %rax
movl (%rax), %eax
xorl %edx, %edx
divl -0xc(%rbp)
movl %edx, %eax
addq $0x80, %rsp
popq %rbp
retq
movq -0x18(%rbp), %rdi
callq 0x9c40
nopw (%rax,%rax)