LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/comfies[P]custard/src/ipc/parsing.c
// Function: string_to_color
color_t string_to_color(char *string) {
    color_t color = {
        .red   = 255,
        .green = 255,
        .blue  = 255,
        .alpha = 255
    };

    if (!string || string[0] != '#')
        return color;

    unsigned int length = strlen(string);
    if (length <= 4 || (5 < length && length < 7) || length == 8 || length > 9)
        return color;

    unsigned int offset = 0;
    if (length < 6) offset = 4;

    char group[8] = "000000ff";
    for (unsigned int index = 0; index < (length - 1); index++)
        group[index + offset] = string[index + 1];

    unsigned int rgba;
    rgba = strtol(group, NULL, 16);

    if (offset) {
        color.alpha = (rgba & 0x000F) * 0x11;
        color.red   = ((rgba & 0xF000) / 0x1000) * 0x11;
        color.green = ((rgba & 0x0F00) / 0x100) * 0x11;
        color.blue  = ((rgba & 0x00F0) / 0x10) * 0x11;
    } else {
        color.alpha = (rgba & 0x000000FF);
        color.red   = (rgba & 0xFF000000) / 0x1000000;
        color.green = (rgba & 0x00FF0000) / 0x10000;
        color.blue  = (rgba & 0x0000FF00) / 0x100;
    }

    return color;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl $0xff000000, %ebx       # imm = 0xFF000000
movl $0xff0000, %r12d        # imm = 0xFF0000
movl $0xff00, %r13d          # imm = 0xFF00
movl $0xff, %ebp
testq %rdi, %rdi
je 0x48bc
movq %rdi, %r14
cmpb $0x23, (%rdi)
jne 0x48bc
movq %r14, %rdi
callq 0x31f0
movq %rax, %r15
cmpl $0x5, %r15d
jb 0x48bc
setne %al
cmpl $0x7, %r15d
setb %cl
cmpl $0x9, %r15d
ja 0x48bc
cmpl $0x8, %r15d
je 0x48bc
andb %cl, %al
jne 0x48bc
movabsq $0x6666303030303030, %rax # imm = 0x6666303030303030
movq %rax, (%rsp)
movl %r15d, %eax
decl %eax
je 0x4841
xorl %ecx, %ecx
cmpl $0x5, %r15d
sete %cl
leaq (%rsp,%rcx,4), %rdi
incq %r14
movl %eax, %edx
movq %r14, %rsi
callq 0x33f0
movq %rsp, %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x33e0
movq %rax, %rbx
cmpl $0x5, %r15d
jne 0x4894
movl %ebx, %eax
andl $0xf, %eax
movl %eax, %edx
shll $0x4, %edx
orl %eax, %edx
movl %ebx, %ecx
shrl $0xc, %ecx
andl $0xf, %ecx
movl %ecx, %eax
shll $0x4, %eax
orl %ecx, %eax
movl %ebx, %esi
shrl $0x8, %esi
andl $0xf, %esi
movl %esi, %ecx
shll $0x4, %ecx
orl %esi, %ecx
shrb $0x4, %bl
movzbl %bl, %edi
movl %edi, %esi
shll $0x4, %esi
addl %edi, %esi
movl %edx, %ebx
jmp 0x48a7
movq %rbx, %rax
shrq $0x18, %rax
movq %rbx, %rcx
shrq $0x10, %rcx
movl %ebx, %esi
shrl $0x8, %esi
shll $0x18, %ebx
movzbl %sil, %r12d
shll $0x10, %r12d
shll $0x8, %ecx
movzwl %cx, %r13d
movzbl %al, %ebp
orl %ebx, %r12d
orl %r13d, %ebp
orl %r12d, %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_O1/comfies[P]custard/src/ipc/socket.c
// Function: finalize_socket
void finalize_socket() {
    if (socket_mode == WINDOW_MANAGER)
        unlink(socket_path);
    else
        close(socket_file_descriptor);
    free(socket_path);
}

// Assembly:
pushq %rax
cmpl $0x0, 0x7e1a(%rip)      # 0xc8bc
je 0x4ab1
movl 0x7e0e(%rip), %edi      # 0xc8b8
callq 0x32f0
jmp 0x4abd
movq 0x7df8(%rip), %rdi      # 0xc8b0
callq 0x3090
movq 0x7dec(%rip), %rdi      # 0xc8b0
popq %rax
jmp 0x3060
// File: /workspace/github_c_makefile_star2_O1/comfies[P]custard/src/ipc/socket.c
// Function: read_from_socket
char *read_from_socket() {
    int command_file_descriptor = accept(socket_file_descriptor, NULL, 0);

    if (!command_file_descriptor) {
        log_fatal("Unable to accept connection to socket");
        return "";
    }

    char *output = calloc(1024, sizeof(char));
    ssize_t length = read(command_file_descriptor, output, 1023);

    output[length] = '\0';
    log_debug("Fed data(%s)", output);

    return output;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl 0x7d95(%rip), %edi      # 0xc8b8
xorl %esi, %esi
xorl %edx, %edx
callq 0x35b0
testl %eax, %eax
je 0x4b82
movl %eax, %ebp
movl $0x400, %edi            # imm = 0x400
movl $0x1, %esi
callq 0x3340
movq %rax, %rbx
movl $0x3ff, %edx            # imm = 0x3FF
movl %ebp, %edi
movq %rax, %rsi
callq 0x3320
movb $0x0, (%rbx,%rax)
leaq 0x3719(%rip), %rsi      # 0x8277
leaq 0x37c3(%rip), %rdx      # 0x8328
leaq 0x37f3(%rip), %r8       # 0x835f
movl $0x3, %edi
movl $0x55, %ecx
movq %rbx, %r9
xorl %eax, %eax
callq 0x5206
jmp 0x4baf
leaq 0x36ee(%rip), %rsi      # 0x8277
leaq 0x3798(%rip), %rdx      # 0x8328
leaq 0x37a2(%rip), %r8       # 0x8339
movl $0x1, %edi
movl $0x4d, %ecx
xorl %eax, %eax
callq 0x5206
leaq 0x3aac(%rip), %rbx      # 0x865b
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/comfies[P]custard/src/wm/config.c
// Function: create_or_get_kv_pair
kv_pair_t *create_or_get_kv_pair(vector_t *configuration, char *key) {
    kv_pair_t *kv_pair;

    while ((kv_pair = vector_iterator(configuration))) {
        if (!strcmp(kv_pair->key, key)) {
            reset_vector_iterator(configuration);
            return kv_pair;
        }
    }

    kv_pair = (kv_pair_t*)calloc(1, sizeof(kv_pair_t));

    kv_pair->key = (char*)calloc(strlen(key) + 1, sizeof(char));
    strcpy(kv_pair->key, key);

    kv_pair->value = (kv_value_t*)calloc(1, sizeof(kv_value_t));
    log_debug("New key-value pair created with key(%s)", key);

    push_to_vector(configuration, kv_pair);
    return kv_pair;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
movq %rbx, %rdi
callq 0x3851
testq %rax, %rax
je 0x4d8f
movq %rax, %r14
movq (%rax), %rdi
movq %r15, %rsi
callq 0x3370
testl %eax, %eax
jne 0x4d66
movq %rbx, %rdi
callq 0x3885
jmp 0x4e0c
movl $0x1, %edi
movl $0x10, %esi
callq 0x3340
movq %rax, %r14
movq %r15, %rdi
callq 0x31f0
leaq 0x1(%rax), %rdi
movl $0x1, %esi
callq 0x3340
movq %rax, (%r14)
movq %rax, %rdi
movq %r15, %rsi
callq 0x30e0
movl $0x1, %edi
movl $0x8, %esi
callq 0x3340
movq %rax, 0x8(%r14)
leaq 0x35a2(%rip), %rsi      # 0x8381
leaq 0x35ab(%rip), %rdx      # 0x8391
leaq 0x35ba(%rip), %r8       # 0x83a7
movl $0x3, %edi
movl $0x4b, %ecx
movq %r15, %r9
xorl %eax, %eax
callq 0x5206
movq %rbx, %rdi
movq %r14, %rsi
callq 0x388c
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/comfies[P]custard/src/wm/config.c
// Function: get_value_from_key
kv_value_t *get_value_from_key(vector_t *configuration, char *key) {
    kv_pair_t *kv_pair;

    while ((kv_pair = vector_iterator(configuration))) {
        if (!strcmp(kv_pair->key, key)) {
            reset_vector_iterator(configuration);
            return kv_pair->value;
        }
    }

    return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %r14
xorl %ebx, %ebx
movq %r14, %rdi
callq 0x3851
testq %rax, %rax
je 0x4e51
movq %rax, %r12
movq (%rax), %rdi
movq %r15, %rsi
callq 0x3370
testl %eax, %eax
jne 0x4e25
movq %r14, %rdi
callq 0x3885
movq 0x8(%r12), %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/comfies[P]custard/src/wm/config.c
// Function: get_value_from_key_with_fallback
kv_value_t *get_value_from_key_with_fallback(vector_t *passed_configuration,
    char *key) {

    if (!passed_configuration)
        passed_configuration = configuration;

    kv_value_t *value;
    value = get_value_from_key(passed_configuration, key);

    if (passed_configuration != configuration)
        if (!value)
            value = get_value_from_key(configuration, key);

    return value;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
testq %rdi, %rdi
jne 0x4e76
movq 0x7a4a(%rip), %r14      # 0xc8c0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4e15
movq 0x7a38(%rip), %rdi      # 0xc8c0
cmpq %rdi, %r14
sete %cl
testq %rax, %rax
setne %dl
orb %cl, %dl
je 0x4ea0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x4e15
nop
// File: /workspace/github_c_makefile_star2_O1/comfies[P]custard/src/wm/custard.c
// Function: log
void _log(unsigned short level, const char *file, const char *function,
    const int line, char *formatting, ...) {

    /*
     * Loglevels:
     * 0 - Absolutely fucking nothing
     * 1 - Fatal
     * 2 - Message
     * 3 - Debug
     */

     if (loglevel < level)
        return;

    fprintf(stderr, "%s:%s L%d: ", file, function, line);

    va_list ap;
    va_start(ap, formatting);
    vfprintf(stderr, formatting, ap);
    va_end(ap);

    fputs("\n", stderr);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xd8, %rsp
testb %al, %al
je 0x524b
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %r9, 0x48(%rsp)
cmpw %di, 0x7139(%rip)       # 0xc390
jae 0x5264
addq $0xd8, %rsp
popq %rbx
popq %r14
retq
movq %r8, %rbx
movl %ecx, %r8d
movq %rdx, %rcx
movq %rsi, %rdx
movq 0x6d79(%rip), %r14      # 0xbff0
movq (%r14), %rdi
leaq 0x33cd(%rip), %rsi      # 0x864e
xorl %eax, %eax
callq 0x33c0
leaq 0x20(%rsp), %rax
movq %rsp, %rdx
movq %rax, 0x10(%rdx)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000028, %rax     # imm = 0x3000000028
movq %rax, (%rdx)
movq (%r14), %rdi
movq %rbx, %rsi
callq 0x3590
movq (%r14), %rsi
leaq 0x3398(%rip), %rdi      # 0x865a
callq 0x3280
jmp 0x5259
// File: /workspace/github_c_makefile_star2_O1/comfies[P]custard/src/wm/custard.c
// Function: initialize
unsigned short initialize() {
    if (!initialize_xcb() || !initialize_ewmh() || !initialize_socket())
        return 0;
    log_debug("XCB, EWMH, and socket setup");

    setup_monitors();
    log_debug("Monitors setup");
    setup_global_configuration();
    log_debug("Global configuration setup");

    unsigned int index = 0;
    for (; index < SIGUNUSED; index++)
        if (signals[index])
            signal(index, signals[index]);
    index = 0;
    log_debug("Signal handlers setup");

    return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
callq 0x7274
testw %ax, %ax
je 0x53b8
callq 0x7460
testw %ax, %ax
je 0x53b8
callq 0x48d8
testw %ax, %ax
je 0x53b8
leaq 0x30d0(%rip), %r14      # 0x83cf
leaq 0x3229(%rip), %r15      # 0x852f
leaq 0x322d(%rip), %r8       # 0x853a
xorl %ebx, %ebx
movl $0x3, %edi
movq %r14, %rsi
movq %r15, %rdx
movl $0x7c, %ecx
xorl %eax, %eax
callq 0x5206
callq 0x67c8
leaq 0x3224(%rip), %r8       # 0x8556
movl $0x3, %edi
movq %r14, %rsi
movq %r15, %rdx
movl $0x7f, %ecx
xorl %eax, %eax
callq 0x5206
callq 0x4bbc
leaq 0x3210(%rip), %r8       # 0x8565
movl $0x3, %edi
movq %r14, %rsi
movq %r15, %rdx
movl $0x81, %ecx
xorl %eax, %eax
callq 0x5206
leaq 0x742d(%rip), %r14      # 0xc7a0
movq (%r14,%rbx,8), %rsi
testq %rsi, %rsi
je 0x5383
movl %ebx, %edi
callq 0x3390
incq %rbx
cmpq $0x1f, %rbx
jne 0x5373
leaq 0x303c(%rip), %rsi      # 0x83cf
leaq 0x3195(%rip), %rdx      # 0x852f
leaq 0x31df(%rip), %r8       # 0x8580
movl $0x3, %edi
movl $0x88, %ecx
xorl %eax, %eax
callq 0x5206
movw $0x1, %ax
jmp 0x53ba
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/comfies[P]custard/src/wm/decorations.c
// Function: apply_decoration_to_window_screen_geometry
void apply_decoration_to_window_screen_geometry(window_t *window,
    screen_geometry_t *geometry) {

    unsigned int border_type = get_setting_from_window_rules(window,
        "borders")->number;

    if (!border_type)
        return;

    if (border_type > 3)
        border_type = 3;

    unsigned int outer_size = get_setting_from_window_rules(window,
        "border.size.outer")->number;
    unsigned int inner_size = get_setting_from_window_rules(window,
        "border.size.inner")->number;

    if (!outer_size)
        outer_size = 1;

    if (!inner_size)
        inner_size = 1;

    unsigned int border_size;
    if (border_type == 1)
        border_size = outer_size;
    else
        border_size = (outer_size * (border_type - 1)) +
            inner_size;

    if (!border_size)
        return;

    geometry->height -= (border_size * 2);
    geometry->width -= (border_size * 2);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x2a12(%rip), %rsi      # 0x81f2
callq 0x71f7
movl (%rax), %ebp
testl %ebp, %ebp
je 0x585b
leaq 0x2a08(%rip), %rsi      # 0x81fa
movq %r14, %rdi
callq 0x71f7
movl (%rax), %r15d
leaq 0x2a08(%rip), %rsi      # 0x820c
movq %r14, %rdi
callq 0x71f7
cmpl $0x1, %r15d
adcl $0x0, %r15d
cmpl $0x1, %ebp
je 0x5832
cmpl $0x3, %ebp
movl $0x3, %ecx
cmovbl %ebp, %ecx
movl (%rax), %eax
decl %ecx
imull %ecx, %r15d
cmpl $0x1, %eax
adcl %eax, %r15d
testl %r15d, %r15d
je 0x585b
addl %r15d, %r15d
cvtsi2ss %r15, %xmm0
movss 0x8(%rbx), %xmm1
movss 0xc(%rbx), %xmm2
subss %xmm0, %xmm1
movss %xmm1, 0x8(%rbx)
subss %xmm0, %xmm2
movss %xmm2, 0xc(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/comfies[P]custard/src/wm/decorations.c
// Function: get_raw_color_value
unsigned int get_raw_color_value(color_t color) {
    unsigned int value;

    value = (color.alpha) * 0x1000000 |
        ((color.red   * color.alpha) / 0xff) * 0x10000 |
        ((color.green * color.alpha) / 0xff) * 0x100   |
        ((color.blue  * color.alpha) / 0xff);

    return value;
}

// Assembly:
movl %edi, %edx
shrl $0x8, %edx
movl %edi, %eax
shrl $0x10, %eax
movl %edi, %ecx
shrl $0x18, %ecx
movl %edi, %esi
andl $0xff000000, %esi       # imm = 0xFF000000
movl $0xff, %r8d
andl %r8d, %edi
imull %ecx, %edi
imulq $0x1010102, %rdi, %rdi  # imm = 0x1010102
shrq $0x20, %rdi
shll $0x10, %edi
orl %esi, %edi
andl %r8d, %edx
imull %ecx, %edx
imulq $0x1010102, %rdx, %rdx  # imm = 0x1010102
shrq $0x20, %rdx
shll $0x8, %edx
andl %r8d, %eax
imull %ecx, %eax
imulq $0x1010102, %rax, %rax  # imm = 0x1010102
shrq $0x20, %rax
orl %edi, %eax
orl %edx, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/comfies[P]custard/src/wm/decorations.c
// Function: single_border
void single_border(xcb_window_t window, unsigned int border_size,
    color_t color) {
    /* Single border, configure window */
    unsigned int values[1] = { border_size };
    configure_window(window, XCB_CONFIG_WINDOW_BORDER_WIDTH, values);

    values[0] = get_raw_color_value(color);
    xcb_change_window_attributes(xcb_connection, window,
        XCB_CW_BORDER_PIXEL, values);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %edx, %r14d
movl %edi, %ebp
leaq 0xc(%rsp), %rbx
movl %esi, (%rbx)
movl $0x10, %esi
movq %rbx, %rdx
callq 0x7690
movl %r14d, %edx
shrl $0x8, %edx
movl %r14d, %eax
shrl $0x10, %eax
movl %r14d, %ecx
shrl $0x18, %ecx
movl %r14d, %esi
andl $0xff000000, %esi       # imm = 0xFF000000
movl $0xff, %edi
andl %edi, %r14d
imull %ecx, %r14d
imulq $0x1010102, %r14, %r8   # imm = 0x1010102
shrq $0x20, %r8
shll $0x10, %r8d
orl %esi, %r8d
andl %edi, %edx
imull %ecx, %edx
imulq $0x1010102, %rdx, %rdx  # imm = 0x1010102
shrq $0x20, %rdx
shll $0x8, %edx
andl %edi, %eax
imull %ecx, %eax
imulq $0x1010102, %rax, %rax  # imm = 0x1010102
shrq $0x20, %rax
orl %r8d, %eax
orl %edx, %eax
movl %eax, (%rbx)
leaq 0x6e67(%rip), %rax      # 0xc8f8
movq (%rax), %rdi
movl %ebp, %esi
movl $0x8, %edx
movq %rbx, %rcx
callq 0x3170
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/comfies[P]custard/src/wm/decorations.c
// Function: double_border_transient
void double_border_transient(xcb_pixmap_t pixmap,
    xcb_gcontext_t graphics_context, unsigned int inner_size,
    unsigned int outer_size, unsigned int border_size,
    xcb_get_geometry_reply_t *geometry) {

    xcb_rectangle_t inner_border[5] = {
        {
            (short)geometry->width, 0,
            (unsigned short)inner_size,
            (unsigned short)(geometry->height + inner_size)
        },
        {
            0, (short)geometry->height,
            (unsigned short)(geometry->width + inner_size),
            (unsigned short)inner_size
        },
        {
            (short)(geometry->width + border_size + outer_size), 0,
            (unsigned short)inner_size,
            (unsigned short)(geometry->height + inner_size)
        },
        {
            0, (short)(geometry->height + border_size + outer_size),
            (unsigned short)(geometry->width + inner_size),
            (unsigned short)inner_size
        },
        {
            (short)(geometry->width + border_size + outer_size),
            (short)(geometry->height + border_size + outer_size),
            (unsigned short)inner_size, (unsigned short)inner_size
        }
    };

    xcb_poly_fill_rectangle(xcb_connection, pixmap, graphics_context,
        5, inner_border);
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x28, %rsp
movl %r8d, %r10d
movl %edx, %eax
movl %esi, %edx
movl %edi, %esi
movl 0x10(%r9), %edi
movq %rsp, %r8
movw %di, (%r8)
xorl %r11d, %r11d
movw %r11w, 0x2(%r8)
movw %ax, 0x4(%r8)
movzwl 0x12(%r9), %r9d
leal (%r9,%rax), %ebx
movw %bx, 0x6(%r8)
movw %r11w, 0x8(%r8)
movw %r9w, 0xa(%r8)
movl %eax, %ebp
addl %edi, %ebp
movw %bp, 0xc(%r8)
movw %ax, 0xe(%r8)
addl %r10d, %ecx
addl %ecx, %edi
movw %di, 0x10(%r8)
movw %r11w, 0x12(%r8)
movw %ax, 0x14(%r8)
movw %bx, 0x16(%r8)
movw %r11w, 0x18(%r8)
addl %r9d, %ecx
movw %cx, 0x1a(%r8)
movw %bp, 0x1c(%r8)
movw %ax, 0x1e(%r8)
movw %di, 0x20(%r8)
movw %cx, 0x22(%r8)
movw %ax, 0x24(%r8)
movw %ax, 0x26(%r8)
leaq 0x6b05(%rip), %rax      # 0xc8f8
movq (%rax), %rdi
movl $0x5, %ecx
callq 0x32a0
addq $0x28, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/comfies[P]custard/src/wm/geometry.c
// Function: create_labeled_geometry
labeled_grid_geometry_t *create_labeled_geometry(char *label, unsigned int x,
    unsigned int y, unsigned int height, unsigned int width) {
    labeled_grid_geometry_t *geometry = (labeled_grid_geometry_t*)calloc(1,
        sizeof(labeled_grid_geometry_t));
    geometry->label = (char*)calloc(1, sizeof(char));
    geometry->geometry = (grid_geometry_t*)calloc(1, sizeof(grid_geometry_t));

    strcpy(geometry->label, label);
    geometry->geometry->x = x;
    geometry->geometry->y = y;
    geometry->geometry->height = height;
    geometry->geometry->width = width;

    return geometry;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, 0x4(%rsp)
movl %ecx, (%rsp)
movl %edx, %r14d
movl %esi, %r15d
movq %rdi, %r12
movl $0x1, %edi
movl $0x10, %esi
callq 0x3340
movq %rax, %r13
movl $0x1, %edi
movl $0x1, %esi
callq 0x3340
movq %rax, %rbx
movq %rax, 0x8(%r13)
movl $0x1, %edi
movl $0x10, %esi
callq 0x3340
movq %rax, %rbp
movq %rax, (%r13)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x30e0
movl %r15d, (%rbp)
movl %r14d, 0x4(%rbp)
movl (%rsp), %eax
movl %eax, 0x8(%rbp)
movl 0x4(%rsp), %eax
movl %eax, 0xc(%rbp)
movq %r13, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/comfies[P]custard/src/wm/geometry.c
// Function: create_screen_geometry
screen_geometry_t *create_screen_geometry(unsigned int x, unsigned int y,
    unsigned int height, unsigned int width) {
    screen_geometry_t *geometry = (screen_geometry_t*)calloc(1,
        sizeof(screen_geometry_t));

    geometry->x = x;
    geometry->y = y;
    geometry->height = height;
    geometry->width = width;

    return geometry;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebx
movl %edx, %ebp
movl %esi, %r14d
movl %edi, %r15d
movl $0x1, %edi
movl $0x10, %esi
callq 0x3340
movl %r15d, %ecx
cvtsi2ss %rcx, %xmm0
movss %xmm0, (%rax)
movl %r14d, %ecx
xorps %xmm0, %xmm0
cvtsi2ss %rcx, %xmm0
movl %ebp, %ecx
cvtsi2ss %rcx, %xmm1
movl %ebx, %ecx
cvtsi2ss %rcx, %xmm2
movss %xmm0, 0x4(%rax)
movss %xmm1, 0x8(%rax)
movss %xmm2, 0xc(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/comfies[P]custard/src/wm/geometry.c
// Function: get_equivalent_screen_geometry
screen_geometry_t *get_equivalent_screen_geometry(grid_geometry_t *geometry,
    monitor_t *monitor) {
    screen_geometry_t *screen_geometry = create_screen_geometry(
        get_x_offset(geometry->x, monitor),
        get_y_offset(geometry->y, monitor),
        span_height_over_screen(geometry->height, monitor),
        span_width_over_screen(geometry->width, monitor)
    );

    return screen_geometry;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl (%rdi), %edi
callq 0x63a8
cvttss2si %xmm0, %r15
movl 0x4(%r14), %edi
movq %rbx, %rsi
callq 0x642c
cvttss2si %xmm0, %r12
movl 0x8(%r14), %edi
movq %rbx, %rsi
callq 0x6350
cvttss2si %xmm0, %r13
movl 0xc(%r14), %edi
movq %rbx, %rsi
callq 0x62f8
cvttss2si %xmm0, %rbx
movl $0x1, %edi
movl $0x10, %esi
callq 0x3340
movl %r15d, %ecx
xorps %xmm0, %xmm0
cvtsi2ss %rcx, %xmm0
movss %xmm0, (%rax)
movl %r12d, %ecx
xorps %xmm0, %xmm0
cvtsi2ss %rcx, %xmm0
movl %r13d, %ecx
cvtsi2ss %rcx, %xmm1
movl %ebx, %ecx
cvtsi2ss %rcx, %xmm2
movss %xmm0, 0x4(%rax)
movss %xmm1, 0x8(%rax)
movss %xmm2, 0xc(%rax)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/comfies[P]custard/src/wm/geometry.c
// Function: get_geometry_from_monitor
grid_geometry_t *get_geometry_from_monitor(monitor_t *monitor, char *label) {
    if (!monitor->geometries)
        return NULL;

    labeled_grid_geometry_t *labeled_geometry;
    while ((labeled_geometry = vector_iterator(monitor->geometries))) {
        if (!strcmp(labeled_geometry->label, label)) {
            reset_vector_iterator(monitor->geometries);
            return labeled_geometry->geometry;
        }
    }

    return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
cmpq $0x0, 0x10(%rdi)
je 0x60d1
movq %rsi, %r15
movq %rdi, %r14
xorl %ebx, %ebx
movq 0x10(%r14), %rdi
callq 0x3851
testq %rax, %rax
je 0x60d3
movq %rax, %r12
movq 0x8(%rax), %rdi
movq %r15, %rsi
callq 0x3370
testl %eax, %eax
jne 0x60a1
movq 0x10(%r14), %rdi
callq 0x3885
movq (%r12), %rbx
jmp 0x60d3
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O1/comfies[P]custard/src/wm/grid.c
// Function: calculate_default_height
unsigned int calculate_default_height(monitor_t *monitor) {
    unsigned int rows = get_value_from_key_with_fallback(
        monitor->configuration, "grid.rows")->number;

    if (rows % 2) return 1;

    return 2;
}

// Assembly:
pushq %rax
movq 0x18(%rdi), %rdi
leaq 0x227c(%rip), %rsi      # 0x836c
callq 0x4e60
movl (%rax), %ecx
andl $0x1, %ecx
movl $0x2, %eax
subl %ecx, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/comfies[P]custard/src/wm/grid.c
// Function: calculate_default_width
unsigned int calculate_default_width(monitor_t *monitor) {
    unsigned int columns = get_value_from_key_with_fallback(
        monitor->configuration, "grid.columns")->number;

    if (columns % 2) return 1;

    return 2;
}

// Assembly:
pushq %rax
movq 0x18(%rdi), %rdi
leaq 0x2044(%rip), %rsi      # 0x8153
callq 0x4e60
movl (%rax), %ecx
andl $0x1, %ecx
movl $0x2, %eax
subl %ecx, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/comfies[P]custard/src/wm/grid.c
// Function: calculate_default_x
unsigned int calculate_default_x(monitor_t *monitor) {
    unsigned int columns = get_value_from_key_with_fallback(
        monitor->configuration, "grid.columns")->number;

    unsigned int default_value = (columns / 2) - 1;

    if (columns % 2) default_value++;

    return default_value;
}

// Assembly:
pushq %rax
movq 0x18(%rdi), %rdi
leaq 0x2025(%rip), %rsi      # 0x8153
callq 0x4e60
movl (%rax), %eax
movl %eax, %ecx
shrl %ecx
andl $0x1, %eax
addl %ecx, %eax
decl %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/comfies[P]custard/src/wm/grid.c
// Function: calculate_default_y
unsigned int calculate_default_y(monitor_t *monitor) {
    unsigned int rows = get_value_from_key_with_fallback(
        monitor->configuration, "grid.rows")->number;

    unsigned int default_value = (rows / 2) - 1;

    if (rows % 2) default_value++;

    return default_value;
}

// Assembly:
pushq %rax
movq 0x18(%rdi), %rdi
leaq 0x221e(%rip), %rsi      # 0x836c
callq 0x4e60
movl (%rax), %eax
movl %eax, %ecx
shrl %ecx
andl $0x1, %eax
addl %ecx, %eax
decl %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/comfies[P]custard/src/wm/grid.c
// Function: calculate_horizontal_unit_size
float calculate_horizontal_unit_size(monitor_t *monitor) {
    unsigned int total_border_size = 0;

    unsigned int gap_size = get_value_from_key_with_fallback(
        monitor->configuration, "grid.margins")->number;
    unsigned int columns = get_value_from_key_with_fallback(
        monitor->configuration, "grid.columns")->number;
    unsigned int offset_left = get_value_from_key_with_fallback(
        monitor->configuration, "grid.margin.left")->number;
    unsigned int offset_right = get_value_from_key_with_fallback(
        monitor->configuration, "grid.margin.right")->number;

    unsigned int horizontal_border_summation = (total_border_size * 2) *
        columns;
    unsigned int horizontal_offset = offset_left + offset_right;
    unsigned int horizontal_gap_summation = gap_size * (columns + 1);

    unsigned int negative_real_estate = horizontal_offset +
        horizontal_gap_summation + horizontal_border_summation;

    float usable_real_estate = (float)(monitor->geometry->width -
        negative_real_estate);
    float unit_size = usable_real_estate / (float)columns;

    return unit_size;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
leaq 0x1fe9(%rip), %rsi      # 0x8160
callq 0x4e60
movl (%rax), %ebp
movq 0x18(%rbx), %rdi
leaq 0x1fca(%rip), %rsi      # 0x8153
callq 0x4e60
movl (%rax), %r14d
movq 0x18(%rbx), %rdi
leaq 0x1ff4(%rip), %rsi      # 0x8190
callq 0x4e60
movq 0x18(%rbx), %rdi
leal 0x1(%r14), %r15d
imull %ebp, %r15d
addl (%rax), %r15d
leaq 0x1fea(%rip), %rsi      # 0x81a1
callq 0x4e60
addl (%rax), %r15d
cvtsi2ss %r15, %xmm1
movq 0x8(%rbx), %rax
cvtsi2ss %r14, %xmm2
movss 0xc(%rax), %xmm0
subss %xmm1, %xmm0
divss %xmm2, %xmm0
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/comfies[P]custard/src/wm/grid.c
// Function: calculate_vertical_unit_size
float calculate_vertical_unit_size(monitor_t *monitor) {
    unsigned int total_border_size = 0;

    unsigned int gap_size = get_value_from_key_with_fallback(
        monitor->configuration, "grid.margins")->number;
    unsigned int rows = get_value_from_key_with_fallback(
        monitor->configuration, "grid.rows")->number;
    unsigned int offset_top = get_value_from_key_with_fallback(
        monitor->configuration, "grid.margin.top")->number;
    unsigned int offset_bottom = get_value_from_key_with_fallback(
        monitor->configuration, "grid.margin.bottom")->number;

    unsigned int vertical_border_summation = (total_border_size * 2) * rows;
    unsigned int vertical_offset = offset_top + offset_bottom;
    unsigned int vertical_gap_summation = gap_size * (rows + 1);

    unsigned int negative_real_estate = vertical_offset +
        vertical_gap_summation + vertical_border_summation;

    float usable_real_estate = (float)(monitor->geometry->height -
        negative_real_estate);
    float unit_size = usable_real_estate / (float)rows;

    return unit_size;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
leaq 0x1f66(%rip), %rsi      # 0x8160
callq 0x4e60
movl (%rax), %ebp
movq 0x18(%rbx), %rdi
leaq 0x2160(%rip), %rsi      # 0x836c
callq 0x4e60
movl (%rax), %r14d
movq 0x18(%rbx), %rdi
leaq 0x1f4e(%rip), %rsi      # 0x816d
callq 0x4e60
movq 0x18(%rbx), %rdi
leal 0x1(%r14), %r15d
imull %ebp, %r15d
addl (%rax), %r15d
leaq 0x1f43(%rip), %rsi      # 0x817d
callq 0x4e60
addl (%rax), %r15d
cvtsi2ss %r15, %xmm1
movq 0x8(%rbx), %rax
cvtsi2ss %r14, %xmm2
movss 0x8(%rax), %xmm0
subss %xmm1, %xmm0
divss %xmm2, %xmm0
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/comfies[P]custard/src/wm/grid.c
// Function: span_units_over_screen
float span_units_over_screen(float unit_size, unsigned int span,
    monitor_t *monitor) {
    unsigned int total_border_size = 0;
    unsigned int gap_size = get_value_from_key_with_fallback(
        monitor->configuration, "grid.margins")->number;

    return (unit_size * span) + (gap_size * (span - 1)) +
        ((total_border_size * 2) * (span - 1));
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movl %edi, %ebx
movss %xmm0, 0xc(%rsp)
movq 0x18(%rsi), %rdi
leaq 0x1ee0(%rip), %rsi      # 0x8160
callq 0x4e60
movl %ebx, %ecx
cvtsi2ss %rcx, %xmm1
decl %ebx
imull (%rax), %ebx
xorps %xmm0, %xmm0
cvtsi2ss %rbx, %xmm0
mulss 0xc(%rsp), %xmm1
addss %xmm0, %xmm1
xorps %xmm0, %xmm0
addss %xmm1, %xmm0
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/comfies[P]custard/src/wm/grid.c
// Function: get_unit_offset
float get_unit_offset(float unit_size, unsigned int offset,
    monitor_t *monitor) {
    unsigned int total_border_size = 0;
    unsigned int gap_size = get_value_from_key_with_fallback(
        monitor->configuration, "grid.margins")->number;

    return (unit_size * offset) + (gap_size * (offset + 1)) +
        ((total_border_size * 2) * offset);
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movl %edi, %ebx
movss %xmm0, 0xc(%rsp)
movq 0x18(%rsi), %rdi
leaq 0x1e98(%rip), %rsi      # 0x8160
callq 0x4e60
movl %ebx, %ecx
cvtsi2ss %rcx, %xmm1
incl %ebx
imull (%rax), %ebx
xorps %xmm0, %xmm0
cvtsi2ss %rbx, %xmm0
mulss 0xc(%rsp), %xmm1
addss %xmm0, %xmm1
xorps %xmm0, %xmm0
addss %xmm1, %xmm0
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/comfies[P]custard/src/wm/grid.c
// Function: get_x_offset
float get_x_offset(unsigned int offset, monitor_t *monitor) {
    float unit_in_pixels = calculate_horizontal_unit_size(monitor);
    float left_offset = (float)get_value_from_key_with_fallback(
        monitor->configuration, "grid.margin.left")->number;

    return get_unit_offset(unit_in_pixels, offset, monitor) + \
        left_offset + monitor->geometry->x;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %r14d
movq %rsi, %rdi
callq 0x6162
movss %xmm0, 0x4(%rsp)
movq 0x18(%rbx), %rdi
leaq 0x1dc5(%rip), %rsi      # 0x8190
callq 0x4e60
movl (%rax), %eax
xorps %xmm0, %xmm0
cvtsi2ss %rax, %xmm0
movss %xmm0, (%rsp)
movq 0x18(%rbx), %rdi
leaq 0x1d76(%rip), %rsi      # 0x8160
callq 0x4e60
movl %r14d, %ecx
cvtsi2ss %rcx, %xmm1
incl %r14d
imull (%rax), %r14d
xorps %xmm0, %xmm0
cvtsi2ss %r14, %xmm0
mulss 0x4(%rsp), %xmm1
addss %xmm0, %xmm1
xorps %xmm0, %xmm0
addss %xmm1, %xmm0
addss (%rsp), %xmm0
movq 0x8(%rbx), %rax
addss (%rax), %xmm0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/comfies[P]custard/src/wm/grid.c
// Function: get_y_offset
float get_y_offset(unsigned int offset, monitor_t *monitor) {
    float unit_in_pixels = calculate_vertical_unit_size(monitor);
    float top_offset = (float)get_value_from_key_with_fallback(
        monitor->configuration, "grid.margin.top")->number;

    return get_unit_offset(unit_in_pixels, offset, monitor) + \
        top_offset + monitor->geometry->y;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %r14d
movq %rsi, %rdi
callq 0x61e5
movss %xmm0, 0x4(%rsp)
movq 0x18(%rbx), %rdi
leaq 0x1d1e(%rip), %rsi      # 0x816d
callq 0x4e60
movl (%rax), %eax
xorps %xmm0, %xmm0
cvtsi2ss %rax, %xmm0
movss %xmm0, (%rsp)
movq 0x18(%rbx), %rdi
leaq 0x1cf2(%rip), %rsi      # 0x8160
callq 0x4e60
movl %r14d, %ecx
cvtsi2ss %rcx, %xmm1
incl %r14d
imull (%rax), %r14d
xorps %xmm0, %xmm0
cvtsi2ss %r14, %xmm0
mulss 0x4(%rsp), %xmm1
addss %xmm0, %xmm1
xorps %xmm0, %xmm0
addss %xmm1, %xmm0
addss (%rsp), %xmm0
movq 0x8(%rbx), %rax
addss 0x4(%rax), %xmm0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/comfies[P]custard/src/wm/handlers.c
// Function: handle_window_click
void handle_window_click(xcb_generic_event_t *generic_event) {
    xcb_button_press_event_t *event;
    event = (xcb_button_press_event_t*)generic_event;

    xcb_window_t window_id = event->event;
    log_debug("Window(%08x) clicked", window_id);

    window_t *window;
    if (windows) {
        while ((window = vector_iterator(windows))) {
            // Redirect border window click as necessary
            if (window->parent == window_id) {
                window_id = window->id;
                break;
            }
        }

        reset_vector_iterator(windows);
    }

    if (focused_window == window_id)
        return;

    xcb_window_t previous_window = focused_window;
    focused_window = window_id;

    /* Is the newly focused window managed? */
    if (window_is_managed(focused_window)) {
        window = get_window_by_id(focused_window);
        xcb_ungrab_button(xcb_connection,
            XCB_BUTTON_INDEX_ANY, window_id, XCB_MOD_MASK_ANY);
        raise_window(window->parent);
        decorate(window);
    } else {
        raise_window(window_id);
    }
    focus_window(window_id);

    /* Is the previously focused window managed? */
    if (window_is_managed(previous_window)) {
        window = get_window_by_id(previous_window);
        xcb_grab_button(xcb_connection, 0, previous_window,
            XCB_EVENT_MASK_BUTTON_PRESS,
            XCB_GRAB_MODE_ASYNC, XCB_GRAB_MODE_ASYNC,
            XCB_NONE, XCB_NONE,
            XCB_BUTTON_INDEX_ANY ^ XCB_BUTTON_INDEX_4 ^ XCB_BUTTON_INDEX_5,
            XCB_MOD_MASK_ANY);
        decorate(window);
    }

    apply();
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl 0xc(%rdi), %ebx
leaq 0x219a(%rip), %rsi      # 0x865c
leaq 0x21a5(%rip), %rdx      # 0x866e
leaq 0x21b2(%rip), %r8       # 0x8682
movl $0x3, %edi
movl $0x85, %ecx
movl %ebx, %r9d
xorl %eax, %eax
callq 0x5206
leaq 0x63fd(%rip), %r14      # 0xc8e8
cmpq $0x0, (%r14)
je 0x650d
movq (%r14), %rdi
callq 0x3851
testq %rax, %rax
je 0x6505
cmpl %ebx, 0x4(%rax)
jne 0x64f1
movl (%rax), %ebx
movq (%r14), %rdi
callq 0x3885
leaq 0x63dc(%rip), %r14      # 0xc8f0
movl (%r14), %ebp
cmpl %ebx, %ebp
jne 0x6520
popq %rbx
popq %r14
popq %rbp
retq
movl %ebx, (%r14)
movl %ebx, %edi
callq 0x6d51
testw %ax, %ax
je 0x6565
movl (%r14), %edi
callq 0x6d63
movq %rax, %r14
leaq 0x63b7(%rip), %rax      # 0xc8f8
movq (%rax), %rdi
xorl %esi, %esi
movl %ebx, %edx
movl $0x8000, %ecx           # imm = 0x8000
callq 0x3500
movl 0x4(%r14), %edi
callq 0x77ea
movq %r14, %rdi
callq 0x58c3
jmp 0x656c
movl %ebx, %edi
callq 0x77ea
movl %ebx, %edi
callq 0x7750
movl %ebp, %edi
callq 0x6d51
testw %ax, %ax
je 0x65c4
movl %ebp, %edi
callq 0x6d63
movq %rax, %rbx
leaq 0x6368(%rip), %rax      # 0xc8f8
movq (%rax), %rdi
xorl %eax, %eax
xorl %esi, %esi
movl %ebp, %edx
movl $0x4, %ecx
movl $0x1, %r8d
movl $0x1, %r9d
pushq $0x8000                 # imm = 0x8000
pushq $0x1
pushq %rax
pushq %rax
callq 0x3360
addq $0x20, %rsp
movq %rbx, %rdi
callq 0x58c3
popq %rbx
popq %r14
popq %rbp
jmp 0x7451
// File: /workspace/github_c_makefile_star2_O1/comfies[P]custard/src/wm/handlers.c
// Function: handle_window_close
void handle_window_close(xcb_generic_event_t *generic_event) {
    xcb_destroy_notify_event_t *event;
    event = (xcb_destroy_notify_event_t*)generic_event;

    xcb_window_t window_id = event->window;

    // is the window managed?
    if (window_is_managed(window_id))
        unmanage_window(window_id);

    if (focused_window == window_id)
        focused_window = XCB_WINDOW_NONE;

    apply();
}

// Assembly:
pushq %rbx
movl 0x8(%rdi), %ebx
movl %ebx, %edi
callq 0x6d51
testw %ax, %ax
je 0x65e4
movl %ebx, %edi
callq 0x716b
leaq 0x6305(%rip), %rax      # 0xc8f0
cmpl %ebx, (%rax)
jne 0x65f5
movl $0x0, (%rax)
popq %rbx
jmp 0x7451
// File: /workspace/github_c_makefile_star2_O1/comfies[P]custard/src/wm/handlers.c
// Function: handle_map_request
void handle_map_request(xcb_generic_event_t *generic_event) {
    xcb_map_request_event_t *event;
    event = (xcb_map_request_event_t*)generic_event;

    xcb_window_t window_id = event->window;

    xcb_window_t previously_focused_window = focused_window;
    focused_window = window_id;

    map_window(window_id);

    window_t *window = NULL;
    if (window_should_be_managed(window_id))
        window = manage_window(window_id);

    if (window) {
        raise_window(window->parent);
        decorate(window);
    } else {
        raise_window(window_id);
    }
    focus_window(window_id);

    if (window_is_managed(previously_focused_window)) {
        window = get_window_by_id(previously_focused_window);
        xcb_grab_button(xcb_connection, 0, previously_focused_window,
            XCB_EVENT_MASK_BUTTON_PRESS,
            XCB_GRAB_MODE_ASYNC, XCB_GRAB_MODE_ASYNC,
            XCB_NONE, XCB_NONE,
            XCB_BUTTON_INDEX_ANY ^ XCB_BUTTON_INDEX_4 ^ XCB_BUTTON_INDEX_5,
            XCB_MOD_MASK_ANY);
        decorate(window);
    }

    apply();
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl 0x8(%rdi), %ebp
leaq 0x62e7(%rip), %rax      # 0xc8f0
movl (%rax), %ebx
movl %ebp, (%rax)
movl %ebp, %edi
callq 0x76d4
movl %ebp, %edi
callq 0x6c30
testw %ax, %ax
je 0x662c
movl %ebp, %edi
callq 0x6dc8
movq %rax, %r14
jmp 0x662f
xorl %r14d, %r14d
testq %r14, %r14
je 0x6647
movl 0x4(%r14), %edi
callq 0x77ea
movq %r14, %rdi
callq 0x58c3
jmp 0x664e
movl %ebp, %edi
callq 0x77ea
movl %ebp, %edi
callq 0x7750
movl %ebx, %edi
callq 0x6d51
testw %ax, %ax
je 0x66a6
movl %ebx, %edi
callq 0x6d63
movq %rax, %r14
leaq 0x6286(%rip), %rax      # 0xc8f8
movq (%rax), %rdi
xorl %eax, %eax
xorl %esi, %esi
movl %ebx, %edx
movl $0x4, %ecx
movl $0x1, %r8d
movl $0x1, %r9d
pushq $0x8000                 # imm = 0x8000
pushq $0x1
pushq %rax
pushq %rax
callq 0x3360
addq $0x20, %rsp
movq %r14, %rdi
callq 0x58c3
popq %rbx
popq %r14
popq %rbp
jmp 0x7451
// File: /workspace/github_c_makefile_star2_O1/comfies[P]custard/src/wm/handlers.c
// Function: handle_window_message
void handle_window_message(xcb_generic_event_t *generic_event) {
    xcb_client_message_event_t *event;
    event = (xcb_client_message_event_t*)generic_event;

    xcb_window_t window_id = event->window;

    if (event->type == ewmh_connection->_NET_CLOSE_WINDOW) {
        if (window_is_managed(window_id))
            unmanage_window(window_id);
        close_window(window_id);
        return;
    }

    if (event->type == ewmh_connection->_NET_WM_STATE) {
        if (!window_is_managed(window_id))
            return;
        window_t *window = get_window_by_id(window_id);

        xcb_ewmh_wm_state_action_t state_action = event->data.data32[0];
        xcb_atom_t attribute = event->data.data32[1];

        if (attribute == ewmh_connection->_NET_WM_STATE_FULLSCREEN) {
            if (state_action == XCB_EWMH_WM_STATE_TOGGLE)
                window->fullscreen = !window->fullscreen;
            else
                window->fullscreen = state_action;

            monitor_t *monitor = window->monitor;

            if (window->fullscreen) {
                change_window_geometry(window->parent,
                    0, 0,
                    (unsigned int)monitor->geometry->height,
                    (unsigned int)monitor->geometry->width
                );
            } else
                set_window_geometry(window, window->geometry);

            apply();
        }

        return;
    }

}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl 0x4(%rdi), %ebx
movl 0x8(%rdi), %eax
leaq 0x625f(%rip), %r15      # 0xc920
movq (%r15), %rcx
cmpl 0x58(%rcx), %eax
jne 0x66e8
movl %ebx, %edi
callq 0x6d51
testw %ax, %ax
je 0x66dc
movl %ebx, %edi
callq 0x716b
movl %ebx, %edi
popq %rbx
popq %r14
popq %r15
jmp 0x78ea
cmpl 0x84(%rcx), %eax
jne 0x6755
movq %rdi, %r14
movl %ebx, %edi
callq 0x6d51
testw %ax, %ax
je 0x6755
movl %ebx, %edi
callq 0x6d63
movl 0x10(%r14), %ecx
movq (%r15), %rdx
cmpl 0x128(%rdx), %ecx
jne 0x6755
movl 0xc(%r14), %ecx
cmpl $0x2, %ecx
jne 0x6728
xorl %ecx, %ecx
cmpw $0x0, 0x20(%rax)
sete %cl
movw %cx, 0x20(%rax)
cmpw $0x0, 0x20(%rax)
je 0x675b
movq 0x18(%rax), %rcx
movq 0x8(%rcx), %rdx
cvttss2si 0x8(%rdx), %rcx
movl 0x4(%rax), %edi
cvttss2si 0xc(%rdx), %r8
xorl %esi, %esi
xorl %edx, %edx
callq 0x7a32
jmp 0x6767
popq %rbx
popq %r14
popq %r15
retq
movq 0x8(%rax), %rsi
movq %rax, %rdi
callq 0x7087
popq %rbx
popq %r14
popq %r15
jmp 0x7451
// File: /workspace/github_c_makefile_star2_O1/comfies[P]custard/src/wm/handlers.c
// Function: handle_termination_signal
void handle_termination_signal(int signal) {
    if (signal == SIGINT)
        log_message("SIGINT received");
    else
        log_message("SIGTERM received");

    custard_is_running = 0;

    /* The window manager won't die until the next iteration of the loop,
     * so let's just force it to close. */

    finalize();
    exit(EXIT_SUCCESS);
}

// Assembly:
pushq %rax
xorl %eax, %eax
cmpl $0x2, %edi
setne %al
leaq 0x1f30(%rip), %rcx      # 0x86b1
leaq 0x1f39(%rip), %r8       # 0x86c1
cmoveq %rcx, %r8
leal 0xb9(,%rax,2), %ecx
leaq 0x1ec2(%rip), %rsi      # 0x865c
leaq 0x1ef6(%rip), %rdx      # 0x8697
movl $0x2, %edi
xorl %eax, %eax
callq 0x5206
leaq 0x611c(%rip), %rax      # 0xc8d0
movw $0x0, (%rax)
callq 0x53c0
xorl %edi, %edi
callq 0x3630
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/comfies[P]custard/src/wm/monitor.c
// Function: monitor_from_name
monitor_t *monitor_from_name(char *name) {
    monitor_t *monitor;
    while ((monitor = vector_iterator(monitors))) {
        if (!strcmp(monitor->name, name)) {
            reset_vector_iterator(monitors);
            return monitor;
        }
    }

    return NULL;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x5f1d(%rip), %rdi      # 0xc8d8
callq 0x3851
testq %rax, %rax
je 0x69e5
movq %rax, %rbx
movq (%rax), %rdi
movq %r14, %rsi
callq 0x3370
testl %eax, %eax
jne 0x69b4
movq 0x5efa(%rip), %rdi      # 0xc8d8
callq 0x3885
jmp 0x69e7
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/comfies[P]custard/src/wm/monitor.c
// Function: monitor_with_cursor_residence
monitor_t *monitor_with_cursor_residence() {
    xcb_query_pointer_cookie_t pointer_cookie;
    pointer_cookie = xcb_query_pointer(xcb_connection, xcb_screen->root);

    xcb_query_pointer_reply_t *pointer = xcb_query_pointer_reply(xcb_connection,
        pointer_cookie, NULL);

    float x = 0;
    float y = 0;

    monitor_t *monitor;
    for (unsigned int index = 0; index < monitors->size; index++) {
        monitor = get_from_vector(monitors, index);

        x += monitor->geometry->width;
        y += monitor->geometry->height;

        if (pointer->root_x < x && pointer->root_y < y)
            return monitor;
    }

    return NULL;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
leaq 0x5ef7(%rip), %rbx      # 0xc8f8
movq (%rbx), %rdi
leaq 0x5ef5(%rip), %rax      # 0xc900
movq (%rax), %rax
movl (%rax), %esi
callq 0x3380
movq (%rbx), %rdi
xorl %ebx, %ebx
movl %eax, %esi
xorl %edx, %edx
callq 0x33a0
movq 0x5eae(%rip), %rdi      # 0xc8d8
cmpl $0x0, 0xc(%rdi)
je 0x6a9d
movq %rax, %r14
xorps %xmm1, %xmm1
xorl %ebp, %ebp
xorps %xmm2, %xmm2
movss %xmm2, 0x8(%rsp)
movss %xmm1, 0xc(%rsp)
movl %ebp, %esi
callq 0x3873
movss 0x8(%rsp), %xmm2
movss 0xc(%rsp), %xmm1
movq 0x8(%rax), %rcx
addss 0xc(%rcx), %xmm2
movswl 0x10(%r14), %edx
xorps %xmm0, %xmm0
cvtsi2ss %edx, %xmm0
addss 0x8(%rcx), %xmm1
ucomiss %xmm0, %xmm2
jbe 0x6a8a
movswl 0x12(%r14), %ecx
xorps %xmm0, %xmm0
cvtsi2ss %ecx, %xmm0
ucomiss %xmm0, %xmm1
ja 0x6a9a
incl %ebp
movq 0x5e45(%rip), %rdi      # 0xc8d8
cmpl 0xc(%rdi), %ebp
jb 0x6a3b
jmp 0x6a9d
movq %rax, %rbx
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/comfies[P]custard/src/wm/rules.c
// Function: create_or_get_rule
rule_t *create_or_get_rule(window_attribute_t attribute, char *expression) {
    rule_t *rule;

    if (rules) {
        while ((rule = vector_iterator(rules))) {
            if (!strcmp(rule->expression, expression) &&
                rule->attribute == attribute) {
                reset_vector_iterator(rules);
                return rule;
            }
        }
    }

    rule = (rule_t*)calloc(1, sizeof(rule_t));

    rule->expression = (char*)calloc(1, sizeof(char));
    strcpy(rule->expression, expression);

    rule->attribute = attribute;
    rule->rules = NULL;

    return rule;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movl %edi, %ebx
cmpq $0x0, 0x5e22(%rip)      # 0xc8e0
je 0x6afd
movq 0x5e19(%rip), %rdi      # 0xc8e0
callq 0x3851
testq %rax, %rax
je 0x6afd
movq %rax, %r15
movq (%r15), %rdi
movq %r14, %rsi
callq 0x3370
testl %eax, %eax
jne 0x6ae9
cmpl %ebx, 0x8(%r15)
je 0x6b41
movq 0x5df0(%rip), %rdi      # 0xc8e0
callq 0x3851
movq %rax, %r15
testq %rax, %rax
jne 0x6ad4
movl $0x1, %edi
movl $0x18, %esi
callq 0x3340
movq %rax, %r15
movl $0x1, %edi
movl $0x1, %esi
callq 0x3340
movq %rax, (%r15)
movq %rax, %rdi
movq %r14, %rsi
callq 0x30e0
movl %ebx, 0x8(%r15)
movq $0x0, 0x10(%r15)
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
movq 0x5d98(%rip), %rdi      # 0xc8e0
callq 0x3885
jmp 0x6b38
// File: /workspace/github_c_makefile_star2_O1/comfies[P]custard/src/wm/rules.c
// Function: add_rule
void add_rule(rule_t *rule) {
    if (rules) {
        rule_t *existing_rule;
        while ((existing_rule = vector_iterator(rules)))
            if (rule == existing_rule)
                return;
    } else rules = construct_vector();

    push_to_vector(rules, rule);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpq $0x0, 0x5d85(%rip)      # 0xc8e0
je 0x6b7a
movq 0x5d7c(%rip), %rdi      # 0xc8e0
callq 0x3851
cmpq %rbx, %rax
je 0x6b73
testq %rax, %rax
jne 0x6b5d
testq %rax, %rax
je 0x6b86
popq %rbx
retq
callq 0x3818
movq %rax, 0x5d5a(%rip)      # 0xc8e0
movq 0x5d53(%rip), %rdi      # 0xc8e0
movq %rbx, %rsi
popq %rbx
jmp 0x388c
// File: /workspace/github_c_makefile_star2_O1/comfies[P]custard/src/wm/rules.c
// Function: expression_matches
unsigned short expression_matches(char *expression, char *subject) {
    pcre *compiled;
    pcre_extra *optimized;

    const char *error;
    int offset;

    if (!(compiled = pcre_compile(expression, PCRE_UTF8, &error, &offset,
        NULL)))
        return 0;

    optimized = pcre_study(compiled, 0, &error);

    int return_value = pcre_exec(compiled, optimized, subject, strlen(subject),
        0, 0, NULL, 0);

    if (optimized) pcre_free_study(optimized);
    pcre_free(compiled);

    if (return_value < 0)
        return 0;

    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
xorl %r15d, %r15d
leaq 0x8(%rsp), %rdx
leaq 0x14(%rsp), %rcx
movl $0x800, %esi            # imm = 0x800
xorl %r8d, %r8d
callq 0x3430
testq %rax, %rax
je 0x6c21
movq %rax, %rbx
leaq 0x8(%rsp), %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0x3530
movq %rax, %r15
movq %r14, %rdi
callq 0x31f0
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
movl %eax, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq $0x0
pushq $0x0
callq 0x32b0
addq $0x10, %rsp
movl %eax, %ebp
testq %r15, %r15
je 0x6c0c
movq %r15, %rdi
callq 0x34b0
movq 0x53cd(%rip), %rax      # 0xbfe0
movq %rbx, %rdi
callq *(%rax)
xorl %r15d, %r15d
testl %ebp, %ebp
setns %r15b
movl %r15d, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop