// File: Ciaxur[P]yagb-emu/include/imgui/imgui_draw.cpp
// Function: ImFont::RenderText(ImDrawList*, float, ImVec2, unsigned int, ImVec4 const&, char const*, char const*, float, bool) const
void ImFont::RenderText(ImDrawList* draw_list, float size, ImVec2 pos, ImU32 col, const ImVec4& clip_rect, const char* text_begin, const char* text_end, float wrap_width, bool cpu_fine_clip) const
{
    if (!text_end)
        text_end = text_begin + strlen(text_begin); // ImGui:: functions generally already provides a valid text_end, so this is merely to handle direct calls.

    // Align to be pixel perfect
    pos.x = IM_FLOOR(pos.x);
    pos.y = IM_FLOOR(pos.y);
    float x = pos.x;
    float y = pos.y;
    if (y > clip_rect.w)
        return;

    const float scale = size / FontSize;
    const float line_height = FontSize * scale;
    const bool word_wrap_enabled = (wrap_width > 0.0f);
    const char* word_wrap_eol = NULL;

    // Fast-forward to first visible line
    const char* s = text_begin;
    if (y + line_height < clip_rect.y && !word_wrap_enabled)
        while (y + line_height < clip_rect.y && s < text_end)
        {
            s = (const char*)memchr(s, '\n', text_end - s);
            s = s ? s + 1 : text_end;
            y += line_height;
        }

    // For large text, scan for the last visible line in order to avoid over-reserving in the call to PrimReserve()
    // Note that very large horizontal line will still be affected by the issue (e.g. a one megabyte string buffer without a newline will likely crash atm)
    if (text_end - s > 10000 && !word_wrap_enabled)
    {
        const char* s_end = s;
        float y_end = y;
        while (y_end < clip_rect.w && s_end < text_end)
        {
            s_end = (const char*)memchr(s_end, '\n', text_end - s_end);
            s_end = s_end ? s_end + 1 : text_end;
            y_end += line_height;
        }
        text_end = s_end;
    }
    if (s == text_end)
        return;

    // Reserve vertices for remaining worse case (over-reserving is useful and easily amortized)
    const int vtx_count_max = (int)(text_end - s) * 4;
    const int idx_count_max = (int)(text_end - s) * 6;
    const int idx_expected_size = draw_list->IdxBuffer.Size + idx_count_max;
    draw_list->PrimReserve(idx_count_max, vtx_count_max);

    ImDrawVert* vtx_write = draw_list->_VtxWritePtr;
    ImDrawIdx* idx_write = draw_list->_IdxWritePtr;
    unsigned int vtx_current_idx = draw_list->_VtxCurrentIdx;

    while (s < text_end)
    {
        if (word_wrap_enabled)
        {
            // Calculate how far we can render. Requires two passes on the string data but keeps the code simple and not intrusive for what's essentially an uncommon feature.
            if (!word_wrap_eol)
            {
                word_wrap_eol = CalcWordWrapPositionA(scale, s, text_end, wrap_width - (x - pos.x));
                if (word_wrap_eol == s) // Wrap_width is too small to fit anything. Force displaying 1 character to minimize the height discontinuity.
                    word_wrap_eol++;    // +1 may not be a character start point in UTF-8 but it's ok because we use s >= word_wrap_eol below
            }

            if (s >= word_wrap_eol)
            {
                x = pos.x;
                y += line_height;
                word_wrap_eol = NULL;

                // Wrapping skips upcoming blanks
                while (s < text_end)
                {
                    const char c = *s;
                    if (ImCharIsBlankA(c)) { s++; } else if (c == '\n') { s++; break; } else { break; }
                }
                continue;
            }
        }

        // Decode and advance source
        unsigned int c = (unsigned int)*s;
        if (c < 0x80)
        {
            s += 1;
        }
        else
        {
            s += ImTextCharFromUtf8(&c, s, text_end);
            if (c == 0) // Malformed UTF-8?
                break;
        }

        if (c < 32)
        {
            if (c == '\n')
            {
                x = pos.x;
                y += line_height;
                if (y > clip_rect.w)
                    break; // break out of main loop
                continue;
            }
            if (c == '\r')
                continue;
        }

        const ImFontGlyph* glyph = FindGlyph((ImWchar)c);
        if (glyph == NULL)
            continue;

        float char_width = glyph->AdvanceX * scale;
        if (glyph->Visible)
        {
            // We don't do a second finer clipping test on the Y axis as we've already skipped anything before clip_rect.y and exit once we pass clip_rect.w
            float x1 = x + glyph->X0 * scale;
            float x2 = x + glyph->X1 * scale;
            float y1 = y + glyph->Y0 * scale;
            float y2 = y + glyph->Y1 * scale;
            if (x1 <= clip_rect.z && x2 >= clip_rect.x)
            {
                // Render a character
                float u1 = glyph->U0;
                float v1 = glyph->V0;
                float u2 = glyph->U1;
                float v2 = glyph->V1;

                // CPU side clipping used to fit text in their frame when the frame is too small. Only does clipping for axis aligned quads.
                if (cpu_fine_clip)
                {
                    if (x1 < clip_rect.x)
                    {
                        u1 = u1 + (1.0f - (x2 - clip_rect.x) / (x2 - x1)) * (u2 - u1);
                        x1 = clip_rect.x;
                    }
                    if (y1 < clip_rect.y)
                    {
                        v1 = v1 + (1.0f - (y2 - clip_rect.y) / (y2 - y1)) * (v2 - v1);
                        y1 = clip_rect.y;
                    }
                    if (x2 > clip_rect.z)
                    {
                        u2 = u1 + ((clip_rect.z - x1) / (x2 - x1)) * (u2 - u1);
                        x2 = clip_rect.z;
                    }
                    if (y2 > clip_rect.w)
                    {
                        v2 = v1 + ((clip_rect.w - y1) / (y2 - y1)) * (v2 - v1);
                        y2 = clip_rect.w;
                    }
                    if (y1 >= y2)
                    {
                        x += char_width;
                        continue;
                    }
                }

                // We are NOT calling PrimRectUV() here because non-inlined causes too much overhead in a debug builds. Inlined here:
                {
                    idx_write[0] = (ImDrawIdx)(vtx_current_idx); idx_write[1] = (ImDrawIdx)(vtx_current_idx+1); idx_write[2] = (ImDrawIdx)(vtx_current_idx+2);
                    idx_write[3] = (ImDrawIdx)(vtx_current_idx); idx_write[4] = (ImDrawIdx)(vtx_current_idx+2); idx_write[5] = (ImDrawIdx)(vtx_current_idx+3);
                    vtx_write[0].pos.x = x1; vtx_write[0].pos.y = y1; vtx_write[0].col = col; vtx_write[0].uv.x = u1; vtx_write[0].uv.y = v1;
                    vtx_write[1].pos.x = x2; vtx_write[1].pos.y = y1; vtx_write[1].col = col; vtx_write[1].uv.x = u2; vtx_write[1].uv.y = v1;
                    vtx_write[2].pos.x = x2; vtx_write[2].pos.y = y2; vtx_write[2].col = col; vtx_write[2].uv.x = u2; vtx_write[2].uv.y = v2;
                    vtx_write[3].pos.x = x1; vtx_write[3].pos.y = y2; vtx_write[3].col = col; vtx_write[3].uv.x = u1; vtx_write[3].uv.y = v2;
                    vtx_write += 4;
                    vtx_current_idx += 4;
                    idx_write += 6;
                }
            }
        }
        x += char_width;
    }

    // Give back unused vertices (clipped ones, blanks) ~ this is essentially a PrimUnreserve() action.
    draw_list->VtxBuffer.Size = (int)(vtx_write - draw_list->VtxBuffer.Data); // Same as calling shrink()
    draw_list->IdxBuffer.Size = (int)(idx_write - draw_list->IdxBuffer.Data);
    draw_list->CmdBuffer[draw_list->CmdBuffer.Size - 1].ElemCount -= (idx_expected_size - draw_list->IdxBuffer.Size);
    draw_list->_VtxWritePtr = vtx_write;
    draw_list->_IdxWritePtr = idx_write;
    draw_list->_VtxCurrentIdx = vtx_current_idx;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
movb 0x10(%rbp), %al
movlpd %xmm1, -0x8(%rbp)
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movss %xmm0, -0x1c(%rbp)
movl %edx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movss %xmm2, -0x3c(%rbp)
andb $0x1, %al
movb %al, -0x3d(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xd8(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x113bd0
movq -0x30(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq -0x30(%rbp), %rdi
callq 0xd410
movq %rax, %rcx
movq -0xe0(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x38(%rbp)
cvttss2si -0x8(%rbp), %eax
cvtsi2ss %eax, %xmm0
movss %xmm0, -0x8(%rbp)
cvttss2si -0x4(%rbp), %eax
cvtsi2ss %eax, %xmm0
movss %xmm0, -0x4(%rbp)
movss -0x8(%rbp), %xmm0
movss %xmm0, -0x44(%rbp)
movss -0x4(%rbp), %xmm0
movss %xmm0, -0x48(%rbp)
movss -0x48(%rbp), %xmm0
movq -0x28(%rbp), %rax
ucomiss 0xc(%rax), %xmm0
jbe 0x113c14
jmp 0x114669
movq -0xd8(%rbp), %rax
movss -0x1c(%rbp), %xmm0
divss 0x14(%rax), %xmm0
movss %xmm0, -0x4c(%rbp)
movss 0x14(%rax), %xmm0
mulss -0x4c(%rbp), %xmm0
movss %xmm0, -0x50(%rbp)
movss -0x3c(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
seta %al
andb $0x1, %al
movb %al, -0x51(%rbp)
movq $0x0, -0x60(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x68(%rbp)
movss -0x48(%rbp), %xmm1
addss -0x50(%rbp), %xmm1
movq -0x28(%rbp), %rax
movss 0x4(%rax), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x113d22
testb $0x1, -0x51(%rbp)
jne 0x113d22
jmp 0x113c84
movss -0x48(%rbp), %xmm1
addss -0x50(%rbp), %xmm1
movq -0x28(%rbp), %rax
movss 0x4(%rax), %xmm0
xorl %eax, %eax
ucomiss %xmm1, %xmm0
movb %al, -0xe1(%rbp)
jbe 0x113cb5
movq -0x68(%rbp), %rax
cmpq -0x38(%rbp), %rax
setb %al
movb %al, -0xe1(%rbp)
movb -0xe1(%rbp), %al
testb $0x1, %al
jne 0x113cc1
jmp 0x113d20
movq -0x68(%rbp), %rdi
movq -0x38(%rbp), %rdx
movq -0x68(%rbp), %rax
subq %rax, %rdx
movl $0xa, %esi
callq 0xd490
movq %rax, -0x68(%rbp)
cmpq $0x0, -0x68(%rbp)
je 0x113cf6
movq -0x68(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xf0(%rbp)
jmp 0x113d01
movq -0x38(%rbp), %rax
movq %rax, -0xf0(%rbp)
movq -0xf0(%rbp), %rax
movq %rax, -0x68(%rbp)
movss -0x50(%rbp), %xmm0
addss -0x48(%rbp), %xmm0
movss %xmm0, -0x48(%rbp)
jmp 0x113c84
jmp 0x113d22
movq -0x38(%rbp), %rax
movq -0x68(%rbp), %rcx
subq %rcx, %rax
cmpq $0x2710, %rax           # imm = 0x2710
jle 0x113df4
testb $0x1, -0x51(%rbp)
jne 0x113df4
movq -0x68(%rbp), %rax
movq %rax, -0x70(%rbp)
movss -0x48(%rbp), %xmm0
movss %xmm0, -0x74(%rbp)
movss -0x74(%rbp), %xmm1
movq -0x28(%rbp), %rax
movss 0xc(%rax), %xmm0
xorl %eax, %eax
ucomiss %xmm1, %xmm0
movb %al, -0xf1(%rbp)
jbe 0x113d81
movq -0x70(%rbp), %rax
cmpq -0x38(%rbp), %rax
setb %al
movb %al, -0xf1(%rbp)
movb -0xf1(%rbp), %al
testb $0x1, %al
jne 0x113d8d
jmp 0x113dec
movq -0x70(%rbp), %rdi
movq -0x38(%rbp), %rdx
movq -0x70(%rbp), %rax
subq %rax, %rdx
movl $0xa, %esi
callq 0xd490
movq %rax, -0x70(%rbp)
cmpq $0x0, -0x70(%rbp)
je 0x113dc2
movq -0x70(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x100(%rbp)
jmp 0x113dcd
movq -0x38(%rbp), %rax
movq %rax, -0x100(%rbp)
movq -0x100(%rbp), %rax
movq %rax, -0x70(%rbp)
movss -0x50(%rbp), %xmm0
addss -0x74(%rbp), %xmm0
movss %xmm0, -0x74(%rbp)
jmp 0x113d55
movq -0x70(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x68(%rbp), %rax
cmpq -0x38(%rbp), %rax
jne 0x113e03
jmp 0x114669
movq -0x38(%rbp), %rax
movq -0x68(%rbp), %rcx
subq %rcx, %rax
shll $0x2, %eax
movl %eax, -0x78(%rbp)
movq -0x38(%rbp), %rax
movq -0x68(%rbp), %rcx
subq %rcx, %rax
imull $0x6, %eax, %eax
movl %eax, -0x7c(%rbp)
movq -0x18(%rbp), %rax
movl 0x10(%rax), %eax
addl -0x7c(%rbp), %eax
movl %eax, -0x80(%rbp)
movq -0x18(%rbp), %rdi
movl -0x7c(%rbp), %esi
movl -0x78(%rbp), %edx
callq 0x10f7f0
movq -0x18(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x88(%rbp)
movq -0x18(%rbp), %rax
movq 0x50(%rax), %rax
movq %rax, -0x90(%rbp)
movq -0x18(%rbp), %rax
movl 0x34(%rax), %eax
movl %eax, -0x94(%rbp)
movq -0x68(%rbp), %rax
cmpq -0x38(%rbp), %rax
jae 0x1145cb
testb $0x1, -0x51(%rbp)
je 0x113f59
cmpq $0x0, -0x60(%rbp)
jne 0x113ed3
movq -0xd8(%rbp), %rdi
movss -0x4c(%rbp), %xmm0
movq -0x68(%rbp), %rsi
movq -0x38(%rbp), %rdx
movss -0x3c(%rbp), %xmm1
movss -0x44(%rbp), %xmm2
subss -0x8(%rbp), %xmm2
subss %xmm2, %xmm1
callq 0x11c240
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
cmpq -0x68(%rbp), %rax
jne 0x113ed1
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x60(%rbp)
jmp 0x113ed3
movq -0x68(%rbp), %rax
cmpq -0x60(%rbp), %rax
jb 0x113f57
movss -0x8(%rbp), %xmm0
movss %xmm0, -0x44(%rbp)
movss -0x50(%rbp), %xmm0
addss -0x48(%rbp), %xmm0
movss %xmm0, -0x48(%rbp)
movq $0x0, -0x60(%rbp)
movq -0x68(%rbp), %rax
cmpq -0x38(%rbp), %rax
jae 0x113f52
movq -0x68(%rbp), %rax
movb (%rax), %al
movb %al, -0x95(%rbp)
movsbl -0x95(%rbp), %edi
callq 0x11c840
testb $0x1, %al
jne 0x113f26
jmp 0x113f34
movq -0x68(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x68(%rbp)
jmp 0x113f50
movsbl -0x95(%rbp), %eax
cmpl $0xa, %eax
jne 0x113f4e
movq -0x68(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x68(%rbp)
jmp 0x113f52
jmp 0x113f52
jmp 0x113efe
jmp 0x113e6c
jmp 0x113f59
movq -0x68(%rbp), %rax
movsbl (%rax), %eax
movl %eax, -0x9c(%rbp)
cmpl $0x80, -0x9c(%rbp)
jae 0x113f80
movq -0x68(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x68(%rbp)
jmp 0x113fb4
movq -0x68(%rbp), %rsi
movq -0x38(%rbp), %rdx
leaq -0x9c(%rbp), %rdi
callq 0xc36d0
movl %eax, %ecx
movq -0x68(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x68(%rbp)
cmpl $0x0, -0x9c(%rbp)
jne 0x113fb2
jmp 0x1145cb
jmp 0x113fb4
cmpl $0x20, -0x9c(%rbp)
jae 0x114008
cmpl $0xa, -0x9c(%rbp)
jne 0x113ff8
movss -0x8(%rbp), %xmm0
movss %xmm0, -0x44(%rbp)
movss -0x50(%rbp), %xmm0
addss -0x48(%rbp), %xmm0
movss %xmm0, -0x48(%rbp)
movss -0x48(%rbp), %xmm0
movq -0x28(%rbp), %rax
ucomiss 0xc(%rax), %xmm0
jbe 0x113ff3
jmp 0x1145cb
jmp 0x113e6c
cmpl $0xd, -0x9c(%rbp)
jne 0x114006
jmp 0x113e6c
jmp 0x114008
movq -0xd8(%rbp), %rdi
movl -0x9c(%rbp), %eax
movzwl %ax, %esi
callq 0x11bf50
movq %rax, -0xa8(%rbp)
cmpq $0x0, -0xa8(%rbp)
jne 0x114033
jmp 0x113e6c
movq -0xa8(%rbp), %rax
movss 0x4(%rax), %xmm0
mulss -0x4c(%rbp), %xmm0
movss %xmm0, -0xac(%rbp)
movq -0xa8(%rbp), %rax
movl (%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x1145b4
movss -0x44(%rbp), %xmm1
movq -0xa8(%rbp), %rax
movss 0x8(%rax), %xmm0
movss -0x4c(%rbp), %xmm2
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0xb0(%rbp)
movss -0x44(%rbp), %xmm1
movq -0xa8(%rbp), %rax
movss 0x10(%rax), %xmm0
movss -0x4c(%rbp), %xmm2
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0xb4(%rbp)
movss -0x48(%rbp), %xmm1
movq -0xa8(%rbp), %rax
movss 0xc(%rax), %xmm0
movss -0x4c(%rbp), %xmm2
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0xb8(%rbp)
movss -0x48(%rbp), %xmm1
movq -0xa8(%rbp), %rax
movss 0x14(%rax), %xmm0
movss -0x4c(%rbp), %xmm2
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0xbc(%rbp)
movss -0xb0(%rbp), %xmm1
movq -0x28(%rbp), %rax
movss 0x8(%rax), %xmm0
ucomiss %xmm1, %xmm0
jb 0x1145b2
movss -0xb4(%rbp), %xmm0
movq -0x28(%rbp), %rax
ucomiss (%rax), %xmm0
jb 0x1145b2
movq -0xa8(%rbp), %rax
movss 0x18(%rax), %xmm0
movss %xmm0, -0xc0(%rbp)
movq -0xa8(%rbp), %rax
movss 0x1c(%rax), %xmm0
movss %xmm0, -0xc4(%rbp)
movq -0xa8(%rbp), %rax
movss 0x20(%rax), %xmm0
movss %xmm0, -0xc8(%rbp)
movq -0xa8(%rbp), %rax
movss 0x24(%rax), %xmm0
movss %xmm0, -0xcc(%rbp)
testb $0x1, -0x3d(%rbp)
je 0x114389
movss -0xb0(%rbp), %xmm1
movq -0x28(%rbp), %rax
movss (%rax), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x1141ff
movss -0xc0(%rbp), %xmm1
movss -0xb4(%rbp), %xmm2
movq -0x28(%rbp), %rax
subss (%rax), %xmm2
movss -0xb4(%rbp), %xmm0
subss -0xb0(%rbp), %xmm0
divss %xmm0, %xmm2
movss 0x5ca71(%rip), %xmm0    # 0x170c3c
subss %xmm2, %xmm0
movss -0xc8(%rbp), %xmm2
subss -0xc0(%rbp), %xmm2
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0xc0(%rbp)
movq -0x28(%rbp), %rax
movss (%rax), %xmm0
movss %xmm0, -0xb0(%rbp)
movss -0xb8(%rbp), %xmm1
movq -0x28(%rbp), %rax
movss 0x4(%rax), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x11427f
movss -0xc4(%rbp), %xmm1
movss -0xbc(%rbp), %xmm2
movq -0x28(%rbp), %rax
subss 0x4(%rax), %xmm2
movss -0xbc(%rbp), %xmm0
subss -0xb8(%rbp), %xmm0
divss %xmm0, %xmm2
movss 0x5c9f2(%rip), %xmm0    # 0x170c3c
subss %xmm2, %xmm0
movss -0xcc(%rbp), %xmm2
subss -0xc4(%rbp), %xmm2
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0xc4(%rbp)
movq -0x28(%rbp), %rax
movss 0x4(%rax), %xmm0
movss %xmm0, -0xb8(%rbp)
movss -0xb4(%rbp), %xmm0
movq -0x28(%rbp), %rax
ucomiss 0x8(%rax), %xmm0
jbe 0x1142ef
movss -0xc0(%rbp), %xmm1
movq -0x28(%rbp), %rax
movss 0x8(%rax), %xmm0
subss -0xb0(%rbp), %xmm0
movss -0xb4(%rbp), %xmm2
subss -0xb0(%rbp), %xmm2
divss %xmm2, %xmm0
movss -0xc8(%rbp), %xmm2
subss -0xc0(%rbp), %xmm2
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0xc8(%rbp)
movq -0x28(%rbp), %rax
movss 0x8(%rax), %xmm0
movss %xmm0, -0xb4(%rbp)
movss -0xbc(%rbp), %xmm0
movq -0x28(%rbp), %rax
ucomiss 0xc(%rax), %xmm0
jbe 0x11435f
movss -0xc4(%rbp), %xmm1
movq -0x28(%rbp), %rax
movss 0xc(%rax), %xmm0
subss -0xb8(%rbp), %xmm0
movss -0xbc(%rbp), %xmm2
subss -0xb8(%rbp), %xmm2
divss %xmm2, %xmm0
movss -0xcc(%rbp), %xmm2
subss -0xc4(%rbp), %xmm2
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0xcc(%rbp)
movq -0x28(%rbp), %rax
movss 0xc(%rax), %xmm0
movss %xmm0, -0xbc(%rbp)
movss -0xb8(%rbp), %xmm0
ucomiss -0xbc(%rbp), %xmm0
jb 0x114387
movss -0xac(%rbp), %xmm0
addss -0x44(%rbp), %xmm0
movss %xmm0, -0x44(%rbp)
jmp 0x113e6c
jmp 0x114389
movl -0x94(%rbp), %eax
movw %ax, %cx
movq -0x90(%rbp), %rax
movw %cx, (%rax)
movl -0x94(%rbp), %eax
addl $0x1, %eax
movw %ax, %cx
movq -0x90(%rbp), %rax
movw %cx, 0x2(%rax)
movl -0x94(%rbp), %eax
addl $0x2, %eax
movw %ax, %cx
movq -0x90(%rbp), %rax
movw %cx, 0x4(%rax)
movl -0x94(%rbp), %eax
movw %ax, %cx
movq -0x90(%rbp), %rax
movw %cx, 0x6(%rax)
movl -0x94(%rbp), %eax
addl $0x2, %eax
movw %ax, %cx
movq -0x90(%rbp), %rax
movw %cx, 0x8(%rax)
movl -0x94(%rbp), %eax
addl $0x3, %eax
movw %ax, %cx
movq -0x90(%rbp), %rax
movw %cx, 0xa(%rax)
movss -0xb0(%rbp), %xmm0
movq -0x88(%rbp), %rax
movss %xmm0, (%rax)
movss -0xb8(%rbp), %xmm0
movq -0x88(%rbp), %rax
movss %xmm0, 0x4(%rax)
movl -0x20(%rbp), %ecx
movq -0x88(%rbp), %rax
movl %ecx, 0x10(%rax)
movss -0xc0(%rbp), %xmm0
movq -0x88(%rbp), %rax
movss %xmm0, 0x8(%rax)
movss -0xc4(%rbp), %xmm0
movq -0x88(%rbp), %rax
movss %xmm0, 0xc(%rax)
movss -0xb4(%rbp), %xmm0
movq -0x88(%rbp), %rax
movss %xmm0, 0x14(%rax)
movss -0xb8(%rbp), %xmm0
movq -0x88(%rbp), %rax
movss %xmm0, 0x18(%rax)
movl -0x20(%rbp), %ecx
movq -0x88(%rbp), %rax
movl %ecx, 0x24(%rax)
movss -0xc8(%rbp), %xmm0
movq -0x88(%rbp), %rax
movss %xmm0, 0x1c(%rax)
movss -0xc4(%rbp), %xmm0
movq -0x88(%rbp), %rax
movss %xmm0, 0x20(%rax)
movss -0xb4(%rbp), %xmm0
movq -0x88(%rbp), %rax
movss %xmm0, 0x28(%rax)
movss -0xbc(%rbp), %xmm0
movq -0x88(%rbp), %rax
movss %xmm0, 0x2c(%rax)
movl -0x20(%rbp), %ecx
movq -0x88(%rbp), %rax
movl %ecx, 0x38(%rax)
movss -0xc8(%rbp), %xmm0
movq -0x88(%rbp), %rax
movss %xmm0, 0x30(%rax)
movss -0xcc(%rbp), %xmm0
movq -0x88(%rbp), %rax
movss %xmm0, 0x34(%rax)
movss -0xb0(%rbp), %xmm0
movq -0x88(%rbp), %rax
movss %xmm0, 0x3c(%rax)
movss -0xbc(%rbp), %xmm0
movq -0x88(%rbp), %rax
movss %xmm0, 0x40(%rax)
movl -0x20(%rbp), %ecx
movq -0x88(%rbp), %rax
movl %ecx, 0x4c(%rax)
movss -0xc0(%rbp), %xmm0
movq -0x88(%rbp), %rax
movss %xmm0, 0x44(%rax)
movss -0xcc(%rbp), %xmm0
movq -0x88(%rbp), %rax
movss %xmm0, 0x48(%rax)
movq -0x88(%rbp), %rax
addq $0x50, %rax
movq %rax, -0x88(%rbp)
movl -0x94(%rbp), %eax
addl $0x4, %eax
movl %eax, -0x94(%rbp)
movq -0x90(%rbp), %rax
addq $0xc, %rax
movq %rax, -0x90(%rbp)
jmp 0x1145b4
movss -0xac(%rbp), %xmm0
addss -0x44(%rbp), %xmm0
movss %xmm0, -0x44(%rbp)
jmp 0x113e6c
movq -0x88(%rbp), %rax
movq -0x18(%rbp), %rcx
movq 0x28(%rcx), %rcx
subq %rcx, %rax
movl $0x14, %ecx
cqto
idivq %rcx
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x20(%rax)
movq -0x90(%rbp), %rax
movq -0x18(%rbp), %rcx
movq 0x18(%rcx), %rcx
subq %rcx, %rax
sarq %rax
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x10(%rax)
movl -0x80(%rbp), %eax
movq -0x18(%rbp), %rcx
subl 0x10(%rcx), %eax
movl %eax, -0x104(%rbp)
movq -0x18(%rbp), %rdi
movq -0x18(%rbp), %rax
movl (%rax), %esi
subl $0x1, %esi
callq 0xeb940
movl -0x104(%rbp), %edx
movl 0x20(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x20(%rax)
movq -0x88(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x48(%rax)
movq -0x90(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x50(%rax)
movl -0x94(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x34(%rax)
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
nopw %cs:(%rax,%rax)