// File: /workspace/github_cpp_makefile_star2_O1/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
movl 0x4(%rdi), %eax
testl %eax, %eax
jns 0x766cd
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
addl %eax, %ecx
xorl %r15d, %r15d
testl %ecx, %ecx
cmovgl %ecx, %r15d
imulq $0x38, %r15, %rdi
callq 0x424fb
movq %rax, %r14
movq 0x8(%rbx), %rsi
testq %rsi, %rsi
je 0x766c5
movslq (%rbx), %rax
imulq $0x38, %rax, %rdx
movq %r14, %rdi
callq 0xc080
movq 0x8(%rbx), %rdi
callq 0x425d4
movq %r14, 0x8(%rbx)
movl %r15d, 0x4(%rbx)
movl $0x0, (%rbx)
movl 0x14(%rbx), %eax
testl %eax, %eax
jns 0x76723
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
addl %eax, %ecx
xorl %r15d, %r15d
testl %ecx, %ecx
cmovgl %ecx, %r15d
leal (%r15,%r15), %edi
callq 0x424fb
movq %rax, %r14
movq 0x18(%rbx), %rsi
testq %rsi, %rsi
je 0x7671b
movslq 0x10(%rbx), %rdx
addq %rdx, %rdx
movq %r14, %rdi
callq 0xc080
movq 0x18(%rbx), %rdi
callq 0x425d4
movq %r14, 0x18(%rbx)
movl %r15d, 0x14(%rbx)
movl $0x0, 0x10(%rbx)
movl 0x24(%rbx), %eax
testl %eax, %eax
jns 0x76787
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
addl %eax, %ecx
xorl %r15d, %r15d
testl %ecx, %ecx
cmovgl %ecx, %r15d
leaq (,%r15,4), %rax
leaq (%rax,%rax,4), %rdi
callq 0x424fb
movq %rax, %r14
movq 0x28(%rbx), %rsi
testq %rsi, %rsi
je 0x7677f
movslq 0x20(%rbx), %rax
shlq $0x2, %rax
leaq (%rax,%rax,4), %rdx
movq %r14, %rdi
callq 0xc080
movq 0x28(%rbx), %rdi
callq 0x425d4
movq %r14, 0x28(%rbx)
movl %r15d, 0x24(%rbx)
xorl %r15d, %r15d
movl %r15d, 0x20(%rbx)
movq 0x38(%rbx), %rax
movl 0x2c(%rax), %eax
movl %eax, 0x30(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x88(%rbx)
movups %xmm0, 0x98(%rbx)
movl %r15d, 0x34(%rbx)
movups %xmm0, 0x48(%rbx)
movl 0x5c(%rbx), %eax
testl %eax, %eax
jns 0x76802
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
addl %eax, %ecx
testl %ecx, %ecx
cmovgl %ecx, %r15d
movq %r15, %rdi
shlq $0x4, %rdi
callq 0x424fb
movq %rax, %r14
movq 0x60(%rbx), %rsi
testq %rsi, %rsi
je 0x767fa
movslq 0x58(%rbx), %rdx
shlq $0x4, %rdx
movq %r14, %rdi
callq 0xc080
movq 0x60(%rbx), %rdi
callq 0x425d4
movq %r14, 0x60(%rbx)
movl %r15d, 0x5c(%rbx)
movl $0x0, 0x58(%rbx)
movl 0x6c(%rbx), %eax
testl %eax, %eax
jns 0x7685e
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
addl %eax, %ecx
xorl %r15d, %r15d
testl %ecx, %ecx
cmovgl %ecx, %r15d
leaq (,%r15,8), %rdi
callq 0x424fb
movq %rax, %r14
movq 0x70(%rbx), %rsi
testq %rsi, %rsi
je 0x76856
movslq 0x68(%rbx), %rdx
shlq $0x3, %rdx
movq %r14, %rdi
callq 0xc080
movq 0x70(%rbx), %rdi
callq 0x425d4
movq %r14, 0x70(%rbx)
movl %r15d, 0x6c(%rbx)
movl $0x0, 0x68(%rbx)
movl 0x7c(%rbx), %eax
testl %eax, %eax
jns 0x768c3
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
addl %eax, %ecx
xorl %r15d, %r15d
testl %ecx, %ecx
cmovgl %ecx, %r15d
leaq (,%r15,8), %rdi
callq 0x424fb
movq %rax, %r14
movq 0x80(%rbx), %rsi
testq %rsi, %rsi
je 0x768b8
movslq 0x78(%rbx), %rdx
shlq $0x3, %rdx
movq %r14, %rdi
callq 0xc080
movq 0x80(%rbx), %rdi
callq 0x425d4
movq %r14, 0x80(%rbx)
movl %r15d, 0x7c(%rbx)
movl $0x0, 0x78(%rbx)
movabsq $0x100000000, %rax      # imm = 0x100000000
movq %rax, 0xa8(%rbx)
movl (%rbx), %r15d
movl 0x4(%rbx), %eax
cmpl %eax, %r15d
jne 0x76943
incl %r15d
testl %eax, %eax
je 0x768fa
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
addl %eax, %ecx
jmp 0x768ff
movl $0x8, %ecx
cmpl %r15d, %ecx
cmovgl %ecx, %r15d
cmpl %r15d, %eax
jge 0x76943
movslq %r15d, %rax
imulq $0x38, %rax, %rdi
callq 0x424fb
movq %rax, %r14
movq 0x8(%rbx), %rsi
testq %rsi, %rsi
je 0x7693b
movslq (%rbx), %rax
imulq $0x38, %rax, %rdx
movq %r14, %rdi
callq 0xc080
movq 0x8(%rbx), %rdi
callq 0x425d4
movq %r14, 0x8(%rbx)
movl %r15d, 0x4(%rbx)
movq 0x8(%rbx), %rax
movslq (%rbx), %rcx
imulq $0x38, %rcx, %rcx
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rax,%rcx)
movups %xmm0, 0x10(%rax,%rcx)
movups %xmm0, (%rax,%rcx)
movq $0x0, 0x30(%rax,%rcx)
incl (%rbx)
movl $0x3f800000, 0xc0(%rbx) # imm = 0x3F800000
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop