// File: /workspace/github_cpp_makefile_star2_O3/bowbowbow[P]CollaborativeFiltering/recommender.cpp
// Function: CF::buildItemToItemC()
void buildItemToItemC() {
        itemToItem = vector<vector<double> > (itemSize+1, vector<double> (itemSize+1));
        for(int i=1; i<= itemSize; i++) {
            for(int j=1; j <= itemSize; j++) {
                double top = 0, bleft =0, bright = 0;
                
                int cnt = 0;
                for(int k=1; k<= userSize; k++) {
                    if(userToItem[k][i] == EMPTY) continue;
                    if(userToItem[k][j] == EMPTY) continue;
                    
                    cnt++;
                    top += userToItem[k][i]*userToItem[k][j];
                    
                    bleft += userToItem[k][i]*userToItem[k][i];
                    bright += userToItem[k][j]*userToItem[k][j];
                }
                
                if(cnt < 1) {
                    itemToItem[i][j] = 0;
                } else {
                    itemToItem[i][j] = top/(sqrt(bleft)*sqrt(bright));
                }
            }
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x70, %rsp
movq %rdi, %rbx
movslq 0x48(%rdi), %r14
incq %r14
leaq -0x50(%rbp), %r15
leaq -0x22(%rbp), %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x3b2a
leaq -0x70(%rbp), %rdi
leaq -0x21(%rbp), %rcx
movq %r14, %rsi
movq %r15, %rdx
callq 0x319e
movupd 0x18(%rbx), %xmm0
movq 0x28(%rbx), %rax
leaq -0x70(%rbp), %r14
movq (%r14), %rcx
movq %rcx, 0x18(%rbx)
movq 0x8(%r14), %rcx
movq %rcx, 0x20(%rbx)
movq 0x10(%r14), %rcx
movq %rcx, 0x28(%rbx)
leaq -0x88(%rbp), %rdi
movupd %xmm0, (%rdi)
movq %rax, 0x10(%rdi)
xorpd %xmm0, %xmm0
movapd %xmm0, (%r14)
movq $0x0, 0x10(%r14)
callq 0x2bd8
movq %r14, %rdi
callq 0x2bd8
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0x39ac
callq 0x2170
movl 0x48(%rbx), %eax
testl %eax, %eax
jle 0x3b03
movl $0x1, %r14d
movsd 0x64b(%rip), %xmm4      # 0x4010
xorpd %xmm5, %xmm5
testl %eax, %eax
jle 0x3af0
movl $0x1, %r12d
leaq (%r14,%r14,2), %r15
movl 0x4c(%rbx), %edx
testl %edx, %edx
jle 0x3a67
movq (%rbx), %rcx
leaq (%rdx,%rdx,2), %rdx
leaq 0x18(,%rdx,8), %rdx
xorpd %xmm7, %xmm7
xorl %esi, %esi
movl $0x18, %edi
xorpd %xmm0, %xmm0
xorpd %xmm6, %xmm6
movq (%rcx,%rdi), %r8
movsd (%r8,%r14,8), %xmm1
ucomisd %xmm4, %xmm1
jne 0x3a1a
jnp 0x3a46
movsd (%r8,%r12,8), %xmm2
ucomisd %xmm4, %xmm2
jne 0x3a28
jnp 0x3a46
incl %esi
movapd %xmm1, %xmm3
mulsd %xmm2, %xmm3
addsd %xmm3, %xmm6
mulsd %xmm1, %xmm1
addsd %xmm1, %xmm0
mulsd %xmm2, %xmm2
addsd %xmm2, %xmm7
addq $0x18, %rdi
cmpq %rdi, %rdx
jne 0x3a08
testl %esi, %esi
jle 0x3a67
ucomisd %xmm5, %xmm0
movsd %xmm6, -0x38(%rbp)
jb 0x3a79
xorps %xmm2, %xmm2
sqrtsd %xmm0, %xmm2
jmp 0x3a90
movq 0x18(%rbx), %rcx
movq (%rcx,%r15,8), %rcx
movq $0x0, (%rcx,%r12,8)
jmp 0x3adc
movsd %xmm7, -0x30(%rbp)
callq 0x2120
movsd -0x30(%rbp), %xmm7
xorpd %xmm5, %xmm5
movapd %xmm0, %xmm2
ucomisd %xmm5, %xmm7
jb 0x3a9f
xorps %xmm0, %xmm0
sqrtsd %xmm7, %xmm0
jmp 0x3ab6
movapd %xmm7, %xmm0
movsd %xmm2, -0x30(%rbp)
callq 0x2120
movsd -0x30(%rbp), %xmm2
xorpd %xmm5, %xmm5
movsd 0x552(%rip), %xmm4      # 0x4010
movsd -0x38(%rbp), %xmm1
mulsd %xmm0, %xmm2
divsd %xmm2, %xmm1
movq 0x18(%rbx), %rax
movq (%rax,%r15,8), %rax
movsd %xmm1, (%rax,%r12,8)
movl 0x48(%rbx), %eax
leaq 0x1(%r12), %rcx
movslq %eax, %rdx
cmpq %rdx, %r12
movq %rcx, %r12
jl 0x39db
leaq 0x1(%r14), %rcx
movslq %eax, %rdx
cmpq %rdx, %r14
movq %rcx, %r14
jl 0x39c9
addq $0x70, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0x3b21
callq 0x2170
movq %rbx, %rdi
callq 0x2270
nop