// File: /workspace/github_c_makefile_star2_O1/FredTheDino[P]Fog/src/engine/logic/block_physics.cpp
// Function: Physics::check_overlap(Physics::Body*, Physics::Body*)
Overlap check_overlap(Body *body_a, Body *body_b) {
    // NOTE: If I find that dragging along a surface is jagged,
    // we could try having weighted directions and add a little bit
    // of weight to the ones along the closing velocity. It might
    // help. I don't know.

    Overlap overlap = {body_a, body_b, -1.0f};
    if ((body_a->layer & body_b->layer) == 0) return overlap;

    Shape shape_a = find_shape(body_a->shape);
    Shape shape_b = find_shape(body_b->shape);

    Vec2 center = (body_a->position + body_b->position) * 0.5;

    Vec2 relative_position = (body_b->position) - (body_a->position);

    Vec2 scale = inverse(body_a->scale);
    List<Vec2> normals = shape_a.normals;
    for (u32 n = 0; n < 2; n++) {
        for (u32 i = 0; i < normals.length; i++) {
            Vec2 normal, axis_a, axis_b;
            normal = normals[i];
            normal = normalize(hadamard(normal, scale));

            if (n == 0) {
                f32 rotation = body_a->rotation - body_b->rotation;
                axis_a = normal;
                axis_b = rotate(normal, rotation);
                normal = rotate(normal, body_a->rotation);
                if (debug_view_is_on())
                    Renderer::push_line(MAX_LAYER, body_a->position, body_a->position + normal,
                                        V4(0.6, 0.0, 0.3, 1.0));
            } else {
                f32 rotation = body_b->rotation - body_a->rotation;
                axis_a = rotate(normal, rotation);
                axis_b = normal;
                normal = rotate(normal, body_b->rotation);
                if (debug_view_is_on())
                    Renderer::push_line(MAX_LAYER, body_b->position, body_b->position + normal,
                                        V4(0.0, 0.6, 0.3, 1.0));
            }

#if 0
            Vec2 axis_a, axis_b;
            axis_a = normal;
            axis_b = normal;
#endif

            Limit limit_a, limit_b;
            limit_a = project_shape(shape_a, axis_a, body_a->scale, body_a->offset);
            limit_b = project_shape(shape_b, axis_b, body_b->scale, body_b->offset);

            f32 projected_distance = dot(relative_position, normal);


            f32 depth;
            if (projected_distance > 0)
                depth = limit_a.upper - limit_b.lower - projected_distance;
            else
                depth = limit_b.upper - limit_a.lower + projected_distance;

            if (debug_view_is_on()) {
                Vec2 a1, a2;
                a1 = body_a->position + normal * limit_a.lower;
                a2 = body_a->position + normal * limit_a.upper;
                Renderer::push_line(MAX_LAYER, a1, a2, V4(1, 0, 1, 1));

                Vec2 b1, b2;
                b1 = body_b->position + normal * limit_b.lower;
                b2 = body_b->position + normal * limit_b.upper;
                Renderer::push_line(MAX_LAYER, b1, b2, V4(0, 1, 1, 1));

                //debug_line(body_a->position, body_a->position + axis_a);
                //debug_line(body_b->position, body_b->position + axis_b);
                Vec4 color = depth > 0 ? V4(1, 1, 0, 1) : V4(1, 0, 0, 1);
                Renderer::push_line(MAX_LAYER, center, center + normal * depth, color);
            }

            if (depth < 0)
                return overlap;

            if (depth < overlap.depth || overlap.depth == -1.0f) {
                overlap.depth = depth;
                overlap.normal = normal;
            }
        }

        normals = shape_b.normals;
        scale = inverse(body_b->scale);
    }

    if (debug_view_is_on())
        Renderer::push_line(MAX_LAYER, center, center + overlap.normal * overlap.depth,
                            V4(0, 1, 0, 1));

    if (dot(overlap.normal, relative_position) < 0) {
        // Make sure the normal faces body a
        overlap.normal = -overlap.normal;
    }

    overlap.is_valid = true;
    return overlap;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1b8, %rsp            # imm = 0x1B8
movq %rdi, %rbx
movq %rsi, (%rdi)
movq %rdx, 0x8(%rdi)
movl $0xbf800000, 0x10(%rdi) # imm = 0xBF800000
movq $0x0, 0x14(%rdi)
movb $0x0, 0x1c(%rdi)
movl 0x4(%rdx), %eax
testl %eax, 0x4(%rsi)
je 0x25f98
movq %rdx, %r14
movq %rsi, %r15
leaq 0x14(%rbx), %rax
movq %rax, -0xe8(%rbp)
movl (%rsi), %esi
leaq -0x1e0(%rbp), %r12
movq %r12, %rdi
callq 0x24e19
movl (%r14), %esi
leaq -0x1a0(%rbp), %rdi
callq 0x24e19
movsd 0x14(%r14), %xmm2
movss 0x14(%r15), %xmm1
addss %xmm2, %xmm1
shufps $0x55, %xmm2, %xmm2     # xmm2 = xmm2[1,1,1,1]
addss 0x18(%r15), %xmm2
movss 0xa89c(%rip), %xmm0     # 0x30008
mulss %xmm0, %xmm1
mulss %xmm0, %xmm2
movaps %xmm1, -0x130(%rbp)
movaps %xmm2, -0x120(%rbp)
unpcklps %xmm2, %xmm1            # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
movaps %xmm1, -0x110(%rbp)
movsd 0x14(%r15), %xmm0
movq %r15, -0x98(%rbp)
movsd 0x1c(%r15), %xmm1
movss 0x14(%r14), %xmm2
movss 0x18(%r14), %xmm3
subss %xmm0, %xmm2
movss %xmm2, -0x70(%rbp)
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
subss %xmm0, %xmm3
movss %xmm3, -0x6c(%rbp)
movss 0xa83b(%rip), %xmm0     # 0x30004
movaps %xmm0, %xmm2
divss %xmm1, %xmm2
shufps $0x55, %xmm1, %xmm1     # xmm1 = xmm1[1,1,1,1]
divss %xmm1, %xmm0
unpcklps %xmm0, %xmm2            # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1]
movaps %xmm2, -0x140(%rbp)
movl 0x14(%r12), %eax
movq 0x18(%r12), %rcx
movq %rcx, -0xd8(%rbp)
movb 0x20(%r12), %cl
movss 0x10(%rbx), %xmm3
movq %rbx, -0xc8(%rbp)
movsd 0x14(%rbx), %xmm4
movl 0x2c(%r12), %r13d
movq 0x30(%r12), %r12
leaq -0x1a0(%rbp), %rsi
movl 0x2c(%rsi), %ebx
movq 0x30(%rsi), %r15
movl 0x14(%rsi), %edx
movl %edx, -0xa4(%rbp)
movq 0x18(%rsi), %rdx
movq %rdx, -0xf0(%rbp)
movq $0x0, -0xd0(%rbp)
movb 0x20(%rsi), %dl
movb %dl, -0x2d(%rbp)
movq $0x0, -0xa0(%rbp)
movq %r14, -0x68(%rbp)
testl %eax, %eax
je 0x25e55
xorl %edx, %edx
testb %cl, %cl
setne %dl
movl %edx, -0xa8(%rbp)
movl %eax, %eax
movq %rax, -0xf8(%rbp)
xorl %eax, %eax
movaps %xmm3, %xmm0
movaps %xmm4, %xmm1
movq -0x98(%rbp), %r14
movaps %xmm1, -0x150(%rbp)
movaps %xmm0, -0x160(%rbp)
movq %rax, -0xe0(%rbp)
leaq 0x20100(%rip), %rdi     # 0x4599e
movl $0x21, %esi
leaq 0x20111(%rip), %rdx     # 0x459bb
movl -0xa8(%rbp), %ecx
callq 0x722f
movq -0xd8(%rbp), %rax
movq -0xe0(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm2
mulps -0x140(%rbp), %xmm2
movaps %xmm2, %xmm3
shufps $0x55, %xmm2, %xmm3     # xmm3 = xmm3[1,1],xmm2[1,1]
movaps %xmm3, %xmm1
mulss %xmm3, %xmm1
movaps %xmm2, %xmm0
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
ucomiss 0xa949(%rip), %xmm0     # 0x30238
jb 0x258f7
sqrtss %xmm0, %xmm0
jmp 0x2590c
movaps %xmm2, -0x50(%rbp)
movaps %xmm3, -0x80(%rbp)
callq 0x2480
movaps -0x80(%rbp), %xmm3
movaps -0x50(%rbp), %xmm2
movss 0xa6f0(%rip), %xmm1     # 0x30004
divss %xmm0, %xmm1
mulss %xmm1, %xmm2
movaps %xmm2, -0x50(%rbp)
mulss %xmm3, %xmm1
movaps %xmm2, %xmm0
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movaps %xmm0, -0xc0(%rbp)
movaps %xmm1, -0x80(%rbp)
xorps 0xa704(%rip), %xmm1     # 0x30040
movaps %xmm1, -0x90(%rbp)
cmpl $0x0, -0xa0(%rbp)
je 0x25a66
movq %r14, %rax
movq -0x68(%rbp), %r14
movss 0x10(%r14), %xmm0
subss 0x10(%rax), %xmm0
movss %xmm0, -0x2c(%rbp)
callq 0x2050
movss %xmm0, -0x60(%rbp)
movss -0x2c(%rbp), %xmm0
callq 0x2350
movaps -0x50(%rbp), %xmm3
movaps %xmm3, %xmm1
movss -0x60(%rbp), %xmm2
mulss %xmm2, %xmm1
mulss -0x90(%rbp), %xmm2
movaps %xmm2, %xmm4
movaps %xmm3, %xmm2
mulss %xmm0, %xmm2
addss %xmm4, %xmm2
mulss -0x80(%rbp), %xmm0
addss %xmm1, %xmm0
unpcklps %xmm0, %xmm2            # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1]
movaps %xmm2, -0x60(%rbp)
movss 0x10(%r14), %xmm0
movss %xmm0, -0x34(%rbp)
callq 0x2050
movss %xmm0, -0x2c(%rbp)
movss -0x34(%rbp), %xmm0
callq 0x2350
movaps -0x90(%rbp), %xmm3
movss -0x2c(%rbp), %xmm4
mulss %xmm4, %xmm3
movaps -0x50(%rbp), %xmm2
movaps %xmm2, %xmm1
mulss %xmm0, %xmm1
addss %xmm3, %xmm1
movaps -0x80(%rbp), %xmm3
mulss %xmm0, %xmm3
mulss %xmm4, %xmm2
addss %xmm3, %xmm2
movaps %xmm1, %xmm0
unpcklps %xmm2, %xmm0            # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
movaps %xmm0, -0x50(%rbp)
cmpb $0x0, 0x3ef65(%rip)     # 0x64975
je 0x25a4f
addss 0x14(%r14), %xmm1
movsd 0x14(%r14), %xmm0
addss 0x18(%r14), %xmm2
unpcklps %xmm2, %xmm1            # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
movl $0xe, %edi
movsd 0xa94c(%rip), %xmm2     # 0x30380
movsd 0xa954(%rip), %xmm3     # 0x30390
movaps %xmm2, %xmm4
movaps %xmm3, %xmm5
movss 0xa812(%rip), %xmm6     # 0x3025c
callq 0x20d16
movaps -0xc0(%rbp), %xmm6
movaps -0x60(%rbp), %xmm5
movq -0x98(%rbp), %r14
jmp 0x25b6d
movss 0x10(%r14), %xmm0
movq -0x68(%rbp), %rax
subss 0x10(%rax), %xmm0
movss %xmm0, -0x2c(%rbp)
callq 0x2050
movss %xmm0, -0x60(%rbp)
movss -0x2c(%rbp), %xmm0
callq 0x2350
movaps -0x50(%rbp), %xmm3
movaps %xmm3, %xmm1
movss -0x60(%rbp), %xmm2
mulss %xmm2, %xmm1
mulss -0x90(%rbp), %xmm2
movaps %xmm2, %xmm4
movaps %xmm3, %xmm2
mulss %xmm0, %xmm2
addss %xmm4, %xmm2
mulss -0x80(%rbp), %xmm0
addss %xmm1, %xmm0
unpcklps %xmm0, %xmm2            # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1]
movaps %xmm2, -0x60(%rbp)
movss 0x10(%r14), %xmm0
movss %xmm0, -0x34(%rbp)
callq 0x2050
movss %xmm0, -0x2c(%rbp)
movss -0x34(%rbp), %xmm0
callq 0x2350
movaps -0x90(%rbp), %xmm3
movss -0x2c(%rbp), %xmm4
mulss %xmm4, %xmm3
movaps -0x50(%rbp), %xmm2
movaps %xmm2, %xmm1
mulss %xmm0, %xmm1
addss %xmm3, %xmm1
movaps -0x80(%rbp), %xmm3
mulss %xmm0, %xmm3
mulss %xmm4, %xmm2
addss %xmm3, %xmm2
movaps %xmm1, %xmm0
unpcklps %xmm2, %xmm0            # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
movaps %xmm0, -0x50(%rbp)
cmpb $0x0, 0x3ee52(%rip)     # 0x64975
je 0x25b62
addss 0x14(%r14), %xmm1
movsd 0x14(%r14), %xmm0
addss 0x18(%r14), %xmm2
unpcklps %xmm2, %xmm1            # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
movl $0xe, %edi
movss 0xa719(%rip), %xmm2     # 0x30260
movsd 0xa841(%rip), %xmm3     # 0x30390
movaps %xmm2, %xmm4
movaps %xmm3, %xmm5
movss 0xa6ff(%rip), %xmm6     # 0x3025c
callq 0x20d16
movaps -0xc0(%rbp), %xmm5
movaps -0x60(%rbp), %xmm6
xorps %xmm7, %xmm7
xorps %xmm1, %xmm1
testq %r13, %r13
je 0x25bd4
movsd 0x8(%r14), %xmm0
movaps %xmm5, %xmm1
mulps %xmm0, %xmm1
shufps $0x55, %xmm1, %xmm1     # xmm1 = xmm1[1,1,1,1]
mulss %xmm5, %xmm0
addss %xmm1, %xmm0
movsd 0x1c(%r14), %xmm2
xorps %xmm1, %xmm1
xorl %eax, %eax
movsd (%r12,%rax,8), %xmm3
mulps %xmm2, %xmm3
movaps %xmm5, %xmm4
mulps %xmm3, %xmm4
shufps $0x55, %xmm4, %xmm4     # xmm4 = xmm4[1,1,1,1]
mulss %xmm5, %xmm3
addss %xmm4, %xmm3
addss %xmm0, %xmm3
movaps %xmm1, %xmm4
shufps $0x55, %xmm1, %xmm4     # xmm4 = xmm4[1,1],xmm1[1,1]
maxss %xmm3, %xmm4
minss %xmm3, %xmm1
unpcklps %xmm4, %xmm1            # xmm1 = xmm1[0],xmm4[0],xmm1[1],xmm4[1]
incq %rax
cmpq %rax, %r13
jne 0x25b9b
testq %rbx, %rbx
je 0x25c37
movq -0x68(%rbp), %rax
movsd 0x8(%rax), %xmm0
movaps %xmm6, %xmm2
mulps %xmm0, %xmm2
shufps $0x55, %xmm2, %xmm2     # xmm2 = xmm2[1,1,1,1]
mulss %xmm6, %xmm0
addss %xmm2, %xmm0
movsd 0x1c(%rax), %xmm2
xorps %xmm7, %xmm7
xorl %eax, %eax
movsd (%r15,%rax,8), %xmm3
mulps %xmm2, %xmm3
movaps %xmm6, %xmm4
mulps %xmm3, %xmm4
shufps $0x55, %xmm4, %xmm4     # xmm4 = xmm4[1,1,1,1]
mulss %xmm6, %xmm3
addss %xmm4, %xmm3
addss %xmm0, %xmm3
movaps %xmm7, %xmm4
shufps $0x55, %xmm7, %xmm4     # xmm4 = xmm4[1,1],xmm7[1,1]
maxss %xmm3, %xmm4
minss %xmm3, %xmm7
unpcklps %xmm4, %xmm7            # xmm7 = xmm7[0],xmm4[0],xmm7[1],xmm4[1]
incq %rax
cmpq %rax, %rbx
jne 0x25bfe
movaps -0x50(%rbp), %xmm4
movaps %xmm4, %xmm5
shufps $0x55, %xmm4, %xmm5     # xmm5 = xmm5[1,1],xmm4[1,1]
movss -0x6c(%rbp), %xmm2
mulss %xmm5, %xmm2
movss -0x70(%rbp), %xmm0
mulss %xmm4, %xmm0
addss %xmm2, %xmm0
ucomiss 0xa5d9(%rip), %xmm0     # 0x30238
movaps %xmm7, %xmm6
shufps $0x55, %xmm7, %xmm6     # xmm6 = xmm6[1,1],xmm7[1,1]
movaps %xmm1, %xmm2
shufps $0x55, %xmm1, %xmm2     # xmm2 = xmm2[1,1],xmm1[1,1]
jbe 0x25c7c
movaps %xmm2, %xmm3
subss %xmm7, %xmm3
subss %xmm0, %xmm3
jmp 0x25c8a
movaps %xmm6, %xmm3
subss %xmm1, %xmm3
addss %xmm3, %xmm0
movaps %xmm0, %xmm3
cmpb $0x0, 0x3ece4(%rip)     # 0x64975
je 0x25dfa
movaps %xmm4, %xmm0
mulss %xmm1, %xmm0
mulss %xmm5, %xmm1
movaps %xmm3, -0x80(%rbp)
movss 0x14(%r14), %xmm3
movaps %xmm4, %xmm8
movaps %xmm4, -0x50(%rbp)
movss 0x18(%r14), %xmm4
addss %xmm3, %xmm0
addss %xmm4, %xmm1
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movaps %xmm8, %xmm1
mulss %xmm2, %xmm1
mulss %xmm5, %xmm2
addss %xmm3, %xmm1
addss %xmm4, %xmm2
unpcklps %xmm2, %xmm1            # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
movl $0xe, %edi
movss 0xa31b(%rip), %xmm2     # 0x30004
movaps 0xa5b0(%rip), %xmm3     # 0x302a0
movaps %xmm2, %xmm4
movaps %xmm5, -0x90(%rbp)
movaps %xmm3, %xmm5
movaps %xmm6, -0xc0(%rbp)
movss 0xa550(%rip), %xmm6     # 0x3025c
movaps %xmm7, -0x60(%rbp)
callq 0x20d16
movaps -0x50(%rbp), %xmm1
movaps %xmm1, %xmm0
movaps -0x60(%rbp), %xmm4
mulss %xmm4, %xmm0
movaps -0x90(%rbp), %xmm5
mulss %xmm5, %xmm4
movq -0x68(%rbp), %rax
movss 0x14(%rax), %xmm2
movss 0x18(%rax), %xmm3
addss %xmm2, %xmm0
addss %xmm3, %xmm4
unpcklps %xmm4, %xmm0            # xmm0 = xmm0[0],xmm4[0],xmm0[1],xmm4[1]
movaps -0xc0(%rbp), %xmm4
mulss %xmm4, %xmm1
mulss %xmm5, %xmm4
addss %xmm2, %xmm1
addss %xmm3, %xmm4
unpcklps %xmm4, %xmm1            # xmm1 = xmm1[0],xmm4[0],xmm1[1],xmm4[1]
movl $0xe, %edi
movsd 0xa631(%rip), %xmm2     # 0x303a0
movaps 0xa52a(%rip), %xmm3     # 0x302a0
movaps %xmm2, %xmm4
movaps %xmm3, %xmm5
movss 0xa4d8(%rip), %xmm6     # 0x3025c
callq 0x20d16
movaps -0x80(%rbp), %xmm0
ucomiss 0xa4a4(%rip), %xmm0     # 0x30238
movaps 0xa505(%rip), %xmm2     # 0x302a0
ja 0x25da5
movss 0xa25f(%rip), %xmm2     # 0x30004
movaps -0x50(%rbp), %xmm1
mulss %xmm0, %xmm1
movaps -0x90(%rbp), %xmm3
mulss %xmm0, %xmm3
addss -0x130(%rbp), %xmm1
addss -0x120(%rbp), %xmm3
unpcklps %xmm3, %xmm1            # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
movl $0xe, %edi
movaps -0x110(%rbp), %xmm0
movsd 0xa5c1(%rip), %xmm3     # 0x303a0
movaps %xmm2, %xmm4
movaps %xmm3, %xmm5
movss 0xa46f(%rip), %xmm6     # 0x3025c
callq 0x20d16
movaps -0x80(%rbp), %xmm3
movaps -0x50(%rbp), %xmm4
xorps %xmm0, %xmm0
ucomiss %xmm3, %xmm0
ja 0x25ecd
movaps -0x160(%rbp), %xmm2
movaps %xmm2, %xmm0
movss 0xa410(%rip), %xmm1     # 0x30228
cmpeqps %xmm1, %xmm0
movaps %xmm3, %xmm1
cmpltps %xmm2, %xmm1
orps %xmm0, %xmm1
movd %xmm1, %eax
testb $0x1, %al
jne 0x25e38
movaps -0x150(%rbp), %xmm4
movaps %xmm2, %xmm3
movq -0xe0(%rbp), %rax
incq %rax
movaps %xmm3, %xmm0
movaps %xmm4, %xmm1
cmpq -0xf8(%rbp), %rax
jne 0x25882
movq -0x68(%rbp), %r14
movsd 0x1c(%r14), %xmm0
movss 0xa19d(%rip), %xmm1     # 0x30004
movaps %xmm1, %xmm2
divss %xmm0, %xmm2
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
divss %xmm0, %xmm1
unpcklps %xmm1, %xmm2            # xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1]
movaps %xmm2, -0x140(%rbp)
movq -0xa0(%rbp), %rsi
leal 0x1(%rsi), %edx
movb -0x2d(%rbp), %cl
movq -0xf0(%rbp), %rax
movq %rax, -0xd8(%rbp)
movl -0xa4(%rbp), %eax
testl %esi, %esi
setne %sil
movq %rsi, -0xd0(%rbp)
movq %rdx, -0xa0(%rbp)
je 0x25855
movq -0xc8(%rbp), %rbx
movss %xmm3, 0x10(%rbx)
movlps %xmm4, 0x14(%rbx)
jmp 0x25ef8
movq -0xc8(%rbp), %rbx
movaps -0x160(%rbp), %xmm0
movss %xmm0, 0x10(%rbx)
movaps -0x150(%rbp), %xmm0
movlps %xmm0, 0x14(%rbx)
testb $0x1, -0xd0(%rbp)
je 0x25f98
cmpb $0x0, 0x3ea76(%rip)     # 0x64975
je 0x25f57
movss 0x10(%rbx), %xmm0
movss 0x14(%rbx), %xmm2
mulss %xmm0, %xmm2
mulss 0x18(%rbx), %xmm0
movaps -0x130(%rbp), %xmm1
addss %xmm2, %xmm1
movaps -0x120(%rbp), %xmm2
addss %xmm0, %xmm2
unpcklps %xmm2, %xmm1            # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
movsd 0xa46b(%rip), %xmm2     # 0x303a0
movss 0xa31f(%rip), %xmm6     # 0x3025c
movl $0xe, %edi
movaps -0x110(%rbp), %xmm0
movaps %xmm2, %xmm3
movaps %xmm2, %xmm4
movaps %xmm2, %xmm5
callq 0x20d16
movq -0xe8(%rbp), %rax
movsd (%rax), %xmm0
movss -0x70(%rbp), %xmm1
mulss %xmm0, %xmm1
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
movss -0x6c(%rbp), %xmm2
mulss %xmm0, %xmm2
addss %xmm2, %xmm1
xorps %xmm0, %xmm0
ucomiss %xmm1, %xmm0
jbe 0x25f94
movsd 0x14(%rbx), %xmm0
xorps 0xa0b0(%rip), %xmm0     # 0x30040
movlps %xmm0, 0x14(%rbx)
movb $0x1, 0x1c(%rbx)
movq %rbx, %rax
addq $0x1b8, %rsp            # imm = 0x1B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq