// File: /workspace/github_cpp_makefile_star2_O3/hanhwi[P]SimPoint/analysiscode/Utilities.cpp
// Function: Utilities::randomProjectionMatrix(int, Dataset*)
void Utilities::randomProjectionMatrix(int randSeed, Dataset *projection) {
    check(NULL != projection, "Utilities::randomProjectionMatrix() projection is null");
    unsigned int rows = projection->size();
    check(rows > 0, "Utilities::randomProjectionMatrix() rows <= 0");
    unsigned int cols = (*projection)[0].size();
    check(cols > 0, "Utilities::randomProjectionMatrix() cols <= 0");

    Random rand(randSeed);

    for (unsigned int r = 0; r < rows; r++) {
        for (unsigned int c = 0; c < cols; c++) {
            (*projection)[r][c] = rand.randFloat() * 2.0 - 1.0;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x20(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x6062(%rip), %rsi      # 0x1f6b8
leaq 0x6091(%rip), %rdx      # 0x1f6ee
leaq 0x10(%rsp), %rdi
callq 0x6058
testq %rbx, %rbx
je 0x197b5
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x19687
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x42d0
movq 0x8(%rbx), %r12
subq (%rbx), %r12
leaq 0x10(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x6052(%rip), %rsi      # 0x1f6ef
leaq 0x6078(%rip), %rdx      # 0x1f71c
callq 0x6058
sarq $0x3, %r12
movabsq $-0x5555555555555555, %r15 # imm = 0xAAAAAAAAAAAAAAAB
imulq %r12, %r15
testl %r15d, %r15d
je 0x197f9
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x196db
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x42d0
movq (%rbx), %rax
movq 0x8(%rax), %r12
subq (%rax), %r12
leaq 0x10(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x6029(%rip), %rsi      # 0x1f71d
leaq 0x604f(%rip), %rdx      # 0x1f74a
callq 0x6058
shrq $0x3, %r12
testl %r12d, %r12d
je 0x1983a
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x19724
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x42d0
movslq %ebp, %rax
movq %rax, %rcx
negq %rcx
cmpl $0x2, %eax
cmovlq %rax, %rcx
leaq 0x10(%rsp), %r14
movq %rcx, (%r14)
movq $0x75bcd15, 0x8(%r14)   # imm = 0x75BCD15
movq $0x0, 0x10(%r14)
movl %r15d, %eax
movq %rax, 0x8(%rsp)
movl %r12d, %r12d
xorl %r13d, %r13d
leaq (,%r13,2), %rbp
addq %r13, %rbp
xorl %r15d, %r15d
movq %r14, %rdi
callq 0x198b2
movsd 0x2c70(%rip), %xmm1     # 0x1c3e8
cvtss2sd %xmm0, %xmm0
addsd %xmm0, %xmm0
addsd %xmm1, %xmm0
movq (%rbx), %rax
movq (%rax,%rbp,8), %rax
movsd %xmm0, (%rax,%r15,8)
incq %r15
cmpq %r15, %r12
jne 0x19768
incq %r13
cmpq 0x8(%rsp), %r13
jne 0x1975a
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xdb74(%rip), %rax      # 0x27330
movl (%rax), %ecx
shrl $0x1f, %ecx
movq 0x8(%rax,%rcx,8), %rbx
leaq 0x29ab(%rip), %rsi      # 0x1c178
movl $0x8, %edx
movq %rbx, %rdi
callq 0x4330
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq %rbx, %rdi
callq 0x4330
movq %rax, %rdi
callq 0x4160
jmp 0x19879
leaq 0xdb30(%rip), %rax      # 0x27330
movl (%rax), %ecx
shrl $0x1f, %ecx
movq 0x8(%rax,%rcx,8), %rbx
leaq 0x2967(%rip), %rsi      # 0x1c178
movl $0x8, %edx
movq %rbx, %rdi
callq 0x4330
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq %rbx, %rdi
callq 0x4330
movq %rax, %rdi
callq 0x4160
jmp 0x19879
leaq 0xdaef(%rip), %rax      # 0x27330
movl (%rax), %ecx
shrl $0x1f, %ecx
movq 0x8(%rax,%rcx,8), %rbx
leaq 0x2926(%rip), %rsi      # 0x1c178
movl $0x8, %edx
movq %rbx, %rdi
callq 0x4330
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq %rbx, %rdi
callq 0x4330
movq %rax, %rdi
callq 0x4160
movl $0x1, %edi
callq 0x4370
jmp 0x19887
jmp 0x19887
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x198aa
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x42d0
jmp 0x198aa
jmp 0x198a7
jmp 0x198a7
movq %rax, %rbx
movq %rbx, %rdi
callq 0x4580