LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/0x0203[P]schack_poc/./nuklear.h
// Function: nk_button_behavior
NK_LIB int
nk_button_behavior(nk_flags *state, struct nk_rect r,
    const struct nk_input *i, enum nk_button_behavior behavior)
{
    int ret = 0;
    nk_widget_state_reset(state);
    if (!i) return 0;
    if (nk_input_is_mouse_hovering_rect(i, r)) {
        *state = NK_WIDGET_STATE_HOVERED;
        if (nk_input_is_mouse_down(i, NK_BUTTON_LEFT))
            *state = NK_WIDGET_STATE_ACTIVE;
        if (nk_input_has_mouse_click_in_rect(i, NK_BUTTON_LEFT, r)) {
            ret = (behavior != NK_BUTTON_DEFAULT) ?
                nk_input_is_mouse_down(i, NK_BUTTON_LEFT):
#ifdef NK_BUTTON_TRIGGER_ON_RELEASE
                nk_input_is_mouse_released(i, NK_BUTTON_LEFT);
#else
                nk_input_is_mouse_pressed(i, NK_BUTTON_LEFT);
#endif
        }
    }
    if (*state & NK_WIDGET_STATE_HOVER && !nk_input_is_mouse_prev_hovering_rect(i, r))
        *state |= NK_WIDGET_STATE_ENTERED;
    else if (nk_input_is_mouse_prev_hovering_rect(i, r))
        *state |= NK_WIDGET_STATE_LEFT;
    return ret;
}

