// File: donfreiday[P]gb/./imgui/imgui.cpp
// Function: ImGui::ListBox(char const*, int*, bool (*)(void*, int, char const**), void*, int, int)
bool ImGui::ListBox(const char* label, int* current_item, bool (*items_getter)(void*, int, const char**), void* data, int items_count, int height_in_items)
{
    if (!ImGui::ListBoxHeader(label, items_count, height_in_items))
        return false;

    // Assume all items have even height (= 1 line of text). If you need items of different or variable sizes you can create a custom version of ListBox() in your code without using the clipper.
    bool value_changed = false;
    ImGuiListClipper clipper(items_count, ImGui::GetTextLineHeightWithSpacing());
    for (int i = clipper.DisplayStart; i < clipper.DisplayEnd; i++)
    {
        const bool item_selected = (i == *current_item);
        const char* item_text;
        if (!items_getter(data, i, &item_text))
            item_text = "*Unknown item*";

        ImGui::PushID(i);
        if (ImGui::Selectable(item_text, item_selected))
        {
            *current_item = i;
            value_changed = true;
        }
        ImGui::PopID();
    }
    clipper.End();
    ImGui::ListBoxFooter();
    return value_changed;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movl %r8d, -0x2c(%rbp)
movl %r9d, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movl -0x2c(%rbp), %esi
movl -0x30(%rbp), %edx
callq 0x27bc0
testb $0x1, %al
jne 0x27d8f
movb $0x0, -0x1(%rbp)
jmp 0x27ead
movb $0x0, -0x31(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, -0x70(%rbp)
callq 0x19a00
movl -0x70(%rbp), %esi
leaq -0x44(%rbp), %rdi
callq 0x30090
movl -0x3c(%rbp), %eax
movl %eax, -0x48(%rbp)
movl -0x48(%rbp), %eax
cmpl -0x38(%rbp), %eax
jge 0x27e8a
movl -0x48(%rbp), %eax
movq -0x18(%rbp), %rcx
movl (%rcx), %ecx
subl %ecx, %eax
sete -0x49(%rbp)
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rdi
movl -0x48(%rbp), %esi
leaq -0x58(%rbp), %rdx
callq *%rax
movb %al, -0x71(%rbp)
jmp 0x27de1
movb -0x71(%rbp), %al
testb $0x1, %al
jne 0x27e11
jmp 0x27dea
leaq 0x344a4(%rip), %rax     # 0x5c295
movq %rax, -0x58(%rbp)
jmp 0x27e11
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x44(%rbp), %rdi
callq 0x30150
jmp 0x27ebb
movl -0x48(%rbp), %edi
callq 0x1cc80
jmp 0x27e1b
movq -0x58(%rbp), %rax
movq %rax, -0x80(%rbp)
movb -0x49(%rbp), %al
movb %al, -0x72(%rbp)
leaq -0x6c(%rbp), %rdi
xorps %xmm1, %xmm1
movaps %xmm1, %xmm0
callq 0x2d280
jmp 0x27e3a
movq -0x80(%rbp), %rdi
movb -0x72(%rbp), %al
movzbl %al, %esi
andl $0x1, %esi
xorl %edx, %edx
leaq -0x6c(%rbp), %rcx
callq 0x27150
movb %al, -0x81(%rbp)
jmp 0x27e5a
movb -0x81(%rbp), %al
testb $0x1, %al
jne 0x27e66
jmp 0x27e73
movl -0x48(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movb $0x1, -0x31(%rbp)
callq 0x1b550
jmp 0x27e7a
jmp 0x27e7c
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0x27db0
leaq -0x44(%rbp), %rdi
callq 0x300d0
jmp 0x27e95
callq 0x27c80
jmp 0x27e9c
movb -0x31(%rbp), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
leaq -0x44(%rbp), %rdi
callq 0x30150
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x90, %rsp
popq %rbp
retq
movq -0x60(%rbp), %rdi
callq 0x74f0
nopw %cs:(%rax,%rax)