// File: /workspace/github_c_makefile_star2_O0/space222[P]silo/./nuklear.h
// Function: nk_tree_element_image_push_hashed_base(nk_context*, nk_tree_type, nk_image*, char const*, int, nk_collapse_states*, int*)
NK_INTERN int
nk_tree_element_image_push_hashed_base(struct nk_context *ctx, enum nk_tree_type type,
    struct nk_image *img, const char *title, int title_len,
    enum nk_collapse_states *state, int *selected)
{
    struct nk_window *win;
    struct nk_panel *layout;
    const struct nk_style *style;
    struct nk_command_buffer *out;
    const struct nk_input *in;
    const struct nk_style_button *button;
    enum nk_symbol_type symbol;
    float row_height;
    struct nk_vec2 padding;

    int text_len;
    float text_width;

    struct nk_vec2 item_spacing;
    struct nk_rect header = {0,0,0,0};
    struct nk_rect sym = {0,0,0,0};
    struct nk_text text;

    nk_flags ws = 0;
    enum nk_widget_layout_states widget_state;

    NK_ASSERT(ctx);
    NK_ASSERT(ctx->current);
    NK_ASSERT(ctx->current->layout);
    if (!ctx || !ctx->current || !ctx->current->layout)
        return 0;

    /* cache some data */
    win = ctx->current;
    layout = win->layout;
    out = &win->buffer;
    style = &ctx->style;
    item_spacing = style->window.spacing;
    padding = style->selectable.padding;

    /* calculate header bounds and draw background */
    row_height = style->font->height + 2 * style->tab.padding.y;
    nk_layout_set_min_row_height(ctx, row_height);
    nk_layout_row_dynamic(ctx, row_height, 1);
    nk_layout_reset_min_row_height(ctx);

    widget_state = nk_widget(&header, ctx);
    if (type == NK_TREE_TAB) {
        const struct nk_style_item *background = &style->tab.background;
        if (background->type == NK_STYLE_ITEM_IMAGE) {
            nk_draw_image(out, header, &background->data.image, nk_white);
            text.background = nk_rgba(0,0,0,0);
        } else {
            text.background = background->data.color;
            nk_fill_rect(out, header, 0, style->tab.border_color);
            nk_fill_rect(out, nk_shrink_rect(header, style->tab.border),
                style->tab.rounding, background->data.color);
        }
    } else text.background = style->window.background;

    in = (!(layout->flags & NK_WINDOW_ROM)) ? &ctx->input: 0;
    in = (in && widget_state == NK_WIDGET_VALID) ? &ctx->input : 0;

    /* select correct button style */
    if (*state == NK_MAXIMIZED) {
        symbol = style->tab.sym_maximize;
        if (type == NK_TREE_TAB)
            button = &style->tab.tab_maximize_button;
        else button = &style->tab.node_maximize_button;
    } else {
        symbol = style->tab.sym_minimize;
        if (type == NK_TREE_TAB)
            button = &style->tab.tab_minimize_button;
        else button = &style->tab.node_minimize_button;
    }
    {/* draw triangle button */
    sym.w = sym.h = style->font->height;
    sym.y = header.y + style->tab.padding.y;
    sym.x = header.x + style->tab.padding.x;
    if (nk_do_button_symbol(&ws, &win->buffer, sym, symbol, NK_BUTTON_DEFAULT, button, in, style->font))
        *state = (*state == NK_MAXIMIZED) ? NK_MINIMIZED : NK_MAXIMIZED;}

    /* draw label */
    {nk_flags dummy = 0;
    struct nk_rect label;
    /* calculate size of the text and tooltip */
    text_len = nk_strlen(title);
    text_width = style->font->width(style->font->userdata, style->font->height, title, text_len);
    text_width += (4 * padding.x);

    header.w = NK_MAX(header.w, sym.w + item_spacing.x);
    label.x = sym.x + sym.w + item_spacing.x;
    label.y = sym.y;
    label.w = NK_MIN(header.w - (sym.w + item_spacing.y + style->tab.indent), text_width);
    label.h = style->font->height;

    if (img) {
        nk_do_selectable_image(&dummy, &win->buffer, label, title, title_len, NK_TEXT_LEFT,
            selected, img, &style->selectable, in, style->font);
    } else nk_do_selectable(&dummy, &win->buffer, label, title, title_len, NK_TEXT_LEFT,
            selected, &style->selectable, in, style->font);
    }
    /* increase x-axis cursor widget position pointer */
    if (*state == NK_MAXIMIZED) {
        layout->at_x = header.x + (float)*layout->offset_x + style->tab.indent;
        layout->bounds.w = NK_MAX(layout->bounds.w, style->tab.indent);
        layout->bounds.w -= (style->tab.indent + style->window.padding.x);
        layout->row.tree_depth++;
        return nk_true;
    } else return nk_false;
}

