// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/detection_layer.c
// Function: forward_detection_layer
void forward_detection_layer(const detection_layer l, network net)
{
    int locations = l.side*l.side;
    int i,j;
    memcpy(l.output, net.input, l.outputs*l.batch*sizeof(float));
    //if(l.reorg) reorg(l.output, l.w*l.h, size*l.n, l.batch, 1);
    int b;
    if (l.softmax){
        for(b = 0; b < l.batch; ++b){
            int index = b*l.inputs;
            for (i = 0; i < locations; ++i) {
                int offset = i*l.classes;
                softmax(l.output + index + offset, l.classes, 1, 1,
                        l.output + index + offset);
            }
        }
    }
    if(net.train){
        float avg_iou = 0;
        float avg_cat = 0;
        float avg_allcat = 0;
        float avg_obj = 0;
        float avg_anyobj = 0;
        int count = 0;
        *(l.cost) = 0;
        int size = l.inputs * l.batch;
        memset(l.delta, 0, size * sizeof(float));
        for (b = 0; b < l.batch; ++b){
            int index = b*l.inputs;
            for (i = 0; i < locations; ++i) {
                int truth_index = (b*locations + i)*(1+l.coords+l.classes);
                int is_obj = net.truth[truth_index];
                for (j = 0; j < l.n; ++j) {
                    int p_index = index + locations*l.classes + i*l.n + j;
                    l.delta[p_index] = l.noobject_scale*(0 - l.output[p_index]);
                    *(l.cost) += l.noobject_scale*pow(l.output[p_index], 2);
                    avg_anyobj += l.output[p_index];
                }

                int best_index = -1;
                float best_iou = 0;
                float best_rmse = 20;

                if (!is_obj){
                    continue;
                }

                int class_index = index + i*l.classes;
                for(j = 0; j < l.classes; ++j) {
                    l.delta[class_index+j] = l.class_scale * (net.truth[truth_index+1+j] - l.output[class_index+j]);
                    *(l.cost) += l.class_scale * pow(net.truth[truth_index+1+j] - l.output[class_index+j], 2);
                    if(net.truth[truth_index + 1 + j]) avg_cat += l.output[class_index+j];
                    avg_allcat += l.output[class_index+j];
                }

                box truth = float_to_box(net.truth + truth_index + 1 + l.classes, 1);
                truth.x /= l.side;
                truth.y /= l.side;

                for(j = 0; j < l.n; ++j){
                    int box_index = index + locations*(l.classes + l.n) + (i*l.n + j) * l.coords;
                    box out = float_to_box(l.output + box_index, 1);
                    out.x /= l.side;
                    out.y /= l.side;

                    if (l.sqrt){
                        out.w = out.w*out.w;
                        out.h = out.h*out.h;
                    }

                    float iou  = box_iou(out, truth);
                    //iou = 0;
                    float rmse = box_rmse(out, truth);
                    if(best_iou > 0 || iou > 0){
                        if(iou > best_iou){
                            best_iou = iou;
                            best_index = j;
                        }
                    }else{
                        if(rmse < best_rmse){
                            best_rmse = rmse;
                            best_index = j;
                        }
                    }
                }

                if(l.forced){
                    if(truth.w*truth.h < .1){
                        best_index = 1;
                    }else{
                        best_index = 0;
                    }
                }
                if(l.random && *(net.seen) < 64000){
                    best_index = rand()%l.n;
                }

                int box_index = index + locations*(l.classes + l.n) + (i*l.n + best_index) * l.coords;
                int tbox_index = truth_index + 1 + l.classes;

                box out = float_to_box(l.output + box_index, 1);
                out.x /= l.side;
                out.y /= l.side;
                if (l.sqrt) {
                    out.w = out.w*out.w;
                    out.h = out.h*out.h;
                }
                float iou  = box_iou(out, truth);

                //printf("%d,", best_index);
                int p_index = index + locations*l.classes + i*l.n + best_index;
                *(l.cost) -= l.noobject_scale * pow(l.output[p_index], 2);
                *(l.cost) += l.object_scale * pow(1-l.output[p_index], 2);
                avg_obj += l.output[p_index];
                l.delta[p_index] = l.object_scale * (1.-l.output[p_index]);

                if(l.rescore){
                    l.delta[p_index] = l.object_scale * (iou - l.output[p_index]);
                }

                l.delta[box_index+0] = l.coord_scale*(net.truth[tbox_index + 0] - l.output[box_index + 0]);
                l.delta[box_index+1] = l.coord_scale*(net.truth[tbox_index + 1] - l.output[box_index + 1]);
                l.delta[box_index+2] = l.coord_scale*(net.truth[tbox_index + 2] - l.output[box_index + 2]);
                l.delta[box_index+3] = l.coord_scale*(net.truth[tbox_index + 3] - l.output[box_index + 3]);
                if(l.sqrt){
                    l.delta[box_index+2] = l.coord_scale*(sqrt(net.truth[tbox_index + 2]) - l.output[box_index + 2]);
                    l.delta[box_index+3] = l.coord_scale*(sqrt(net.truth[tbox_index + 3]) - l.output[box_index + 3]);
                }

                *(l.cost) += pow(1-iou, 2);
                avg_iou += iou;
                ++count;
            }
        }

        if(0){
            float *costs = calloc(l.batch*locations*l.n, sizeof(float));
            for (b = 0; b < l.batch; ++b) {
                int index = b*l.inputs;
                for (i = 0; i < locations; ++i) {
                    for (j = 0; j < l.n; ++j) {
                        int p_index = index + locations*l.classes + i*l.n + j;
                        costs[b*locations*l.n + i*l.n + j] = l.delta[p_index]*l.delta[p_index];
                    }
                }
            }
            int indexes[100];
            top_k(costs, l.batch*locations*l.n, 100, indexes);
            float cutoff = costs[indexes[99]];
            for (b = 0; b < l.batch; ++b) {
                int index = b*l.inputs;
                for (i = 0; i < locations; ++i) {
                    for (j = 0; j < l.n; ++j) {
                        int p_index = index + locations*l.classes + i*l.n + j;
                        if (l.delta[p_index]*l.delta[p_index] < cutoff) l.delta[p_index] = 0;
                    }
                }
            }
            free(costs);
        }


        *(l.cost) = pow(mag_array(l.delta, l.outputs * l.batch), 2);


        printf("Detection Avg IOU: %f, Pos Cat: %f, All Cat: %f, Pos Obj: %f, Any Obj: %f, count: %d\n", avg_iou/count, avg_cat/count, avg_allcat/(count*l.classes), avg_obj/count, avg_anyobj/(l.batch*locations*l.n), count);
        //if(l.reorg) reorg(l.delta, l.w*l.h, size*l.n, l.batch, 0);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
leaq 0x4b0(%rbp), %rax
movq %rax, -0xb0(%rbp)
leaq 0x10(%rbp), %rcx
movq %rcx, -0xa8(%rbp)
movl 0x94(%rcx), %edx
imull 0x94(%rcx), %edx
movl %edx, -0x4(%rbp)
movq 0x268(%rcx), %rdi
movq 0xd8(%rax), %rsi
movl 0x58(%rcx), %eax
imull 0x48(%rcx), %eax
movslq %eax, %rdx
shlq $0x2, %rdx
callq 0x3280
movq -0xa8(%rbp), %rax
cmpl $0x0, 0xf8(%rax)
je 0x42f36
movl $0x0, -0x10(%rbp)
movq -0xa8(%rbp), %rcx
movl -0x10(%rbp), %eax
cmpl 0x48(%rcx), %eax
jge 0x42f34
movq -0xa8(%rbp), %rcx
movl -0x10(%rbp), %eax
imull 0x54(%rcx), %eax
movl %eax, -0x14(%rbp)
movl $0x0, -0x8(%rbp)
movl -0x8(%rbp), %eax
cmpl -0x4(%rbp), %eax
jge 0x42f24
movq -0xa8(%rbp), %rax
movl -0x8(%rbp), %ecx
imull 0xfc(%rax), %ecx
movl %ecx, -0x18(%rbp)
movq 0x268(%rax), %rdi
movslq -0x14(%rbp), %rcx
shlq $0x2, %rcx
addq %rcx, %rdi
movslq -0x18(%rbp), %rcx
shlq $0x2, %rcx
addq %rcx, %rdi
movl 0xfc(%rax), %esi
movq 0x268(%rax), %rcx
movslq -0x14(%rbp), %rax
shlq $0x2, %rax
addq %rax, %rcx
movslq -0x18(%rbp), %rax
shlq $0x2, %rax
addq %rax, %rcx
movss 0x2e0fd(%rip), %xmm0    # 0x7100c
movl $0x1, %edx
callq 0x2fed0
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x42eab
jmp 0x42f26
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x42e80
jmp 0x42f36
movq -0xb0(%rbp), %rax
cmpl $0x0, 0xf8(%rax)
je 0x43c05
movq -0xa8(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, -0x1c(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0x20(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0x24(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0x28(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0x2c(%rbp)
movl $0x0, -0x30(%rbp)
movq 0x1d8(%rax), %rcx
xorps %xmm0, %xmm0
movss %xmm0, (%rcx)
movl 0x54(%rax), %ecx
imull 0x48(%rax), %ecx
movl %ecx, -0x34(%rbp)
movq 0x260(%rax), %rdi
movslq -0x34(%rbp), %rdx
shlq $0x2, %rdx
xorl %esi, %esi
callq 0x3190
movl $0x0, -0x10(%rbp)
movq -0xa8(%rbp), %rcx
movl -0x10(%rbp), %eax
cmpl 0x48(%rcx), %eax
jge 0x43b43
movq -0xa8(%rbp), %rcx
movl -0x10(%rbp), %eax
imull 0x54(%rcx), %eax
movl %eax, -0x38(%rbp)
movl $0x0, -0x8(%rbp)
movl -0x8(%rbp), %eax
cmpl -0x4(%rbp), %eax
jge 0x43b33
movq -0xb0(%rbp), %rax
movq -0xa8(%rbp), %rsi
movl -0x10(%rbp), %ecx
imull -0x4(%rbp), %ecx
addl -0x8(%rbp), %ecx
movl 0x100(%rsi), %edx
addl $0x1, %edx
addl 0xfc(%rsi), %edx
imull %edx, %ecx
movl %ecx, -0x3c(%rbp)
movq 0xe0(%rax), %rax
movslq -0x3c(%rbp), %rcx
cvttss2si (%rax,%rcx,4), %eax
movl %eax, -0x40(%rbp)
movl $0x0, -0xc(%rbp)
movq -0xa8(%rbp), %rcx
movl -0xc(%rbp), %eax
cmpl 0x84(%rcx), %eax
jge 0x4312e
movq -0xa8(%rbp), %rax
movl -0x38(%rbp), %ecx
movl -0x4(%rbp), %edx
imull 0xfc(%rax), %edx
addl %edx, %ecx
movl -0x8(%rbp), %edx
imull 0x84(%rax), %edx
addl %edx, %ecx
addl -0xc(%rbp), %ecx
movl %ecx, -0x44(%rbp)
movss 0x148(%rax), %xmm0
movq 0x268(%rax), %rcx
movslq -0x44(%rbp), %rdx
xorps %xmm1, %xmm1
subss (%rcx,%rdx,4), %xmm1
mulss %xmm1, %xmm0
movq 0x260(%rax), %rcx
movslq -0x44(%rbp), %rdx
movss %xmm0, (%rcx,%rdx,4)
movss 0x148(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, -0xb8(%rbp)
movq 0x268(%rax), %rax
movslq -0x44(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x2df88(%rip), %xmm1    # 0x71058
callq 0x30e0
movq -0xa8(%rbp), %rax
movaps %xmm0, %xmm2
movsd -0xb8(%rbp), %xmm0
movq 0x1d8(%rax), %rcx
movss (%rcx), %xmm1
cvtss2sd %xmm1, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, (%rcx)
movq 0x268(%rax), %rax
movslq -0x44(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
addss -0x2c(%rbp), %xmm0
movss %xmm0, -0x2c(%rbp)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x43033
movl $0xffffffff, -0x48(%rbp) # imm = 0xFFFFFFFF
xorps %xmm0, %xmm0
movss %xmm0, -0x4c(%rbp)
movss 0x31ee3(%rip), %xmm0    # 0x75028
movss %xmm0, -0x50(%rbp)
cmpl $0x0, -0x40(%rbp)
jne 0x43155
jmp 0x43b25
movq -0xa8(%rbp), %rdx
movl -0x38(%rbp), %eax
movl -0x8(%rbp), %ecx
imull 0xfc(%rdx), %ecx
addl %ecx, %eax
movl %eax, -0x54(%rbp)
movl $0x0, -0xc(%rbp)
movq -0xa8(%rbp), %rcx
movl -0xc(%rbp), %eax
cmpl 0xfc(%rcx), %eax
jge 0x432ef
movq -0xb0(%rbp), %rcx
movq -0xa8(%rbp), %rax
movss 0x150(%rax), %xmm0
movq 0xe0(%rcx), %rdx
movl -0x3c(%rbp), %esi
addl $0x1, %esi
addl -0xc(%rbp), %esi
movslq %esi, %rsi
movss (%rdx,%rsi,4), %xmm1
movq 0x268(%rax), %rdx
movl -0x54(%rbp), %esi
addl -0xc(%rbp), %esi
movslq %esi, %rsi
subss (%rdx,%rsi,4), %xmm1
mulss %xmm1, %xmm0
movq 0x260(%rax), %rdx
movl -0x54(%rbp), %esi
addl -0xc(%rbp), %esi
movslq %esi, %rsi
movss %xmm0, (%rdx,%rsi,4)
movss 0x150(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, -0xc0(%rbp)
movq 0xe0(%rcx), %rcx
movl -0x3c(%rbp), %edx
addl $0x1, %edx
addl -0xc(%rbp), %edx
movslq %edx, %rdx
movss (%rcx,%rdx,4), %xmm0
movq 0x268(%rax), %rax
movl -0x54(%rbp), %ecx
addl -0xc(%rbp), %ecx
movslq %ecx, %rcx
subss (%rax,%rcx,4), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x2de24(%rip), %xmm1    # 0x71058
callq 0x30e0
movq -0xa8(%rbp), %rcx
movq -0xb0(%rbp), %rax
movaps %xmm0, %xmm2
movsd -0xc0(%rbp), %xmm0
movq 0x1d8(%rcx), %rcx
movss (%rcx), %xmm1
cvtss2sd %xmm1, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, (%rcx)
movq 0xe0(%rax), %rax
movl -0x3c(%rbp), %ecx
addl $0x1, %ecx
addl -0xc(%rbp), %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x43295
jp 0x43295
jmp 0x432bb
movq -0xa8(%rbp), %rax
movq 0x268(%rax), %rax
movl -0x54(%rbp), %ecx
addl -0xc(%rbp), %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm0
addss -0x20(%rbp), %xmm0
movss %xmm0, -0x20(%rbp)
movq -0xa8(%rbp), %rax
movq 0x268(%rax), %rax
movl -0x54(%rbp), %ecx
addl -0xc(%rbp), %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm0
addss -0x24(%rbp), %xmm0
movss %xmm0, -0x24(%rbp)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x43175
movq -0xa8(%rbp), %rcx
movq -0xb0(%rbp), %rax
movq 0xe0(%rax), %rax
movslq -0x3c(%rbp), %rdx
leaq (%rax,%rdx,4), %rax
movslq 0xfc(%rcx), %rcx
leaq 0x4(%rax,%rcx,4), %rdi
movl $0x1, %esi
callq 0x44f70
movq -0xa8(%rbp), %rax
movlpd %xmm0, -0x64(%rbp)
movlpd %xmm1, -0x5c(%rbp)
cvtsi2ssl 0x94(%rax), %xmm1
movss -0x64(%rbp), %xmm0
divss %xmm1, %xmm0
movss %xmm0, -0x64(%rbp)
cvtsi2ssl 0x94(%rax), %xmm1
movss -0x60(%rbp), %xmm0
divss %xmm1, %xmm0
movss %xmm0, -0x60(%rbp)
movl $0x0, -0xc(%rbp)
movq -0xa8(%rbp), %rcx
movl -0xc(%rbp), %eax
cmpl 0x84(%rcx), %eax
jge 0x434d6
movq -0xa8(%rbp), %rax
movl -0x38(%rbp), %ecx
movl -0x4(%rbp), %edx
movl 0x84(%rax), %esi
movl 0xfc(%rax), %edi
addl %esi, %edi
imull %edi, %edx
addl %edx, %ecx
movl -0x8(%rbp), %edx
imull %esi, %edx
movl -0xc(%rbp), %esi
addl %esi, %edx
movl 0x100(%rax), %esi
imull %esi, %edx
addl %edx, %ecx
movl %ecx, -0x68(%rbp)
movq 0x268(%rax), %rax
movslq -0x68(%rbp), %rcx
leaq (%rax,%rcx,4), %rdi
movl $0x1, %esi
callq 0x44f70
movq -0xa8(%rbp), %rax
movlpd %xmm0, -0x78(%rbp)
movlpd %xmm1, -0x70(%rbp)
cvtsi2ssl 0x94(%rax), %xmm1
movss -0x78(%rbp), %xmm0
divss %xmm1, %xmm0
movss %xmm0, -0x78(%rbp)
cvtsi2ssl 0x94(%rax), %xmm1
movss -0x74(%rbp), %xmm0
divss %xmm1, %xmm0
movss %xmm0, -0x74(%rbp)
cmpl $0x0, 0xac(%rax)
je 0x43432
movss -0x70(%rbp), %xmm0
mulss -0x70(%rbp), %xmm0
movss %xmm0, -0x70(%rbp)
movss -0x6c(%rbp), %xmm0
mulss -0x6c(%rbp), %xmm0
movss %xmm0, -0x6c(%rbp)
movsd -0x78(%rbp), %xmm0
movsd -0x70(%rbp), %xmm1
movsd -0x64(%rbp), %xmm2
movsd -0x5c(%rbp), %xmm3
callq 0x44cd0
movss %xmm0, -0x7c(%rbp)
movsd -0x78(%rbp), %xmm0
movsd -0x70(%rbp), %xmm1
movsd -0x64(%rbp), %xmm2
movsd -0x5c(%rbp), %xmm3
callq 0x454b0
movss %xmm0, -0x80(%rbp)
movss -0x4c(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
ja 0x43488
movss -0x7c(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x434a5
movss -0x7c(%rbp), %xmm0
ucomiss -0x4c(%rbp), %xmm0
jbe 0x434a3
movss -0x7c(%rbp), %xmm0
movss %xmm0, -0x4c(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x48(%rbp)
jmp 0x434c6
movss -0x80(%rbp), %xmm1
movss -0x50(%rbp), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x434c4
movss -0x80(%rbp), %xmm0
movss %xmm0, -0x50(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x48(%rbp)
jmp 0x434c6
jmp 0x434c8
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x43366
movq -0xa8(%rbp), %rax
cmpl $0x0, 0x4c(%rax)
je 0x43511
movss -0x5c(%rbp), %xmm0
mulss -0x58(%rbp), %xmm0
cvtss2sd %xmm0, %xmm1
movsd 0x30bbf(%rip), %xmm0    # 0x740b8
ucomisd %xmm1, %xmm0
jbe 0x43508
movl $0x1, -0x48(%rbp)
jmp 0x4350f
movl $0x0, -0x48(%rbp)
jmp 0x43511
movq -0xa8(%rbp), %rax
cmpl $0x0, 0x158(%rax)
je 0x4354b
movq -0xb0(%rbp), %rax
movq 0x8(%rax), %rax
cmpq $0xfa00, (%rax)         # imm = 0xFA00
jae 0x4354b
callq 0x34b0
movq -0xa8(%rbp), %rcx
cltd
idivl 0x84(%rcx)
movl %edx, -0x48(%rbp)
movq -0xa8(%rbp), %rax
movl -0x38(%rbp), %ecx
movl -0x4(%rbp), %edx
movl 0x84(%rax), %esi
movl 0xfc(%rax), %edi
addl %esi, %edi
imull %edi, %edx
addl %edx, %ecx
movl -0x8(%rbp), %edx
imull %esi, %edx
movl -0x48(%rbp), %esi
addl %esi, %edx
movl 0x100(%rax), %esi
imull %esi, %edx
addl %edx, %ecx
movl %ecx, -0x84(%rbp)
movl -0x3c(%rbp), %esi
movl 0xfc(%rax), %ecx
movl %ecx, %edx
movl %esi, %ecx
leal 0x1(%rcx,%rdx), %ecx
movl %ecx, -0x88(%rbp)
movq 0x268(%rax), %rax
movslq -0x84(%rbp), %rcx
leaq (%rax,%rcx,4), %rdi
movl $0x1, %esi
callq 0x44f70
movq -0xa8(%rbp), %rax
movlpd %xmm0, -0x98(%rbp)
movlpd %xmm1, -0x90(%rbp)
cvtsi2ssl 0x94(%rax), %xmm1
movss -0x98(%rbp), %xmm0
divss %xmm1, %xmm0
movss %xmm0, -0x98(%rbp)
cvtsi2ssl 0x94(%rax), %xmm1
movss -0x94(%rbp), %xmm0
divss %xmm1, %xmm0
movss %xmm0, -0x94(%rbp)
cmpl $0x0, 0xac(%rax)
je 0x43642
movss -0x90(%rbp), %xmm0
mulss -0x90(%rbp), %xmm0
movss %xmm0, -0x90(%rbp)
movss -0x8c(%rbp), %xmm0
mulss -0x8c(%rbp), %xmm0
movss %xmm0, -0x8c(%rbp)
movsd -0x98(%rbp), %xmm0
movsd -0x90(%rbp), %xmm1
movsd -0x64(%rbp), %xmm2
movsd -0x5c(%rbp), %xmm3
callq 0x44cd0
movq -0xa8(%rbp), %rax
movss %xmm0, -0x9c(%rbp)
movl -0x38(%rbp), %ecx
movl -0x4(%rbp), %edx
imull 0xfc(%rax), %edx
addl %edx, %ecx
movl -0x8(%rbp), %edx
imull 0x84(%rax), %edx
addl %edx, %ecx
addl -0x48(%rbp), %ecx
movl %ecx, -0xa0(%rbp)
movss 0x148(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, -0xd0(%rbp)
movq 0x268(%rax), %rax
movslq -0xa0(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x2d991(%rip), %xmm1    # 0x71058
callq 0x30e0
movq -0xa8(%rbp), %rax
movaps %xmm0, %xmm2
movsd -0xd0(%rbp), %xmm0
movq 0x1d8(%rax), %rcx
movss (%rcx), %xmm1
cvtss2sd %xmm1, %xmm1
movq %xmm0, %rdx
movabsq $-0x8000000000000000, %rsi # imm = 0x8000000000000000
xorq %rsi, %rdx
movq %rdx, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, (%rcx)
movss 0x144(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, -0xc8(%rbp)
movq 0x268(%rax), %rax
movslq -0xa0(%rbp), %rcx
movss 0x2d8ce(%rip), %xmm0    # 0x7100c
subss (%rax,%rcx,4), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x2d909(%rip), %xmm1    # 0x71058
callq 0x30e0
movq -0xa8(%rbp), %rax
movaps %xmm0, %xmm2
movsd -0xc8(%rbp), %xmm0
movq 0x1d8(%rax), %rcx
movss (%rcx), %xmm1
cvtss2sd %xmm1, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, (%rcx)
movq 0x268(%rax), %rcx
movslq -0xa0(%rbp), %rdx
movss (%rcx,%rdx,4), %xmm0
addss -0x28(%rbp), %xmm0
movss %xmm0, -0x28(%rbp)
movss 0x144(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movq 0x268(%rax), %rcx
movslq -0xa0(%rbp), %rdx
movss (%rcx,%rdx,4), %xmm1
cvtss2sd %xmm1, %xmm2
movsd 0x2d893(%rip), %xmm1    # 0x71060
subsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movq 0x260(%rax), %rcx
movslq -0xa0(%rbp), %rdx
movss %xmm0, (%rcx,%rdx,4)
cmpl $0x0, 0x108(%rax)
je 0x43836
movq -0xa8(%rbp), %rax
movss 0x144(%rax), %xmm0
movss -0x9c(%rbp), %xmm1
movq 0x268(%rax), %rcx
movslq -0xa0(%rbp), %rdx
subss (%rcx,%rdx,4), %xmm1
mulss %xmm1, %xmm0
movq 0x260(%rax), %rax
movslq -0xa0(%rbp), %rcx
movss %xmm0, (%rax,%rcx,4)
movq -0xa8(%rbp), %rax
movq -0xb0(%rbp), %rcx
movss 0x140(%rax), %xmm0
movq 0xe0(%rcx), %rdx
movl -0x88(%rbp), %esi
addl $0x0, %esi
movslq %esi, %rsi
movss (%rdx,%rsi,4), %xmm1
movq 0x268(%rax), %rdx
movl -0x84(%rbp), %esi
addl $0x0, %esi
movslq %esi, %rsi
subss (%rdx,%rsi,4), %xmm1
mulss %xmm1, %xmm0
movq 0x260(%rax), %rdx
movl -0x84(%rbp), %esi
addl $0x0, %esi
movslq %esi, %rsi
movss %xmm0, (%rdx,%rsi,4)
movss 0x140(%rax), %xmm0
movq 0xe0(%rcx), %rdx
movl -0x88(%rbp), %esi
addl $0x1, %esi
movslq %esi, %rsi
movss (%rdx,%rsi,4), %xmm1
movq 0x268(%rax), %rdx
movl -0x84(%rbp), %esi
addl $0x1, %esi
movslq %esi, %rsi
subss (%rdx,%rsi,4), %xmm1
mulss %xmm1, %xmm0
movq 0x260(%rax), %rdx
movl -0x84(%rbp), %esi
addl $0x1, %esi
movslq %esi, %rsi
movss %xmm0, (%rdx,%rsi,4)
movss 0x140(%rax), %xmm0
movq 0xe0(%rcx), %rdx
movl -0x88(%rbp), %esi
addl $0x2, %esi
movslq %esi, %rsi
movss (%rdx,%rsi,4), %xmm1
movq 0x268(%rax), %rdx
movl -0x84(%rbp), %esi
addl $0x2, %esi
movslq %esi, %rsi
subss (%rdx,%rsi,4), %xmm1
mulss %xmm1, %xmm0
movq 0x260(%rax), %rdx
movl -0x84(%rbp), %esi
addl $0x2, %esi
movslq %esi, %rsi
movss %xmm0, (%rdx,%rsi,4)
movss 0x140(%rax), %xmm0
movq 0xe0(%rcx), %rcx
movl -0x88(%rbp), %edx
addl $0x3, %edx
movslq %edx, %rdx
movss (%rcx,%rdx,4), %xmm1
movq 0x268(%rax), %rcx
movl -0x84(%rbp), %edx
addl $0x3, %edx
movslq %edx, %rdx
subss (%rcx,%rdx,4), %xmm1
mulss %xmm1, %xmm0
movq 0x260(%rax), %rcx
movl -0x84(%rbp), %edx
addl $0x3, %edx
movslq %edx, %rdx
movss %xmm0, (%rcx,%rdx,4)
cmpl $0x0, 0xac(%rax)
je 0x43ac4
movq -0xa8(%rbp), %rcx
movq -0xb0(%rbp), %rax
movss 0x140(%rcx), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, -0xe0(%rbp)
movq 0xe0(%rax), %rax
movl -0x88(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x3430
movq -0xb0(%rbp), %rax
movq -0xa8(%rbp), %rcx
movaps %xmm0, %xmm1
movsd -0xe0(%rbp), %xmm0
movq 0x268(%rcx), %rdx
movl -0x84(%rbp), %esi
addl $0x2, %esi
movslq %esi, %rsi
movss (%rdx,%rsi,4), %xmm2
cvtss2sd %xmm2, %xmm2
subsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movq 0x260(%rcx), %rdx
movl -0x84(%rbp), %esi
addl $0x2, %esi
movslq %esi, %rsi
movss %xmm0, (%rdx,%rsi,4)
movss 0x140(%rcx), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, -0xd8(%rbp)
movq 0xe0(%rax), %rax
movl -0x88(%rbp), %ecx
addl $0x3, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x3430
movq -0xa8(%rbp), %rax
movaps %xmm0, %xmm1
movsd -0xd8(%rbp), %xmm0
movq 0x268(%rax), %rcx
movl -0x84(%rbp), %edx
addl $0x3, %edx
movslq %edx, %rdx
movss (%rcx,%rdx,4), %xmm2
cvtss2sd %xmm2, %xmm2
subsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movq 0x260(%rax), %rax
movl -0x84(%rbp), %ecx
addl $0x3, %ecx
movslq %ecx, %rcx
movss %xmm0, (%rax,%rcx,4)
movss 0x2d540(%rip), %xmm0    # 0x7100c
subss -0x9c(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x2d578(%rip), %xmm1    # 0x71058
callq 0x30e0
movq -0xa8(%rbp), %rax
movaps %xmm0, %xmm1
movq 0x1d8(%rax), %rax
movss (%rax), %xmm0
cvtss2sd %xmm0, %xmm0
addsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, (%rax)
movss -0x9c(%rbp), %xmm0
addss -0x1c(%rbp), %xmm0
movss %xmm0, -0x1c(%rbp)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x42fe0
jmp 0x43b35
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x42fb5
movq -0xa8(%rbp), %rax
movq 0x260(%rax), %rdi
movl 0x58(%rax), %esi
imull 0x48(%rax), %esi
callq 0x59b0
cvtss2sd %xmm0, %xmm0
movsd 0x2d4ef(%rip), %xmm1    # 0x71058
callq 0x30e0
movq -0xa8(%rbp), %rcx
cvtsd2ss %xmm0, %xmm0
movq 0x1d8(%rcx), %rax
movss %xmm0, (%rax)
movss -0x1c(%rbp), %xmm0
cvtsi2ssl -0x30(%rbp), %xmm1
divss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
movss -0x20(%rbp), %xmm1
cvtsi2ssl -0x30(%rbp), %xmm2
divss %xmm2, %xmm1
cvtss2sd %xmm1, %xmm1
movss -0x24(%rbp), %xmm2
movl -0x30(%rbp), %eax
imull 0xfc(%rcx), %eax
cvtsi2ss %eax, %xmm3
divss %xmm3, %xmm2
cvtss2sd %xmm2, %xmm2
movss -0x28(%rbp), %xmm3
cvtsi2ssl -0x30(%rbp), %xmm4
divss %xmm4, %xmm3
cvtss2sd %xmm3, %xmm3
movss -0x2c(%rbp), %xmm4
movl 0x48(%rcx), %eax
imull -0x4(%rbp), %eax
imull 0x84(%rcx), %eax
cvtsi2ss %eax, %xmm5
divss %xmm5, %xmm4
cvtss2sd %xmm4, %xmm4
movl -0x30(%rbp), %esi
leaq 0x314ce(%rip), %rdi     # 0x750cc
movb $0x5, %al
callq 0x3130
addq $0xe0, %rsp
popq %rbp
retq
nop