// File: /workspace/github_c_makefile_star2_O1/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 %r12
pushq %rbx
subq $0x110, %rsp            # imm = 0x110
movabsq $0x1e000000280, %rax    # imm = 0x1E000000280
movq %rax, 0x80(%rsp)
movl $0x1, 0x90(%rsp)
xorl %eax, %eax
movb %al, 0x94(%rsp)
movl $0x1010101, 0x95(%rsp) # imm = 0x1010101
movb %al, 0x9c(%rsp)
movl $0x40, 0xa0(%rsp)
leaq 0x108e(%rip), %rax      # 0x65cc
movq %rax, 0x88(%rsp)
movq 0xa0(%rsp), %rax
movq %rax, 0x20(%rsp)
movups 0x80(%rsp), %xmm0
movups 0x90(%rsp), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
leaq 0xa8(%rsp), %rdi
callq 0x3e91
movl $0x80, %edi
movl $0x80, %esi
callq 0x2872
testq %rax, %rax
je 0x5968
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
callq 0x49ec
testb %al, %al
je 0x5946
movss 0xa53(%rip), %xmm0      # 0x6004
movss 0xa77(%rip), %xmm1      # 0x6030
movl $0xff, %r12d
leaq 0xa8(%rsp), %r14
movss 0xb0(%rsp), %xmm2
movaps %xmm2, %xmm3
mulss 0xa5d(%rip), %xmm3      # 0x6038
movss %xmm3, 0x50(%rsp)
movaps %xmm2, %xmm3
mulss %xmm0, %xmm3
movss %xmm3, 0x4c(%rsp)
movss %xmm2, 0x2c(%rsp)
cvtss2sd %xmm2, %xmm2
movsd %xmm2, 0x70(%rsp)
xorl %ebp, %ebp
xorps %xmm2, %xmm2
cvtsi2ss %ebp, %xmm2
mulss 0xa2d(%rip), %xmm2      # 0x603c
addss %xmm0, %xmm2
addss 0x9f5(%rip), %xmm2      # 0x6010
mulss %xmm1, %xmm2
mulss 0xa19(%rip), %xmm2      # 0x6040
addss 0xa15(%rip), %xmm2      # 0x6044
movss 0x2c(%rsp), %xmm3
addss %xmm2, %xmm3
movss %xmm3, 0x54(%rsp)
movss %xmm2, 0x58(%rsp)
cvtss2sd %xmm2, %xmm2
movsd %xmm2, 0x78(%rsp)
xorl %r15d, %r15d
xorps %xmm2, %xmm2
cvtsi2ss %r15d, %xmm2
mulss 0x9da(%rip), %xmm2      # 0x603c
addss %xmm0, %xmm2
addss 0x9a2(%rip), %xmm2      # 0x6010
mulss %xmm1, %xmm2
mulss 0x9c6(%rip), %xmm2      # 0x6040
addss 0x9c2(%rip), %xmm2      # 0x6044
movss %xmm2, 0x30(%rsp)
movss 0x54(%rsp), %xmm0
callq 0x21e0
movss %xmm0, 0x28(%rsp)
movss 0x2c(%rsp), %xmm0
addss 0x30(%rsp), %xmm0
mulss 0x957(%rip), %xmm0      # 0x6004
callq 0x21e0
movss %xmm0, 0x60(%rsp)
movss 0x58(%rsp), %xmm0
addss 0x30(%rsp), %xmm0
addss 0x2c(%rsp), %xmm0
mulss 0x932(%rip), %xmm0      # 0x6004
callq 0x21e0
movss %xmm0, 0x5c(%rsp)
xorps %xmm0, %xmm0
cvtss2sd 0x30(%rsp), %xmm0
movsd %xmm0, 0x30(%rsp)
movss 0x50(%rsp), %xmm0
callq 0x21e0
cvtss2sd %xmm0, %xmm0
movsd 0x9bd(%rip), %xmm1      # 0x60c0
mulsd %xmm1, %xmm0
addsd 0x30(%rsp), %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x30(%rsp)
movss 0x4c(%rsp), %xmm0
callq 0x2180
cvtss2sd %xmm0, %xmm0
mulsd 0x992(%rip), %xmm0      # 0x60c0
addsd 0x78(%rsp), %xmm0
cvtsd2ss %xmm0, %xmm0
mulss %xmm0, %xmm0
movss 0x30(%rsp), %xmm1
mulss %xmm1, %xmm1
addss %xmm0, %xmm1
addss 0x8b6(%rip), %xmm1      # 0x6008
xorps %xmm0, %xmm0
cvtss2sd %xmm1, %xmm0
ucomisd 0x967(%rip), %xmm0      # 0x60c8
jb 0x5769
sqrtsd %xmm0, %xmm0
jmp 0x576e
callq 0x21b0
addsd 0x70(%rsp), %xmm0
movss 0x28(%rsp), %xmm1
addss 0x60(%rsp), %xmm1
addss 0x5c(%rsp), %xmm1
movss %xmm1, 0x28(%rsp)
cvtsd2ss %xmm0, %xmm0
callq 0x21e0
movaps %xmm0, %xmm1
addss 0x28(%rsp), %xmm1
movss 0x85e(%rip), %xmm0      # 0x6004
mulss %xmm0, %xmm1
movss 0x87e(%rip), %xmm0      # 0x6030
mulss %xmm0, %xmm1
movss %xmm1, 0x28(%rsp)
movaps %xmm1, %xmm0
callq 0x21e0
movaps %xmm0, %xmm1
movss 0x835(%rip), %xmm0      # 0x6004
mulss %xmm0, %xmm1
addss %xmm0, %xmm1
movaps 0x8a2(%rip), %xmm0      # 0x6080
andps %xmm0, %xmm1
movaps %xmm1, 0x30(%rsp)
movss 0x28(%rsp), %xmm0
addss 0x854(%rip), %xmm0      # 0x6048
callq 0x21e0
movss 0x803(%rip), %xmm1      # 0x6004
mulss %xmm1, %xmm0
addss %xmm1, %xmm0
andps 0x870(%rip), %xmm0      # 0x6080
movaps %xmm0, 0x60(%rsp)
movss 0x28(%rsp), %xmm0
addss 0x829(%rip), %xmm0      # 0x604c
callq 0x21e0
movss 0x7d4(%rip), %xmm1      # 0x6004
mulss %xmm1, %xmm0
addss %xmm1, %xmm0
andps 0x841(%rip), %xmm0      # 0x6080
movss 0x7c5(%rip), %xmm1      # 0x600c
mulss %xmm1, %xmm0
minss %xmm1, %xmm0
cvttss2si %xmm0, %ecx
movaps 0x60(%rsp), %xmm0
mulss %xmm1, %xmm0
minss %xmm1, %xmm0
cvttss2si %xmm0, %eax
movaps 0x30(%rsp), %xmm0
mulss %xmm1, %xmm0
minss %xmm1, %xmm0
cvttss2si %xmm0, %edx
shll $0x10, %edx
andl %r12d, %eax
shll $0x8, %eax
orl %edx, %eax
andl %r12d, %ecx
orl %eax, %ecx
orl $0xff000000, %ecx       # imm = 0xFF000000
movq %rbx, %rdi
movl %r15d, %esi
movl %ebp, %edx
callq 0x2b78
movss 0x790(%rip), %xmm1      # 0x6030
movss 0x75c(%rip), %xmm0      # 0x6004
incl %r15d
cmpl $0x80, %r15d
jne 0x5652
incl %ebp
cmpl $0x80, %ebp
jne 0x5600
movq 0xe0(%rsp), %r15
movl 0x4(%r15), %eax
imull (%r15), %eax
testl %eax, %eax
jle 0x58ee
movq 0x10(%r15), %rdi
movl %eax, %edx
shlq $0x2, %rdx
movl $0xff, %esi
callq 0x2100
movl (%r15), %eax
movl 0x4(%r15), %esi
movl %eax, %edx
shrl $0x1f, %edx
addl %eax, %edx
sarl %edx
addl $-0x40, %edx
movl %esi, %ecx
shrl $0x1f, %ecx
addl %esi, %ecx
sarl %ecx
addl $-0x40, %ecx
movq %r15, %rdi
movq %rbx, %rsi
movss 0x2c(%rsp), %xmm0
callq 0x2d53
movq %r14, %rdi
callq 0x4b38
movq %r14, %rdi
callq 0x49ec
testb %al, %al
movss 0x6cc(%rip), %xmm0      # 0x6004
movss 0x6f0(%rip), %xmm1      # 0x6030
jne 0x55c7
movq 0x10(%rbx), %rdi
callq 0x22a0
movq %rbx, %rdi
callq 0x22a0
leaq 0xa8(%rsp), %rdi
callq 0x5007
xorl %eax, %eax
jmp 0x596d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x110, %rsp            # imm = 0x110
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq