// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_layout_row_template_end
NK_API void
nk_layout_row_template_end(struct nk_context *ctx)
{
    struct nk_window *win;
    struct nk_panel *layout;

    int i = 0;
    int variable_count = 0;
    int min_variable_count = 0;
    float min_fixed_width = 0.0f;
    float total_fixed_width = 0.0f;
    float max_variable_width = 0.0f;

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

    win = ctx->current;
    layout = win->layout;
    NK_ASSERT(layout->row.type == NK_LAYOUT_TEMPLATE);
    if (layout->row.type != NK_LAYOUT_TEMPLATE) return;
    for (i = 0; i < layout->row.columns; ++i) {
        float width = layout->row.templates[i];
        if (width >= 0.0f) {
            total_fixed_width += width;
            min_fixed_width += width;
        } else if (width < -1.0f) {
            width = -width;
            total_fixed_width += width;
            max_variable_width = NK_MAX(max_variable_width, width);
            variable_count++;
        } else {
            min_variable_count++;
            variable_count++;
        }
    }
    if (variable_count) {
        float space = nk_layout_row_calculate_usable_space(&ctx->style, layout->type,
                            layout->bounds.w, layout->row.columns);
        float var_width = (NK_MAX(space-min_fixed_width,0.0f)) / (float)variable_count;
        int enough_space = var_width >= max_variable_width;
        if (!enough_space)
            var_width = (NK_MAX(space-total_fixed_width,0)) / (float)min_variable_count;
        for (i = 0; i < layout->row.columns; ++i) {
            float *width = &layout->row.templates[i];
            *width = (*width >= 0.0f)? *width: (*width < -1.0f && !enough_space)? -(*width): var_width;
        }
    }
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movl $0x0, 0x4c(%rsp)
movl $0x0, 0x48(%rsp)
movl $0x0, 0x44(%rsp)
xorps %xmm0, %xmm0
movss %xmm0, 0x40(%rsp)
xorps %xmm0, %xmm0
movss %xmm0, 0x3c(%rsp)
xorps %xmm0, %xmm0
movss %xmm0, 0x38(%rsp)
cmpq $0x0, 0x60(%rsp)
jne 0x60df7
movq 0x64225(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x505cb(%rip), %rsi     # 0xb13a0
leaq 0x505e2(%rip), %rdx     # 0xb13be
movl $0x5626, %ecx           # imm = 0x5626
movb $0x0, %al
callq 0x13ec0
movq 0x64201(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x60df9
jmp 0x60dfb
movq 0x60(%rsp), %rax
cmpq $0x0, 0x4780(%rax)
jne 0x60e3d
movq 0x641df(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x50585(%rip), %rsi     # 0xb13a0
leaq 0x5059c(%rip), %rdx     # 0xb13be
movl $0x5627, %ecx           # imm = 0x5627
movb $0x0, %al
callq 0x13ec0
movq 0x641bb(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x60e3f
jmp 0x60e41
movq 0x60(%rsp), %rax
movq 0x4780(%rax), %rax
cmpq $0x0, 0xa8(%rax)
jne 0x60e8a
movq 0x64192(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x50538(%rip), %rsi     # 0xb13a0
leaq 0x5054f(%rip), %rdx     # 0xb13be
movl $0x5628, %ecx           # imm = 0x5628
movb $0x0, %al
callq 0x13ec0
movq 0x6416e(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x60e8c
cmpq $0x0, 0x60(%rsp)
je 0x60eb9
movq 0x60(%rsp), %rax
cmpq $0x0, 0x4780(%rax)
je 0x60eb9
movq 0x60(%rsp), %rax
movq 0x4780(%rax), %rax
cmpq $0x0, 0xa8(%rax)
jne 0x60ebe
jmp 0x611fc
movq 0x60(%rsp), %rax
movq 0x4780(%rax), %rax
movq %rax, 0x58(%rsp)
movq 0x58(%rsp), %rax
movq 0xa8(%rax), %rax
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rax
cmpl $0x8, 0x70(%rax)
je 0x60f1e
movq 0x640fe(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x504a4(%rip), %rsi     # 0xb13a0
leaq 0x504bb(%rip), %rdx     # 0xb13be
movl $0x562e, %ecx           # imm = 0x562E
movb $0x0, %al
callq 0x13ec0
movq 0x640da(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x60f20
movq 0x50(%rsp), %rax
cmpl $0x8, 0x70(%rax)
je 0x60f30
jmp 0x611fc
movl $0x0, 0x4c(%rsp)
movl 0x4c(%rsp), %eax
movq 0x50(%rsp), %rcx
cmpl 0x80(%rcx), %eax
jge 0x61045
movq 0x50(%rsp), %rax
movslq 0x4c(%rsp), %rcx
movss 0xb4(%rax,%rcx,4), %xmm0
movss %xmm0, 0x34(%rsp)
movss 0x34(%rsp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jb 0x60f9d
movss 0x34(%rsp), %xmm0
addss 0x3c(%rsp), %xmm0
movss %xmm0, 0x3c(%rsp)
movss 0x34(%rsp), %xmm0
addss 0x40(%rsp), %xmm0
movss %xmm0, 0x40(%rsp)
jmp 0x61033
movss 0x4c553(%rip), %xmm0    # 0xad4f8
ucomiss 0x34(%rsp), %xmm0
jbe 0x6101b
movss 0x34(%rsp), %xmm0
movd %xmm0, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm0
movss %xmm0, 0x34(%rsp)
movss 0x34(%rsp), %xmm0
addss 0x3c(%rsp), %xmm0
movss %xmm0, 0x3c(%rsp)
movss 0x38(%rsp), %xmm1
movss 0x34(%rsp), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x60ff6
movss 0x34(%rsp), %xmm0
movss %xmm0, 0x1c(%rsp)
jmp 0x61002
movss 0x38(%rsp), %xmm0
movss %xmm0, 0x1c(%rsp)
movss 0x1c(%rsp), %xmm0
movss %xmm0, 0x38(%rsp)
movl 0x48(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x48(%rsp)
jmp 0x61031
movl 0x44(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x44(%rsp)
movl 0x48(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x48(%rsp)
jmp 0x61033
jmp 0x61035
movl 0x4c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4c(%rsp)
jmp 0x60f38
cmpl $0x0, 0x48(%rsp)
je 0x611fc
movq 0x60(%rsp), %rdi
addq $0x168, %rdi            # imm = 0x168
movq 0x50(%rsp), %rax
movl (%rax), %esi
movq 0x50(%rsp), %rax
movss 0x10(%rax), %xmm0
movq 0x50(%rsp), %rax
movl 0x80(%rax), %edx
callq 0x61210
movss %xmm0, 0x30(%rsp)
movss 0x30(%rsp), %xmm1
subss 0x40(%rsp), %xmm1
xorps %xmm0, %xmm0
ucomiss %xmm1, %xmm0
jbe 0x610a2
xorps %xmm0, %xmm0
movss %xmm0, 0x18(%rsp)
jmp 0x610b4
movss 0x30(%rsp), %xmm0
subss 0x40(%rsp), %xmm0
movss %xmm0, 0x18(%rsp)
movss 0x18(%rsp), %xmm0
cvtsi2ssl 0x48(%rsp), %xmm1
divss %xmm1, %xmm0
movss %xmm0, 0x2c(%rsp)
movss 0x2c(%rsp), %xmm0
ucomiss 0x38(%rsp), %xmm0
setae %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, 0x28(%rsp)
cmpl $0x0, 0x28(%rsp)
jne 0x6112f
movss 0x30(%rsp), %xmm1
subss 0x3c(%rsp), %xmm1
xorps %xmm0, %xmm0
ucomiss %xmm1, %xmm0
jbe 0x61107
xorps %xmm0, %xmm0
movss %xmm0, 0x14(%rsp)
jmp 0x61119
movss 0x30(%rsp), %xmm0
subss 0x3c(%rsp), %xmm0
movss %xmm0, 0x14(%rsp)
movss 0x14(%rsp), %xmm0
cvtsi2ssl 0x44(%rsp), %xmm1
divss %xmm1, %xmm0
movss %xmm0, 0x2c(%rsp)
movl $0x0, 0x4c(%rsp)
movl 0x4c(%rsp), %eax
movq 0x50(%rsp), %rcx
cmpl 0x80(%rcx), %eax
jge 0x611fa
movq 0x50(%rsp), %rax
addq $0x70, %rax
addq $0x44, %rax
movslq 0x4c(%rsp), %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
movss (%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jb 0x6118c
movq 0x20(%rsp), %rax
movss (%rax), %xmm0
movss %xmm0, 0x10(%rsp)
jmp 0x611db
movq 0x20(%rsp), %rax
movss 0x4c35f(%rip), %xmm0    # 0xad4f8
ucomiss (%rax), %xmm0
jbe 0x611c3
cmpl $0x0, 0x28(%rsp)
jne 0x611c3
movq 0x20(%rsp), %rax
movss (%rax), %xmm0
movd %xmm0, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm0
movss %xmm0, 0xc(%rsp)
jmp 0x611cf
movss 0x2c(%rsp), %xmm0
movss %xmm0, 0xc(%rsp)
movss 0xc(%rsp), %xmm0
movss %xmm0, 0x10(%rsp)
movss 0x10(%rsp), %xmm0
movq 0x20(%rsp), %rax
movss %xmm0, (%rax)
movl 0x4c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4c(%rsp)
jmp 0x61137
jmp 0x611fc
addq $0x68, %rsp
retq
nopw %cs:(%rax,%rax)