LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/kaugm[P]mmwm/mmwm.c
// Function: clientmessage
void clientmessage(xcb_generic_event_t *e)
{
    xcb_client_message_event_t *ev = (xcb_client_message_event_t *)e;
    client *c = wintoclient(ev->window);

    DEBUG("xcb: client message");

    if (c && ev->type == ewmh->_NET_WM_STATE) {
        if (((unsigned)ev->data.data32[1] == ewmh->_NET_WM_STATE_FULLSCREEN
          || (unsigned)ev->data.data32[2] == ewmh->_NET_WM_STATE_FULLSCREEN)) {
            uint32_t mode = ev->data.data32[0];

            if (mode == _NET_WM_STATE_TOGGLE)
                mode = (c->isfullscreen) ? _NET_WM_STATE_REMOVE : _NET_WM_STATE_ADD;
            setfullscreen(c, mode == _NET_WM_STATE_ADD);
        }
    }
    else {
        if (ev->type == ewmh->_NET_CURRENT_DESKTOP
            && ev->data.data32[0] < DESKTOPS)
            change_desktop(&(Arg){.i = ev->data.data32[0]});
        else {
            if (c && ev->type == ewmh->_NET_CLOSE_WINDOW)
                killclient(c);
            else {
                if (ev->type == ewmh->_NET_ACTIVE_WINDOW) {
                    if (c) {
                        client *t = NULL;
                        for (t = M_HEAD; t && t != c; t = M_GETNEXT(t))
                            ;
                        if (t)
                            update_current(c);
                    }
                }
                else {
                    if (c && ev->type == ewmh->_NET_WM_DESKTOP
                          && ev->data.data32[0] < DESKTOPS) {
                        client_to_desktop(&(Arg){.i = ev->data.data32[0]});
                    }
                }
            }
        }
    }
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl 0x4(%rdi), %edi
callq 0x6aca
movl 0x8(%rbx), %edx
movq 0x5104(%rip), %rcx      # 0xa768
testq %rax, %rax
je 0x56aa
cmpl 0x84(%rcx), %edx
jne 0x56aa
movl 0x128(%rcx), %ecx
cmpl %ecx, 0x10(%rbx)
je 0x5685
cmpl %ecx, 0x14(%rbx)
jne 0x5723
movl 0xc(%rbx), %ecx
cmpl $0x2, %ecx
jne 0x5694
movzbl 0x1b(%rax), %ecx
xorl $0x1, %ecx
xorl %esi, %esi
cmpl $0x1, %ecx
sete %sil
movq %rax, %rdi
addq $0x10, %rsp
popq %rbx
jmp 0x39e5
cmpl 0x38(%rcx), %edx
jne 0x56c5
movl 0xc(%rbx), %esi
cmpl $0x9, %esi
ja 0x56c5
leaq 0x8(%rsp), %rdi
movl %esi, (%rdi)
callq 0x616c
jmp 0x5723
testq %rax, %rax
je 0x5723
cmpl 0x58(%rcx), %edx
jne 0x56d9
addq $0x10, %rsp
popq %rbx
jmp 0x68f1
cmpl 0x40(%rcx), %edx
jne 0x570c
movq 0x509b(%rip), %rdx      # 0xa780
addq $0x18, %rdx
movq (%rdx), %rcx
testq %rcx, %rcx
je 0x56fa
leaq 0x8(%rcx), %rdx
cmpq %rax, %rcx
jne 0x56e9
testq %rcx, %rcx
je 0x5723
movq %rax, %rdi
addq $0x10, %rsp
popq %rbx
jmp 0x3dc0
cmpl 0x7c(%rcx), %edx
jne 0x5723
movl 0xc(%rbx), %eax
cmpl $0x9, %eax
ja 0x5723
movq %rsp, %rdi
movl %eax, (%rdi)
callq 0x6480
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/kaugm[P]mmwm/mmwm.c
// Function: configurerequest
void configurerequest(xcb_generic_event_t *e)
{
    xcb_configure_request_event_t *ev = (xcb_configure_request_event_t *)e;
    client *c = wintoclient(ev->window);

    DEBUG("xcb: configure request");

    if (c && c->ismaximized) {
        setmaximize(c, true);
    } else {
        unsigned int v[7];
        unsigned int i = 0;
        int borders = c ? client_borders(c) : 0;
        if (ev->value_mask & XCB_CONFIG_WINDOW_X)
            v[i++] = ev->x;
        if (ev->value_mask & XCB_CONFIG_WINDOW_Y) {
            int y = ev->y;
            if (c && c->type == ewmh->_NET_WM_WINDOW_TYPE_NORMAL) {
#ifndef EWMH_TASKBAR
                if (M_SHOWPANEL && TOP_PANEL && y < PANEL_HEIGHT)
#else
                if (y < M_WY)
#endif /* EWMH_TASKBAR */
                     y = PANEL_HEIGHT;
            }
            v[i++] = y;
        }
        if (ev->value_mask & XCB_CONFIG_WINDOW_WIDTH)
            v[i++] = (ev->width < M_WW - borders) ? ev->width : M_WW + borders;
        if (ev->value_mask & XCB_CONFIG_WINDOW_HEIGHT)
            v[i++] = (ev->height < M_WH - borders) ? ev->height : M_WH + borders;
        if (ev->value_mask & XCB_CONFIG_WINDOW_BORDER_WIDTH)
            v[i++] = ev->border_width;
        if (ev->value_mask & XCB_CONFIG_WINDOW_SIBLING)
            v[i++] = ev->sibling;
        if (ev->value_mask & XCB_CONFIG_WINDOW_STACK_MODE)
            v[i++] = ev->stack_mode;
        xcb_configure_window(dis, ev->window, ev->value_mask, v);
    }
    tile();
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r14
movl 0x8(%rdi), %ebx
movl %ebx, %edi
callq 0x6aca
testq %rax, %rax
je 0x575a
cmpb $0x1, 0x1c(%rax)
jne 0x575e
movq %rax, %rdi
movl $0x1, %esi
callq 0x67b5
jmp 0x5821
xorl %edx, %edx
jmp 0x5768
movl 0x40(%rax), %eax
xorl %edx, %edx
testl %eax, %eax
cmovgl %eax, %edx
movzwl 0x1a(%r14), %eax
xorl %ecx, %ecx
testb $0x1, %al
je 0x5780
movswl 0x10(%r14), %ecx
movl %ecx, (%rsp)
movl $0x1, %ecx
testb $0x2, %al
je 0x5790
movswl 0x12(%r14), %esi
movl %ecx, %edi
incl %ecx
movl %esi, (%rsp,%rdi,4)
testb $0x4, %al
je 0x57b8
movzwl 0x14(%r14), %esi
movq 0x4fe8(%rip), %rdi      # 0xa788
movl 0x34(%rdi), %edi
movl %edi, %r8d
subl %edx, %r8d
addl %edx, %edi
cmpl %esi, %r8d
cmovgl %esi, %edi
movl %ecx, %esi
incl %ecx
movl %edi, (%rsp,%rsi,4)
testb $0x8, %al
je 0x57e0
movzwl 0x16(%r14), %esi
movq 0x4fc0(%rip), %rdi      # 0xa788
movl 0x38(%rdi), %edi
movl %edi, %r8d
subl %edx, %r8d
addl %edx, %edi
cmpl %esi, %r8d
cmovgl %esi, %edi
movl %ecx, %edx
incl %ecx
movl %edi, (%rsp,%rdx,4)
testb $0x10, %al
je 0x57f0
movzwl 0x18(%r14), %edx
movl %ecx, %esi
incl %ecx
movl %edx, (%rsp,%rsi,4)
testb $0x20, %al
je 0x57ff
movl 0xc(%r14), %edx
movl %ecx, %esi
incl %ecx
movl %edx, (%rsp,%rsi,4)
testb $0x40, %al
je 0x580d
movzbl 0x1(%r14), %edx
movl %ecx, %ecx
movl %edx, (%rsp,%rcx,4)
movq 0x4f3c(%rip), %rdi      # 0xa750
movzwl %ax, %edx
movq %rsp, %rcx
movl %ebx, %esi
callq 0x32c0
callq 0x4f30
addq $0x28, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/kaugm[P]mmwm/mmwm.c
// Function: destroynotify
void destroynotify(xcb_generic_event_t *e)
{
    xcb_destroy_notify_event_t *ev = (xcb_destroy_notify_event_t *)e;
    client *c = wintoclient(ev->window);

    DEBUG("xcb: destroy notify");

    if (c) {
        if (c->isfullscreen)
            destroy_display(c);
        removeclient(c);
    }
   else {
        alien *a;

        if((a = wintoalien(&aliens, ev->window))) {
            DEBUG("unlink selfmapped window");
            rem_node(&a->link);
            free(a);
        }
    }
    desktopinfo();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl 0x8(%rdi), %ebx
movl %ebx, %edi
callq 0x6aca
testq %rax, %rax
je 0x585c
movq %rax, %r14
cmpb $0x1, 0x1b(%rax)
jne 0x5852
movq %r14, %rdi
callq 0x3caa
movq %r14, %rdi
callq 0x6a46
jmp 0x5893
testl %ebx, %ebx
sete %al
movq 0x4f28(%rip), %r14      # 0xa790
testq %r14, %r14
sete %cl
orb %al, %cl
jne 0x5893
cmpl %ebx, 0x18(%r14)
je 0x5883
movq 0x8(%r14), %r14
testq %r14, %r14
jne 0x5872
jmp 0x5893
movq %r14, %rdi
callq 0x4e73
movq %r14, %rdi
callq 0x3050
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x4d6d
// File: /workspace/github_c_makefile_star2_O3/kaugm[P]mmwm/mmwm.c
// Function: keypress
void keypress(xcb_generic_event_t *e)
{
    xcb_key_press_event_t *ev       = (xcb_key_press_event_t *)e;
    xcb_keysym_t           keysym   = xcb_get_keysym(ev->detail);

    DEBUGP("xcb: keypress: code: %d mod: %d\n", ev->detail, ev->state);
    for (unsigned int i = 0; i < LENGTH(keys); i++)
        if (keysym == keys[i].keysym &&
            CLEANMASK(keys[i].mod) == CLEANMASK(ev->state) &&
            keys[i].func)
                keys[i].func(&keys[i].arg);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movzbl 0x1(%rdi), %esi
movq 0x4ea3(%rip), %rdi      # 0xa758
xorl %edx, %edx
callq 0x33f0
movl %eax, %ebp
leaq 0x4abb(%rip), %r14      # 0xa380
movl $0x21, %r15d
cmpl -0xc(%r14), %ebp
jne 0x58f9
movl 0x4e89(%rip), %eax      # 0xa760
notl %eax
movzwl 0x1c(%rbx), %ecx
xorl -0x10(%r14), %ecx
andl %eax, %ecx
testl $0xfffffffd, %ecx       # imm = 0xFFFFFFFD
jne 0x58f9
movq -0x8(%r14), %rax
testq %rax, %rax
je 0x58f9
movq %r14, %rdi
callq *%rax
addq $0x18, %r14
decq %r15
jne 0x58cb
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 $0x20, %rsp
movq %rdi, %rbx
movl 0x8(%rdi), %ebp
movl %ebp, %edi
callq 0x6aca
testq %rax, %rax
je 0x5930
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq 0x4e19(%rip), %rdi      # 0xa750
movl %ebp, %esi
callq 0x33e0
movq 0x4e0b(%rip), %rdi      # 0xa750
movl %eax, %esi
xorl %edx, %edx
callq 0x3230
testq %rax, %rax
je 0x5927
movb 0x1b(%rax), %bpl
movq %rax, %rdi
callq 0x3050
testb %bpl, %bpl
jne 0x5927
movl 0x8(%rbx), %esi
testl %esi, %esi
sete %cl
movq 0x4e1d(%rip), %rax      # 0xa790
testq %rax, %rax
sete %dl
orb %cl, %dl
jne 0x598b
cmpl %esi, 0x18(%rax)
je 0x5927
movq 0x8(%rax), %rax
testq %rax, %rax
jne 0x597d
movq 0x4dd6(%rip), %r14      # 0xa768
movq %r14, %rdi
callq 0x3570
leaq 0x8(%rsp), %rdx
movq %r14, %rdi
movl %eax, %esi
xorl %ecx, %ecx
callq 0x35e0
cmpb $0x1, %al
jne 0x5927
movl 0x8(%rbx), %edi
leaq 0x8(%rsp), %rbx
movq 0x8(%rbx), %rax
movl (%rax), %esi
callq 0x6e93
movq %rbx, %rdi
callq 0x3040
jmp 0x5927
// File: /workspace/github_c_makefile_star2_O3/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 0x6aca
testq %rax, %rax
je 0x5e56
cmpl $0x7f, 0x8(%r14)
jne 0x5e56
movq %rax, %rbx
movq 0x493b(%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 0x3640
testb %al, %al
je 0x5e51
movq 0x4945(%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 0x4d6d
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x6aca
testq %rax, %rax
je 0x5ead
movq %rax, %rbx
movq 0x4909(%rip), %rcx      # 0xa780
addq $0x18, %rcx
movq (%rcx), %rax
testq %rax, %rax
je 0x5e8c
leaq 0x8(%rax), %rcx
cmpq %rbx, %rax
jne 0x5e7b
testq %rax, %rax
je 0x5ead
cmpb $0x1, 0x1b(%rbx)
jne 0x5e9f
movq %rbx, %rdi
callq 0x3caa
movq %rbx, %rdi
callq 0x6a46
popq %rbx
jmp 0x4d6d
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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
movl $0x1, %edi
movl $0x48, %esi
callq 0x3300
testq %rax, %rax
je 0x60d4
movq %rax, %rbx
movl %ebp, 0x20(%rax)
movl %r14d, 0x24(%rax)
movl $0xffffffff, 0x40(%rax) # imm = 0xFFFFFFFF
movb $0x1, 0x44(%rax)
movq 0x472a(%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 0x3640
testb %al, %al
je 0x604e
cmpl $0x0, 0x10(%rsp)
setne 0x44(%rbx)
movq 0x46fb(%rip), %r14      # 0xa750
movq %r14, %rdi
movl %ebp, %esi
callq 0x33b0
movq %r14, %rdi
movl %eax, %esi
xorl %edx, %edx
callq 0x3240
testq %rax, %rax
je 0x60e7
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 0x46e8(%rip), %rcx      # 0xa780
leaq 0x18(%rcx), %rax
cmpq $0x0, 0x18(%rcx)
je 0x60bc
movq 0x20(%rcx), %rdx
movq %rbx, 0x20(%rcx)
movq %rbx, 0x8(%rdx)
movq %rdx, (%rbx)
movq $0x0, 0x8(%rbx)
jmp 0x60c4
movq %rbx, 0x20(%rcx)
movq %rbx, 0x18(%rcx)
movq %rax, 0x10(%rbx)
movq %rbx, %rax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x117c(%rip), %rsi      # 0x7257
movl $0x1, %edi
xorl %eax, %eax
callq 0x3400
leaq 0x1144(%rip), %rsi      # 0x7232
movl $0x1, %edi
movl %ebp, %edx
xorl %eax, %eax
callq 0x31b0
// File: /workspace/github_c_makefile_star2_O3/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 %rbx
pushq %rax
movq %rdi, %rbx
movq 0x4643(%rip), %rdi      # 0xa750
movl 0x20(%rbx), %edx
xorl %r14d, %r14d
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x34d0
xorl %ebp, %ebp
movl $0x4, %r15d
movq 0x4625(%rip), %rdi      # 0xa750
movl 0x20(%rbx), %edx
movl $0x1, %esi
movl $0x4, %ecx
xorl %r8d, %r8d
movl $0x1, %r9d
pushq $0x8000                 # imm = 0x8000
pushq %r14
pushq %r14
pushq %r14
callq 0x3320
addq $0x20, %rsp
decl %r15d
jne 0x6124
incl %ebp
cmpl $0x5, %ebp
jne 0x611e
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq 0x443c(%rip), %rax      # 0xa780
movl 0x5c(%rax), %ecx
movl (%rdi), %edx
cmpl %edx, %ecx
jne 0x63b3
movq 0x18(%rax), %r15
testq %r15, %r15
je 0x63b5
movq %rdi, %rbx
movb $0x0, 0x1a(%r15)
movl 0x20(%r15), %ebp
movq 0x43e7(%rip), %r14      # 0xa750
movq %r14, %rdi
movl %ebp, %esi
callq 0x33b0
movq %r14, %rdi
movl %eax, %esi
xorl %edx, %edx
callq 0x3240
testq %rax, %rax
je 0x63dc
movd 0x10(%rax), %xmm0
punpcklwd 0xc7f(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1],xmm0[2],mem[2],xmm0[3],mem[3]
movq %xmm0, 0x28(%r15)
movq %rax, %rdi
callq 0x3050
movq 0x8(%r15), %r15
testq %r15, %r15
jne 0x6359
movl (%rbx), %ecx
movq 0x43cf(%rip), %rax      # 0xa780
jmp 0x63b5
movl %edx, %ecx
movl %ecx, 0x5c(%rax)
callq 0x4f30
movq 0x43bc(%rip), %rax      # 0xa780
movq 0x30(%rax), %rdi
callq 0x3dc0
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x4d6d
leaq 0xe4f(%rip), %rsi       # 0x7232
movl $0x1, %edi
movl %ebp, %edx
xorl %eax, %eax
callq 0x31b0
// File: /workspace/github_c_makefile_star2_O3/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 0x3660
testl %eax, %eax
je 0x6442
popq %rbx
retq
cmpq $0x0, 0x4306(%rip)      # 0xa750
je 0x645a
movq 0x431d(%rip), %rax      # 0xa770
movl (%rax), %edi
callq 0x32a0
callq 0x32d0
movq (%rbx), %rsi
movq (%rsi), %rdi
callq 0x3580
movq (%rbx), %rax
movq (%rax), %rdx
leaq 0xda4(%rip), %rsi       # 0x721b
xorl %edi, %edi
xorl %eax, %eax
callq 0x3400
// File: /workspace/github_c_makefile_star2_O3/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
subq $0x10, %rsp
movq 0x42f1(%rip), %rax      # 0xa780
movq 0x30(%rax), %r14
testq %r14, %r14
je 0x6560
movq %rdi, %rbx
movl (%rdi), %eax
movl 0x4301(%rip), %ebp      # 0xa7a8
cmpl %ebp, %eax
sete %cl
cmpl $0xa, %eax
setge %al
orb %cl, %al
jne 0x6560
movq %r14, %rdi
callq 0x4e73
movl (%rbx), %edi
callq 0x4ee2
movq 0x42b0(%rip), %rax      # 0xa780
leaq 0x18(%rax), %rcx
cmpq $0x0, 0x18(%rax)
je 0x64f0
movq 0x20(%rax), %rdx
movq %r14, 0x8(%rdx)
movq %rdx, (%r14)
movq $0x0, 0x8(%r14)
jmp 0x64f3
movq %r14, (%rcx)
movq %r14, 0x20(%rax)
movq %rcx, 0x10(%r14)
movl %ebp, %edi
callq 0x4ee2
movq 0x4247(%rip), %rdi      # 0xa750
movl 0x20(%r14), %esi
movq 0x4274(%rip), %rax      # 0xa788
movl 0x34(%rax), %eax
addl %eax, %eax
negl %eax
leaq 0x8(%rsp), %rcx
movl %eax, (%rcx)
xorl %edx, %edx
movl %edx, 0x4(%rcx)
movq 0x38(%r14), %r8
movq %r8, 0x30(%r14)
movl %eax, 0x38(%r14)
movl %edx, 0x3c(%r14)
movl $0x3, %edx
callq 0x32c0
movq 0x4220(%rip), %rdi      # 0xa768
movl 0x20(%r14), %esi
movl (%rbx), %edx
callq 0x3650
movq %rbx, %rdi
callq 0x616c
callq 0x4d6d
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x4200(%rip), %rax      # 0xa780
movq 0x30(%rax), %rcx
testq %rcx, %rcx
je 0x65bb
movq 0x18(%rax), %rdx
testq %rdx, %rdx
je 0x65bb
cmpq $0x0, 0x8(%rdx)
je 0x65bb
movq %rcx, %rdi
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
cmoveq %rdx, %rdi
cmpq %rcx, %rdi
je 0x65b2
cmpb $0x0, 0x1d(%rdi)
jne 0x659c
movq %rcx, 0x38(%rax)
jmp 0x3dc0
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x41bd(%rip), %rax      # 0xa780
movq 0x30(%rax), %rcx
testq %rcx, %rcx
je 0x65ff
movq 0x18(%rax), %rdx
testq %rdx, %rdx
je 0x65ff
cmpq $0x0, 0x8(%rdx)
je 0x65ff
movq %rcx, %rdi
movq (%rdi), %rdi
testq %rdi, %rdi
jne 0x65eb
movq 0x20(%rax), %rdi
cmpq %rcx, %rdi
je 0x65f6
cmpb $0x0, 0x1d(%rdi)
jne 0x65df
movq %rcx, 0x38(%rax)
jmp 0x3dc0
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x4174(%rip), %rax      # 0xa780
movq 0x30(%rax), %rbx
testq %rbx, %rbx
je 0x6640
movq 0x8(%rbx), %r15
testq %r15, %r15
je 0x6640
movq 0x10(%rbx), %r14
movq %rbx, %rdi
callq 0x4e73
movq 0x8(%r15), %rax
testq %rax, %rax
je 0x6646
movq %rbx, 0x8(%r15)
movq %r15, (%rbx)
movq %rax, 0x8(%rbx)
jmp 0x6667
popq %rbx
popq %r14
popq %r15
retq
leaq 0x8(%r14), %rax
cmpq $0x0, (%r14)
je 0x6664
movq (%rax), %rcx
movq %rbx, 0x8(%rcx)
movq %rcx, (%rbx)
movq $0x0, 0x8(%rbx)
jmp 0x6667
movq %rbx, (%r14)
movq %rbx, (%rax)
movq %r14, 0x10(%rbx)
popq %rbx
popq %r14
popq %r15
jmp 0x4f30
// File: /workspace/github_c_makefile_star2_O3/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 0x40fc(%rip), %rax      # 0xa780
movq 0x30(%rax), %rbx
testq %rbx, %rbx
je 0x66b6
movq (%rbx), %r15
testq %r15, %r15
je 0x66b6
movq 0x10(%rbx), %r14
movq %rbx, %rdi
callq 0x4e73
movq (%r15), %rax
testq %rax, %rax
je 0x66bc
movq %rbx, 0x8(%rax)
movq %rax, (%rbx)
movq %r15, 0x8(%rbx)
jmp 0x66db
popq %rbx
popq %r14
popq %r15
retq
movq (%r14), %rax
testq %rax, %rax
je 0x66d1
movq $0x0, (%rbx)
movq %rax, 0x8(%rbx)
jmp 0x66d5
leaq 0x8(%r14), %rax
movq %rbx, (%rax)
movq %r14, %r15
movq %rbx, (%r15)
movq %r14, 0x10(%rbx)
popq %rbx
popq %r14
popq %r15
jmp 0x4f30
// File: /workspace/github_c_makefile_star2_O3/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 0x4085(%rip), %r12      # 0xa780
movq 0x30(%r12), %rbx
testq %rbx, %rbx
je 0x673f
movq 0x18(%r12), %rax
testq %rax, %rax
je 0x673f
movq 0x8(%rax), %r14
testq %r14, %r14
je 0x673f
leaq 0x18(%r12), %r15
cmpq %rax, %rbx
je 0x674b
movq %rbx, %rdi
callq 0x4e73
movq (%r15), %rax
testq %rax, %rax
je 0x6768
movq $0x0, (%rbx)
movq %rax, 0x8(%rbx)
jmp 0x676f
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %r14, %rdi
callq 0x4e73
movq (%r15), %rax
testq %rax, %rax
je 0x6777
movq $0x0, (%r14)
movq %rax, 0x8(%r14)
jmp 0x677e
addq $0x20, %r12
movq %r12, %rax
movq %rbx, (%rax)
movq %rbx, %r14
jmp 0x6781
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 0x3dc0
// File: /workspace/github_c_makefile_star2_O3/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:
testq %rdi, %rdi
je 0x686c
pushq %rbp
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
cmpb $0x0, 0x1b(%rdi)
jne 0x6866
movl %esi, %ebp
movq 0x3f76(%rip), %rdi      # 0xa750
movl 0x20(%rbx), %esi
movq %rsp, %rcx
movl $0x0, (%rcx)
movl $0x10, %edx
callq 0x32c0
testb %bpl, %bpl
je 0x6859
movq 0x3f54(%rip), %rdi      # 0xa750
movl 0x20(%rbx), %esi
movq 0x3f7a(%rip), %rax      # 0xa780
movl 0x64(%rax), %eax
movq 0x3f78(%rip), %rdx      # 0xa788
movl 0x3c(%rdx), %r8d
addl %eax, %r8d
leal (%rax,%rax), %r9d
movq %rsp, %rcx
movl %eax, (%rcx)
movl %r8d, 0x4(%rcx)
movq 0x34(%rdx), %xmm0
movd %r9d, %xmm1
pshufd $0x50, %xmm1, %xmm1     # xmm1 = xmm1[0,0,1,1]
psubd %xmm1, %xmm0
movq %xmm0, 0x8(%rcx)
movq 0x38(%rbx), %rdx
movq %rdx, 0x30(%rbx)
movl %eax, 0x38(%rbx)
movl %r8d, 0x3c(%rbx)
movl $0xf, %edx
callq 0x32c0
movb $0x1, %al
jmp 0x685b
xorl %eax, %eax
movb %al, 0x1c(%rbx)
movq %rbx, %rdi
callq 0x3dc0
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r14
pushq %rbx
pushq %rax
movq 0x3e84(%rip), %rax      # 0xa780
movq 0x30(%rax), %rax
testq %rax, %rax
je 0x6999
movl 0x20(%rax), %edi
movl 0x3ed2(%rip), %esi      # 0xa7e4
callq 0x4f58
testb %al, %al
jne 0x6935
movq 0x3e2e(%rip), %rdi      # 0xa750
movq 0x3e57(%rip), %rax      # 0xa780
movq 0x30(%rax), %rax
movl 0x20(%rax), %esi
callq 0x35f0
movq 0x3e44(%rip), %rax      # 0xa780
movq 0x18(%rax), %rcx
testq %rcx, %rcx
je 0x69a1
xorl %ebx, %ebx
movq 0x3e1a(%rip), %rdx      # 0xa768
xorl %r14d, %r14d
cmpb $0x0, 0x1b(%rcx)
jne 0x6983
cmpb $0x0, 0x1c(%rcx)
jne 0x6983
cmpb $0x0, 0x19(%rcx)
jne 0x6983
cmpb $0x0, 0x1d(%rcx)
jne 0x6983
movl 0x24(%rcx), %esi
cmpl 0x104(%rdx), %esi
jne 0x6983
xorl %esi, %esi
testq %r14, %r14
setne %sil
cmoveq %rcx, %r14
addl %esi, %ebx
movq 0x8(%rcx), %rcx
testq %rcx, %rcx
jne 0x6951
movq 0x30(%rax), %rdi
callq 0x6a46
testl %ebx, %ebx
jle 0x69ad
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x30(%rax), %rdi
callq 0x6a46
xorl %r14d, %r14d
movq %rsp, %rbx
movl 0x3df2(%rip), %eax      # 0xa7a8
testl %eax, %eax
je 0x6999
addl $0x9, %eax
cltq
imulq $0x66666667, %rax, %rcx # imm = 0x66666667
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x22, %rcx
addl %edx, %ecx
addl %ecx, %ecx
leal (%rcx,%rcx,4), %ecx
subl %ecx, %eax
movl %eax, (%rsp)
movq %rbx, %rdi
callq 0x616c
movq 0x3d94(%rip), %rax      # 0xa780
movq 0x18(%rax), %rax
testq %rax, %rax
je 0x69b0
xorl %ecx, %ecx
movq 0x3d6a(%rip), %rdx      # 0xa768
cmpb $0x0, 0x1b(%rax)
jne 0x6a30
cmpb $0x0, 0x1c(%rax)
jne 0x6a30
cmpb $0x0, 0x19(%rax)
jne 0x6a30
cmpb $0x0, 0x1d(%rax)
jne 0x6a30
movl 0x24(%rax), %esi
cmpl 0x104(%rdx), %esi
jne 0x6a30
xorl %esi, %esi
testq %r14, %r14
setne %sil
cmoveq %rax, %r14
addl %esi, %ecx
movq 0x8(%rax), %rax
testq %rax, %rax
jne 0x69fe
testl %ecx, %ecx
jle 0x69b0
jmp 0x6999
// File: /workspace/github_c_makefile_star2_O3/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 0x6a7b
movq %rdi, %r14
movl 0x3d50(%rip), %ebx      # 0xa7a8
callq 0x4e73
movq 0x3d1c(%rip), %rax      # 0xa780
movq 0x30(%rax), %rcx
movq 0x38(%rax), %rdi
cmpq %r14, %rdi
jne 0x6a89
testq %rcx, %rcx
je 0x6a83
movq (%rcx), %rdi
jmp 0x6a85
addq $0x8, %rsp
popq %rbx
popq %r14
retq
xorl %edi, %edi
movq %rdi, 0x38(%rax)
cmpq %r14, %rcx
je 0x6a9e
movq 0x18(%rax), %rax
testq %rax, %rax
je 0x6a9e
cmpq $0x0, 0x8(%rax)
jne 0x6aa3
callq 0x3dc0
movq %r14, %rdi
callq 0x3050
cmpl $-0x1, %ebx
je 0x6abe
movl %ebx, %edi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x4ee2
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x4f30
// File: /workspace/github_c_makefile_star2_O3/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:
movq 0x3ce7(%rip), %rcx      # 0xa7b8
testq %rcx, %rcx
je 0x6b0e
movq 0x18(%rcx), %rdx
testq %rdx, %rdx
je 0x6b08
movq 0x18(%rdx), %rsi
testq %rsi, %rsi
je 0x6b02
movq 0x18(%rsi), %rax
testq %rax, %rax
je 0x6afc
cmpl %edi, 0x20(%rax)
je 0x6b10
movq 0x8(%rax), %rax
jmp 0x6aec
movq 0x8(%rsi), %rsi
jmp 0x6ae3
movq 0x8(%rdx), %rdx
jmp 0x6ada
movq 0x8(%rcx), %rcx
jmp 0x6ad1
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x3953(%rip), %rax      # 0xa788
movl 0x34(%rax), %edx
cvtsi2sd %edx, %xmm1
movq 0x393d(%rip), %rax      # 0xa780
movss 0x58(%rax), %xmm0
cvtss2sd %xmm0, %xmm2
mulsd 0x1cc(%rip), %xmm1      # 0x7020
addsd %xmm2, %xmm1
movl (%rdi), %ecx
xorps %xmm2, %xmm2
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 0x6e7e
retq
xorps %xmm1, %xmm1
cvtsi2ss %ecx, %xmm1
addss %xmm1, %xmm0
movss %xmm0, 0x58(%rax)
jmp 0x4f30
// File: /workspace/github_c_makefile_star2_O3/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
movl $0x1, %edi
movl $0x30, %esi
callq 0x3300
testq %rax, %rax
je 0x6f8d
movq %rax, %rbx
leaq 0x8(%rsp), %rcx
movl $0x400000, (%rcx)       # imm = 0x400000
movq 0x3883(%rip), %rdi      # 0xa750
movl %ebp, %esi
movl $0x800, %edx            # imm = 0x800
callq 0x30f0
movl %ebp, 0x18(%rbx)
movl %r14d, 0x1c(%rbx)
cmpq $0x0, 0x38a8(%rip)      # 0xa790
je 0x6f02
movq 0x38a7(%rip), %rax      # 0xa798
movq %rbx, 0x8(%rax)
movq %rax, (%rbx)
movq $0x0, 0x8(%rbx)
jmp 0x6f09
movq %rbx, 0x3887(%rip)      # 0xa790
movq %rbx, 0x3888(%rip)      # 0xa798
leaq 0x3879(%rip), %rax      # 0xa790
movq %rax, 0x10(%rbx)
movq 0x382e(%rip), %rdi      # 0xa750
leaq 0xc(%rsp), %rcx
movl $0x0, (%rcx)
movl %ebp, %esi
movl $0x40, %edx
callq 0x32c0
movq 0x3810(%rip), %rdi      # 0xa750
movl %ebp, %esi
callq 0x34c0
movl 0x18(%rbx), %ebp
movq 0x37ff(%rip), %r14      # 0xa750
movq %r14, %rdi
movl %ebp, %esi
callq 0x33b0
movq %r14, %rdi
movl %eax, %esi
xorl %edx, %edx
callq 0x3240
testq %rax, %rax
je 0x6f96
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
leaq 0x295(%rip), %rsi       # 0x7232
movl $0x1, %edi
movl %ebp, %edx
xorl %eax, %eax
callq 0x31b0
// File: /workspace/github_c_makefile_star2_O3/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 0x1394
callq 0x176c
movl $0x10, %r12d
leaq 0x28ef(%rip), %r15      # 0x3c90
movq %rsp, %r14
leaq 0xc7c(%rip), %r13       # 0x2027
xorl %ebx, %ebx
cmpl $0x0, -0x8(%r12,%r15)
movq -0x10(%r12,%r15), %rbp
je 0x13e4
movq %r13, %rdi
movq %rbp, %rsi
xorl %eax, %eax
callq 0x1090
movq %rbp, %rdi
movq %r14, %rsi
callq 0x15e0
testl %eax, %eax
je 0x140e
leaq 0xceb(%rip), %rdi       # 0x20c8
callq 0x1070
jmp 0x141c
leaq 0xc19(%rip), %rdi       # 0x2004
movq %rbp, %rsi
xorl %eax, %eax
callq 0x1090
movq %rbp, %rdi
movq %r14, %rsi
callq 0x15e0
testl %eax, %eax
jne 0x140e
movq (%r12,%r15), %rax
cmpq (%rsp), %rax
je 0x13d6
leaq 0xcaa(%rip), %rdi       # 0x20bf
callq 0x1070
incl %ebx
addq $0x20, %r12
cmpq $0x170, %r12            # imm = 0x170
jne 0x13ad
movl $0x18, %ebp
leaq 0xc22(%rip), %r14       # 0x2057
cmpl $0x0, -0x10(%rbp,%r15)
jne 0x1492
movq -0x8(%rbp,%r15), %r12
movq (%rbp,%r15), %r13
movq %r14, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x1090
movq %r12, %rdi
callq 0x14b8
movq %rax, %r12
movq %r13, %rdi
movq %rax, %rsi
callq 0x10d0
testl %eax, %eax
je 0x147e
leaq 0xc4a(%rip), %rdi       # 0x20bf
callq 0x1070
incl %ebx
jmp 0x148a
leaq 0xc43(%rip), %rdi       # 0x20c8
callq 0x1070
movq %r12, %rdi
callq 0x1030
addq $0x20, %rbp
cmpq $0x178, %rbp            # imm = 0x178
jne 0x1435
xorl %eax, %eax
testl %ebx, %ebx
setne %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/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)
movq 0x30(%rdi), %rdx
addq $0x28, %rdi
leaq 0x105b7(%rip), %rcx     # 0x1723c
movl $0x6, %r8d
xorl %esi, %esi
jmp 0x5360
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x70, %rsp
movl %edx, %ebp
movq %rdi, %rbx
movq %rsp, %r14
movq %r14, %rdi
callq 0x9520
movaps (%r14), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, (%r14)
movq 0x8(%rbx), %rdi
movups %xmm0, (%rbx)
testq %rdi, %rdi
je 0x6cf9
callq 0x671a
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x6cf9
callq 0x671a
movq (%rbx), %rdi
callq 0x96c4
testb %al, %al
je 0x6d31
movq %rbx, %rdi
callq 0x6e40
testb %al, %al
je 0x6d38
movq %rbx, %rdi
callq 0x6eac
movq %rbx, %rdi
callq 0x7144
movq %rbx, %rdi
callq 0x73a6
testb %al, %al
jne 0x6dc7
xorl %ebx, %ebx
jmp 0x6e1e
leaq 0x8(%rbx), %rsi
leaq 0x38(%rsp), %r15
movq %r15, -0x10(%r15)
movq $0x0, -0x8(%r15)
movb $0x0, (%r15)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%r15)
movq (%rbx), %rax
movl (%rax), %ecx
movl %ecx, -0x38(%r15)
movw $0x0, -0x28(%r15)
movl $0x0, -0x18(%r15)
movl %ebp, 0x28(%r15)
movq %rax, 0x18(%r15)
leaq 0x58(%rsp), %r14
movq %r14, %rdi
callq 0x7dd0
movl -0x58(%r14), %eax
movl %eax, -0x50(%r14)
movw $0x1, -0x3c(%r14)
leaq 0x10(%rbx), %rdi
movq %rsp, %rsi
callq 0x7d18
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x6db0
callq 0x671a
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x6dc7
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x5230
movq 0x10(%rbx), %r14
movq 0x18(%rbx), %r15
movb $0x1, %bl
cmpq %r15, %r14
je 0x6e1e
movq %r15, %rax
subq %r14, %rax
sarq $0x3, %rax
movabsq $0x4ec4ec4ec4ec4ec5, %rcx # imm = 0x4EC4EC4EC4EC4EC5
imulq %rax, %rcx
bsrq %rcx, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
leaq 0xcde(%rip), %r12       # 0x7ae0
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rcx
callq 0x80fb
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x8249
movl %ebx, %eax
addq $0x70, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x7d42
movq %rbx, %rdi
callq 0x53e0
// File: /workspace/github_c_makefile_star2_O3/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 %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
cmpq $0x20, (%rdi)
jge 0x6e54
xorl %eax, %eax
jmp 0x6ea7
xorl %r14d, %r14d
movq %r14, %rsi
callq 0x98ae
movq (%rbx), %rdi
callq 0x96e8
movl %eax, %ebp
movq (%rbx), %rdi
movl $0xb, %esi
callq 0x98b8
movq (%rbx), %rdi
callq 0x9780
cmpb $0x2, %al
je 0x6e8d
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x6e50
shll $0x9, %ebp
movl %ebp, %eax
addq %rax, %r14
movq (%rbx), %rdi
movq (%rdi), %rax
leaq -0x10(%rax), %rcx
cmpq %rcx, %r14
jb 0x6e57
cmpq %rax, %r14
sete %al
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x9dfd
incq %r15
movq %r15, 0x8(%rbx)
movq 0x10(%rbx), %r12
xorl %ebp, %ebp
cmpq %r12, %r15
jae 0x9e7e
subq %r15, %r12
incq %r15
xorl %r13d, %r13d
xorl %ebp, %ebp
movzbl -0x1(%r15), %r14d
movl %r14d, %edi
callq 0x50d0
cmpl $0x2f, %r14d
je 0x9e2a
testl %eax, %eax
je 0x9e76
xorl %eax, %eax
cmpl $0x2f, %r14d
jne 0x9e37
movl %r13d, %ebp
jmp 0x9e65
leal -0x30(%r14), %eax
cmpl $0x9, %eax
ja 0x9e49
shll $0x4, %r13d
orl %r13d, %eax
jmp 0x9e65
leal -0x61(%r14), %eax
shll $0x4, %r13d
cmpb $0x5, %al
ja 0x9e5b
addl $-0x57, %r14d
jmp 0x9e5f
addl $-0x37, %r14d
orl %r13d, %r14d
movl %r14d, %eax
movq %r15, 0x8(%rbx)
incq %r15
movl %eax, %r13d
decq %r12
jne 0x9e13
jmp 0x9e79
movl %r13d, %eax
shll $0x10, %ebp
orl %eax, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/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 0xa75a
movq 0x8(%rbx), %rax
cmpq 0x10(%rbx), %rax
jae 0x9eb7
cmpb %bpl, (%rax)
jne 0x9eb7
incq %rax
movq %rax, 0x8(%rbx)
movb $0x1, %al
jmp 0x9eb9
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xa75a
movq 0x8(%rbx), %rax
cmpq 0x10(%rbx), %rax
jae 0x9f01
movsbl (%rax), %esi
xorl %r14d, %r14d
movq %r15, %rdi
xorl %edx, %edx
callq 0x52b0
cmpq $-0x1, %rax
je 0x9f04
movq 0x8(%rbx), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rbx)
movb (%rax), %r14b
jmp 0x9f04
xorl %r14d, %r14d
movl %r14d, %eax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq 0x8(%r14), %rax
leaq 0x1(%rax), %rcx
cmpb %bpl, (%rax)
movq %rcx, 0x8(%r14)
je 0x9f4e
movsbl (%rax), %esi
movq %rbx, %rdi
callq 0x51f0
jmp 0x9f30
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x9f72
movq (%r15), %rsi
incq %rsi
callq 0x5230
movq %r14, %rdi
callq 0x53e0
// File: /workspace/github_c_makefile_star2_O3/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 0x10(%rdi), %rax
movq %rax, (%rdi)
leaq 0xcdb4(%rip), %rsi      # 0x17342
leaq 0xcdb5(%rip), %rdx      # 0x1734a
callq 0x6920
movl $0x14, %ecx
xorl %edx, %edx
leaq 0xcd89(%rip), %rax      # 0x17331
movl %ebp, %esi
shrl %cl, %esi
andl $0xf, %esi
movb (%rsi,%rax), %sil
leaq 0x2(%rdx), %rdi
cmpq $0x2, %rdx
leaq 0x1(%rdx), %r8
cmovbq %r8, %rdi
movq (%rbx), %rdx
movb %sil, (%rdx,%rdi)
addl $-0x4, %ecx
movq %r8, %rdx
cmpq $0x6, %r8
jne 0xa5a8
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
movl %esi, 0xc(%rsp)
movl %edx, 0x10(%rsp)
movq 0x38(%rdi), %rsi
cmpq 0x40(%rdi), %rsi
je 0xa636
movl 0x14(%rsp), %eax
movl %eax, 0x8(%rsi)
movq 0xc(%rsp), %rax
movq %rax, (%rsi)
addq $0xc, 0x38(%rdi)
jmp 0xa644
addq $0x30, %rdi
leaq 0xc(%rsp), %rdx
callq 0xad72
addq $0x18, %rsp
retq
nop