// File: /workspace/github_c_makefile_star2_O1/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 0x4b61
movq 0x38(%rbx), %rdi
movq 0x60(%rbx), %rax
movupd 0x28(%rax), %xmm0
movupd 0x38(%rax), %xmm1
movupd %xmm1, 0x10(%rsp)
movupd %xmm0, (%rsp)
callq 0x3aa8
movq 0x40(%rbx), %rsi
leaq 0x200(%rsi), %rdi
movl $0x200, %edx            # imm = 0x200
callq 0x21c0
movq 0x50(%rbx), %r15
testq %r15, %r15
je 0x4c25
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
cmpl $0x0, 0xa0(%r15)
jle 0x4c17
xorl %r12d, %r12d
movq 0x20(%r15,%r12,8), %r13
cmpb $0x1, 0x48(%r13)
jne 0x4c08
movl 0x38(%r13), %eax
movq 0x30(%r13), %rsi
addq %rax, %rsi
cmpq 0x40(%r13), %rsi
jae 0x4bf5
movl 0x28(%r13), %r14d
subl %eax, %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
jmp 0x4c04
xorl %r14d, %r14d
cmpb $0x0, 0x49(%r13)
jne 0x4c04
movb $0x0, 0x48(%r13)
movl %r14d, 0x38(%r13)
incq %r12
movslq 0xa0(%r15), %rax
cmpq %rax, %r12
jl 0x4bad
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 0x4da7
movsd 0x10(%r14), %xmm0
movsd %xmm0, 0x30(%rsp)
callq 0x2300
subq 0x18(%r14), %rax
movq %rax, %xmm0
punpckldq 0x13e6(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x13ee(%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 0x13ba(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x13c2(%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 0x4da7
callq 0x2300
subq 0x18(%r14), %rax
movq %rax, %xmm0
punpckldq 0x1376(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x137e(%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 0x134a(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x1352(%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 0x1362(%rip), %xmm0     # 0x6088
addsd 0x1362(%rip), %xmm0     # 0x6090
cvttsd2si %xmm0, %edi
testl %edi, %edi
jle 0x4d3b
callq 0x2170
callq 0x2300
subq 0x18(%r14), %rax
movq %rax, %xmm0
punpckldq 0x12ef(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x12f7(%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 0x12c3(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x12cb(%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 0x4d3b
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 0x1298(%rip), %xmm0     # 0x6098
cvttsd2si %xmm0, %rsi
sarq $0x3f, %rdx
andq %rdx, %rsi
orq %rcx, %rsi
subq %rsi, %rax
movq %rax, %xmm0
punpckldq 0x1221(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x1229(%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 0x11f5(%rip), %xmm1     # 0x6040
movdqa %xmm1, %xmm2
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x11f5(%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 0x11ff(%rip), %xmm0     # 0x6080
jb 0x4fe0
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 0x1181(%rip), %xmm2     # 0x6040
punpckldq %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
movapd 0x1185(%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 0x1116(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x111e(%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 0x10e0(%rip), %xmm2     # 0x6040
punpckldq %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
movapd 0x10e4(%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 0x107a(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x1082(%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