// File: /workspace/github_c_makefile_star2_O0/deplinenoise[P]tundra/unittest/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 0x13f80
testb $0x1, %al
jne 0x13de0
jmp 0x13de2
jmp 0x13e5c
leaq 0x76720(%rip), %rdx     # 0x8a509
leaq -0x10(%rbp), %rdi
movq %rdi, -0x38(%rbp)
movl $0x3, %esi
movl $0x13c, %ecx            # imm = 0x13C
callq 0x2dbe0
movq -0x38(%rbp), %rdi
callq 0x305f0
movq %rax, -0x30(%rbp)
jmp 0x13e0f
movq -0x30(%rbp), %rdi
leaq 0x7671b(%rip), %rsi     # 0x8a535
callq 0xe750
movq %rax, -0x40(%rbp)
jmp 0x13e25
movq -0x40(%rbp), %rdi
leaq 0x76722(%rip), %rsi     # 0x8a552
callq 0xe750
jmp 0x13e37
leaq -0x10(%rbp), %rdi
callq 0x2dd20
jmp 0x13e5c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x2dd20
jmp 0x13f71
cmpl $0x80000000, -0xc(%rbp) # imm = 0x80000000
setbe %al
movzbl %al, %edi
andl $0x1, %edi
callq 0x13f80
testb $0x1, %al
jne 0x13e77
jmp 0x13e7c
jmp 0x13f5b
leaq 0x76686(%rip), %rdx     # 0x8a509
leaq -0x20(%rbp), %rdi
movq %rdi, -0x50(%rbp)
movl $0x3, %esi
movl $0x13e, %ecx            # imm = 0x13E
callq 0x2dbe0
movq -0x50(%rbp), %rdi
callq 0x305f0
movq %rax, -0x48(%rbp)
jmp 0x13ea9
movq -0x48(%rbp), %rdi
leaq 0x766cc(%rip), %rsi     # 0x8a580
callq 0xe750
movq %rax, -0x58(%rbp)
jmp 0x13ebf
movq -0x58(%rbp), %rdi
leaq 0x766dc(%rip), %rsi     # 0x8a5a6
callq 0xe750
movq %rax, -0x60(%rbp)
jmp 0x13ed5
movq -0x60(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0xeb30
movq %rax, -0x68(%rbp)
jmp 0x13ee7
movq -0x68(%rbp), %rdi
leaq 0x766d3(%rip), %rsi     # 0x8a5c5
callq 0xe750
movq %rax, -0x70(%rbp)
jmp 0x13efd
movq -0x70(%rbp), %rdi
leaq 0x766cf(%rip), %rsi     # 0x8a5d7
callq 0xe750
movq %rax, -0x78(%rbp)
jmp 0x13f13
movq -0x78(%rbp), %rdi
movl $0x80000000, %esi       # imm = 0x80000000
callq 0xeb30
movq %rax, -0x80(%rbp)
jmp 0x13f27
movq -0x80(%rbp), %rdi
leaq 0x7664b(%rip), %rsi     # 0x8a57d
callq 0xe750
jmp 0x13f39
leaq -0x20(%rbp), %rdi
callq 0x2dd20
jmp 0x13f5b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x2dd20
jmp 0x13f71
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 0xee80
nopw (%rax,%rax)