// File: /workspace/github_cpp_makefile_star2_O3/huiwenliuge[P]EmoAnaer/src/RNNet.cpp
// Function: RNNet::_Backward_CROSSENTROPY(sentence*)
void RNNet::_Backward_CROSSENTROPY(Sentence sen){
    int t,i,j,k;
    t=sen->tlen-1;
    for(i=0;i<EMOTIONNUM;++i)
        sen->DLDo[t][i]=-(sen->stdAns[i]-sen->energy[t][i]);

    for(t=sen->tlen-2;t>-1;--t){
        for(i=0;i<EMOTIONNUM;++i){
            sen->DLDo[t][i]=-(sen->stdAns[i]-sen->energy[t][i]);
            for(k=0;k<EMOTIONNUM;++k){
                for(j=0;j<hidlayerNUM;++j){
                    sen->DLDo[t][i]+=sen->DLDo[t+1][k]\
                            *k2out[k][j]*dsigm(sen->hidLay[t+1][j])\
                            *ro2h[j][i];
                }
            }
        }
    }
    
    t=sen->tlen-1;
    for(i=0;i<hidlayerNUM;++i){
        sen->DLDh[t][i]=0.0;
        for(j=0;j<EMOTIONNUM;++j){
            sen->DLDh[t][i]+=sen->DLDo[t][j]*k2out[j][i]\
                    *dsigm(sen->hidLay[t][i]);
        }
    }
    for(t=sen->tlen-2;t>-1;--t){
        for(i=0;i<hidlayerNUM;++i){
            sen->DLDh[t][i]=0.0;
            for(j=0;j<EMOTIONNUM;++j){
                sen->DLDh[t][i]+=sen->DLDo[t][j]*k2out[j][i]\
                        *dsigm(sen->hidLay[t][i]);
            }
            for(j=0;j<hidlayerNUM;++j){
                sen->DLDh[t][i]+=sen->DLDh[t+1][j]*rh2h[j][i]\
                        *dsigm(sen->hidLay[t+1][i]);
            }
        }
    }
    
    t=sen->tlen-1;
    for(i=0;i<featureNUM;++i){
        sen->DLDx[t][i]=0.0;
        for(j=0;j<hidlayerNUM;++j){
            sen->DLDx[t][i]+=sen->DLDh[t][j]*in2hid[j][i];
        }
    }
    for(t=sen->tlen-2;t>-1;--t){
        for(i=0;i<featureNUM;++i){
            sen->DLDx[t][i]=0.0;
            for(j=0;j<hidlayerNUM;++j){
                sen->DLDx[t][i]+=sen->DLDh[t][j]*in2hid[j][i];
                for(k=0;k<hidlayerNUM;++k){
                    sen->DLDx[t][i]+=sen->DLDh[t+1][j]*rh2h[j][k]\
                        *dsigm(sen->hidLay[t][k])*in2hid[k][i];
                }
            }
            // for(j=0;j<hidlayerNUM;++j){
            //     for(k=0;k<hidlayerNUM;++k){
            //         sen->DLDx[t][i]+=sen->DLDh[t+1][j]*rh2h[j][k]\
            //             *dsigm(sen->hidLay[t][k])*in2hid[k][i];
            //     }
            // }
        }
    }
    
    double plnrt = lnrt/sen->tlen;
    static std::mutex g_mutex;
    g_mutex.lock();
    upgradeDict(ccdict,sen->schar,sen->DLDx,featureNUM,plnrt);    
    g_mutex.unlock();
    double pder;
    for(i=0;i<EMOTIONNUM;++i){
        for(j=0;j<hidlayerNUM;++j){
            pder=0.0;
            for(t=0;t<sen->tlen;++t){
                pder+=sen->DLDo[t][i]*sen->kLayer[t][j];
            }
            pder/=sen->tlen;
            g_mutex.lock();
            DLDk2out[i][j]=pder/sen->tlen;
            g_mutex.unlock();
        }
    }
    
    for(i=0;i<hidlayerNUM;++i){
        for(j=0;j<featureNUM;++j){
            pder=0.0;
            for(t=0;t<sen->tlen;++t){
                pder+=sen->DLDh[t][i]*sen->inVec[t][j];
            }
            pder/=sen->tlen;
            g_mutex.lock();
            DLDin2hid[i][j]+=pder;
            g_mutex.unlock();
        }
    }

    for(i=0;i<hidlayerNUM;++i){
        for(j=0;j<hidlayerNUM;++j){
            pder=0.0;
            for(t=1;t<sen->tlen;++t){
                pder+=sen->DLDh[t][i]*sen->kLayer[t-1][j];
            }
            pder/=sen->tlen;
            g_mutex.lock();
            DLDrh2h[i][j]+=pder;
            g_mutex.unlock();
        }
    }

    for(i=0;i<hidlayerNUM;++i){
        for(j=0;j<EMOTIONNUM;++j){
            pder=0.0;
            for(t=1;t<sen->tlen;++t){
                pder+=sen->DLDh[t][i]*sen->outLay[t-1][j];
            }
            pder/=sen->tlen;
            g_mutex.lock();
            DLDro2h[i][j]+=pder;
            g_mutex.unlock();
        }
    }
    
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movslq 0x10(%rsi), %r13
movq 0x38(%rsi), %rcx
movq 0x48(%rsi), %rax
movq -0x8(%rcx,%r13,8), %rdx
movq 0x58(%rsi), %rcx
movq -0x8(%rcx,%r13,8), %rsi
xorl %edi, %edi
movapd 0x24b9(%rip), %xmm2     # 0x6010
movsd (%rax,%rdi,8), %xmm0
subsd (%rdx,%rdi,8), %xmm0
xorpd %xmm2, %xmm0
movlpd %xmm0, (%rsi,%rdi,8)
incq %rdi
cmpq $0x7, %rdi
jne 0x3b57
cmpl $0x1, %r13d
movq %rbx, -0x30(%rbp)
jle 0x3cb7
addl $-0x2, %r13d
movl 0x34(%r14), %eax
movq -0x30(%rbp), %r12
xorl %r15d, %r15d
movq 0x38(%rbx), %rdx
movq 0x48(%rbx), %rsi
movsd (%rsi,%r15,8), %xmm0
movq (%rdx,%r13,8), %rdx
subsd (%rdx,%r15,8), %xmm0
xorpd %xmm2, %xmm0
movq (%rcx,%r13,8), %rdx
movlpd %xmm0, (%rdx,%r15,8)
xorl %edx, %edx
testl %eax, %eax
jle 0x3c87
xorl %ebx, %ebx
movq %rdx, -0x48(%rbp)
movq 0x8(%rcx,%r13,8), %rax
movsd (%rax,%rdx,8), %xmm0
movq 0x18(%r14), %rax
movq (%rax,%rdx,8), %rax
mulsd (%rax,%rbx,8), %xmm0
movsd %xmm0, -0x38(%rbp)
movq 0x20(%r12), %rax
movq 0x8(%rax,%r13,8), %rax
movsd (%rax,%rbx,8), %xmm0
xorpd %xmm2, %xmm0
movapd %xmm0, -0x60(%rbp)
callq 0x2270
movsd 0x2419(%rip), %xmm1     # 0x6020
addsd %xmm1, %xmm0
divsd %xmm0, %xmm1
movsd %xmm1, -0x40(%rbp)
movapd -0x60(%rbp), %xmm0
callq 0x2270
movapd 0x23ea(%rip), %xmm2     # 0x6010
movsd 0x23f2(%rip), %xmm3     # 0x6020
addsd %xmm3, %xmm0
movapd %xmm3, %xmm1
divsd %xmm0, %xmm1
movapd %xmm3, %xmm0
subsd %xmm1, %xmm0
movq 0x28(%r14), %rax
mulsd -0x40(%rbp), %xmm0
movq (%rax,%rbx,8), %rax
movq 0x58(%r12), %rcx
movq (%rcx,%r13,8), %rdx
mulsd -0x38(%rbp), %xmm0
mulsd (%rax,%r15,8), %xmm0
addsd (%rdx,%r15,8), %xmm0
movsd %xmm0, (%rdx,%r15,8)
movq -0x48(%rbp), %rdx
incq %rbx
movslq 0x34(%r14), %rax
cmpq %rax, %rbx
jl 0x3bc6
movq -0x30(%rbp), %rbx
incq %rdx
cmpq $0x7, %rdx
jne 0x3bb8
incq %r15
cmpq $0x7, %r15
jne 0x3b90
leaq -0x1(%r13), %rdx
testq %r13, %r13
movq %rdx, %r13
jg 0x3b8d
movl 0x10(%rbx), %r13d
jmp 0x3cbb
movl 0x34(%r14), %eax
testl %eax, %eax
jle 0x3daf
movslq %r13d, %r15
movq 0x60(%rbx), %rax
movq -0x8(%rax,%r15,8), %rcx
decq %r15
xorl %r12d, %r12d
movq $0x0, (%rcx,%r12,8)
xorl %ebx, %ebx
movq %r14, %r13
movq -0x30(%rbp), %r14
movq 0x58(%r14), %rax
movq (%rax,%r15,8), %rax
movsd (%rax,%rbx,8), %xmm0
movq 0x18(%r13), %rax
movq (%rax,%rbx,8), %rax
mulsd (%rax,%r12,8), %xmm0
movsd %xmm0, -0x38(%rbp)
movq 0x20(%r14), %rax
movq (%rax,%r15,8), %rax
movsd (%rax,%r12,8), %xmm0
xorpd %xmm2, %xmm0
movapd %xmm0, -0x60(%rbp)
callq 0x2270
addsd 0x22f6(%rip), %xmm0     # 0x6020
movsd 0x22ee(%rip), %xmm1     # 0x6020
divsd %xmm0, %xmm1
movsd %xmm1, -0x40(%rbp)
movapd -0x60(%rbp), %xmm0
callq 0x2270
movsd 0x22d3(%rip), %xmm3     # 0x6020
movapd 0x22bb(%rip), %xmm2     # 0x6010
addsd %xmm3, %xmm0
movapd %xmm3, %xmm1
divsd %xmm0, %xmm1
movapd %xmm3, %xmm0
subsd %xmm1, %xmm0
mulsd -0x40(%rbp), %xmm0
mulsd -0x38(%rbp), %xmm0
movq 0x60(%r14), %rax
movq (%rax,%r15,8), %rcx
addsd (%rcx,%r12,8), %xmm0
movsd %xmm0, (%rcx,%r12,8)
incq %rbx
cmpq $0x7, %rbx
jne 0x3ce6
incq %r12
movslq 0x34(%r13), %rax
cmpq %rax, %r12
movq %r13, %r14
jl 0x3cd5
movq -0x30(%rbp), %rbx
movl 0x10(%rbx), %r13d
cmpl $0x2, %r13d
jl 0x3f80
addl $-0x2, %r13d
testl %eax, %eax
jle 0x3f6c
movq 0x60(%rbx), %rcx
xorl %r12d, %r12d
movq (%rcx,%r13,8), %rax
movq $0x0, (%rax,%r12,8)
movq %r14, %r15
movq %rbx, %r14
xorl %ebx, %ebx
movq 0x58(%r14), %rax
movq (%rax,%r13,8), %rax
movsd (%rax,%rbx,8), %xmm0
movq 0x18(%r15), %rax
movq (%rax,%rbx,8), %rax
mulsd (%rax,%r12,8), %xmm0
movsd %xmm0, -0x38(%rbp)
movq 0x20(%r14), %rax
movq (%rax,%r13,8), %rax
movsd (%rax,%r12,8), %xmm0
xorpd %xmm2, %xmm0
movapd %xmm0, -0x60(%rbp)
callq 0x2270
addsd 0x21fc(%rip), %xmm0     # 0x6020
movsd 0x21f4(%rip), %xmm1     # 0x6020
divsd %xmm0, %xmm1
movsd %xmm1, -0x40(%rbp)
movapd -0x60(%rbp), %xmm0
callq 0x2270
movsd 0x21d9(%rip), %xmm3     # 0x6020
movapd 0x21c1(%rip), %xmm2     # 0x6010
addsd %xmm3, %xmm0
movapd %xmm3, %xmm1
divsd %xmm0, %xmm1
movapd %xmm3, %xmm0
subsd %xmm1, %xmm0
mulsd -0x40(%rbp), %xmm0
mulsd -0x38(%rbp), %xmm0
movq 0x60(%r14), %rcx
movq (%rcx,%r13,8), %rax
addsd (%rax,%r12,8), %xmm0
movsd %xmm0, (%rax,%r12,8)
incq %rbx
cmpq $0x7, %rbx
jne 0x3de0
movslq 0x34(%r15), %rdx
testq %rdx, %rdx
movq %r15, %r14
jle 0x3f5a
xorl %r15d, %r15d
movq -0x30(%rbp), %rbx
movq 0x8(%rcx,%r13,8), %rax
movsd (%rax,%r15,8), %xmm0
movq 0x20(%r14), %rax
movq (%rax,%r15,8), %rax
mulsd (%rax,%r12,8), %xmm0
movsd %xmm0, -0x38(%rbp)
movq 0x20(%rbx), %rax
movq 0x8(%rax,%r13,8), %rax
movsd (%rax,%r12,8), %xmm0
xorpd %xmm2, %xmm0
movapd %xmm0, -0x60(%rbp)
callq 0x2270
addsd 0x2138(%rip), %xmm0     # 0x6020
movsd 0x2130(%rip), %xmm1     # 0x6020
divsd %xmm0, %xmm1
movsd %xmm1, -0x40(%rbp)
movapd -0x60(%rbp), %xmm0
callq 0x2270
movsd 0x2115(%rip), %xmm3     # 0x6020
movapd 0x20fd(%rip), %xmm2     # 0x6010
addsd %xmm3, %xmm0
movapd %xmm3, %xmm1
divsd %xmm0, %xmm1
movapd %xmm3, %xmm0
subsd %xmm1, %xmm0
mulsd -0x40(%rbp), %xmm0
movq 0x60(%rbx), %rcx
mulsd -0x38(%rbp), %xmm0
movq (%rcx,%r13,8), %rax
addsd (%rax,%r12,8), %xmm0
movsd %xmm0, (%rax,%r12,8)
incq %r15
movl 0x34(%r14), %eax
movslq %eax, %rdx
cmpq %rdx, %r15
jl 0x3ea5
jmp 0x3f60
movl %edx, %eax
movq -0x30(%rbp), %rbx
incq %r12
cmpq %rdx, %r12
jl 0x3dcc
leaq -0x1(%r13), %rcx
testq %r13, %r13
movq %rcx, %r13
jg 0x3dbd
movl 0x10(%rbx), %r13d
movslq 0x30(%r14), %rcx
testq %rcx, %rcx
jle 0x3fef
movslq %r13d, %rdx
movq -0x30(%rbp), %rsi
movq 0x68(%rsi), %rsi
movq -0x8(%rsi,%rdx,8), %rsi
decq %rdx
movq 0x10(%r14), %rdi
movl %eax, %r8d
xorl %r9d, %r9d
movq $0x0, (%rsi,%r9,8)
testl %eax, %eax
jle 0x3fe7
movq -0x30(%rbp), %r10
movq 0x60(%r10), %r10
movq (%r10,%rdx,8), %r10
xorpd %xmm0, %xmm0
xorl %r11d, %r11d
movsd (%r10,%r11,8), %xmm1
movq (%rdi,%r11,8), %rbx
mulsd (%rbx,%r9,8), %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, (%rsi,%r9,8)
incq %r11
cmpq %r11, %r8
jne 0x3fc5
incq %r9
cmpq %rcx, %r9
jne 0x3fa6
cmpl $0x2, %r13d
jl 0x4175
addl $-0x2, %r13d
movq -0x30(%rbp), %r8
movq %r14, -0x68(%rbp)
movq -0x68(%rbp), %rbx
testl %ecx, %ecx
jle 0x4161
movq 0x68(%r8), %rdx
xorl %r12d, %r12d
movq %r13, -0x48(%rbp)
movq (%rdx,%r13,8), %rsi
movq $0x0, (%rsi,%r12,8)
testl %eax, %eax
jle 0x4152
movq 0x10(%r14), %rcx
xorl %r13d, %r13d
movq 0x60(%r8), %rsi
movq -0x48(%rbp), %rdi
movq (%rsi,%rdi,8), %rsi
movsd (%rsi,%r13,8), %xmm0
movq (%rcx,%r13,8), %rsi
movq (%rdx,%rdi,8), %rdi
mulsd (%rsi,%r12,8), %xmm0
addsd (%rdi,%r12,8), %xmm0
movsd %xmm0, (%rdi,%r12,8)
testl %eax, %eax
jle 0x4137
xorl %r15d, %r15d
movq -0x48(%rbp), %r14
movq 0x60(%r8), %rax
movq 0x8(%rax,%r14,8), %rax
movsd (%rax,%r13,8), %xmm0
movq 0x20(%rbx), %rax
movq (%rax,%r13,8), %rax
mulsd (%rax,%r15,8), %xmm0
movsd %xmm0, -0x38(%rbp)
movq 0x20(%r8), %rax
movq (%rax,%r14,8), %rax
movsd (%rax,%r15,8), %xmm0
xorpd %xmm2, %xmm0
movapd %xmm0, -0x60(%rbp)
callq 0x2270
movsd 0x1f68(%rip), %xmm1     # 0x6020
addsd %xmm1, %xmm0
divsd %xmm0, %xmm1
movsd %xmm1, -0x40(%rbp)
movapd -0x60(%rbp), %xmm0
callq 0x2270
movq -0x30(%rbp), %r8
movapd 0x1f35(%rip), %xmm2     # 0x6010
movsd 0x1f3d(%rip), %xmm3     # 0x6020
addsd %xmm3, %xmm0
movapd %xmm3, %xmm1
divsd %xmm0, %xmm1
movapd %xmm3, %xmm0
subsd %xmm1, %xmm0
mulsd -0x40(%rbp), %xmm0
movq 0x10(%rbx), %rcx
mulsd -0x38(%rbp), %xmm0
movq (%rcx,%r15,8), %rax
movq 0x68(%r8), %rdx
mulsd (%rax,%r12,8), %xmm0
movq (%rdx,%r14,8), %rax
addsd (%rax,%r12,8), %xmm0
movsd %xmm0, (%rax,%r12,8)
incq %r15
movl 0x34(%rbx), %eax
movslq %eax, %rsi
cmpq %rsi, %r15
jl 0x4072
jmp 0x413a
movslq %eax, %rsi
incq %r13
cmpq %rsi, %r13
jl 0x4037
movq -0x68(%rbp), %r14
movl 0x30(%r14), %ecx
movq -0x48(%rbp), %r13
incq %r12
movslq %ecx, %rsi
cmpq %rsi, %r12
jl 0x401c
leaq -0x1(%r13), %rdx
testq %r13, %r13
movq %rdx, %r13
jg 0x4009
movl 0x10(%r8), %r13d
movsd 0x40(%r14), %xmm0
movsd %xmm0, -0x38(%rbp)
leaq 0x3ff1(%rip), %rdi      # 0x8178
callq 0x2210
testl %eax, %eax
jne 0x44e1
xorps %xmm1, %xmm1
cvtsi2sd %r13d, %xmm1
movsd -0x38(%rbp), %xmm0
divsd %xmm1, %xmm0
movq (%r14), %rdi
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rsi
movq 0x68(%rax), %rdx
movl 0x30(%r14), %ecx
callq 0x5799
leaq 0x3fb4(%rip), %r15      # 0x8178
movq %r15, %rdi
callq 0x20f0
movl 0x34(%r14), %eax
xorl %r12d, %r12d
testl %eax, %eax
jle 0x427d
xorl %r13d, %r13d
movq -0x30(%rbp), %rbx
movq %rbx, %rcx
movslq 0x10(%rbx), %rbx
testq %rbx, %rbx
jle 0x421e
movq 0x28(%rcx), %rax
movq 0x58(%rcx), %rcx
xorpd %xmm1, %xmm1
xorl %edx, %edx
movq (%rcx,%rdx,8), %rsi
movsd (%rsi,%r12,8), %xmm0
movq (%rax,%rdx,8), %rsi
mulsd (%rsi,%r13,8), %xmm0
addsd %xmm0, %xmm1
incq %rdx
cmpq %rdx, %rbx
jne 0x41fc
jmp 0x4222
xorpd %xmm1, %xmm1
movsd %xmm1, -0x38(%rbp)
movq %r15, %rdi
callq 0x2210
testl %eax, %eax
jne 0x44e1
xorps %xmm0, %xmm0
cvtsi2sd %ebx, %xmm0
movsd -0x38(%rbp), %xmm1
divsd %xmm0, %xmm1
movq -0x30(%rbp), %rbx
xorps %xmm0, %xmm0
cvtsi2sdl 0x10(%rbx), %xmm0
divsd %xmm0, %xmm1
movq 0x60(%r14), %rax
movq (%rax,%r12,8), %rax
movsd %xmm1, (%rax,%r13,8)
movq %r15, %rdi
callq 0x20f0
incq %r13
movslq 0x34(%r14), %rax
cmpq %rax, %r13
jl 0x41e2
incq %r12
cmpq $0x7, %r12
jne 0x41d3
testl %eax, %eax
movq -0x30(%rbp), %rbx
jle 0x44d2
movl 0x30(%r14), %ecx
xorl %r12d, %r12d
leaq 0x3ed4(%rip), %r15      # 0x8178
testl %ecx, %ecx
jle 0x4348
xorl %r13d, %r13d
movq %rbx, %rcx
movslq 0x10(%rbx), %rbx
testq %rbx, %rbx
jle 0x42eb
movq 0x18(%rcx), %rax
movq 0x60(%rcx), %rcx
xorpd %xmm1, %xmm1
xorl %edx, %edx
movq (%rcx,%rdx,8), %rsi
movsd (%rsi,%r12,8), %xmm0
movq (%rax,%rdx,8), %rsi
mulsd (%rsi,%r13,8), %xmm0
addsd %xmm0, %xmm1
incq %rdx
cmpq %rdx, %rbx
jne 0x42c9
jmp 0x42ef
xorpd %xmm1, %xmm1
movsd %xmm1, -0x38(%rbp)
movq %r15, %rdi
callq 0x2210
testl %eax, %eax
jne 0x44e1
xorps %xmm0, %xmm0
cvtsi2sd %ebx, %xmm0
movsd -0x38(%rbp), %xmm1
divsd %xmm0, %xmm1
movq 0x58(%r14), %rax
movq (%rax,%r12,8), %rax
addsd (%rax,%r13,8), %xmm1
movsd %xmm1, (%rax,%r13,8)
movq %r15, %rdi
callq 0x20f0
incq %r13
movslq 0x30(%r14), %rcx
cmpq %rcx, %r13
movq -0x30(%rbp), %rbx
jl 0x42af
movl 0x34(%r14), %eax
incq %r12
movslq %eax, %rdx
cmpq %rdx, %r12
jl 0x42a4
testl %eax, %eax
jle 0x44d2
xorl %r12d, %r12d
leaq 0x3e0f(%rip), %r15      # 0x8178
testl %eax, %eax
jle 0x440f
xorl %r13d, %r13d
movslq 0x10(%rbx), %rbx
xorpd %xmm1, %xmm1
cmpq $0x2, %rbx
jl 0x43b5
movq -0x30(%rbp), %rcx
movq 0x28(%rcx), %rax
movq 0x60(%rcx), %rcx
leaq -0x1(%rbx), %rdx
xorl %esi, %esi
movq 0x8(%rcx,%rsi,8), %rdi
movsd (%rdi,%r12,8), %xmm0
movq (%rax,%rsi,8), %rdi
mulsd (%rdi,%r13,8), %xmm0
addsd %xmm0, %xmm1
incq %rsi
cmpq %rsi, %rdx
jne 0x4394
movsd %xmm1, -0x38(%rbp)
movq %r15, %rdi
callq 0x2210
testl %eax, %eax
jne 0x44e1
xorps %xmm0, %xmm0
cvtsi2sd %ebx, %xmm0
movsd -0x38(%rbp), %xmm1
divsd %xmm0, %xmm1
movq 0x68(%r14), %rax
movq (%rax,%r12,8), %rax
addsd (%rax,%r13,8), %xmm1
movsd %xmm1, (%rax,%r13,8)
movq %r15, %rdi
callq 0x20f0
incq %r13
movl 0x34(%r14), %eax
movslq %eax, %rcx
cmpq %rcx, %r13
movq -0x30(%rbp), %rbx
jl 0x4374
jmp 0x4412
movslq %eax, %rcx
incq %r12
cmpq %rcx, %r12
jl 0x4369
testl %eax, %eax
jle 0x44d2
xorl %r12d, %r12d
leaq 0x3d48(%rip), %r15      # 0x8178
xorl %r13d, %r13d
movslq 0x10(%rbx), %rbx
xorpd %xmm1, %xmm1
cmpq $0x2, %rbx
jl 0x4474
movq -0x30(%rbp), %rcx
movq 0x30(%rcx), %rax
movq 0x60(%rcx), %rcx
leaq -0x1(%rbx), %rdx
xorl %esi, %esi
movq 0x8(%rcx,%rsi,8), %rdi
movsd (%rdi,%r12,8), %xmm0
movq (%rax,%rsi,8), %rdi
mulsd (%rdi,%r13,8), %xmm0
addsd %xmm0, %xmm1
incq %rsi
cmpq %rsi, %rdx
jne 0x4453
movsd %xmm1, -0x38(%rbp)
movq %r15, %rdi
callq 0x2210
testl %eax, %eax
jne 0x44e1
xorps %xmm0, %xmm0
cvtsi2sd %ebx, %xmm0
movsd -0x38(%rbp), %xmm1
divsd %xmm0, %xmm1
movq 0x70(%r14), %rax
movq (%rax,%r12,8), %rax
addsd (%rax,%r13,8), %xmm1
movsd %xmm1, (%rax,%r13,8)
movq %r15, %rdi
callq 0x20f0
incq %r13
cmpq $0x7, %r13
movq -0x30(%rbp), %rbx
jne 0x4433
incq %r12
movslq 0x34(%r14), %rax
cmpq %rax, %r12
jl 0x4430
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %edi
callq 0x20d0