// File: /workspace/github_cpp_makefile_star2_O3/WeihuaZhu[P]hpc_prog2/./gtest/gtest-all.cc
// Function: void testing::internal::ShuffleRange<int>(testing::internal::Random*, int, int, std::vector<int, std::allocator<int>>*)
void ShuffleRange(internal::Random* random, int begin, int end,
                  std::vector<E>* v) {
  const int size = static_cast<int>(v->size());
  GTEST_CHECK_(0 <= begin && begin <= size)
      << "Invalid shuffle range start " << begin << ": must be in range [0, "
      << size << "].";
  GTEST_CHECK_(begin <= end && end <= size)
      << "Invalid shuffle range finish " << end << ": must be in range ["
      << begin << ", " << size << "].";

  // Fisher-Yates shuffle, from
  // http://en.wikipedia.org/wiki/Fisher-Yates_shuffle
  for (int range_width = end - begin; range_width >= 2; range_width--) {
    const int last_in_range = begin + range_width - 1;
    const int selected = begin + random->Generate(range_width);
    std::swap((*v)[selected], (*v)[last_in_range]);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movl %edx, %r12d
movl %esi, %ebp
movq %rdi, %r14
movq 0x8(%rcx), %r15
subq (%rcx), %r15
shrq $0x2, %r15
testl %esi, %esi
js 0x20414
cmpl %ebp, %r15d
jge 0x204ad
leaq 0x7e76(%rip), %rdx      # 0x28291
leaq 0x4(%rsp), %rdi
movl $0x3, %esi
movl $0x2cb, %ecx            # imm = 0x2CB
callq 0x1be2c
movq 0x16bba(%rip), %rdi     # 0x36ff0
leaq 0x998c(%rip), %rsi      # 0x29dc9
movl $0x2e, %edx
callq 0x6510
movq 0x16ba2(%rip), %rdi     # 0x36ff0
leaq 0x99a3(%rip), %rsi      # 0x29df8
movl $0x1c, %edx
callq 0x6510
movq 0x16b8a(%rip), %rdi     # 0x36ff0
movl %ebp, %esi
callq 0x68a0
movq %rax, %r13
leaq 0x999e(%rip), %rsi      # 0x29e15
movl $0x17, %edx
movq %rax, %rdi
callq 0x6510
movq %r13, %rdi
movl %r15d, %esi
callq 0x68a0
leaq 0x958f(%rip), %rsi      # 0x29a25
movl $0x2, %edx
movq %rax, %rdi
callq 0x6510
leaq 0x4(%rsp), %rdi
callq 0x1bf6e
movl %r12d, %r13d
subl %ebp, %r13d
jl 0x204be
cmpl %r12d, %r15d
jge 0x20575
leaq 0x7dcc(%rip), %rdx      # 0x28291
movq %rsp, %rdi
movl $0x3, %esi
movl $0x2ce, %ecx            # imm = 0x2CE
callq 0x1be2c
movq 0x16b12(%rip), %rdi     # 0x36ff0
leaq 0x9948(%rip), %rsi      # 0x29e2d
movl $0x2e, %edx
callq 0x6510
movq 0x16afa(%rip), %rdi     # 0x36ff0
leaq 0x995f(%rip), %rsi      # 0x29e5c
movl $0x1d, %edx
callq 0x6510
movq 0x16ae2(%rip), %rdi     # 0x36ff0
movl %r12d, %esi
callq 0x68a0
movq %rax, %r12
leaq 0x995a(%rip), %rsi      # 0x29e7a
movl $0x14, %edx
movq %rax, %rdi
callq 0x6510
movq %r12, %rdi
movl %ebp, %esi
callq 0x68a0
movq %rax, %r12
leaq 0x98e9(%rip), %rsi      # 0x29e2a
movl $0x2, %edx
movq %rax, %rdi
callq 0x6510
movq %r12, %rdi
movl %r15d, %esi
callq 0x68a0
leaq 0x94c5(%rip), %rsi      # 0x29a25
movl $0x2, %edx
movq %rax, %rdi
callq 0x6510
movq %rsp, %rdi
callq 0x1bf6e
cmpl $0x2, %r13d
jl 0x205ba
movl %r13d, %r15d
movslq %ebp, %rax
leaq -0x4(,%rax,4), %r12
movq %r14, %rdi
movl %r15d, %esi
callq 0x7adc
addl %ebp, %eax
cltq
movq (%rbx), %rcx
leaq (%rcx,%r12), %rdx
movl (%rcx,%rax,4), %esi
movl (%rdx,%r15,4), %edi
movl %edi, (%rcx,%rax,4)
movl %esi, (%rdx,%r15,4)
leaq -0x1(%r15), %rax
cmpq $0x2, %r15
movq %rax, %r15
ja 0x20589
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x4(%rsp), %rdi
jmp 0x205d9
movq %rax, %rbx
movq %rsp, %rdi
callq 0x1bf6e
movq %rbx, %rdi
callq 0x68e0