// File: /workspace/github_c_makefile_star2_O3/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 $0x38, %rsp
movq %rdi, %rbx
cmpb $0x1, 0x27(%rdi)
jne 0x4ba8
movq 0x38(%rbx), %rdi
movq 0x60(%rbx), %rax
movupd 0x28(%rax), %xmm0
movupd 0x38(%rax), %xmm1
movupd %xmm1, 0x10(%rsp)
movupd %xmm0, (%rsp)
callq 0x3b94
movq 0x40(%rbx), %rsi
leaq 0x200(%rsi), %rdi
movl $0x200, %edx            # imm = 0x200
callq 0x21c0
movq 0x50(%rbx), %r15
testq %r15, %r15
je 0x4c70
movq 0x18(%r15), %rdi
movl 0x14(%r15), %edx
xorl %esi, %esi
callq 0x2100
movl (%r15), %edi
movl 0x14(%r15), %ebp
callq 0x21b0
subl %eax, %ebp
movl 0xa0(%r15), %eax
testl %eax, %eax
jle 0x4c62
xorl %r12d, %r12d
movq 0x20(%r15,%r12,8), %r13
cmpb $0x1, 0x48(%r13)
jne 0x4c57
movl 0x38(%r13), %ecx
movq 0x30(%r13), %rsi
addq %rcx, %rsi
cmpq 0x40(%r13), %rsi
jae 0x4c44
movl 0x28(%r13), %r14d
subl %ecx, %r14d
cmpl %r14d, %ebp
cmovbl %ebp, %r14d
movq 0x18(%r15), %rdi
movl $0x8010, %edx           # imm = 0x8010
movl %r14d, %ecx
movl $0x40, %r8d
callq 0x2260
addl 0x38(%r13), %r14d
movl 0xa0(%r15), %eax
jmp 0x4c53
xorl %r14d, %r14d
cmpb $0x0, 0x49(%r13)
jne 0x4c53
movb $0x0, 0x48(%r13)
movl %r14d, 0x38(%r13)
incq %r12
movslq %eax, %rcx
cmpq %rcx, %r12
jl 0x4bf5
movl (%r15), %edi
movq 0x18(%r15), %rsi
movl %ebp, %edx
callq 0x23b0
movq 0x38(%rbx), %r15
movq 0x60(%rbx), %r14
cmpb $0x1, 0x49(%r14)
jne 0x4df2
movsd 0x10(%r14), %xmm0
movsd %xmm0, 0x30(%rsp)
callq 0x2300
subq 0x18(%r14), %rax
movq %rax, %xmm0
punpckldq 0x139b(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x13a3(%rip), %xmm0     # 0x6050
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
movapd %xmm1, 0x20(%rsp)
callq 0x21f0
movq %rax, %xmm0
punpckldq 0x136f(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x1377(%rip), %xmm0     # 0x6050
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
movapd 0x20(%rsp), %xmm2
divsd %xmm1, %xmm2
movsd 0x30(%rsp), %xmm0
ucomisd %xmm2, %xmm0
jbe 0x4df2
callq 0x2300
subq 0x18(%r14), %rax
movq %rax, %xmm0
punpckldq 0x132b(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x1333(%rip), %xmm0     # 0x6050
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
movapd %xmm1, 0x20(%rsp)
callq 0x21f0
movq %rax, %xmm0
punpckldq 0x12ff(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x1307(%rip), %xmm0     # 0x6050
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
movapd 0x20(%rsp), %xmm2
divsd %xmm1, %xmm2
movsd 0x30(%rsp), %xmm0
subsd %xmm2, %xmm0
mulsd 0x1357(%rip), %xmm0     # 0x60c8
addsd 0x1357(%rip), %xmm0     # 0x60d0
cvttsd2si %xmm0, %edi
testl %edi, %edi
jle 0x4d86
callq 0x2170
callq 0x2300
subq 0x18(%r14), %rax
movq %rax, %xmm0
punpckldq 0x12a4(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x12ac(%rip), %xmm0     # 0x6050
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
movapd %xmm1, 0x20(%rsp)
callq 0x21f0
movq %rax, %xmm0
punpckldq 0x1278(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x1280(%rip), %xmm0     # 0x6050
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
movapd 0x20(%rsp), %xmm2
divsd %xmm1, %xmm2
movsd 0x30(%rsp), %xmm0
ucomisd %xmm2, %xmm0
ja 0x4d86
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
subsd 0x128d(%rip), %xmm0     # 0x60d8
cvttsd2si %xmm0, %rsi
sarq $0x3f, %rdx
andq %rdx, %rsi
orq %rcx, %rsi
subq %rsi, %rax
movq %rax, %xmm0
punpckldq 0x11d6(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x11de(%rip), %xmm0     # 0x6050
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
movapd %xmm1, 0x20(%rsp)
callq 0x21f0
movq %rax, %xmm0
movq 0x11aa(%rip), %xmm1     # 0x6040
movdqa %xmm1, %xmm2
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x11aa(%rip), %xmm1     # 0x6050
movapd %xmm1, %xmm3
subpd %xmm1, %xmm0
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
movapd 0x20(%rsp), %xmm0
divsd %xmm1, %xmm0
ucomisd 0x11f4(%rip), %xmm0     # 0x60c0
jb 0x502b
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, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
movapd %xmm1, 0x20(%rsp)
callq 0x21f0
movq %rax, %xmm0
movq 0x1136(%rip), %xmm2     # 0x6040
punpckldq %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
movapd 0x113a(%rip), %xmm3     # 0x6050
subpd %xmm3, %xmm0
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
movapd 0x20(%rsp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, 0x30(%r14)
movq %rbx, %rax
subq 0x18(%r14), %rax
imulq $0x3e8, %rax, %rax      # imm = 0x3E8
movq %rax, %xmm0
punpckldq %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
subpd %xmm3, %xmm0
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
movapd %xmm1, 0x20(%rsp)
callq 0x21f0
movq %rax, %xmm0
punpckldq 0x10cb(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x10d3(%rip), %xmm0     # 0x6050
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
movapd 0x20(%rsp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, 0x38(%r14)
callq 0x21f0
movq %rax, %xmm0
movq 0x1095(%rip), %xmm2     # 0x6040
punpckldq %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
movapd 0x1099(%rip), %xmm3     # 0x6050
subpd %xmm3, %xmm0
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
xorps %xmm0, %xmm0
cvtsd2ss %xmm1, %xmm0
callq 0x2250
cvttss2si %xmm0, %eax
movl %eax, 0x40(%r14)
callq 0x2300
movq %rax, %xmm0
punpckldq 0x102f(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x1037(%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 $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq