// File: /workspace/github_c_makefile_star2_O0/space222[P]silo/./nuklear.h
// Function: nk_widget_fitting
NK_API enum nk_widget_layout_states
nk_widget_fitting(struct nk_rect *bounds, struct nk_context *ctx,
    struct nk_vec2 item_padding)
{
    /* update the bounds to stand without padding  */
    struct nk_window *win;
    struct nk_style *style;
    struct nk_panel *layout;
    enum nk_widget_layout_states state;
    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 NK_WIDGET_INVALID;

    win = ctx->current;
    style = &ctx->style;
    layout = win->layout;
    state = nk_widget(bounds, ctx);

    panel_padding = nk_panel_get_padding(style, layout->type);
    if (layout->row.index == 1) {
        bounds->w += panel_padding.x;
        bounds->x -= panel_padding.x;
    } else bounds->x -= item_padding.x;

    if (layout->row.index == layout->row.columns)
        bounds->w += panel_padding.x;
    else bounds->w += item_padding.x;
    return state;
}

// Assembly:
subq $0x58, %rsp
movlpd %xmm0, 0x4c(%rsp)
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
cmpq $0x0, 0x38(%rsp)
je 0x1b09e
jmp 0x1b0bd
leaq 0x2d47a(%rip), %rdi     # 0x4851f
leaq 0x2a307(%rip), %rsi     # 0x453b3
movl $0x4af3, %edx           # imm = 0x4AF3
leaq 0x2d6fa(%rip), %rcx     # 0x487b2
callq 0x20a0
movq 0x38(%rsp), %rax
cmpq $0x0, 0x3fe8(%rax)
je 0x1b0ce
jmp 0x1b0ed
leaq 0x2be24(%rip), %rdi     # 0x46ef9
leaq 0x2a2d7(%rip), %rsi     # 0x453b3
movl $0x4af4, %edx           # imm = 0x4AF4
leaq 0x2d6ca(%rip), %rcx     # 0x487b2
callq 0x20a0
movq 0x38(%rsp), %rax
movq 0x3fe8(%rax), %rax
cmpq $0x0, 0xa8(%rax)
je 0x1b105
jmp 0x1b124
leaq 0x2bf69(%rip), %rdi     # 0x47075
leaq 0x2a2a0(%rip), %rsi     # 0x453b3
movl $0x4af5, %edx           # imm = 0x4AF5
leaq 0x2d693(%rip), %rcx     # 0x487b2
callq 0x20a0
cmpq $0x0, 0x38(%rsp)
je 0x1b151
movq 0x38(%rsp), %rax
cmpq $0x0, 0x3fe8(%rax)
je 0x1b151
movq 0x38(%rsp), %rax
movq 0x3fe8(%rax), %rax
cmpq $0x0, 0xa8(%rax)
jne 0x1b15e
movl $0x0, 0x54(%rsp)
jmp 0x1b25d
movq 0x38(%rsp), %rax
movq 0x3fe8(%rax), %rax
movq %rax, 0x30(%rsp)
movq 0x38(%rsp), %rax
addq $0x168, %rax            # imm = 0x168
movq %rax, 0x28(%rsp)
movq 0x30(%rsp), %rax
movq 0xa8(%rax), %rax
movq %rax, 0x20(%rsp)
movq 0x40(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x1cd90
movl %eax, 0x1c(%rsp)
movq 0x28(%rsp), %rdi
movq 0x20(%rsp), %rax
movl (%rax), %esi
callq 0x1c630
movlpd %xmm0, 0xc(%rsp)
movq 0xc(%rsp), %rax
movq %rax, 0x14(%rsp)
movq 0x20(%rsp), %rax
cmpl $0x1, 0x74(%rax)
jne 0x1b1fd
movss 0x14(%rsp), %xmm0
movq 0x40(%rsp), %rax
addss 0x8(%rax), %xmm0
movss %xmm0, 0x8(%rax)
movss 0x14(%rsp), %xmm1
movq 0x40(%rsp), %rax
movss (%rax), %xmm0
subss %xmm1, %xmm0
movss %xmm0, (%rax)
jmp 0x1b214
movss 0x4c(%rsp), %xmm1
movq 0x40(%rsp), %rax
movss (%rax), %xmm0
subss %xmm1, %xmm0
movss %xmm0, (%rax)
movq 0x20(%rsp), %rax
movl 0x74(%rax), %eax
movq 0x20(%rsp), %rcx
cmpl 0x80(%rcx), %eax
jne 0x1b240
movss 0x14(%rsp), %xmm0
movq 0x40(%rsp), %rax
addss 0x8(%rax), %xmm0
movss %xmm0, 0x8(%rax)
jmp 0x1b255
movss 0x4c(%rsp), %xmm0
movq 0x40(%rsp), %rax
addss 0x8(%rax), %xmm0
movss %xmm0, 0x8(%rax)
movl 0x1c(%rsp), %eax
movl %eax, 0x54(%rsp)
movl 0x54(%rsp), %eax
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)