// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/backends/imgui_impl_sdl.cpp
// Function: ImGui_ImplSDL2_NewFrame(SDL_Window*)
void ImGui_ImplSDL2_NewFrame(SDL_Window* window)
{
    ImGuiIO& io = ImGui::GetIO();
    IM_ASSERT(io.Fonts->IsBuilt() && "Font atlas not built! It is generally built by the renderer backend. Missing call to renderer _NewFrame() function? e.g. ImGui_ImplOpenGL3_NewFrame().");

    // Setup display size (every frame to accommodate for window resizing)
    int w, h;
    int display_w, display_h;
    SDL_GetWindowSize(window, &w, &h);
    if (SDL_GetWindowFlags(window) & SDL_WINDOW_MINIMIZED)
        w = h = 0;
    SDL_GL_GetDrawableSize(window, &display_w, &display_h);
    io.DisplaySize = ImVec2((float)w, (float)h);
    if (w > 0 && h > 0)
        io.DisplayFramebufferScale = ImVec2((float)display_w / w, (float)display_h / h);

    // Setup time step (we don't use SDL_GetTicks() because it is using millisecond resolution)
    static Uint64 frequency = SDL_GetPerformanceFrequency();
    Uint64 current_time = SDL_GetPerformanceCounter();
    io.DeltaTime = g_Time > 0 ? (float)((double)(current_time - g_Time) / frequency) : (float)(1.0f / 60.0f);
    g_Time = current_time;

    ImGui_ImplSDL2_UpdateMousePosAndButtons();
    ImGui_ImplSDL2_UpdateMouseCursor();

    // Update game controllers (if enabled and available)
    ImGui_ImplSDL2_UpdateGamepads();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r14
callq 0x37e82
movq %rax, %rbx
movq 0xa0(%rax), %rdi
callq 0x95c34
testb %al, %al
je 0x95b9d
leaq -0x30(%rbp), %rsi
leaq -0x2c(%rbp), %rdx
movq %r14, %rdi
callq 0xc720
movq %r14, %rdi
callq 0xc7d0
testb $0x40, %al
je 0x95642
andl $0x0, -0x2c(%rbp)
andl $0x0, -0x30(%rbp)
leaq -0x40(%rbp), %rsi
leaq -0x3c(%rbp), %rdx
movq %r14, %rdi
callq 0xc800
movl -0x30(%rbp), %eax
cvtsi2ss %eax, %xmm0
movl -0x2c(%rbp), %ecx
cvtsi2ss %ecx, %xmm1
movss %xmm0, 0x8(%rbx)
movss %xmm1, 0xc(%rbx)
testl %eax, %eax
setg %al
testl %ecx, %ecx
setg %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x9569d
cvtsi2ssl -0x40(%rbp), %xmm2
cvtsi2ssl -0x3c(%rbp), %xmm3
divss %xmm0, %xmm2
divss %xmm1, %xmm3
movss %xmm2, 0xb8(%rbx)
movss %xmm3, 0xbc(%rbx)
movb 0x551ad(%rip), %al      # 0xea850
testb %al, %al
je 0x95bbc
callq 0xc200
movq 0x551a1(%rip), %rcx     # 0xea858
testq %rcx, %rcx
je 0x95711
movq %rax, %rdx
subq %rcx, %rdx
movq %rdx, %xmm0
movq 0x22aa1(%rip), %xmm1    # 0xb8170
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x22aa5(%rip), %xmm2    # 0xb8180
subpd %xmm2, %xmm0
movapd %xmm0, %xmm3
unpckhpd %xmm0, %xmm3            # xmm3 = xmm3[1],xmm0[1]
addsd %xmm0, %xmm3
movq 0x55155(%rip), %xmm0    # 0xea848
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
subpd %xmm2, %xmm0
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
divsd %xmm1, %xmm3
cvtsd2ss %xmm3, %xmm0
jmp 0x95719
movss 0x24fa7(%rip), %xmm0    # 0xba6c0
movss %xmm0, 0x10(%rbx)
movq %rax, 0x55133(%rip)     # 0xea858
callq 0x37e82
movq %rax, %rbx
cmpb $0x1, 0x393(%rax)
jne 0x95754
cvttss2si 0x120(%rbx), %esi
movq 0x550a3(%rip), %rdi     # 0xea7e8
cvttss2si 0x124(%rbx), %edx
callq 0xc0f0
jmp 0x95765
movabsq $-0x80000000800001, %rax # imm = 0xFF7FFFFFFF7FFFFF
movq %rax, 0x120(%rbx)
leaq -0x38(%rbp), %rdi
leaq -0x34(%rbp), %rsi
callq 0xc860
movb 0x55068(%rip), %cl      # 0xea7e0
orb %al, %cl
andb $0x1, %cl
movb %cl, 0x128(%rbx)
movl %eax, %ecx
shrb $0x2, %cl
orb 0x55053(%rip), %cl      # 0xea7e1
andb $0x1, %cl
movb %cl, 0x129(%rbx)
shrb %al
orb 0x55043(%rip), %al      # 0xea7e2
andb $0x1, %al
movb %al, 0x12a(%rbx)
xorl %eax, %eax
movb %al, 0x55033(%rip)      # 0xea7e2
movb %al, 0x5502c(%rip)      # 0xea7e1
movb %al, 0x55025(%rip)      # 0xea7e0
callq 0xc070
cmpq %rax, 0x55021(%rip)     # 0xea7e8
jne 0x95831
cmpb $0x0, 0x4e370(%rip)     # 0xe3b40
je 0x95813
leaq -0x48(%rbp), %r14
leaq -0x44(%rbp), %r15
movq %rax, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0xc2a0
leaq -0x38(%rbp), %r12
leaq -0x34(%rbp), %r13
movq %r12, %rdi
movq %r13, %rsi
callq 0xc5b0
movl (%r12), %eax
subl (%r14), %eax
movl %eax, (%r12)
movl (%r13), %ecx
subl (%r15), %ecx
movl %ecx, (%r13)
jmp 0x95819
movl -0x38(%rbp), %eax
movl -0x34(%rbp), %ecx
cvtsi2ss %eax, %xmm0
cvtsi2ss %ecx, %xmm1
movss %xmm0, 0x120(%rbx)
movss %xmm1, 0x124(%rbx)
callq 0x403a5
movzbl %al, %edi
callq 0xc6f0
callq 0x37e82
testb $0x20, (%rax)
jne 0x95889
movq %rax, %r14
callq 0x404dd
xorl %ebx, %ebx
cmpl $-0x1, %eax
je 0x95882
cmpb $0x0, 0xc0(%r14)
jne 0x95882
cltq
leaq 0x54f96(%rip), %rcx     # 0xea800
movq (%rcx,%rax,8), %rdi
testq %rdi, %rdi
jne 0x9587a
movq 0x54f86(%rip), %rdi     # 0xea800
pushq $0x1
popq %rbx
callq 0xc660
movl %ebx, %edi
callq 0xc750
callq 0x37e82
xorps %xmm0, %xmm0
movups %xmm0, 0x33c(%rax)
movups %xmm0, 0x34c(%rax)
movups %xmm0, 0x35c(%rax)
andl $0x0, 0x38c(%rax)
movups %xmm0, 0x36c(%rax)
movups %xmm0, 0x37c(%rax)
testb $0x2, (%rax)
je 0x95b8e
movq %rax, %rbx
xorl %edi, %edi
callq 0xc6b0
testq %rax, %rax
je 0x95b8a
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
callq 0xc790
movss 0x670c(%rip), %xmm1     # 0x9bff8
xorps %xmm0, %xmm0
testb %al, %al
je 0x958f6
movaps %xmm1, %xmm0
movss %xmm0, 0x33c(%rbx)
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0xc790
xorps %xmm0, %xmm0
testb %al, %al
je 0x95918
movss 0x66e0(%rip), %xmm0     # 0x9bff8
movss %xmm0, 0x340(%rbx)
pushq $0x2
popq %rsi
movq %r14, %rdi
callq 0xc790
xorps %xmm0, %xmm0
testb %al, %al
je 0x9593a
movss 0x66be(%rip), %xmm0     # 0x9bff8
movss %xmm0, 0x348(%rbx)
pushq $0x3
popq %rsi
movq %r14, %rdi
callq 0xc790
xorps %xmm0, %xmm0
testb %al, %al
je 0x9595c
movss 0x669c(%rip), %xmm0     # 0x9bff8
movss %xmm0, 0x344(%rbx)
pushq $0xd
popq %rsi
movq %r14, %rdi
callq 0xc790
xorps %xmm0, %xmm0
testb %al, %al
je 0x9597e
movss 0x667a(%rip), %xmm0     # 0x9bff8
movss %xmm0, 0x34c(%rbx)
pushq $0xe
popq %rsi
movq %r14, %rdi
callq 0xc790
xorps %xmm0, %xmm0
testb %al, %al
je 0x959a0
movss 0x6658(%rip), %xmm0     # 0x9bff8
movss %xmm0, 0x350(%rbx)
pushq $0xb
popq %rsi
movq %r14, %rdi
callq 0xc790
xorps %xmm0, %xmm0
testb %al, %al
je 0x959c2
movss 0x6636(%rip), %xmm0     # 0x9bff8
movss %xmm0, 0x354(%rbx)
pushq $0xc
popq %rsi
movq %r14, %rdi
callq 0xc790
xorps %xmm0, %xmm0
testb %al, %al
je 0x959e4
movss 0x6614(%rip), %xmm0     # 0x9bff8
movss %xmm0, 0x358(%rbx)
pushq $0x9
popq %r15
movq %r14, %rdi
movl %r15d, %esi
callq 0xc790
xorps %xmm0, %xmm0
testb %al, %al
je 0x95a0a
movss 0x65ee(%rip), %xmm0     # 0x9bff8
movss %xmm0, 0x36c(%rbx)
pushq $0xa
popq %r12
movq %r14, %rdi
movl %r12d, %esi
callq 0xc790
xorps %xmm0, %xmm0
testb %al, %al
je 0x95a30
movss 0x65c8(%rip), %xmm0     # 0x9bff8
movss %xmm0, 0x370(%rbx)
movq %r14, %rdi
movl %r15d, %esi
callq 0xc790
xorps %xmm0, %xmm0
testb %al, %al
je 0x95a52
movss 0x65a6(%rip), %xmm0     # 0x9bff8
movss %xmm0, 0x374(%rbx)
movq %r14, %rdi
movl %r12d, %esi
callq 0xc790
xorps %xmm0, %xmm0
testb %al, %al
je 0x95a74
movss 0x6584(%rip), %xmm0     # 0x9bff8
movss %xmm0, 0x378(%rbx)
movq %r14, %rdi
xorl %esi, %esi
callq 0xc180
cwtl
addl $0x1f40, %eax           # imm = 0x1F40
cvtsi2ss %eax, %xmm0
divss 0x24c2c(%rip), %xmm0    # 0xba6c4
movss 0x6558(%rip), %xmm1     # 0x9bff8
minss %xmm0, %xmm1
ucomiss 0x6e19(%rip), %xmm1     # 0x9c8c4
jbe 0x95abe
ucomiss 0x35c(%rbx), %xmm1
jbe 0x95abe
movss %xmm1, 0x35c(%rbx)
movq %r14, %rdi
xorl %esi, %esi
callq 0xc180
cwtl
addl $0xffffe0c0, %eax       # imm = 0xFFFFE0C0
cvtsi2ss %eax, %xmm1
divss 0x24bee(%rip), %xmm1    # 0xba6c8
movss 0x6516(%rip), %xmm0     # 0x9bff8
minss %xmm1, %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x95aff
ucomiss 0x360(%rbx), %xmm0
jbe 0x95aff
movss %xmm0, 0x360(%rbx)
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0xc180
cwtl
addl $0x1f40, %eax           # imm = 0x1F40
cvtsi2ss %eax, %xmm1
divss 0x24bb0(%rip), %xmm1    # 0xba6cc
movss 0x64d4(%rip), %xmm0     # 0x9bff8
minss %xmm1, %xmm0
ucomiss 0x6d95(%rip), %xmm0     # 0x9c8c4
jbe 0x95b42
ucomiss 0x364(%rbx), %xmm0
jbe 0x95b42
movss %xmm0, 0x364(%rbx)
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0xc180
cwtl
addl $0xffffe0c0, %eax       # imm = 0xFFFFE0C0
cvtsi2ss %eax, %xmm0
divss 0x24b69(%rip), %xmm0    # 0xba6c8
movss 0x6491(%rip), %xmm1     # 0x9bff8
minss %xmm0, %xmm1
xorps %xmm0, %xmm0
ucomiss %xmm0, %xmm1
jbe 0x95b84
ucomiss 0x368(%rbx), %xmm1
jbe 0x95b84
movss %xmm1, 0x368(%rbx)
orb $0x1, 0x4(%rbx)
jmp 0x95b8e
andb $-0x2, 0x4(%rbx)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x24c62(%rip), %rdi     # 0xba806
leaq 0x24bbd(%rip), %rsi     # 0xba768
leaq 0x24d04(%rip), %rcx     # 0xba8b6
movl $0x15a, %edx            # imm = 0x15A
callq 0xc140
leaq 0x54c8d(%rip), %rdi     # 0xea850
callq 0xc2e0
testl %eax, %eax
je 0x956ab
callq 0xc980
movq %rax, 0x54c6c(%rip)     # 0xea848
leaq 0x54c6d(%rip), %rdi     # 0xea850
callq 0xc4e0
jmp 0x956ab
movq %rax, %rbx
leaq 0x54c59(%rip), %rdi     # 0xea850
callq 0xc3e0
movq %rbx, %rdi
callq 0xc580