// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui_draw.cpp
// Function: ImDrawList::_ResetForNewFrame()
void ImDrawList::_ResetForNewFrame()
{
    // Verify that the ImDrawCmd fields we want to memcmp() are contiguous in memory.
    // (those should be IM_STATIC_ASSERT() in theory but with our pre C++11 setup the whole check doesn't compile with GCC)
    IM_ASSERT(IM_OFFSETOF(ImDrawCmd, ClipRect) == 0);
    IM_ASSERT(IM_OFFSETOF(ImDrawCmd, TextureId) == sizeof(ImVec4));
    IM_ASSERT(IM_OFFSETOF(ImDrawCmd, VtxOffset) == sizeof(ImVec4) + sizeof(ImTextureID));

    CmdBuffer.resize(0);
    IdxBuffer.resize(0);
    VtxBuffer.resize(0);
    Flags = _Data->InitialFlags;
    memset(&_CmdHeader, 0, sizeof(_CmdHeader));
    _VtxCurrentIdx = 0;
    _VtxWritePtr = NULL;
    _IdxWritePtr = NULL;
    _ClipRectStack.resize(0);
    _TextureIdStack.resize(0);
    _Path.resize(0);
    _Splitter.Clear();
    CmdBuffer.push_back(ImDrawCmd());
    _FringeScale = 1.0f;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, 0x4(%rdi)
jns 0x751b9
xorl %edi, %edi
callq 0x41c63
movq %rax, %r14
movq 0x8(%rbx), %rsi
testq %rsi, %rsi
je 0x751ae
movslq (%rbx), %rax
imulq $0x38, %rax, %rdx
movq %r14, %rdi
callq 0xc080
movq 0x8(%rbx), %rdi
callq 0x41d3c
movq %r14, 0x8(%rbx)
movl $0x0, 0x4(%rbx)
movl $0x0, (%rbx)
cmpl $0x0, 0x14(%rbx)
jns 0x751fb
xorl %edi, %edi
callq 0x41c63
movq %rax, %r14
movq 0x18(%rbx), %rsi
testq %rsi, %rsi
je 0x751f0
movslq 0x10(%rbx), %rdx
addq %rdx, %rdx
movq %r14, %rdi
callq 0xc080
movq 0x18(%rbx), %rdi
callq 0x41d3c
movq %r14, 0x18(%rbx)
movl $0x0, 0x14(%rbx)
movl $0x0, 0x10(%rbx)
cmpl $0x0, 0x24(%rbx)
jns 0x75243
xorl %edi, %edi
callq 0x41c63
movq %rax, %r14
movq 0x28(%rbx), %rsi
testq %rsi, %rsi
je 0x75238
movslq 0x20(%rbx), %rax
shlq $0x2, %rax
leaq (%rax,%rax,4), %rdx
movq %r14, %rdi
callq 0xc080
movq 0x28(%rbx), %rdi
callq 0x41d3c
movq %r14, 0x28(%rbx)
movl $0x0, 0x24(%rbx)
xorl %eax, %eax
movl %eax, 0x20(%rbx)
movq 0x38(%rbx), %rcx
movl 0x2c(%rcx), %ecx
movl %ecx, 0x30(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x88(%rbx)
movups %xmm0, 0x98(%rbx)
movl %eax, 0x34(%rbx)
movups %xmm0, 0x48(%rbx)
cmpl %eax, 0x5c(%rbx)
jns 0x752a6
xorl %edi, %edi
callq 0x41c63
movq %rax, %r14
movq 0x60(%rbx), %rsi
testq %rsi, %rsi
je 0x7529b
movslq 0x58(%rbx), %rdx
shlq $0x4, %rdx
movq %r14, %rdi
callq 0xc080
movq 0x60(%rbx), %rdi
callq 0x41d3c
movq %r14, 0x60(%rbx)
movl $0x0, 0x5c(%rbx)
movl $0x0, 0x58(%rbx)
cmpl $0x0, 0x6c(%rbx)
jns 0x752ea
xorl %edi, %edi
callq 0x41c63
movq %rax, %r14
movq 0x70(%rbx), %rsi
testq %rsi, %rsi
je 0x752df
movslq 0x68(%rbx), %rdx
shlq $0x3, %rdx
movq %r14, %rdi
callq 0xc080
movq 0x70(%rbx), %rdi
callq 0x41d3c
movq %r14, 0x70(%rbx)
movl $0x0, 0x6c(%rbx)
movl $0x0, 0x68(%rbx)
cmpl $0x0, 0x7c(%rbx)
jns 0x75337
xorl %edi, %edi
callq 0x41c63
movq %rax, %r14
movq 0x80(%rbx), %rsi
testq %rsi, %rsi
je 0x75329
movslq 0x78(%rbx), %rdx
shlq $0x3, %rdx
movq %r14, %rdi
callq 0xc080
movq 0x80(%rbx), %rdi
callq 0x41d3c
movq %r14, 0x80(%rbx)
movl $0x0, 0x7c(%rbx)
movl $0x0, 0x78(%rbx)
movabsq $0x100000000, %rax      # imm = 0x100000000
movq %rax, 0xa8(%rbx)
movl (%rbx), %eax
cmpl 0x4(%rbx), %eax
jne 0x7536b
leal 0x1(%rax), %r15d
testl %eax, %eax
je 0x75371
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
addl %eax, %ecx
jmp 0x75376
movq 0x8(%rbx), %r14
jmp 0x753b7
movl $0x8, %ecx
cmpl %r15d, %ecx
cmovgl %ecx, %r15d
movslq %r15d, %rax
imulq $0x38, %rax, %rdi
callq 0x41c63
movq %rax, %r14
movq 0x8(%rbx), %rsi
testq %rsi, %rsi
je 0x753ad
movslq (%rbx), %rax
imulq $0x38, %rax, %rdx
movq %r14, %rdi
callq 0xc080
movq 0x8(%rbx), %rdi
callq 0x41d3c
movq %r14, 0x8(%rbx)
movl %r15d, 0x4(%rbx)
movl (%rbx), %eax
cltq
imulq $0x38, %rax, %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%r14,%rax)
movups %xmm0, 0x10(%r14,%rax)
movups %xmm0, (%r14,%rax)
movq $0x0, 0x30(%r14,%rax)
incl (%rbx)
movl $0x3f800000, 0xc0(%rbx) # imm = 0x3F800000
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop