// File: 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:
subq $0xc8, %rsp
movq %rdi, 0xc0(%rsp)
movl %esi, 0xbc(%rsp)
movl %edx, 0xb8(%rsp)
movq %rcx, 0xb0(%rsp)
movq 0xb0(%rsp), %rdi
callq 0x364f0
movl %eax, 0xac(%rsp)
xorl %eax, %eax
xorl %ecx, %ecx
cmpl 0xbc(%rsp), %ecx
movb %al, 0x8b(%rsp)
jg 0x38f35
movl 0xbc(%rsp), %eax
cmpl 0xac(%rsp), %eax
setle %al
movb %al, 0x8b(%rsp)
movb 0x8b(%rsp), %al
movzbl %al, %edi
andl $0x1, %edi
callq 0x16400
testb $0x1, %al
jne 0x38f4d
jmp 0x38f52
jmp 0x39043
leaq 0x139a6(%rip), %rdx     # 0x4c8ff
leaq 0xa8(%rsp), %rdi
movq %rdi, 0x78(%rsp)
movl $0x3, %esi
movl $0x2cb, %ecx            # imm = 0x2CB
callq 0x2fd30
movq 0x78(%rsp), %rdi
callq 0x32a40
movq %rax, %rdi
leaq 0x155a1(%rip), %rsi     # 0x4e52a
callq 0xea00
movq %rax, 0x80(%rsp)
jmp 0x38f98
movq 0x80(%rsp), %rdi
leaq 0x155b2(%rip), %rsi     # 0x4e559
callq 0xea00
movq %rax, 0x70(%rsp)
jmp 0x38fb3
movq 0x70(%rsp), %rdi
movl 0xbc(%rsp), %esi
callq 0xf3d0
movq %rax, 0x68(%rsp)
jmp 0x38fcb
movq 0x68(%rsp), %rdi
leaq 0x1559f(%rip), %rsi     # 0x4e576
callq 0xea00
movq %rax, 0x60(%rsp)
jmp 0x38fe3
movq 0x60(%rsp), %rdi
movl 0xac(%rsp), %esi
callq 0xf3d0
movq %rax, 0x58(%rsp)
jmp 0x38ffb
movq 0x58(%rsp), %rdi
leaq 0x15172(%rip), %rsi     # 0x4e179
callq 0xea00
jmp 0x3900e
leaq 0xa8(%rsp), %rdi
callq 0x2fea0
jmp 0x39043
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa0(%rsp)
movl %eax, 0x9c(%rsp)
leaq 0xa8(%rsp), %rdi
callq 0x2fea0
jmp 0x39266
movl 0xbc(%rsp), %ecx
xorl %eax, %eax
cmpl 0xb8(%rsp), %ecx
movb %al, 0x57(%rsp)
jg 0x3906e
movl 0xb8(%rsp), %eax
cmpl 0xac(%rsp), %eax
setle %al
movb %al, 0x57(%rsp)
movb 0x57(%rsp), %al
movzbl %al, %edi
andl $0x1, %edi
callq 0x16400
testb $0x1, %al
jne 0x39083
jmp 0x39088
jmp 0x391a3
leaq 0x13870(%rip), %rdx     # 0x4c8ff
leaq 0x98(%rsp), %rdi
movq %rdi, 0x40(%rsp)
movl $0x3, %esi
movl $0x2ce, %ecx            # imm = 0x2CE
callq 0x2fd30
movq 0x40(%rsp), %rdi
callq 0x32a40
movq %rax, %rdi
leaq 0x154cf(%rip), %rsi     # 0x4e58e
callq 0xea00
movq %rax, 0x48(%rsp)
jmp 0x390cb
movq 0x48(%rsp), %rdi
leaq 0x154e6(%rip), %rsi     # 0x4e5bd
callq 0xea00
movq %rax, 0x38(%rsp)
jmp 0x390e3
movq 0x38(%rsp), %rdi
movl 0xb8(%rsp), %esi
callq 0xf3d0
movq %rax, 0x30(%rsp)
jmp 0x390fb
movq 0x30(%rsp), %rdi
leaq 0x154d4(%rip), %rsi     # 0x4e5db
callq 0xea00
movq %rax, 0x28(%rsp)
jmp 0x39113
movq 0x28(%rsp), %rdi
movl 0xbc(%rsp), %esi
callq 0xf3d0
movq %rax, 0x20(%rsp)
jmp 0x3912b
movq 0x20(%rsp), %rdi
leaq 0x15454(%rip), %rsi     # 0x4e58b
callq 0xea00
movq %rax, 0x18(%rsp)
jmp 0x39143
movq 0x18(%rsp), %rdi
movl 0xac(%rsp), %esi
callq 0xf3d0
movq %rax, 0x10(%rsp)
jmp 0x3915b
movq 0x10(%rsp), %rdi
leaq 0x15012(%rip), %rsi     # 0x4e179
callq 0xea00
jmp 0x3916e
leaq 0x98(%rsp), %rdi
callq 0x2fea0
jmp 0x391a3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa0(%rsp)
movl %eax, 0x9c(%rsp)
leaq 0x98(%rsp), %rdi
callq 0x2fea0
jmp 0x39266
movl 0xb8(%rsp), %eax
subl 0xbc(%rsp), %eax
movl %eax, 0x94(%rsp)
cmpl $0x2, 0x94(%rsp)
jl 0x3925e
movl 0xbc(%rsp), %eax
addl 0x94(%rsp), %eax
subl $0x1, %eax
movl %eax, 0x90(%rsp)
movl 0xbc(%rsp), %eax
movl %eax, 0x4(%rsp)
movq 0xc0(%rsp), %rdi
movl 0x94(%rsp), %esi
callq 0x161e0
movl %eax, %ecx
movl 0x4(%rsp), %eax
addl %ecx, %eax
movl %eax, 0x8c(%rsp)
movq 0xb0(%rsp), %rdi
movslq 0x8c(%rsp), %rsi
callq 0x36860
movq %rax, 0x8(%rsp)
movq 0xb0(%rsp), %rdi
movslq 0x90(%rsp), %rsi
callq 0x36860
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x498c0
movl 0x94(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x94(%rsp)
jmp 0x391b8
addq $0xc8, %rsp
retq
movq 0xa0(%rsp), %rdi
callq 0xf410
nopw %cs:(%rax,%rax)
nopl (%rax)