LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/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 0x4800
movq %rdi, %r14
cmpb $0x23, (%rdi)
jne 0x4800
movq %r14, %rdi
callq 0x31f0
movq %rax, %r15
cmpl $0x5, %r15d
jb 0x4800
setne %al
cmpl $0x7, %r15d
setb %cl
cmpl $0x9, %r15d
ja 0x4800
cmpl $0x8, %r15d
je 0x4800
andb %cl, %al
jne 0x4800
xorl %ecx, %ecx
cmpl $0x5, %r15d
sete %cl
movabsq $0x6666303030303030, %rax # imm = 0x6666303030303030
movq %rax, (%rsp)
movl %r15d, %eax
decl %eax
leaq (%rsp,%rcx,4), %rcx
xorl %edx, %edx
cmpq %rdx, %rax
je 0x4797
movb 0x1(%r14,%rdx), %sil
movb %sil, (%rcx,%rdx)
incq %rdx
jmp 0x4784
movq %rsp, %rdi
pushq $0x10
popq %rdx
xorl %esi, %esi
callq 0x33e0
movq %rax, %rbx
cmpl $0x5, %r15d
jne 0x47d8
movl %ebx, %eax
andl $0xf, %eax
imull $0x11, %eax, %esi
movl %ebx, %eax
shrl $0xc, %eax
andl $0xf, %eax
imull $0x11, %eax, %eax
movl %ebx, %ecx
shrl $0x8, %ecx
andl $0xf, %ecx
imull $0x11, %ecx, %ecx
shrb $0x4, %bl
movzbl %bl, %edx
imull $0x11, %edx, %edx
movl %esi, %ebx
jmp 0x47eb
movq %rbx, %rax
shrq $0x18, %rax
movq %rbx, %rcx
shrq $0x10, %rcx
movl %ebx, %edx
shrl $0x8, %edx
shll $0x18, %ebx
movzbl %dl, %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_O2/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, 0x7ee9(%rip)      # 0xc8ac
je 0x49d2
movl 0x7edd(%rip), %edi      # 0xc8a8
callq 0x32f0
jmp 0x49de
movq 0x7ec7(%rip), %rdi      # 0xc8a0
callq 0x3090
movq 0x7ebb(%rip), %rdi      # 0xc8a0
popq %rax
jmp 0x3060
// File: /workspace/github_c_makefile_star2_O2/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 0x7e68(%rip), %edi      # 0xc8a8
xorl %esi, %esi
xorl %edx, %edx
callq 0x35a0
testl %eax, %eax
je 0x4a99
movl %eax, %ebp
pushq $0x1
popq %rsi
movl $0x400, %edi            # imm = 0x400
callq 0x3340
movq %rax, %rbx
movl $0x3ff, %edx            # imm = 0x3FF
movl %ebp, %edi
movq %rax, %rsi
callq 0x3320
movb $0x0, (%rbx,%rax)
leaq 0x37fa(%rip), %rsi      # 0x8273
leaq 0x38a4(%rip), %rdx      # 0x8324
leaq 0x38d4(%rip), %r8       # 0x835b
pushq $0x3
popq %rdi
pushq $0x55
popq %rcx
movq %rbx, %r9
xorl %eax, %eax
callq 0x50dd
jmp 0x4ac2
leaq 0x37d3(%rip), %rsi      # 0x8273
leaq 0x387d(%rip), %rdx      # 0x8324
leaq 0x3887(%rip), %r8       # 0x8335
pushq $0x1
popq %rdi
pushq $0x4d
popq %rcx
xorl %eax, %eax
callq 0x50dd
leaq 0x3b95(%rip), %rbx      # 0x8657
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
movq %rbx, %rdi
callq 0x383d
testq %rax, %rax
je 0x4ca4
movq %rax, %r14
movq (%rax), %rdi
movq %r15, %rsi
callq 0x3370
testl %eax, %eax
jne 0x4c7b
movq %rbx, %rdi
callq 0x3871
jmp 0x4d17
pushq $0x1
popq %r12
pushq $0x10
popq %rsi
movq %r12, %rdi
callq 0x3340
movq %rax, %r14
movq %r15, %rdi
callq 0x31f0
leaq 0x1(%rax), %rdi
movq %r12, %rsi
callq 0x3340
movq %rax, (%r14)
movq %rax, %rdi
movq %r15, %rsi
callq 0x30e0
pushq $0x8
popq %rsi
movq %r12, %rdi
callq 0x3340
movq %rax, 0x8(%r14)
leaq 0x368f(%rip), %rsi      # 0x837d
leaq 0x3698(%rip), %rdx      # 0x838d
leaq 0x36a7(%rip), %r8       # 0x83a3
pushq $0x3
popq %rdi
pushq $0x4b
popq %rcx
movq %r15, %r9
xorl %eax, %eax
callq 0x50dd
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3878
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x383d
testq %rax, %rax
je 0x4d62
movq %rax, %r12
movq (%rax), %rdi
movq %r15, %rsi
callq 0x3370
testl %eax, %eax
jne 0x4d36
movq %r14, %rdi
callq 0x3871
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_O2/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 0x4d87
movq 0x7b29(%rip), %r14      # 0xc8b0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4d26
movq 0x7b17(%rip), %rdi      # 0xc8b0
cmpq %rdi, %r14
sete %cl
testq %rax, %rax
setne %dl
orb %cl, %dl
je 0x4db1
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x4d26
// File: /workspace/github_c_makefile_star2_O2/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 0x5122
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, 0x7252(%rip)       # 0xc380
jae 0x513b
addq $0xd8, %rsp
popq %rbx
popq %r14
retq
movq %r8, %rbx
movl %ecx, %r8d
movq %rdx, %rcx
movq %rsi, %rdx
movq 0x6ea2(%rip), %r14      # 0xbff0
movq (%r14), %rdi
leaq 0x34f2(%rip), %rsi      # 0x864a
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 0x3580
movq (%r14), %rsi
leaq 0x34bd(%rip), %rdi      # 0x8656
callq 0x3280
jmp 0x5130
// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
callq 0x6e00
testw %ax, %ax
je 0x525d
callq 0x6fe4
testw %ax, %ax
je 0x525d
callq 0x481c
testw %ax, %ax
je 0x525d
leaq 0x31f3(%rip), %r14      # 0x83cb
leaq 0x334c(%rip), %r15      # 0x852b
leaq 0x3350(%rip), %r8       # 0x8536
xorl %ebx, %ebx
pushq $0x3
popq %rbp
pushq $0x7c
popq %rcx
movl %ebp, %edi
movq %r14, %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0x50dd
callq 0x6408
leaq 0x3349(%rip), %r8       # 0x8552
pushq $0x7f
popq %rcx
movl %ebp, %edi
movq %r14, %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0x50dd
callq 0x4acc
leaq 0x333a(%rip), %r8       # 0x8561
movl %ebp, %edi
movq %r14, %rsi
movq %r15, %rdx
movl $0x81, %ecx
xorl %eax, %eax
callq 0x50dd
leaq 0x754e(%rip), %r14      # 0xc790
cmpq $0x1f, %rbx
je 0x5261
movq (%r14,%rbx,8), %rsi
testq %rsi, %rsi
je 0x5258
movl %ebx, %edi
callq 0x3390
incq %rbx
jmp 0x5242
xorl %eax, %eax
jmp 0x5289
leaq 0x3163(%rip), %rsi      # 0x83cb
leaq 0x32bc(%rip), %rdx      # 0x852b
leaq 0x3306(%rip), %r8       # 0x857c
pushq $0x3
popq %rdi
movl $0x88, %ecx
xorl %eax, %eax
callq 0x50dd
movw $0x1, %ax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x2ba6(%rip), %rsi      # 0x81ee
callq 0x6d83
movl (%rax), %ebp
testl %ebp, %ebp
je 0x56b4
leaq 0x2b9c(%rip), %rsi      # 0x81f6
movq %r14, %rdi
callq 0x6d83
movl (%rax), %r15d
leaq 0x2b9c(%rip), %rsi      # 0x8208
movq %r14, %rdi
callq 0x6d83
cmpl $0x1, %r15d
adcl $0x0, %r15d
cmpl $0x1, %ebp
je 0x569d
cmpl $0x3, %ebp
pushq $0x3
popq %rcx
cmovbl %ebp, %ecx
movl (%rax), %eax
cmpl $0x1, %eax
adcl $0x0, %eax
decl %ecx
imull %ecx, %r15d
addl %eax, %r15d
je 0x56b4
addl %r15d, %r15d
cvtsi2ss %r15, %xmm0
movsd 0x8(%rbx), %xmm1
unpcklps %xmm0, %xmm0            # xmm0 = xmm0[0,0,1,1]
subps %xmm0, %xmm1
movlps %xmm1, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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, %eax
shrl $0x8, %edi
movl %eax, %ecx
shrl $0x10, %ecx
movl %eax, %r8d
shrl $0x18, %r8d
movl %eax, %r11d
andl $0xff000000, %r11d      # imm = 0xFF000000
movl $0xff, %r9d
andl %r9d, %eax
imull %r8d, %eax
movw $0xff, %r10w
xorl %edx, %edx
divw %r10w
movl %eax, %esi
shll $0x10, %esi
orl %r11d, %esi
andl %r9d, %edi
imull %r8d, %edi
movl %edi, %eax
xorl %edx, %edx
divw %r10w
movzwl %ax, %edi
shll $0x8, %edi
andl %r9d, %ecx
imull %r8d, %ecx
movl %ecx, %eax
xorl %edx, %edx
divw %r10w
movzwl %ax, %eax
orl %esi, %eax
orl %edi, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/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, %ebx
movl %edi, %ebp
leaq 0xc(%rsp), %r14
movl %esi, (%r14)
pushq $0x10
popq %rsi
movq %r14, %rdx
callq 0x7204
movl %ebx, %edi
callq 0x56bf
movl %eax, (%r14)
leaq 0x7056(%rip), %rax      # 0xc8e8
movq (%rax), %rdi
pushq $0x8
popq %rdx
movl %ebp, %esi
movq %r14, %rcx
callq 0x3170
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rbx
subq $0x30, %rsp
movl %r8d, %eax
movl 0x10(%r9), %r10d
movq %rsp, %r8
movw %r10w, (%r8)
andw $0x0, 0x2(%r8)
movw %dx, 0x4(%r8)
movzwl 0x12(%r9), %r9d
leal (%r9,%rdx), %r11d
movw %r11w, 0x6(%r8)
andw $0x0, 0x8(%r8)
movw %r9w, 0xa(%r8)
movl %edx, %ebx
addl %r10d, %ebx
movw %bx, 0xc(%r8)
movw %dx, 0xe(%r8)
addl %eax, %ecx
addl %ecx, %r10d
movw %r10w, 0x10(%r8)
andw $0x0, 0x12(%r8)
movw %dx, 0x14(%r8)
movw %r11w, 0x16(%r8)
andw $0x0, 0x18(%r8)
movl %esi, %eax
movl %edi, %esi
addl %r9d, %ecx
movw %cx, 0x1a(%r8)
movw %bx, 0x1c(%r8)
movw %dx, 0x1e(%r8)
movw %r10w, 0x20(%r8)
movw %cx, 0x22(%r8)
movw %dx, 0x24(%r8)
movw %dx, 0x26(%r8)
leaq 0x6dad(%rip), %rcx      # 0xc8e8
movq (%rcx), %rdi
pushq $0x5
popq %rcx
movl %eax, %edx
callq 0x32a0
addq $0x30, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/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
subq $0x18, %rsp
movl %r8d, 0x14(%rsp)
movl %ecx, 0x10(%rsp)
movl %edx, 0xc(%rsp)
movl %esi, %r15d
movq %rdi, %r12
pushq $0x1
popq %r13
pushq $0x10
popq %rbx
movq %r13, %rdi
movq %rbx, %rsi
callq 0x3340
movq %rax, %rbp
movq %r13, %rdi
movq %r13, %rsi
callq 0x3340
movq %rax, %r14
movq %rax, 0x8(%rbp)
movq %r13, %rdi
movq %rbx, %rsi
callq 0x3340
movq %rax, %rbx
movq %rax, (%rbp)
movq %r14, %rdi
movq %r12, %rsi
callq 0x30e0
movl %r15d, (%rbx)
movl 0xc(%rsp), %eax
movl %eax, 0x4(%rbx)
movl 0x10(%rsp), %eax
movl %eax, 0x8(%rbx)
movl 0x14(%rsp), %eax
movl %eax, 0xc(%rbx)
movq %rbp, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x1
popq %rdi
pushq $0x10
popq %rsi
callq 0x3340
movd %ebx, %xmm0
movd %ebp, %xmm1
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movd %r14d, %xmm0
movd %r15d, %xmm2
punpckldq %xmm0, %xmm2    # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1]
punpcklqdq %xmm1, %xmm2    # xmm2 = xmm2[0],xmm1[0]
movdqa 0x295b(%rip), %xmm0     # 0x8660
pand %xmm2, %xmm0
por 0x295f(%rip), %xmm0     # 0x8670
psrld $0x10, %xmm2
por 0x2962(%rip), %xmm2     # 0x8680
subps 0x296b(%rip), %xmm2     # 0x8690
addps %xmm0, %xmm2
movups %xmm2, (%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x603e
cvttss2si %xmm0, %r15
movl 0x4(%r14), %edi
movq %rbx, %rsi
callq 0x6094
cvttss2si %xmm0, %r12
movl 0x8(%r14), %edi
movq %rbx, %rsi
callq 0x601e
cvttss2si %xmm0, %r13
movl 0xc(%r14), %edi
movq %rbx, %rsi
callq 0x5ffe
cvttss2si %xmm0, %rcx
movl %r15d, %edi
movl %r12d, %esi
movl %r13d, %edx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x5cc3
// File: /workspace/github_c_makefile_star2_O2/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 0x5de2
movq %rsi, %r15
movq %rdi, %r14
xorl %ebx, %ebx
movq 0x10(%r14), %rdi
callq 0x383d
testq %rax, %rax
je 0x5de4
movq %rax, %r12
movq 0x8(%rax), %rdi
movq %r15, %rsi
callq 0x3370
testl %eax, %eax
jne 0x5db2
movq 0x10(%r14), %rdi
callq 0x3871
movq (%r12), %rbx
jmp 0x5de4
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_O2/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 0x2568(%rip), %rsi      # 0x8368
callq 0x4d71
movl (%rax), %ecx
andl $0x1, %ecx
pushq $0x2
popq %rax
subl %ecx, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x2332(%rip), %rsi      # 0x814f
callq 0x4d71
movl (%rax), %ecx
andl $0x1, %ecx
pushq $0x2
popq %rax
subl %ecx, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x2315(%rip), %rsi      # 0x814f
callq 0x4d71
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_O2/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 0x250e(%rip), %rsi      # 0x8368
callq 0x4d71
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_O2/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 0x22d9(%rip), %rsi      # 0x815c
callq 0x4d71
movl (%rax), %ebp
movq 0x18(%rbx), %rdi
leaq 0x22ba(%rip), %rsi      # 0x814f
callq 0x4d71
movl (%rax), %r14d
movq 0x18(%rbx), %rdi
leaq 0x22e4(%rip), %rsi      # 0x818c
callq 0x4d71
movq 0x18(%rbx), %rdi
leal 0x1(%r14), %r15d
imull %ebp, %r15d
addl (%rax), %r15d
leaq 0x22da(%rip), %rsi      # 0x819d
callq 0x4d71
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_O2/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 0x2256(%rip), %rsi      # 0x815c
callq 0x4d71
movl (%rax), %ebp
movq 0x18(%rbx), %rdi
leaq 0x2450(%rip), %rsi      # 0x8368
callq 0x4d71
movl (%rax), %r14d
movq 0x18(%rbx), %rdi
leaq 0x223e(%rip), %rsi      # 0x8169
callq 0x4d71
movq 0x18(%rbx), %rdi
leal 0x1(%r14), %r15d
imull %ebp, %r15d
addl (%rax), %r15d
leaq 0x2233(%rip), %rsi      # 0x8179
callq 0x4d71
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_O2/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 0x21d0(%rip), %rsi      # 0x815c
callq 0x4d71
movl %ebx, %ecx
cvtsi2ss %rcx, %xmm1
decl %ebx
imull (%rax), %ebx
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_O2/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 0x218b(%rip), %rsi      # 0x815c
callq 0x4d71
movl %ebx, %ecx
cvtsi2ss %rcx, %xmm1
incl %ebx
imull (%rax), %ebx
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_O2/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 %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %ebp
movq %rsi, %rdi
callq 0x5e6e
movss %xmm0, 0x4(%rsp)
movq 0x18(%rbx), %rdi
leaq 0x212d(%rip), %rsi      # 0x818c
callq 0x4d71
movl (%rax), %eax
cvtsi2ss %rax, %xmm0
movss %xmm0, (%rsp)
movss 0x4(%rsp), %xmm0
movl %ebp, %edi
movq %rbx, %rsi
callq 0x5fb9
addss (%rsp), %xmm0
movq 0x8(%rbx), %rax
addss (%rax), %xmm0
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %ebp
movq %rsi, %rdi
callq 0x5ef1
movss %xmm0, 0x4(%rsp)
movq 0x18(%rbx), %rdi
leaq 0x20b4(%rip), %rsi      # 0x8169
callq 0x4d71
movl (%rax), %eax
cvtsi2ss %rax, %xmm0
movss %xmm0, (%rsp)
movss 0x4(%rsp), %xmm0
movl %ebp, %edi
movq %rbx, %rsi
callq 0x5fb9
addss (%rsp), %xmm0
movq 0x8(%rbx), %rax
addss 0x4(%rax), %xmm0
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/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 0x6904
testw %ax, %ax
je 0x6229
movl %ebx, %edi
callq 0x6d04
leaq 0x66b0(%rip), %rax      # 0xc8e0
cmpl %ebx, (%rax)
jne 0x6237
andl $0x0, (%rax)
popq %rbx
jmp 0x6fd5
// File: /workspace/github_c_makefile_star2_O2/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
subq $0x20, %rsp
movl 0x8(%rdi), %ebp
leaq 0x6691(%rip), %rax      # 0xc8e0
movl (%rax), %ebx
movl %ebp, (%rax)
movl %ebp, %edi
callq 0x7244
movl %ebp, %edi
callq 0x67fc
testw %ax, %ax
je 0x6287
movl %ebp, %edi
callq 0x6976
testq %rax, %rax
je 0x6287
movq %rax, %r14
movl 0x4(%rax), %edi
callq 0x7348
movq %r14, %rdi
callq 0x5726
jmp 0x628e
movl %ebp, %edi
callq 0x7348
movl %ebp, %edi
callq 0x72b8
movl %ebx, %edi
callq 0x6904
testw %ax, %ax
je 0x62e9
movl %ebx, %edi
callq 0x6916
movq %rax, %r14
leaq 0x6636(%rip), %rax      # 0xc8e8
movq (%rax), %rdi
movl $0x8000, 0x18(%rsp)     # imm = 0x8000
andl $0x0, 0x8(%rsp)
movl $0x1, 0x10(%rsp)
andl $0x0, (%rsp)
pushq $0x4
popq %rcx
pushq $0x1
popq %r8
xorl %esi, %esi
movl %ebx, %edx
movl %r8d, %r9d
callq 0x3360
movq %r14, %rdi
callq 0x5726
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x6fd5
// File: /workspace/github_c_makefile_star2_O2/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 0x6608(%rip), %r15      # 0xc910
movq (%r15), %rcx
cmpl 0x58(%rcx), %eax
jne 0x632f
movl %ebx, %edi
callq 0x6904
testw %ax, %ax
je 0x6323
movl %ebx, %edi
callq 0x6d04
movl %ebx, %edi
popq %rbx
popq %r14
popq %r15
jmp 0x73cf
cmpl 0x84(%rcx), %eax
jne 0x639a
movq %rdi, %r14
movl %ebx, %edi
callq 0x6904
testw %ax, %ax
je 0x639a
movl %ebx, %edi
callq 0x6916
movl 0x10(%r14), %ecx
movq (%r15), %rdx
cmpl 0x128(%rdx), %ecx
jne 0x639a
movl 0xc(%r14), %ecx
cmpl $0x2, %ecx
jne 0x636f
xorl %ecx, %ecx
cmpw $0x0, 0x20(%rax)
sete %cl
movw %cx, 0x20(%rax)
testw %cx, %cx
je 0x63a0
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 0x74fa
jmp 0x63ac
popq %rbx
popq %r14
popq %r15
retq
movq 0x8(%rax), %rsi
movq %rax, %rdi
callq 0x6c26
popq %rbx
popq %r14
popq %r15
jmp 0x6fd5
// File: /workspace/github_c_makefile_star2_O2/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 0x232f(%rip), %rcx      # 0x86f5
leaq 0x2338(%rip), %r8       # 0x8705
cmoveq %rcx, %r8
leal 0xb9(,%rax,2), %ecx
leaq 0x22c1(%rip), %rsi      # 0x86a0
leaq 0x22f5(%rip), %rdx      # 0x86db
pushq $0x2
popq %rdi
xorl %eax, %eax
callq 0x50dd
leaq 0x64c9(%rip), %rax      # 0xc8c0
andw $0x0, (%rax)
callq 0x5294
xorl %edi, %edi
callq 0x3620
nop
// File: /workspace/github_c_makefile_star2_O2/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 0x630b(%rip), %rdi      # 0xc8c8
callq 0x383d
movq %rax, %rbx
testq %rax, %rax
je 0x65e5
movq (%rbx), %rdi
movq %r14, %rsi
callq 0x3370
testl %eax, %eax
jne 0x65b6
movq 0x62e8(%rip), %rdi      # 0xc8c8
callq 0x3871
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x62e9(%rip), %rbx      # 0xc8e8
movq (%rbx), %rdi
leaq 0x62e7(%rip), %rax      # 0xc8f0
movq (%rax), %rax
movl (%rax), %esi
callq 0x3380
movq (%rbx), %rdi
xorl %ebx, %ebx
movl %eax, %esi
xorl %edx, %edx
callq 0x33a0
movq %rax, %r14
xorps %xmm2, %xmm2
xorl %ebp, %ebp
movq 0x6298(%rip), %rdi      # 0xc8c8
cmpl 0xc(%rdi), %ebp
jae 0x667a
movl %ebp, %esi
movaps %xmm2, (%rsp)
callq 0x385f
movaps (%rsp), %xmm2
movq 0x8(%rax), %rcx
movsd 0x8(%rcx), %xmm0
addps %xmm0, %xmm2
movswl 0x10(%r14), %ecx
cvtsi2ss %ecx, %xmm0
movaps %xmm2, %xmm1
shufps $0x55, %xmm2, %xmm1     # xmm1 = xmm1[1,1],xmm2[1,1]
ucomiss %xmm0, %xmm1
jbe 0x6673
movswl 0x12(%r14), %ecx
cvtsi2ss %ecx, %xmm0
ucomiss %xmm0, %xmm2
ja 0x6677
incl %ebp
jmp 0x6629
movq %rax, %rbx
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/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 %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movl %edi, %ebx
movq 0x6234(%rip), %rdi      # 0xc8d0
testq %rdi, %rdi
je 0x66cc
callq 0x383d
testq %rax, %rax
je 0x66cc
movq %rax, %r15
movq (%rax), %rdi
movq %r14, %rsi
callq 0x3370
testl %eax, %eax
jne 0x66c3
cmpl %ebx, 0x8(%r15)
je 0x670a
movq 0x6206(%rip), %rdi      # 0xc8d0
jmp 0x66a1
pushq $0x1
popq %r12
pushq $0x18
popq %rsi
movq %r12, %rdi
callq 0x3340
movq %rax, %r15
movq %r12, %rdi
movq %r12, %rsi
callq 0x3340
movq %rax, (%r15)
movq %rax, %rdi
movq %r14, %rsi
callq 0x30e0
movl %ebx, 0x8(%r15)
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x61bf(%rip), %rdi      # 0xc8d0
callq 0x3871
jmp 0x66fb
// File: /workspace/github_c_makefile_star2_O2/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, 0x61ac(%rip)      # 0xc8d0
je 0x6743
movq 0x61a3(%rip), %rdi      # 0xc8d0
callq 0x383d
cmpq %rbx, %rax
je 0x673c
testq %rax, %rax
jne 0x6726
testq %rax, %rax
je 0x6754
popq %rbx
retq
callq 0x3808
movq %rax, %rdi
movq %rax, 0x617e(%rip)      # 0xc8d0
jmp 0x675b
movq 0x6175(%rip), %rdi      # 0xc8d0
movq %rbx, %rsi
popq %rbx
jmp 0x3878
// File: /workspace/github_c_makefile_star2_O2/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 0x3420
testq %rax, %rax
je 0x67ed
movq %rax, %rbx
leaq 0x8(%rsp), %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0x3520
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
popq %rcx
popq %rdx
movl %eax, %ebp
testq %r15, %r15
je 0x67d8
movq %r15, %rdi
callq 0x34a0
movq 0x5801(%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
// File: /workspace/github_c_makefile_star2_O2/comfies[P]custard/src/wm/window.c
// Function: get_window_by_id
window_t *get_window_by_id(xcb_window_t window_id) {
    if (window_id == xcb_screen->root || window_id == ewmh_window ||
        window_id == XCB_WINDOW_NONE)
        return NULL;

    if (windows) {
        window_t *window;
        while ((window = vector_iterator(windows))) {
            if (window->id == window_id) {
                reset_vector_iterator(windows);
                return window;
            }
        }
    }

    return NULL;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
leaq 0x5fd0(%rip), %rax      # 0xc8f0
movq (%rax), %rax
cmpl %edi, (%rax)
jne 0x6933
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movl %edi, %ebp
xorl %ebx, %ebx
testl %edi, %edi
je 0x6929
leaq 0x5fc6(%rip), %rax      # 0xc908
cmpl %ebp, (%rax)
je 0x6929
cmpq $0x0, 0x5f8a(%rip)      # 0xc8d8
je 0x6929
movq 0x5f81(%rip), %rdi      # 0xc8d8
callq 0x383d
testq %rax, %rax
je 0x6927
movq %rax, %rbx
cmpl %ebp, (%rax)
jne 0x6950
movq 0x5f69(%rip), %rdi      # 0xc8d8
callq 0x3871
jmp 0x6929
// File: /workspace/github_c_makefile_star2_O2/comfies[P]custard/src/wm/window.c
// Function: set_window_geometry
void set_window_geometry(window_t *window, void *geometry) {
    window->geometry = geometry;

    monitor_t *monitor = NULL;
    if (window->rule && window->rule->rules) {
        kv_value_t *value;
        value = get_value_from_key(window->rule->rules, "monitor");

        if (value)
            if (monitor_from_name(value->string))
                monitor = monitor_from_name(value->string);
    }

    if (!monitor)
        monitor = monitor_with_cursor_residence();

    screen_geometry_t *screen_geometry = NULL;
    if (window->floating)
        screen_geometry = (screen_geometry_t*)geometry;
    else
        screen_geometry = get_equivalent_screen_geometry(
            (grid_geometry_t*)geometry, monitor);
    apply_decoration_to_window_screen_geometry(window, screen_geometry);

    change_window_geometry(window->id,
        0, 0,
        (unsigned int)screen_geometry->height,
        (unsigned int)screen_geometry->width);

    change_window_geometry(window->parent,
        (unsigned int)screen_geometry->x,
        (unsigned int)screen_geometry->y,
        (unsigned int)screen_geometry->height,
        (unsigned int)screen_geometry->width);
    free(screen_geometry);

    log_debug("Window(%08x) window geometry set", window->id);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, 0x8(%rdi)
movq 0x10(%rdi), %rax
testq %rax, %rax
je 0x6c75
movq 0x10(%rax), %rdi
testq %rdi, %rdi
je 0x6c75
leaq 0x1577(%rip), %rsi      # 0x81c5
callq 0x4d26
testq %rax, %rax
je 0x6c75
movq %rax, %r15
movq (%rax), %rdi
callq 0x65af
testq %rax, %rax
je 0x6c75
movq (%r15), %rdi
callq 0x65af
testq %rax, %rax
jne 0x6c7a
callq 0x65f0
cmpw $0x0, 0x22(%rbx)
jne 0x6c8f
movq %r14, %rdi
movq %rax, %rsi
callq 0x5d36
movq %rax, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5634
cvttss2si 0x8(%r14), %rcx
movl (%rbx), %edi
cvttss2si 0xc(%r14), %r8
xorl %esi, %esi
xorl %edx, %edx
callq 0x74fa
cvttss2si (%r14), %rsi
cvttss2si 0x4(%r14), %rdx
cvttss2si 0x8(%r14), %rcx
movl 0x4(%rbx), %edi
cvttss2si 0xc(%r14), %r8
callq 0x74fa
movq %r14, %rdi
callq 0x3060
movl (%rbx), %r9d
leaq 0x1a55(%rip), %rsi      # 0x8737
leaq 0x1a9a(%rip), %rdx      # 0x8783
leaq 0x1aa7(%rip), %r8       # 0x8797
pushq $0x3
popq %rdi
movl $0xfe, %ecx
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0x50dd