// Assembly:
subq $0x1d8, %rsp            # imm = 0x1D8
movq 0x1e0(%rsp), %rax
movq %rdi, 0x1c8(%rsp)
movl %esi, 0x1c4(%rsp)
movq %rdx, 0x1b8(%rsp)
movq %rcx, 0x1b0(%rsp)
movl %r8d, 0x1ac(%rsp)
movq %r9, 0x1a0(%rsp)
leaq 0x140(%rsp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x20d0
leaq 0x130(%rsp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x20d0
movl $0x0, 0x11c(%rsp)
cmpq $0x0, 0x1c8(%rsp)
je 0x3a84e
jmp 0x3a86d
leaq 0xdcca(%rip), %rdi      # 0x4851f
leaq 0xab57(%rip), %rsi      # 0x453b3
movl $0x4873, %edx           # imm = 0x4873
leaq 0x101fa(%rip), %rcx     # 0x4aa62
callq 0x20a0
movq 0x1c8(%rsp), %rax
cmpq $0x0, 0x3fe8(%rax)
je 0x3a881
jmp 0x3a8a0
leaq 0xc671(%rip), %rdi      # 0x46ef9
leaq 0xab24(%rip), %rsi      # 0x453b3
movl $0x4874, %edx           # imm = 0x4874
leaq 0x101c7(%rip), %rcx     # 0x4aa62
callq 0x20a0
movq 0x1c8(%rsp), %rax
movq 0x3fe8(%rax), %rax
cmpq $0x0, 0xa8(%rax)
je 0x3a8bb
jmp 0x3a8da
leaq 0xc7b3(%rip), %rdi      # 0x47075
leaq 0xaaea(%rip), %rsi      # 0x453b3
movl $0x4875, %edx           # imm = 0x4875
leaq 0x1018d(%rip), %rcx     # 0x4aa62
callq 0x20a0
cmpq $0x0, 0x1c8(%rsp)
je 0x3a910
movq 0x1c8(%rsp), %rax
cmpq $0x0, 0x3fe8(%rax)
je 0x3a910
movq 0x1c8(%rsp), %rax
movq 0x3fe8(%rax), %rax
cmpq $0x0, 0xa8(%rax)
jne 0x3a920
movl $0x0, 0x1d4(%rsp)
jmp 0x3b205
movq 0x1c8(%rsp), %rax
movq 0x3fe8(%rax), %rax
movq %rax, 0x198(%rsp)
movq 0x198(%rsp), %rax
movq 0xa8(%rax), %rax
movq %rax, 0x190(%rsp)
movq 0x198(%rsp), %rax
addq $0x68, %rax
movq %rax, 0x180(%rsp)
movq 0x1c8(%rsp), %rax
addq $0x168, %rax            # imm = 0x168
movq %rax, 0x188(%rsp)
movq 0x188(%rsp), %rax
movq 0x1d24(%rax), %rax
movq %rax, 0x150(%rsp)
movq 0x188(%rsp), %rax
movq 0x534(%rax), %rax
movq %rax, 0x160(%rsp)
movq 0x188(%rsp), %rax
movq (%rax), %rax
movss 0x8(%rax), %xmm1
movq 0x188(%rsp), %rax
movss 0x1938(%rax), %xmm0
addss %xmm0, %xmm0
addss %xmm1, %xmm0
movss %xmm0, 0x168(%rsp)
movq 0x1c8(%rsp), %rdi
movss 0x168(%rsp), %xmm0
callq 0x1e620
movq 0x1c8(%rsp), %rdi
movss 0x168(%rsp), %xmm0
movl $0x1, %esi
callq 0x1e8b0
movq 0x1c8(%rsp), %rdi
callq 0x11d40
movq 0x1c8(%rsp), %rsi
leaq 0x140(%rsp), %rdi
callq 0x1cd90
movl %eax, 0x118(%rsp)
cmpl $0x1, 0x1c4(%rsp)
jne 0x3abd3
movq 0x188(%rsp), %rax
addq $0x1638, %rax           # imm = 0x1638
movq %rax, 0x110(%rsp)
movq 0x110(%rsp), %rax
cmpl $0x1, (%rax)
jne 0x3aad6
movq 0x180(%rsp), %rdi
movups 0x140(%rsp), %xmm0
movaps %xmm0, 0x100(%rsp)
movq 0x110(%rsp), %rsi
addq $0x8, %rsi
movl $0xffffffff, 0xfc(%rsp) # imm = 0xFFFFFFFF
movsd 0x100(%rsp), %xmm0
movsd 0x108(%rsp), %xmm1
movl 0xfc(%rsp), %edx
callq 0xc3c0
xorl %ecx, %ecx
movl %ecx, %edi
movl %ecx, %esi
movl %ecx, %edx
callq 0x57b0
movl %eax, 0xf8(%rsp)
movl 0xf8(%rsp), %eax
movl %eax, 0x128(%rsp)
jmp 0x3abd1
movq 0x110(%rsp), %rax
movl 0x8(%rax), %eax
movl %eax, 0x128(%rsp)
movq 0x180(%rsp), %rdi
movups 0x140(%rsp), %xmm0
movaps %xmm0, 0xe0(%rsp)
movq 0x188(%rsp), %rax
movl 0x1658(%rax), %eax
movl %eax, 0xdc(%rsp)
movsd 0xe0(%rsp), %xmm0
movsd 0xe8(%rsp), %xmm1
movl 0xdc(%rsp), %esi
xorps %xmm2, %xmm2
callq 0xb130
movq 0x180(%rsp), %rax
movq %rax, 0x48(%rsp)
movups 0x140(%rsp), %xmm0
movaps %xmm0, 0xb0(%rsp)
movq 0x188(%rsp), %rax
movss 0x1928(%rax), %xmm2
movsd 0xb0(%rsp), %xmm0
movsd 0xb8(%rsp), %xmm1
callq 0x31050
movq 0x48(%rsp), %rdi
movlpd %xmm0, 0xcc(%rsp)
movlpd %xmm1, 0xd4(%rsp)
movq 0x188(%rsp), %rax
movss 0x192c(%rax), %xmm2
movq 0x110(%rsp), %rax
movl 0x8(%rax), %eax
movl %eax, 0xac(%rsp)
movsd 0xcc(%rsp), %xmm0
movsd 0xd4(%rsp), %xmm1
movl 0xac(%rsp), %esi
callq 0xb130
jmp 0x3abe8
movq 0x188(%rsp), %rax
movl 0x1cc0(%rax), %eax
movl %eax, 0x128(%rsp)
movq 0x190(%rsp), %rax
movl 0x4(%rax), %eax
andl $0x1000, %eax           # imm = 0x1000
cmpl $0x0, %eax
jne 0x3ac0c
movq 0x1c8(%rsp), %rax
movq %rax, 0x40(%rsp)
jmp 0x3ac15
xorl %eax, %eax
movq %rax, 0x40(%rsp)
jmp 0x3ac15
movq 0x40(%rsp), %rax
movq %rax, 0x178(%rsp)
cmpq $0x0, 0x178(%rsp)
je 0x3ac46
cmpl $0x1, 0x118(%rsp)
jne 0x3ac46
movq 0x1c8(%rsp), %rax
movq %rax, 0x38(%rsp)
jmp 0x3ac4f
xorl %eax, %eax
movq %rax, 0x38(%rsp)
jmp 0x3ac4f
movq 0x38(%rsp), %rax
movq %rax, 0x178(%rsp)
movq 0x1a0(%rsp), %rax
cmpl $0x1, (%rax)
jne 0x3acc2
movq 0x188(%rsp), %rax
movl 0x1924(%rax), %eax
movl %eax, 0x16c(%rsp)
cmpl $0x1, 0x1c4(%rsp)
jne 0x3aca4
movq 0x188(%rsp), %rax
addq $0x1638, %rax           # imm = 0x1638
addq $0x28, %rax
movq %rax, 0x170(%rsp)
jmp 0x3acc0
movq 0x188(%rsp), %rax
addq $0x1638, %rax           # imm = 0x1638
addq $0x188, %rax            # imm = 0x188
movq %rax, 0x170(%rsp)
jmp 0x3ad1d
movq 0x188(%rsp), %rax
movl 0x1920(%rax), %eax
movl %eax, 0x16c(%rsp)
cmpl $0x1, 0x1c4(%rsp)
jne 0x3acff
movq 0x188(%rsp), %rax
addq $0x1638, %rax           # imm = 0x1638
addq $0xd8, %rax
movq %rax, 0x170(%rsp)
jmp 0x3ad1b
movq 0x188(%rsp), %rax
addq $0x1638, %rax           # imm = 0x1638
addq $0x238, %rax            # imm = 0x238
movq %rax, 0x170(%rsp)
jmp 0x3ad1d
movq 0x188(%rsp), %rax
movq (%rax), %rax
movss 0x8(%rax), %xmm0
movss %xmm0, 0x13c(%rsp)
movss %xmm0, 0x138(%rsp)
movss 0x144(%rsp), %xmm0
movq 0x188(%rsp), %rax
movss 0x1938(%rax), %xmm1
addss %xmm1, %xmm0
movss %xmm0, 0x134(%rsp)
movss 0x140(%rsp), %xmm0
movq 0x188(%rsp), %rax
movss 0x1934(%rax), %xmm1
addss %xmm1, %xmm0
movss %xmm0, 0x130(%rsp)
movq 0x198(%rsp), %rsi
addq $0x68, %rsi
movups 0x130(%rsp), %xmm0
movaps %xmm0, 0x90(%rsp)
movl 0x16c(%rsp), %edx
movq 0x170(%rsp), %r8
movq 0x178(%rsp), %r9
movq 0x188(%rsp), %rax
movq (%rax), %rcx
movsd 0x90(%rsp), %xmm0
movsd 0x98(%rsp), %xmm1
movq %rsp, %rax
movq %rcx, (%rax)
leaq 0x11c(%rsp), %rdi
xorl %ecx, %ecx
callq 0x1dba0
cmpl $0x0, %eax
je 0x3ae16
movq 0x1a0(%rsp), %rax
movl (%rax), %edx
movl $0x1, %ecx
xorl %eax, %eax
cmpl $0x1, %edx
cmovel %eax, %ecx
movq 0x1a0(%rsp), %rax
movl %ecx, (%rax)
movl $0x0, 0x8c(%rsp)
movq 0x1b0(%rsp), %rdi
callq 0x4720
movl %eax, 0x15c(%rsp)
movq 0x188(%rsp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rax
movq 0x188(%rsp), %rcx
movq (%rcx), %rcx
movq (%rcx), %rcx
movq %rcx, 0x70(%rsp)
movq 0x188(%rsp), %rcx
movq (%rcx), %rcx
movss 0x8(%rcx), %xmm0
movq 0x1b0(%rsp), %rsi
movl 0x15c(%rsp), %edx
movq 0x70(%rsp), %rdi
callq *%rax
movss %xmm0, 0x158(%rsp)
movss 0x160(%rsp), %xmm0
movss 0x158(%rsp), %xmm1
movss 0xa294(%rip), %xmm2     # 0x45134
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, 0x158(%rsp)
movss 0x148(%rsp), %xmm1
movss 0x138(%rsp), %xmm0
addss 0x150(%rsp), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x3aeeb
movss 0x138(%rsp), %xmm0
addss 0x150(%rsp), %xmm0
movss %xmm0, 0x34(%rsp)
jmp 0x3aefa
movss 0x148(%rsp), %xmm0
movss %xmm0, 0x34(%rsp)
movss 0x34(%rsp), %xmm0
movss %xmm0, 0x148(%rsp)
movss 0x130(%rsp), %xmm0
addss 0x138(%rsp), %xmm0
addss 0x150(%rsp), %xmm0
movss %xmm0, 0x7c(%rsp)
movss 0x134(%rsp), %xmm0
movss %xmm0, 0x80(%rsp)
movss 0x148(%rsp), %xmm1
movss 0x138(%rsp), %xmm0
addss 0x154(%rsp), %xmm0
movq 0x188(%rsp), %rax
addss 0x1930(%rax), %xmm0
subss %xmm0, %xmm1
movss 0x158(%rsp), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x3afb0
movss 0x148(%rsp), %xmm0
movss 0x138(%rsp), %xmm1
addss 0x154(%rsp), %xmm1
movq 0x188(%rsp), %rax
addss 0x1930(%rax), %xmm1
subss %xmm1, %xmm0
movss %xmm0, 0x30(%rsp)
jmp 0x3afbf
movss 0x158(%rsp), %xmm0
movss %xmm0, 0x30(%rsp)
movss 0x30(%rsp), %xmm0
movss %xmm0, 0x84(%rsp)
movq 0x188(%rsp), %rax
movq (%rax), %rax
movss 0x8(%rax), %xmm0
movss %xmm0, 0x88(%rsp)
cmpq $0x0, 0x1b8(%rsp)
je 0x3b07b
movq 0x198(%rsp), %rsi
addq $0x68, %rsi
movups 0x7c(%rsp), %xmm0
movaps %xmm0, 0x60(%rsp)
movq 0x1b0(%rsp), %rdx
movl 0x1ac(%rsp), %ecx
movq 0x1e0(%rsp), %r9
movq 0x1b8(%rsp), %rdi
movq 0x188(%rsp), %rax
movq %rax, %r8
addq $0x450, %r8             # imm = 0x450
movq 0x178(%rsp), %r10
movq (%rax), %r11
movsd 0x60(%rsp), %xmm0
movsd 0x68(%rsp), %xmm1
movq %rsp, %rax
movq %r11, 0x18(%rax)
movq %r10, 0x10(%rax)
movq %r8, 0x8(%rax)
movq %rdi, (%rax)
leaq 0x8c(%rsp), %rdi
movl $0x11, %r8d
callq 0x28f30
jmp 0x3b0f2
movq 0x198(%rsp), %rsi
addq $0x68, %rsi
movups 0x7c(%rsp), %xmm0
movaps %xmm0, 0x50(%rsp)
movq 0x1b0(%rsp), %rdx
movl 0x1ac(%rsp), %ecx
movq 0x1e0(%rsp), %r9
movq 0x188(%rsp), %rax
movq %rax, %rdi
addq $0x450, %rdi            # imm = 0x450
movq 0x178(%rsp), %r8
movq (%rax), %r10
movsd 0x50(%rsp), %xmm0
movsd 0x58(%rsp), %xmm1
movq %rsp, %rax
movq %r10, 0x10(%rax)
movq %r8, 0x8(%rax)
movq %rdi, (%rax)
leaq 0x8c(%rsp), %rdi
movl $0x11, %r8d
callq 0x288c0
movq 0x1a0(%rsp), %rax
cmpl $0x1, (%rax)
jne 0x3b1fa
movss 0x140(%rsp), %xmm0
movq 0x190(%rsp), %rax
movq 0x18(%rax), %rax
movl (%rax), %eax
cvtsi2ss %rax, %xmm1
addss %xmm1, %xmm0
movq 0x188(%rsp), %rax
addss 0x1930(%rax), %xmm0
movq 0x190(%rsp), %rax
movss %xmm0, 0x28(%rax)
movq 0x190(%rsp), %rax
movss 0x10(%rax), %xmm1
movq 0x188(%rsp), %rax
movss 0x1930(%rax), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x3b17a
movq 0x188(%rsp), %rax
movss 0x1930(%rax), %xmm0
movss %xmm0, 0x2c(%rsp)
jmp 0x3b18d
movq 0x190(%rsp), %rax
movss 0x10(%rax), %xmm0
movss %xmm0, 0x2c(%rsp)
movss 0x2c(%rsp), %xmm0
movq 0x190(%rsp), %rax
movss %xmm0, 0x10(%rax)
movq 0x188(%rsp), %rax
movss 0x1930(%rax), %xmm1
movq 0x188(%rsp), %rax
addss 0x1d3c(%rax), %xmm1
movq 0x190(%rsp), %rax
movss 0x10(%rax), %xmm0
subss %xmm1, %xmm0
movss %xmm0, 0x10(%rax)
movq 0x190(%rsp), %rax
movl 0xb0(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0xb0(%rax)
movl $0x1, 0x1d4(%rsp)
jmp 0x3b205
movl $0x0, 0x1d4(%rsp)
movl 0x1d4(%rsp), %eax
addq $0x1d8, %rsp            # imm = 0x1D8
retq
nopw %cs:(%rax,%rax)