LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/pali[P]bmfdec/bmfparse.c
// Function: print_variable_type
static void print_variable_type(FILE *fout, struct mof_variable *variable) {
  char *variable_type = "unknown";
  char *type = NULL;
  switch (variable->variable_type) {
  case MOF_VARIABLE_BASIC:
  case MOF_VARIABLE_BASIC_ARRAY:
    variable_type = "Basic";
    switch (variable->type.basic) {
    case MOF_BASIC_TYPE_STRING: type = "String"; break;
    case MOF_BASIC_TYPE_REAL64: type = "Real64"; break;
    case MOF_BASIC_TYPE_REAL32: type = "Real32"; break;
    case MOF_BASIC_TYPE_SINT32: type = "SInt32"; break;
    case MOF_BASIC_TYPE_UINT32: type = "UInt32"; break;
    case MOF_BASIC_TYPE_SINT16: type = "SInt16"; break;
    case MOF_BASIC_TYPE_UINT16: type = "UInt16"; break;
    case MOF_BASIC_TYPE_SINT64: type = "SInt64"; break;
    case MOF_BASIC_TYPE_UINT64: type = "UInt64"; break;
    case MOF_BASIC_TYPE_SINT8: type = "SInt8"; break;
    case MOF_BASIC_TYPE_UINT8: type = "UInt8"; break;
    case MOF_BASIC_TYPE_DATETIME: type = "Datetime"; break;
    case MOF_BASIC_TYPE_CHAR16: type = "Char16"; break;
    case MOF_BASIC_TYPE_BOOLEAN: type = "Boolean"; break;
    default: type = "unknown"; break;
    }
    break;
  case MOF_VARIABLE_OBJECT:
  case MOF_VARIABLE_OBJECT_ARRAY:
    variable_type = "Object";
    type = variable->type.object;
    break;
  default:
    break;
  }
  fprintf(fout, "%s", variable_type);
  if (type)
    fprintf(fout, ":%s", type);
  if (variable->variable_type == MOF_VARIABLE_BASIC_ARRAY || variable->variable_type == MOF_VARIABLE_OBJECT_ARRAY) {
    fprintf(fout, "[");
    if (variable->has_array_max)
      fprintf(fout, "%d", variable->array_max);
    fprintf(fout, "]");
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movl 0x18(%rsi), %eax
decl %eax
cmpl $0x3, %eax
ja 0x5ea0
leaq 0x12cc(%rip), %rcx      # 0x7100
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl 0x20(%r14), %eax
decl %eax
cmpl $0xd, %eax
ja 0x5e74
movl %eax, %eax
leaq 0x1303(%rip), %rcx      # 0x7154
movslq (%rcx,%rax,4), %r15
addq %rcx, %r15
jmp 0x5e7b
movq 0x20(%r14), %r15
leaq 0x1c6d(%rip), %rdi      # 0x7ad2
movq %rbx, %rsi
callq 0x10b0
testq %r15, %r15
jne 0x5e8a
jmp 0x5eaf
leaq 0x1586(%rip), %r15      # 0x7401
leaq 0x1c4a(%rip), %rdi      # 0x7acc
movq %rbx, %rsi
callq 0x10b0
leaq 0x1c48(%rip), %rsi      # 0x7ad9
movq %rbx, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x10f0
jmp 0x5eaf
leaq 0x155a(%rip), %rdi      # 0x7401
movq %rbx, %rsi
callq 0x10b0
movl 0x18(%r14), %eax
addl $-0x3, %eax
cmpl $0x1, %eax
ja 0x5ef6
movl $0x5b, %edi
movq %rbx, %rsi
callq 0x10c0
cmpb $0x0, 0x2c(%r14)
je 0x5ee4
movl 0x28(%r14), %edx
leaq 0x1c03(%rip), %rsi      # 0x7add
movq %rbx, %rdi
xorl %eax, %eax
callq 0x10f0
movl $0x5d, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x10c0
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/pali[P]bmfdec/bmfparse.c
// Function: print_variable
static void print_variable(FILE *fout, struct mof_variable *variable, int indent) {
  fprintf(fout, "%*.s  Name=%s\n", indent, "", variable->name);
  fprintf(fout, "%*.s  Type=", indent, "");
  print_variable_type(fout, variable);
  fprintf(fout, "\n");
  print_qualifiers(fout, variable->qualifiers, variable->qualifiers_count, indent+2);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r14
movq 0x10(%rsi), %r8
leaq 0x1aa2(%rip), %rsi      # 0x79b9
leaq 0x162c(%rip), %r12      # 0x754a
movq %r12, %rcx
xorl %eax, %eax
callq 0x10f0
leaq 0x1b91(%rip), %rsi      # 0x7ac0
movq %r14, %rdi
movl %ebx, %edx
movq %r12, %rcx
xorl %eax, %eax
callq 0x10f0
movq %r14, %rdi
movq %r15, %rsi
callq 0x5e18
movl $0xa, %edi
movq %r14, %rsi
callq 0x10c0
movq 0x8(%r15), %rsi
movl (%r15), %edx
addl $0x2, %ebx
movq %r14, %rdi
movl %ebx, %ecx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x5c1a
// File: /workspace/github_c_makefile_star2_O3/0x0203[P]schack_poc/./nuklear.h
// Function: nk_murmur_hash
NK_API nk_hash
nk_murmur_hash(const void * key, int len, nk_hash seed)
{
    /* 32-Bit MurmurHash3: https://code.google.com/p/smhasher/wiki/MurmurHash3*/
    #define NK_ROTL(x,r) ((x) << (r) | ((x) >> (32 - r)))
    union {const nk_uint *i; const nk_byte *b;} conv = {0};
    const nk_byte *data = (const nk_byte*)key;
    const int nblocks = len/4;
    nk_uint h1 = seed;
    const nk_uint c1 = 0xcc9e2d51;
    const nk_uint c2 = 0x1b873593;
    const nk_byte *tail;
    const nk_uint *blocks;
    nk_uint k1;
    int i;

    /* body */
    if (!key) return 0;
    conv.b = (data + nblocks*4);
    blocks = (const nk_uint*)conv.i;
    for (i = -nblocks; i; ++i) {
        k1 = blocks[i];
        k1 *= c1;
        k1 = NK_ROTL(k1,15);
        k1 *= c2;

        h1 ^= k1;
        h1 = NK_ROTL(h1,13);
        h1 = h1*5+0xe6546b64;
    }

    /* tail */
    tail = (const nk_byte*)(data + nblocks*4);
    k1 = 0;
    switch (len & 3) {
    case 3: k1 ^= (nk_uint)(tail[2] << 16); /* fallthrough */
    case 2: k1 ^= (nk_uint)(tail[1] << 8u); /* fallthrough */
    case 1: k1 ^= tail[0];
            k1 *= c1;
            k1 = NK_ROTL(k1,15);
            k1 *= c2;
            h1 ^= k1;
            break;
    default: break;
    }

    /* finalization */
    h1 ^= (nk_uint)len;
    /* fmix32 */
    h1 ^= h1 >> 16;
    h1 *= 0x85ebca6b;
    h1 ^= h1 >> 13;
    h1 *= 0xc2b2ae35;
    h1 ^= h1 >> 16;

    #undef NK_ROTL
    return h1;
}

// Assembly:
testq %rdi, %rdi
je 0x3f28
leal 0x3(%rsi), %ecx
testl %esi, %esi
movl %esi, %eax
cmovsl %ecx, %eax
movl %eax, %r8d
andl $-0x4, %r8d
movslq %r8d, %r8
addq %r8, %rdi
cmpl $0x7, %ecx
jb 0x3ebf
sarl $0x2, %eax
negl %eax
cltq
movl (%rdi,%rax,4), %ecx
imull $0xcc9e2d51, %ecx, %r8d # imm = 0xCC9E2D51
imull $0x16a88000, %ecx, %ecx # imm = 0x16A88000
shrl $0x11, %r8d
orl %ecx, %r8d
imull $0x1b873593, %r8d, %ecx # imm = 0x1B873593
xorl %edx, %ecx
roll $0xd, %ecx
leal (%rcx,%rcx,4), %edx
addl $0xe6546b64, %edx       # imm = 0xE6546B64
incq %rax
jne 0x3e8e
movl %esi, %ecx
andl $0x3, %ecx
xorl %eax, %eax
leaq 0x23783(%rip), %r8      # 0x27650
movslq (%r8,%rcx,4), %rcx
addq %r8, %rcx
jmpq *%rcx
movzbl 0x2(%rdi), %eax
shll $0x10, %eax
movzbl 0x1(%rdi), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movzbl (%rdi), %ecx
xorl %eax, %ecx
imull $0xcc9e2d51, %ecx, %eax # imm = 0xCC9E2D51
imull $0x16a88000, %ecx, %ecx # imm = 0x16A88000
shrl $0x11, %eax
orl %ecx, %eax
imull $0x1b873593, %eax, %eax # imm = 0x1B873593
xorl %eax, %edx
xorl %esi, %edx
movl %edx, %eax
shrl $0x10, %eax
xorl %edx, %eax
imull $0x85ebca6b, %eax, %eax # imm = 0x85EBCA6B
movl %eax, %ecx
shrl $0xd, %ecx
xorl %eax, %ecx
imull $0xc2b2ae35, %ecx, %ecx # imm = 0xC2B2AE35
movl %ecx, %eax
shrl $0x10, %eax
xorl %ecx, %eax
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/0x0203[P]schack_poc/./nuklear.h
// Function: nk_input_key
NK_API void
nk_input_key(struct nk_context *ctx, enum nk_keys key, int down)
{
    struct nk_input *in;
    NK_ASSERT(ctx);
    if (!ctx) return;
    in = &ctx->input;
    if (in->keyboard.keys[key].down != down)
        in->keyboard.keys[key].clicked++;
    in->keyboard.keys[key].down = down;
}

// Assembly:
testq %rdi, %rdi
je 0x821a
movl %esi, %eax
cmpl %edx, (%rdi,%rax,8)
je 0x8216
incl 0x4(%rdi,%rax,8)
movl %edx, (%rdi,%rax,8)
retq
pushq %rax
leaq 0x234b3(%rip), %rdi     # 0x2b6d5
leaq 0x2061a(%rip), %rsi     # 0x28843
leaq 0x216a6(%rip), %rcx     # 0x298d6
movl $0x365c, %edx           # imm = 0x365C
callq 0x3100
// File: /workspace/github_c_makefile_star2_O3/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 0x1f2f0
movq 0x1e34f(%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_O3/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r15
movq %rdi, %r14
movl $0x1, %edi
movl $0x38, %esi
callq 0x3470
movq %rax, %rbx
leaq 0x10(%rsp), %r13
leaq 0x4(%rsp), %rcx
leaq 0x20(%rsp), %r8
movq %r14, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x32a0
movq %rax, %r12
movq %rax, 0x10(%rbx)
movq (%r13), %rdi
testq %rdi, %rdi
je 0x1f396
movl 0x4(%rsp), %eax
subl $0x1, %eax
movl %eax, 0x4(%rsp)
jb 0x1f391
movq 0x19c91(%rip), %rbp     # 0x38ff0
leaq 0xdcd0(%rip), %r13      # 0x2d036
movq (%rbp), %rdi
movq 0x10(%rsp), %rcx
cltq
movq (%rcx,%rax,8), %rdx
movq %r13, %rsi
xorl %eax, %eax
callq 0x3560
movl 0x4(%rsp), %eax
subl $0x1, %eax
movl %eax, 0x4(%rsp)
jae 0x1f366
movq 0x10(%rsp), %rdi
callq 0x3440
testq %r12, %r12
je 0x1f3f2
movq %r12, %rdi
callq 0x30e0
leaq 0x8(%rsp), %rsi
leaq 0x18(%rsp), %rdx
movq %r12, %rdi
callq 0x3410
testl %eax, %eax
je 0x1f42b
movq 0x8(%rsp), %rsi
addq $0x8, %rsi
xorl %ecx, %ecx
xorl %edx, %edx
movl %edx, %edi
movl %ecx, %r8d
movq -0x8(%rsi), %rcx
movl 0x58(%rcx), %edx
cmpl %edx, %edi
cmovgl %edi, %edx
movl 0x5c(%rcx), %ecx
cmpl %ecx, %r8d
cmovgl %r8d, %ecx
movq %rsi, 0x8(%rsp)
addq $0x8, %rsi
decl %eax
jne 0x1f3c6
movl %edx, (%rbx)
jmp 0x1f426
movq %r14, %rdi
movq %r15, %rsi
callq 0x3400
movq %rax, 0x18(%rbx)
testq %rax, %rax
jne 0x1f41e
leaq 0xdc3e(%rip), %rsi      # 0x2d04b
movq %r14, %rdi
callq 0x3400
movq %rax, 0x18(%rbx)
testq %rax, %rax
je 0x1f446
movl 0x58(%rax), %edx
movl %edx, (%rbx)
movl 0x5c(%rax), %ecx
movl %ecx, 0x4(%rbx)
jmp 0x1f42f
xorl %ecx, %ecx
xorl %edx, %edx
addl %edx, %ecx
movl %ecx, 0x8(%rbx)
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x3200
xorl %ebx, %ebx
jmp 0x1f434
// File: /workspace/github_c_makefile_star2_O3/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 0x1f46b
pushq %rbx
movq %rsi, %rbx
movq 0x10(%rsi), %rsi
testq %rsi, %rsi
je 0x1f46c
callq 0x31e0
jmp 0x1f475
retq
movq 0x18(%rbx), %rsi
callq 0x3110
movq %rbx, %rdi
popq %rbx
jmp 0x3200
// File: /workspace/github_c_makefile_star2_O3/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 0x1f6f2
pushq %rbx
subq $0x10, %rsp
movq 0x10(%rdi), %rax
testq %rax, %rax
je 0x1f6dd
leaq 0x8(%rsp), %rbx
movq %rax, %rdi
xorl %ecx, %ecx
movq %rbx, %r8
callq 0x34a0
movzwl 0x4(%rbx), %eax
jmp 0x1f6e6
movq 0x18(%rdi), %rdi
callq 0x33a0
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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       # 0x1f6a4
movq %rcx, 0x30(%rdi)
movq %rax, 0x1a061(%rip)     # 0x39778
movl $0x0, 0x1c80f(%rip)     # 0x3bf30
cmpq $0x0, 0x1decf(%rip)     # 0x3d5f8
je 0x1f737
leaq 0x19ede(%rip), %rdi     # 0x39610
jmp 0x9e56
retq
// File: /workspace/github_c_makefile_star2_O3/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       # 0x1f6a4
movq %rax, 0x30(%rdi)
leaq 0x19eb4(%rip), %rdi     # 0x39610
jmp 0x9f00
// File: /workspace/github_c_makefile_star2_O3/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 0x1c8e0(%rip), %rax     # 0x3c048
cmpq %rax, %rsi
je 0x1f799
movq %rsi, 0x19e74(%rip)     # 0x395e8
movq 0x1dea5(%rip), %rdi     # 0x3d620
movq 0x1dea6(%rip), %r8      # 0x3d628
movl $0x1, %esi
movl $0x1f, %edx
movl $0x1, %ecx
xorl %r9d, %r9d
jmp 0x3150
pushq %rax
leaq 0xd8d7(%rip), %rdi      # 0x2d078
leaq 0xd91b(%rip), %rsi      # 0x2d0c3
leaq 0xd925(%rip), %rcx      # 0x2d0d4
movl $0x298, %edx            # imm = 0x298
callq 0x3100
// File: /workspace/github_c_makefile_star2_O3/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 0x19e0f(%rip), %rdi     # 0x395d8
callq 0x3200
movl $0x0, 0x19e08(%rip)     # 0x395e0
movslq %ebp, %r14
movq %r14, %rdi
callq 0x3170
movq %rax, 0x19dee(%rip)     # 0x395d8
testq %rax, %rax
je 0x1f83e
movq %rax, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x3580
movl %r14d, 0x19ddc(%rip)    # 0x395e0
movq 0x1de15(%rip), %rdi     # 0x3d620
movq 0x1de16(%rip), %rdx     # 0x3d628
movl $0x1, %esi
xorl %ecx, %ecx
callq 0x33b0
movq 0x1ddfb(%rip), %rdi     # 0x3d620
movq 0x19dc4(%rip), %rsi     # 0x395f0
movq 0x1ddf5(%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_O3/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 0x19397(%rip), %rbx     # 0x395d8
movq 0x1d3c8(%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 0x193a0(%rip), %rdi     # 0x39610
callq 0xa85a
movq 0x1d3a4(%rip), %rdi     # 0x3d620
movq 0x1d395(%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_O3/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 0x23c65
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 0x15364(%rip), %rbx     # 0x38ff0
movq (%rbx), %rdi
leaq 0xa895(%rip), %rsi      # 0x2e52b
callq 0x31c0
movq (%rbx), %rsi
leaq 0xc446(%rip), %rdi      # 0x300eb
callq 0x3330
movl $0x1, %edi
callq 0x30f0
// File: /workspace/github_c_makefile_star2_O3/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:
xorl %eax, %eax
testl %r9d, %r9d
je 0x23da0
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebp
testl %ecx, %ecx
je 0x23d92
movq %rdi, %r12
testq %rdi, %rdi
je 0x23d92
movq %rdx, %r15
testq %rdx, %rdx
je 0x23d92
movq %r8, %r14
testq %r8, %r8
je 0x23d92
movl %r9d, %ebx
movl %r9d, %ecx
imull %ebp, %ecx
leal (%rsi,%rcx), %r13d
decl %r13d
movl %r13d, %eax
cltd
idivl %ecx
subl %edx, %r13d
movslq %r13d, %rsi
movl $0x1, %edi
callq 0x3470
movq %rax, (%r15)
testq %rax, %rax
movl $0x0, %eax
je 0x23d92
testl %r13d, %r13d
jle 0x23d8f
movl %r13d, %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 0x23d6e
movl %r13d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x15d6(%rip), %rdx      # 0x3277
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 0x1160
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_O3/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 0x2265
movq (%rdi), %r15
callq 0x1030
movq %r15, %rdi
testq %r15, %r15
jne 0x2255
incq %r14
cmpq $0x2069, %r14           # imm = 0x2069
jne 0x224c
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x130c
testq %rax, %rax
jne 0x22a4
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
cmpl $-0x1, %ebp
jne 0x22d3
movq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x2109
movl %eax, %ebp
cmpl $-0x1, %eax
jne 0x22d3
movq 0x2d31(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
leaq 0xdb5(%rip), %rsi       # 0x3086
jmp 0x234d
movslq %ebp, %r15
leaq 0x16773(%rip), %r12     # 0x18a50
cmpb $0x0, (%r15,%r12)
jne 0x2327
movq 0x8(%rsp), %rsi
leaq 0x6410(%rip), %r8       # 0x8700
movq %rbx, %rdi
movl %ebp, %edx
movl $0x6, %ecx
callq 0x1ed8
movq 0x2cf2(%rip), %rcx      # 0x4ff8
movq (%rcx), %rdi
testl %eax, %eax
jne 0x2346
leaq 0xdfd(%rip), %rsi       # 0x3111
movq %r14, %rdx
movl %ebp, %ecx
xorl %eax, %eax
callq 0x1160
movb $0x1, (%r15,%r12)
jmp 0x2357
movq 0x2cca(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
leaq 0xd95(%rip), %rsi       # 0x30cd
movq %r14, %rdx
movl %ebp, %ecx
xorl %eax, %eax
callq 0x1160
jmp 0x2357
leaq 0xda9(%rip), %rsi       # 0x30f6
movq %r14, %rdx
xorl %eax, %eax
callq 0x1160
movq %rbx, %rdi
callq 0x1030
jmp 0x2297
// File: /workspace/github_c_makefile_star2_O3/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 0x244b
movq %rsi, %rbx
movl %edi, %ebp
leaq 0xda0(%rip), %r13       # 0x312a
leaq 0x4(%rsp), %r12
movl %edi, (%rsp)
movslq %r15d, %r14
movq (%rbx,%r14,8), %rdi
cmpb $0x2d, (%rdi)
jne 0x244b
cmpb $0x65, 0x1(%rdi)
jne 0x23ae
cmpb $0x0, 0x2(%rdi)
je 0x240d
movq %r13, %rsi
movq %r12, %rdx
xorl %eax, %eax
callq 0x11a0
cmpl $0x2, %eax
jne 0x23f9
movq %r12, %rbp
movq %r13, %r12
movl 0x4(%rsp), %r13d
leal -0x1a(%r13), %eax
cmpl $-0x1a, %eax
jbe 0x242e
movq (%rbx,%r14,8), %rdi
movl $0x3d, %esi
callq 0x10e0
leaq 0x1(%rax), %rdi
movl %r13d, %esi
callq 0x2277
movq %r12, %r13
movq %rbp, %r12
movl (%rsp), %ebp
jmp 0x2420
movq (%rbx,%r14,8), %rax
movb 0x1(%rax), %al
addb $-0x63, %al
cmpb $0x2, %al
adcl $0x0, %r14d
movl %r14d, %r15d
jmp 0x2420
leal 0x1(%r14), %r15d
movq 0x8(%rbx,%r14,8), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x2277
incl %r15d
cmpl %ebp, %r15d
jl 0x2392
jmp 0x244b
movq 0x2bc3(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
leaq 0xcf1(%rip), %rsi       # 0x3130
movl %r13d, %edx
xorl %eax, %eax
callq 0x1160
jmp 0x23ee
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_O3/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 0x2a8a(%rip), %rdi      # 0x5160
leaq 0x6023(%rip), %r8       # 0x8700
movl $0x2cfe, %esi           # imm = 0x2CFE
xorl %edx, %edx
movl $0xffffff3e, %ecx       # imm = 0xFFFFFF3E
callq 0x1ed8
cmpb $0x0, 0x1635c(%rip)     # 0x18a51
jne 0x2719
leaq 0x5762(%rip), %rdi      # 0x7e60
leaq 0x5ffb(%rip), %r8       # 0x8700
movl $0x3ce, %esi            # imm = 0x3CE
movl $0x1, %edx
movl $0x6, %ecx
callq 0x1ed8
cmpb $0x0, 0x16332(%rip)     # 0x18a52
jne 0x2744
leaq 0x5b07(%rip), %rdi      # 0x8230
leaq 0x5fd0(%rip), %r8       # 0x8700
movl $0xa4, %esi
movl $0x2, %edx
movl $0x6, %ecx
callq 0x1ed8
cmpb $0x0, 0x16308(%rip)     # 0x18a53
jne 0x276f
leaq 0x5b8c(%rip), %rdi      # 0x82e0
leaq 0x5fa5(%rip), %r8       # 0x8700
movl $0x70, %esi
movl $0x3, %edx
movl $0x6, %ecx
callq 0x1ed8
cmpb $0x0, 0x162e0(%rip)     # 0x18a56
je 0x277a
popq %rax
retq
leaq 0x5bcf(%rip), %rdi      # 0x8350
leaq 0x5f78(%rip), %r8       # 0x8700
movl $0x394, %esi            # imm = 0x394
movl $0x6, %edx
movl $0x6, %ecx
popq %rax
jmp 0x1ed8
// File: /workspace/github_c_makefile_star2_O3/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 0x27de
leaq 0xad9(%rip), %rdi       # 0x3290
callq 0x1090
movq (%r14), %rsi
leaq 0xa1f(%rip), %rdi       # 0x31e5
xorl %eax, %eax
callq 0x10f0
leaq 0xae1(%rip), %rdi       # 0x32b5
callq 0x1090
jmp 0x28cb
movl %edi, %ebx
movq %r14, %rsi
callq 0x2364
movl %eax, %ebp
movl %ebx, %edi
movq %r14, %rsi
callq 0x245d
callq 0x26ce
subl %ebp, %ebx
jle 0x289d
movslq %ebp, %rax
leaq (%r14,%rax,8), %r14
movq %rsp, %r15
leaq 0xa43(%rip), %rbp       # 0x3255
leaq 0x9f1(%rip), %r12       # 0x320a
movq (%r14), %rdi
movq %r15, %rsi
callq 0x130c
testq %rax, %rax
je 0x2886
movq %rax, %r13
movq (%rsp), %rsi
movq %rbp, %rcx
cmpq $0x22, %rsi
jb 0x2890
movl (%r13), %eax
bswapl %eax
movq %rbp, %rcx
cmpl $0x414d4f53, %eax       # imm = 0x414D4F53
jne 0x2890
movl 0x10(%r13), %eax
bswapl %eax
addq $-0x14, %rsi
cmpq %rax, %rsi
cmovael %eax, %esi
movq %r13, %rdi
addq $0x14, %rdi
movq 0x2771(%rip), %rax      # 0x4fd8
movq (%rax), %rdx
leaq 0x5e8f(%rip), %rcx      # 0x8700
callq 0x1443
movq %r12, %rcx
cmpl $0x4, %eax
jae 0x2890
movq %r13, %rdi
callq 0x1030
addq $0x8, %r14
decl %ebx
jne 0x2819
jmp 0x289d
movq %r14, %rdi
movq %rcx, %rsi
callq 0x1200
jmp 0x287e
xorl %ebx, %ebx
leaq 0x5e5a(%rip), %r14      # 0x8700
movq (%r14,%rbx,8), %rdi
testq %rdi, %rdi
je 0x28bf
movq (%rdi), %r15
callq 0x1030
movq %r15, %rdi
testq %r15, %r15
jne 0x28af
incq %rbx
cmpq $0x2069, %rbx           # imm = 0x2069
jne 0x28a6
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_O3/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 0x14d8b(%rip), %eax     # 0x187f0
andl $0x3, %eax
movl %eax, 0x14d82(%rip)     # 0x187f0
movq 0x14d83(%rip), %rdi     # 0x187f8
leaq 0x2588(%rip), %rcx      # 0x6004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x25c5(%rip), %rsi      # 0x6051
callq 0x2140
testq %rax, %rax
je 0x3ba8
movq %rax, %rbx
movl $0x1, %eax
movl $0x10, %edx
movl $0x20, %esi
movl $0x1, %ecx
jmp 0x3b3b
leaq 0x261e(%rip), %rsi      # 0x60db
callq 0x2140
testq %rax, %rax
je 0x3ba8
movq %rax, %rbx
movl $0x4, %ecx
movl $0x7, %eax
movl $0xffffffc0, %edx       # imm = 0xFFFFFFC0
movl $0xfffffff4, %esi       # imm = 0xFFFFFFF4
jmp 0x3b3b
leaq 0x2614(%rip), %rsi      # 0x60ff
callq 0x2140
testq %rax, %rax
je 0x3ba8
movq %rax, %rbx
movl $0x1, %ecx
movl $0x2, %eax
movl $0xffffffc0, %edx       # imm = 0xFFFFFFC0
movl $0xffffffd0, %esi       # imm = 0xFFFFFFD0
jmp 0x3b3b
leaq 0x25c2(%rip), %rsi      # 0x60db
callq 0x2140
testq %rax, %rax
je 0x3ba8
movq %rax, %rbx
movl $0x2, %ecx
movl $0x3, %eax
movl $0xffffffd0, %edx       # imm = 0xFFFFFFD0
xorl %esi, %esi
movl %esi, 0x15017(%rip)     # 0x18b58
movl %edx, 0x15015(%rip)     # 0x18b5c
movl %eax, 0x14ee3(%rip)     # 0x18a30
movl %ecx, 0x14ee1(%rip)     # 0x18a34
movq 0x14c9e(%rip), %rdi     # 0x187f8
movq 0x14eb7(%rip), %rsi     # 0x18a18
callq 0x2090
movq %rbx, 0x14eab(%rip)     # 0x18a18
movq 0x14c84(%rip), %rdi     # 0x187f8
movq 0x14e95(%rip), %rsi     # 0x18a10
movq 0x8(%rbx), %rdx
callq 0x2120
movq 0x14c6d(%rip), %rdi     # 0x187f8
movq 0x14e8e(%rip), %rsi     # 0x18a20
movq 0x14e7f(%rip), %rax     # 0x18a18
movq 0x8(%rax), %rdx
callq 0x2120
popq %rbx
jmp 0x3873
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x144a2(%rip), %ecx     # 0x18834
movl 0x144a3(%rip), %r9d     # 0x1883c
leal (%r9,%rcx), %eax
cmpl 0x14465(%rip), %eax     # 0x18808
jle 0x43b4
subl %r9d, %ecx
addl 0x10dc6(%rip), %ecx     # 0x15174
movl %ecx, 0x14480(%rip)     # 0x18834
pushq %rax
movq 0x1443c(%rip), %rdi     # 0x187f8
movq 0x145ad(%rip), %rsi     # 0x18970
movl 0x14467(%rip), %edx     # 0x18830
movl 0x14468(%rip), %r8d     # 0x18838
callq 0x2100
popq %rax
jmp 0x2cfb
// File: /workspace/github_c_makefile_star2_O3/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 0x143c2(%rip), %rdi     # 0x187f8
movq 0x146fb(%rip), %rsi     # 0x18b38
movq 0x14694(%rip), %rdx     # 0x18ad8
callq 0x2320
movq 0x143a8(%rip), %rdi     # 0x187f8
movq 0x146e1(%rip), %rsi     # 0x18b38
callq 0x2060
movq 0x14395(%rip), %rdi     # 0x187f8
movq 0x143a6(%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 0x45aa
movq 0x14357(%rip), %rdi     # 0x187f8
movq 0x14368(%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 0x45aa
xorl %r15d, %r15d
leaq 0x38(%rsp), %r14
xorl %r12d, %r12d
xorl %ebx, %ebx
movq 0x14305(%rip), %rdi     # 0x187f8
movl $0x10804c, %esi         # imm = 0x10804C
movq %r14, %rdx
callq 0x23d0
movl 0x38(%rsp), %eax
cmpl $0x6, %eax
jne 0x454f
movq 0x70(%rsp), %r13
movq %r13, %rcx
subq %rbx, %rcx
movl $0x6, %eax
cmpq $0x11, %rcx
jb 0x454f
movl 0x78(%rsp), %r15d
movl 0x7c(%rsp), %r12d
movq 0x142c8(%rip), %rdi     # 0x187f8
movq 0x14439(%rip), %rsi     # 0x18970
movl %r15d, %edx
subl %ebp, %edx
movl %r12d, %ecx
subl 0x24(%rsp), %ecx
callq 0x20f0
movl 0x38(%rsp), %eax
movq %r13, %rbx
cmpl $0x5, %eax
jne 0x44ec
subl %ebp, %r15d
movl %r15d, 0x142d2(%rip)    # 0x18830
subl 0x24(%rsp), %r12d
movl %r12d, 0x142ca(%rip)    # 0x18834
movq 0x14287(%rip), %rdi     # 0x187f8
movq 0x145c0(%rip), %rsi     # 0x18b38
movq 0x14561(%rip), %rdx     # 0x18ae0
callq 0x2320
movq 0x1426d(%rip), %rdi     # 0x187f8
movq 0x145a6(%rip), %rsi     # 0x18b38
callq 0x2060
callq 0x3a5e
movq 0x14255(%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_O3/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 0x14229(%rip), %rdi     # 0x187f8
movq 0x1423a(%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 0x4647
movq 0x141ef(%rip), %rdi     # 0x187f8
movq 0x14200(%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 0x46e7
xorl %r14d, %r14d
leaq 0x30(%rsp), %rbx
movq 0x141a2(%rip), %rdi     # 0x187f8
movl $0x10804c, %esi         # imm = 0x10804C
movq %rbx, %rdx
callq 0x23d0
movl 0x30(%rsp), %eax
cmpl $0x6, %eax
jne 0x46cb
movq 0x68(%rsp), %r15
movq %r15, %rcx
subq %r14, %rcx
movl $0x6, %eax
cmpq $0x11, %rcx
jb 0x46cb
movl 0x70(%rsp), %r8d
movl 0x74(%rsp), %r9d
movl 0x1419e(%rip), %edx     # 0x18830
subl %edx, %r8d
movl %r8d, 0x1419c(%rip)     # 0x18838
movl 0x14192(%rip), %ecx     # 0x18834
subl %ecx, %r9d
movl %r9d, 0x14190(%rip)     # 0x1883c
movq 0x14145(%rip), %rdi     # 0x187f8
movq 0x142b6(%rip), %rsi     # 0x18970
callq 0x2100
callq 0x2cfb
movl 0x30(%rsp), %eax
movq %r15, %r14
cmpl $0x5, %eax
jne 0x464f
callq 0x3a5e
movq 0x14118(%rip), %rdi     # 0x187f8
xorl %esi, %esi
callq 0x21d0
addq $0xf0, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x18b56(%rip), %eax     # 0x1d250
movl $0x8, %edx
movl 0x18b4f(%rip), %ecx     # 0x1d254
leaq 0x3c34(%rip), %rsi      # 0x8340
subl %eax, -0x4(%rdx,%rsi)
subl %ecx, (%rdx,%rsi)
addq $0x18, %rdx
cmpq $0x9e0, %rdx            # imm = 0x9E0
jne 0x470c
movl $0x4, %edx
leaq 0x3ae4(%rip), %rsi      # 0x8210
subl %eax, -0x4(%rdx,%rsi)
subl %ecx, (%rdx,%rsi)
addq $0x10, %rdx
cmpq $0x134, %rdx            # imm = 0x134
jne 0x472c
xorl %eax, %eax
movl %eax, 0x18b08(%rip)     # 0x1d250
movl %eax, 0x18b06(%rip)     # 0x1d254
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x13e4c(%rip), %rdi     # 0x187f8
movq 0x13e5d(%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 0x4a0d
leaq 0x20(%rsp), %rbx
movq 0x13e0d(%rip), %rdi     # 0x187f8
movl $0x10804c, %esi         # imm = 0x10804C
movq %rbx, %rdx
callq 0x23d0
cmpl $0x4, 0x20(%rsp)
jne 0x49e4
movq 0x13df2(%rip), %rdi     # 0x187f8
xorl %esi, %esi
callq 0x21d0
addq $0xe0, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x13dd3(%rip), %rdi     # 0x187f8
movq 0x13de4(%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 0x4a86
leaq 0x20(%rsp), %rbx
movq 0x13d94(%rip), %rdi     # 0x187f8
movl $0x10804c, %esi         # imm = 0x10804C
movq %rbx, %rdx
callq 0x23d0
cmpl $0x5, 0x20(%rsp)
jne 0x4a5d
movq 0x13d79(%rip), %rdi     # 0x187f8
xorl %esi, %esi
callq 0x21d0
addq $0xe0, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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
xorl %r15d, %r15d
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 0x4b65
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 0x4b2c
movq 0x28(%rsp), %r15
cmpq 0x13fd4(%rip), %r15     # 0x18b40
je 0x4bbc
cmpl $0x0, 0x186d7(%rip)     # 0x1d24c
je 0x4ba5
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 0x4bce
movq %rbx, %rdi
callq 0x22f0
jmp 0x4bbc
movq 0x13c4c(%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 0x4b9b
// File: /workspace/github_c_makefile_star2_O3/kyx0r[P]xkeyboard/xkeyboard.c
// Function: btn_release
void btn_release(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);
	}
	if(event.xbutton.window != mousewin)
	{
		if(sendkey)
		{
			event.type = ButtonRelease;
			if (XSendEvent (display, PointerWindow, True, ButtonReleaseMask, &event) == 0)
				fprintf (stderr, "Error to send the event!\n");
			XFlush (display);
		} else {
			XTestFakeButtonEvent(dpy, button, False, 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
xorl %r15d, %r15d
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 0x4c84
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 0x4c4b
movq 0x28(%rsp), %r15
cmpq 0x13eb5(%rip), %r15     # 0x18b40
je 0x4cd8
cmpl $0x0, 0x185b8(%rip)     # 0x1d24c
je 0x4cc4
leaq 0x8(%rsp), %r8
movl $0x5, (%r8)
movl $0x8, %ecx
movq %rbx, %rdi
xorl %esi, %esi
movl $0x1, %edx
callq 0x2030
testl %eax, %eax
je 0x4cea
movq %rbx, %rdi
callq 0x22f0
jmp 0x4cd8
movq 0x13b2d(%rip), %rdi     # 0x187f8
movl 0x4(%rsp), %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x2160
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x2504
jmp 0x4cba