// File: /workspace/github_c_makefile_star2_O2/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 %r13
pushq %r12
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 0x14d2(%rip), %rax      # 0x65f4
movq %rax, 0x80(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0x20(%rsp)
movups 0x78(%rsp), %xmm0
movups 0x88(%rsp), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
leaq 0xb0(%rsp), %rdi
callq 0x3dc3
movl $0x80, %edi
movl $0x80, %esi
callq 0x2855
testq %rax, %rax
je 0x54d5
movq %rax, %rbx
leaq 0xb0(%rsp), %r14
pushq $-0x1
popq %rbp
pushq $0x2
popq %r13
movq %r14, %rdi
callq 0x4858
testb %al, %al
je 0x54bc
movss 0xb8(%rsp), %xmm0
movaps %xmm0, %xmm1
mulss 0xe90(%rip), %xmm1      # 0x6038
movss %xmm1, 0x5c(%rsp)
movaps %xmm0, %xmm1
mulss 0xe4b(%rip), %xmm1      # 0x6004
movss %xmm1, 0x58(%rsp)
movss %xmm0, 0x3c(%rsp)
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x68(%rsp)
xorl %r15d, %r15d
cmpl $0x80, %r15d
je 0x5471
cvtsi2ss %r15d, %xmm0
mulss 0xe50(%rip), %xmm0      # 0x603c
addss 0xe10(%rip), %xmm0      # 0x6004
addss 0xe14(%rip), %xmm0      # 0x6010
mulss 0xe2c(%rip), %xmm0      # 0x6030
mulss 0xe34(%rip), %xmm0      # 0x6040
addss 0xe30(%rip), %xmm0      # 0x6044
movss 0x3c(%rsp), %xmm1
addss %xmm0, %xmm1
movss %xmm1, 0x60(%rsp)
movss %xmm0, 0x64(%rsp)
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x70(%rsp)
xorl %r12d, %r12d
cmpl $0x80, %r12d
je 0x5469
cvtsi2ss %r12d, %xmm1
mulss 0xdeb(%rip), %xmm1      # 0x603c
movss 0xdab(%rip), %xmm0      # 0x6004
addss %xmm0, %xmm1
addss 0xdab(%rip), %xmm1      # 0x6010
movss 0xdc3(%rip), %xmm0      # 0x6030
mulss %xmm0, %xmm1
mulss 0xdc7(%rip), %xmm1      # 0x6040
addss 0xdc3(%rip), %xmm1      # 0x6044
movss %xmm1, 0x30(%rsp)
movss 0x60(%rsp), %xmm0
callq 0x21d0
movss %xmm0, 0x40(%rsp)
movss 0x3c(%rsp), %xmm0
addss 0x30(%rsp), %xmm0
mulss 0xd58(%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 0xd2d(%rip), %xmm0      # 0x6004
callq 0x21d0
addss 0x40(%rsp), %xmm0
movss %xmm0, 0x40(%rsp)
cvtss2sd 0x30(%rsp), %xmm0
movsd %xmm0, 0x30(%rsp)
movss 0x5c(%rsp), %xmm0
callq 0x21d0
cvtss2sd %xmm0, %xmm0
movsd 0xde5(%rip), %xmm1      # 0x60f0
mulsd %xmm1, %xmm0
addsd 0x30(%rsp), %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x30(%rsp)
movss 0x58(%rsp), %xmm0
callq 0x2180
cvtss2sd %xmm0, %xmm0
mulsd 0xdba(%rip), %xmm0      # 0x60f0
addsd 0x70(%rsp), %xmm0
cvtsd2ss %xmm0, %xmm0
mulss %xmm0, %xmm0
movss 0x30(%rsp), %xmm1
mulss %xmm1, %xmm1
addss %xmm0, %xmm1
addss 0xcae(%rip), %xmm1      # 0x6008
cvtss2sd %xmm1, %xmm0
sqrtsd %xmm0, %xmm0
addsd 0x68(%rsp), %xmm0
cvtsd2ss %xmm0, %xmm0
callq 0x21d0
addss 0x40(%rsp), %xmm0
mulss 0xc85(%rip), %xmm0      # 0x6004
mulss 0xca9(%rip), %xmm0      # 0x6030
movss %xmm0, 0x30(%rsp)
callq 0x21d0
movaps %xmm0, 0x40(%rsp)
movss 0x30(%rsp), %xmm0
addss 0xca3(%rip), %xmm0      # 0x6048
callq 0x21d0
movaps %xmm0, 0xa0(%rsp)
movss 0x30(%rsp), %xmm0
addss 0xc8c(%rip), %xmm0      # 0x604c
callq 0x21d0
movss 0xc37(%rip), %xmm1      # 0x6004
mulss %xmm1, %xmm0
addss %xmm1, %xmm0
movaps 0xcb4(%rip), %xmm1      # 0x6090
andps %xmm1, %xmm0
movss 0xc25(%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 0xc69(%rip), %xmm0      # 0x6070
mulps %xmm0, %xmm2
addps %xmm0, %xmm2
andps %xmm1, %xmm2
movaps 0xc89(%rip), %xmm0      # 0x60a0
mulps %xmm0, %xmm2
minps %xmm0, %xmm2
cvttps2dq %xmm2, %xmm0
packuswb %xmm0, %xmm0
movdqa %xmm0, %xmm1
punpcklwd 0xc7f(%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 %r12d, %esi
movl %r15d, %edx
callq 0x2b4d
incl %r12d
jmp 0x5237
incl %r15d
jmp 0x51d2
movq 0xe8(%rsp), %r15
movq %r15, %rdi
movl %ebp, %esi
callq 0x2c56
movl (%r15), %eax
movl 0x4(%r15), %ecx
cltd
idivl %r13d
leal -0x40(%rax), %r8d
movl %ecx, %eax
cltd
idivl %r13d
leal -0x40(%rax), %ecx
movq %r15, %rdi
movq %rbx, %rsi
movl %r8d, %edx
movss 0x3c(%rsp), %xmm0
callq 0x2cfd
movq %r14, %rdi
callq 0x491f
jmp 0x5184
movq %rbx, %rdi
callq 0x3bb8
leaq 0xb0(%rsp), %rdi
callq 0x4bf7
xorl %eax, %eax
jmp 0x54d8
pushq $-0x1
popq %rax
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq