LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/tkln[P]mcwm/mcwm.c
// Function: raiseorlower
void raiseorlower(struct client *client)
{
    uint32_t values[] = { XCB_STACK_MODE_OPPOSITE };
    xcb_drawable_t win;
    
    if (NULL == client)
    {
        return;
    }

    win = client->id;
    
    xcb_configure_window(conn, win,
                         XCB_CONFIG_WINDOW_STACK_MODE,
                         values);
    xcb_flush(conn);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl 0x343e(%rip), %eax      # 0xa5b0
movl %eax, -0xc(%rbp)
xorl %eax, %eax
cmpq -0x8(%rbp), %rax
jne 0x717f
jmp 0x71af
movq -0x8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x10(%rbp)
movq 0x67e9(%rip), %rdi      # 0xd978
movl -0x10(%rbp), %esi
leaq -0xc(%rbp), %rcx
movl $0x40, %edx
callq 0x3200
movl %eax, -0x14(%rbp)
movq 0x67ce(%rip), %rdi      # 0xd978
callq 0x3140
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/tkln[P]mcwm/mcwm.c
// Function: setfocus
void setfocus(struct client *client)
{
    uint32_t values[1];

    /*
     * If client is NULL, we focus on whatever the pointer is on.
     *
     * This is a pathological case, but it will make the poor user
     * able to focus on windows anyway, even though this window
     * manager might be buggy.
     */
    if (NULL == client)
    {
        PDEBUG("setfocus: client was NULL!\n");

        focuswin = NULL;

        xcb_set_input_focus(conn, XCB_NONE, XCB_INPUT_FOCUS_POINTER_ROOT,
                            XCB_CURRENT_TIME);
        xcb_flush(conn);
        
        return;
    }
    
    /*
     * Don't bother focusing on the root window or on the same window
     * that already has focus.
     */
    if (client->id == screen->root || client == focuswin)
    {
        return;
    }

    /* Set new border colour. */
    if (client->fixed)
    {
        values[0] = conf.fixedcol;            
    }
    else
    {
        values[0] = conf.focuscol;
    }

    xcb_change_window_attributes(conn, client->id, XCB_CW_BORDER_PIXEL,
                                 values);

    /* Unset last focus. */
    if (NULL != focuswin)
    {
        setunfocus(focuswin->id);
    }

    /* Set new input focus. */

    xcb_set_input_focus(conn, XCB_INPUT_FOCUS_POINTER_ROOT, client->id,
                        XCB_CURRENT_TIME);

    xcb_flush(conn);
    
    /* Remember the new window as the current focused window. */
    focuswin = client;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
xorl %eax, %eax
cmpq -0x8(%rbp), %rax
jne 0x7208
movq $0x0, 0x6761(%rip) # 0xd940
movq 0x6792(%rip), %rdi      # 0xd978
xorl %ecx, %ecx
movl $0x1, %edx
movl %ecx, %esi
callq 0x34d0
movl %eax, -0x10(%rbp)
movq 0x677a(%rip), %rdi      # 0xd978
callq 0x3140
jmp 0x72b3
movq -0x8(%rbp), %rax
movl (%rax), %eax
movq 0x6733(%rip), %rcx      # 0xd948
cmpl (%rcx), %eax
je 0x7226
movq -0x8(%rbp), %rax
cmpq 0x671c(%rip), %rax      # 0xd940
jne 0x722b
jmp 0x72b3
movq -0x8(%rbp), %rax
testb $0x1, 0x32(%rax)
je 0x7240
movl 0x6735(%rip), %eax      # 0xd970
movl %eax, -0xc(%rbp)
jmp 0x7249
movl 0x6722(%rip), %eax      # 0xd968
movl %eax, -0xc(%rbp)
movq 0x6728(%rip), %rdi      # 0xd978
movq -0x8(%rbp), %rax
movl (%rax), %esi
leaq -0xc(%rbp), %rcx
movl $0x8, %edx
callq 0x30e0
movl %eax, -0x14(%rbp)
xorl %eax, %eax
cmpq 0x66d0(%rip), %rax      # 0xd940
je 0x7280
movq 0x66c7(%rip), %rax      # 0xd940
movl (%rax), %edi
callq 0x6d00
movq 0x66f1(%rip), %rdi      # 0xd978
movq -0x8(%rbp), %rax
movl (%rax), %edx
movl $0x1, %esi
xorl %ecx, %ecx
callq 0x34d0
movl %eax, -0x18(%rbp)
movq 0x66d5(%rip), %rdi      # 0xd978
callq 0x3140
movq -0x8(%rbp), %rax
movq %rax, 0x668d(%rip)      # 0xd940
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/tkln[P]mcwm/mcwm.c
// Function: start
int start(char *program)
{
    pid_t pid;
    
    pid = fork();
    if (-1 == pid)
    {
        perror("fork");
        return -1;
    }
    else if (0 == pid)
    {
        char *argv[2];

        /* In the child. */
        
        /*
         * Make this process a new process leader, otherwise the
         * terminal will die when the wm dies. Also, this makes any
         * SIGCHLD go to this process when we fork again.
         */
        if (-1 == setsid())
        {
            perror("setsid");
            exit(1);
        }
        
        argv[0] = program;
        argv[1] = NULL;

        if (-1 == execvp(program, argv))
        {
            perror("execve");            
            exit(1);
        }
        exit(0);
    }

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
callq 0x3560
movl %eax, -0x14(%rbp)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl -0x14(%rbp), %eax
jne 0x72f3
leaq 0x2fa4(%rip), %rdi      # 0xa289
callq 0x3470
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x736e
xorl %eax, %eax
cmpl -0x14(%rbp), %eax
jne 0x7365
callq 0x3210
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %ecx, %eax
jne 0x7320
leaq 0x2f7d(%rip), %rdi      # 0xa28e
callq 0x3470
movl $0x1, %edi
callq 0x3500
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x34b0
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %ecx, %eax
jne 0x735e
leaq 0x2f46(%rip), %rdi      # 0xa295
callq 0x3470
movl $0x1, %edi
callq 0x3500
xorl %edi, %edi
callq 0x3500
jmp 0x7367
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/tkln[P]mcwm/mcwm.c
// Function: getpointer
bool getpointer(xcb_drawable_t win, int16_t *x, int16_t *y)
{
    xcb_query_pointer_reply_t *pointer;
    
    pointer
        = xcb_query_pointer_reply(conn, xcb_query_pointer(conn, win), 0);
    if (NULL == pointer)
    {
        return false;
    }

    *x = pointer->win_x;
    *y = pointer->win_y;

    free(pointer);

    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq 0x641e(%rip), %rax      # 0xd978
movq %rax, -0x30(%rbp)
movq 0x6413(%rip), %rdi      # 0xd978
movl -0x8(%rbp), %esi
callq 0x3290
movq -0x30(%rbp), %rdi
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x32b0
movq %rax, -0x20(%rbp)
xorl %eax, %eax
cmpq -0x20(%rbp), %rax
jne 0x7592
movb $0x0, -0x1(%rbp)
jmp 0x75bd
movq -0x20(%rbp), %rax
movw 0x14(%rax), %cx
movq -0x10(%rbp), %rax
movw %cx, (%rax)
movq -0x20(%rbp), %rax
movw 0x16(%rax), %cx
movq -0x18(%rbp), %rax
movw %cx, (%rax)
movq -0x20(%rbp), %rdi
callq 0x3040
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/tkln[P]mcwm/mcwm.c
// Function: hide
void hide(struct client *client)
{
    long data[] = { XCB_ICCCM_WM_STATE_ICONIC, XCB_NONE };

    /*
     * Unmap window and declare iconic.
     * 
     * Unmapping will generate an UnmapNotify event so we can forget
     * about the window later.
     */
    xcb_unmap_window(conn, client->id);
    xcb_change_property(conn, XCB_PROP_MODE_REPLACE, client->id,
                        wm_state, wm_state, 32, 2, data);    
    xcb_flush(conn);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq 0x2cdd(%rip), %rax      # 0xa5c0
movq %rax, -0x20(%rbp)
movq 0x2cda(%rip), %rax      # 0xa5c8
movq %rax, -0x18(%rbp)
movq 0x607f(%rip), %rdi      # 0xd978
movq -0x8(%rbp), %rax
movl (%rax), %esi
callq 0x30c0
movl %eax, -0x24(%rbp)
movq 0x606a(%rip), %rdi      # 0xd978
movq -0x8(%rbp), %rax
movl (%rax), %edx
movl 0x6072(%rip), %ecx      # 0xd98c
movl 0x606b(%rip), %r8d      # 0xd98c
leaq -0x20(%rbp), %rax
xorl %esi, %esi
movl $0x20, %r9d
movl $0x2, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x3510
movl %eax, -0x28(%rbp)
movq 0x6030(%rip), %rdi      # 0xd978
callq 0x3140
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/tkln[P]mcwm/mcwm.c
// Function: getrandr
void getrandr(void)
{
    xcb_randr_get_screen_resources_current_cookie_t rcookie;
    xcb_randr_get_screen_resources_current_reply_t *res;
    xcb_randr_output_t *outputs;
    int len;    
    xcb_timestamp_t timestamp;
    
    rcookie = xcb_randr_get_screen_resources_current(conn, screen->root);
    res = xcb_randr_get_screen_resources_current_reply(conn, rcookie, NULL);
    if (NULL == res)
    {
        printf("No RANDR extension available.\n");
        return;
    }
    timestamp = res->config_timestamp;

    len = xcb_randr_get_screen_resources_current_outputs_length(res);
    outputs = xcb_randr_get_screen_resources_current_outputs(res);

    PDEBUG("Found %d outputs.\n", len);
    
    /* Request information for all outputs. */
    getoutputs(outputs, len, timestamp);

    free(res);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq 0x6009(%rip), %rdi      # 0xd978
movq 0x5fd2(%rip), %rax      # 0xd948
movl (%rax), %esi
callq 0x3220
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
movq 0x5feb(%rip), %rdi      # 0xd978
movl -0x4(%rbp), %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x3370
movq %rax, -0x10(%rbp)
xorl %eax, %eax
cmpq -0x10(%rbp), %rax
jne 0x79b5
leaq 0x2ab9(%rip), %rdi      # 0xa465
movb $0x0, %al
callq 0x3150
jmp 0x79f0
movq -0x10(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3540
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3230
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movl -0x1c(%rbp), %esi
movl -0x20(%rbp), %edx
callq 0x7a00
movq -0x10(%rbp), %rdi
callq 0x3040
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/tkln[P]mcwm/mcwm.c
// Function: findclones
struct monitor *findclones(xcb_randr_output_t id, int16_t x, int16_t y)    
{
    struct monitor *clonemon;
    struct item *item;

    for (item = monlist; item != NULL; item = item->next)
    {
        clonemon = item->data;

        PDEBUG("Monitor %s: x, y: %d--%d, %d--%d.\n",
               clonemon->name,
               clonemon->x, clonemon->x + clonemon->width,
               clonemon->y, clonemon->y + clonemon->height);

        /* Check for same position. */
        if (id != clonemon->id && clonemon->x == x && clonemon->y == y)
        {
            return clonemon;
        }
    }

    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movw %dx, %ax
movw %si, %cx
movl %edi, -0xc(%rbp)
movw %cx, -0xe(%rbp)
movw %ax, -0x10(%rbp)
movq 0x5af4(%rip), %rax      # 0xd8d0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x7e37
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movl -0xc(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl (%rcx), %eax
je 0x7e27
movq -0x18(%rbp), %rax
movswl 0x10(%rax), %eax
movswl -0xe(%rbp), %ecx
cmpl %ecx, %eax
jne 0x7e27
movq -0x18(%rbp), %rax
movswl 0x12(%rax), %eax
movswl -0x10(%rbp), %ecx
cmpl %ecx, %eax
jne 0x7e27
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x7e3f
jmp 0x7e29
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x7de0
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/tkln[P]mcwm/mcwm.c
// Function: findmonitor
struct monitor *findmonitor(xcb_randr_output_t id)
{
    struct item *item;
    struct monitor *mon;

    for (item = monlist; item != NULL; item = item->next)
    {
        mon = item->data;
        if (id == mon->id)
        {
            PDEBUG("findmonitor: Found it. Output ID: %d\n", mon->id);
            return mon;
        }
        PDEBUG("findmonitor: Goint to %p.\n", item->next);
    }

    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0xc(%rbp)
movq 0x5a72(%rip), %rax      # 0xd8d0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x7e99
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movl -0xc(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl (%rcx), %eax
jne 0x7e89
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x7ea1
jmp 0x7e8b
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x7e62
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/tkln[P]mcwm/mcwm.c
// Function: addmonitor
struct monitor *addmonitor(xcb_randr_output_t id, char *name, 
                           uint32_t x, uint32_t y, uint16_t width,
                           uint16_t height)
{
    struct item *item;
    struct monitor *mon;
    
    if (NULL == (item = additem(&monlist)))
    {
        fprintf(stderr, "Out of memory.\n");
        return NULL;
    }

    mon = malloc(sizeof (struct monitor));
    if (NULL == mon)
    {
        fprintf(stderr, "Out of memory.\n");
        return NULL;        
    }

    item->data = mon;
    
    mon->id = id;
    mon->name = name;
    mon->x = x;
    mon->y = y;
    mon->width = width;
    mon->height = height;
    mon->item = item;

    return mon;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movl %r8d, -0x4c(%rbp)
movl %ecx, %eax
movl -0x4c(%rbp), %ecx
movl %eax, -0x48(%rbp)
movl %edx, %eax
movl -0x48(%rbp), %edx
movl %eax, -0x44(%rbp)
movq %rsi, %rax
movl -0x44(%rbp), %esi
movq %rax, -0x40(%rbp)
movl %edi, %r8d
movq -0x40(%rbp), %rdi
movw %r9w, %ax
movl %r8d, -0xc(%rbp)
movq %rdi, -0x18(%rbp)
movl %esi, -0x1c(%rbp)
movl %edx, -0x20(%rbp)
movw %cx, -0x22(%rbp)
movw %ax, -0x24(%rbp)
leaq 0x59d2(%rip), %rdi      # 0xd8d0
callq 0x9480
movq %rax, %rcx
movq %rcx, -0x30(%rbp)
xorl %eax, %eax
cmpq %rcx, %rax
jne 0x7f36
movq 0x50e0(%rip), %rax      # 0xcff8
movq (%rax), %rdi
leaq 0x267d(%rip), %rsi      # 0xa59f
movb $0x0, %al
callq 0x32d0
movq $0x0, -0x8(%rbp)
jmp 0x7fd6
movl $0x20, %edi
callq 0x3350
movq %rax, -0x38(%rbp)
xorl %eax, %eax
cmpq -0x38(%rbp), %rax
jne 0x7f6e
movq 0x50a5(%rip), %rax      # 0xcff8
movq (%rax), %rdi
leaq 0x2642(%rip), %rsi      # 0xa59f
movb $0x0, %al
callq 0x32d0
movq $0x0, -0x8(%rbp)
jmp 0x7fd6
movq -0x38(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movl -0xc(%rbp), %ecx
movq -0x38(%rbp), %rax
movl %ecx, (%rax)
movq -0x18(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x8(%rax)
movl -0x1c(%rbp), %eax
movw %ax, %cx
movq -0x38(%rbp), %rax
movw %cx, 0x10(%rax)
movl -0x20(%rbp), %eax
movw %ax, %cx
movq -0x38(%rbp), %rax
movw %cx, 0x12(%rax)
movw -0x22(%rbp), %cx
movq -0x38(%rbp), %rax
movw %cx, 0x14(%rax)
movw -0x24(%rbp), %cx
movq -0x38(%rbp), %rax
movw %cx, 0x16(%rax)
movq -0x30(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/tkln[P]mcwm/mcwm.c
// Function: findmonbycoord
struct monitor *findmonbycoord(int16_t x, int16_t y)
{
    struct item *item;
    struct monitor *mon;

    for (item = monlist; item != NULL; item = item->next)
    {
        mon = item->data;

        PDEBUG("Monitor %s: x, y: %d--%d, %d--%d.\n",
               mon->name,
               mon->x, mon->x + mon->width,
               mon->y, mon->y + mon->height);

        PDEBUG("Is %d,%d between them?\n", x, y);
        
        if (x >= mon->x && x <= mon->x + mon->width
            && y >= mon->y && y <= mon->y + mon->height)
        {
            PDEBUG("findmonbycoord: Found it. Output ID: %d, name %s\n",
                   mon->id, mon->name);
            return mon;
        }
    }

    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movw %si, %ax
movw %di, %cx
movw %cx, -0xa(%rbp)
movw %ax, -0xc(%rbp)
movq 0x5577(%rip), %rax      # 0xd8d0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x83dd
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movswl -0xa(%rbp), %eax
movq -0x20(%rbp), %rcx
movswl 0x10(%rcx), %ecx
cmpl %ecx, %eax
jl 0x83cd
movswl -0xa(%rbp), %eax
movq -0x20(%rbp), %rcx
movswl 0x10(%rcx), %ecx
movq -0x20(%rbp), %rdx
movzwl 0x14(%rdx), %edx
addl %edx, %ecx
cmpl %ecx, %eax
jg 0x83cd
movswl -0xc(%rbp), %eax
movq -0x20(%rbp), %rcx
movswl 0x12(%rcx), %ecx
cmpl %ecx, %eax
jl 0x83cd
movswl -0xc(%rbp), %eax
movq -0x20(%rbp), %rcx
movswl 0x12(%rcx), %ecx
movq -0x20(%rbp), %rdx
movzwl 0x16(%rdx), %edx
addl %edx, %ecx
cmpl %ecx, %eax
jg 0x83cd
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x83e5
jmp 0x83cf
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x835d
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/tkln[P]mcwm/mcwm.c
// Function: getwmdesktop
int32_t getwmdesktop(xcb_drawable_t win)
{
    xcb_get_property_reply_t *reply;
    xcb_get_property_cookie_t cookie;
    uint32_t *wsp;
    uint32_t ws;
    
    cookie = xcb_get_property(conn, false, win, atom_desktop,
                              XCB_GET_PROPERTY_TYPE_ANY, 0,
                              sizeof (int32_t));

    reply = xcb_get_property_reply(conn, cookie, NULL);
    if (NULL == reply)
    {
        fprintf(stderr, "mcwm: Couldn't get properties for win %d\n", win);
        return MCWM_NOWS;
    }

    /* Length is 0 if we didn't find it. */
    if (0 == xcb_get_property_value_length(reply))
    {
        PDEBUG("_NET_WM_DESKTOP reply was 0 length.\n");
        goto bad;
    }
        
    wsp = xcb_get_property_value(reply);

    ws = *wsp;

    PDEBUG("got _NET_WM_DESKTOP: %d stored at %p.\n", ws, (void *)wsp);
    
    free(reply);

    return ws;

bad:
    free(reply);
    return MCWM_NOWS;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x8(%rbp)
movq 0x5576(%rip), %rdi      # 0xd978
movl -0x8(%rbp), %edx
movl 0x5575(%rip), %ecx      # 0xd980
xorl %r9d, %r9d
movl %r9d, %esi
movl %r9d, %r8d
movl $0x4, (%rsp)
callq 0x3090
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
movl %eax, -0x14(%rbp)
movq 0x5548(%rip), %rdi      # 0xd978
movl -0x14(%rbp), %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x3420
movq %rax, -0x10(%rbp)
xorl %eax, %eax
cmpq -0x10(%rbp), %rax
jne 0x846c
movq 0x4ba9(%rip), %rax      # 0xcff8
movq (%rax), %rdi
movl -0x8(%rbp), %edx
leaq 0x2087(%rip), %rsi      # 0xa4e3
movb $0x0, %al
callq 0x32d0
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x84b6
movq -0x10(%rbp), %rdi
callq 0x33d0
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x847f
jmp 0x84a6
movq -0x10(%rbp), %rdi
callq 0x30f0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3040
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x84b6
movq -0x10(%rbp), %rdi
callq 0x3040
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/tkln[P]mcwm/mcwm.c
// Function: findclient
struct client *findclient(xcb_drawable_t win)
{
    struct item *item;
    struct client *client;

    for (item = winlist; item != NULL; item = item->next)
    {
        client = item->data;
        if (win == client->id)
        {
            PDEBUG("findclient: Found it. Win: %d\n", client->id);
            return client;
        }
    }

    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0xc(%rbp)
movq 0x53fa(%rip), %rax      # 0xd8c8
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x8509
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movl -0xc(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl (%rcx), %eax
jne 0x84f9
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x8511
jmp 0x84fb
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x84d2
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/tkln[P]mcwm/mcwm.c
// Function: getgeom
bool getgeom(xcb_drawable_t win, int16_t *x, int16_t *y, uint16_t *width,
             uint16_t *height)
{
    xcb_get_geometry_reply_t *geom;
    
    geom
        = xcb_get_geometry_reply(conn, xcb_get_geometry(conn, win), NULL);
    if (NULL == geom)
    {
        return false;
    }

    *x = geom->x;
    *y = geom->y;
    *width = geom->width;
    *height = geom->height;
    
    free(geom);

    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq 0x5436(%rip), %rax      # 0xd978
movq %rax, -0x40(%rbp)
movq 0x542b(%rip), %rdi      # 0xd978
movl -0x8(%rbp), %esi
callq 0x32e0
movq -0x40(%rbp), %rdi
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x31a0
movq %rax, -0x30(%rbp)
xorl %eax, %eax
cmpq -0x30(%rbp), %rax
jne 0x857a
movb $0x0, -0x1(%rbp)
jmp 0x85c3
movq -0x30(%rbp), %rax
movw 0xc(%rax), %cx
movq -0x10(%rbp), %rax
movw %cx, (%rax)
movq -0x30(%rbp), %rax
movw 0xe(%rax), %cx
movq -0x18(%rbp), %rax
movw %cx, (%rax)
movq -0x30(%rbp), %rax
movw 0x10(%rax), %cx
movq -0x20(%rbp), %rax
movw %cx, (%rax)
movq -0x30(%rbp), %rax
movw 0x12(%rax), %cx
movq -0x28(%rbp), %rax
movw %cx, (%rax)
movq -0x30(%rbp), %rdi
callq 0x3040
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/tkln[P]mcwm/mcwm.c
// Function: keysymtokeycode
xcb_keycode_t keysymtokeycode(xcb_keysym_t keysym, xcb_key_symbols_t *keysyms)
{
    xcb_keycode_t *keyp;
    xcb_keycode_t key;

    /* We only use the first keysymbol, even if there are more. */
    keyp = xcb_key_symbols_get_keycode(keysyms, keysym);
    if (NULL == keyp)
    {
        fprintf(stderr, "mcwm: Couldn't look up key. Exiting.\n");
        exit(1);
        return 0;
    }

    key = *keyp;
    free(keyp);
    
    return key;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movl -0x4(%rbp), %esi
callq 0x32c0
movq %rax, -0x18(%rbp)
xorl %eax, %eax
cmpq -0x18(%rbp), %rax
jne 0x8789
movq 0x488a(%rip), %rax      # 0xcff8
movq (%rax), %rdi
leaq 0x1dce(%rip), %rsi      # 0xa546
movb $0x0, %al
callq 0x32d0
movl $0x1, %edi
callq 0x3500
movq -0x18(%rbp), %rax
movb (%rax), %al
movb %al, -0x19(%rbp)
movq -0x18(%rbp), %rdi
callq 0x3040
movb -0x19(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/tkln[P]mcwm/mcwm.c
// Function: forgetwin
void forgetwin(xcb_window_t win)
{
    struct item *item;
    struct client *client;
    uint32_t ws;
    
    /* Find this window in the global window list. */
    for (item = winlist; item != NULL; item = item->next)
    {
        client = item->data;

        /*
         * Forget about it completely and free allocated data.
         *
         * Note that it might already be freed by handling an
         * UnmapNotify, so it isn't necessarily an error if we don't
         * find it.
         */
        PDEBUG("Win %d == client ID %d\n", win, client->id);
        if (win == client->id)
        {
            /* Found it. */
            PDEBUG("Found it. Forgetting...\n");

            /*
             * Delete window from whatever workspace lists it belonged
             * to. Note that it's OK to be on several workspaces at
             * once.
             */
            for (ws = 0; ws < WORKSPACES; ws ++)
            {
                PDEBUG("Looking in ws #%d.\n", ws);
                if (NULL == client->wsitem[ws])
                {
                    PDEBUG("  but it wasn't there.\n");
                }
                else
                {
                    PDEBUG("  found it here. Deleting!\n");
                    delfromworkspace(client, ws);                    
                }
            }
            
            free(item->data);
            delitem(&winlist, item);

            return;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq 0x4ef6(%rip), %rax      # 0xd8c8
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x8a62
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movl -0x4(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl (%rcx), %eax
jne 0x8a4f
movl $0x0, -0x1c(%rbp)
cmpl $0xa, -0x1c(%rbp)
jae 0x8a31
movq -0x18(%rbp), %rcx
movl -0x1c(%rbp), %eax
movl %eax, %edx
xorl %eax, %eax
cmpq 0x48(%rcx,%rdx,8), %rax
jne 0x8a18
jmp 0x8a24
movq -0x18(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0x6f00
jmp 0x8a26
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x89fe
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x3040
movq -0x10(%rbp), %rsi
leaq 0x4e80(%rip), %rdi      # 0xd8c8
callq 0x9520
jmp 0x8a62
jmp 0x8a51
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0x89d6
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/tkln[P]mcwm/mcwm.c
// Function: mousemove
void mousemove(struct client *client, int rel_x, int rel_y)
{
    client->x = rel_x;
    client->y = rel_y;

    if (conf.snapmargin > 0)
    {
        snapwindow(client, MCWM_MOVE);
    }

    movelim(client);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl -0xc(%rbp), %eax
movw %ax, %cx
movq -0x8(%rbp), %rax
movw %cx, 0x6(%rax)
movl -0x10(%rbp), %eax
movw %ax, %cx
movq -0x8(%rbp), %rax
movw %cx, 0x8(%rax)
cmpl $0x0, 0x4eaf(%rip)      # 0xd954
jle 0x8ab5
movq -0x8(%rbp), %rdi
movl $0x2, %esi
callq 0x4e30
movq -0x8(%rbp), %rdi
callq 0x75d0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/tkln[P]mcwm/mcwm.c
// Function: mouseresize
void mouseresize(struct client *client, int rel_x, int rel_y)
{

    client->width = abs(rel_x - client->x);
    client->height = abs(rel_y - client->y);

    client->width -= (client->width - client->base_width) % client->width_inc;
    client->height -= (client->height - client->base_height)
        % client->height_inc;
    
    PDEBUG("Trying to resize to %dx%d (%dx%d)\n", client->width, client->height,
           (client->width - client->base_width) / client->width_inc,
           (client->height - client->base_height) / client->height_inc);

    if (conf.snapmargin > 0)
    {    
        snapwindow(client, MCWM_RESIZE);
    }
    
    resizelim(client);
    
    /* If this window was vertically maximized, remember that it isn't now. */
    if (client->vertmaxed)
    {
        client->vertmaxed = false;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
movswl 0x6(%rcx), %ecx
subl %ecx, %eax
movl %eax, %ecx
negl %ecx
cmovnsl %ecx, %eax
movw %ax, %cx
movq -0x8(%rbp), %rax
movw %cx, 0xa(%rax)
movl -0x10(%rbp), %eax
movq -0x8(%rbp), %rcx
movswl 0x8(%rcx), %ecx
subl %ecx, %eax
movl %eax, %ecx
negl %ecx
cmovnsl %ecx, %eax
movw %ax, %cx
movq -0x8(%rbp), %rax
movw %cx, 0xc(%rax)
movq -0x8(%rbp), %rax
movzwl 0xa(%rax), %eax
movq -0x8(%rbp), %rcx
subl 0x28(%rcx), %eax
movq -0x8(%rbp), %rcx
cltd
idivl 0x20(%rcx)
movq -0x8(%rbp), %rax
movzwl 0xa(%rax), %ecx
subl %edx, %ecx
movw %cx, 0xa(%rax)
movq -0x8(%rbp), %rax
movzwl 0xc(%rax), %eax
movq -0x8(%rbp), %rcx
subl 0x2c(%rcx), %eax
movq -0x8(%rbp), %rcx
cltd
idivl 0x24(%rcx)
movq -0x8(%rbp), %rax
movzwl 0xc(%rax), %ecx
subl %edx, %ecx
movw %cx, 0xc(%rax)
cmpl $0x0, 0x4de3(%rip)      # 0xd954
jle 0x8b81
movq -0x8(%rbp), %rdi
movl $0x3, %esi
callq 0x4e30
movq -0x8(%rbp), %rdi
callq 0x7380
movq -0x8(%rbp), %rax
testb $0x1, 0x30(%rax)
je 0x8b9c
movq -0x8(%rbp), %rax
movb $0x0, 0x30(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/tkln[P]mcwm/mcwm.c
// Function: handle_keypress
void handle_keypress(xcb_key_press_event_t *ev)
{
    int i;

    /* This loop relies on key_enum_t matching keys array. */

    for (i = 0; i < (int)(sizeof(keys)/sizeof(keys[0])); i ++)
    {
        if (ev->detail == keys[i].keycode && 0 != keys[i].keycode && 
            ev->state == keys[i].mod)
        {
            if (keys[i].client)
            {
                keys[i].func(*(keys[i].client), keys[i].arg);
            }
            else 
            {
                keys[i].func(NULL, keys[i].arg);
            }
            return;
        }
    }

    if (MCWM_TABBING == mode)
    {
        /* First finish tabbing around. Then deal with the next key. */
        finishtabbing();
        return;
    }

    PDEBUG("Unknown key pressed.\n");

    /*
     * We don't know what to do with this key. Send this key press
     * event to the focused window.
     */
    xcb_send_event(conn, false, XCB_SEND_EVENT_DEST_ITEM_FOCUS,
            XCB_EVENT_MASK_NO_EVENT, (char *) ev);
    xcb_flush(conn);
    return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
cmpl $0x25, -0xc(%rbp)
jge 0x8cdc
movq -0x8(%rbp), %rax
movzbl 0x1(%rax), %eax
movslq -0xc(%rbp), %rdx
leaq 0x4700(%rip), %rcx      # 0xd2e0
imulq $0x28, %rdx, %rdx
addq %rdx, %rcx
movzbl 0x4(%rcx), %ecx
cmpl %ecx, %eax
jne 0x8ccc
movslq -0xc(%rbp), %rcx
leaq 0x46e2(%rip), %rax      # 0xd2e0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movzbl 0x4(%rax), %ecx
xorl %eax, %eax
cmpl %ecx, %eax
je 0x8ccc
movq -0x8(%rbp), %rax
movzwl 0x1c(%rax), %eax
movslq -0xc(%rbp), %rdx
leaq 0x46ba(%rip), %rcx      # 0xd2e0
imulq $0x28, %rdx, %rdx
addq %rdx, %rcx
cmpl 0x8(%rcx), %eax
jne 0x8ccc
movslq -0xc(%rbp), %rcx
leaq 0x469f(%rip), %rax      # 0xd2e0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, 0x18(%rax)
je 0x8c98
movslq -0xc(%rbp), %rcx
leaq 0x4686(%rip), %rax      # 0xd2e0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movslq -0xc(%rbp), %rdx
leaq 0x4670(%rip), %rcx      # 0xd2e0
imulq $0x28, %rdx, %rdx
addq %rdx, %rcx
movq 0x18(%rcx), %rcx
movq (%rcx), %rdi
movslq -0xc(%rbp), %rdx
leaq 0x4657(%rip), %rcx      # 0xd2e0
imulq $0x28, %rdx, %rdx
addq %rdx, %rcx
movq 0x20(%rcx), %rsi
callq *%rax
jmp 0x8cca
movslq -0xc(%rbp), %rcx
leaq 0x463d(%rip), %rax      # 0xd2e0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movslq -0xc(%rbp), %rdx
leaq 0x4627(%rip), %rcx      # 0xd2e0
imulq $0x28, %rdx, %rdx
addq %rdx, %rcx
movq 0x20(%rcx), %rsi
xorl %ecx, %ecx
movl %ecx, %edi
callq *%rax
jmp 0x8d18
jmp 0x8cce
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x8bc3
movl $0x4, %eax
cmpl 0x4bf1(%rip), %eax      # 0xd8d8
jne 0x8cf0
callq 0x8d20
jmp 0x8d18
movq 0x4c81(%rip), %rdi      # 0xd978
movq -0x8(%rbp), %r8
xorl %ecx, %ecx
movl $0x1, %edx
movl %ecx, %esi
callq 0x3450
movl %eax, -0x10(%rbp)
movq 0x4c65(%rip), %rdi      # 0xd978
callq 0x3140
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/tkln[P]mcwm/mcwm.c
// Function: finishtabbing
void finishtabbing(void)
{
    mode = 0;
    
    if (NULL != lastfocuswin)
    {
        movetohead(&wslist[curws], lastfocuswin->wsitem[curws]);
        lastfocuswin = NULL;             
    }
                
    movetohead(&wslist[curws], focuswin->wsitem[curws]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl $0x0, 0x4baa(%rip)      # 0xd8d8
xorl %eax, %eax
cmpq 0x4c69(%rip), %rax      # 0xd9a0
je 0x8d6f
movl 0x4b81(%rip), %eax      # 0xd8c0
leaq 0x4b9a(%rip), %rdi      # 0xd8e0
shlq $0x3, %rax
addq %rax, %rdi
movq 0x4c4c(%rip), %rax      # 0xd9a0
movl 0x4b66(%rip), %ecx      # 0xd8c0
movq 0x48(%rax,%rcx,8), %rsi
callq 0x93c0
movq $0x0, 0x4c31(%rip) # 0xd9a0
movl 0x4b4b(%rip), %eax      # 0xd8c0
leaq 0x4b64(%rip), %rdi      # 0xd8e0
shlq $0x3, %rax
addq %rax, %rdi
movq 0x4bb6(%rip), %rax      # 0xd940
movl 0x4b30(%rip), %ecx      # 0xd8c0
movq 0x48(%rax,%rcx,8), %rsi
callq 0x93c0
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/tkln[P]mcwm/mcwm.c
// Function: arrangewindows
void arrangewindows(void)
{
    struct item *item;
    struct client *client;

    /*
     * Go through all windows. If they don't fit on the new screen,
     * move them around and resize them as necessary.
     */
    for (item = winlist; item != NULL; item = item->next)
    {
        client = item->data;
        fitonscreen(client);
    } /* for */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq 0x4b19(%rip), %rax      # 0xd8c8
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x8ddc
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x4ac0
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x8db3
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/tkln[P]mcwm/mcwm.c
// Function: forgetclient
void forgetclient(struct client *client)
{
    uint32_t ws;
    
    if (NULL == client)
    {
        PDEBUG("forgetclient: client was NULL\n");
        return;
    }

    /*
     * Delete this client from whatever workspace lists it belongs to.
     * Note that it's OK to be on several workspaces at once even if
     * you're not fixed.
     */
    for (ws = 0; ws < WORKSPACES; ws ++)
    {
        if (NULL != client->wsitem[ws])
        {
            delfromworkspace(client, ws);                    
        }
    }

    /* Remove from global window list. */
    freeitem(&winlist, NULL, client->winitem);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
xorl %eax, %eax
cmpq -0x8(%rbp), %rax
jne 0x9166
jmp 0x91b6
movl $0x0, -0xc(%rbp)
cmpl $0xa, -0xc(%rbp)
jae 0x919e
movq -0x8(%rbp), %rcx
movl -0xc(%rbp), %eax
movl %eax, %edx
xorl %eax, %eax
cmpq 0x48(%rcx,%rdx,8), %rax
je 0x9191
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x6f00
jmp 0x9193
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x916d
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rdx
leaq 0x471b(%rip), %rdi      # 0xd8c8
xorl %eax, %eax
movl %eax, %esi
callq 0x95c0
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/tkln[P]mcwm/mcwm.c
// Function: moveresize
void moveresize(xcb_drawable_t win, uint16_t x, uint16_t y,
                uint16_t width, uint16_t height)
{
    uint32_t values[4];
    
    if (screen->root == win || 0 == win)
    {
        /* Can't move or resize root. */
        return;
    }

    PDEBUG("Moving to %d, %d, resizing to %d x %d.\n", x, y, width, height);

    values[0] = x;
    values[1] = y;
    values[2] = width;
    values[3] = height;
                                        
    xcb_configure_window(conn, win,
                         XCB_CONFIG_WINDOW_X
                         | XCB_CONFIG_WINDOW_Y
                         | XCB_CONFIG_WINDOW_WIDTH
                         | XCB_CONFIG_WINDOW_HEIGHT, values);
    xcb_flush(conn);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movw %r8w, %ax
movl %edi, -0x4(%rbp)
movw %si, -0x6(%rbp)
movw %dx, -0x8(%rbp)
movw %cx, -0xa(%rbp)
movw %ax, -0xc(%rbp)
movq 0x4762(%rip), %rax      # 0xd948
movl (%rax), %eax
cmpl -0x4(%rbp), %eax
je 0x91f4
xorl %eax, %eax
cmpl -0x4(%rbp), %eax
jne 0x91f6
jmp 0x9239
movzwl -0x6(%rbp), %eax
movl %eax, -0x20(%rbp)
movzwl -0x8(%rbp), %eax
movl %eax, -0x1c(%rbp)
movzwl -0xa(%rbp), %eax
movl %eax, -0x18(%rbp)
movzwl -0xc(%rbp), %eax
movl %eax, -0x14(%rbp)
movq 0x475f(%rip), %rdi      # 0xd978
movl -0x4(%rbp), %esi
leaq -0x20(%rbp), %rcx
movl $0xf, %edx
callq 0x3200
movl %eax, -0x24(%rbp)
movq 0x4744(%rip), %rdi      # 0xd978
callq 0x3140
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/tkln[P]mcwm/list.c
// Function: movetohead
void movetohead(struct item **mainlist, struct item *item)
{
    if (NULL == item || NULL == mainlist || NULL == *mainlist)
    {
        return;
    }
    
    if (*mainlist == item)
    {
        /* item is NULL or we're already at head. Do nothing. */
        return;
    }

    /* Braid together the list where we are now. */
    if (NULL != item->prev)
    {
        item->prev->next = item->next;
    }

    if (NULL != item->next)
    {
        item->next->prev = item->prev;
    }

    /* Now we'at head, so no one before us. */
    item->prev = NULL;

    /* Old head is our next. */
    item->next = *mainlist;

    /* Old head needs to know about us. */
    item->next->prev = item;
    
    /* Remember the new head. */
    *mainlist = item;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
xorl %eax, %eax
cmpq -0x10(%rbp), %rax
je 0x93e7
xorl %eax, %eax
cmpq -0x8(%rbp), %rax
je 0x93e7
movq -0x8(%rbp), %rcx
xorl %eax, %eax
cmpq (%rcx), %rax
jne 0x93ec
jmp 0x9471
movq -0x8(%rbp), %rax
movq (%rax), %rax
cmpq -0x10(%rbp), %rax
jne 0x93fb
jmp 0x9471
movq -0x10(%rbp), %rcx
xorl %eax, %eax
cmpq 0x8(%rcx), %rax
je 0x941b
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rcx
xorl %eax, %eax
cmpq 0x10(%rcx), %rax
je 0x943b
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rcx
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/tkln[P]mcwm/list.c
// Function: additem
struct item *additem(struct item **mainlist)
{
    struct item *item;
    
    if (NULL == (item = (struct item *) malloc(sizeof (struct item))))
    {
        return NULL;
    }
  
    if (NULL == *mainlist)
    {
        /* First in the list. */

        item->prev = NULL;
        item->next = NULL;
    }
    else
    {
        /* Add to beginning of list. */

        item->next = *mainlist;
        item->next->prev = item;
        item->prev = NULL;
    }

    *mainlist = item;
        
    return item;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl $0x18, %edi
callq 0x3350
movq %rax, %rcx
movq %rcx, -0x18(%rbp)
xorl %eax, %eax
cmpq %rcx, %rax
jne 0x94ae
movq $0x0, -0x8(%rbp)
jmp 0x9511
movq -0x10(%rbp), %rcx
xorl %eax, %eax
cmpq (%rcx), %rax
jne 0x94d3
movq -0x18(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x10(%rax)
jmp 0x94fe
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rcx
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/tkln[P]mcwm/list.c
// Function: delitem
void delitem(struct item **mainlist, struct item *item)
{
    struct item *ml = *mainlist;
    
    if (NULL == mainlist || NULL == *mainlist || NULL == item)
    {
        return;
    }

    if (item == *mainlist)
    {
        /* First entry was removed. Remember the next one instead. */
        *mainlist = ml->next;
    }
    else
    {
        item->prev->next = item->next;

        if (NULL != item->next)
        {
            /* This is not the last item in the list. */
            item->next->prev = item->prev;
        }
    }

    free(item);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
xorl %eax, %eax
cmpq -0x8(%rbp), %rax
je 0x9556
movq -0x8(%rbp), %rcx
xorl %eax, %eax
cmpq (%rcx), %rax
je 0x9556
xorl %eax, %eax
cmpq -0x10(%rbp), %rax
jne 0x9558
jmp 0x95b5
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq (%rcx), %rax
jne 0x9576
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
jmp 0x95ac
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rcx
xorl %eax, %eax
cmpq 0x10(%rcx), %rax
je 0x95aa
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rcx, 0x8(%rax)
jmp 0x95ac
movq -0x10(%rbp), %rdi
callq 0x3040
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/tkln[P]mcwm/list.c
// Function: freeitem
void freeitem(struct item **list, int *stored,
              struct item *item)
{
    if (NULL == list || NULL == *list || NULL == item)
    {
        return;
    }
    
    if (NULL != item->data)
    {
        free(item->data);
        item->data = NULL;
    }

    delitem(list, item);

    if (NULL != stored)
    {
        (*stored) --;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
xorl %eax, %eax
cmpq -0x8(%rbp), %rax
je 0x95ef
movq -0x8(%rbp), %rcx
xorl %eax, %eax
cmpq (%rcx), %rax
je 0x95ef
xorl %eax, %eax
cmpq -0x18(%rbp), %rax
jne 0x95f1
jmp 0x9633
movq -0x18(%rbp), %rcx
xorl %eax, %eax
cmpq (%rcx), %rax
je 0x9613
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0x3040
movq -0x18(%rbp), %rax
movq $0x0, (%rax)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x9520
xorl %eax, %eax
cmpq -0x10(%rbp), %rax
je 0x9633
movq -0x10(%rbp), %rax
movl (%rax), %ecx
addl $-0x1, %ecx
movl %ecx, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/tkln[P]mcwm/list.c
// Function: delallitems
void delallitems(struct item **list, int *stored)
{
    struct item *item;
    struct item *next;
    
    for (item = *list; item != NULL; item = next)
    {
        next = item->next;
        free(item->data);
        delitem(list, item);
    }

    if (NULL != stored)
    {
        (*stored) = 0;
    }    
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x9691
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0x3040
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x9520
movq -0x20(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x965b
xorl %eax, %eax
cmpq -0x10(%rbp), %rax
je 0x96a3
movq -0x10(%rbp), %rax
movl $0x0, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/phluid61[P]hsf/src/list.c
// Function: SH_List__init
SH_List*
SH_List__init(int* err) {
	SH_List* obj;

	__cascade(err, (SH_List*)0);

	obj = (SH_List*)malloc(sizeof(SH_List));
	if ((SH_List*)0 == obj) {
		__raise(err, SH_E_MALLOC_ERROR);
		return (SH_List*)0;
	}

	obj->count = 0;

	__clear(err);
	return obj;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
xorl %eax, %eax
cmpq -0x10(%rbp), %rax
je 0x1198
movq -0x10(%rbp), %rcx
xorl %eax, %eax
cmpl (%rcx), %eax
je 0x1198
movq $0x0, -0x8(%rbp)
jmp 0x11f3
movl $0x2008, %edi           # imm = 0x2008
callq 0x1070
movq %rax, -0x18(%rbp)
xorl %eax, %eax
cmpq -0x18(%rbp), %rax
jne 0x11ca
xorl %eax, %eax
cmpq -0x10(%rbp), %rax
je 0x11c0
movq -0x10(%rbp), %rax
movl $0x80000001, (%rax)     # imm = 0x80000001
movq $0x0, -0x8(%rbp)
jmp 0x11f3
movq -0x18(%rbp), %rax
movq $0x0, 0x2000(%rax)
xorl %eax, %eax
cmpq -0x10(%rbp), %rax
je 0x11eb
movq -0x10(%rbp), %rax
movl $0x0, (%rax)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/phluid61[P]hsf/src/list.c
// Function: SH_List__destroy
void
SH_List__destroy(SH_List* obj, sh_bool_t recursive, int* err) {
	int local_err;
	int final_err = SH_E_NO_ERROR;
	size_t i;
	__cascade(err,);
	if (recursive) {
		for (i = 0; i < obj->count; i++) {
			local_err = SH_E_NO_ERROR;
			SH_Item__destroy(obj->_list[i], recursive, &local_err);
			if (final_err == SH_E_NO_ERROR && local_err != SH_E_NO_ERROR) {
				final_err = local_err;
			}
		}
		free(obj);
		__raise(err, final_err);
	} else {
		free(obj);
		__clear(err);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x0, -0x20(%rbp)
xorl %eax, %eax
cmpq -0x18(%rbp), %rax
je 0x1234
movq -0x18(%rbp), %rcx
xorl %eax, %eax
cmpl (%rcx), %eax
je 0x1234
jmp 0x12ce
cmpb $0x0, -0x9(%rbp)
je 0x12b1
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x2000(%rcx), %rax
jae 0x1295
movl $0x0, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq -0x1c(%rbp), %rdx
movzbl -0x9(%rbp), %esi
callq 0x1040
cmpl $0x0, -0x20(%rbp)
jne 0x1285
cmpl $0x0, -0x1c(%rbp)
je 0x1285
movl -0x1c(%rbp), %eax
movl %eax, -0x20(%rbp)
jmp 0x1287
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x1242
movq -0x8(%rbp), %rdi
callq 0x1030
xorl %eax, %eax
cmpq -0x18(%rbp), %rax
je 0x12af
movl -0x20(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
jmp 0x12ce
movq -0x8(%rbp), %rdi
callq 0x1030
xorl %eax, %eax
cmpq -0x18(%rbp), %rax
je 0x12cc
movq -0x18(%rbp), %rax
movl $0x0, (%rax)
jmp 0x12ce
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/phluid61[P]hsf/src/list.c
// Function: SH_List__add
void
SH_List__add(SH_List* obj, SH_Item* item, int* err) {
	__cascade(err,);
	if (obj->count >= SH_LIST_CAPACITY) {
		__raise(err, SH_E_LIST_OVERFLOW);
		return;
	}
	obj->_list[obj->count++] = item;
	__clear(err);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
xorl %eax, %eax
cmpq -0x18(%rbp), %rax
je 0x1304
movq -0x18(%rbp), %rcx
xorl %eax, %eax
cmpl (%rcx), %eax
je 0x1304
jmp 0x1360
movq -0x8(%rbp), %rax
cmpq $0x400, 0x2000(%rax) # imm = 0x400
jb 0x1329
xorl %eax, %eax
cmpq -0x18(%rbp), %rax
je 0x1327
movq -0x18(%rbp), %rax
movl $0x300001, (%rax)       # imm = 0x300001
jmp 0x1360
movq -0x10(%rbp), %rdx
movq -0x8(%rbp), %rax
movq -0x8(%rbp), %rsi
movq 0x2000(%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, 0x2000(%rsi)
movq %rdx, (%rax,%rcx,8)
xorl %eax, %eax
cmpq -0x18(%rbp), %rax
je 0x1360
movq -0x18(%rbp), %rax
movl $0x0, (%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/phluid61[P]hsf/src/list.c
// Function: _SH_List__to_s_item
void
__SH_List__to_s_item(SH_Item* obj, void* ptr, int* err) {
	__sh_list__string* str;

	sh_char_t* s;

	int local_err = SH_E_NO_ERROR;

	__cascade(err,);

	str = (__sh_list__string*)ptr;

	s = SH_Item__to_s(obj, &local_err);
	if (local_err) {
		__raise(err, local_err);
		return;
	}

	str->a[str->n ++] = s; str->length += strlen((const char*)s);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x0, -0x2c(%rbp)
xorl %eax, %eax
cmpq -0x18(%rbp), %rax
je 0x14df
movq -0x18(%rbp), %rcx
xorl %eax, %eax
cmpl (%rcx), %eax
je 0x14df
jmp 0x1547
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x2c(%rbp), %rsi
callq 0x1090
movq %rax, -0x28(%rbp)
cmpl $0x0, -0x2c(%rbp)
je 0x1511
xorl %eax, %eax
cmpq -0x18(%rbp), %rax
je 0x150f
movl -0x2c(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
jmp 0x1547
movq -0x28(%rbp), %rdx
movq -0x20(%rbp), %rax
movq -0x20(%rbp), %rsi
movq 0x8(%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, 0x8(%rsi)
movq %rdx, 0x10(%rax,%rcx,8)
movq -0x28(%rbp), %rdi
callq 0x1050
movq %rax, %rcx
movq -0x20(%rbp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)