// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_do_progress
NK_LIB nk_size
nk_do_progress(nk_flags *state,
    struct nk_command_buffer *out, struct nk_rect bounds,
    nk_size value, nk_size max, nk_bool modifiable,
    const struct nk_style_progress *style, struct nk_input *in)
{
    float prog_scale;
    nk_size prog_value;
    struct nk_rect cursor;

    NK_ASSERT(style);
    NK_ASSERT(out);
    if (!out || !style) return 0;

    /* calculate progressbar cursor */
    cursor.w = NK_MAX(bounds.w, 2 * style->padding.x + 2 * style->border);
    cursor.h = NK_MAX(bounds.h, 2 * style->padding.y + 2 * style->border);
    cursor = nk_pad_rect(bounds, nk_vec2(style->padding.x + style->border, style->padding.y + style->border));
    prog_scale = (float)value / (float)max;

    /* update progressbar */
    prog_value = NK_MIN(value, max);
    prog_value = nk_progress_behavior(state, in, bounds, cursor,max, prog_value, modifiable);
    cursor.w = cursor.w * prog_scale;

    /* draw progressbar */
    if (style->draw_begin) style->draw_begin(out, style->userdata);
    nk_draw_progress(out, *state, style, &bounds, &cursor, value, max);
    if (style->draw_end) style->draw_end(out, style->userdata);
    return prog_value;
}

// Assembly:
subq $0xb8, %rsp
movq 0xc0(%rsp), %rax
movlpd %xmm0, 0xa0(%rsp)
movlpd %xmm1, 0xa8(%rsp)
movq %rdi, 0x98(%rsp)
movq %rsi, 0x90(%rsp)
movq %rdx, 0x88(%rsp)
movq %rcx, 0x80(%rsp)
movl %r8d, 0x7c(%rsp)
movq %r9, 0x70(%rsp)
cmpq $0x0, 0x70(%rsp)
jne 0x6f0e6
movq 0x55f36(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x422dc(%rip), %rsi     # 0xb13a0
leaq 0x422f3(%rip), %rdx     # 0xb13be
movl $0x64f2, %ecx           # imm = 0x64F2
movb $0x0, %al
callq 0x13ec0
movq 0x55f12(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x6f0e8
jmp 0x6f0ea
cmpq $0x0, 0x90(%rsp)
jne 0x6f128
movq 0x55ef4(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x4229a(%rip), %rsi     # 0xb13a0
leaq 0x422b1(%rip), %rdx     # 0xb13be
movl $0x64f3, %ecx           # imm = 0x64F3
movb $0x0, %al
callq 0x13ec0
movq 0x55ed0(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x6f12a
cmpq $0x0, 0x90(%rsp)
je 0x6f13d
cmpq $0x0, 0x70(%rsp)
jne 0x6f14e
movq $0x0, 0xb0(%rsp)
jmp 0x6f49f
movss 0xa8(%rsp), %xmm1
movq 0x70(%rsp), %rax
movss 0x10c(%rax), %xmm0
movq 0x70(%rsp), %rax
movss 0x3e373(%rip), %xmm2    # 0xad4e4
mulss 0x100(%rax), %xmm2
addss %xmm0, %xmm0
addss %xmm2, %xmm0
ucomiss %xmm1, %xmm0
jbe 0x6f1b8
movq 0x70(%rsp), %rax
movss 0x10c(%rax), %xmm0
movq 0x70(%rsp), %rax
movss 0x3e344(%rip), %xmm1    # 0xad4e4
mulss 0x100(%rax), %xmm1
addss %xmm0, %xmm0
addss %xmm1, %xmm0
movss %xmm0, 0x34(%rsp)
jmp 0x6f1c7
movss 0xa8(%rsp), %xmm0
movss %xmm0, 0x34(%rsp)
movss 0x34(%rsp), %xmm0
movss %xmm0, 0x58(%rsp)
movss 0xac(%rsp), %xmm1
movq 0x70(%rsp), %rax
movss 0x110(%rax), %xmm0
movq 0x70(%rsp), %rax
movss 0x3e2ee(%rip), %xmm2    # 0xad4e4
mulss 0x100(%rax), %xmm2
addss %xmm0, %xmm0
addss %xmm2, %xmm0
ucomiss %xmm1, %xmm0
jbe 0x6f23d
movq 0x70(%rsp), %rax
movss 0x110(%rax), %xmm0
movq 0x70(%rsp), %rax
movss 0x3e2bf(%rip), %xmm1    # 0xad4e4
mulss 0x100(%rax), %xmm1
addss %xmm0, %xmm0
addss %xmm1, %xmm0
movss %xmm0, 0x30(%rsp)
jmp 0x6f24c
movss 0xac(%rsp), %xmm0
movss %xmm0, 0x30(%rsp)
movss 0x30(%rsp), %xmm0
movss %xmm0, 0x5c(%rsp)
movq 0x70(%rsp), %rax
movss 0x100(%rax), %xmm2
movss 0x10c(%rax), %xmm0
addss %xmm2, %xmm0
movss 0x110(%rax), %xmm1
addss %xmm2, %xmm1
callq 0x13460
movlpd %xmm0, 0x38(%rsp)
movsd 0xa0(%rsp), %xmm0
movsd 0xa8(%rsp), %xmm1
movsd 0x38(%rsp), %xmm2
callq 0x8b010
movlpd %xmm0, 0x40(%rsp)
movlpd %xmm1, 0x48(%rsp)
movups 0x40(%rsp), %xmm0
movaps %xmm0, 0x50(%rsp)
movq 0x88(%rsp), %rax
movq %rax, %rdx
shrq %rdx
movl %eax, %ecx
andl $0x1, %ecx
orq %rdx, %rcx
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
cvtsi2ss %rax, %xmm1
movss %xmm1, 0x28(%rsp)
testq %rax, %rax
movss %xmm0, 0x2c(%rsp)
js 0x6f2fc
movss 0x28(%rsp), %xmm0
movss %xmm0, 0x2c(%rsp)
movss 0x2c(%rsp), %xmm0
movss %xmm0, 0x1c(%rsp)
movq 0x80(%rsp), %rax
movq %rax, %rdx
shrq %rdx
movl %eax, %ecx
andl $0x1, %ecx
orq %rdx, %rcx
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
cvtsi2ss %rax, %xmm1
movss %xmm1, 0x20(%rsp)
testq %rax, %rax
movss %xmm0, 0x24(%rsp)
js 0x6f349
movss 0x20(%rsp), %xmm0
movss %xmm0, 0x24(%rsp)
movss 0x1c(%rsp), %xmm0
movss 0x24(%rsp), %xmm1
divss %xmm1, %xmm0
movss %xmm0, 0x6c(%rsp)
movq 0x88(%rsp), %rax
cmpq 0x80(%rsp), %rax
jae 0x6f380
movq 0x88(%rsp), %rax
movq %rax, 0x10(%rsp)
jmp 0x6f38d
movq 0x80(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x98(%rsp), %rdi
movq 0xc0(%rsp), %rsi
movq 0x80(%rsp), %rdx
movq 0x60(%rsp), %rcx
movl 0x7c(%rsp), %r8d
movsd 0xa0(%rsp), %xmm0
movsd 0xa8(%rsp), %xmm1
movsd 0x50(%rsp), %xmm2
movsd 0x58(%rsp), %xmm3
callq 0x8b130
movq %rax, 0x60(%rsp)
movss 0x58(%rsp), %xmm0
mulss 0x6c(%rsp), %xmm0
movss %xmm0, 0x58(%rsp)
movq 0x70(%rsp), %rax
cmpq $0x0, 0x128(%rax)
je 0x6f424
movq 0x70(%rsp), %rax
movq 0x128(%rax), %rax
movq 0x90(%rsp), %rdi
movq 0x70(%rsp), %rcx
movq 0x120(%rcx), %rsi
callq *%rax
movq 0x90(%rsp), %rdi
movq 0x98(%rsp), %rax
movl (%rax), %esi
movq 0x70(%rsp), %rdx
movq 0x88(%rsp), %r9
movq 0x80(%rsp), %rax
leaq 0xa0(%rsp), %rcx
leaq 0x50(%rsp), %r8
movq %rax, (%rsp)
callq 0x8b610
movq 0x70(%rsp), %rax
cmpq $0x0, 0x130(%rax)
je 0x6f492
movq 0x70(%rsp), %rax
movq 0x130(%rax), %rax
movq 0x90(%rsp), %rdi
movq 0x70(%rsp), %rcx
movq 0x120(%rcx), %rsi
callq *%rax
movq 0x60(%rsp), %rax
movq %rax, 0xb0(%rsp)
movq 0xb0(%rsp), %rax
addq $0xb8, %rsp
retq
nop