// Assembly:
movl (%rdi), %eax
andl $0x2, %eax
orl $0x4, %eax
movl %eax, (%rdi)
testq %rsi, %rsi
je 0x1e107
movss 0x144(%rsi), %xmm3
xorl %eax, %eax
ucomiss %xmm0, %xmm3
movaps %xmm1, %xmm2
addss %xmm0, %xmm2
jb 0x1e0c8
ucomiss %xmm3, %xmm2
jbe 0x1e0c8
movaps %xmm0, %xmm3
shufps $0x55, %xmm0, %xmm3     # xmm3 = xmm3[1,1],xmm0[1,1]
movss 0x148(%rsi), %xmm5
ucomiss %xmm3, %xmm5
jb 0x1e0c8
movaps %xmm0, %xmm4
addps %xmm1, %xmm4
shufps $0x55, %xmm4, %xmm4     # xmm4 = xmm4[1,1,1,1]
ucomiss %xmm5, %xmm4
jbe 0x1e0c8
movl $0x12, (%rdi)
xorl %ecx, %ecx
cmpl $0x0, 0x104(%rsi)
setne %cl
shll $0x4, %ecx
addl $0x12, %ecx
movl %ecx, (%rdi)
movss 0x10c(%rsi), %xmm5
ucomiss %xmm0, %xmm5
jb 0x1e0c8
ucomiss %xmm5, %xmm2
jbe 0x1e0c8
movss 0x110(%rsi), %xmm5
ucomiss %xmm3, %xmm5
jb 0x1e0c8
ucomiss %xmm5, %xmm4
jbe 0x1e0c8
movl 0x104(%rsi), %eax
testl %edx, %edx
jne 0x1e0c8
testl %eax, %eax
je 0x1e0c6
movl $0x1, %eax
cmpl $0x0, 0x108(%rsi)
jne 0x1e0c8
xorl %eax, %eax
movl (%rdi), %ecx
testb $0x10, %cl
jne 0x1e10a
movss 0x14c(%rsi), %xmm3
ucomiss %xmm0, %xmm3
jb 0x1e106
ucomiss %xmm3, %xmm2
jbe 0x1e106
movaps %xmm0, %xmm3
shufps $0x55, %xmm0, %xmm3     # xmm3 = xmm3[1,1],xmm0[1,1]
movss 0x150(%rsi), %xmm2
ucomiss %xmm3, %xmm2
jb 0x1e106
addps %xmm1, %xmm0
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
movl $0x40, %edx
ucomiss %xmm2, %xmm0
ja 0x1e144
retq
xorl %eax, %eax
retq
movss 0x14c(%rsi), %xmm3
ucomiss %xmm0, %xmm3
movl $0x8, %edx
jb 0x1e144
ucomiss %xmm3, %xmm2
jbe 0x1e144
movaps %xmm0, %xmm4
shufps $0x55, %xmm0, %xmm4     # xmm4 = xmm4[1,1],xmm0[1,1]
movss 0x150(%rsi), %xmm3
ucomiss %xmm4, %xmm3
jb 0x1e144
movaps %xmm0, %xmm4
addps %xmm1, %xmm4
shufps $0x55, %xmm4, %xmm4     # xmm4 = xmm4[1,1,1,1]
ucomiss %xmm3, %xmm4
ja 0x1e0cf
orl %edx, %ecx
movl %ecx, (%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/0x0203[P]schack_poc/./nuklear_xlib.h
// Function: nk_xsurf_image_free
void
nk_xsurf_image_free(struct nk_image* image)
{
    XSurface *surf = xlib.surf;
    XImageWithAlpha *aimage = image->handle.ptr;
    if (!aimage) return;
    XDestroyImage(aimage->ximage);
    XFreePixmap(surf->dpy, aimage->clipMask);
    XFreeGC(surf->dpy, aimage->clipMaskGC);
    free(aimage);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq (%rdi), %rbx
testq %rbx, %rbx
je 0x200be
movq 0x1d581(%rip), %r14     # 0x3d610
movq (%rbx), %rdi
callq *0x60(%rdi)
movq 0x8(%r14), %rdi
movq 0x10(%rbx), %rsi
callq 0x3510
movq 0x8(%r14), %rdi
movq 0x8(%rbx), %rsi
callq 0x32d0
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3200
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/0x0203[P]schack_poc/./nuklear_xlib.h
// Function: nk_xfont_create
NK_API XFont*
nk_xfont_create(Display *dpy, const char *name)
{
    int n;
    char *def, **missing;
    XFont *font = (XFont*)calloc(1, sizeof(XFont));
    font->set = XCreateFontSet(dpy, name, &missing, &n, &def);
    if(missing) {
        while(n--)
            fprintf(stderr, "missing fontset: %s\n", missing[n]);
        XFreeStringList(missing);
    }
    if(font->set) {
        XFontStruct **xfonts;
        char **font_names;
        XExtentsOfFontSet(font->set);
        n = XFontsOfFontSet(font->set, &xfonts, &font_names);
        while(n--) {
            font->ascent = NK_MAX(font->ascent, (*xfonts)->ascent);
            font->descent = NK_MAX(font->descent,(*xfonts)->descent);
            xfonts++;
        }
    } else {
        if(!(font->xfont = XLoadQueryFont(dpy, name))
        && !(font->xfont = XLoadQueryFont(dpy, "fixed"))) {
            free(font);
            return 0;
        }
        font->ascent = font->xfont->ascent;
        font->descent = font->xfont->descent;
    }
    font->height = font->ascent + font->descent;
    return font;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rsi, %r15
movq %rdi, %r14
movl $0x1, %edi
movl $0x38, %esi
callq 0x3470
movq %rax, %rbx
leaq 0x18(%rsp), %r13
leaq 0xc(%rsp), %rcx
leaq 0x28(%rsp), %r8
movq %r14, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x32a0
movq %rax, %r12
movq %rax, 0x10(%rbx)
cmpq $0x0, (%r13)
je 0x20131
movl 0xc(%rsp), %edi
subl $0x1, %edi
movl %edi, 0xc(%rsp)
jae 0x20201
movq 0x18(%rsp), %rdi
callq 0x3440
testq %r12, %r12
je 0x201a1
movq %r12, %rdi
callq 0x30e0
leaq 0x10(%rsp), %rsi
leaq 0x20(%rsp), %rdx
movq %r12, %rdi
callq 0x3410
movl %eax, 0xc(%rsp)
movl %eax, %ecx
subl $0x1, %ecx
jb 0x2019b
movq 0x10(%rsp), %rcx
movl (%rbx), %edx
movl 0x4(%rbx), %esi
addq $0x8, %rcx
movl %edx, %edi
movl %esi, %r8d
movq -0x8(%rcx), %rsi
movl 0x58(%rsi), %edx
cmpl %edx, %edi
cmovgl %edi, %edx
movl 0x5c(%rsi), %esi
cmpl %esi, %r8d
cmovgl %r8d, %esi
movq %rcx, 0x10(%rsp)
addq $0x8, %rcx
decl %eax
jne 0x20169
movl %edx, (%rbx)
movl %esi, 0x4(%rbx)
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movl %ecx, 0xc(%rsp)
jmp 0x201dc
movq %r14, %rdi
movq %r15, %rsi
callq 0x3400
movq %rax, 0x18(%rbx)
testq %rax, %rax
jne 0x201cd
leaq 0xdccf(%rip), %rsi      # 0x2de8b
movq %r14, %rdi
callq 0x3400
movq %rax, 0x18(%rbx)
testq %rax, %rax
je 0x201f5
movq 0x18(%rbx), %rax
movl 0x58(%rax), %ecx
movl %ecx, (%rbx)
movl 0x5c(%rax), %eax
movl %eax, 0x4(%rbx)
movl 0x4(%rbx), %eax
addl (%rbx), %eax
movl %eax, 0x8(%rbx)
movq %rbx, %rax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rbx, %rdi
callq 0x3200
xorl %ebx, %ebx
jmp 0x201e4
leaq 0x18(%rsp), %rsi
leaq 0xc(%rsp), %rdx
callq 0x35c0
jmp 0x20127
// File: /workspace/github_c_makefile_star2_O1/0x0203[P]schack_poc/./nuklear_xlib.h
// Function: nk_xfont_del
NK_API void
nk_xfont_del(Display *dpy, XFont *font)
{
    if(!font) return;
    if(font->set)
        XFreeFontSet(dpy, font->set);
    else
        XFreeFont(dpy, font->xfont);
    free(font);
}

// Assembly:
testq %rsi, %rsi
je 0x2022e
pushq %rbx
movq %rsi, %rbx
movq 0x10(%rsi), %rsi
testq %rsi, %rsi
je 0x2022f
callq 0x31e0
jmp 0x20238
retq
movq 0x18(%rbx), %rsi
callq 0x3110
movq %rbx, %rdi
popq %rbx
jmp 0x3200
// File: /workspace/github_c_makefile_star2_O1/0x0203[P]schack_poc/./nuklear_xlib.h
// Function: nk_xfont_get_text_width
NK_INTERN float
nk_xfont_get_text_width(nk_handle handle, float height, const char *text, int len)
{
    XFont *font = (XFont*)handle.ptr;
    XRectangle r;
    if(!font || !text)
        return 0;

    if(font->set) {
        XmbTextExtents(font->set, (const char*)text, len, NULL, &r);
        return (float)r.width;
    } else{
        int w = XTextWidth(font->xfont, (const char*)text, len);
        return (float)w;
    }
}

// Assembly:
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
xorps %xmm0, %xmm0
orb %al, %cl
jne 0x204b5
pushq %rbx
subq $0x10, %rsp
movq 0x10(%rdi), %rax
testq %rax, %rax
je 0x204a0
leaq 0x8(%rsp), %rbx
movq %rax, %rdi
xorl %ecx, %ecx
movq %rbx, %r8
callq 0x34a0
movzwl 0x4(%rbx), %eax
jmp 0x204a9
movq 0x18(%rdi), %rdi
callq 0x33a0
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/0x0203[P]schack_poc/./nuklear_xlib.h
// Function: nk_xlib_set_font
NK_API void
nk_xlib_set_font(XFont *xfont)
{
    struct nk_user_font *font = &xfont->handle;
    font->userdata = nk_handle_ptr(xfont);
    font->height = (float)xfont->height;
    font->width = nk_xfont_get_text_width;
    nk_style_set_font(&xlib.ctx, font);
}

// Assembly:
movq %rdi, 0x20(%rdi)
cvtsi2ssl 0x8(%rdi), %xmm0
leaq 0x20(%rdi), %rax
movss %xmm0, 0x28(%rdi)
leaq -0x68(%rip), %rcx       # 0x20467
movq %rcx, 0x30(%rdi)
movq %rax, 0x1929e(%rip)     # 0x39778
movl $0x0, 0x1ba4c(%rip)     # 0x3bf30
cmpq $0x0, 0x1d10c(%rip)     # 0x3d5f8
je 0x204fa
leaq 0x1911b(%rip), %rdi     # 0x39610
jmp 0xa0d7
retq
// File: /workspace/github_c_makefile_star2_O1/0x0203[P]schack_poc/./nuklear_xlib.h
// Function: nk_xlib_push_font
NK_API void
nk_xlib_push_font(XFont *xfont)
{
    struct nk_user_font *font = &xfont->handle;
    font->userdata = nk_handle_ptr(xfont);
    font->height = (float)xfont->height;
    font->width = nk_xfont_get_text_width;
    nk_style_push_font(&xlib.ctx, font);
}

// Assembly:
movq %rdi, 0x20(%rdi)
cvtsi2ssl 0x8(%rdi), %xmm0
leaq 0x20(%rdi), %rsi
movss %xmm0, 0x28(%rdi)
leaq -0xad(%rip), %rax       # 0x20467
movq %rax, 0x30(%rdi)
leaq 0x190f1(%rip), %rdi     # 0x39610
jmp 0xa18f
// File: /workspace/github_c_makefile_star2_O1/0x0203[P]schack_poc/./nuklear_xlib.h
// Function: nk_xlib_paste
NK_API void
nk_xlib_paste(nk_handle handle, struct nk_text_edit* edit)
{
    NK_UNUSED(handle);
    /* Paste in X is asynchronous, so can not use a temporary text edit */
    NK_ASSERT(edit != &xlib.ctx.text_edit && "Paste not supported for temporary editors");
    xlib.clipboard_target = edit;
    /* Request the contents of the primary buffer */
    XConvertSelection(xlib.dpy, XA_PRIMARY, XA_STRING, XA_PRIMARY, xlib.root, CurrentTime);
}

// Assembly:
leaq 0x1bb1d(%rip), %rax     # 0x3c048
cmpq %rax, %rsi
je 0x2055c
movq %rsi, 0x190b1(%rip)     # 0x395e8
movq 0x1d0e2(%rip), %rdi     # 0x3d620
movq 0x1d0e3(%rip), %r8      # 0x3d628
movl $0x1, %esi
movl $0x1f, %edx
movl $0x1, %ecx
xorl %r9d, %r9d
jmp 0x3150
pushq %rax
leaq 0xd954(%rip), %rdi      # 0x2deb8
leaq 0xd998(%rip), %rsi      # 0x2df03
leaq 0xd9a2(%rip), %rcx      # 0x2df14
movl $0x298, %edx            # imm = 0x298
callq 0x3100
// File: /workspace/github_c_makefile_star2_O1/0x0203[P]schack_poc/./nuklear_xlib.h
// Function: nk_xlib_copy
NK_API void
nk_xlib_copy(nk_handle handle, const char* str, int len)
{
    NK_UNUSED(handle);
    free(xlib.clipboard_data);
    xlib.clipboard_len = 0;
    xlib.clipboard_data = malloc((size_t)len);
    if (xlib.clipboard_data) {
        memcpy(xlib.clipboard_data, str, (size_t)len);
        xlib.clipboard_len = len;
        XSetSelectionOwner(xlib.dpy, XA_PRIMARY, xlib.root, CurrentTime);
        XSetSelectionOwner(xlib.dpy, xlib.xa_clipboard, xlib.root, CurrentTime);
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movq %rsi, %rbx
movq 0x1904c(%rip), %rdi     # 0x395d8
callq 0x3200
movl $0x0, 0x19045(%rip)     # 0x395e0
movslq %ebp, %r14
movq %r14, %rdi
callq 0x3170
movq %rax, 0x1902b(%rip)     # 0x395d8
testq %rax, %rax
je 0x20601
movq %rax, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x3580
movl %r14d, 0x19019(%rip)    # 0x395e0
movq 0x1d052(%rip), %rdi     # 0x3d620
movq 0x1d053(%rip), %rdx     # 0x3d628
movl $0x1, %esi
xorl %ecx, %ecx
callq 0x33b0
movq 0x1d038(%rip), %rdi     # 0x3d620
movq 0x19001(%rip), %rsi     # 0x395f0
movq 0x1d032(%rip), %rdx     # 0x3d628
xorl %ecx, %ecx
popq %rbx
popq %r14
popq %rbp
jmp 0x33b0
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/0x0203[P]schack_poc/./nuklear_xlib.h
// Function: nk_xlib_shutdown
NK_API void
nk_xlib_shutdown(void)
{
    nk_xsurf_del(xlib.surf);
    nk_free(&xlib.ctx);
    XFreeCursor(xlib.dpy, xlib.cursor);
    nk_memset(&xlib, 0, sizeof(xlib));
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0x183b1(%rip), %rbx     # 0x395d8
movq 0x1c3e2(%rip), %r14     # 0x3d610
movq 0x8(%r14), %rdi
movq 0x20(%r14), %rsi
callq 0x3510
movq (%r14), %rsi
movq 0x8(%r14), %rdi
callq 0x32d0
movq %r14, %rdi
callq 0x3200
leaq 0x183ba(%rip), %rdi     # 0x39610
callq 0xaa8c
movq 0x1c3be(%rip), %rdi     # 0x3d620
movq 0x1c3af(%rip), %rsi     # 0x3d618
callq 0x3060
movl $0x4060, %edx           # imm = 0x4060
movq %rbx, %rdi
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3070
// File: /workspace/github_c_makefile_star2_O1/0x0203[P]schack_poc/./nuklear_xlib.h
// Function: nk_xsurf_stroke_line
NK_INTERN void
nk_xsurf_stroke_line(XSurface *surf, short x0, short y0, short x1,
    short y1, unsigned int line_thickness, struct nk_color col)
{
    unsigned long c = nk_color_from_byte(&col.r);
    XSetForeground(surf->dpy, surf->gc, c);
    XSetLineAttributes(surf->dpy, surf->gc, line_thickness, LineSolid, CapButt, JoinMiter);
    XDrawLine(surf->dpy, surf->drawable, surf->gc, (int)x0, (int)y0, (int)x1, (int)y1);
    XSetLineAttributes(surf->dpy, surf->gc, 1, LineSolid, CapButt, JoinMiter);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %r13d
movl %r8d, %r12d
movl %ecx, %ebp
movl %edx, %r14d
movl %esi, %r15d
movq %rdi, %rbx
movl 0x40(%rsp), %eax
movl %eax, %ecx
shrl $0x10, %ecx
movzbl %al, %edx
shll $0x10, %edx
andl $0xff00, %eax           # imm = 0xFF00
orl %edx, %eax
movzbl %cl, %edx
orl %eax, %edx
movq (%rdi), %rsi
movq 0x8(%rdi), %rdi
callq 0x3270
movq (%rbx), %rsi
movq 0x8(%rbx), %rdi
movl %r13d, %edx
xorl %ecx, %ecx
movl $0x1, %r8d
xorl %r9d, %r9d
callq 0x3320
movq (%rbx), %rdx
movq 0x8(%rbx), %rdi
movq 0x20(%rbx), %rsi
movl %r12d, (%rsp)
movl %r15d, %ecx
movl %r14d, %r8d
movl %ebp, %r9d
callq 0x3230
movq (%rbx), %rsi
movq 0x8(%rbx), %rdi
movl $0x1, %edx
xorl %ecx, %ecx
movl $0x1, %r8d
xorl %r9d, %r9d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3320
// File: /workspace/github_c_makefile_star2_O1/0x0203[P]schack_poc/main.c
// Function: die
static void
die(const char *fmt, ...)
{
    va_list ap;
    va_start(ap, fmt);
    vfprintf(stderr, fmt, ap);
    va_end(ap);
    fputs("\n", stderr);
    exit(EXIT_FAILURE);
}

// Assembly:
pushq %rbx
subq $0xd0, %rsp
leaq 0x20(%rsp), %rdi
movq %rsi, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0x24d2d
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsp, %rdx
movq %rdi, 0x10(%rdx)
leaq 0xe0(%rsp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rdx)
movq 0x1429c(%rip), %rbx     # 0x38ff0
movq (%rbx), %rdi
leaq 0xa60d(%rip), %rsi      # 0x2f36b
callq 0x31c0
movq (%rbx), %rsi
leaq 0xc1be(%rip), %rdi      # 0x30f2b
callq 0x3330
movl $0x1, %edi
callq 0x30f0
// File: /workspace/github_c_makefile_star2_O1/0x0203[P]schack_poc/main.c
// Function: shuffle_packet
static int shuffle_packet(char *packet, int packet_len, uint8_t **ret, int bph,
			  uint8_t *hop_list, int hops, int start_offset)
{
    int		    len;
    int		    pad;
    int		    i;
    int		    hop_index = 0;

    if (!ret || !packet || !hop_list || !bph || !hops)
	return 0;

    //len = strlen(packet);
    len = (bph * hops);
    len = len * ((packet_len + len - 1 - start_offset) / len);


    (*ret) = malloc(len);
    if (!*ret)
	return 0;

    memset(*ret, 0, len);

    for (i=0; i<len; i++)
    {
	hop_index = (i / bph) % hops;
	(*ret)[i] = (uint8_t)packet[i+start_offset] ^ (uint8_t)hop_list[hop_index];
    }
    return len;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r12
xorl %edi, %edi
testl %r9d, %r9d
je 0x24e6b
movl %ecx, %ebp
testl %ecx, %ecx
je 0x24e6b
testq %r12, %r12
je 0x24e6b
movq %rdx, %r15
testq %rdx, %rdx
je 0x24e6b
movq %r8, %r14
testq %r8, %r8
je 0x24e6b
movl %r9d, %ebx
movl %r9d, %ecx
imull %ebp, %ecx
addl %ecx, %esi
decl %esi
movl %esi, %eax
cltd
idivl %ecx
subl %edx, %esi
movl %esi, 0x4(%rsp)
movslq %esi, %r13
movq %r13, %rdi
callq 0x3170
xorl %edi, %edi
movq %rax, (%r15)
testq %rax, %rax
je 0x24e6b
movq %rax, %rdi
xorl %esi, %esi
movq %r13, %rdx
callq 0x3070
testl %r13d, %r13d
jle 0x24e67
movl 0x4(%rsp), %edi
movl %edi, %esi
xorl %ecx, %ecx
movl %ecx, %eax
cltd
idivl %ebp
cltd
idivl %ebx
movslq %edx, %rax
movb (%r14,%rax), %al
xorb (%r12,%rcx), %al
movq (%r15), %rdx
movb %al, (%rdx,%rcx)
incq %rcx
cmpq %rcx, %rsi
jne 0x24e44
jmp 0x24e6b
movl 0x4(%rsp), %edi
movl %edi, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/0x0203[P]schack_poc/./nuklear.h
// Function: nk_draw_scrollbar
NK_LIB void
nk_draw_scrollbar(struct nk_command_buffer *out, nk_flags state,
    const struct nk_style_scrollbar *style, const struct nk_rect *bounds,
    const struct nk_rect *scroll)
{
    const struct nk_style_item *background;
    const struct nk_style_item *cursor;

    /* select correct colors/images to draw */
    if (state & NK_WIDGET_STATE_ACTIVED) {
        background = &style->active;
        cursor = &style->cursor_active;
    } else if (state & NK_WIDGET_STATE_HOVER) {
        background = &style->hover;
        cursor = &style->cursor_hover;
    } else {
        background = &style->normal;
        cursor = &style->cursor_normal;
    }

    /* draw background */
    if (background->type == NK_STYLE_ITEM_COLOR) {
        nk_fill_rect(out, *bounds, style->rounding, background->data.color);
        nk_stroke_rect(out, *bounds, style->rounding, style->border, style->border_color);
    } else {
        nk_draw_image(out, *bounds, &background->data.image, nk_white);
    }

    /* draw cursor */
    if (cursor->type == NK_STYLE_ITEM_COLOR) {
        nk_fill_rect(out, *scroll, style->rounding_cursor, cursor->data.color);
        nk_stroke_rect(out, *scroll, style->rounding_cursor, style->border_cursor, style->cursor_border_color);
    } else nk_draw_image(out, *scroll, &cursor->data.image, nk_white);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r8, %rbx
movq %rcx, %r13
movq %rdx, %r14
movl %esi, %eax
addl %eax, %eax
andl $0x20, %eax
leaq 0x68(%rax), %rcx
testb $0x20, %sil
movl $0xa8, %r12d
cmoveq %rcx, %r12
movq %rdi, %r15
movl $0x40, %ecx
cmovel %eax, %ecx
leaq (%rdx,%rcx), %rsi
addq %rdx, %r12
cmpl $0x0, (%rdx,%rcx)
je 0x25997
addq $0x8, %rsi
movsd (%r13), %xmm0
movsd 0x8(%r13), %xmm1
movq %r15, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x7b23
jmp 0x259e1
movss 0xd0(%r14), %xmm2
movsd (%r13), %xmm0
movsd 0x8(%r13), %xmm1
movl 0x8(%rsi), %esi
movq %r15, %rdi
callq 0x6fee
movss 0xd0(%r14), %xmm2
movss 0xcc(%r14), %xmm3
movsd (%r13), %xmm0
movsd 0x8(%r13), %xmm1
movl 0x60(%r14), %esi
movq %r15, %rdi
callq 0x6e96
cmpl $0x0, (%r12)
je 0x25a0e
addq $0x8, %r12
movsd (%rbx), %xmm0
movsd 0x8(%rbx), %xmm1
movq %r15, %rdi
movq %r12, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x7b23
movss 0xd8(%r14), %xmm2
movsd (%rbx), %xmm0
movsd 0x8(%rbx), %xmm1
movl 0x8(%r12), %esi
movq %r15, %rdi
callq 0x6fee
movss 0xd8(%r14), %xmm2
movss 0xd4(%r14), %xmm3
movsd (%rbx), %xmm0
movsd 0x8(%rbx), %xmm1
movl 0xc8(%r14), %esi
movq %r15, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x6e96
// File: /workspace/github_c_makefile_star2_O1/kyz[P]amostools/./amoslib.c
// Function: print_string
static int print_string(FILE *out, uint8_t *s, char quote) {
    int len = amos_deek(s);
    char fmt[20];
    snprintf(fmt, sizeof(fmt), "%c%%%d.%ds%c", quote, len, len, quote);
    fprintf(out, fmt, &s[2]);
    return len + 2 + (len & 1 ? 1 : 0);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x30, %rsp
movl %edx, %ecx
movq %rsi, %r14
movq %rdi, %r15
movzbl (%rsi), %ebx
shll $0x8, %ebx
movzbl 0x1(%rsi), %r13d
orl %r13d, %ebx
movl %edx, (%rsp)
leaq 0x15e0(%rip), %rdx      # 0x327a
leaq 0x10(%rsp), %r12
movl $0x14, %esi
movq %r12, %rdi
movl %ebx, %r8d
movl %ebx, %r9d
xorl %eax, %eax
callq 0x1100
addq $0x2, %r14
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0x1170
andl $0x1, %r13d
leal (%rbx,%r13), %eax
addl $0x2, %eax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/kyz[P]amostools/./amoslib.c
// Function: AMOS_free_tokens
void AMOS_free_tokens(struct AMOS_token *table[AMOS_TOKEN_TABLE_SIZE]) {
    int i;
    for (i = 0; i < AMOS_TOKEN_TABLE_SIZE; i++) {
        struct AMOS_token *e, *next;
        for (e = table[i]; e; e = next) {
            next = e->next;
            free(e);
        }
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %r14d, %r14d
movq (%rbx,%r14,8), %rdi
testq %rdi, %rdi
je 0x22bb
movq (%rdi), %r15
callq 0x1030
movq %r15, %rdi
testq %r15, %r15
jne 0x22ab
incq %r14
cmpq $0x2069, %r14           # imm = 0x2069
jne 0x22a2
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/kyz[P]amostools/listamos.c
// Function: read_extension_file
void read_extension_file(char *filename, int slot) {
    uint8_t *buf;
    size_t len;

    if ((buf = read_file(filename, &len))) {
        if (slot == -1) {
            slot = AMOS_find_slot(buf, len);
        }
        if (slot == -1) {
            fprintf(stderr, "%s: can't determine extension slot"
                            " (use -eNN=filename to set slot NN)\n", filename);
        }
        else if (extensions_loaded[slot]) {
            fprintf(stderr, "%s: extension already loaded in slot %d\n", filename, slot);
        }
        else if (AMOS_parse_extension(buf, len, slot, 6, table)) {
            fprintf(stderr, "%s: not an AMOS extension\n", filename);
        }
        else {
            fprintf(stderr, "%s: loaded into slot %d\n", filename, slot);
            extensions_loaded[slot] = 1;
        }
        free(buf);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %esi, %ebp
movq %rdi, %r14
leaq 0x8(%rsp), %rsi
callq 0x131c
testq %rax, %rax
jne 0x22fa
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
cmpl $-0x1, %ebp
jne 0x2311
movq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x2166
movl %eax, %ebp
cmpl $-0x1, %ebp
jne 0x2333
movq 0x2cdb(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
leaq 0xd5f(%rip), %rsi       # 0x3086
movq %r14, %rdx
xorl %eax, %eax
callq 0x1170
jmp 0x23a4
movslq %ebp, %r15
leaq 0x16713(%rip), %r12     # 0x18a50
cmpb $0x0, (%r15,%r12)
jne 0x2387
movq 0x8(%rsp), %rsi
leaq 0x63b0(%rip), %r8       # 0x8700
movq %rbx, %rdi
movl %ebp, %edx
movl $0x6, %ecx
callq 0x1ef9
movq 0x2c92(%rip), %rcx      # 0x4ff8
movq (%rcx), %rdi
testl %eax, %eax
jne 0x23b1
leaq 0xd9d(%rip), %rsi       # 0x3111
movq %r14, %rdx
movl %ebp, %ecx
xorl %eax, %eax
callq 0x1170
movb $0x1, (%r15,%r12)
jmp 0x23a4
movq 0x2c6a(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
leaq 0xd35(%rip), %rsi       # 0x30cd
movq %r14, %rdx
movl %ebp, %ecx
xorl %eax, %eax
callq 0x1170
movq %rbx, %rdi
callq 0x1030
jmp 0x22ed
leaq 0xd3e(%rip), %rsi       # 0x30f6
jmp 0x2327
// File: /workspace/github_c_makefile_star2_O1/kyz[P]amostools/listamos.c
// Function: read_extensions
int read_extensions(int argc, char *argv[]) {
    int i, slot;

    /* look for -e options */
    for (i = 1; i < argc; i++) {
        if (*argv[i] != '-') break; /* end of arg processing */
        if (!strcmp(argv[i], "-e")) {
            read_extension_file(argv[++i], -1);
        }
        else if (sscanf(argv[i], "-e%d=", &slot) == 2) {
            if (slot < 1 || slot > 25) {
                fprintf(stderr, "invalid extension slot %d (must be 1-25)\n", slot);
            }
            else {
                read_extension_file(strchr(argv[i], '=') + 1, slot);
            }
        }
        else if (argv[i][1] == 'c' || argv[i][1] == 'd') {
            i++; /* skip arg */
        }
    }
    return i;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl $0x1, %r15d
cmpl $0x2, %edi
jl 0x2497
movq %rsi, %rbx
movl %edi, %ebp
leaq 0xd47(%rip), %r14       # 0x312a
movslq %r15d, %r13
movq (%rbx,%r13,8), %r12
cmpb $0x2d, (%r12)
jne 0x2497
movq %r12, %rdi
movq %r14, %rsi
callq 0x1160
testl %eax, %eax
je 0x2445
movq %r12, %rdi
leaq 0xd1f(%rip), %rsi       # 0x312d
leaq 0x4(%rsp), %rdx
xorl %eax, %eax
callq 0x11b0
cmpl $0x2, %eax
jne 0x245a
movl 0x4(%rsp), %r12d
leal -0x1a(%r12), %eax
cmpl $-0x1a, %eax
jbe 0x247a
movq (%rbx,%r13,8), %rdi
movl $0x3d, %esi
callq 0x10e0
leaq 0x1(%rax), %rdi
movl %r12d, %esi
jmp 0x2453
leal 0x1(%r13), %r15d
movq 0x8(%rbx,%r13,8), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x22cd
jmp 0x246c
movq (%rbx,%r13,8), %rax
movb 0x1(%rax), %al
addb $-0x63, %al
cmpb $0x2, %al
adcl $0x0, %r13d
movl %r13d, %r15d
incl %r15d
cmpl %ebp, %r15d
jl 0x23e3
jmp 0x2497
movq 0x2b77(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
leaq 0xca8(%rip), %rsi       # 0x3133
movl %r12d, %edx
xorl %eax, %eax
callq 0x1170
jmp 0x246c
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/kyz[P]amostools/listamos.c
// Function: read_default_extensions
void read_default_extensions() {
    AMOS_parse_extension(ext00_base, sizeof(ext00_base), 0, -194, table);
    if (!extensions_loaded[1]) {
        AMOS_parse_extension(ext01_music, sizeof(ext01_music), 1, 6, table);
    }
    if (!extensions_loaded[2]) {
        AMOS_parse_extension(ext02_compact, sizeof(ext02_compact), 2, 6, table);
    }
    if (!extensions_loaded[3]) {
        AMOS_parse_extension(ext03_request, sizeof(ext03_request), 3, 6, table);
    }
    if (!extensions_loaded[6]) {
        AMOS_parse_extension(ext06_ioports, sizeof(ext06_ioports), 6, 6, table);
    }
}

// Assembly:
pushq %rax
leaq 0x2a2e(%rip), %rdi      # 0x5160
leaq 0x5fc7(%rip), %r8       # 0x8700
movl $0x2cfe, %esi           # imm = 0x2CFE
xorl %edx, %edx
movl $0xffffff3e, %ecx       # imm = 0xFFFFFF3E
callq 0x1ef9
cmpb $0x0, 0x16300(%rip)     # 0x18a51
jne 0x2775
leaq 0x5706(%rip), %rdi      # 0x7e60
leaq 0x5f9f(%rip), %r8       # 0x8700
movl $0x3ce, %esi            # imm = 0x3CE
movl $0x1, %edx
movl $0x6, %ecx
callq 0x1ef9
cmpb $0x0, 0x162d6(%rip)     # 0x18a52
jne 0x27a0
leaq 0x5aab(%rip), %rdi      # 0x8230
leaq 0x5f74(%rip), %r8       # 0x8700
movl $0xa4, %esi
movl $0x2, %edx
movl $0x6, %ecx
callq 0x1ef9
cmpb $0x0, 0x162ac(%rip)     # 0x18a53
jne 0x27cb
leaq 0x5b30(%rip), %rdi      # 0x82e0
leaq 0x5f49(%rip), %r8       # 0x8700
movl $0x70, %esi
movl $0x3, %edx
movl $0x6, %ecx
callq 0x1ef9
cmpb $0x0, 0x16284(%rip)     # 0x18a56
je 0x27d6
popq %rax
retq
leaq 0x5b73(%rip), %rdi      # 0x8350
leaq 0x5f1c(%rip), %r8       # 0x8700
movl $0x394, %esi            # imm = 0x394
movl $0x6, %edx
movl $0x6, %ecx
popq %rax
jmp 0x1ef9
// File: /workspace/github_c_makefile_star2_O1/kyz[P]amostools/listamos.c
// Function: main
int main(int argc, char *argv[]) {
    uint8_t *buf;
    size_t len;
    int i;

    if (argc < 2) {
        printf("List AMOS source code as plain text.\n");
        printf("Usage: %s [options] <Filename.AMOS>\n", argv[0]);
        printf("Options:\n"
               "  -e extension     use this extension in its default slot\n"
               "  -eN=extension    use this extension in slot N\n"
               "  -c config        read extension filenames from config\n"
               "  -d dir           ...and extension files are in this dir\n");
        return 0;
    }

    i = read_extensions(argc, argv);
    read_config_extensions(argc, argv);
    read_default_extensions();

    /* list source file(s) */
    for (; i < argc; i++) {
        if ((buf = read_file(argv[i], &len))) {
            if (len >= 34 && amos_leek(buf) == 0x414D4F53) {
                uint32_t srclen = amos_leek(&buf[16]);
                if (srclen > (len - 20)) srclen = len - 20;
                int err = AMOS_print_source(&buf[20], srclen, stdout, table);
                if (err & 4) {
                    fprintf(stderr, "%s: missing extension instruction(s) - "
                            "are the correct extensions loaded?\n", argv[i]);
                }
            }
            else {
                fprintf(stderr, "%s: not an AMOS source file\n", argv[i]);
            }
            free(buf);
        }
    }
        
    AMOS_free_tokens(table);
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
cmpl $0x1, %edi
jg 0x283a
leaq 0xa80(%rip), %rdi       # 0x3293
callq 0x1090
movq (%r14), %rsi
leaq 0x9c6(%rip), %rdi       # 0x31e8
xorl %eax, %eax
callq 0x10f0
leaq 0xa88(%rip), %rdi       # 0x32b8
callq 0x1090
jmp 0x2927
movl %edi, %ebx
movq %r14, %rsi
callq 0x23bd
movl %eax, %ebp
movl %ebx, %edi
movq %r14, %rsi
callq 0x24a9
callq 0x272a
subl %ebp, %ebx
jle 0x28f9
movslq %ebp, %rax
leaq (%r14,%rax,8), %r14
movq %rsp, %r15
leaq 0x9ea(%rip), %rbp       # 0x3258
leaq 0x998(%rip), %r12       # 0x320d
movq (%r14), %rdi
movq %r15, %rsi
callq 0x131c
testq %rax, %rax
je 0x28e2
movq %rax, %r13
movq (%rsp), %rsi
movq %rbp, %rcx
cmpq $0x22, %rsi
jb 0x28ec
movl (%r13), %eax
bswapl %eax
movq %rbp, %rcx
cmpl $0x414d4f53, %eax       # imm = 0x414D4F53
jne 0x28ec
movl 0x10(%r13), %eax
bswapl %eax
addq $-0x14, %rsi
cmpq %rax, %rsi
cmovael %eax, %esi
movq %r13, %rdi
addq $0x14, %rdi
movq 0x2715(%rip), %rax      # 0x4fd8
movq (%rax), %rdx
leaq 0x5e33(%rip), %rcx      # 0x8700
callq 0x1454
movq %r12, %rcx
cmpl $0x4, %eax
jae 0x28ec
movq %r13, %rdi
callq 0x1030
addq $0x8, %r14
decl %ebx
jne 0x2875
jmp 0x28f9
movq %r14, %rdi
movq %rcx, %rsi
callq 0x1210
jmp 0x28da
xorl %ebx, %ebx
leaq 0x5dfe(%rip), %r14      # 0x8700
movq (%r14,%rbx,8), %rdi
testq %rdi, %rdi
je 0x291b
movq (%rdi), %r15
callq 0x1030
movq %r15, %rdi
testq %r15, %r15
jne 0x290b
incq %rbx
cmpq $0x2069, %rbx           # imm = 0x2069
jne 0x2902
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/kyx0r[P]xkeyboard/xkeyboard.c
// Function: handle_error
static int handle_error(Display *d, XErrorEvent *event)
{
	char errortext[96];
	XGetErrorText(dpy, event->error_code, errortext, 96);

	fprintf(stderr, "xkeyboard: %s (%d/%d)\n", errortext,
		event->request_code, event->minor_code);
	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x68, %rsp
movq %rsi, %rbx
movq 0x163e7(%rip), %rdi     # 0x187f8
movzbl 0x20(%rsi), %esi
movq %rsp, %r14
pushq $0x60
popq %rcx
movq %r14, %rdx
callq 0x2220
movq 0x5bce(%rip), %rax      # 0x7ff8
movq (%rax), %rdi
movzbl 0x21(%rbx), %ecx
movzbl 0x22(%rbx), %r8d
leaq 0x3d0f(%rip), %rsi      # 0x614c
movq %r14, %rdx
xorl %eax, %eax
callq 0x2190
xorl %eax, %eax
addq $0x68, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/kyx0r[P]xkeyboard/xkeyboard.c
// Function: create_pixmaps
void create_pixmaps(void)
{
	static int initialized = 0;
	int i;

	if (initialized) {
		for (i = 0; i < NUM_KEYCAPS; i++) {
			XFreePixmap(dpy, mykc[i]);
		}
	}
	else
	{
		for (i = 0; i < NUM_CONSTPGM; i++) {
			if(cpgmlist[i].pgm)
			{
				cpgm[i] = scale_pic(
						&cpgmlist[i], 
						cpgmlist[i].w,
						cpgmlist[i].h, 
						i);
			}
		}
	}
	for (i = 0; i < NUM_KEYCAPS; i++) {
		if(mykclist[i].pgm)
		{
			mykc[i] = scale_pic(
					&mykclist[i], 
					mykclist[i].w,
					mykclist[i].h, 
					i);
		}
	}
	initialized = 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
cmpb $0x0, 0x15de9(%rip)     # 0x18a38
je 0x2c76
xorl %ebx, %ebx
leaq 0x15de6(%rip), %r14     # 0x18a40
movq 0x15b97(%rip), %rdi     # 0x187f8
movq (%rbx,%r14), %rsi
callq 0x2110
addq $0x8, %rbx
cmpq $0x68, %rbx
jne 0x2c5a
jmp 0x2cb2
leaq 0x15e33(%rip), %r15     # 0x18ab0
leaq 0x15a6c(%rip), %rbx     # 0x186f0
xorl %r14d, %r14d
cmpq $0x0, 0x8(%rbx)
je 0x2ca1
movl (%rbx), %esi
movl 0x4(%rbx), %edx
movq %rbx, %rdi
movl %r14d, %ecx
callq 0x295e
movq %rax, (%r15)
incq %r14
addq $0x8, %r15
addq $0x10, %rbx
cmpq $0xf, %r14
jne 0x2c87
leaq 0x15d87(%rip), %r15     # 0x18a40
leaq 0x15960(%rip), %rbx     # 0x18620
xorl %r14d, %r14d
cmpq $0x0, 0x8(%rbx)
je 0x2cdd
movl (%rbx), %esi
movl 0x4(%rbx), %edx
movq %rbx, %rdi
movl %r14d, %ecx
callq 0x295e
movq %rax, (%r15)
incq %r14
addq $0x8, %r15
addq $0x10, %rbx
cmpq $0xd, %r14
jne 0x2cc3
movb $0x1, 0x15d43(%rip)     # 0x18a38
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/kyx0r[P]xkeyboard/xkeyboard.c
// Function: move_constkeys
void move_constkeys()
{
	XMoveWindow(dpy, zoomwin, myhint.width - 45, 16);
	XMoveWindow(dpy, modewin, myhint.width - 85, 16);
	XMoveWindow(dpy, movewin, myhint.width - 125, 16);
	XMoveWindow(dpy, mousewin, myhint.width - 165, 16);
	XMoveWindow(dpy, lbcornerwin, myhint.width - 16, myhint.height - 16);
	XMoveWindow(dpy, closewindow, 0, myhint.height - closewindow_uppgm.height);
}

// Assembly:
pushq %rax
movq 0x15af5(%rip), %rdi     # 0x187f8
movq 0x15e1e(%rip), %rsi     # 0x18b28
movl 0x15b28(%rip), %edx     # 0x18838
addl $-0x2d, %edx
movl $0x10, %ecx
callq 0x20f0
movq 0x15ad4(%rip), %rdi     # 0x187f8
movq 0x15e05(%rip), %rsi     # 0x18b30
movl 0x15b07(%rip), %edx     # 0x18838
addl $-0x55, %edx
movl $0x10, %ecx
callq 0x20f0
movq 0x15ab3(%rip), %rdi     # 0x187f8
movq 0x15dec(%rip), %rsi     # 0x18b38
movl 0x15ae6(%rip), %edx     # 0x18838
addl $-0x7d, %edx
movl $0x10, %ecx
callq 0x20f0
movq 0x15a92(%rip), %rdi     # 0x187f8
movq 0x15dd3(%rip), %rsi     # 0x18b40
movl $0xffffff5b, %edx       # imm = 0xFFFFFF5B
addl 0x15ac0(%rip), %edx     # 0x18838
movl $0x10, %ecx
callq 0x20f0
movq 0x15a6f(%rip), %rdi     # 0x187f8
movq 0x15db8(%rip), %rsi     # 0x18b48
movl 0x15aa2(%rip), %edx     # 0x18838
addl $-0x10, %edx
movl 0x15a9d(%rip), %ecx     # 0x1883c
addl $-0x10, %ecx
callq 0x20f0
movq 0x15a4a(%rip), %rdi     # 0x187f8
movq 0x15d9b(%rip), %rsi     # 0x18b50
movl 0x15a81(%rip), %ecx     # 0x1883c
subl 0x123b3(%rip), %ecx     # 0x15174
xorl %edx, %edx
popq %rax
jmp 0x20f0
// File: /workspace/github_c_makefile_star2_O1/kyx0r[P]xkeyboard/xkeyboard.c
// Function: do_control
void do_control(void)
{
	XFontStruct *font;
	zoom &= 3;

	if (zoom == 0) {
		font = XLoadQueryFont(dpy,
			"-*-*-medium-r-*-*-*-100-*-*-*-*-*-*");
		if(!font)
		{
			return;
		}
		ox = 32; oy = 16; sn = 1; sd = 1;
		XFreeFont(dpy, font_struct);
		font_struct = font;
		XSetFont(dpy, mygc, font_struct->fid);
		XSetFont(dpy, mygcled, font_struct->fid);
	} else if (zoom == 1) {
		font = XLoadQueryFont(dpy,
			"-*-*-medium-r-*-*-*-120-*-*-*-*-*-*");
		if(!font)
		{
			return;
		}
		ox = 0; oy = -48; sn = 3; sd = 2;
		XFreeFont(dpy, font_struct);
		font_struct = font;
		XSetFont(dpy, mygc, font_struct->fid);
		XSetFont(dpy, mygcled, font_struct->fid);
	} else if (zoom == 3) {
		font = XLoadQueryFont(dpy,
			"-*-*-medium-r-*-*-*-180-*-*-*-*-*-*");
		if(!font)
		{
			return;
		}
		ox = -48; oy = -64; sn = 2; sd = 1;
		XFreeFont(dpy, font_struct);
		font_struct = font;
		XSetFont(dpy, mygc, font_struct->fid);
		XSetFont(dpy, mygcled, font_struct->fid);
	} else if (zoom == 2) {
		font = XLoadQueryFont(dpy,
			"-*-*-medium-r-*-*-*-120-*-*-*-*-*-*");
		if(!font)
		{
			return;
		}
		ox = -12; oy = -64; sn = 7; sd = 4;
		XFreeFont(dpy, font_struct);
		font_struct = font;
		XSetFont(dpy, mygc, font_struct->fid);
		XSetFont(dpy, mygcled, font_struct->fid);
	}
	resize_keys();
}

// Assembly:
pushq %rbx
movl 0x14d1b(%rip), %eax     # 0x187f0
andl $0x3, %eax
movl %eax, 0x14d12(%rip)     # 0x187f0
movq 0x14d13(%rip), %rdi     # 0x187f8
leaq 0x2518(%rip), %rcx      # 0x6004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x2555(%rip), %rsi      # 0x6051
callq 0x2140
testq %rax, %rax
je 0x3c18
movq %rax, %rbx
movl $0x1, %eax
movl $0x10, %edx
movl $0x20, %esi
movl $0x1, %ecx
jmp 0x3bab
leaq 0x25ae(%rip), %rsi      # 0x60db
callq 0x2140
testq %rax, %rax
je 0x3c18
movq %rax, %rbx
movl $0x4, %ecx
movl $0x7, %eax
movl $0xffffffc0, %edx       # imm = 0xFFFFFFC0
movl $0xfffffff4, %esi       # imm = 0xFFFFFFF4
jmp 0x3bab
leaq 0x25a4(%rip), %rsi      # 0x60ff
callq 0x2140
testq %rax, %rax
je 0x3c18
movq %rax, %rbx
movl $0x1, %ecx
movl $0x2, %eax
movl $0xffffffc0, %edx       # imm = 0xFFFFFFC0
movl $0xffffffd0, %esi       # imm = 0xFFFFFFD0
jmp 0x3bab
leaq 0x2552(%rip), %rsi      # 0x60db
callq 0x2140
testq %rax, %rax
je 0x3c18
movq %rax, %rbx
movl $0x2, %ecx
movl $0x3, %eax
movl $0xffffffd0, %edx       # imm = 0xFFFFFFD0
xorl %esi, %esi
movl %esi, 0x14fa7(%rip)     # 0x18b58
movl %edx, 0x14fa5(%rip)     # 0x18b5c
movl %eax, 0x14e73(%rip)     # 0x18a30
movl %ecx, 0x14e71(%rip)     # 0x18a34
movq 0x14c2e(%rip), %rdi     # 0x187f8
movq 0x14e47(%rip), %rsi     # 0x18a18
callq 0x2090
movq %rbx, 0x14e3b(%rip)     # 0x18a18
movq 0x14c14(%rip), %rdi     # 0x187f8
movq 0x14e25(%rip), %rsi     # 0x18a10
movq 0x8(%rbx), %rdx
callq 0x2120
movq 0x14bfd(%rip), %rdi     # 0x187f8
movq 0x14e1e(%rip), %rsi     # 0x18a20
movq 0x14e0f(%rip), %rax     # 0x18a18
movq 0x8(%rax), %rdx
callq 0x2120
popq %rbx
jmp 0x38e3
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/kyx0r[P]xkeyboard/xkeyboard.c
// Function: show
void show()
{
	if(myhint.y + myhint.height > screenheight)
	{
		myhint.y -= myhint.height-closewindow_uppgm.height;
	}
	XMoveResizeWindow(dpy, mywindow, myhint.x, myhint.y, myhint.width, myhint.height);
	move_constkeys();
}

// Assembly:
movl 0x14420(%rip), %eax     # 0x18834
movl 0x14421(%rip), %r9d     # 0x1883c
leal (%r9,%rax), %ecx
cmpl 0x143e3(%rip), %ecx     # 0x18808
jle 0x4436
subl %r9d, %eax
addl 0x10d44(%rip), %eax     # 0x15174
movl %eax, 0x143fe(%rip)     # 0x18834
pushq %rax
movq 0x143ba(%rip), %rdi     # 0x187f8
movq 0x1452b(%rip), %rsi     # 0x18970
movl 0x143e5(%rip), %edx     # 0x18830
movl 0x143e3(%rip), %ecx     # 0x18834
movl 0x143e0(%rip), %r8d     # 0x18838
callq 0x2100
popq %rax
jmp 0x2cfb
// File: /workspace/github_c_makefile_star2_O1/kyx0r[P]xkeyboard/xkeyboard.c
// Function: movebutton
void
movebutton(int xpos, int ypos)
{
	int x, y, nx = 0, ny = 0;
	XEvent ev;
	Time lasttime = 0;

	XSetWindowBackgroundPixmap(dpy,
			movewin,
			cpgm[NUM_CONSTPGM - 10]);
	XClearWindow(dpy, movewin);

	if (XGrabPointer(dpy, root, False, MOUSEMASK, GrabModeAsync, GrabModeAsync,
		None, None, CurrentTime) != GrabSuccess)
		return;
	if (!getrootptr(&x, &y))
		return;
	do {
		XMaskEvent(dpy, MOUSEMASK|ExposureMask|SubstructureRedirectMask, &ev);
		switch(ev.type) {
		case ConfigureRequest:
		case Expose:
		case MapRequest:
			break;
		case MotionNotify:
			if ((ev.xmotion.time - lasttime) <= (1000 / 60))
				continue;
			lasttime = ev.xmotion.time;
			nx = ev.xmotion.x;
			ny = ev.xmotion.y;
			XMoveWindow(dpy, mywindow, nx-xpos, ny-ypos);
			break;
		}
	} while (ev.type != ButtonRelease);
	myhint.x = nx-xpos;
	myhint.y = ny-ypos;
	XSetWindowBackgroundPixmap(dpy,
			movewin,
			cpgm[NUM_CONSTPGM - 9]);
	XClearWindow(dpy, movewin);
	do_control(); //redraw the fonts
	XUngrabPointer(dpy, CurrentTime);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movl %esi, 0x24(%rsp)
movl %edi, %ebp
movq 0x1433a(%rip), %rdi     # 0x187f8
movq 0x14673(%rip), %rsi     # 0x18b38
movq 0x1460c(%rip), %rdx     # 0x18ad8
callq 0x2320
movq 0x14320(%rip), %rdi     # 0x187f8
movq 0x14659(%rip), %rsi     # 0x18b38
callq 0x2060
movq 0x1430d(%rip), %rdi     # 0x187f8
movq 0x1431e(%rip), %rsi     # 0x18810
xorps %xmm0, %xmm0
movups %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
xorl %edx, %edx
movl $0x4c, %ecx
movl $0x1, %r8d
movl $0x1, %r9d
callq 0x2150
testl %eax, %eax
jne 0x4629
movq 0x142cf(%rip), %rdi     # 0x187f8
movq 0x142e0(%rip), %rsi     # 0x18810
leaq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
leaq 0x34(%rsp), %rax
movq %rax, 0x8(%rsp)
movq %rax, (%rsp)
leaq 0x38(%rsp), %rcx
leaq 0x2c(%rsp), %r8
leaq 0x28(%rsp), %r9
movq %rcx, %rdx
callq 0x21b0
testl %eax, %eax
je 0x4629
xorl %r15d, %r15d
leaq 0x38(%rsp), %r14
xorl %r12d, %r12d
xorl %ebx, %ebx
movq 0x1427d(%rip), %rdi     # 0x187f8
movl $0x10804c, %esi         # imm = 0x10804C
movq %r14, %rdx
callq 0x23d0
cmpl $0x6, 0x38(%rsp)
jne 0x45cc
movq 0x70(%rsp), %r13
movq %r13, %rax
subq %rbx, %rax
cmpq $0x11, %rax
jb 0x45cc
movl 0x78(%rsp), %r15d
movl 0x7c(%rsp), %r12d
movq 0x14247(%rip), %rdi     # 0x187f8
movq 0x143b8(%rip), %rsi     # 0x18970
movl %r15d, %edx
subl %ebp, %edx
movl %r12d, %ecx
subl 0x24(%rsp), %ecx
callq 0x20f0
movq %r13, %rbx
cmpl $0x5, 0x38(%rsp)
jne 0x4574
subl %ebp, %r15d
movl %r15d, 0x14253(%rip)    # 0x18830
subl 0x24(%rsp), %r12d
movl %r12d, 0x1424b(%rip)    # 0x18834
movq 0x14208(%rip), %rdi     # 0x187f8
movq 0x14541(%rip), %rsi     # 0x18b38
movq 0x144e2(%rip), %rdx     # 0x18ae0
callq 0x2320
movq 0x141ee(%rip), %rdi     # 0x187f8
movq 0x14527(%rip), %rsi     # 0x18b38
callq 0x2060
callq 0x3ace
movq 0x141d6(%rip), %rdi     # 0x187f8
xorl %esi, %esi
callq 0x21d0
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/kyx0r[P]xkeyboard/xkeyboard.c
// Function: resize_win
void resize_win()
{
	int x, y, nx, ny = 0; 
	XEvent ev;
	Time lasttime = 0;

	if (XGrabPointer(dpy, root, False, MOUSEMASK, GrabModeAsync, GrabModeAsync,
		None, None, CurrentTime) != GrabSuccess)
	if (!getrootptr(&x, &y))
		return;
	do {
		XMaskEvent(dpy, MOUSEMASK|ExposureMask|SubstructureRedirectMask, &ev);
		switch(ev.type) {
		case ConfigureRequest:
		case Expose:
		case MapRequest:
			break;
		case MotionNotify:
			if ((ev.xmotion.time - lasttime) <= (1000 / 60))
				continue;
			lasttime = ev.xmotion.time;
			nx = ev.xmotion.x;
			ny = ev.xmotion.y;
			myhint.width = nx - myhint.x;
			myhint.height = ny - myhint.y;
			XMoveResizeWindow(dpy, mywindow, myhint.x, myhint.y, myhint.width, myhint.height);
			move_constkeys();
			break;
		}
	} while (ev.type != ButtonRelease);
	do_control(); //redraw the fonts
	XUngrabPointer(dpy, CurrentTime);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xf0, %rsp
movq 0x141aa(%rip), %rdi     # 0x187f8
movq 0x141bb(%rip), %rsi     # 0x18810
xorps %xmm0, %xmm0
movups %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
xorl %edx, %edx
movl $0x4c, %ecx
movl $0x1, %r8d
movl $0x1, %r9d
callq 0x2150
testl %eax, %eax
je 0x46c6
movq 0x14170(%rip), %rdi     # 0x187f8
movq 0x14181(%rip), %rsi     # 0x18810
leaq 0x28(%rsp), %rax
movq %rax, 0x10(%rsp)
leaq 0x2c(%rsp), %rax
movq %rax, 0x8(%rsp)
movq %rax, (%rsp)
leaq 0x30(%rsp), %rcx
leaq 0x24(%rsp), %r8
leaq 0x20(%rsp), %r9
movq %rcx, %rdx
callq 0x21b0
testl %eax, %eax
je 0x4759
xorl %r14d, %r14d
leaq 0x30(%rsp), %rbx
movq 0x14123(%rip), %rdi     # 0x187f8
movl $0x10804c, %esi         # imm = 0x10804C
movq %rbx, %rdx
callq 0x23d0
cmpl $0x6, 0x30(%rsp)
jne 0x473f
movq 0x68(%rsp), %r15
movq %r15, %rax
subq %r14, %rax
cmpq $0x11, %rax
jb 0x473f
movl 0x70(%rsp), %r8d
movl 0x74(%rsp), %r9d
movl 0x14126(%rip), %edx     # 0x18830
subl %edx, %r8d
movl %r8d, 0x14124(%rip)     # 0x18838
movl 0x1411a(%rip), %ecx     # 0x18834
subl %ecx, %r9d
movl %r9d, 0x14118(%rip)     # 0x1883c
movq 0x140cd(%rip), %rdi     # 0x187f8
movq 0x1423e(%rip), %rsi     # 0x18970
callq 0x2100
callq 0x2cfb
movq %r15, %r14
cmpl $0x5, 0x30(%rsp)
jne 0x46ce
callq 0x3ace
movq 0x140a6(%rip), %rdi     # 0x187f8
xorl %esi, %esi
callq 0x21d0
addq $0xf0, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/kyx0r[P]xkeyboard/xkeyboard.c
// Function: reset_keyspos
void reset_keyspos()
{
	int i;
	for (i = 0; i < MAX_KEYS; i++) {
		xk[i].x -= xkeyoffs; 
		xk[i].y -= ykeyoffs;
	}
	for (i = 0; i < NUM_BORDERS; i++) {
		mb[i].x	-= xkeyoffs;
		mb[i].y -= ykeyoffs;	
	}
	xkeyoffs = 0;
	ykeyoffs = 0;
}

// Assembly:
movl 0x18ae4(%rip), %eax     # 0x1d250
movl $0x8, %ecx
movl 0x18add(%rip), %edx     # 0x1d254
leaq 0x3bc2(%rip), %rsi      # 0x8340
subl %eax, -0x4(%rcx,%rsi)
subl %edx, (%rcx,%rsi)
addq $0x18, %rcx
cmpq $0x9e0, %rcx            # imm = 0x9E0
jne 0x477e
movl 0x18ab8(%rip), %eax     # 0x1d250
movl $0x4, %ecx
movl 0x18ab1(%rip), %edx     # 0x1d254
leaq 0x3a66(%rip), %rsi      # 0x8210
subl %eax, -0x4(%rcx,%rsi)
subl %edx, (%rcx,%rsi)
addq $0x10, %rcx
cmpq $0x134, %rcx            # imm = 0x134
jne 0x47aa
xorl %eax, %eax
movl %eax, 0x18a8a(%rip)     # 0x1d250
movl %eax, 0x18a88(%rip)     # 0x1d254
retq
// File: /workspace/github_c_makefile_star2_O1/kyx0r[P]xkeyboard/xkeyboard.c
// Function: wait_btn_press
void wait_btn_press()
{
	XEvent ev;
	if (XGrabPointer(dpy, root, False, MOUSEMASK, GrabModeAsync, GrabModeAsync,
		None, None, CurrentTime) != GrabSuccess)
		return;
	do {
		XMaskEvent(dpy, MOUSEMASK|ExposureMask|SubstructureRedirectMask, &ev);
	} while (ev.type != ButtonPress);
	XUngrabPointer(dpy, CurrentTime);
}

// Assembly:
pushq %rbx
subq $0xe0, %rsp
movq 0x13dd7(%rip), %rdi     # 0x187f8
movq 0x13de8(%rip), %rsi     # 0x18810
xorps %xmm0, %xmm0
movups %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
xorl %edx, %edx
movl $0x4c, %ecx
movl $0x1, %r8d
movl $0x1, %r9d
callq 0x2150
testl %eax, %eax
jne 0x4a82
leaq 0x20(%rsp), %rbx
movq 0x13d98(%rip), %rdi     # 0x187f8
movl $0x10804c, %esi         # imm = 0x10804C
movq %rbx, %rdx
callq 0x23d0
cmpl $0x4, 0x20(%rsp)
jne 0x4a59
movq 0x13d7d(%rip), %rdi     # 0x187f8
xorl %esi, %esi
callq 0x21d0
addq $0xe0, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/kyx0r[P]xkeyboard/xkeyboard.c
// Function: wait_btn_release
void wait_btn_release()
{
	XEvent ev;
	if (XGrabPointer(dpy, root, False, MOUSEMASK, GrabModeAsync, GrabModeAsync,
		None, None, CurrentTime) != GrabSuccess)
		return;
	do {
		XMaskEvent(dpy, MOUSEMASK|ExposureMask|SubstructureRedirectMask, &ev);
	} while (ev.type != ButtonRelease);
	XUngrabPointer(dpy, CurrentTime);
}

// Assembly:
pushq %rbx
subq $0xe0, %rsp
movq 0x13d5e(%rip), %rdi     # 0x187f8
movq 0x13d6f(%rip), %rsi     # 0x18810
xorps %xmm0, %xmm0
movups %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
xorl %edx, %edx
movl $0x4c, %ecx
movl $0x1, %r8d
movl $0x1, %r9d
callq 0x2150
testl %eax, %eax
jne 0x4afb
leaq 0x20(%rsp), %rbx
movq 0x13d1f(%rip), %rdi     # 0x187f8
movl $0x10804c, %esi         # imm = 0x10804C
movq %rbx, %rdx
callq 0x23d0
cmpl $0x5, 0x20(%rsp)
jne 0x4ad2
movq 0x13d04(%rip), %rdi     # 0x187f8
xorl %esi, %esi
callq 0x21d0
addq $0xe0, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/kyx0r[P]xkeyboard/xkeyboard.c
// Function: btn_press
void btn_press(Display *display, int button)
{
	// Create and setting up the event
	XEvent event;
	memset (&event, 0, sizeof (event));
	event.xbutton.button = button;
	event.xbutton.same_screen = True;
	event.xbutton.subwindow = DefaultRootWindow (display);
	while (event.xbutton.subwindow)
	{
		event.xbutton.window = event.xbutton.subwindow;
		XQueryPointer (display, event.xbutton.window,
				&event.xbutton.root, &event.xbutton.subwindow,
				&event.xbutton.x_root, &event.xbutton.y_root,
				&event.xbutton.x, &event.xbutton.y,
				&event.xbutton.state);
	}
	// Press
	if(event.xbutton.window != mousewin)
	{
		if(sendkey)
		{
			event.type = ButtonPress;
			if (XSendEvent (display, PointerWindow, True, ButtonPressMask, &event) == 0)
				fprintf (stderr, "Error to send the event!\n");
			XFlush (display);
		} else {
			XTestFakeButtonEvent(dpy, button, True, CurrentTime);
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movl $0xc0, %edx
movq %r14, %rdi
xorl %esi, %esi
callq 0x2130
movl %ebp, 0x4(%rsp)
movl %ebp, 0x54(%r14)
movl $0x1, 0x58(%r14)
movq 0xe8(%rbx), %rax
movslq 0xe0(%rbx), %rcx
shlq $0x7, %rcx
movq 0x10(%rax,%rcx), %rsi
movq %rsi, 0x30(%r14)
testq %rsi, %rsi
je 0x4bd2
leaq 0x50(%rsp), %r12
leaq 0x54(%rsp), %r13
leaq 0x48(%rsp), %rbp
leaq 0x4c(%rsp), %r14
leaq 0x58(%rsp), %r15
movq %rsi, 0x28(%rsp)
subq $0x8, %rsp
movq %rbx, %rdi
leaq 0x38(%rsp), %rdx
leaq 0x40(%rsp), %rcx
movq %r12, %r8
movq %r13, %r9
pushq %r15
pushq %r14
pushq %rbp
callq 0x21b0
addq $0x20, %rsp
movq 0x38(%rsp), %rsi
testq %rsi, %rsi
jne 0x4b9e
movq 0x28(%rsp), %rax
cmpq 0x13f62(%rip), %rax     # 0x18b40
je 0x4c2e
cmpl $0x0, 0x18665(%rip)     # 0x1d24c
je 0x4c17
leaq 0x8(%rsp), %r8
movl $0x4, (%r8)
movl $0x4, %ecx
movq %rbx, %rdi
xorl %esi, %esi
movl $0x1, %edx
callq 0x2030
testl %eax, %eax
je 0x4c40
movq %rbx, %rdi
callq 0x22f0
jmp 0x4c2e
movq 0x13bda(%rip), %rdi     # 0x187f8
movl 0x4(%rsp), %esi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0x2160
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x24e2
jmp 0x4c0d