// File: /workspace/github_c_makefile_star2_O2/adelciotto[P]scg/examples/metablobs.c
// Function: main
int main(int arcg, char *argv[]) {
    scg_config_t config = scg_config_new_default();
    config.video.title = "SCG Example: Metablobs";

    scg_app_t app;
    scg_app_init(&app, config);

    metablobs_t metablobs;
    metablobs_init(&metablobs, METABLOBS_CONST_A, METABLOBS_CONST_B);

    while (scg_app_process_events(&app)) {
        update(&metablobs, app.elapsed_time);

        draw(app.draw_target, &metablobs);

        scg_app_present(&app);
    }

    scg_app_free(&app);

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x148, %rsp            # imm = 0x148
movabsq $0x1e000000280, %rax    # imm = 0x1E000000280
movq %rax, 0x38(%rsp)
movl $0x1, 0x48(%rsp)
xorl %r15d, %r15d
movb %r15b, 0x4c(%rsp)
movl $0x1010101, 0x4d(%rsp)  # imm = 0x1010101
movb %r15b, 0x54(%rsp)
movl $0x40, 0x58(%rsp)
leaq 0x1506(%rip), %rax      # 0x661c
movq %rax, 0x40(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x20(%rsp)
movups 0x38(%rsp), %xmm0
movups 0x48(%rsp), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
leaq 0xe0(%rsp), %rbx
movq %rbx, %rdi
callq 0x3dc3
movsd 0xf30(%rip), %xmm0      # 0x6080
movsd %xmm0, 0x70(%rsp)
movaps 0xf33(%rip), %xmm0      # 0x6090
movaps %xmm0, 0x60(%rsp)
movsd 0xf36(%rip), %xmm0      # 0x60a0
movsd %xmm0, 0x8c(%rsp)
movl $0x40000000, 0x94(%rsp) # imm = 0x40000000
movaps 0xf2b(%rip), %xmm0      # 0x60b0
movups %xmm0, 0x7c(%rsp)
movsd 0xf2e(%rip), %xmm0      # 0x60c0
movsd %xmm0, 0xac(%rsp)
movl $0x40800000, 0xb4(%rsp) # imm = 0x40800000
movaps 0xf23(%rip), %xmm0      # 0x60d0
movups %xmm0, 0x9c(%rsp)
movsd 0xf23(%rip), %xmm0      # 0x60e0
movsd %xmm0, 0xbc(%rsp)
movl $0x44800000, 0xc4(%rsp) # imm = 0x44800000
pushq $0x1c
popq %r12
pushq $-0x1
popq %rbp
pushq $0x4
popq %r13
movq %rbx, %rdi
callq 0x4858
testb %al, %al
je 0x53a2
movss 0xe8(%rsp), %xmm0
movss %xmm0, 0x30(%rsp)
movq %r12, %r14
cmpq $0x7c, %r14
je 0x5262
movss 0x60(%rsp,%r14), %xmm1
mulss 0x30(%rsp), %xmm1
movss 0x54(%rsp,%r14), %xmm0
mulss %xmm1, %xmm0
mulss 0x58(%rsp,%r14), %xmm1
movss %xmm1, 0x34(%rsp)
callq 0x2180
movaps %xmm0, 0xd0(%rsp)
movss 0x34(%rsp), %xmm0
callq 0x21d0
movsd 0x4c(%rsp,%r14), %xmm1
movaps 0xd0(%rsp), %xmm2
unpcklps %xmm0, %xmm2            # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1]
mulps %xmm1, %xmm2
movlps %xmm2, 0x44(%rsp,%r14)
addq $0x20, %r14
jmp 0x51fe
movq 0x118(%rsp), %r14
movq %r14, %rdi
movl %ebp, %esi
callq 0x2c56
movslq (%r14), %rax
cvtsi2ss %eax, %xmm0
movl 0x4(%r14), %ecx
cvtsi2ss %ecx, %xmm1
movss 0xd79(%rip), %xmm2      # 0x6004
mulss %xmm2, %xmm0
mulss %xmm2, %xmm1
movss 0xc0(%rsp), %xmm2
movss 0xc4(%rsp), %xmm3
testl %eax, %eax
movl $0x0, %edx
cmovgl %eax, %edx
testl %ecx, %ecx
cmovlel %r15d, %ecx
xorl %esi, %esi
movss 0xd48(%rip), %xmm10     # 0x6008
movss 0xd43(%rip), %xmm11     # 0x600c
cmpq %rcx, %rsi
je 0x5395
cvtsi2ss %esi, %xmm4
movq %rsi, %rdi
imulq %rax, %rdi
xorl %r8d, %r8d
cmpq %rdx, %r8
je 0x538d
cvtsi2ss %r8d, %xmm6
movq %r13, %r9
movaps %xmm10, %xmm5
cmpq $0x64, %r9
je 0x5341
movss 0x5c(%rsp,%r9), %xmm7
addss %xmm0, %xmm7
movaps %xmm6, %xmm8
subss %xmm7, %xmm8
movss 0x60(%rsp,%r9), %xmm7
addss %xmm1, %xmm7
movaps %xmm4, %xmm9
subss %xmm7, %xmm9
mulss %xmm9, %xmm9
mulss %xmm8, %xmm8
addss %xmm9, %xmm8
sqrtss %xmm8, %xmm7
mulss %xmm7, %xmm5
addq $0x20, %r9
jmp 0x52f5
divss %xmm2, %xmm5
movaps %xmm3, %xmm6
subss %xmm5, %xmm6
xorps %xmm5, %xmm5
maxss %xmm6, %xmm5
movaps %xmm11, %xmm6
minss %xmm5, %xmm6
cvttss2si %xmm6, %r9d
notb %r9b
movzbl %r9b, %r9d
imull $0x10101, %r9d, %r9d    # imm = 0x10101
orl $0xff000000, %r9d       # imm = 0xFF000000
leaq (,%r8,4), %r10
addq 0x10(%r14), %r10
movl %r9d, (%r10,%rdi,4)
incq %r8
jmp 0x52e0
incq %rsi
jmp 0x52c9
movq %rbx, %rdi
callq 0x491f
jmp 0x51dc
leaq 0xe0(%rsp), %rdi
callq 0x4bf7
xorl %eax, %eax
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq