// File: /workspace/github_c_makefile_star2_O2/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_group_scrolled_offset_begin
NK_API nk_bool
nk_group_scrolled_offset_begin(struct nk_context *ctx,
    nk_uint *x_offset, nk_uint *y_offset, const char *title, nk_flags flags)
{
    struct nk_rect bounds;
    struct nk_window panel;
    struct nk_window *win;

    win = ctx->current;
    nk_panel_alloc_space(&bounds, ctx);
    {const struct nk_rect *c = &win->layout->clip;
    if (!NK_INTERSECT(c->x, c->y, c->w, c->h, bounds.x, bounds.y, bounds.w, bounds.h) &&
        !(flags & NK_WINDOW_MOVABLE)) {
        return 0;
    }}
    if (win->flags & NK_WINDOW_ROM)
        flags |= NK_WINDOW_ROM;

    /* initialize a fake window to create the panel from */
    nk_zero(&panel, sizeof(panel));
    panel.bounds = bounds;
    panel.flags = flags;
    panel.scrollbar.x = *x_offset;
    panel.scrollbar.y = *y_offset;
    panel.buffer = win->buffer;
    panel.layout = (struct nk_panel*)nk_create_panel(ctx);
    ctx->current = &panel;
    nk_panel_begin(ctx, (flags & NK_WINDOW_TITLE) ? title: 0, NK_PANEL_GROUP);

    win->buffer = panel.buffer;
    win->buffer.clip = panel.layout->clip;
    panel.layout->offset_x = x_offset;
    panel.layout->offset_y = y_offset;
    panel.layout->parent = win->layout;
    win->layout = panel.layout;

    ctx->current = win;
    if ((panel.layout->flags & NK_WINDOW_CLOSED) ||
        (panel.layout->flags & NK_WINDOW_MINIMIZED))
    {
        nk_flags f = panel.layout->flags;
        nk_group_scrolled_end(ctx);
        if (f & NK_WINDOW_CLOSED)
            return NK_WINDOW_CLOSED;
        if (f & NK_WINDOW_MINIMIZED)
            return NK_WINDOW_MINIMIZED;
    }
    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movl %r8d, %ebp
movq %rcx, %r12
movq %rdx, %r15
movq %rsi, 0x20(%rsp)
movq %rdi, %rbx
movq 0x4780(%rdi), %r14
leaq 0x10(%rsp), %r13
movq %r13, %rdi
movq %rbx, %rsi
callq 0x3e99a
movq 0xa8(%r14), %rax
movss (%r13), %xmm0
movss 0x44(%rax), %xmm1
movss 0x4c(%rax), %xmm2
addss %xmm1, %xmm2
ucomiss %xmm0, %xmm2
jbe 0x3f7bb
addss 0x18(%rsp), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x3f7bb
movss 0x14(%rsp), %xmm0
movss 0x48(%rax), %xmm1
movss 0x50(%rax), %xmm2
addss %xmm1, %xmm2
ucomiss %xmm0, %xmm2
jbe 0x3f7bb
testb $0x2, %bpl
jne 0x3f7c1
addss 0x1c(%rsp), %xmm0
ucomiss %xmm1, %xmm0
ja 0x3f7c1
xorl %ebp, %ebp
jmp 0x3f902
testb $0x2, %bpl
je 0x3f7b4
movl %ebp, %eax
movl %ebp, 0xc(%rsp)
movq %r12, %rbp
movq %r15, %r12
movl $0x1000, %r15d          # imm = 0x1000
andl 0x48(%r14), %r15d
orl %eax, %r15d
leaq 0x28(%rsp), %r13
movl $0x1e0, %esi            # imm = 0x1E0
movq %r13, %rdi
callq 0x23ed0
movups 0x10(%rsp), %xmm0
movups %xmm0, 0x4c(%r13)
movl %r15d, 0x48(%r13)
movq 0x20(%rsp), %r15
movl (%r15), %eax
movl %eax, 0x5c(%r13)
movl (%r12), %eax
movl %eax, 0x60(%r13)
movups 0x68(%r14), %xmm0
movups 0x78(%r14), %xmm1
movups 0x88(%r14), %xmm2
movups 0x98(%r14), %xmm3
movups %xmm3, 0x98(%r13)
movups %xmm2, 0x88(%r13)
movups %xmm1, 0x78(%r13)
movups %xmm0, 0x68(%r13)
movq %rbx, %rdi
callq 0x37500
movq %rax, 0xa8(%r13)
movq %r13, 0x4780(%rbx)
xorl %eax, %eax
testb $0x40, 0xc(%rsp)
cmoveq %rax, %rbp
pushq $0x2
popq %rdx
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x37520
movups 0x68(%r13), %xmm0
movups 0x78(%r13), %xmm1
movups 0x88(%r13), %xmm2
movups 0x98(%r13), %xmm3
movups %xmm3, 0x98(%r14)
movups %xmm2, 0x88(%r14)
movups %xmm1, 0x78(%r14)
movups %xmm0, 0x68(%r14)
movq 0xa8(%r13), %rax
movups 0x44(%rax), %xmm0
movups %xmm0, 0x70(%r14)
movq %r15, 0x18(%rax)
movq %r12, 0x20(%rax)
movq 0xa8(%r14), %rcx
movq %rcx, 0x1c8(%rax)
movq %rax, 0xa8(%r14)
movq %r14, 0x4780(%rbx)
movl 0x4(%rax), %eax
testw $0xc000, %ax            # imm = 0xC000
je 0x3f8ff
xorl %ebp, %ebp
btl $0xe, %eax
setae %bpl
movq %rbx, %rdi
callq 0x12170
shll $0xe, %ebp
addl $0x4000, %ebp           # imm = 0x4000
jmp 0x3f902
pushq $0x1
popq %rbp
movl %ebp, %eax
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq