// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_tree_element_image_push_hashed_base
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, nk_bool *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};

    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;

        switch (background->type) {
            case NK_STYLE_ITEM_IMAGE:
                nk_draw_image(out, header, &background->data.image, nk_rgb_factor(nk_white, style->tab.color_factor));
                break;
            case NK_STYLE_ITEM_NINE_SLICE:
                nk_draw_nine_slice(out, header, &background->data.slice, nk_rgb_factor(nk_white, style->tab.color_factor));
                break;
            case NK_STYLE_ITEM_COLOR:
                nk_fill_rect(out, header, 0, nk_rgb_factor(style->tab.border_color, style->tab.color_factor));
                nk_fill_rect(out, nk_shrink_rect(header, style->tab.border),
                    style->tab.rounding, nk_rgb_factor(background->data.color, style->tab.color_factor));

                break;
        }
    }

    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 $0x168, %rsp            # imm = 0x168
movq 0x170(%rsp), %rax
movq %rdi, 0x158(%rsp)
movl %esi, 0x154(%rsp)
movq %rdx, 0x148(%rsp)
movq %rcx, 0x140(%rsp)
movl %r8d, 0x13c(%rsp)
movq %r9, 0x130(%rsp)
leaq 0xd0(%rsp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x13c40
leaq 0xc0(%rsp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x13c40
movl $0x0, 0xbc(%rsp)
cmpq $0x0, 0x158(%rsp)
jne 0x8884f
movq 0x3c7cd(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x28b73(%rip), %rsi     # 0xb13a0
leaq 0x28b8a(%rip), %rdx     # 0xb13be
movl $0x5893, %ecx           # imm = 0x5893
movb $0x0, %al
callq 0x13ec0
movq 0x3c7a9(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x88851
jmp 0x88853
movq 0x158(%rsp), %rax
cmpq $0x0, 0x4780(%rax)
jne 0x88898
movq 0x3c784(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x28b2a(%rip), %rsi     # 0xb13a0
leaq 0x28b41(%rip), %rdx     # 0xb13be
movl $0x5894, %ecx           # imm = 0x5894
movb $0x0, %al
callq 0x13ec0
movq 0x3c760(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x8889a
jmp 0x8889c
movq 0x158(%rsp), %rax
movq 0x4780(%rax), %rax
cmpq $0x0, 0xa8(%rax)
jne 0x888e8
movq 0x3c734(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x28ada(%rip), %rsi     # 0xb13a0
leaq 0x28af1(%rip), %rdx     # 0xb13be
movl $0x5895, %ecx           # imm = 0x5895
movb $0x0, %al
callq 0x13ec0
movq 0x3c710(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x888ea
cmpq $0x0, 0x158(%rsp)
je 0x88920
movq 0x158(%rsp), %rax
cmpq $0x0, 0x4780(%rax)
je 0x88920
movq 0x158(%rsp), %rax
movq 0x4780(%rax), %rax
cmpq $0x0, 0xa8(%rax)
jne 0x88930
movl $0x0, 0x164(%rsp)
jmp 0x8925c
movq 0x158(%rsp), %rax
movq 0x4780(%rax), %rax
movq %rax, 0x128(%rsp)
movq 0x128(%rsp), %rax
movq 0xa8(%rax), %rax
movq %rax, 0x120(%rsp)
movq 0x128(%rsp), %rax
addq $0x68, %rax
movq %rax, 0x110(%rsp)
movq 0x158(%rsp), %rax
addq $0x168, %rax            # imm = 0x168
movq %rax, 0x118(%rsp)
movq 0x118(%rsp), %rax
movq 0x234c(%rax), %rax
movq %rax, 0xe0(%rsp)
movq 0x118(%rsp), %rax
movq 0x644(%rax), %rax
movq %rax, 0xf0(%rsp)
movq 0x118(%rsp), %rax
movq (%rax), %rax
movss 0x8(%rax), %xmm1
movq 0x118(%rsp), %rax
movss 0x1e98(%rax), %xmm0
addss %xmm0, %xmm0
addss %xmm1, %xmm0
movss %xmm0, 0xf8(%rsp)
movq 0x158(%rsp), %rdi
movss 0xf8(%rsp), %xmm0
callq 0x14af0
movq 0x158(%rsp), %rdi
movss 0xf8(%rsp), %xmm0
movl $0x1, %esi
callq 0x13f60
movq 0x158(%rsp), %rdi
callq 0x14e40
movq 0x158(%rsp), %rsi
leaq 0xd0(%rsp), %rdi
callq 0x139c0
movl %eax, 0xb8(%rsp)
cmpl $0x1, 0x154(%rsp)
jne 0x88c6b
movq 0x118(%rsp), %rax
addq $0x1af0, %rax           # imm = 0x1AF0
movq %rax, 0xb0(%rsp)
movq 0xb0(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x78(%rsp)
testl %eax, %eax
je 0x88b70
jmp 0x88a7d
movl 0x78(%rsp), %eax
subl $0x1, %eax
je 0x88a96
jmp 0x88a88
movl 0x78(%rsp), %eax
subl $0x2, %eax
je 0x88b03
jmp 0x88c69
movq 0x110(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0xb0(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x70(%rsp)
movq 0x118(%rsp), %rax
movss 0x1ea4(%rax), %xmm0
movl 0x287e6(%rip), %edi     # 0xb12b0
callq 0x15100
movq 0x68(%rsp), %rdi
movq 0x70(%rsp), %rsi
movl %eax, 0xac(%rsp)
movsd 0xd0(%rsp), %xmm0
movsd 0xd8(%rsp), %xmm1
movl 0xac(%rsp), %edx
callq 0x14690
jmp 0x88c69
movq 0x110(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0xb0(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x60(%rsp)
movq 0x118(%rsp), %rax
movss 0x1ea4(%rax), %xmm0
movl 0x28779(%rip), %edi     # 0xb12b0
callq 0x15100
movq 0x58(%rsp), %rdi
movq 0x60(%rsp), %rsi
movl %eax, 0xa8(%rsp)
movsd 0xd0(%rsp), %xmm0
movsd 0xd8(%rsp), %xmm1
movl 0xa8(%rsp), %edx
callq 0x152a0
jmp 0x88c69
movq 0x110(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x118(%rsp), %rax
movss 0x1ea4(%rax), %xmm0
movl 0x1b18(%rax), %edi
callq 0x15100
movq 0x40(%rsp), %rdi
movl %eax, 0xa4(%rsp)
movsd 0xd0(%rsp), %xmm0
movsd 0xd8(%rsp), %xmm1
movl 0xa4(%rsp), %esi
xorps %xmm2, %xmm2
callq 0x13f10
movq 0x110(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x118(%rsp), %rax
movss 0x1e88(%rax), %xmm2
movsd 0xd0(%rsp), %xmm0
movsd 0xd8(%rsp), %xmm1
callq 0x75600
movlpd %xmm0, 0x94(%rsp)
movlpd %xmm1, 0x9c(%rsp)
movq 0x118(%rsp), %rax
movss 0x1e8c(%rax), %xmm0
movss %xmm0, 0x54(%rsp)
movss 0x1ea4(%rax), %xmm0
movq 0xb0(%rsp), %rax
movl 0x8(%rax), %edi
callq 0x15100
movq 0x48(%rsp), %rdi
movss 0x54(%rsp), %xmm2
movl %eax, 0x90(%rsp)
movsd 0x94(%rsp), %xmm0
movsd 0x9c(%rsp), %xmm1
movl 0x90(%rsp), %esi
callq 0x13f10
jmp 0x88c6b
movq 0x120(%rsp), %rax
movl 0x4(%rax), %eax
andl $0x1000, %eax           # imm = 0x1000
cmpl $0x0, %eax
jne 0x88c8f
movq 0x158(%rsp), %rax
movq %rax, 0x38(%rsp)
jmp 0x88c98
xorl %eax, %eax
movq %rax, 0x38(%rsp)
jmp 0x88c98
movq 0x38(%rsp), %rax
movq %rax, 0x108(%rsp)
cmpq $0x0, 0x108(%rsp)
je 0x88cc9
cmpl $0x1, 0xb8(%rsp)
jne 0x88cc9
movq 0x158(%rsp), %rax
movq %rax, 0x30(%rsp)
jmp 0x88cd2
xorl %eax, %eax
movq %rax, 0x30(%rsp)
jmp 0x88cd2
movq 0x30(%rsp), %rax
movq %rax, 0x108(%rsp)
movq 0x130(%rsp), %rax
cmpl $0x1, (%rax)
jne 0x88d45
movq 0x118(%rsp), %rax
movl 0x1e84(%rax), %eax
movl %eax, 0xfc(%rsp)
cmpl $0x1, 0x154(%rsp)
jne 0x88d27
movq 0x118(%rsp), %rax
addq $0x1af0, %rax           # imm = 0x1AF0
addq $0x30, %rax
movq %rax, 0x100(%rsp)
jmp 0x88d43
movq 0x118(%rsp), %rax
addq $0x1af0, %rax           # imm = 0x1AF0
addq $0x1e0, %rax            # imm = 0x1E0
movq %rax, 0x100(%rsp)
jmp 0x88da0
movq 0x118(%rsp), %rax
movl 0x1e80(%rax), %eax
movl %eax, 0xfc(%rsp)
cmpl $0x1, 0x154(%rsp)
jne 0x88d82
movq 0x118(%rsp), %rax
addq $0x1af0, %rax           # imm = 0x1AF0
addq $0x108, %rax            # imm = 0x108
movq %rax, 0x100(%rsp)
jmp 0x88d9e
movq 0x118(%rsp), %rax
addq $0x1af0, %rax           # imm = 0x1AF0
addq $0x2b8, %rax            # imm = 0x2B8
movq %rax, 0x100(%rsp)
jmp 0x88da0
movq 0x118(%rsp), %rax
movq (%rax), %rax
movss 0x8(%rax), %xmm0
movss %xmm0, 0xcc(%rsp)
movss %xmm0, 0xc8(%rsp)
movss 0xd4(%rsp), %xmm0
movq 0x118(%rsp), %rax
movss 0x1e98(%rax), %xmm1
addss %xmm1, %xmm0
movss %xmm0, 0xc4(%rsp)
movss 0xd0(%rsp), %xmm0
movq 0x118(%rsp), %rax
movss 0x1e94(%rax), %xmm1
addss %xmm1, %xmm0
movss %xmm0, 0xc0(%rsp)
movq 0x128(%rsp), %rsi
addq $0x68, %rsi
movl 0xfc(%rsp), %edx
movq 0x100(%rsp), %r8
movq 0x108(%rsp), %r9
movq 0x118(%rsp), %rax
movq (%rax), %rcx
movsd 0xc0(%rsp), %xmm0
movsd 0xc8(%rsp), %xmm1
movq %rsp, %rax
movq %rcx, (%rax)
leaq 0xbc(%rsp), %rdi
xorl %ecx, %ecx
callq 0x5e910
cmpl $0x0, %eax
je 0x88e89
movq 0x130(%rsp), %rax
movl (%rax), %edx
movl $0x1, %ecx
xorl %eax, %eax
cmpl $0x1, %edx
cmovel %eax, %ecx
movq 0x130(%rsp), %rax
movl %ecx, (%rax)
movl $0x0, 0x8c(%rsp)
movq 0x140(%rsp), %rdi
callq 0x14050
movl %eax, 0xec(%rsp)
movq 0x118(%rsp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rax
movq 0x118(%rsp), %rcx
movq (%rcx), %rcx
movq 0x118(%rsp), %rdx
movq (%rdx), %rdx
movss 0x8(%rdx), %xmm0
movq 0x140(%rsp), %rsi
movl 0xec(%rsp), %edx
movq (%rcx), %rdi
callq *%rax
movss %xmm0, 0xe8(%rsp)
movss 0xf0(%rsp), %xmm0
movss 0xe8(%rsp), %xmm1
movss 0x24633(%rip), %xmm2    # 0xad53c
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, 0xe8(%rsp)
movss 0xd8(%rsp), %xmm1
movss 0xc8(%rsp), %xmm0
addss 0xe0(%rsp), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x88f54
movss 0xc8(%rsp), %xmm0
addss 0xe0(%rsp), %xmm0
movss %xmm0, 0x2c(%rsp)
jmp 0x88f63
movss 0xd8(%rsp), %xmm0
movss %xmm0, 0x2c(%rsp)
movss 0x2c(%rsp), %xmm0
movss %xmm0, 0xd8(%rsp)
movss 0xc0(%rsp), %xmm0
addss 0xc8(%rsp), %xmm0
addss 0xe0(%rsp), %xmm0
movss %xmm0, 0x7c(%rsp)
movss 0xc4(%rsp), %xmm0
movss %xmm0, 0x80(%rsp)
movss 0xd8(%rsp), %xmm1
movss 0xc8(%rsp), %xmm0
addss 0xe4(%rsp), %xmm0
movq 0x118(%rsp), %rax
addss 0x1e90(%rax), %xmm0
subss %xmm0, %xmm1
movss 0xe8(%rsp), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x89019
movss 0xd8(%rsp), %xmm0
movss 0xc8(%rsp), %xmm1
addss 0xe4(%rsp), %xmm1
movq 0x118(%rsp), %rax
addss 0x1e90(%rax), %xmm1
subss %xmm1, %xmm0
movss %xmm0, 0x28(%rsp)
jmp 0x89028
movss 0xe8(%rsp), %xmm0
movss %xmm0, 0x28(%rsp)
movss 0x28(%rsp), %xmm0
movss %xmm0, 0x84(%rsp)
movq 0x118(%rsp), %rax
movq (%rax), %rax
movss 0x8(%rax), %xmm0
movss %xmm0, 0x88(%rsp)
cmpq $0x0, 0x148(%rsp)
je 0x890d9
movq 0x128(%rsp), %rsi
addq $0x68, %rsi
movq 0x140(%rsp), %rdx
movl 0x13c(%rsp), %ecx
movq 0x170(%rsp), %r9
movq 0x148(%rsp), %rdi
movq 0x118(%rsp), %rax
movq %rax, %r8
addq $0x530, %r8             # imm = 0x530
movq 0x108(%rsp), %r10
movq (%rax), %r11
movsd 0x7c(%rsp), %xmm0
movsd 0x84(%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 0x6cfe0
jmp 0x89149
movq 0x128(%rsp), %rsi
addq $0x68, %rsi
movq 0x140(%rsp), %rdx
movl 0x13c(%rsp), %ecx
movq 0x170(%rsp), %r9
movq 0x118(%rsp), %rax
movq %rax, %rdi
addq $0x530, %rdi            # imm = 0x530
movq 0x108(%rsp), %r8
movq (%rax), %r10
movsd 0x7c(%rsp), %xmm0
movsd 0x84(%rsp), %xmm1
movq %rsp, %rax
movq %r10, 0x10(%rax)
movq %r8, 0x8(%rax)
movq %rdi, (%rax)
leaq 0x8c(%rsp), %rdi
movl $0x11, %r8d
callq 0x6c8e0
movq 0x130(%rsp), %rax
cmpl $0x1, (%rax)
jne 0x89251
movss 0xd0(%rsp), %xmm0
movq 0x120(%rsp), %rax
movq 0x18(%rax), %rax
movl (%rax), %eax
cvtsi2ss %rax, %xmm1
addss %xmm1, %xmm0
movq 0x118(%rsp), %rax
addss 0x1e90(%rax), %xmm0
movq 0x120(%rsp), %rax
movss %xmm0, 0x28(%rax)
movq 0x120(%rsp), %rax
movss 0x10(%rax), %xmm1
movq 0x118(%rsp), %rax
movss 0x1e90(%rax), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x891d1
movq 0x118(%rsp), %rax
movss 0x1e90(%rax), %xmm0
movss %xmm0, 0x24(%rsp)
jmp 0x891e4
movq 0x120(%rsp), %rax
movss 0x10(%rax), %xmm0
movss %xmm0, 0x24(%rsp)
movss 0x24(%rsp), %xmm0
movq 0x120(%rsp), %rax
movss %xmm0, 0x10(%rax)
movq 0x118(%rsp), %rax
movss 0x1e90(%rax), %xmm1
movq 0x118(%rsp), %rax
addss 0x2364(%rax), %xmm1
movq 0x120(%rsp), %rax
movss 0x10(%rax), %xmm0
subss %xmm1, %xmm0
movss %xmm0, 0x10(%rax)
movq 0x120(%rsp), %rax
movl 0xb0(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0xb0(%rax)
movl $0x1, 0x164(%rsp)
jmp 0x8925c
movl $0x0, 0x164(%rsp)
movl 0x164(%rsp), %eax
addq $0x168, %rsp            # imm = 0x168
retq
nopl (%rax,%rax)