// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_layout_row
NK_API void
nk_layout_row(struct nk_context *ctx, enum nk_layout_format fmt,
    float height, int cols, const float *ratio)
{
    int i;
    int n_undef = 0;
    struct nk_window *win;
    struct nk_panel *layout;

    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_panel_layout(ctx, win, height, cols);
    if (fmt == NK_DYNAMIC) {
        /* calculate width of undefined widget ratios */
        float r = 0;
        layout->row.ratio = ratio;
        for (i = 0; i < cols; ++i) {
            if (ratio[i] < 0.0f)
                n_undef++;
            else r += ratio[i];
        }
        r = NK_SATURATE(1.0f - r);
        layout->row.type = NK_LAYOUT_DYNAMIC;
        layout->row.item_width = (r > 0 && n_undef > 0) ? (r / (float)n_undef):0;
    } else {
        layout->row.ratio = ratio;
        layout->row.type = NK_LAYOUT_STATIC;
        layout->row.item_width = 0;
        layout->row.item_offset = 0;
    }
    layout->row.item_offset = 0;
    layout->row.filled = 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %rbx
movl %edx, %ebp
movss %xmm0, 0xc(%rsp)
movl %esi, %r14d
movq %rdi, %r15
testq %rdi, %rdi
jne 0x40f48
movq 0x460cf(%rip), %r12     # 0x86ff0
movq (%r12), %rdi
leaq 0x2fe70(%rip), %rsi     # 0x70d9c
leaq 0x2fe87(%rip), %rdx     # 0x70dba
movl $0x55a4, %ecx           # imm = 0x55A4
xorl %eax, %eax
callq 0x12d80
movq (%r12), %rdi
callq 0x13780
movq 0x4780(%r15), %rsi
testq %rsi, %rsi
jne 0x40f89
movq 0x46095(%rip), %r12     # 0x86ff0
movq (%r12), %rdi
leaq 0x2fe36(%rip), %rsi     # 0x70d9c
leaq 0x2fe4d(%rip), %rdx     # 0x70dba
movl $0x55a5, %ecx           # imm = 0x55A5
xorl %eax, %eax
callq 0x12d80
movq (%r12), %rdi
callq 0x13780
movq 0x4780(%r15), %rsi
cmpq $0x0, 0xa8(%rsi)
jne 0x40fd1
movq 0x46056(%rip), %r12     # 0x86ff0
movq (%r12), %rdi
leaq 0x2fdf7(%rip), %rsi     # 0x70d9c
leaq 0x2fe0e(%rip), %rdx     # 0x70dba
movl $0x55a6, %ecx           # imm = 0x55A6
xorl %eax, %eax
callq 0x12d80
movq (%r12), %rdi
callq 0x13780
movq 0x4780(%r15), %rsi
testq %rsi, %rsi
je 0x4109a
movq 0xa8(%rsi), %r12
testq %r12, %r12
je 0x4109a
movq %r15, %rdi
movss 0xc(%rsp), %xmm0
movl %ebp, %edx
callq 0x40a2e
movq %rbx, 0x88(%r12)
testl %r14d, %r14d
je 0x4100c
movl $0x7, 0x70(%r12)
xorps %xmm1, %xmm1
jmp 0x41084
xorps %xmm0, %xmm0
testl %ebp, %ebp
jle 0x41042
movl %ebp, %ecx
xorl %edx, %edx
xorps %xmm2, %xmm2
xorps %xmm1, %xmm1
xorl %eax, %eax
movss (%rbx,%rdx,4), %xmm3
xorl %esi, %esi
ucomiss %xmm3, %xmm2
seta %dil
ja 0x41033
addss %xmm3, %xmm1
movb %dil, %sil
addl %esi, %eax
incq %rdx
cmpq %rdx, %rcx
jne 0x4101f
jmp 0x41047
xorl %eax, %eax
xorps %xmm1, %xmm1
movss 0x2c855(%rip), %xmm2    # 0x6d8a4
movaps %xmm2, %xmm3
subss %xmm1, %xmm3
minss %xmm3, %xmm2
movl $0x3, 0x70(%r12)
xorps %xmm1, %xmm1
cmpltss %xmm2, %xmm1
testl %eax, %eax
jle 0x41081
xorps %xmm3, %xmm3
cvtsi2ss %eax, %xmm3
maxss %xmm0, %xmm2
divss %xmm3, %xmm2
movaps %xmm2, %xmm0
andps %xmm0, %xmm1
movss %xmm1, 0x90(%r12)
movq $0x0, 0x98(%r12)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq