// File: /workspace/github_cpp_makefile_star2_O1/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 0x5fca(%rip), %rsi      # 0x1f6b8
leaq 0x5ff9(%rip), %rdx      # 0x1f6ee
leaq 0x10(%rsp), %rdi
callq 0x6086
testq %rbx, %rbx
je 0x19852
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x1971f
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x42d0
movq 0x8(%rbx), %r15
subq (%rbx), %r15
leaq 0x10(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x5fba(%rip), %rsi      # 0x1f6ef
leaq 0x5fe0(%rip), %rdx      # 0x1f71c
callq 0x6086
shrq $0x3, %r15
imull $0xaaaaaaab, %r15d, %eax # imm = 0xAAAAAAAB
testl %eax, %eax
je 0x19896
movq %rax, %r15
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x1976e
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 0x5f96(%rip), %rsi      # 0x1f71d
leaq 0x5fbc(%rip), %rdx      # 0x1f74a
callq 0x6086
shrq $0x3, %r12
testl %r12d, %r12d
je 0x198d7
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x197b7
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)
cmpl $0x1, %r12d
adcl $0x0, %r12d
cmpl $0x1, %r15d
adcl $0x0, %r15d
movq %r15, 0x8(%rsp)
xorl %r13d, %r13d
leaq (,%r13,2), %rbp
addq %r13, %rbp
xorl %r15d, %r15d
movq %r14, %rdi
callq 0x19950
movsd 0x2bcb(%rip), %xmm1     # 0x1c3e0
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 0x19805
incq %r13
cmpq 0x8(%rsp), %r13
jne 0x197f7
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xdad7(%rip), %rax      # 0x27330
movl (%rax), %ecx
shrl $0x1f, %ecx
movq 0x8(%rax,%rcx,8), %rbx
leaq 0x290e(%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 0x19916
leaq 0xda93(%rip), %rax      # 0x27330
movl (%rax), %ecx
shrl $0x1f, %ecx
movq 0x8(%rax,%rcx,8), %rbx
leaq 0x28ca(%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 0x19916
leaq 0xda52(%rip), %rax      # 0x27330
movl (%rax), %ecx
shrl $0x1f, %ecx
movq 0x8(%rax,%rcx,8), %rbx
leaq 0x2889(%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 0x19924
jmp 0x19924
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x19947
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x42d0
jmp 0x19947
jmp 0x19944
jmp 0x19944
movq %rax, %rbx
movq %rbx, %rdi
callq 0x4580
nop