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

    scg_app_t app;
    scg_app_init(&app, config);

    scg_image_t *plasma_buffer =
        scg_image_new(PLASMA_BUFFER_WIDTH, PLASMA_BUFFER_HEIGHT);
    if (plasma_buffer == NULL) {
        return -1;
    }

    while (scg_app_process_events(&app)) {
        draw_plasma(plasma_buffer, app.elapsed_time);
        draw(app.draw_target, plasma_buffer, app.elapsed_time);

        scg_app_present(&app);
    }

    scg_image_free(plasma_buffer);
    scg_app_free(&app);

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movabsq $0x1e000000280, %rax    # imm = 0x1E000000280
movq %rax, 0x78(%rsp)
movl $0x1, 0x88(%rsp)
xorl %eax, %eax
movb %al, 0x8c(%rsp)
movl $0x1010101, 0x8d(%rsp) # imm = 0x1010101
movb %al, 0x94(%rsp)
movl $0x40, 0x98(%rsp)
leaq 0x10a4(%rip), %rax      # 0x6624
movq %rax, 0x80(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0x20(%rsp)
movdqu 0x78(%rsp), %xmm0
movups 0x88(%rsp), %xmm1
movups %xmm1, 0x10(%rsp)
movdqu %xmm0, (%rsp)
leaq 0xb0(%rsp), %rdi
callq 0x3f6d
movl $0x80, %edi
movl $0x80, %esi
callq 0x2862
testq %rax, %rax
je 0x59bc
movq %rax, %rbx
leaq 0xb0(%rsp), %rdi
callq 0x4a46
testb %al, %al
je 0x599a
movss 0xa12(%rip), %xmm7      # 0x6004
movss 0xa42(%rip), %xmm1      # 0x603c
movss 0xa0e(%rip), %xmm2      # 0x6010
movss 0xa26(%rip), %xmm3      # 0x6030
movss 0xa2e(%rip), %xmm4      # 0x6040
movss 0xa2a(%rip), %xmm5      # 0x6044
leaq 0xb0(%rsp), %r14
movss 0xb8(%rsp), %xmm0
movaps %xmm0, %xmm6
mulss 0xa02(%rip), %xmm6      # 0x6038
movss %xmm6, 0x5c(%rsp)
movaps %xmm0, %xmm6
mulss %xmm7, %xmm6
movss %xmm6, 0x58(%rsp)
xorps %xmm6, %xmm6
cvtss2sd %xmm0, %xmm6
movsd %xmm6, 0x68(%rsp)
xorl %ebp, %ebp
movss %xmm0, 0x3c(%rsp)
xorps %xmm6, %xmm6
cvtsi2ss %ebp, %xmm6
mulss %xmm1, %xmm6
addss %xmm7, %xmm6
addss %xmm2, %xmm6
mulss %xmm3, %xmm6
mulss %xmm4, %xmm6
addss %xmm5, %xmm6
addss %xmm6, %xmm0
movss %xmm0, 0x60(%rsp)
movss %xmm6, 0x64(%rsp)
xorps %xmm0, %xmm0
cvtss2sd %xmm6, %xmm0
movsd %xmm0, 0x70(%rsp)
xorl %r15d, %r15d
xorps %xmm0, %xmm0
cvtsi2ss %r15d, %xmm0
mulss %xmm1, %xmm0
addss %xmm7, %xmm0
addss %xmm2, %xmm0
mulss %xmm3, %xmm0
mulss %xmm4, %xmm0
addss %xmm5, %xmm0
movss %xmm0, 0x30(%rsp)
movss 0x60(%rsp), %xmm0
callq 0x21d0
movss %xmm0, 0x40(%rsp)
movss 0x3c(%rsp), %xmm0
addss 0x30(%rsp), %xmm0
mulss 0x91c(%rip), %xmm0      # 0x6004
callq 0x21d0
addss 0x40(%rsp), %xmm0
movss %xmm0, 0x40(%rsp)
movss 0x64(%rsp), %xmm0
addss 0x30(%rsp), %xmm0
addss 0x3c(%rsp), %xmm0
mulss 0x8f1(%rip), %xmm0      # 0x6004
callq 0x21d0
addss 0x40(%rsp), %xmm0
movss %xmm0, 0x40(%rsp)
xorps %xmm0, %xmm0
cvtss2sd 0x30(%rsp), %xmm0
movsd %xmm0, 0x30(%rsp)
movss 0x5c(%rsp), %xmm0
callq 0x21d0
cvtss2sd %xmm0, %xmm0
movsd 0x9d6(%rip), %xmm1      # 0x6120
mulsd %xmm1, %xmm0
addsd 0x30(%rsp), %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x30(%rsp)
movss 0x58(%rsp), %xmm0
callq 0x2180
cvtss2sd %xmm0, %xmm0
mulsd 0x9ab(%rip), %xmm0      # 0x6120
addsd 0x70(%rsp), %xmm0
cvtsd2ss %xmm0, %xmm0
mulss %xmm0, %xmm0
movss 0x30(%rsp), %xmm1
mulss %xmm1, %xmm1
addss %xmm0, %xmm1
addss 0x86f(%rip), %xmm1      # 0x6008
xorps %xmm0, %xmm0
cvtss2sd %xmm1, %xmm0
sqrtsd %xmm0, %xmm0
addsd 0x68(%rsp), %xmm0
cvtsd2ss %xmm0, %xmm0
callq 0x21d0
addss 0x40(%rsp), %xmm0
mulss 0x843(%rip), %xmm0      # 0x6004
mulss 0x867(%rip), %xmm0      # 0x6030
movss %xmm0, 0x30(%rsp)
callq 0x21d0
movaps %xmm0, 0x40(%rsp)
movss 0x30(%rsp), %xmm0
addss 0x861(%rip), %xmm0      # 0x6048
callq 0x21d0
movaps %xmm0, 0xa0(%rsp)
movss 0x30(%rsp), %xmm0
addss 0x84a(%rip), %xmm0      # 0x604c
callq 0x21d0
mulss 0x7f5(%rip), %xmm0      # 0x6004
addss 0x7ed(%rip), %xmm0      # 0x6004
movaps 0x8a2(%rip), %xmm1      # 0x60c0
andps %xmm1, %xmm0
movss 0x7e3(%rip), %xmm2      # 0x600c
mulss %xmm2, %xmm0
minss %xmm2, %xmm0
cvttss2si %xmm0, %eax
movaps 0xa0(%rsp), %xmm2
unpcklps 0x40(%rsp), %xmm2       # xmm2 = xmm2[0],mem[0],xmm2[1],mem[1]
movaps 0x867(%rip), %xmm0      # 0x60b0
mulps %xmm0, %xmm2
addps %xmm0, %xmm2
andps %xmm1, %xmm2
movaps 0x877(%rip), %xmm0      # 0x60d0
mulps %xmm0, %xmm2
minps %xmm0, %xmm2
cvttps2dq %xmm2, %xmm0
packuswb %xmm0, %xmm0
movdqa %xmm0, %xmm1
punpcklwd 0x86d(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1],xmm1[2],mem[2],xmm1[3],mem[3]
pslld $0x8, %xmm1
psrld $0x10, %xmm0
pslld $0x10, %xmm0
por %xmm1, %xmm0
movd %xmm0, %edx
movzbl %al, %ecx
orl %edx, %ecx
orl $0xff000000, %ecx       # imm = 0xFF000000
movq %rbx, %rdi
movl %r15d, %esi
movl %ebp, %edx
callq 0x2b68
movss 0x79a(%rip), %xmm5      # 0x6044
movss 0x78e(%rip), %xmm4      # 0x6040
movss 0x776(%rip), %xmm3      # 0x6030
movss 0x74e(%rip), %xmm2      # 0x6010
movss 0x772(%rip), %xmm1      # 0x603c
movss 0x732(%rip), %xmm7      # 0x6004
incl %r15d
cmpl $0x80, %r15d
jne 0x569d
incl %ebp
cmpl $0x80, %ebp
movd 0x3c(%rsp), %xmm0
jne 0x565e
movq 0xe8(%rsp), %r15
movl (%r15), %ecx
movl 0x4(%r15), %eax
movl %eax, %edx
imull %ecx, %edx
testl %edx, %edx
jle 0x592f
movq 0x10(%r15), %rdi
movl %edx, %edx
shlq $0x2, %rdx
movl $0xff, %esi
callq 0x2100
movd 0x3c(%rsp), %xmm0
movl (%r15), %ecx
movl 0x4(%r15), %eax
movl %ecx, %edx
shrl $0x1f, %edx
addl %ecx, %edx
sarl %edx
addl $-0x40, %edx
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
addl $-0x40, %ecx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2e07
movq %r14, %rdi
callq 0x4b6f
movq %r14, %rdi
callq 0x4a46
testb %al, %al
movss 0x698(%rip), %xmm7      # 0x6004
movss 0x6c8(%rip), %xmm1      # 0x603c
movss 0x694(%rip), %xmm2      # 0x6010
movss 0x6ac(%rip), %xmm3      # 0x6030
movss 0x6b4(%rip), %xmm4      # 0x6040
movss 0x6b0(%rip), %xmm5      # 0x6044
jne 0x5622
movq 0x10(%rbx), %rdi
callq 0x2290
movq %rbx, %rdi
callq 0x2290
leaq 0xb0(%rsp), %rdi
callq 0x5042
xorl %eax, %eax
jmp 0x59c1
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r14
popq %r15
popq %rbp
retq