// File: Ciaxur[P]yagb-emu/include/imgui/imgui_draw.cpp
// Function: ImFontAtlasBuildRenderDefaultTexData(ImFontAtlas*)
static void ImFontAtlasBuildRenderDefaultTexData(ImFontAtlas* atlas)
{
    ImFontAtlasCustomRect* r = atlas->GetCustomRectByIndex(atlas->PackIdMouseCursors);
    IM_ASSERT(r->IsPacked());

    const int w = atlas->TexWidth;
    if (!(atlas->Flags & ImFontAtlasFlags_NoMouseCursors))
    {
        // Render/copy pixels
        IM_ASSERT(r->Width == FONT_ATLAS_DEFAULT_TEX_DATA_W * 2 + 1 && r->Height == FONT_ATLAS_DEFAULT_TEX_DATA_H);
        const int x_for_white = r->X;
        const int x_for_black = r->X + FONT_ATLAS_DEFAULT_TEX_DATA_W + 1;
        ImFontAtlasBuildRender1bppRectFromString(atlas, x_for_white, r->Y, FONT_ATLAS_DEFAULT_TEX_DATA_W, FONT_ATLAS_DEFAULT_TEX_DATA_H, FONT_ATLAS_DEFAULT_TEX_DATA_PIXELS, '.', 0xFF);
        ImFontAtlasBuildRender1bppRectFromString(atlas, x_for_black, r->Y, FONT_ATLAS_DEFAULT_TEX_DATA_W, FONT_ATLAS_DEFAULT_TEX_DATA_H, FONT_ATLAS_DEFAULT_TEX_DATA_PIXELS, 'X', 0xFF);
    }
    else
    {
        // Render 4 white pixels
        IM_ASSERT(r->Width == 2 && r->Height == 2);
        const int offset = (int)r->X + (int)r->Y * w;
        atlas->TexPixelsAlpha8[offset] = atlas->TexPixelsAlpha8[offset + 1] = atlas->TexPixelsAlpha8[offset + w] = atlas->TexPixelsAlpha8[offset + w + 1] = 0xFF;
    }
    atlas->TexUvWhitePixel = ImVec2((r->X + 0.5f) * atlas->TexUvScale.x, (r->Y + 0.5f) * atlas->TexUvScale.y);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x470(%rax), %esi
callq 0x127c00
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x127be0
testb $0x1, %al
jne 0x11b122
jmp 0x11b124
jmp 0x11b143
leaq 0x706f1(%rip), %rdi     # 0x18b81c
leaq 0x6f044(%rip), %rsi     # 0x18a176
movl $0x991, %edx            # imm = 0x991
leaq 0x706ec(%rip), %rcx     # 0x18b82a
callq 0xd180
movq -0x8(%rbp), %rax
movl 0x28(%rax), %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
jne 0x11b23a
movq -0x10(%rbp), %rax
movzwl (%rax), %ecx
xorl %eax, %eax
cmpl $0xd9, %ecx
movb %al, -0x29(%rbp)
jne 0x11b185
movq -0x10(%rbp), %rax
movzwl 0x2(%rax), %eax
cmpl $0x1b, %eax
sete %al
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %al
testb $0x1, %al
jne 0x11b18e
jmp 0x11b190
jmp 0x11b1af
leaq 0x706cc(%rip), %rdi     # 0x18b863
leaq 0x6efd8(%rip), %rsi     # 0x18a176
movl $0x997, %edx            # imm = 0x997
leaq 0x70680(%rip), %rcx     # 0x18b82a
callq 0xd180
movq -0x10(%rbp), %rax
movzwl 0x4(%rax), %eax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movzwl 0x4(%rax), %eax
addl $0x6c, %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rdi
movl -0x18(%rbp), %esi
movq -0x10(%rbp), %rax
movzwl 0x6(%rax), %edx
movl $0x6c, %ecx
movl $0x1b, %r8d
leaq 0x6b4f4(%rip), %r9      # 0x1866e0
movl $0x2e, (%rsp)
movl $0xff, 0x8(%rsp)
callq 0x11af70
movq -0x8(%rbp), %rdi
movl -0x1c(%rbp), %esi
movq -0x10(%rbp), %rax
movzwl 0x6(%rax), %edx
movl $0x6c, %ecx
movl $0x1b, %r8d
leaq 0x6b4bf(%rip), %r9      # 0x1866e0
movl $0x58, (%rsp)
movl $0xff, 0x8(%rsp)
callq 0x11af70
jmp 0x11b2f1
movq -0x10(%rbp), %rax
movzwl (%rax), %ecx
xorl %eax, %eax
cmpl $0x2, %ecx
movb %al, -0x2a(%rbp)
jne 0x11b25c
movq -0x10(%rbp), %rax
movzwl 0x2(%rax), %eax
cmpl $0x2, %eax
sete %al
movb %al, -0x2a(%rbp)
movb -0x2a(%rbp), %al
testb $0x1, %al
jne 0x11b265
jmp 0x11b267
jmp 0x11b286
leaq 0x70655(%rip), %rdi     # 0x18b8c3
leaq 0x6ef01(%rip), %rsi     # 0x18a176
movl $0x9a0, %edx            # imm = 0x9A0
leaq 0x705a9(%rip), %rcx     # 0x18b82a
callq 0xd180
movq -0x10(%rbp), %rax
movzwl 0x4(%rax), %eax
movq -0x10(%rbp), %rcx
movzwl 0x6(%rcx), %ecx
imull -0x14(%rbp), %ecx
addl %ecx, %eax
movl %eax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x20(%rbp), %ecx
addl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movb $-0x1, (%rax,%rcx)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x20(%rbp), %ecx
addl -0x14(%rbp), %ecx
movslq %ecx, %rcx
movb $-0x1, (%rax,%rcx)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x20(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movb $-0x1, (%rax,%rcx)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x20(%rbp), %rcx
movb $-0x1, (%rax,%rcx)
movq -0x10(%rbp), %rax
movzwl 0x4(%rax), %eax
cvtsi2ss %eax, %xmm0
movss 0x56cd3(%rip), %xmm1    # 0x171fd8
addss %xmm1, %xmm0
movq -0x8(%rbp), %rax
mulss 0x30(%rax), %xmm0
movq -0x10(%rbp), %rax
movzwl 0x6(%rax), %eax
cvtsi2ss %eax, %xmm1
movss 0x56cb2(%rip), %xmm2    # 0x171fd8
addss %xmm2, %xmm1
movq -0x8(%rbp), %rax
mulss 0x34(%rax), %xmm1
leaq -0x28(%rbp), %rdi
callq 0xbf4c0
movq -0x8(%rbp), %rax
movq -0x28(%rbp), %rcx
movq %rcx, 0x38(%rax)
addq $0x40, %rsp
popq %rbp
retq
nop