LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x7000
movss %xmm0, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
leaq 0x2e71(%rip), %rsi      # 0xa16d
callq 0x5760
movl (%rax), %eax
cvtsi2ss %rax, %xmm0
movss %xmm0, -0x18(%rbp)
movss -0x14(%rbp), %xmm0
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
callq 0x7160
addss -0x18(%rbp), %xmm0
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
addss 0x4(%rax), %xmm0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %edi
callq 0x8050
cmpw $0x0, %ax
je 0x7514
movl -0x14(%rbp), %edi
callq 0x8680
leaq 0x63d5(%rip), %rax      # 0xd8f0
movl (%rax), %eax
cmpl -0x14(%rbp), %eax
jne 0x752f
leaq 0x63c7(%rip), %rax      # 0xd8f0
movl $0x0, (%rax)
callq 0x8ac0
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x14(%rbp)
leaq 0x638b(%rip), %rax      # 0xd8f0
movl (%rax), %eax
movl %eax, -0x18(%rbp)
movl -0x14(%rbp), %ecx
leaq 0x637c(%rip), %rax      # 0xd8f0
movl %ecx, (%rax)
movl -0x14(%rbp), %edi
callq 0x8ec0
movq $0x0, -0x20(%rbp)
movl -0x14(%rbp), %edi
callq 0x7e30
cmpw $0x0, %ax
je 0x75a0
movl -0x14(%rbp), %edi
callq 0x8130
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x75be
movq -0x20(%rbp), %rax
movl 0x4(%rax), %edi
callq 0x9030
movq -0x20(%rbp), %rdi
callq 0x6430
jmp 0x75c6
movl -0x14(%rbp), %edi
callq 0x9030
movl -0x14(%rbp), %edi
callq 0x8f60
movl -0x18(%rbp), %edi
callq 0x8050
cmpw $0x0, %ax
je 0x7635
movl -0x18(%rbp), %edi
callq 0x8090
movq %rax, -0x20(%rbp)
leaq 0x6309(%rip), %rax      # 0xd8f8
movq (%rax), %rdi
movl -0x18(%rbp), %edx
xorl %esi, %esi
movl $0x4, %ecx
movl $0x1, %r9d
movl %r9d, %r8d
movl $0x0, (%rsp)
movl $0x0, 0x8(%rsp)
movl $0x1, 0x10(%rsp)
movl $0x8000, 0x18(%rsp)     # imm = 0x8000
callq 0x3370
movl %eax, -0x24(%rbp)
movq -0x20(%rbp), %rdi
callq 0x6430
callq 0x8ac0
addq $0x50, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
cmpl $0x2, -0x4(%rbp)
jne 0x77d9
movl $0x2, %edi
leaq 0x2e81(%rip), %rsi      # 0xa63e
leaq 0x2eb5(%rip), %rdx      # 0xa679
movl $0xb9, %ecx
leaq 0x2ec3(%rip), %r8       # 0xa693
movb $0x0, %al
callq 0x5bf0
jmp 0x77ff
movl $0x2, %edi
leaq 0x2e59(%rip), %rsi      # 0xa63e
leaq 0x2e8d(%rip), %rdx      # 0xa679
movl $0xbb, %ecx
leaq 0x2eab(%rip), %r8       # 0xa6a3
movb $0x0, %al
callq 0x5bf0
leaq 0x60ca(%rip), %rax      # 0xd8d0
movw $0x0, (%rax)
callq 0x5e20
xorl %edi, %edi
callq 0x3640
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq 0x5e25(%rip), %rdi      # 0xd8d8
callq 0x38c0
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x7aef
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x3380
cmpl $0x0, %eax
jne 0x7aed
movq 0x5dfa(%rip), %rdi      # 0xd8d8
callq 0x3970
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x7af7
jmp 0x7aac
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
leaq 0x5dd9(%rip), %rax      # 0xd8f8
movq (%rax), %rdi
leaq 0x5dd7(%rip), %rax      # 0xd900
movq (%rax), %rax
movl (%rax), %esi
callq 0x3390
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %eax
movl %eax, -0xc(%rbp)
leaq 0x5db5(%rip), %rax      # 0xd8f8
movq (%rax), %rdi
movl -0xc(%rbp), %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x33b0
movq %rax, -0x18(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0x1c(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0x20(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq 0x5d61(%rip), %rcx      # 0xd8d8
cmpl 0xc(%rcx), %eax
jae 0x7c07
movq 0x5d51(%rip), %rdi      # 0xd8d8
movl -0x2c(%rbp), %esi
callq 0x3930
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movss 0xc(%rax), %xmm0
addss -0x1c(%rbp), %xmm0
movss %xmm0, -0x1c(%rbp)
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movss 0x8(%rax), %xmm0
addss -0x20(%rbp), %xmm0
movss %xmm0, -0x20(%rbp)
movq -0x18(%rbp), %rax
movswl 0x10(%rax), %eax
cvtsi2ss %eax, %xmm1
movss -0x1c(%rbp), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x7bf7
movq -0x18(%rbp), %rax
movswl 0x12(%rax), %eax
cvtsi2ss %eax, %xmm1
movss -0x20(%rbp), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x7bf7
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x7c0f
jmp 0x7bf9
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x7b6d
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0xc(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, 0x5ca9(%rip)      # 0xd8e0
je 0x7c8c
jmp 0x7c3b
movq 0x5c9e(%rip), %rdi      # 0xd8e0
callq 0x38c0
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x7c8a
movq -0x20(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x3380
cmpl $0x0, %eax
jne 0x7c88
movq -0x20(%rbp), %rax
movl 0x8(%rax), %eax
cmpl -0xc(%rbp), %eax
jne 0x7c88
movq 0x5c67(%rip), %rdi      # 0xd8e0
callq 0x3970
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x7ce4
jmp 0x7c3b
jmp 0x7c8c
movl $0x1, %edi
movl $0x18, %esi
callq 0x3350
movq %rax, -0x20(%rbp)
movl $0x1, %esi
movq %rsi, %rdi
callq 0x3350
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x30e0
movl -0xc(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x20(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, 0x5bdc(%rip)      # 0xd8e0
je 0x7d2e
jmp 0x7d08
movq 0x5bd1(%rip), %rdi      # 0xd8e0
callq 0x38c0
movq %rax, -0x10(%rbp)
cmpq $0x0, %rax
je 0x7d2c
movq -0x8(%rbp), %rax
cmpq -0x10(%rbp), %rax
jne 0x7d2a
jmp 0x7d4a
jmp 0x7d08
jmp 0x7d3a
callq 0x3860
movq %rax, 0x5ba6(%rip)      # 0xd8e0
movq 0x5b9f(%rip), %rdi      # 0xd8e0
movq -0x8(%rbp), %rsi
callq 0x3990
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movl $0x800, %esi            # imm = 0x800
leaq -0x30(%rbp), %rdx
leaq -0x34(%rbp), %rcx
xorl %eax, %eax
movl %eax, %r8d
callq 0x3440
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x7d90
movw $0x0, -0x2(%rbp)
jmp 0x7e26
movq -0x20(%rbp), %rdi
xorl %esi, %esi
leaq -0x30(%rbp), %rdx
callq 0x3540
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rdi
callq 0x31f0
movq -0x50(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
movl %eax, %ecx
xorl %r9d, %r9d
xorl %eax, %eax
movl %r9d, %r8d
movq $0x0, (%rsp)
movl $0x0, 0x8(%rsp)
callq 0x32b0
movl %eax, -0x38(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x7e02
movq -0x28(%rbp), %rdi
callq 0x34c0
movq 0x51df(%rip), %rax      # 0xcfe8
movq (%rax), %rax
movq -0x20(%rbp), %rdi
callq *%rax
cmpl $0x0, -0x38(%rbp)
jge 0x7e20
movw $0x0, -0x2(%rbp)
jmp 0x7e26
movw $0x1, -0x2(%rbp)
movw -0x2(%rbp), %ax
addq $0x60, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/comfies[P]custard/src/wm/window.c
// Function: window_is_managed
unsigned short window_is_managed(xcb_window_t window_id) {
    window_t *window = get_window_by_id(window_id);

    if (!window)
        return 0;

    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x8(%rbp)
movl -0x8(%rbp), %edi
callq 0x8090
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x8076
movw $0x0, -0x2(%rbp)
jmp 0x807c
movw $0x1, -0x2(%rbp)
movw -0x2(%rbp), %ax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0xc(%rbp)
movl -0xc(%rbp), %eax
leaq 0x585b(%rip), %rcx      # 0xd900
movq (%rcx), %rcx
cmpl (%rcx), %eax
je 0x80c0
movl -0xc(%rbp), %eax
leaq 0x5862(%rip), %rcx      # 0xd918
cmpl (%rcx), %eax
je 0x80c0
cmpl $0x0, -0xc(%rbp)
jne 0x80ca
movq $0x0, -0x8(%rbp)
jmp 0x8119
cmpq $0x0, 0x5816(%rip)      # 0xd8e8
je 0x8111
jmp 0x80d6
movq 0x580b(%rip), %rdi      # 0xd8e8
callq 0x38c0
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x810f
movq -0x18(%rbp), %rax
movl (%rax), %eax
cmpl -0xc(%rbp), %eax
jne 0x810d
movq 0x57ea(%rip), %rdi      # 0xd8e8
callq 0x3970
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x8119
jmp 0x80d6
jmp 0x8111
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x85a7
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
cmpq $0x0, 0x10(%rax)
je 0x85a7
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rdi
leaq 0x1c58(%rip), %rsi      # 0xa1c9
callq 0x56f0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x85a5
movq -0x20(%rbp), %rax
movq (%rax), %rdi
callq 0x7aa0
cmpq $0x0, %rax
je 0x85a3
movq -0x20(%rbp), %rax
movq (%rax), %rdi
callq 0x7aa0
movq %rax, -0x18(%rbp)
jmp 0x85a5
jmp 0x85a7
cmpq $0x0, -0x18(%rbp)
jne 0x85b7
callq 0x7b10
movq %rax, -0x18(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x8(%rbp), %rax
cmpw $0x0, 0x22(%rax)
je 0x85d4
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x85e5
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x6cb0
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x62c0
movq -0x8(%rbp), %rax
movl (%rax), %edi
movq -0x28(%rbp), %rax
cvttss2si 0x8(%rax), %rcx
cvttss2si 0xc(%rax), %rax
movl %eax, %r8d
xorl %edx, %edx
movl %edx, %esi
callq 0x92c0
movq -0x8(%rbp), %rax
movl 0x4(%rax), %edi
movq -0x28(%rbp), %rax
cvttss2si (%rax), %rcx
movl %ecx, %esi
cvttss2si 0x4(%rax), %rcx
movl %ecx, %edx
cvttss2si 0x8(%rax), %rcx
cvttss2si 0xc(%rax), %rax
movl %eax, %r8d
callq 0x92c0
movq -0x28(%rbp), %rdi
callq 0x3060
movq -0x8(%rbp), %rax
movl (%rax), %r9d
movl $0x3, %edi
leaq 0x205d(%rip), %rsi      # 0xa6bb
leaq 0x20a2(%rip), %rdx      # 0xa707
movl $0xfe, %ecx
leaq 0x20aa(%rip), %r8       # 0xa71b
movb $0x0, %al
callq 0x5bf0
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/comfies[P]custard/src/wm/window.c
// Function: unmanage_window
void unmanage_window(xcb_window_t window_id) {
    window_t *window;
    for (unsigned int index = 0; index < windows->size; index++) {
        window = get_from_vector(windows, index);

        if (window->id == window_id) {

            pull_from_vector(windows, index);
            xcb_destroy_window(xcb_connection, window->parent);
            free(window);

            log_debug("Window(%08x) unmanaged", window_id);
            return;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq 0x524c(%rip), %rcx      # 0xd8e8
cmpl 0xc(%rcx), %eax
jae 0x8730
movq 0x523c(%rip), %rdi      # 0xd8e8
movl -0x14(%rbp), %esi
callq 0x3930
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
cmpl -0x4(%rbp), %eax
jne 0x8720
movq 0x521e(%rip), %rdi      # 0xd8e8
movl -0x14(%rbp), %esi
callq 0x3a20
leaq 0x521f(%rip), %rax      # 0xd8f8
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movl 0x4(%rax), %esi
callq 0x3070
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3060
movl -0x4(%rbp), %r9d
movl $0x3, %edi
leaq 0x1fb7(%rip), %rsi      # 0xa6bb
leaq 0x1fd5(%rip), %rdx      # 0xa6e0
movl $0xd4, %ecx
leaq 0x1fd9(%rip), %r8       # 0xa6f0
movb $0x0, %al
callq 0x5bf0
jmp 0x8730
jmp 0x8722
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x8692
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/comfies[P]custard/src/wm/window.c
// Function: get_setting_from_window_rules
kv_value_t *get_setting_from_window_rules(window_t *window, char *setting) {
    if (window->rule)
        return get_value_from_key_with_fallback(
            window->rule->rules, setting);
    return get_value_from_key(configuration, setting);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x8776
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x5760
movq %rax, -0x8(%rbp)
jmp 0x878d
leaq 0x5143(%rip), %rax      # 0xd8c0
movq (%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x56f0
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/comfies[P]custard/src/wm/workspace.c
// Function: show_workspace_on_monitor
void show_workspace_on_monitor(monitor_t *monitor, unsigned int workspace) {
    // TODO: test for integrity of workspace
    if (!workspace)
        return; // workspace 0 unavailable

    unsigned int workspaces = get_value_from_key_with_fallback(
        monitor->configuration, "workspaces")->number;

    if (workspaces < workspace)
        return;

    monitor->workspace = workspace;

    window_t *window = NULL;
    while ((window = vector_iterator(windows))) {
        if (window->monitor != monitor)
            continue;

        if (monitor->workspace == window->workspace)
            map_window(window->parent);
        else
            unmap_window(window->parent);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jne 0x87ba
jmp 0x8844
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq 0x1b8f(%rip), %rsi      # 0xa358
callq 0x5760
movl (%rax), %eax
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl -0xc(%rbp), %eax
jae 0x87dd
jmp 0x8844
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x20(%rax)
movq $0x0, -0x18(%rbp)
leaq 0x50f2(%rip), %rax      # 0xd8e8
movq (%rax), %rdi
callq 0x38c0
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x8844
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
cmpq -0x8(%rbp), %rax
je 0x8818
jmp 0x87ef
movq -0x8(%rbp), %rax
movl 0x20(%rax), %eax
movq -0x18(%rbp), %rcx
cmpl 0x24(%rcx), %eax
jne 0x8836
movq -0x18(%rbp), %rax
movl 0x4(%rax), %edi
callq 0x8ec0
jmp 0x8842
movq -0x18(%rbp), %rax
movl 0x4(%rax), %edi
callq 0x8f10
jmp 0x87ef
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/comfies[P]custard/src/xcb/window.c
// Function: focus_window
void focus_window(xcb_window_t window_id) {
    unsigned int values[2] = {
        XCB_ICCCM_WM_STATE_NORMAL,
        XCB_NONE
    };

    xcb_change_property(xcb_connection, XCB_PROP_MODE_REPLACE, window_id,
        ewmh_connection->_NET_WM_STATE, ewmh_connection->_NET_WM_STATE,
        32, 2, values);

    xcb_set_input_focus(xcb_connection, XCB_INPUT_FOCUS_POINTER_ROOT,
        window_id, XCB_CURRENT_TIME);
    xcb_ewmh_set_active_window(ewmh_connection, 0, window_id);

    log_debug("Window(%08x) focused", window_id);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movq 0x1a4a(%rip), %rax      # 0xa9bc
movq %rax, -0xc(%rbp)
leaq 0x497b(%rip), %rax      # 0xd8f8
movq (%rax), %rdi
movl -0x4(%rbp), %edx
leaq 0x4996(%rip), %rax      # 0xd920
movq (%rax), %rax
movl 0x84(%rax), %ecx
leaq 0x4986(%rip), %rax      # 0xd920
movq (%rax), %rax
movl 0x84(%rax), %r8d
leaq -0xc(%rbp), %rax
xorl %esi, %esi
movl $0x20, %r9d
movl $0x2, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x3670
movl %eax, -0x10(%rbp)
leaq 0x492d(%rip), %rax      # 0xd8f8
movq (%rax), %rdi
movl -0x4(%rbp), %edx
movl $0x1, %esi
xorl %ecx, %ecx
callq 0x3610
movl %eax, -0x14(%rbp)
leaq 0x4939(%rip), %rax      # 0xd920
movq (%rax), %rdi
movl -0x4(%rbp), %edx
xorl %esi, %esi
callq 0x3110
movl %eax, -0x18(%rbp)
movl -0x4(%rbp), %r9d
movl $0x3, %edi
leaq 0x1837(%rip), %rsi      # 0xa83e
leaq 0x18a1(%rip), %rdx      # 0xa8af
movl $0x2a, %ecx
leaq 0x18a2(%rip), %r8       # 0xa8bc
movb $0x0, %al
callq 0x5bf0
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/comfies[P]custard/src/xcb/window.c
// Function: raise_window
void raise_window(xcb_window_t window_id) {
    unsigned int value_mask = XCB_CONFIG_WINDOW_STACK_MODE;
    unsigned int values[1] = {
        XCB_STACK_MODE_ABOVE
    };

    configure_window(window_id, value_mask, values);

    log_debug("Window(%08x) raised", window_id);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl $0x40, -0x8(%rbp)
leaq -0xc(%rbp), %rdi
xorl %esi, %esi
movl $0x4, %edx
callq 0x32e0
movl -0x4(%rbp), %edi
movl -0x8(%rbp), %esi
leaq -0xc(%rbp), %rdx
callq 0x8e50
movl -0x4(%rbp), %r9d
movl $0x3, %edi
leaq 0x17cd(%rip), %rsi      # 0xa83e
leaq 0x1859(%rip), %rdx      # 0xa8d1
movl $0x35, %ecx
leaq 0x185a(%rip), %r8       # 0xa8de
movb $0x0, %al
callq 0x5bf0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/comfies[P]custard/src/xcb/window.c
// Function: lower_window
void lower_window(xcb_window_t window_id) {
    unsigned int value_mask = XCB_CONFIG_WINDOW_STACK_MODE;
    unsigned int values[1] = {
        XCB_STACK_MODE_BELOW
    };

    configure_window(window_id, value_mask, values);

    log_debug("Window(%08x) lowered", window_id);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl $0x40, -0x8(%rbp)
movl 0x190c(%rip), %eax      # 0xa9c4
movl %eax, -0xc(%rbp)
movl -0x4(%rbp), %edi
movl -0x8(%rbp), %esi
leaq -0xc(%rbp), %rdx
callq 0x8e50
movl -0x4(%rbp), %r9d
movl $0x3, %edi
leaq 0x1764(%rip), %rsi      # 0xa83e
leaq 0x1811(%rip), %rdx      # 0xa8f2
movl $0x40, %ecx
leaq 0x1812(%rip), %r8       # 0xa8ff
movb $0x0, %al
callq 0x5bf0
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/comfies[P]custard/src/xcb/window.c
// Function: change_window_geometry
void change_window_geometry(xcb_window_t window_id, unsigned int x,
    unsigned int y, unsigned int height, unsigned int width) {

    unsigned int value_mask = XCB_CONFIG_WINDOW_X |
        XCB_CONFIG_WINDOW_Y     |
        XCB_CONFIG_WINDOW_WIDTH |
        XCB_CONFIG_WINDOW_HEIGHT;
    unsigned int values[4] = { x, y, width, height };

    configure_window(window_id, value_mask, values);

    log_debug("Window(%08x) geometry changed %dx%d (%d,%d)", window_id,
        width, height, x, y);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x48, %rsp
movl %edi, -0xc(%rbp)
movl %esi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl %r8d, -0x1c(%rbp)
movl $0xf, -0x20(%rbp)
movl -0x10(%rbp), %eax
movl %eax, -0x30(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x18(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0xc(%rbp), %edi
movl -0x20(%rbp), %esi
leaq -0x30(%rbp), %rdx
callq 0x8e50
movl -0xc(%rbp), %r9d
movl -0x1c(%rbp), %ebx
movl -0x18(%rbp), %r11d
movl -0x10(%rbp), %r10d
movl -0x14(%rbp), %eax
movl $0x3, %edi
leaq 0x1519(%rip), %rsi      # 0xa83e
leaq 0x164d(%rip), %rdx      # 0xa979
movl $0x7d, %ecx
leaq 0x1658(%rip), %r8       # 0xa990
movl %ebx, (%rsp)
movl %r11d, 0x8(%rsp)
movl %r10d, 0x10(%rsp)
movl %eax, 0x18(%rsp)
movb $0x0, %al
callq 0x5bf0
addq $0x48, %rsp
popq %rbx
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/comfies[P]custard/src/xcb/window.c
// Function: get_window_property
void *get_window_property(xcb_window_t window_id, xcb_atom_t property,
    xcb_atom_t atom_type) {
    xcb_get_property_cookie_t atom_cookie;
    atom_cookie = xcb_get_property(xcb_connection, 0, window_id, property,
        atom_type, 0, 256);

    xcb_get_property_reply_t *property_cookie;
    property_cookie = xcb_get_property_reply(xcb_connection, atom_cookie, NULL);

    void *window_property;
    window_property = xcb_get_property_value(property_cookie);

    return window_property;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
leaq 0x4580(%rip), %rax      # 0xd8f8
movq (%rax), %rdi
movl -0x4(%rbp), %edx
movl -0x8(%rbp), %ecx
movl -0xc(%rbp), %r8d
xorl %r9d, %r9d
movl %r9d, %esi
movl $0x100, (%rsp)          # imm = 0x100
callq 0x30d0
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x10(%rbp)
leaq 0x4551(%rip), %rax      # 0xd8f8
movq (%rax), %rdi
movl -0x10(%rbp), %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x3520
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x3180
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/return5[P]c_ish_one/./src/attack.c
// Function: setUpBoss
void setUpBoss(void) {
	Character *b = malloc(sizeof(Character));
	b->name = "Big Boss Monster";
	b->special_count = 0;
	b->turn = 0;
	b->health = 25;
	b->health_max = 25;
	b->attack = 8;
	b->defense = 3;
	b->crit_chance = 6;
	b->chance_to_dodge = 6;
	b->defense_up = 0;
	b->type = 19;
	ENEMY = b;
	previous->type = 1;
	makeBossStrings();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0xa8, %edi
callq 0x1160
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
leaq 0x8d67(%rip), %rcx      # 0xa068
movq %rcx, 0x38(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x8(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x4(%rax)
movq -0x8(%rbp), %rax
movl $0x19, (%rax)
movq -0x8(%rbp), %rax
movl $0x19, 0xc(%rax)
movq -0x8(%rbp), %rax
movl $0x8, 0x10(%rax)
movq -0x8(%rbp), %rax
movl $0x3, 0x14(%rax)
movq -0x8(%rbp), %rax
movl $0x6, 0x18(%rax)
movq -0x8(%rbp), %rax
movl $0x6, 0x20(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x24(%rax)
movq -0x8(%rbp), %rax
movl $0x13, 0x1c(%rax)
movq -0x8(%rbp), %rcx
leaq 0xfdd3(%rip), %rax      # 0x11150
movq (%rax), %rax
movq %rcx, 0x28(%rax)
leaq 0xfdc5(%rip), %rax      # 0x11150
movq (%rax), %rax
movl $0x1, 0xc(%rax)
callq 0x13a0
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/return5[P]c_ish_one/./src/attack.c
// Function: makeBossStrings
static void makeBossStrings(void) {
	ENEMY->regular_attack = "boss monster attacks you for %d damage.";
	ENEMY->regular_miss = "you dodged the monster's attack."; 
	ENEMY->counter_miss = "big boss counters dealing 4 damage."; 
	ENEMY->raise_defense = "big boss hardens its skin, increasing its defense rating."; 
	ENEMY->critical_hit = "the big bad monster scored a crit hit on you.\nyou suffer %d damage.";
	ENEMY->special_attack = "boss monster's eyes glow red. you feel weakened.\nthen it lets out a horrid screech.\nyour defense had been lowered\nyou suffer %d damage\nyou lose 2 turns.";
	ENEMY->special_attack_miss = "big boss starts its special attack\nyou mange to interrupt it in time and stop it.";
	ENEMY->prompt = "you encounter a large, grotesque monster.\nthis is the final boss.kill it and you are home free";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0xfda5(%rip), %rax      # 0x11150
movq (%rax), %rax
movq 0x28(%rax), %rax
leaq 0x8cc0(%rip), %rcx      # 0xa079
movq %rcx, 0x48(%rax)
leaq 0xfd8c(%rip), %rax      # 0x11150
movq (%rax), %rax
movq 0x28(%rax), %rax
leaq 0x8ccf(%rip), %rcx      # 0xa0a1
movq %rcx, 0x50(%rax)
leaq 0xfd73(%rip), %rax      # 0x11150
movq (%rax), %rax
movq 0x28(%rax), %rax
leaq 0x8cd7(%rip), %rcx      # 0xa0c2
movq %rcx, 0x68(%rax)
leaq 0xfd5a(%rip), %rax      # 0x11150
movq (%rax), %rax
movq 0x28(%rax), %rax
leaq 0x8ce2(%rip), %rcx      # 0xa0e6
movq %rcx, 0x70(%rax)
leaq 0xfd41(%rip), %rax      # 0x11150
movq (%rax), %rax
movq 0x28(%rax), %rax
leaq 0x8d03(%rip), %rcx      # 0xa120
movq %rcx, 0x78(%rax)
leaq 0xfd28(%rip), %rax      # 0x11150
movq (%rax), %rax
movq 0x28(%rax), %rax
leaq 0x8d2e(%rip), %rcx      # 0xa164
movq %rcx, 0x88(%rax)
leaq 0xfd0c(%rip), %rax      # 0x11150
movq (%rax), %rax
movq 0x28(%rax), %rax
leaq 0x8dab(%rip), %rcx      # 0xa1fd
movq %rcx, 0x90(%rax)
leaq 0xfcf0(%rip), %rax      # 0x11150
movq (%rax), %rax
movq 0x28(%rax), %rax
leaq 0x8de1(%rip), %rcx      # 0xa24f
movq %rcx, 0xa0(%rax)
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/return5[P]c_ish_one/./src/attack.c
// Function: attackEnemy
int attackEnemy(int *const continue_game) {
	int run_away = 0;
	int ran_away = 0; //returned value of run_away before it is reset. needed for running away from a building.
	int play = 1;
	setPlayerStrings();
	wclear(prompt_win);
	wprintw(prompt_win,"%s",ENEMY->prompt);
	refreshPrompt();
	while (play == 1) {
		playerTurn(&play,&run_away);
		if (play == 1) {
			computerTurn(&play);
		}
	}
	(PLAYER->health > 0) ? (playerAliveReset(&run_away,&ran_away)) : (*continue_game = 0);
	return ran_away;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
movl $0x1, -0x14(%rbp)
callq 0x1540
leaq 0xfc7b(%rip), %rax      # 0x11128
movq (%rax), %rdi
callq 0x1090
leaq 0xfc6c(%rip), %rax      # 0x11128
movq (%rax), %rdi
leaq 0xfc8a(%rip), %rax      # 0x11150
movq (%rax), %rax
movq 0x28(%rax), %rax
movq 0xa0(%rax), %rdx
leaq 0x8def(%rip), %rsi      # 0xa2ca
movb $0x0, %al
callq 0x11a0
callq 0x1830
cmpl $0x1, -0x14(%rbp)
jne 0x150b
leaq -0x14(%rbp), %rdi
leaq -0xc(%rbp), %rsi
callq 0x1860
cmpl $0x1, -0x14(%rbp)
jne 0x1509
leaq -0x14(%rbp), %rdi
callq 0x18f0
jmp 0x14e7
leaq 0xfc36(%rip), %rax      # 0x11148
movq (%rax), %rax
movq 0x28(%rax), %rax
cmpl $0x0, (%rax)
jle 0x152d
leaq -0xc(%rbp), %rdi
leaq -0x10(%rbp), %rsi
callq 0x1980
jmp 0x1537
movq -0x8(%rbp), %rax
movl $0x0, (%rax)
movl -0x10(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/return5[P]c_ish_one/./src/attack.c
// Function: playerTurn
static void playerTurn(int *const play, int *const run_away) {
	if(PLAYER->turn == 0) {
		printAttackPrompt();
		getInput(run_away,play);
	}
	else {
		wclear(prompt_win);
		wprintw(prompt_win,"you lost this turn");
		PLAYER->turn -= 1;
		refreshPrompt();
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq 0xf8d1(%rip), %rax      # 0x11148
movq (%rax), %rax
movq 0x28(%rax), %rax
cmpl $0x0, 0x4(%rax)
jne 0x1898
callq 0x1c50
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x1aa0
jmp 0x18db
leaq 0xf889(%rip), %rax      # 0x11128
movq (%rax), %rdi
callq 0x1090
leaq 0xf87a(%rip), %rax      # 0x11128
movq (%rax), %rdi
leaq 0x8bd4(%rip), %rsi      # 0xa48c
movb $0x0, %al
callq 0x11a0
leaq 0xf882(%rip), %rax      # 0x11148
movq (%rax), %rax
movq 0x28(%rax), %rax
movl 0x4(%rax), %ecx
subl $0x1, %ecx
movl %ecx, 0x4(%rax)
callq 0x1830
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/return5[P]c_ish_one/./src/attack.c
// Function: computerTurn
static void computerTurn(int *const play) {
	if(ENEMY->turn == 0) {
		computerSelection(play);
	}
	else {
		wclear(prompt_win);
		wprintw(prompt_win,"%s lost this turn.\n",ENEMY->name);
		ENEMY->turn -= 1;
		refreshPrompt();
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
leaq 0xf84d(%rip), %rax      # 0x11150
movq (%rax), %rax
movq 0x28(%rax), %rax
cmpl $0x0, 0x4(%rax)
jne 0x191b
movq -0x8(%rbp), %rdi
callq 0x3400
jmp 0x1970
leaq 0xf806(%rip), %rax      # 0x11128
movq (%rax), %rdi
callq 0x1090
leaq 0xf7f7(%rip), %rax      # 0x11128
movq (%rax), %rdi
leaq 0xf815(%rip), %rax      # 0x11150
movq (%rax), %rax
movq 0x28(%rax), %rax
movq 0x38(%rax), %rdx
leaq 0x97a8(%rip), %rsi      # 0xb0f5
movb $0x0, %al
callq 0x11a0
leaq 0xf7f5(%rip), %rax      # 0x11150
movq (%rax), %rax
movq 0x28(%rax), %rax
movl 0x4(%rax), %ecx
subl $0x1, %ecx
movl %ecx, 0x4(%rax)
callq 0x1830
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/return5[P]c_ish_one/./src/attack.c
// Function: playerAliveReset
static void playerAliveReset(int *const run_away, int *const ran_away){
	PLAYER->defense = PLAYER->defense_value;
	PLAYER->defense_up = 0;
	PLAYER->special_count = 0;
	PLAYER->turn = 0;
	*ran_away = *run_away;
	if (*run_away == 0) {
		(previous->type != 1) ? (previous->obj->enemy = 0) : (previous->type = 0);
		score += 10;
		resetTile();
	}
	else {
		previous->tile_temp = previous->tile_set;
		previous->tile_set = 'e';
		*run_away = 0;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq 0xf7b1(%rip), %rax      # 0x11148
movq (%rax), %rax
movq 0x28(%rax), %rax
movl 0x28(%rax), %ecx
leaq 0xf7a0(%rip), %rax      # 0x11148
movq (%rax), %rax
movq 0x28(%rax), %rax
movl %ecx, 0x14(%rax)
leaq 0xf78f(%rip), %rax      # 0x11148
movq (%rax), %rax
movq 0x28(%rax), %rax
movl $0x0, 0x24(%rax)
leaq 0xf77a(%rip), %rax      # 0x11148
movq (%rax), %rax
movq 0x28(%rax), %rax
movl $0x0, 0x8(%rax)
leaq 0xf765(%rip), %rax      # 0x11148
movq (%rax), %rax
movq 0x28(%rax), %rax
movl $0x0, 0x4(%rax)
movq -0x8(%rbp), %rax
movl (%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x1a5a
leaq 0xf743(%rip), %rax      # 0x11150
movq (%rax), %rax
cmpl $0x1, 0xc(%rax)
je 0x1a2d
leaq 0xf733(%rip), %rax      # 0x11150
movq (%rax), %rax
movq 0x30(%rax), %rax
movl $0x0, 0xc(%rax)
jmp 0x1a3e
leaq 0xf71c(%rip), %rax      # 0x11150
movq (%rax), %rax
movl $0x0, 0xc(%rax)
leaq 0xf6eb(%rip), %rax      # 0x11130
movl (%rax), %ecx
addl $0xa, %ecx
leaq 0xf6df(%rip), %rax      # 0x11130
movl %ecx, (%rax)
callq 0x3550
jmp 0x1a8c
leaq 0xf6ef(%rip), %rax      # 0x11150
movq (%rax), %rax
movb 0x20(%rax), %cl
leaq 0xf6e2(%rip), %rax      # 0x11150
movq (%rax), %rax
movb %cl, 0x21(%rax)
leaq 0xf6d5(%rip), %rax      # 0x11150
movq (%rax), %rax
movb $0x65, 0x20(%rax)
movq -0x8(%rbp), %rax
movl $0x0, (%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/return5[P]c_ish_one/./src/attack.c
// Function: getInput
static void getInput(int *const run_away, int *const play) {
	wclear(prompt_win);
	switch(getch()) {
		case '1': attackEnemySelection(PLAYER,ENEMY);
			break;
		case '2': (PLAYER->defense_up == 0) ? raiseDefense(PLAYER) : (playerRetry("sorry,you cant raise your defenses any higher."), getInput(run_away,play));
			break;
		case '3': (PLAYER->special_count == 0) ? useSpecial(PLAYER,ENEMY) : (playerRetry("you cant use your special more than once per fight."), getInput(run_away,play));
			break;
		case '4': 
			*run_away = runAway();
			refreshPrompt();
			break;	
		case '5': (PLAYER->food > 0) ? eatFood() : playerRetry("sorry, you dont have any food to eat.");
			break;
		default: 
			playerRetry("sorry, wrong key pressed. try again."); 
			getInput(run_away,play);
			break;	
	}
	if (PLAYER->health < 1 || ENEMY->health < 1 || *run_away == 1) {
		*play = 0;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq 0xf671(%rip), %rax      # 0x11128
movq (%rax), %rdi
callq 0x1090
movq 0xf50a(%rip), %rax      # 0x10fd0
movq (%rax), %rdi
callq 0x1080
addl $-0x31, %eax
movl %eax, %ecx
movq %rcx, -0x18(%rbp)
subl $0x4, %eax
ja 0x1bf0
movq -0x18(%rbp), %rax
leaq 0x8519(%rip), %rcx      # 0xa004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0xf64d(%rip), %rax      # 0x11148
movq (%rax), %rax
movq 0x28(%rax), %rdi
leaq 0xf647(%rip), %rax      # 0x11150
movq (%rax), %rax
movq 0x28(%rax), %rsi
callq 0x1d00
jmp 0x1c09
leaq 0xf627(%rip), %rax      # 0x11148
movq (%rax), %rax
movq 0x28(%rax), %rax
cmpl $0x0, 0x24(%rax)
jne 0x1b43
leaq 0xf613(%rip), %rax      # 0x11148
movq (%rax), %rax
movq 0x28(%rax), %rdi
callq 0x1e30
jmp 0x1b5c
leaq 0x89fa(%rip), %rdi      # 0xa544
callq 0x1e80
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x1aa0
jmp 0x1c09
leaq 0xf5e0(%rip), %rax      # 0x11148
movq (%rax), %rax
movq 0x28(%rax), %rax
cmpl $0x0, 0x8(%rax)
jne 0x1b98
leaq 0xf5cc(%rip), %rax      # 0x11148
movq (%rax), %rax
movq 0x28(%rax), %rdi
leaq 0xf5c6(%rip), %rax      # 0x11150
movq (%rax), %rax
movq 0x28(%rax), %rsi
callq 0x1ec0
jmp 0x1bb1
leaq 0x89d4(%rip), %rdi      # 0xa573
callq 0x1e80
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x1aa0
jmp 0x1c09
callq 0x1f50
movl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, (%rax)
callq 0x1830
jmp 0x1c09
leaq 0xf57a(%rip), %rax      # 0x11148
movq (%rax), %rax
movq 0x28(%rax), %rax
cmpl $0x0, 0x2c(%rax)
jle 0x1be2
callq 0x2040
jmp 0x1bee
leaq 0x89be(%rip), %rdi      # 0xa5a7
callq 0x1e80
jmp 0x1c09
leaq 0x89d6(%rip), %rdi      # 0xa5cd
callq 0x1e80
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x1aa0
leaq 0xf538(%rip), %rax      # 0x11148
movq (%rax), %rax
movq 0x28(%rax), %rax
cmpl $0x1, (%rax)
jl 0x1c38
leaq 0xf52d(%rip), %rax      # 0x11150
movq (%rax), %rax
movq 0x28(%rax), %rax
cmpl $0x1, (%rax)
jl 0x1c38
movq -0x8(%rbp), %rax
cmpl $0x1, (%rax)
jne 0x1c42
movq -0x10(%rbp), %rax
movl $0x0, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/return5[P]c_ish_one/./src/attack.c
// Function: printAttackPrompt
static void printAttackPrompt() {
	wclear(prompt_win);
	wprintw(prompt_win,"player health is %d, attack is %d, defense is %d, food is %d\n",PLAYER->health,PLAYER->attack,PLAYER->defense,PLAYER->food);
	wprintw(prompt_win,"\tdo you wish to\n\t\t1)attack\n\t\t2)raise defenses\n\t\t3)%s\n\t\t4)run away\n\t\t5)eat some food to recover health\n",PLAYER->special_name);
	wrefresh(prompt_win);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0xf4cd(%rip), %rax      # 0x11128
movq (%rax), %rdi
callq 0x1090
leaq 0xf4be(%rip), %rax      # 0x11128
movq (%rax), %rdi
leaq 0xf4d4(%rip), %rax      # 0x11148
movq (%rax), %rax
movq 0x28(%rax), %rax
movl (%rax), %edx
leaq 0xf4c4(%rip), %rax      # 0x11148
movq (%rax), %rax
movq 0x28(%rax), %rax
movl 0x10(%rax), %ecx
leaq 0xf4b3(%rip), %rax      # 0x11148
movq (%rax), %rax
movq 0x28(%rax), %rax
movl 0x14(%rax), %r8d
leaq 0xf4a1(%rip), %rax      # 0x11148
movq (%rax), %rax
movq 0x28(%rax), %rax
movl 0x2c(%rax), %r9d
leaq 0x87e6(%rip), %rsi      # 0xa49f
movb $0x0, %al
callq 0x11a0
leaq 0xf461(%rip), %rax      # 0x11128
movq (%rax), %rdi
leaq 0xf477(%rip), %rax      # 0x11148
movq (%rax), %rax
movq 0x28(%rax), %rax
movq 0x40(%rax), %rdx
leaq 0x87fa(%rip), %rsi      # 0xa4dd
movb $0x0, %al
callq 0x11a0
leaq 0xf437(%rip), %rax      # 0x11128
movq (%rax), %rdi
callq 0x10c0
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/return5[P]c_ish_one/./src/attack.c
// Function: attackEnemySelection
static void attackEnemySelection(Character *const attacker,Character *const defender) {
	if(getRandInt(10) > defender->chance_to_dodge || defender->turn != 0) {
		(getRandInt(10) > attacker->crit_chance) ? criticalHit(attacker,defender,attacker->critical_hit) : regularHit(attacker,defender,attacker->regular_attack);
	}
	else {
		missed(attacker,defender,attacker->regular_miss);
	}

	switch(attacker->type) {
		case 4:
		case 10:
		case 12: //allows these enemies a second attack
			if(getRandInt(10) > defender->chance_to_dodge) {
				(getRandInt(10) > attacker->crit_chance) ? criticalHit(attacker,defender,attacker->critical_hit_second) : regularHit(attacker,defender,attacker->regular_attack_second);
			}
			else {
				missed(attacker,defender,attacker->regular_miss_second);
			}
			break;
		default: //do nothing
			break;
	}
	refreshPrompt();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0xa, %edi
callq 0x20e0
movq -0x10(%rbp), %rcx
cmpl 0x20(%rcx), %eax
jg 0x1d2d
movq -0x10(%rbp), %rax
cmpl $0x0, 0x4(%rax)
je 0x1d6e
movl $0xa, %edi
callq 0x20e0
movq -0x8(%rbp), %rcx
cmpl 0x18(%rcx), %eax
jle 0x1d57
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rdx
callq 0x2120
jmp 0x1d6c
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rdx
callq 0x21e0
jmp 0x1d83
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x8(%rbp), %rax
movq 0x50(%rax), %rdx
callq 0x22a0
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %eax
movl %eax, -0x14(%rbp)
subl $0x4, %eax
je 0x1da8
jmp 0x1d94
movl -0x14(%rbp), %eax
subl $0xa, %eax
je 0x1da8
jmp 0x1d9e
movl -0x14(%rbp), %eax
subl $0xc, %eax
jne 0x1e16
jmp 0x1da8
movl $0xa, %edi
callq 0x20e0
movq -0x10(%rbp), %rcx
cmpl 0x20(%rcx), %eax
jle 0x1dff
movl $0xa, %edi
callq 0x20e0
movq -0x8(%rbp), %rcx
cmpl 0x18(%rcx), %eax
jle 0x1de8
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x8(%rbp), %rax
movq 0x80(%rax), %rdx
callq 0x2120
jmp 0x1dfd
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rdx
callq 0x21e0
jmp 0x1e14
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rdx
callq 0x22a0
jmp 0x1e18
jmp 0x1e18
callq 0x1830
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/return5[P]c_ish_one/./src/attack.c
// Function: raiseDefense
static void raiseDefense(Character *const attacker) {
	wprintw(prompt_win,"%s\n",attacker->raise_defense);
	attacker->defense += 2;
	attacker->defense_up = 1;
	refreshPrompt();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
leaq 0xf2e5(%rip), %rax      # 0x11128
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x70(%rax), %rdx
leaq 0x879d(%rip), %rsi      # 0xa5f2
movb $0x0, %al
callq 0x11a0
movq -0x8(%rbp), %rax
movl 0x14(%rax), %ecx
addl $0x2, %ecx
movl %ecx, 0x14(%rax)
movq -0x8(%rbp), %rax
movl $0x1, 0x24(%rax)
callq 0x1830
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/return5[P]c_ish_one/./src/attack.c
// Function: useSpecial
static void useSpecial(Character *const attacker,Character *const defender) {
	switch(attacker->type) {
		case 0:playerSpecial();
			break;
		case 1://sowrdsman
		case 2://skeleton
		case 5://archer
		case 11://monster
		case 13://enraged halfling
		case 14://enraged halfling
		case 15://enraged monster
		case 16://enraged monster
		case 17://enraged delmer
		case 18://enraged delmer
		case 12://delmer
			powerAttack(attacker,defender);
			break;
		case 3://slinger
		case 6://spearman
		case 10://halflings
		case 7://four legged beast
			throwOpponent(attacker,defender);
			break;
		case 8://mage
		case 9://scrugg
			defenseDown(attacker,defender);
			break;		
		case 4: theifSpecial();
			break;	
		case 19: bossSpecial();
			break;
		 default: //do nothing
			 break;
	 }
	 refreshPrompt();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %eax
movq %rax, -0x18(%rbp)
subq $0x13, %rax
ja 0x1f37
movq -0x18(%rbp), %rax
leaq 0x812c(%rip), %rcx      # 0xa018
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
callq 0x2a30
jmp 0x1f39
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x2ae0
jmp 0x1f39
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x2c60
jmp 0x1f39
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x2dd0
jmp 0x1f39
callq 0x2f50
jmp 0x1f39
callq 0x30a0
jmp 0x1f39
jmp 0x1f39
callq 0x1830
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/return5[P]c_ish_one/./src/attack.c
// Function: runAway
static int runAway(void) {
	const int check = checkEnragedEnemy();
	if (PLAYER->turn == 0 && check == 0) {
		switch (getRandInt(2)) {
			case 0:
			case 1: 
				wprintw(prompt_win,"you manage to run away from the enemy.\n");
				return 1;
				break;
			case 2: 
				wprintw(prompt_win,"you did not manage to run away from the enemy.\n");
				return 0;
				break;
			default: return 1;
				break;
		}
	}
	else if (check == 1) {
		 wprintw(prompt_win,"you cant run away from an enraged enemy.\n");
		 return 0;
	}
	else {
		 wprintw(prompt_win,"you cant run away while knocked down.\n");
		 return 0;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
callq 0x33c0
movl %eax, -0x8(%rbp)
leaq 0xf1e1(%rip), %rax      # 0x11148
movq (%rax), %rax
movq 0x28(%rax), %rax
cmpl $0x0, 0x4(%rax)
jne 0x1fe5
cmpl $0x0, -0x8(%rbp)
jne 0x1fe5
movl $0x2, %edi
callq 0x20e0
movl %eax, %ecx
movl %ecx, -0xc(%rbp)
subl $0x2, %eax
jb 0x1f9a
jmp 0x1f90
movl -0xc(%rbp), %eax
subl $0x2, %eax
je 0x1fbb
jmp 0x1fdc
leaq 0xf187(%rip), %rax      # 0x11128
movq (%rax), %rdi
leaq 0x9078(%rip), %rsi      # 0xb023
movb $0x0, %al
callq 0x11a0
movl $0x1, -0x4(%rbp)
jmp 0x202b
leaq 0xf166(%rip), %rax      # 0x11128
movq (%rax), %rdi
leaq 0x907f(%rip), %rsi      # 0xb04b
movb $0x0, %al
callq 0x11a0
movl $0x0, -0x4(%rbp)
jmp 0x202b
movl $0x1, -0x4(%rbp)
jmp 0x202b
cmpl $0x1, -0x8(%rbp)
jne 0x200c
leaq 0xf136(%rip), %rax      # 0x11128
movq (%rax), %rdi
leaq 0x907f(%rip), %rsi      # 0xb07b
movb $0x0, %al
callq 0x11a0
movl $0x0, -0x4(%rbp)
jmp 0x202b
leaq 0xf115(%rip), %rax      # 0x11128
movq (%rax), %rdi
leaq 0x9088(%rip), %rsi      # 0xb0a5
movb $0x0, %al
callq 0x11a0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)