// File: /workspace/github_c_makefile_star2_O2/adelciotto[P]scg/examples/../scg.h
// Function: scg_app_present
void scg_app_present(scg_app_t *app) {
    if (app->config.video.show_frame_metrics) {
        scg_image_draw_frame_metrics(app->draw_target,
                                     app->screen->frame_metrics);
    }

    scg__keyboard_update_keystates(app->keyboard);

    if (app->audio != NULL) {
        scg__audio_update(app->audio);
    }

    scg__screen_present(app->screen, app->draw_target);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
cmpb $0x1, 0x27(%rdi)
jne 0x4958
movq 0x38(%rbx), %rdi
movq 0x60(%rbx), %rax
movupd 0x28(%rax), %xmm0
movupd 0x38(%rax), %xmm1
movupd %xmm1, 0x10(%rsp)
movupd %xmm0, (%rsp)
callq 0x3a03
movq 0x40(%rbx), %rsi
leaq 0x200(%rsi), %rdi
movl $0x200, %edx            # imm = 0x200
callq 0x21c0
movq 0x50(%rbx), %r12
testq %r12, %r12
je 0x4a1a
movq 0x18(%r12), %rdi
movl 0x14(%r12), %edx
xorl %r13d, %r13d
xorl %esi, %esi
callq 0x2100
movl (%r12), %edi
movl 0x14(%r12), %ebp
callq 0x21b0
subl %eax, %ebp
movslq 0xa0(%r12), %rax
cmpq %rax, %r13
jge 0x4a0a
movq 0x20(%r12,%r13,8), %r14
cmpb $0x1, 0x48(%r14)
jne 0x4a05
movl 0x38(%r14), %eax
movq 0x30(%r14), %rsi
addq %rax, %rsi
cmpq 0x40(%r14), %rsi
jae 0x49f2
movl 0x28(%r14), %r15d
subl %eax, %r15d
cmpl %r15d, %ebp
cmovbl %ebp, %r15d
movq 0x18(%r12), %rdi
movl $0x8010, %edx           # imm = 0x8010
movl %r15d, %ecx
pushq $0x40
popq %r8
callq 0x2260
addl 0x38(%r14), %r15d
jmp 0x4a01
xorl %r15d, %r15d
cmpb $0x0, 0x49(%r14)
jne 0x4a01
movb $0x0, 0x48(%r14)
movl %r15d, 0x38(%r14)
incq %r13
jmp 0x499e
movl (%r12), %edi
movq 0x18(%r12), %rsi
movl %ebp, %edx
callq 0x23b0
movq 0x38(%rbx), %r15
movq 0x60(%rbx), %r14
cmpb $0x1, 0x49(%r14)
jne 0x4aa7
movsd 0x10(%r14), %xmm0
movsd %xmm0, 0x20(%rsp)
callq 0x2300
movq 0x18(%r14), %rsi
movq %rax, %rdi
callq 0x2529
movsd 0x20(%rsp), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x4aa7
callq 0x2300
movq 0x18(%r14), %rsi
movq %rax, %rdi
callq 0x2529
movsd 0x20(%rsp), %xmm1
subsd %xmm0, %xmm1
mulsd 0x1623(%rip), %xmm1     # 0x6098
addsd 0x1623(%rip), %xmm1     # 0x60a0
cvttsd2si %xmm1, %edi
testl %edi, %edi
jle 0x4a8a
callq 0x2170
callq 0x2300
movq 0x18(%r14), %rsi
movq %rax, %rdi
callq 0x2529
movsd 0x20(%rsp), %xmm1
ucomisd %xmm0, %xmm1
ja 0x4a8a
callq 0x2300
movq %rax, %rbx
movq 0x60(%r14), %rdi
movq 0x10(%r15), %rdx
movl 0x8(%r15), %ecx
xorl %esi, %esi
callq 0x21a0
movq 0x58(%r14), %rdi
callq 0x2240
movq 0x58(%r14), %rdi
movq 0x60(%r14), %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x2270
movq 0x58(%r14), %rdi
callq 0x2070
callq 0x2300
movsd 0x20(%r14), %xmm0
cvttsd2si %xmm0, %rcx
movq %rcx, %rdx
sarq $0x3f, %rdx
subsd 0x15a4(%rip), %xmm0     # 0x60a8
cvttsd2si %xmm0, %rsi
andq %rdx, %rsi
orq %rcx, %rsi
movq %rax, %rdi
callq 0x2529
ucomisd 0x1571(%rip), %xmm0     # 0x6090
jb 0x4be0
movq 0x18(%r14), %rsi
movq %rbx, %rdi
callq 0x2529
movsd %xmm0, 0x30(%r14)
movq 0x18(%r14), %rsi
movq %rbx, %rdi
callq 0x258a
movsd %xmm0, 0x38(%r14)
callq 0x21f0
movq %rax, %xmm0
movq 0x14e5(%rip), %xmm1     # 0x6040
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movdqa %xmm1, %xmm2
movapd 0x14e5(%rip), %xmm1     # 0x6050
subpd %xmm1, %xmm0
movapd %xmm1, %xmm3
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
movq %rbx, %rax
subq 0x18(%r14), %rax
movq %rax, %xmm0
punpckldq %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
subpd %xmm3, %xmm0
movapd %xmm0, %xmm2
unpckhpd %xmm0, %xmm2            # xmm2 = xmm2[1],xmm0[1]
addsd %xmm0, %xmm2
divsd %xmm2, %xmm1
cvtsd2ss %xmm1, %xmm0
callq 0x2250
cvttss2si %xmm0, %eax
movl %eax, 0x40(%r14)
callq 0x2300
movq %rax, %xmm0
punpckldq 0x147a(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x1482(%rip), %xmm0     # 0x6050
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
movsd %xmm1, 0x20(%r14)
movq %rbx, 0x18(%r14)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq