LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/kaugm[P]mmwm/mmwm.c
// Function: mapnotify
void mapnotify(xcb_generic_event_t *e)
{
    xcb_map_notify_event_t *ev = (xcb_map_notify_event_t *)e;

    DEBUG("xcb: map notify");

    if (wintoclient(ev->window))
        return;

    xcb_window_t wins[] = {ev->window};
    xcb_get_window_attributes_reply_t *attr[1];

    xcb_get_attributes(wins, attr, 1);
    if (!attr[0])
        return;     /* dead on arrival */
    if (attr[0]->override_redirect) {
        free(attr[0]);
        return;
    }
    else
        free(attr[0]);

    if (wintoalien(&aliens, ev->window)) {
        DEBUG("alien window already in list");
        return;
    }

    xcb_ewmh_get_atoms_reply_t type;
    if (xcb_ewmh_get_wm_window_type_reply(ewmh,
                                xcb_ewmh_get_wm_window_type(ewmh,
                                ev->window), &type, NULL) == 1) {
        create_alien(ev->window, type.atoms[0]);
        xcb_ewmh_get_atoms_reply_wipe(&type);
        DEBUG("caught a new selfmapped window");
    }
    else {
        DEBUG("alien has no _NET_WM_WINDOW_TYPE property");
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
movl 0x8(%rdi), %ebp
movl %ebp, %edi
callq 0x65c7
testq %rax, %rax
je 0x5698
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0xc(%rsp), %rdi
movl %ebp, (%rdi)
leaq 0x10(%rsp), %r14
movq %r14, %rsi
callq 0x6991
movq (%r14), %rdi
testq %rdi, %rdi
je 0x568f
movb 0x1b(%rdi), %bpl
callq 0x3050
testb %bpl, %bpl
jne 0x568f
movl 0x8(%rbx), %ebp
movl %ebp, %edi
callq 0x6970
testq %rax, %rax
jne 0x568f
movq 0x5090(%rip), %r14      # 0xa768
movq %r14, %rdi
movl %ebp, %esi
callq 0x3560
leaq 0x18(%rsp), %rdx
movq %r14, %rdi
movl %eax, %esi
xorl %ecx, %ecx
callq 0x35d0
cmpb $0x1, %al
jne 0x568f
movl 0x8(%rbx), %edi
leaq 0x18(%rsp), %rbx
movq 0x8(%rbx), %rax
movl (%rax), %esi
callq 0x69bb
movq %rbx, %rdi
callq 0x3040
jmp 0x568f
// File: /workspace/github_c_makefile_star2_O2/kaugm[P]mmwm/mmwm.c
// Function: propertynotify
void propertynotify(xcb_generic_event_t *e)
{
    xcb_property_notify_event_t *ev = (xcb_property_notify_event_t *)e;
    xcb_icccm_wm_hints_t wmh;
    client *c;

    DEBUG("xcb: property notify");

#ifdef EWMH_TASKBAR
    if (ev->atom == ewmh->_NET_WM_STRUT
     || ev->atom == ewmh->_NET_WM_STRUT_PARTIAL) {
        tile();
        return;
    }
#endif /* EWMH_TASKBAR */

    c = wintoclient(ev->window);
    if (!c || ev->atom != XCB_ICCCM_WM_ALL_HINTS)
        return;
    DEBUG("xcb: got hint!");
    if (xcb_icccm_get_wm_hints_reply(dis,
                                     xcb_icccm_get_wm_hints(dis, ev->window),
                                                            &wmh, NULL))
                                     /* TODO: error handling */
        c->isurgent = c != M_CURRENT &&
                           (wmh.flags & XCB_ICCCM_WM_HINT_X_URGENCY);
    desktopinfo();
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
movl 0x4(%rdi), %ebp
movl %ebp, %edi
callq 0x65c7
testq %rax, %rax
je 0x5b03
cmpl $0x7f, 0x8(%r14)
jne 0x5b03
movq %rax, %rbx
movq 0x4c8e(%rip), %r14      # 0xa750
movq %r14, %rdi
movl %ebp, %esi
callq 0x3030
leaq 0xc(%rsp), %rdx
movq %r14, %rdi
movl %eax, %esi
xorl %ecx, %ecx
callq 0x3630
testb %al, %al
je 0x5afe
movq 0x4c98(%rip), %rax      # 0xa780
cmpq 0x30(%rax), %rbx
setne %al
movl 0xc(%rsp), %ecx
shrl $0x8, %ecx
andl $0x1, %ecx
andb %al, %cl
movb %cl, 0x18(%rbx)
callq 0x4b1f
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/kaugm[P]mmwm/mmwm.c
// Function: unmapnotify
void unmapnotify(xcb_generic_event_t *e)
{
    xcb_unmap_notify_event_t *ev = (xcb_unmap_notify_event_t *)e;
    client *c = wintoclient(ev->window);

    DEBUG("xcb: unmap notify");

    if (c && on_current_desktop(c)) {
        if (c->isfullscreen)
            destroy_display(c);
        removeclient(c);
        desktopinfo();
    }
}

// Assembly:
pushq %rbx
movl 0x8(%rdi), %edi
callq 0x65c7
testq %rax, %rax
je 0x5b5a
movq %rax, %rbx
movq 0x4c5c(%rip), %rcx      # 0xa780
addq $0x18, %rcx
movq (%rcx), %rax
testq %rax, %rax
je 0x5b39
leaq 0x8(%rax), %rcx
cmpq %rbx, %rax
jne 0x5b28
testq %rax, %rax
je 0x5b5a
cmpb $0x1, 0x1b(%rbx)
jne 0x5b4c
movq %rbx, %rdi
callq 0x3c39
movq %rbx, %rdi
callq 0x6543
popq %rbx
jmp 0x4b1f
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/kaugm[P]mmwm/mmwm.c
// Function: addwindow
client *addwindow(xcb_window_t win, xcb_atom_t wtype)
{
    client *c = create_client(win, wtype);

/* c is valid, else we would not get here */
    if (!check_head(&current_display->clients)) {
        add_head(&current_display->clients, &c->link);
    }
    else {
        if (!ATTACH_ASIDE)
            add_head(&current_display->clients, &c->link);
        else
            add_tail(&current_display->clients, &c->link);
    }
    DEBUG("client added");
    setwindefattr(win);
    return c;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movl %esi, %r14d
movl %edi, %ebp
pushq $0x1
popq %rdi
pushq $0x48
popq %rsi
callq 0x32f0
testq %rax, %rax
je 0x5d44
movq %rax, %rbx
movl %ebp, 0x20(%rax)
movl %r14d, 0x24(%rax)
orl $-0x1, 0x40(%rax)
movb $0x1, 0x44(%rax)
movq 0x4a90(%rip), %r14      # 0xa750
movq %r14, %rdi
movl %ebp, %esi
callq 0x3030
leaq 0xc(%rsp), %rdx
movq %r14, %rdi
movl %eax, %esi
xorl %ecx, %ecx
callq 0x3630
testb %al, %al
je 0x5ce8
cmpl $0x0, 0x10(%rsp)
setne 0x44(%rbx)
movl %ebp, %edi
callq 0x6917
movd 0xc(%rax), %xmm0
pshuflw $0x60, %xmm0, %xmm0     # xmm0 = xmm0[0,0,2,1,4,5,6,7]
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
psrad $0x10, %xmm0
movdqu %xmm0, 0x30(%rbx)
movq %rax, %rdi
callq 0x3050
movq 0x4a69(%rip), %rax      # 0xa780
leaq 0x18(%rax), %rdi
cmpq $0x0, 0x18(%rax)
je 0x5d2c
movq %rbx, %rsi
callq 0x4d07
jmp 0x5d38
movq %rbx, 0x20(%rax)
movq %rbx, 0x18(%rax)
movq %rdi, 0x10(%rbx)
movq %rbx, %rax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x150c(%rip), %rsi      # 0x7257
pushq $0x1
popq %rdi
xorl %eax, %eax
callq 0x33f0
// File: /workspace/github_c_makefile_star2_O2/kaugm[P]mmwm/mmwm.c
// Function: grabbuttons
void grabbuttons(client *c)
{
    unsigned int modifiers[] = { 0, XCB_MOD_MASK_LOCK, numlockmask,
                                 numlockmask|XCB_MOD_MASK_LOCK };
    if (!c)
        return;

    xcb_ungrab_button(dis, XCB_BUTTON_INDEX_ANY, c->win, XCB_GRAB_ANY);
    for (unsigned int b = 0; b < LENGTH(buttons); b++)
        for (unsigned int m = 0; m < LENGTH(modifiers); m++)
            if (CLICK_TO_FOCUS)
                xcb_grab_button(dis, 1, c->win, XCB_EVENT_MASK_BUTTON_PRESS,
                                XCB_GRAB_MODE_SYNC, XCB_GRAB_MODE_ASYNC,
                                XCB_WINDOW_NONE, XCB_CURSOR_NONE,
                                XCB_BUTTON_INDEX_ANY, XCB_BUTTON_MASK_ANY);
            else
                xcb_grab_button(dis, 1, c->win, XCB_EVENT_MASK_BUTTON_PRESS,
                                XCB_GRAB_MODE_SYNC, XCB_GRAB_MODE_ASYNC,
                                XCB_WINDOW_NONE, XCB_CURSOR_NONE,
                                buttons[b].button,
                                buttons[b].mask|modifiers[m]);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x49e9(%rip), %rdi      # 0xa750
movl 0x20(%rbx), %edx
xorl %r15d, %r15d
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x34c0
pushq $0x4
popq %rbp
pushq $0x1
popq %r14
cmpl $0x5, %r15d
je 0x5dbc
movl %ebp, %r12d
subl $0x1, %r12d
jb 0x5db7
movq 0x49bd(%rip), %rdi      # 0xa750
movl 0x20(%rbx), %edx
movl %r14d, %esi
movl %ebp, %ecx
xorl %r8d, %r8d
movl %r14d, %r9d
pushq $0x8000                 # imm = 0x8000
pushq $0x0
pushq $0x0
pushq $0x0
callq 0x3310
addq $0x20, %rsp
jmp 0x5d86
incl %r15d
jmp 0x5d7d
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/kaugm[P]mmwm/mmwm.c
// Function: change_desktop
void change_desktop(const Arg *arg)
{
    if (arg->i == current_desktop_number || arg->i > DESKTOPS-1)
        return;
    previous_desktop = current_desktop_number;
    select_desktop(arg->i);
    if (show) {
        if (M_CURRENT)
            xcb_move(dis, M_CURRENT->win, M_CURRENT->position_info.previous_x, M_CURRENT->position_info.previous_y, &M_CURRENT->position_info);
        for (client *c = M_HEAD; c; c = M_GETNEXT(c)) {
            if (c != M_CURRENT)
                xcb_move(dis, c->win, c->position_info.previous_x, c->position_info.previous_y, &c->position_info);
        }
    }
    select_desktop(previous_desktop);
    for (client *c = M_HEAD; c; c = M_GETNEXT(c)) {
        if (c != M_CURRENT)
            xcb_move(dis, c->win, -2 * M_WW, 0, &c->position_info);
    }
    if (M_CURRENT)
        xcb_move(dis, M_CURRENT->win, -2 * M_WW, 0, &M_CURRENT->position_info);
    select_desktop(arg->i);
    update_current(M_CURRENT);
    desktopinfo();
    xcb_ewmh_set_current_desktop(ewmh, default_screen, arg->i);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl (%rdi), %edi
movl 0x49d4(%rip), %eax      # 0xa7a8
cmpl %eax, %edi
sete %cl
cmpl $0xa, %edi
setge %dl
orb %cl, %dl
je 0x5deb
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl %eax, 0x4e0b(%rip)      # 0xabfc
callq 0x4ca0
movq 0x4983(%rip), %r14      # 0xa780
movq 0x30(%r14), %rax
testq %rax, %rax
je 0x5e26
movq 0x4943(%rip), %rdi      # 0xa750
leaq 0x30(%rax), %r8
movl 0x20(%rax), %esi
movl 0x30(%rax), %edx
movl 0x34(%rax), %ecx
callq 0x4c77
movq 0x495a(%rip), %r14      # 0xa780
addq $0x18, %r14
movq (%r14), %r14
testq %r14, %r14
je 0x5e61
movq 0x4947(%rip), %rax      # 0xa780
cmpq 0x30(%rax), %r14
je 0x5e5b
movq 0x490a(%rip), %rdi      # 0xa750
leaq 0x30(%r14), %r8
movl 0x20(%r14), %esi
movl 0x30(%r14), %edx
movl 0x34(%r14), %ecx
callq 0x4c77
addq $0x8, %r14
jmp 0x5e2a
movl 0x4d95(%rip), %edi      # 0xabfc
callq 0x4ca0
movq 0x490d(%rip), %r14      # 0xa780
addq $0x18, %r14
movq (%r14), %r14
movq 0x48ff(%rip), %rax      # 0xa780
movq 0x30(%rax), %r8
testq %r14, %r14
je 0x5eb9
cmpq %r8, %r14
je 0x5eb3
movq 0x48ba(%rip), %rdi      # 0xa750
movl 0x20(%r14), %esi
movq 0x48e7(%rip), %rax      # 0xa788
movl 0x34(%rax), %edx
addl %edx, %edx
negl %edx
leaq 0x30(%r14), %r8
xorl %ecx, %ecx
callq 0x4c77
addq $0x8, %r14
jmp 0x5e77
testq %r8, %r8
je 0x5ee2
movq 0x488b(%rip), %rdi      # 0xa750
movl 0x20(%r8), %esi
movq 0x48b8(%rip), %rax      # 0xa788
movl 0x34(%rax), %edx
addl %edx, %edx
negl %edx
addq $0x30, %r8
xorl %ecx, %ecx
callq 0x4c77
movl (%rbx), %edi
callq 0x4ca0
movq 0x4890(%rip), %rax      # 0xa780
movq 0x30(%rax), %rdi
callq 0x3cfa
callq 0x4b1f
movq 0x4863(%rip), %rdi      # 0xa768
movl 0x486d(%rip), %esi      # 0xa778
movl (%rbx), %edx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3540
// File: /workspace/github_c_makefile_star2_O2/kaugm[P]mmwm/mmwm.c
// Function: switch_mode
void switch_mode(const Arg *arg)
{
    if (M_MODE == arg->i)
        for (client *c = M_HEAD; c; c = M_GETNEXT(c))
            unfloat_client(c);
    M_MODE = arg->i;
    tile();
    update_current(M_CURRENT);
    desktopinfo();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x485c(%rip), %r14      # 0xa780
movl (%rdi), %eax
cmpl %eax, 0x5c(%r14)
jne 0x5f73
movq %rdi, %rbx
addq $0x18, %r14
movq (%r14), %r14
testq %r14, %r14
je 0x5f6a
movb $0x0, 0x1a(%r14)
movl 0x20(%r14), %edi
callq 0x6917
movd 0x10(%rax), %xmm0
punpcklwd 0x10ba(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1],xmm0[2],mem[2],xmm0[3],mem[3]
movq %xmm0, 0x28(%r14)
movq %rax, %rdi
callq 0x3050
addq $0x8, %r14
jmp 0x5f33
movl (%rbx), %eax
movq 0x480d(%rip), %r14      # 0xa780
movl %eax, 0x5c(%r14)
callq 0x4d79
movq 0x47fd(%rip), %rax      # 0xa780
movq 0x30(%rax), %rdi
callq 0x3cfa
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x4b1f
// File: /workspace/github_c_makefile_star2_O2/kaugm[P]mmwm/mmwm.c
// Function: spawn
void spawn(const Arg *arg)
{
    if (fork())
        return;
    if (dis)
        close(screen->root);
    setsid();
    execvp((char *)arg->com[0], (char **)arg->com);
    err(EXIT_SUCCESS, "error: execvp %s", (char *)arg->com[0]);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x3650
testl %eax, %eax
je 0x5fec
popq %rbx
retq
cmpq $0x0, 0x475c(%rip)      # 0xa750
je 0x6004
movq 0x4773(%rip), %rax      # 0xa770
movl (%rax), %edi
callq 0x3290
callq 0x32c0
movq (%rbx), %rsi
movq (%rsi), %rdi
callq 0x3570
movq (%rbx), %rax
movq (%rax), %rdx
leaq 0x11fa(%rip), %rsi      # 0x721b
xorl %edi, %edi
xorl %eax, %eax
callq 0x33f0
// File: /workspace/github_c_makefile_star2_O2/kaugm[P]mmwm/mmwm.c
// Function: client_to_desktop
void client_to_desktop(const Arg *arg)
{
    if (!M_CURRENT || arg->i == current_desktop_number || arg->i > DESKTOPS-1)
        return;
    int cd = current_desktop_number;
    client *c = M_CURRENT;

    rem_node(&c->link);
    select_desktop(arg->i);
    add_tail(&current_display->clients, &c->link);
    select_desktop(cd);
    xcb_move(dis, c->win, -2 * M_WW, 0, &c->position_info);
    xcb_ewmh_set_wm_desktop(ewmh, c->win, arg->i);

    if (FOLLOW_WINDOW)
        change_desktop(arg);
    else
        update_current(M_PREVFOCUS);

    desktopinfo();
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq 0x474b(%rip), %rax      # 0xa780
movq 0x30(%rax), %r14
testq %r14, %r14
je 0x6058
movq %rdi, %rbx
movl (%rdi), %eax
movl 0x475f(%rip), %ebp      # 0xa7a8
cmpl %ebp, %eax
sete %cl
cmpl $0xa, %eax
setge %al
orb %cl, %al
je 0x605d
popq %rbx
popq %r14
popq %rbp
retq
movq %r14, %rdi
callq 0x4c14
movl (%rbx), %edi
callq 0x4ca0
movq 0x470d(%rip), %rdi      # 0xa780
addq $0x18, %rdi
movq %r14, %rsi
callq 0x4d07
movl %ebp, %edi
callq 0x4ca0
movq 0x46c3(%rip), %rdi      # 0xa750
movl 0x20(%r14), %esi
movq 0x46f0(%rip), %rax      # 0xa788
movl 0x34(%rax), %edx
addl %edx, %edx
negl %edx
leaq 0x30(%r14), %r8
xorl %ecx, %ecx
callq 0x4c77
movq 0x46b7(%rip), %rdi      # 0xa768
movl 0x20(%r14), %esi
movl (%rbx), %edx
callq 0x3640
movq %rbx, %rdi
callq 0x5dc5
popq %rbx
popq %r14
popq %rbp
jmp 0x4b1f
// File: /workspace/github_c_makefile_star2_O2/kaugm[P]mmwm/mmwm.c
// Function: next_win
void next_win()
{
    client *t = M_CURRENT;

    if (!M_CURRENT || !M_GETNEXT(M_HEAD))
        return;

    while (1) {
        if (!M_GETNEXT(t))
            t = M_HEAD;
        else
            t = M_GETNEXT(t);
        if (!t->isminimized)
            break;
        if (t == M_CURRENT)
            break;
    }

    M_PREVFOCUS = M_CURRENT;
    update_current(t);
}

// Assembly:
movq 0x469c(%rip), %rax      # 0xa780
movq 0x30(%rax), %rcx
testq %rcx, %rcx
je 0x611f
movq 0x18(%rax), %rdx
testq %rdx, %rdx
je 0x611f
cmpq $0x0, 0x8(%rdx)
je 0x611f
movq %rcx, %rdi
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
cmoveq %rdx, %rdi
cmpq %rcx, %rdi
je 0x6116
cmpb $0x0, 0x1d(%rdi)
jne 0x6100
movq %rcx, 0x38(%rax)
jmp 0x3cfa
retq
// File: /workspace/github_c_makefile_star2_O2/kaugm[P]mmwm/mmwm.c
// Function: prev_win
void prev_win()
{
    client *t = M_CURRENT;

    if (!M_CURRENT || !M_GETNEXT(M_HEAD))
        return;

    for (;;) {
        if(!(t = M_GETPREV(t)))
            t = M_TAIL;
        if (!t->isminimized)
            break;
        if (t == M_CURRENT)
            break;
    }

    M_PREVFOCUS = M_CURRENT;
    update_current(t);
}

// Assembly:
movq 0x4659(%rip), %rax      # 0xa780
movq 0x30(%rax), %rcx
testq %rcx, %rcx
je 0x6163
movq 0x18(%rax), %rdx
testq %rdx, %rdx
je 0x6163
cmpq $0x0, 0x8(%rdx)
je 0x6163
movq %rcx, %rdi
movq (%rdi), %rdi
testq %rdi, %rdi
jne 0x614f
movq 0x20(%rax), %rdi
cmpq %rcx, %rdi
je 0x615a
cmpb $0x0, 0x1d(%rdi)
jne 0x6143
movq %rcx, 0x38(%rax)
jmp 0x3cfa
retq
// File: /workspace/github_c_makefile_star2_O2/kaugm[P]mmwm/mmwm.c
// Function: move_down
void move_down()
{
    if (!M_CURRENT || !M_GETNEXT(M_CURRENT))
        return;
    client *c = M_CURRENT;
    client *n = M_GETNEXT(c);
    list   *l = c->link.parent;
    rem_node(&c->link);
    insert_node_after(l, &n->link, &c->link);
    tile();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq 0x4610(%rip), %rax      # 0xa780
movq 0x30(%rax), %rbx
testq %rbx, %rbx
je 0x61a7
movq 0x8(%rbx), %r15
testq %r15, %r15
je 0x61a7
movq 0x10(%rbx), %r14
movq %rbx, %rdi
callq 0x4c14
movq 0x8(%r15), %rax
testq %rax, %rax
je 0x61ad
movq %rbx, 0x8(%r15)
movq %r15, (%rbx)
movq %rax, 0x8(%rbx)
movq %rbx, (%rax)
jmp 0x61b8
popq %rbx
popq %r14
popq %r15
retq
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4d07
movq %r14, 0x10(%rbx)
popq %rbx
popq %r14
popq %r15
jmp 0x4d79
// File: /workspace/github_c_makefile_star2_O2/kaugm[P]mmwm/mmwm.c
// Function: move_up
void move_up()
{
    if (!M_CURRENT || !M_GETPREV(M_CURRENT))
        return;
    client *c = M_CURRENT;
    client *p = M_GETPREV(c);
    list   *l = c->link.parent;
    rem_node(&c->link);
    insert_node_before(l, &p->link, &c->link);
    tile();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq 0x45ae(%rip), %rax      # 0xa780
movq 0x30(%rax), %rbx
testq %rbx, %rbx
je 0x6204
movq (%rbx), %r15
testq %r15, %r15
je 0x6204
movq 0x10(%rbx), %r14
movq %rbx, %rdi
callq 0x4c14
movq (%r15), %rax
testq %rax, %rax
je 0x620a
movq %rbx, 0x8(%rax)
movq %rax, (%rbx)
movq %r15, 0x8(%rbx)
jmp 0x6226
popq %rbx
popq %r14
popq %r15
retq
movq (%r14), %rax
testq %rax, %rax
je 0x621c
andq $0x0, (%rbx)
movq %rax, 0x8(%rbx)
jmp 0x6220
leaq 0x8(%r14), %rax
movq %rbx, (%rax)
movq %r14, %r15
movq %rbx, (%r15)
movq %r14, 0x10(%rbx)
popq %rbx
popq %r14
popq %r15
jmp 0x4d79
// File: /workspace/github_c_makefile_star2_O2/kaugm[P]mmwm/mmwm.c
// Function: swap_master
void swap_master()
{
    if (!M_CURRENT || !M_GETNEXT(M_HEAD))
        return;
    if (M_CURRENT == M_HEAD) {
        client *c = M_GETNEXT(M_HEAD);
        rem_node(&c->link);
        add_head(&current_display->clients, &c->link);
    }
    else {
        client *c = M_CURRENT;
        rem_node(&c->link);
        add_head(&current_display->clients, &c->link);
    }
    update_current(M_HEAD);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq 0x453a(%rip), %r12      # 0xa780
movq 0x30(%r12), %rbx
testq %rbx, %rbx
je 0x6287
movq 0x18(%r12), %rax
testq %rax, %rax
je 0x6287
movq 0x8(%rax), %r14
testq %r14, %r14
je 0x6287
leaq 0x18(%r12), %r15
cmpq %rax, %rbx
je 0x6293
movq %rbx, %rdi
callq 0x4c14
movq (%r15), %rax
testq %rax, %rax
je 0x62ad
andq $0x0, (%rbx)
movq %rax, 0x8(%rbx)
jmp 0x62b4
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %r14, %rdi
callq 0x4c14
movq (%r15), %rax
testq %rax, %rax
je 0x62bc
andq $0x0, (%r14)
movq %rax, 0x8(%r14)
jmp 0x62c3
addq $0x20, %r12
movq %r12, %rax
movq %rbx, (%rax)
movq %rbx, %r14
jmp 0x62c6
addq $0x20, %r12
movq %r12, %rax
movq %r14, (%rax)
movq %r14, (%r15)
movq %r15, 0x10(%r14)
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x3cfa
// File: /workspace/github_c_makefile_star2_O2/kaugm[P]mmwm/mmwm.c
// Function: setmaximize
void setmaximize(client *c, bool maximize)
{
    DEBUGP("xcb: set maximize: %d\n", maximize);

    if (!c || c->isfullscreen)
        return;

    int borders = client_borders(c);
    borders = 0;
    xcb_border_width(dis, c->win, borders);

    if (maximize) {
        xcb_move_resize(dis, c->win, M_GAPS, M_WY + M_GAPS + PANEL_HEIGHT,
                        M_WW - 2 * (borders + M_GAPS),
                        M_WH - 2 * (borders + M_GAPS), &c->position_info);
        c->ismaximized = True;
    }
    else
        c->ismaximized = False;

    update_current(c);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
testq %rdi, %rdi
je 0x6310
movq %rdi, %rbx
cmpb $0x0, 0x1b(%rdi)
je 0x6319
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl %esi, %ebp
movq 0x442e(%rip), %rdi      # 0xa750
movl 0x20(%rbx), %esi
xorl %r14d, %r14d
xorl %edx, %edx
callq 0x3beb
testb %bpl, %bpl
je 0x6376
movq 0x4415(%rip), %rdi      # 0xa750
movl 0x20(%rbx), %esi
movq 0x443b(%rip), %rax      # 0xa780
movl 0x64(%rax), %edx
movq 0x4439(%rip), %rax      # 0xa788
movl 0x3c(%rax), %ecx
addl %edx, %ecx
leal (%rdx,%rdx), %r10d
movl 0x34(%rax), %r8d
movl 0x38(%rax), %r9d
subl %r10d, %r8d
subl %r10d, %r9d
leaq 0x30(%rbx), %rax
movq %rax, (%rsp)
callq 0x3bfd
movb $0x1, %r14b
movb %r14b, 0x1c(%rbx)
movq %rbx, %rdi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x3cfa
// File: /workspace/github_c_makefile_star2_O2/kaugm[P]mmwm/mmwm.c
// Function: killclient
void killclient()
{
	int n = 0;
	client *c = NULL, *t = NULL;

    if (!M_CURRENT)
        return;
    if (!deletewindow(M_CURRENT->win)) {
        xcb_kill_client(dis, M_CURRENT->win);
        DEBUG("client killed");
    }
    else {
        DEBUG("client deleted");
    }
    /* this section is for switching to previous (-1) desktop when the last window on it is killed */
    /* count stack windows and grab first non-floating, non-maximize window */
    for (t = M_HEAD; t; t = M_GETNEXT(t)) {
        if (!ISFMTM(t)) {
            if (c)
                ++n;
            else
                c = t;
        }
    }
	/* just this line below was the original piece of code */
	removeclient(M_CURRENT);
	while (n < 1) {
		if (current_desktop_number == 0)
			return;
		change_desktop(&(Arg)
			{.i = (DESKTOPS + current_desktop_number - 1) % DESKTOPS});
		n = 0;
		/* count stack windows and grab first non-floating, non-maximize window */
		for (t = M_HEAD; t; t = M_GETNEXT(t)) {
			if (!ISFMTM(t)) {
				if (c)
					++n;
				else
					c = t;
			}
		}
	}

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq 0x435b(%rip), %rax      # 0xa780
movq 0x30(%rax), %rax
testq %rax, %rax
je 0x6538
movl 0x20(%rax), %edi
movl 0x43a9(%rip), %esi      # 0xa7e4
callq 0x4db4
testb %al, %al
jne 0x645e
movq 0x4305(%rip), %rdi      # 0xa750
movq 0x432e(%rip), %rax      # 0xa780
movq 0x30(%rax), %rax
movl 0x20(%rax), %esi
callq 0x35e0
movq 0x431b(%rip), %rax      # 0xa780
leaq 0x18(%rax), %rcx
xorl %r14d, %r14d
movq 0x42f5(%rip), %rdx      # 0xa768
xorl %ebp, %ebp
movq (%rcx), %rcx
testq %rcx, %rcx
je 0x64b5
cmpb $0x0, 0x1b(%rcx)
jne 0x64af
cmpb $0x0, 0x1c(%rcx)
jne 0x64af
cmpb $0x0, 0x19(%rcx)
jne 0x64af
cmpb $0x0, 0x1d(%rcx)
jne 0x64af
movl 0x24(%rcx), %esi
cmpl 0x104(%rdx), %esi
jne 0x64af
xorl %esi, %esi
testq %r14, %r14
setne %sil
cmoveq %rcx, %r14
addl %esi, %ebp
addq $0x8, %rcx
jmp 0x6475
movq 0x30(%rax), %rdi
callq 0x6543
pushq $0xa
popq %r15
movq %rsp, %rbx
testl %ebp, %ebp
jg 0x6538
movl 0x42d9(%rip), %eax      # 0xa7a8
testl %eax, %eax
je 0x6538
addl $0x9, %eax
cltd
idivl %r15d
movl %edx, (%rsp)
movq %rbx, %rdi
callq 0x5dc5
movq 0x4294(%rip), %rax      # 0xa780
addq $0x18, %rax
xorl %ebp, %ebp
movq 0x426f(%rip), %rcx      # 0xa768
movq (%rax), %rax
testq %rax, %rax
je 0x64c5
cmpb $0x0, 0x1b(%rax)
jne 0x6532
cmpb $0x0, 0x1c(%rax)
jne 0x6532
cmpb $0x0, 0x19(%rax)
jne 0x6532
cmpb $0x0, 0x1d(%rax)
jne 0x6532
movl 0x24(%rax), %edx
cmpl 0x104(%rcx), %edx
jne 0x6532
xorl %edx, %edx
testq %r14, %r14
setne %dl
cmoveq %rax, %r14
addl %edx, %ebp
addq $0x8, %rax
jmp 0x64f9
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/kaugm[P]mmwm/mmwm.c
// Function: removeclient
void removeclient(client *c)
{
    int nd = 0, cd = current_desktop_number;

    if (!c)
        return;
    rem_node(&c->link);
    if (c == M_PREVFOCUS)
        M_PREVFOCUS = M_GETPREV(M_CURRENT);
    if (c == M_CURRENT || !M_GETNEXT(M_HEAD))
        update_current(M_PREVFOCUS);
    free(c);
    c = NULL;
    if (cd == nd - 1)
        tile();
    else
        select_desktop(cd);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x6578
movq %rdi, %r14
movl 0x4253(%rip), %ebx      # 0xa7a8
callq 0x4c14
movq 0x421f(%rip), %rax      # 0xa780
movq 0x30(%rax), %rcx
movq 0x38(%rax), %rdi
cmpq %r14, %rdi
jne 0x6586
testq %rcx, %rcx
je 0x6580
movq (%rcx), %rdi
jmp 0x6582
addq $0x8, %rsp
popq %rbx
popq %r14
retq
xorl %edi, %edi
movq %rdi, 0x38(%rax)
cmpq %r14, %rcx
je 0x659b
movq 0x18(%rax), %rax
testq %rax, %rax
je 0x659b
cmpq $0x0, 0x8(%rax)
jne 0x65a0
callq 0x3cfa
movq %r14, %rdi
callq 0x3050
cmpl $-0x1, %ebx
je 0x65bb
movl %ebx, %edi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x4ca0
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x4d79
// File: /workspace/github_c_makefile_star2_O2/kaugm[P]mmwm/mmwm.c
// Function: wintoclient
client *wintoclient(xcb_window_t win)
{
    desktop *desk;
    for (desk = (desktop *)get_head(&desktops); desk; desk = (desktop *)get_next(&desk->link)) {
        monitor *moni;
        for (moni = (monitor *)get_head(&desk->monitors); moni; moni = (monitor *)get_next(&moni->link)) {
            display *disp;
            for (disp = (display *)get_head(&moni->displays); disp; disp = (display *)get_next(&disp->link)) {
                client *c;
                for (c = (client *)get_head(&disp->clients); c; c = (client *)get_next(&c->link)) {
                    if (c->win == win) {
                        return c;
                    }
                }
            }
        }
    }
    return NULL;
}

// Assembly:
leaq 0x41ea(%rip), %rcx      # 0xa7b8
movq (%rcx), %rcx
testq %rcx, %rcx
je 0x6617
leaq 0x18(%rcx), %rdx
movq (%rdx), %rdx
testq %rdx, %rdx
je 0x6611
leaq 0x18(%rdx), %rsi
movq (%rsi), %rsi
testq %rsi, %rsi
je 0x660b
leaq 0x18(%rsi), %rax
movq (%rax), %rax
testq %rax, %rax
je 0x6605
cmpl %edi, 0x20(%rax)
je 0x6619
addq $0x8, %rax
jmp 0x65f2
addq $0x8, %rsi
jmp 0x65e6
addq $0x8, %rdx
jmp 0x65da
addq $0x8, %rcx
jmp 0x65ce
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/kaugm[P]mmwm/mmwm.c
// Function: resize_master
void resize_master(const Arg *arg)
{
    int msz = M_WW * MASTER_SIZE + M_MASTER_SIZE + arg->i;

    if (msz < MINWSZ || M_WW - msz < MINWSZ)
        return;
    M_MASTER_SIZE += arg->i;
    tile();
}

// Assembly:
movq 0x3ec9(%rip), %rax      # 0xa788
movl 0x34(%rax), %edx
cvtsi2sd %edx, %xmm1
movq 0x3eb3(%rip), %rax      # 0xa780
movss 0x58(%rax), %xmm0
cvtss2sd %xmm0, %xmm2
mulsd 0x742(%rip), %xmm1      # 0x7020
addsd %xmm2, %xmm1
movl (%rdi), %ecx
cvtsi2sd %ecx, %xmm2
addsd %xmm1, %xmm2
cvttsd2si %xmm2, %esi
cmpl $0x32, %esi
setl %dil
subl %esi, %edx
cmpl $0x32, %edx
setl %dl
orb %dil, %dl
je 0x6905
retq
cvtsi2ss %ecx, %xmm1
addss %xmm1, %xmm0
movss %xmm0, 0x58(%rax)
jmp 0x4d79
// File: /workspace/github_c_makefile_star2_O2/kaugm[P]mmwm/mmwm.c
// Function: get_geometry
static inline xcb_get_geometry_reply_t *get_geometry(xcb_window_t win)
{
    xcb_get_geometry_reply_t *r;
    r = xcb_get_geometry_reply(dis, xcb_get_geometry(dis, win), NULL);
    if (!r)
        errx(EXIT_FAILURE, "failed to get geometry for window %i", win);
    return r;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
movq 0x3e2c(%rip), %r14      # 0xa750
movq %r14, %rdi
movl %ebx, %esi
callq 0x33a0
movq %r14, %rdi
movl %eax, %esi
xorl %edx, %edx
callq 0x3240
testq %rax, %rax
je 0x6947
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x8e4(%rip), %rsi       # 0x7232
pushq $0x1
popq %rdi
movl %ebx, %edx
xorl %eax, %eax
callq 0x31b0
// File: /workspace/github_c_makefile_star2_O2/kaugm[P]mmwm/mmwm.c
// Function: wintoalien
static alien *wintoalien(list *l, xcb_window_t win)
{
    alien *t;
    if (!l || !win)
        return NULL;

    for (t=(alien *)get_head(l); t; t=(alien *)get_next((node *)t)) {
        if (t->win == win)
            break;
    }
    return t;
}

// Assembly:
testl %edi, %edi
je 0x698e
leaq 0x3e15(%rip), %rax      # 0xa790
movq (%rax), %rax
testq %rax, %rax
je 0x698e
cmpl %edi, 0x18(%rax)
je 0x6990
addq $0x8, %rax
jmp 0x697b
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/kaugm[P]mmwm/mmwm.c
// Function: create_alien
static inline alien *create_alien(xcb_window_t win, xcb_atom_t atom)
{
    alien *a;
    if((a = (alien *)calloc(1, sizeof(alien)))) {
        unsigned int values[1] = { XCB_EVENT_MASK_PROPERTY_CHANGE };
        xcb_change_window_attributes(dis, win, XCB_CW_EVENT_MASK, values);
        a->win = win;
        a->type = atom;
        add_tail(&aliens, &a->link);
        xcb_raise_window(dis, win);
        xcb_map_window(dis, win);

        xcb_get_geometry_reply_t *g = get_geometry(a->win);
        a->position_info.previous_x = a->position_info.current_x = g->x;
        a->position_info.previous_y = a->position_info.current_y = g->y;
        free(g);
    }
    return(a);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %esi, %r14d
movl %edi, %ebp
pushq $0x1
popq %rdi
pushq $0x30
popq %rsi
callq 0x32f0
testq %rax, %rax
je 0x6a54
movq %rax, %rbx
leaq 0xc(%rsp), %rcx
movl $0x400000, (%rcx)       # imm = 0x400000
movq 0x3d63(%rip), %rdi      # 0xa750
movl %ebp, %esi
movl $0x800, %edx            # imm = 0x800
callq 0x30f0
movl %ebp, 0x18(%rbx)
movl %r14d, 0x1c(%rbx)
leaq 0x3d89(%rip), %rdi      # 0xa790
movq %rbx, %rsi
callq 0x4d07
movq 0x3d3a(%rip), %rdi      # 0xa750
movl %ebp, %esi
callq 0x4da1
movq 0x3d2c(%rip), %rdi      # 0xa750
movl %ebp, %esi
callq 0x34b0
movl 0x18(%rbx), %edi
callq 0x6917
movd 0xc(%rax), %xmm0
pshuflw $0x60, %xmm0, %xmm0     # xmm0 = xmm0[0,0,2,1,4,5,6,7]
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
psrad $0x10, %xmm0
movdqu %xmm0, 0x20(%rbx)
movq %rax, %rdi
callq 0x3050
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/eric-lo[P]3150/5-Signal/alarm_fgets.c
// Function: main
int main(void)
{
	char buf[1024];
	signal(SIGALRM, sig_handler);
	alarm(TIMEOUT);
	if(fgets(buf, 1024, stdin) == NULL)
	{
		printf("No input. Goodbye!\n");
		exit(0);
	}
	alarm(0);
	printf("Your input: %s", buf);
	return 0;
}

// Assembly:
subq $0x408, %rsp            # imm = 0x408
leaq -0x22(%rip), %rsi       # 0x118c
pushq $0xe
popq %rdi
callq 0x1070
pushq $0x5
popq %rdi
callq 0x1050
movq 0x2e1b(%rip), %rax      # 0x3fe0
movq (%rax), %rdx
movq %rsp, %rdi
movl $0x400, %esi            # imm = 0x400
callq 0x1060
testq %rax, %rax
je 0x11fc
xorl %edi, %edi
callq 0x1050
leaq 0xe1c(%rip), %rdi       # 0x2004
movq %rsp, %rsi
xorl %eax, %eax
callq 0x1040
xorl %eax, %eax
addq $0x408, %rsp            # imm = 0x408
retq
leaq 0xe23(%rip), %rdi       # 0x2026
callq 0x1030
xorl %edi, %edi
callq 0x1080
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]libcperciva/tests/humansize/main.c
// Function: main
int
main(int argc, char * argv[])
{
	size_t i;
	uint64_t size;
	char * s;
	int failures = 0;

	WARNP_INIT;
	(void)argc; /* UNUSED */

	for (i = 0; i < sizeof(tests) / sizeof(tests[0]); i++) {
		/* Notify about what we're trying to do. */
		if (!tests[i].bad)
			printf("Parsing \"%s\" as a number of bytes:",
			    tests[i].s);
		else
			printf("Should fail to parse \"%s\" as a number"
			    " of bytes:", tests[i].s);

		/* Try to parse the test string. */
		if (humansize_parse(tests[i].s, &size)) {
			if (!tests[i].bad) {
				printf(" FAILED!\n");
				failures++;
			} else {
				printf(" PASSED!\n");
			}
		} else {
			if (tests[i].bad || tests[i].val != size) {
				printf(" FAILED!\n");
				failures++;
			} else {
				printf(" PASSED!\n");
			}
		}
	}

	for (i = 0; i < sizeof(tests) / sizeof(tests[0]); i++) {
		/* Don't try to do anything with the "bad values". */
		if (tests[i].bad)
			continue;

		/* Notify about what we're trying to do. */
		printf("Generating a string for %" PRIu64 ":", tests[i].val);

		/* Generate (and check) a string. */
		s = humansize(tests[i].val);
		if (strcmp(tests[i].canonical, s) == 0)
			printf(" PASSED!\n");
		else {
			printf(" FAILED!\n");
			failures++;
		}
		free(s);
	}

	if (failures)
		return (1);
	else
		return (0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq (%rsi), %rdi
testq %rdi, %rdi
je 0x1274
callq 0x15f8
pushq $0x10
popq %r13
leaq 0x2a11(%rip), %rbp      # 0x3c90
movq %rsp, %rbx
xorl %r14d, %r14d
cmpq $0x170, %r13            # imm = 0x170
je 0x12fe
movl -0x8(%r13,%rbp), %r15d
testl %r15d, %r15d
movq -0x10(%r13,%rbp), %r12
leaq 0xd85(%rip), %rdi       # 0x2027
leaq 0xd5b(%rip), %rax       # 0x2004
cmoveq %rax, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x1090
movq %r12, %rdi
movq %rbx, %rsi
callq 0x146a
testl %eax, %eax
je 0x12d9
testl %r15d, %r15d
je 0x12e9
leaq 0xdf6(%rip), %rdi       # 0x20c8
callq 0x1070
jmp 0x12f8
testl %r15d, %r15d
jne 0x12e9
movq (%r13,%rbp), %rax
cmpq (%rsp), %rax
je 0x12cb
leaq 0xdcf(%rip), %rdi       # 0x20bf
callq 0x1070
incl %r14d
addq $0x20, %r13
jmp 0x1285
pushq $0x18
popq %r15
leaq 0xd4e(%rip), %rbx       # 0x2057
cmpq $0x178, %r15            # imm = 0x178
je 0x1375
cmpl $0x0, -0x10(%r15,%rbp)
jne 0x136f
movq -0x8(%r15,%rbp), %r12
movq (%r15,%rbp), %r13
movq %rbx, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x1090
movq %r12, %rdi
callq 0x138c
movq %rax, %r12
movq %r13, %rdi
movq %rax, %rsi
callq 0x10d0
testl %eax, %eax
je 0x135b
leaq 0xd6e(%rip), %rdi       # 0x20bf
callq 0x1070
incl %r14d
jmp 0x1367
leaq 0xd66(%rip), %rdi       # 0x20c8
callq 0x1070
movq %r12, %rdi
callq 0x1030
addq $0x20, %r15
jmp 0x1309
xorl %eax, %eax
testl %r14d, %r14d
setne %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/mrkite[P]regs/src/main.cc
// Function: parse_opt(int, char*, argp_state*)
static error_t parse_opt(int key, char *arg, struct argp_state *state) {
  struct arguments *arguments = static_cast<struct arguments *>(state->input);
  switch (key) {
    case 'o':
      if (arg) {
        arguments->org = parseNum(arg);
      }
      break;
    case 'm':
      if (arg) {
        arguments->flags |= IsM8;
      }
      break;
    case 'x':
      if (arg) {
        arguments->flags |= IsX8;
      }
      break;
    case 'e':
      if (arg) {
        arguments->flags |= IsEmu;
      }
      break;
    case 'l':
      arguments->keyword = arg;
      break;
    case ARGP_KEY_ARG:
      if (state->arg_num >= 1) {
        argp_usage(state);
      }
      arguments->filename = arg;
      break;
    case ARGP_KEY_END:
      if (state->arg_num < 1 && !arguments->keyword) {
        argp_usage(state);
      }
      break;
    default:
      return ARGP_ERR_UNKNOWN;
  }
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq 0x28(%rdx), %r12
testl %edi, %edi
je 0x5f68
cmpl $0x65, %edi
je 0x5f8a
cmpl $0x6c, %edi
je 0x5f81
cmpl $0x6d, %edi
je 0x5f30
cmpl $0x1000001, %edi        # imm = 0x1000001
je 0x5f4e
cmpl $0x78, %edi
je 0x5f3f
cmpl $0x6f, %edi
jne 0x5f7c
xorl %ebx, %ebx
testq %r14, %r14
je 0x5fa4
movb (%r14), %r15b
movsbl %r15b, %edi
callq 0x5060
incq %r14
testl %eax, %eax
jne 0x5ea6
movzbl %r15b, %eax
cmpl $0x24, %eax
je 0x5ed8
cmpl $0x30, %eax
jne 0x5fb5
cmpb $0x78, (%r14)
jne 0x5fb5
incq %r14
xorl %ebp, %ebp
incq %r14
xorl %r13d, %r13d
movsbl -0x1(%r14), %r15d
movl %r15d, %edi
callq 0x50c0
cmpl $0x2f, %r15d
je 0x5efb
testl %eax, %eax
je 0x5f99
cmpb $0x2f, %r15b
je 0x5f2b
leal -0x30(%r15), %eax
cmpl $0xa, %eax
jb 0x5f1f
leal -0x61(%r15), %eax
cmpb $0x5, %al
ja 0x5f18
addl $-0x57, %r15d
jmp 0x5f1c
addl $-0x37, %r15d
movl %r15d, %eax
shll $0x4, %r13d
orl %eax, %r13d
incq %r14
jmp 0x5ee0
movl %r13d, %ebp
jmp 0x5eda
xorl %ebx, %ebx
testq %r14, %r14
je 0x5fa4
orb $0x20, 0xc(%r12)
jmp 0x5fa4
xorl %ebx, %ebx
testq %r14, %r14
je 0x5fa4
orb $0x10, 0xc(%r12)
jmp 0x5fa4
xorl %ebx, %ebx
cmpl $0x0, 0x20(%rdx)
jne 0x5fa4
cmpq $0x0, 0x10(%r12)
jne 0x5fa4
movq %rdx, %rdi
callq 0x5350
jmp 0x5fa4
cmpl $0x0, 0x20(%rdx)
je 0x5f76
movq %rdx, %rdi
callq 0x5350
movq %r14, (%r12)
jmp 0x5f86
pushq $0x7
popq %rbx
jmp 0x5fa4
movq %r14, 0x10(%r12)
xorl %ebx, %ebx
jmp 0x5fa4
xorl %ebx, %ebx
testq %r14, %r14
je 0x5fa4
orb $0x1, 0xd(%r12)
jmp 0x5fa4
shll $0x10, %ebp
orl %r13d, %ebp
movl %ebp, 0x8(%r12)
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %ebp, %ebp
xorl %r13d, %r13d
movsbl %r15b, %eax
addl $-0x30, %eax
cmpl $0x9, %eax
ja 0x5f9c
imull $0xa, %r13d, %r13d
addl %eax, %r13d
movb (%r14), %r15b
incq %r14
jmp 0x5fba
nop
// File: /workspace/github_c_makefile_star2_O2/mrkite[P]regs/src/omf.cc
// Function: Segment::initDPS()
void Segment::initDPS() {
  kind = 0x12;
  length = 1024;
  resspc = 1024;
  bytecnt = 0;
  name = "Direct";
}

// Assembly:
movw $0x12, 0x10(%rdi)
movl $0x400, 0x8(%rdi)       # imm = 0x400
movabsq $0x40000000000, %rax    # imm = 0x40000000000
movq %rax, (%rdi)
addq $0x28, %rdi
leaq 0xd9f7(%rip), %rsi      # 0x1423c
jmp 0x5420
// File: /workspace/github_c_makefile_star2_O2/mrkite[P]regs/src/omf.cc
// Function: OMF::load(char const*, unsigned int)
bool OMF::load(const char *filename, uint32_t org) {
  handle = TheHandle::createFromFile(filename);
  if (!handle->isOpen()) {
    return false;
  }

  if (!isOMF()) {
    Segment seg;
    seg.bytecnt = handle->length;
    seg.kind = 0;  // code
    seg.entry = 0;
    seg.mapped = org;
    seg.data = handle;
    seg.length = seg.bytecnt;
    seg.segnum = 1;
    segments.push_back(seg);
  } else {
    if (!loadSegments()) {
      return false;
    }
    if (!mapSegments()) {
      return false;
    }
    if (!relocSegments()) {
      return false;
    }
  }
  std::sort(segments.begin(), segments.end(), compareSegments);
  return true;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x70, %rsp
movl %edx, %ebp
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x871c
movq %rbx, %rdi
movq %r14, %rsi
callq 0x76b0
leaq 0x10(%rsp), %rdi
callq 0x61e4
movq (%rbx), %rdi
callq 0x88aa
testb %al, %al
je 0x68cd
movq %rbx, %rdi
callq 0x696c
testb %al, %al
je 0x68d1
movq %rbx, %rdi
callq 0x69e8
movq %rbx, %rdi
callq 0x6c34
movq %rbx, %rdi
callq 0x6d9c
testb %al, %al
jne 0x6938
xorl %eax, %eax
jmp 0x694e
leaq 0x40(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x58(%rsp), %r14
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
movq (%rbx), %rax
movl (%rax), %eax
movl %eax, -0x50(%r14)
andw $0x0, -0x40(%r14)
andl $0x0, -0x30(%r14)
movl %ebp, 0x10(%r14)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x764a
movl -0x50(%r14), %eax
movl %eax, -0x48(%r14)
movw $0x1, -0x34(%r14)
leaq 0x10(%rbx), %rdi
leaq 0x8(%rsp), %rsi
callq 0x75cc
leaq 0x8(%rsp), %rdi
callq 0x645a
movq 0x10(%rbx), %rdi
movq 0x18(%rbx), %rsi
leaq 0xa8f(%rip), %rdx       # 0x73d6
callq 0x78ec
movb $0x1, %al
addq $0x70, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x645a
movq %rbx, %rdi
callq 0x53c0
// File: /workspace/github_c_makefile_star2_O2/mrkite[P]regs/src/omf.cc
// Function: OMF::isOMF()
bool OMF::isOMF() {
  if (handle->length < 32) {
    return false;
  }
  uint64_t ofs = 0;
  for (ofs = 0; ofs < handle->length - 16;) {
    handle->seek(ofs);
    uint32_t bytecnt = handle->r32();
    handle->skip(11);
    uint8_t version = handle->r8();
    if (version == 1) {
      ofs += bytecnt * 512;
    } else if (version == 2) {
      ofs += bytecnt;
    } else {
      return false;
    }
  }
  return ofs == handle->length;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
movq (%rdi), %rax
cmpq $0x20, %rax
jge 0x6986
xorl %eax, %eax
jmp 0x69dd
xorl %r14d, %r14d
pushq $0xb
popq %r15
leaq -0x10(%rax), %rcx
cmpq %rcx, %r14
jae 0x69d7
movq %r14, %rsi
callq 0x8a68
movq (%rbx), %rdi
callq 0x88ce
movl %eax, %ebp
movq (%rbx), %rdi
movq %r15, %rsi
callq 0x8a72
movq (%rbx), %rdi
callq 0x8966
cmpb $0x2, %al
je 0x69ca
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x6982
shll $0x9, %ebp
movl %ebp, %eax
addq %rax, %r14
movq (%rbx), %rdi
movq (%rdi), %rax
jmp 0x698d
cmpq %rax, %r14
sete %al
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/mrkite[P]regs/src/omf.cc
// Function: OMF::mapSegments()
bool OMF::mapSegments() {
  // use a memory map that denotes runs of available ram
  std::vector<uint32_t> memory;
  memory.push_back(0x300);  // min
  memory.push_back(0x7f0000);  // max
  // first map any segments that know where they belong
  for (auto &seg : segments) {
    seg.map(memory, false);
    std::sort(memory.begin(), memory.end());
  }

  // now map everything else by first fit
  for (auto &seg : segments) {  // map.true
    seg.map(memory, true);
    std::sort(memory.begin(), memory.end());
  }
  // create direct-page if it doesn't exist
  bool found = false;
  for (auto &seg : segments) {
    if (seg.isDPS()) {
      found = true;
    }
  }
  if (!found) {
    Segment seg;
    seg.initDPS();
    seg.map(memory, true);
    segments.push_back(seg);
  }
  return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdi, %r14
movq %rsp, %rdi
andq $0x0, 0x10(%rdi)
xorps %xmm0, %xmm0
movaps %xmm0, (%rdi)
leaq 0x20(%rsp), %rsi
movl $0x300, (%rsi)          # imm = 0x300
callq 0x8146
leaq 0x20(%rsp), %rsi
movl $0x7f0000, (%rsi)       # imm = 0x7F0000
movq %rsp, %rdi
callq 0x8146
leaq 0x10(%r14), %rbx
movq 0x10(%r14), %r15
movq 0x18(%r14), %r13
movq %rsp, %r12
cmpq %r13, %r15
je 0x6cae
movq %r15, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x73e0
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x82bb
addq $0x68, %r15
jmp 0x6c88
movq 0x10(%r14), %r15
movq 0x18(%r14), %r13
movq %rsp, %r12
pushq $0x1
popq %rbp
cmpq %r13, %r15
je 0x6ce2
movq %r15, %rdi
movq %r12, %rsi
movl %ebp, %edx
callq 0x73e0
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x82bb
addq $0x68, %r15
jmp 0x6cbc
movq 0x10(%r14), %rax
movq 0x18(%r14), %rdx
xorl %ecx, %ecx
cmpq %rdx, %rax
je 0x6d09
movzwl 0x10(%rax), %esi
andl $0x1f, %esi
cmpw $0x12, %si
sete %sil
orb %sil, %cl
addq $0x68, %rax
jmp 0x6cec
testb $0x1, %cl
jne 0x6d57
leaq 0x58(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rax)
leaq 0x20(%rsp), %rdi
callq 0x6820
leaq 0x20(%rsp), %rdi
movq %rsp, %rsi
pushq $0x1
popq %rdx
callq 0x73e0
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x75cc
leaq 0x20(%rsp), %rdi
callq 0x645a
movq %rsp, %rdi
callq 0x8112
movb $0x1, %al
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6d88
jmp 0x6d88
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x645a
jmp 0x6d8b
jmp 0x6d88
movq %rax, %rbx
movq %rsp, %rdi
callq 0x8112
movq %rbx, %rdi
callq 0x53c0
nop
// File: /workspace/github_c_makefile_star2_O2/mrkite[P]regs/src/map.cc
// Function: File::hex()
uint32_t File::hex() {
  uint32_t bank = 0;
  uint32_t res = 0;
  if (*p == '$') {
    p++;
  }
  while (p < end && (isxdigit(*p) || *p == '/')) {
    if (*p == '/') {
      bank = res;
      res = 0;
    } else if (isdigit(*p)) {
      res <<= 4;
      res |= *p - '0';
    } else if (*p >= 'a' && *p <= 'f') {
      res <<= 4;
      res |= *p - 'a' + 10;
    } else {
      res <<= 4;
      res |= *p - 'A' + 10;
    }
    p++;
  }
  return res | (bank << 16);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %r15
cmpb $0x24, (%r15)
jne 0x8e69
incq %r15
movq %r15, 0x8(%rbx)
movq 0x10(%rbx), %r13
xorl %r12d, %r12d
xorl %ebp, %ebp
cmpq %r13, %r15
jae 0x8ed0
movzbl (%r15), %r14d
movl %r14d, %edi
callq 0x50c0
cmpl $0x2f, %r14d
je 0x8e8d
testl %eax, %eax
je 0x8ed0
xorl %eax, %eax
cmpl $0x2f, %r14d
jne 0x8e9a
movl %ebp, %r12d
jmp 0x8ec5
leal -0x30(%r14), %eax
cmpl $0x9, %eax
ja 0x8eaa
shll $0x4, %ebp
orl %ebp, %eax
jmp 0x8ec5
leal -0x61(%r14), %eax
shll $0x4, %ebp
cmpb $0x5, %al
ja 0x8ebb
addl $-0x57, %r14d
jmp 0x8ebf
addl $-0x37, %r14d
orl %ebp, %r14d
movl %r14d, %eax
incq %r15
movq %r15, 0x8(%rbx)
movl %eax, %ebp
jmp 0x8e72
shll $0x10, %r12d
orl %r12d, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/mrkite[P]regs/src/map.cc
// Function: File::check(unsigned char)
bool File::check(uint8_t ch) {
  ws();
  if (p < end && ch == *p) {
    p++;
    return true;
  }
  return false;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
callq 0x951a
movq 0x8(%rbx), %rax
cmpq 0x10(%rbx), %rax
jae 0x8f0f
cmpb %bpl, (%rax)
jne 0x8f0f
incq %rax
movq %rax, 0x8(%rbx)
movb $0x1, %al
jmp 0x8f11
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/mrkite[P]regs/src/map.cc
// Function: File::oneOf(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
char File::oneOf(const std::string &str) {
  ws();
  if (p < end && str.find(*p) != std::string::npos) {
    return *p++;
  }
  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
callq 0x951a
movq 0x8(%rbx), %rax
cmpq 0x10(%rbx), %rax
jae 0x8f59
movsbl (%rax), %esi
xorl %r14d, %r14d
movq %r15, %rdi
xorl %edx, %edx
callq 0x5290
cmpq $-0x1, %rax
je 0x8f5c
movq 0x8(%rbx), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rbx)
movb (%rax), %r14b
jmp 0x8f5c
xorl %r14d, %r14d
movl %r14d, %eax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O2/mrkite[P]regs/src/map.cc
// Function: File::until[abi:cxx11](unsigned char)
std::string File::until(uint8_t ch) {
  std::string r;
  while (*p != ch) {
    r += *p++;
  }
  p++;  // skip ending character
  return r;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq 0x8(%r14), %rax
leaq 0x1(%rax), %rcx
cmpb %bpl, (%rax)
movq %rcx, 0x8(%r14)
je 0x8fa0
movsbl (%rax), %esi
movq %rbx, %rdi
callq 0x51d0
jmp 0x8f82
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x5140
movq %r14, %rdi
callq 0x53c0
nop
// File: /workspace/github_c_makefile_star2_O2/mrkite[P]regs/src/map.cc
// Function: Map::toAddress[abi:cxx11](unsigned int)
std::string Map::toAddress(uint32_t value) {
  static const char *digits = "0123456789abcdef";
  std::string ret="$00/0000";
  for (size_t i = 0, j = 5 << 2; i < 6; i++, j -= 4) {
    ret[i < 2 ? i + 1 : i + 2] = digits[(value >> j) & 0xf];
  }
  return ret;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rdi, %rbx
leaq 0xafad(%rip), %rsi      # 0x14342
leaq 0x7(%rsp), %rdx
callq 0x5fd6
pushq $0x18
popq %rcx
xorl %edx, %edx
leaq 0xaf86(%rip), %rax      # 0x14331
testq %rcx, %rcx
je 0x93d8
addq $-0x4, %rcx
movl %ebp, %esi
shrl %cl, %esi
andl $0xf, %esi
leaq 0x2(%rdx), %rdi
cmpq $0x2, %rdx
leaq 0x1(%rdx), %rdx
cmovbq %rdx, %rdi
movb (%rsi,%rax), %sil
movq (%rbx), %r8
movb %sil, (%r8,%rdi)
jmp 0x93ab
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/mrkite[P]regs/src/map.cc
// Function: Map::addEntry(unsigned int, unsigned int)
void Map::addEntry(uint32_t entry, uint32_t flags) {
  Entry e;
  e.org = entry;
  e.flags = flags;
  entryPoints.push_back(e);
}

// Assembly:
subq $0x18, %rsp
leaq 0xc(%rsp), %rax
movl %esi, (%rax)
movl %edx, 0x4(%rax)
addq $0x30, %rdi
movq %rax, %rsi
callq 0x9588
addq $0x18, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/mrkite[P]regs/src/map.cc
// Function: File::File(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
File::File(const std::string &filename) {
  data = p = nullptr;
  std::ifstream f(filename, std::ios::in | std::ios::binary | std::ios::ate);
  if (!f.is_open()) {
    return;
  }
  auto length = f.tellg();
  data = new uint8_t[length];
  f.seekg(0, std::ios::beg);
  f.read(reinterpret_cast<char*>(data), length);
  f.close();
  p = data;
  end = data + length;
  curLine = 1;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movq %rdi, %rbx
leaq 0x30(%rdi), %rax
movq %rax, 0x20(%rdi)
andq $0x0, 0x28(%rdi)
movb $0x0, 0x30(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq %rsp, %rdi
pushq $0xe
popq %rdx
callq 0x5380
leaq 0x78(%rsp), %rdi
callq 0x50a0
testb %al, %al
je 0x94e2
movq %rsp, %rdi
callq 0x53b0
movq %rax, %r14
movq %rax, %rdi
callq 0x5030
movq %rax, (%rbx)
movq %rsp, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x52b0
movq (%rbx), %rsi
movq %rsp, %rdi
movq %r14, %rdx
callq 0x5260
movq %rsp, %rdi
callq 0x5090
movq (%rbx), %rax
movq %rax, 0x8(%rbx)
addq %rax, %r14
movq %r14, 0x10(%rbx)
movl $0x1, 0x18(%rbx)
movq %rsp, %rdi
callq 0x50e0
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r14
retq
movq %rax, %r14
jmp 0x9505
movq %rax, %r14
movq %rsp, %rdi
callq 0x50e0
addq $0x20, %rbx
movq %rbx, %rdi
callq 0x5140
movq %r14, %rdi
callq 0x53c0
nop
// File: /workspace/github_c_makefile_star2_O2/mrkite[P]regs/src/map.cc
// Function: File::ws()
void File::ws() {
  while (p < end && isspace(*p)) {
    if (*p == '\n') {
      curLine++;
    }
    p++;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %r14
movq 0x10(%rdi), %r15
movl 0x18(%rdi), %ebp
cmpq %r15, %r14
jae 0x9559
movb (%r14), %r12b
movzbl %r12b, %edi
callq 0x5060
testl %eax, %eax
je 0x9559
cmpb $0xa, %r12b
jne 0x9550
incl %ebp
movl %ebp, 0x18(%rbx)
incq %r14
movq %r14, 0x8(%rbx)
jmp 0x9530
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq