// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_panel_begin
NK_LIB nk_bool
nk_panel_begin(struct nk_context *ctx, const char *title, enum nk_panel_type panel_type)
{
    struct nk_input *in;
    struct nk_window *win;
    struct nk_panel *layout;
    struct nk_command_buffer *out;
    const struct nk_style *style;
    const struct nk_user_font *font;

    struct nk_vec2 scrollbar_size;
    struct nk_vec2 panel_padding;

    NK_ASSERT(ctx);
    NK_ASSERT(ctx->current);
    NK_ASSERT(ctx->current->layout);
    if (!ctx || !ctx->current || !ctx->current->layout) return 0;
    nk_zero(ctx->current->layout, sizeof(*ctx->current->layout));
    if ((ctx->current->flags & NK_WINDOW_HIDDEN) || (ctx->current->flags & NK_WINDOW_CLOSED)) {
        nk_zero(ctx->current->layout, sizeof(struct nk_panel));
        ctx->current->layout->type = panel_type;
        return 0;
    }
    /* pull state into local stack */
    style = &ctx->style;
    font = style->font;
    win = ctx->current;
    layout = win->layout;
    out = &win->buffer;
    in = (win->flags & NK_WINDOW_NO_INPUT) ? 0: &ctx->input;
#ifdef NK_INCLUDE_COMMAND_USERDATA
    win->buffer.userdata = ctx->userdata;
#endif
    /* pull style configuration into local stack */
    scrollbar_size = style->window.scrollbar_size;
    panel_padding = nk_panel_get_padding(style, panel_type);

    /* window movement */
    if ((win->flags & NK_WINDOW_MOVABLE) && !(win->flags & NK_WINDOW_ROM)) {
        nk_bool left_mouse_down;
        unsigned int left_mouse_clicked;
        int left_mouse_click_in_cursor;

        /* calculate draggable window space */
        struct nk_rect header;
        header.x = win->bounds.x;
        header.y = win->bounds.y;
        header.w = win->bounds.w;
        if (nk_panel_has_header(win->flags, title)) {
            header.h = font->height + 2.0f * style->window.header.padding.y;
            header.h += 2.0f * style->window.header.label_padding.y;
        } else header.h = panel_padding.y;

        /* window movement by dragging */
        left_mouse_down = in->mouse.buttons[NK_BUTTON_LEFT].down;
        left_mouse_clicked = in->mouse.buttons[NK_BUTTON_LEFT].clicked;
        left_mouse_click_in_cursor = nk_input_has_mouse_click_down_in_rect(in,
            NK_BUTTON_LEFT, header, nk_true);
        if (left_mouse_down && left_mouse_click_in_cursor && !left_mouse_clicked) {
            win->bounds.x = win->bounds.x + in->mouse.delta.x;
            win->bounds.y = win->bounds.y + in->mouse.delta.y;
            in->mouse.buttons[NK_BUTTON_LEFT].clicked_pos.x += in->mouse.delta.x;
            in->mouse.buttons[NK_BUTTON_LEFT].clicked_pos.y += in->mouse.delta.y;
            ctx->style.cursor_active = ctx->style.cursors[NK_CURSOR_MOVE];
        }
    }

    /* setup panel */
    layout->type = panel_type;
    layout->flags = win->flags;
    layout->bounds = win->bounds;
    layout->bounds.x += panel_padding.x;
    layout->bounds.w -= 2*panel_padding.x;
    if (win->flags & NK_WINDOW_BORDER) {
        layout->border = nk_panel_get_border(style, win->flags, panel_type);
        layout->bounds = nk_shrink_rect(layout->bounds, layout->border);
    } else layout->border = 0;
    layout->at_y = layout->bounds.y;
    layout->at_x = layout->bounds.x;
    layout->max_x = 0;
    layout->header_height = 0;
    layout->footer_height = 0;
    nk_layout_reset_min_row_height(ctx);
    layout->row.index = 0;
    layout->row.columns = 0;
    layout->row.ratio = 0;
    layout->row.item_width = 0;
    layout->row.tree_depth = 0;
    layout->row.height = panel_padding.y;
    layout->has_scrolling = nk_true;
    if (!(win->flags & NK_WINDOW_NO_SCROLLBAR))
        layout->bounds.w -= scrollbar_size.x;
    if (!nk_panel_is_nonblock(panel_type)) {
        layout->footer_height = 0;
        if (!(win->flags & NK_WINDOW_NO_SCROLLBAR) || win->flags & NK_WINDOW_SCALABLE)
            layout->footer_height = scrollbar_size.y;
        layout->bounds.h -= layout->footer_height;
    }

    /* panel header */
    if (nk_panel_has_header(win->flags, title))
    {
        struct nk_text text;
        struct nk_rect header;
        const struct nk_style_item *background = 0;

        /* calculate header bounds */
        header.x = win->bounds.x;
        header.y = win->bounds.y;
        header.w = win->bounds.w;
        header.h = font->height + 2.0f * style->window.header.padding.y;
        header.h += (2.0f * style->window.header.label_padding.y);

        /* shrink panel by header */
        layout->header_height = header.h;
        layout->bounds.y += header.h;
        layout->bounds.h -= header.h;
        layout->at_y += header.h;

        /* select correct header background and text color */
        if (ctx->active == win) {
            background = &style->window.header.active;
            text.text = style->window.header.label_active;
        } else if (nk_input_is_mouse_hovering_rect(&ctx->input, header)) {
            background = &style->window.header.hover;
            text.text = style->window.header.label_hover;
        } else {
            background = &style->window.header.normal;
            text.text = style->window.header.label_normal;
        }

        /* draw header background */
        header.h += 1.0f;

        switch(background->type) {
            case NK_STYLE_ITEM_IMAGE:
                text.background = nk_rgba(0,0,0,0);
                nk_draw_image(&win->buffer, header, &background->data.image, nk_white);
                break;
            case NK_STYLE_ITEM_NINE_SLICE:
                text.background = nk_rgba(0, 0, 0, 0);
                nk_draw_nine_slice(&win->buffer, header, &background->data.slice, nk_white);
                break;
            case NK_STYLE_ITEM_COLOR:
                text.background = background->data.color;
                nk_fill_rect(out, header, 0, background->data.color);
                break;
        }

        /* window close button */
        {struct nk_rect button;
        button.y = header.y + style->window.header.padding.y;
        button.h = header.h - 2 * style->window.header.padding.y;
        button.w = button.h;
        if (win->flags & NK_WINDOW_CLOSABLE) {
            nk_flags ws = 0;
            if (style->window.header.align == NK_HEADER_RIGHT) {
                button.x = (header.w + header.x) - (button.w + style->window.header.padding.x);
                header.w -= button.w + style->window.header.spacing.x + style->window.header.padding.x;
            } else {
                button.x = header.x + style->window.header.padding.x;
                header.x += button.w + style->window.header.spacing.x + style->window.header.padding.x;
            }

            if (nk_do_button_symbol(&ws, &win->buffer, button,
                style->window.header.close_symbol, NK_BUTTON_DEFAULT,
                &style->window.header.close_button, in, style->font) && !(win->flags & NK_WINDOW_ROM))
            {
                layout->flags |= NK_WINDOW_HIDDEN;
                layout->flags &= (nk_flags)~NK_WINDOW_MINIMIZED;
            }
        }

        /* window minimize button */
        if (win->flags & NK_WINDOW_MINIMIZABLE) {
            nk_flags ws = 0;
            if (style->window.header.align == NK_HEADER_RIGHT) {
                button.x = (header.w + header.x) - button.w;
                if (!(win->flags & NK_WINDOW_CLOSABLE)) {
                    button.x -= style->window.header.padding.x;
                    header.w -= style->window.header.padding.x;
                }
                header.w -= button.w + style->window.header.spacing.x;
            } else {
                button.x = header.x;
                header.x += button.w + style->window.header.spacing.x + style->window.header.padding.x;
            }
            if (nk_do_button_symbol(&ws, &win->buffer, button, (layout->flags & NK_WINDOW_MINIMIZED)?
                style->window.header.maximize_symbol: style->window.header.minimize_symbol,
                NK_BUTTON_DEFAULT, &style->window.header.minimize_button, in, style->font) && !(win->flags & NK_WINDOW_ROM))
                layout->flags = (layout->flags & NK_WINDOW_MINIMIZED) ?
                    layout->flags & (nk_flags)~NK_WINDOW_MINIMIZED:
                    layout->flags | NK_WINDOW_MINIMIZED;
        }}

        {/* window header title */
        int text_len = nk_strlen(title);
        struct nk_rect label = {0,0,0,0};
        float t = font->width(font->userdata, font->height, title, text_len);
        text.padding = nk_vec2(0,0);

        label.x = header.x + style->window.header.padding.x;
        label.x += style->window.header.label_padding.x;
        label.y = header.y + style->window.header.label_padding.y;
        label.h = font->height + 2 * style->window.header.label_padding.y;
        label.w = t + 2 * style->window.header.spacing.x;
        label.w = NK_CLAMP(0, label.w, header.x + header.w - label.x);
        nk_widget_text(out, label, (const char*)title, text_len, &text, NK_TEXT_LEFT, font);}
    }

    /* draw window background */
    if (!(layout->flags & NK_WINDOW_MINIMIZED) && !(layout->flags & NK_WINDOW_DYNAMIC)) {
        struct nk_rect body;
        body.x = win->bounds.x;
        body.w = win->bounds.w;
        body.y = (win->bounds.y + layout->header_height);
        body.h = (win->bounds.h - layout->header_height);

        switch(style->window.fixed_background.type) {
            case NK_STYLE_ITEM_IMAGE:
                nk_draw_image(out, body, &style->window.fixed_background.data.image, nk_white);
                break;
            case NK_STYLE_ITEM_NINE_SLICE:
                nk_draw_nine_slice(out, body, &style->window.fixed_background.data.slice, nk_white);
                break;
            case NK_STYLE_ITEM_COLOR:
                nk_fill_rect(out, body, 0, style->window.fixed_background.data.color);
                break;
        }
    }

    /* set clipping rectangle */
    {struct nk_rect clip;
    layout->clip = layout->bounds;
    nk_unify(&clip, &win->buffer.clip, layout->clip.x, layout->clip.y,
        layout->clip.x + layout->clip.w, layout->clip.y + layout->clip.h);
    nk_push_scissor(out, clip);
    layout->clip = clip;}
    return !(layout->flags & NK_WINDOW_HIDDEN) && !(layout->flags & NK_WINDOW_MINIMIZED);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
testq %rdi, %rdi
jne 0x3af96
movq 0x4d07f(%rip), %r15     # 0x87ff0
movq (%r15), %rdi
leaq 0x36e11(%rip), %rsi     # 0x71d8c
leaq 0x36e28(%rip), %rdx     # 0x71daa
movl $0x4ced, %ecx           # imm = 0x4CED
xorl %eax, %eax
callq 0x12d80
movq (%r15), %rdi
callq 0x13780
cmpq $0x0, 0x4780(%rbx)
jne 0x3afcc
movq 0x4d049(%rip), %r15     # 0x87ff0
movq (%r15), %rdi
leaq 0x36ddb(%rip), %rsi     # 0x71d8c
leaq 0x36df2(%rip), %rdx     # 0x71daa
movl $0x4cee, %ecx           # imm = 0x4CEE
xorl %eax, %eax
callq 0x12d80
movq (%r15), %rdi
callq 0x13780
movq 0x4780(%rbx), %rax
cmpq $0x0, 0xa8(%rax)
jne 0x3b009
movq 0x4d00c(%rip), %r15     # 0x87ff0
movq (%r15), %rdi
leaq 0x36d9e(%rip), %rsi     # 0x71d8c
leaq 0x36db5(%rip), %rdx     # 0x71daa
movl $0x4cef, %ecx           # imm = 0x4CEF
xorl %eax, %eax
callq 0x12d80
movq (%r15), %rdi
callq 0x13780
xorl %eax, %eax
testq %rbx, %rbx
je 0x3b865
movq 0x4780(%rbx), %rcx
testq %rcx, %rcx
je 0x3b865
movq 0xa8(%rcx), %r15
testq %r15, %r15
je 0x3b865
movq %r15, %r12
andq $0x3, %r12
je 0x3b05f
movl $0x4, %r13d
subq %r12, %r13
movq %r15, %rdi
xorl %esi, %esi
movq %r13, %rdx
callq 0x12b50
orq $0x1cc, %r12            # imm = 0x1CC
addq %r13, %r15
jmp 0x3b065
movl $0x1d0, %r12d           # imm = 0x1D0
movl %ebp, 0x10(%rsp)
movl %r12d, %r13d
andl $-0x4, %r13d
movq %r15, %rdi
xorl %esi, %esi
movq %r13, %rdx
callq 0x12b50
andq $0x3, %r12
je 0x3b093
addq %r13, %r15
movq %r15, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x12b50
movq 0x4780(%rbx), %rbp
movl 0x48(%rbp), %r12d
testl $0x6000, %r12d          # imm = 0x6000
je 0x3b0d3
movq 0xa8(%rbp), %rdi
movl $0x1d0, %esi            # imm = 0x1D0
callq 0x25316
movq 0x4780(%rbx), %rax
movq 0xa8(%rax), %rax
movl 0x10(%rsp), %ecx
movl %ecx, (%rax)
xorl %eax, %eax
jmp 0x3b865
leaq 0x168(%rbx), %rdi
movq 0x168(%rbx), %rax
movq %rax, 0x70(%rsp)
movq 0xa8(%rbp), %r15
movq %r14, %r13
xorl %r14d, %r14d
btl $0xa, %r12d
cmovaeq %rbx, %r14
movss 0x24bc(%rbx), %xmm0
movss %xmm0, 0x60(%rsp)
movss 0x24c0(%rbx), %xmm0
movss %xmm0, 0x40(%rsp)
movl 0x10(%rsp), %esi
callq 0x3fd90
movq %r14, %rsi
movq %r13, %r14
movq %rbp, %r13
movl %r12d, %eax
andl $0x1002, %eax           # imm = 0x1002
cmpl $0x2, %eax
jne 0x3b21e
movss 0x54(%r13), %xmm3
testq %r14, %r14
je 0x3b17c
movl %r12d, %eax
andl $0x58, %eax
je 0x3b17c
movss 0x2408(%rbx), %xmm1
movss 0x2410(%rbx), %xmm2
addss %xmm1, %xmm1
movq 0x70(%rsp), %rax
addss 0x8(%rax), %xmm1
addss %xmm2, %xmm2
addss %xmm1, %xmm2
unpcklps %xmm2, %xmm3            # xmm3 = xmm3[0],xmm2[0],xmm3[1],xmm2[1]
movaps %xmm3, %xmm1
jmp 0x3b183
movaps %xmm0, %xmm1
movss %xmm3, %xmm1            # xmm1 = xmm3[0],xmm1[1,2,3]
movsd 0x4c(%r13), %xmm4
movl 0x104(%rsi), %eax
movb $0x1, %cl
testq %rsi, %rsi
je 0x3b1dc
movss 0x10c(%rsi), %xmm2
ucomiss %xmm4, %xmm2
jb 0x3b1dc
movaps %xmm4, %xmm3
addss %xmm1, %xmm3
ucomiss %xmm2, %xmm3
jbe 0x3b1dc
movss 0x110(%rsi), %xmm2
addps %xmm4, %xmm1
shufps $0x55, %xmm1, %xmm1     # xmm1 = xmm1[1,1,1,1]
movaps %xmm4, %xmm3
shufps $0x55, %xmm4, %xmm3     # xmm3 = xmm3[1,1],xmm4[1,1]
cmpnleps %xmm2, %xmm3
cmpnltps %xmm1, %xmm2
orps %xmm3, %xmm2
movd %xmm2, %edx
cmpl $0x1, %eax
setne %cl
orb %dl, %cl
testl %eax, %eax
je 0x3b21e
testb $0x1, %cl
jne 0x3b21e
cmpl $0x0, 0x108(%rsi)
jne 0x3b21e
movsd 0x154(%rsi), %xmm1
addps %xmm1, %xmm4
movlps %xmm4, 0x4c(%r13)
movsd 0x10c(%rsi), %xmm2
addps %xmm1, %xmm2
movlps %xmm2, 0x10c(%rsi)
movq 0x180(%rbx), %rax
movq %rax, 0x1a8(%rbx)
movl 0x10(%rsp), %ebp
movl %ebp, (%r15)
movl %r12d, 0x4(%r15)
movups 0x4c(%r13), %xmm1
movups %xmm1, 0x8(%r15)
movss 0x8(%r15), %xmm1
addss %xmm0, %xmm1
movss %xmm1, 0x8(%r15)
movss 0x10(%r15), %xmm2
movaps %xmm0, %xmm1
addss %xmm0, %xmm1
subss %xmm1, %xmm2
movss %xmm2, 0x10(%r15)
testb $0x1, 0x48(%r13)
movq %rsi, 0x88(%rsp)
movaps %xmm0, 0x30(%rsp)
jne 0x3b278
movl $0x0, 0x3c(%r15)
jmp 0x3b2f7
movl $0x2490, %eax           # imm = 0x2490
cmpl $0xf, %ebp
jle 0x3b298
cmpl $0x10, %ebp
je 0x3b2a9
cmpl $0x20, %ebp
je 0x3b2b0
cmpl $0x40, %ebp
jne 0x3b2bc
movl $0x249c, %eax           # imm = 0x249C
jmp 0x3b2bc
cmpl $0x2, %ebp
je 0x3b2b7
cmpl $0x4, %ebp
jne 0x3b2bc
movl $0x24a8, %eax           # imm = 0x24A8
jmp 0x3b2bc
movl $0x2498, %eax           # imm = 0x2498
jmp 0x3b2bc
movl $0x2494, %eax           # imm = 0x2494
jmp 0x3b2bc
movl $0x24a0, %eax           # imm = 0x24A0
movss (%rbx,%rax), %xmm0
movss %xmm0, 0x3c(%r15)
movsd 0x8(%r15), %xmm1
movsd 0x10(%r15), %xmm2
movaps %xmm0, %xmm3
unpcklps %xmm0, %xmm3            # xmm3 = xmm3[0],xmm0[0],xmm3[1],xmm0[1]
addps %xmm1, %xmm3
addss %xmm0, %xmm0
shufps $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
movaps %xmm0, %xmm1
maxps %xmm2, %xmm1
subps %xmm0, %xmm1
movlps %xmm3, 0x8(%r15)
movlps %xmm1, 0x10(%r15)
movsd 0x8(%r15), %xmm0
movups %xmm0, 0x28(%r15)
xorl %r12d, %r12d
movl %r12d, 0x38(%r15)
movq %rbx, %rdi
callq 0x13bf0
movl %r12d, 0x74(%r15)
movl %r12d, 0x80(%r15)
movq $0x0, 0x88(%r15)
movl %r12d, 0x90(%r15)
movl %r12d, 0xb0(%r15)
movaps 0x30(%rsp), %xmm0
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
movss %xmm0, 0x78(%r15)
movl $0x1, 0x40(%r15)
movl 0x48(%r13), %eax
testb $0x20, %al
jne 0x3b366
movss 0x10(%r15), %xmm0
subss 0x60(%rsp), %xmm0
movss %xmm0, 0x10(%r15)
testb $-0x10, %bpl
jne 0x3b393
andl $0x24, %eax
xorps %xmm0, %xmm0
cmpl $0x20, %eax
je 0x3b37d
movss 0x40(%rsp), %xmm0
movss %xmm0, 0x34(%r15)
movss 0x14(%r15), %xmm1
subss %xmm0, %xmm1
movss %xmm1, 0x14(%r15)
leaq 0x68(%r13), %r12
testq %r14, %r14
je 0x3b7ed
movl 0x48(%r13), %eax
movl %eax, %ecx
andl $0x58, %ecx
je 0x3b7ed
andl $0x2000, %eax           # imm = 0x2000
jne 0x3b7ed
movsd 0x4c(%r13), %xmm0
movss 0x54(%r13), %xmm5
movss 0x2408(%rbx), %xmm1
movss 0x2410(%rbx), %xmm4
addss %xmm1, %xmm1
movq 0x70(%rsp), %rax
addss 0x8(%rax), %xmm1
addss %xmm4, %xmm4
addss %xmm1, %xmm4
movss %xmm4, 0x38(%r15)
movss 0xc(%r15), %xmm1
addss %xmm4, %xmm1
movss %xmm1, 0xc(%r15)
movss 0x14(%r15), %xmm1
subss %xmm4, %xmm1
movss %xmm1, 0x14(%r15)
movss 0x2c(%r15), %xmm1
addss %xmm4, %xmm1
movss %xmm1, 0x2c(%r15)
movaps %xmm0, %xmm3
shufps $0x55, %xmm0, %xmm3     # xmm3 = xmm3[1,1],xmm0[1,1]
cmpq %r13, 0x4778(%rbx)
movaps %xmm3, 0x60(%rsp)
je 0x3b487
movss 0x144(%rbx), %xmm2
ucomiss %xmm0, %xmm2
jb 0x3b478
movaps %xmm0, %xmm1
addss %xmm5, %xmm1
ucomiss %xmm2, %xmm1
jbe 0x3b478
movss 0x148(%rbx), %xmm2
ucomiss %xmm3, %xmm2
jb 0x3b478
movaps %xmm3, %xmm1
addss %xmm4, %xmm1
ucomiss %xmm2, %xmm1
jbe 0x3b478
leaq 0x21e8(%rbx), %rsi
movl 0x23f8(%rbx), %eax
jmp 0x3b494
leaq 0x21c0(%rbx), %rsi
movl 0x23f4(%rbx), %eax
jmp 0x3b494
leaq 0x2210(%rbx), %rsi
movl 0x23fc(%rbx), %eax
movl %eax, 0x5c(%rsp)
addss 0x33414(%rip), %xmm4    # 0x6e8b4
movaps %xmm4, %xmm1
movlhps %xmm5, %xmm1            # xmm1 = xmm1[0],xmm5[0]
shufps $0xe2, %xmm5, %xmm1     # xmm1 = xmm1[2,0],xmm5[2,3]
movl (%rsi), %eax
testl %eax, %eax
movaps %xmm0, 0x10(%rsp)
movaps %xmm1, 0x30(%rsp)
movaps %xmm5, 0x90(%rsp)
je 0x3b511
cmpl $0x2, %eax
je 0x3b4f1
cmpl $0x1, %eax
jne 0x3b532
movl $0x0, 0x58(%rsp)
addq $0x8, %rsi
movq %r12, %rdi
movaps 0x30(%rsp), %xmm1
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movaps %xmm4, 0x40(%rsp)
callq 0x134d0
jmp 0x3b528
movl $0x0, 0x58(%rsp)
addq $0x8, %rsi
movq %r12, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movaps %xmm4, 0x40(%rsp)
callq 0x13fe0
jmp 0x3b528
movl 0x8(%rsi), %esi
movl %esi, 0x58(%rsp)
xorps %xmm2, %xmm2
movq %r12, %rdi
movaps %xmm4, 0x40(%rsp)
callq 0x12de0
movaps 0x40(%rsp), %xmm4
movaps 0x10(%rsp), %xmm0
movss 0x2408(%rbx), %xmm1
movaps 0x60(%rsp), %xmm3
addss %xmm1, %xmm3
shufps $0x0, %xmm3, %xmm3      # xmm3 = xmm3[0,0,0,0]
addss %xmm1, %xmm1
subss %xmm1, %xmm4
movaps %xmm4, %xmm1
shufps $0x0, %xmm4, %xmm1      # xmm1 = xmm1[0,0],xmm4[0,0]
testb $0x8, 0x48(%r13)
je 0x3b65d
movl $0x0, 0x2c(%rsp)
cmpl $0x1, 0x2400(%rbx)
movaps %xmm4, 0x40(%rsp)
jne 0x3b5be
movaps 0x90(%rsp), %xmm6
addss %xmm6, %xmm0
movss 0x2404(%rbx), %xmm5
movaps %xmm4, %xmm2
addss %xmm5, %xmm2
subss %xmm2, %xmm0
movss %xmm0, %xmm3            # xmm3 = xmm0[0],xmm3[1,2,3]
movss 0x2414(%rbx), %xmm0
addss %xmm4, %xmm0
addss %xmm5, %xmm0
subss %xmm0, %xmm6
movaps 0x30(%rsp), %xmm0
movss %xmm6, %xmm0            # xmm0 = xmm6[0],xmm0[1,2,3]
movaps %xmm0, 0x30(%rsp)
jmp 0x3b5ea
movss 0x2404(%rbx), %xmm2
movaps %xmm0, %xmm5
addss %xmm2, %xmm5
movss %xmm5, %xmm3            # xmm3 = xmm5[0],xmm3[1,2,3]
movss 0x2414(%rbx), %xmm5
addss %xmm4, %xmm5
addss %xmm2, %xmm5
addss %xmm5, %xmm0
movaps %xmm0, 0x10(%rsp)
movl 0x23e8(%rbx), %edx
leaq 0x2238(%rbx), %r8
movq 0x168(%rbx), %rax
movq %rax, (%rsp)
leaq 0x2c(%rsp), %rdi
movq %r12, %rsi
movaps %xmm3, 0x60(%rsp)
movaps %xmm3, %xmm0
movaps %xmm1, 0x90(%rsp)
xorl %ecx, %ecx
movq 0x88(%rsp), %r9
callq 0x40888
testl %eax, %eax
je 0x3b646
testb $0x10, 0x49(%r13)
jne 0x3b646
movl $0xffff5fff, %eax       # imm = 0xFFFF5FFF
andl 0x4(%r15), %eax
orl $0x2000, %eax           # imm = 0x2000
movl %eax, 0x4(%r15)
movaps 0x10(%rsp), %xmm0
movaps 0x60(%rsp), %xmm3
movaps 0x40(%rsp), %xmm4
movaps 0x90(%rsp), %xmm1
movl 0x48(%r13), %eax
testb $0x10, %al
movq %r12, 0xa0(%rsp)
jne 0x3b677
movaps %xmm0, 0x10(%rsp)
jmp 0x3b747
movl $0x0, 0x2c(%rsp)
cmpl $0x1, 0x2400(%rbx)
movaps 0x30(%rsp), %xmm5
jne 0x3b6db
movaps %xmm0, %xmm2
addss %xmm5, %xmm2
subss %xmm4, %xmm2
movss %xmm2, %xmm3            # xmm3 = xmm2[0],xmm3[1,2,3]
testb $0x8, %al
jne 0x3b6c3
movss 0x2404(%rbx), %xmm5
subss %xmm5, %xmm2
movss %xmm2, %xmm3            # xmm3 = xmm2[0],xmm3[1,2,3]
movaps 0x30(%rsp), %xmm2
subss %xmm5, %xmm2
movaps %xmm2, 0x30(%rsp)
movaps 0x30(%rsp), %xmm5
movaps %xmm0, 0x10(%rsp)
addss 0x2414(%rbx), %xmm4
subss %xmm4, %xmm5
movaps %xmm5, 0x30(%rsp)
jmp 0x3b6fc
shufps $0x1, %xmm0, %xmm3      # xmm3 = xmm3[1,0],xmm0[0,0]
addss 0x2414(%rbx), %xmm4
shufps $0xe2, %xmm0, %xmm3     # xmm3 = xmm3[2,0],xmm0[2,3]
addss 0x2404(%rbx), %xmm4
addss %xmm4, %xmm0
movaps %xmm0, 0x10(%rsp)
movzwl 0x4(%r15), %eax
shrl $0xf, %eax
movl 0x23ec(%rbx,%rax,4), %edx
leaq 0x2310(%rbx), %r8
movq 0x168(%rbx), %rax
movq %rax, (%rsp)
leaq 0x2c(%rsp), %rdi
movq %r12, %rsi
movaps %xmm3, %xmm0
xorl %ecx, %ecx
movq 0x88(%rsp), %r9
callq 0x40888
testl %eax, %eax
je 0x3b747
testb $0x10, 0x49(%r13)
jne 0x3b747
xorb $-0x80, 0x5(%r15)
movq %r14, %rdi
callq 0x12f10
movl %eax, %ebp
movq 0x70(%rsp), %r12
movss 0x8(%r12), %xmm0
movq (%r12), %rdi
movq %r14, %rsi
movl %eax, %edx
callq *0x10(%r12)
leaq 0x50(%rsp), %rcx
movq $0x0, (%rcx)
movsd 0x240c(%rbx), %xmm3
movaps 0x10(%rsp), %xmm1
movaps %xmm1, %xmm2
addss 0x2404(%rbx), %xmm2
addps %xmm3, %xmm2
shufps $0x55, %xmm3, %xmm3     # xmm3 = xmm3[1,1,1,1]
addss %xmm3, %xmm3
addss 0x8(%r12), %xmm3
movss 0x2414(%rbx), %xmm4
addss %xmm4, %xmm4
addss %xmm0, %xmm4
movaps 0x30(%rsp), %xmm0
addss %xmm1, %xmm0
subss %xmm2, %xmm0
minss %xmm0, %xmm4
xorps %xmm1, %xmm1
maxss %xmm4, %xmm1
unpcklps %xmm3, %xmm1            # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
movq 0xa0(%rsp), %rdi
movaps %xmm2, %xmm0
movq %r14, %rsi
movl %ebp, %edx
movl $0x11, %r8d
movq %r12, %r9
movq %rdi, %r12
callq 0x45d79
leaq 0x8(%r15), %r14
testb $-0x78, 0x5(%r15)
je 0x3b877
movups (%r14), %xmm0
movups %xmm0, 0x44(%r15)
movsd 0x44(%r15), %xmm0
movsd 0x4c(%r15), %xmm2
addps %xmm0, %xmm2
movsd 0x70(%r13), %xmm3
movsd 0x78(%r13), %xmm1
maxps %xmm3, %xmm0
movaps %xmm0, 0x10(%rsp)
addps %xmm3, %xmm1
minps %xmm2, %xmm1
subps %xmm0, %xmm1
xorps %xmm2, %xmm2
maxps %xmm2, %xmm1
movaps %xmm1, 0x70(%rsp)
movq %r12, %rdi
callq 0x13a50
movaps 0x10(%rsp), %xmm0
unpcklpd 0x70(%rsp), %xmm0       # xmm0 = xmm0[0],mem[0]
movups %xmm0, 0x44(%r15)
movl 0x4(%r15), %ecx
xorl %eax, %eax
testw %cx, %cx
setns %al
xorl %edx, %edx
btl $0xd, %ecx
cmovbl %edx, %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movss 0x38(%r15), %xmm2
movss 0x50(%r13), %xmm1
addss %xmm2, %xmm1
movss 0x4c(%r13), %xmm0
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movss 0x54(%r13), %xmm1
movss 0x58(%r13), %xmm3
subss %xmm2, %xmm3
unpcklps %xmm3, %xmm1            # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
movl 0x2420(%rbx), %eax
testl %eax, %eax
je 0x3b8f3
cmpl $0x2, %eax
je 0x3b8d7
cmpl $0x1, %eax
jne 0x3b7f8
addq $0x2428, %rbx           # imm = 0x2428
movq %r12, %rdi
movq %rbx, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x134d0
jmp 0x3b7f8
addq $0x2428, %rbx           # imm = 0x2428
movq %r12, %rdi
movq %rbx, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x13fe0
jmp 0x3b7f8
movl 0x2428(%rbx), %esi
xorps %xmm2, %xmm2
movq %r12, %rdi
callq 0x12de0
jmp 0x3b7f8