LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/comfies[P]custard/src/wm/handlers.c
// Function: handle_window_click
void handle_window_click(xcb_generic_event_t *generic_event) {
    xcb_button_press_event_t *event;
    event = (xcb_button_press_event_t*)generic_event;

    xcb_window_t window_id = event->event;
    log_debug("Window(%08x) clicked", window_id);

    window_t *window;
    if (windows) {
        while ((window = vector_iterator(windows))) {
            // Redirect border window click as necessary
            if (window->parent == window_id) {
                window_id = window->id;
                break;
            }
        }

        reset_vector_iterator(windows);
    }

    if (focused_window == window_id)
        return;

    xcb_window_t previous_window = focused_window;
    focused_window = window_id;

    /* Is the newly focused window managed? */
    if (window_is_managed(focused_window)) {
        window = get_window_by_id(focused_window);
        xcb_ungrab_button(xcb_connection,
            XCB_BUTTON_INDEX_ANY, window_id, XCB_MOD_MASK_ANY);
        raise_window(window->parent);
        decorate(window);
    } else {
        raise_window(window_id);
    }
    focus_window(window_id);

    /* Is the previously focused window managed? */
    if (window_is_managed(previous_window)) {
        window = get_window_by_id(previous_window);
        xcb_grab_button(xcb_connection, 0, previous_window,
            XCB_EVENT_MASK_BUTTON_PRESS,
            XCB_GRAB_MODE_ASYNC, XCB_GRAB_MODE_ASYNC,
            XCB_NONE, XCB_NONE,
            XCB_BUTTON_INDEX_ANY ^ XCB_BUTTON_INDEX_4 ^ XCB_BUTTON_INDEX_5,
            XCB_MOD_MASK_ANY);
        decorate(window);
    }

    apply();
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl 0xc(%rdi), %ebx
leaq 0x21de(%rip), %rsi      # 0x86b0
leaq 0x21e9(%rip), %rdx      # 0x86c2
leaq 0x21f6(%rip), %r8       # 0x86d6
movl $0x3, %edi
movl $0x85, %ecx
movl %ebx, %r9d
xorl %eax, %eax
callq 0x51d6
leaq 0x63ed(%rip), %r14      # 0xc8e8
cmpq $0x0, (%r14)
je 0x651d
movq (%r14), %rdi
callq 0x3849
testq %rax, %rax
je 0x6515
cmpl %ebx, 0x4(%rax)
jne 0x6501
movl (%rax), %ebx
movq (%r14), %rdi
callq 0x387d
leaq 0x63cc(%rip), %r14      # 0xc8f0
movl (%r14), %ebp
cmpl %ebx, %ebp
jne 0x6530
popq %rbx
popq %r14
popq %rbp
retq
movl %ebx, (%r14)
movl %ebx, %edi
callq 0x6d0e
testw %ax, %ax
je 0x6575
movl (%r14), %edi
callq 0x6d20
movq %rax, %r14
leaq 0x63a7(%rip), %rax      # 0xc8f8
movq (%rax), %rdi
xorl %esi, %esi
movl %ebx, %edx
movl $0x8000, %ecx           # imm = 0x8000
callq 0x3500
movl 0x4(%r14), %edi
callq 0x77aa
movq %r14, %rdi
callq 0x5882
jmp 0x657c
movl %ebx, %edi
callq 0x77aa
movl %ebx, %edi
callq 0x7710
movl %ebp, %edi
callq 0x6d0e
testw %ax, %ax
je 0x65d4
movl %ebp, %edi
callq 0x6d20
movq %rax, %rbx
leaq 0x6358(%rip), %rax      # 0xc8f8
movq (%rax), %rdi
xorl %eax, %eax
xorl %esi, %esi
movl %ebp, %edx
movl $0x4, %ecx
movl $0x1, %r8d
movl $0x1, %r9d
pushq $0x8000                 # imm = 0x8000
pushq $0x1
pushq %rax
pushq %rax
callq 0x3360
addq $0x20, %rsp
movq %rbx, %rdi
callq 0x5882
popq %rbx
popq %r14
popq %rbp
jmp 0x741f
// File: /workspace/github_c_makefile_star2_O3/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 0x6d0e
testw %ax, %ax
je 0x65f4
movl %ebx, %edi
callq 0x7132
leaq 0x62f5(%rip), %rax      # 0xc8f0
cmpl %ebx, (%rax)
jne 0x6605
movl $0x0, (%rax)
popq %rbx
jmp 0x741f
// File: /workspace/github_c_makefile_star2_O3/comfies[P]custard/src/wm/handlers.c
// Function: handle_map_request
void handle_map_request(xcb_generic_event_t *generic_event) {
    xcb_map_request_event_t *event;
    event = (xcb_map_request_event_t*)generic_event;

    xcb_window_t window_id = event->window;

    xcb_window_t previously_focused_window = focused_window;
    focused_window = window_id;

    map_window(window_id);

    window_t *window = NULL;
    if (window_should_be_managed(window_id))
        window = manage_window(window_id);

    if (window) {
        raise_window(window->parent);
        decorate(window);
    } else {
        raise_window(window_id);
    }
    focus_window(window_id);

    if (window_is_managed(previously_focused_window)) {
        window = get_window_by_id(previously_focused_window);
        xcb_grab_button(xcb_connection, 0, previously_focused_window,
            XCB_EVENT_MASK_BUTTON_PRESS,
            XCB_GRAB_MODE_ASYNC, XCB_GRAB_MODE_ASYNC,
            XCB_NONE, XCB_NONE,
            XCB_BUTTON_INDEX_ANY ^ XCB_BUTTON_INDEX_4 ^ XCB_BUTTON_INDEX_5,
            XCB_MOD_MASK_ANY);
        decorate(window);
    }

    apply();
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl 0x8(%rdi), %ebp
leaq 0x62d7(%rip), %rax      # 0xc8f0
movl (%rax), %ebx
movl %ebp, (%rax)
movl %ebp, %edi
callq 0x7694
movl %ebp, %edi
callq 0x6bec
testw %ax, %ax
je 0x6651
movl %ebp, %edi
callq 0x6d80
testq %rax, %rax
je 0x6651
movq %rax, %r14
movl 0x4(%rax), %edi
callq 0x77aa
movq %r14, %rdi
callq 0x5882
jmp 0x6658
movl %ebp, %edi
callq 0x77aa
movl %ebp, %edi
callq 0x7710
movl %ebx, %edi
callq 0x6d0e
testw %ax, %ax
je 0x66b0
movl %ebx, %edi
callq 0x6d20
movq %rax, %r14
leaq 0x627c(%rip), %rax      # 0xc8f8
movq (%rax), %rdi
xorl %eax, %eax
xorl %esi, %esi
movl %ebx, %edx
movl $0x4, %ecx
movl $0x1, %r8d
movl $0x1, %r9d
pushq $0x8000                 # imm = 0x8000
pushq $0x1
pushq %rax
pushq %rax
callq 0x3360
addq $0x20, %rsp
movq %r14, %rdi
callq 0x5882
popq %rbx
popq %r14
popq %rbp
jmp 0x741f
// File: /workspace/github_c_makefile_star2_O3/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 0x6255(%rip), %r15      # 0xc920
movq (%r15), %rcx
cmpl 0x58(%rcx), %eax
jne 0x66f2
movl %ebx, %edi
callq 0x6d0e
testw %ax, %ax
je 0x66e6
movl %ebx, %edi
callq 0x7132
movl %ebx, %edi
popq %rbx
popq %r14
popq %r15
jmp 0x78aa
cmpl 0x84(%rcx), %eax
jne 0x675d
movq %rdi, %r14
movl %ebx, %edi
callq 0x6d0e
testw %ax, %ax
je 0x675d
movl %ebx, %edi
callq 0x6d20
movl 0x10(%r14), %ecx
movq (%r15), %rdx
cmpl 0x128(%rdx), %ecx
jne 0x675d
movl 0xc(%r14), %ecx
cmpl $0x2, %ecx
jne 0x6732
xorl %ecx, %ecx
cmpw $0x0, 0x20(%rax)
sete %cl
movw %cx, 0x20(%rax)
testw %cx, %cx
je 0x6763
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 0x79e5
jmp 0x676f
popq %rbx
popq %r14
popq %r15
retq
movq 0x8(%rax), %rsi
movq %rax, %rdi
callq 0x7052
popq %rbx
popq %r14
popq %r15
jmp 0x741f
// File: /workspace/github_c_makefile_star2_O3/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 0x1f7c(%rip), %rcx      # 0x8705
leaq 0x1f85(%rip), %r8       # 0x8715
cmoveq %rcx, %r8
leal 0xb9(,%rax,2), %ecx
leaq 0x1f0e(%rip), %rsi      # 0x86b0
leaq 0x1f42(%rip), %rdx      # 0x86eb
movl $0x2, %edi
xorl %eax, %eax
callq 0x51d6
leaq 0x6114(%rip), %rax      # 0xc8d0
movw $0x0, (%rax)
callq 0x5390
xorl %edi, %edi
callq 0x3630
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/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 0x5f43(%rip), %rdi      # 0xc8d8
callq 0x3849
movq %rax, %rbx
testq %rax, %rax
je 0x69bd
movq (%rbx), %rdi
movq %r14, %rsi
callq 0x3370
testl %eax, %eax
jne 0x698e
movq 0x5f20(%rip), %rdi      # 0xc8d8
callq 0x387d
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x5f21(%rip), %rbx      # 0xc8f8
movq (%rbx), %rdi
leaq 0x5f1f(%rip), %rax      # 0xc900
movq (%rax), %rax
movl (%rax), %esi
callq 0x3380
movq (%rbx), %rdi
xorl %ebx, %ebx
movl %eax, %esi
xorl %edx, %edx
callq 0x33a0
movq 0x5ed8(%rip), %rdi      # 0xc8d8
cmpl $0x0, 0xc(%rdi)
je 0x6a62
movq %rax, %r14
xorps %xmm0, %xmm0
xorl %ebp, %ebp
movaps %xmm0, (%rsp)
movl %ebp, %esi
callq 0x386b
movq 0x8(%rax), %rcx
movsd 0x8(%rcx), %xmm0
addps (%rsp), %xmm0
movswl 0x10(%r14), %ecx
xorps %xmm1, %xmm1
cvtsi2ss %ecx, %xmm1
movaps %xmm0, %xmm2
shufps $0x55, %xmm0, %xmm2     # xmm2 = xmm2[1,1],xmm0[1,1]
ucomiss %xmm1, %xmm2
jbe 0x6a4f
movswl 0x12(%r14), %ecx
xorps %xmm1, %xmm1
cvtsi2ss %ecx, %xmm1
ucomiss %xmm1, %xmm0
ja 0x6a5f
incl %ebp
movq 0x5e80(%rip), %rdi      # 0xc8d8
cmpl 0xc(%rdi), %ebp
jb 0x6a0e
jmp 0x6a62
movq %rax, %rbx
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/comfies[P]custard/src/wm/rules.c
// Function: create_or_get_rule
rule_t *create_or_get_rule(window_attribute_t attribute, char *expression) {
    rule_t *rule;

    if (rules) {
        while ((rule = vector_iterator(rules))) {
            if (!strcmp(rule->expression, expression) &&
                rule->attribute == attribute) {
                reset_vector_iterator(rules);
                return rule;
            }
        }
    }

    rule = (rule_t*)calloc(1, sizeof(rule_t));

    rule->expression = (char*)calloc(1, sizeof(char));
    strcpy(rule->expression, expression);

    rule->attribute = attribute;
    rule->rules = NULL;

    return rule;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movl %edi, %ebx
movq 0x5e5f(%rip), %rdi      # 0xc8e0
testq %rdi, %rdi
je 0x6abc
callq 0x3849
testq %rax, %rax
je 0x6abc
movq %rax, %r15
movq (%r15), %rdi
movq %r14, %rsi
callq 0x3370
testl %eax, %eax
jne 0x6aa8
cmpl %ebx, 0x8(%r15)
je 0x6af8
movq 0x5e31(%rip), %rdi      # 0xc8e0
callq 0x3849
movq %rax, %r15
testq %rax, %rax
jne 0x6a93
movl $0x1, %edi
movl $0x18, %esi
callq 0x3340
movq %rax, %r15
movl $0x1, %edi
movl $0x1, %esi
callq 0x3340
movq %rax, (%r15)
movq %rax, %rdi
movq %r14, %rsi
callq 0x30e0
movl %ebx, 0x8(%r15)
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
movq 0x5de1(%rip), %rdi      # 0xc8e0
callq 0x387d
jmp 0x6aef
// File: /workspace/github_c_makefile_star2_O3/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, 0x5dce(%rip)      # 0xc8e0
je 0x6b31
movq 0x5dc5(%rip), %rdi      # 0xc8e0
callq 0x3849
cmpq %rbx, %rax
je 0x6b2a
testq %rax, %rax
jne 0x6b14
testq %rax, %rax
je 0x6b42
popq %rbx
retq
callq 0x3818
movq %rax, %rdi
movq %rax, 0x5da0(%rip)      # 0xc8e0
jmp 0x6b49
movq 0x5d97(%rip), %rdi      # 0xc8e0
movq %rbx, %rsi
popq %rbx
jmp 0x3884
// File: /workspace/github_c_makefile_star2_O3/comfies[P]custard/src/wm/rules.c
// Function: expression_matches
unsigned short expression_matches(char *expression, char *subject) {
    pcre *compiled;
    pcre_extra *optimized;

    const char *error;
    int offset;

    if (!(compiled = pcre_compile(expression, PCRE_UTF8, &error, &offset,
        NULL)))
        return 0;

    optimized = pcre_study(compiled, 0, &error);

    int return_value = pcre_exec(compiled, optimized, subject, strlen(subject),
        0, 0, NULL, 0);

    if (optimized) pcre_free_study(optimized);
    pcre_free(compiled);

    if (return_value < 0)
        return 0;

    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
xorl %r15d, %r15d
leaq 0x8(%rsp), %rdx
leaq 0x14(%rsp), %rcx
movl $0x800, %esi            # imm = 0x800
xorl %r8d, %r8d
callq 0x3430
testq %rax, %rax
je 0x6bdd
movq %rax, %rbx
leaq 0x8(%rsp), %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0x3530
movq %rax, %r15
movq %r14, %rdi
callq 0x31f0
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
movl %eax, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq $0x0
pushq $0x0
callq 0x32b0
addq $0x10, %rsp
movl %eax, %ebp
testq %r15, %r15
je 0x6bc8
movq %r15, %rdi
callq 0x34b0
movq 0x5411(%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_O3/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 0x5bd6(%rip), %rax      # 0xc900
movq (%rax), %rax
cmpl %edi, (%rax)
jne 0x6d3d
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movl %edi, %ebp
xorl %ebx, %ebx
testl %edi, %edi
je 0x6d33
leaq 0x5bcc(%rip), %rax      # 0xc918
cmpl %ebp, (%rax)
je 0x6d33
cmpq $0x0, 0x5b90(%rip)      # 0xc8e8
je 0x6d33
movq 0x5b87(%rip), %rdi      # 0xc8e8
callq 0x3849
testq %rax, %rax
je 0x6d31
movq %rax, %rbx
cmpl %ebp, (%rax)
jne 0x6d5a
movq 0x5b6f(%rip), %rdi      # 0xc8e8
callq 0x387d
jmp 0x6d33
// File: /workspace/github_c_makefile_star2_O3/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 0x70a1
movq 0x10(%rax), %rdi
testq %rdi, %rdi
je 0x70a1
leaq 0x114b(%rip), %rsi      # 0x81c5
callq 0x4de5
testq %rax, %rax
je 0x70a1
movq %rax, %r15
movq (%rax), %rdi
callq 0x6987
testq %rax, %rax
je 0x70a1
movq (%r15), %rdi
callq 0x6987
testq %rax, %rax
jne 0x70a6
callq 0x69c8
cmpw $0x0, 0x22(%rbx)
jne 0x70bb
movq %r14, %rdi
movq %rax, %rsi
callq 0x5fd3
movq %rax, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5798
cvttss2si 0x8(%r14), %rcx
movl (%rbx), %edi
cvttss2si 0xc(%r14), %r8
xorl %esi, %esi
xorl %edx, %edx
callq 0x79e5
cvttss2si (%r14), %rsi
cvttss2si 0x4(%r14), %rdx
cvttss2si 0x8(%r14), %rcx
movl 0x4(%rbx), %edi
cvttss2si 0xc(%r14), %r8
callq 0x79e5
movq %r14, %rdi
callq 0x3060
movl (%rbx), %r9d
leaq 0x1639(%rip), %rsi      # 0x8747
leaq 0x167e(%rip), %rdx      # 0x8793
leaq 0x168b(%rip), %r8       # 0x87a7
movl $0x3, %edi
movl $0xfe, %ecx
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0x51d6
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r14
pushq %rbx
movl %edi, %ebx
movq 0x57a9(%rip), %rdi      # 0xc8e8
cmpl $0x0, 0xc(%rdi)
je 0x7160
xorl %ebp, %ebp
movl %ebp, %esi
callq 0x386b
cmpl %ebx, (%rax)
je 0x7165
incl %ebp
movq 0x578d(%rip), %rdi      # 0xc8e8
cmpl 0xc(%rdi), %ebp
jb 0x7147
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
movq 0x5779(%rip), %rdi      # 0xc8e8
movl %ebp, %esi
callq 0x38cb
leaq 0x577b(%rip), %rax      # 0xc8f8
movq (%rax), %rdi
movl 0x4(%r14), %esi
callq 0x3070
movq %r14, %rdi
callq 0x3060
leaq 0x15af(%rip), %rsi      # 0x8747
leaq 0x15cd(%rip), %rdx      # 0x876c
leaq 0x15d6(%rip), %r8       # 0x877c
movl $0x3, %edi
movl $0xd4, %ecx
movl %ebx, %r9d
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x51d6
// File: /workspace/github_c_makefile_star2_O3/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:
movq 0x10(%rdi), %rax
testq %rax, %rax
je 0x71d0
movq 0x10(%rax), %rdi
jmp 0x4e30
leaq 0x56e9(%rip), %rax      # 0xc8c0
movq (%rax), %rdi
jmp 0x4de5
nop
// File: /workspace/github_c_makefile_star2_O3/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:
testl %esi, %esi
je 0x7205
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
leaq 0x117a(%rip), %rsi      # 0x8372
callq 0x4e30
cmpl %ebp, (%rax)
jae 0x7206
popq %rbx
popq %r14
popq %rbp
retq
movl %ebp, 0x20(%rbx)
leaq 0x56d8(%rip), %r14      # 0xc8e8
movq (%r14), %rdi
callq 0x3849
testq %rax, %rax
je 0x7201
cmpq %rbx, 0x18(%rax)
jne 0x7210
movl 0x20(%rbx), %ecx
movl 0x4(%rax), %edi
cmpl 0x24(%rax), %ecx
jne 0x7235
callq 0x7694
jmp 0x7210
callq 0x76d2
jmp 0x7210
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %edi, %ebx
leaq 0x8(%rsp), %rax
movq $0x1, (%rax)
leaq 0x51ca(%rip), %r14      # 0xc8f8
movq (%r14), %rdi
leaq 0x51e8(%rip), %r15      # 0xc920
movq (%r15), %rcx
movl 0x84(%rcx), %ecx
xorl %esi, %esi
movl %ebx, %edx
movl %ecx, %r8d
movl $0x20, %r9d
pushq %rax
pushq $0x2
callq 0x3660
addq $0x10, %rsp
movq (%r14), %rdi
movl $0x1, %esi
movl %ebx, %edx
xorl %ecx, %ecx
callq 0x3600
movq (%r15), %rdi
xorl %esi, %esi
movl %ebx, %edx
callq 0x3110
leaq 0x1142(%rip), %rsi      # 0x88c0
leaq 0x11ac(%rip), %rdx      # 0x8931
leaq 0x11b2(%rip), %r8       # 0x893e
movl $0x3, %edi
movl $0x2a, %ecx
movl %ebx, %r9d
xorl %eax, %eax
callq 0x51d6
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
leaq 0x4(%rsp), %rcx
movl $0x0, (%rcx)
leaq 0x5136(%rip), %rax      # 0xc8f8
movq (%rax), %rdi
movl %ebx, %esi
movl $0x40, %edx
callq 0x3300
leaq 0x10e8(%rip), %r14      # 0x88c0
leaq 0x10f2(%rip), %rdx      # 0x88d1
leaq 0x10fc(%rip), %r8       # 0x88e2
movl $0x3, %edi
movq %r14, %rsi
movl $0xd, %ecx
movl %ebx, %r9d
xorl %eax, %eax
callq 0x51d6
leaq 0x114f(%rip), %rdx      # 0x8953
leaq 0x1155(%rip), %r8       # 0x8960
movl $0x3, %edi
movq %r14, %rsi
movl $0x35, %ecx
movl %ebx, %r9d
xorl %eax, %eax
callq 0x51d6
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
leaq 0x4(%rsp), %rcx
movl $0x1, (%rcx)
leaq 0x50b6(%rip), %rax      # 0xc8f8
movq (%rax), %rdi
movl %ebx, %esi
movl $0x40, %edx
callq 0x3300
leaq 0x1068(%rip), %r14      # 0x88c0
leaq 0x1072(%rip), %rdx      # 0x88d1
leaq 0x107c(%rip), %r8       # 0x88e2
movl $0x3, %edi
movq %r14, %rsi
movl $0xd, %ecx
movl %ebx, %r9d
xorl %eax, %eax
callq 0x51d6
leaq 0x10f0(%rip), %rdx      # 0x8974
leaq 0x10f6(%rip), %r8       # 0x8981
movl $0x3, %edi
movq %r14, %rsi
movl $0x40, %ecx
movl %ebx, %r9d
xorl %eax, %eax
callq 0x51d6
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r8d, %ebx
movl %ecx, %r14d
movl %edx, %r12d
movl %esi, %r15d
movl %edi, %ebp
movq %rsp, %rcx
movl %esi, (%rcx)
movl %edx, 0x4(%rcx)
movl %r8d, 0x8(%rcx)
movl %r14d, 0xc(%rcx)
leaq 0x4ee0(%rip), %rax      # 0xc8f8
movq (%rax), %rdi
movl %ebp, %esi
movl $0xf, %edx
callq 0x3300
leaq 0xe92(%rip), %r13       # 0x88c0
leaq 0xe9c(%rip), %rdx       # 0x88d1
leaq 0xea6(%rip), %r8        # 0x88e2
movl $0x3, %edi
movq %r13, %rsi
movl $0xd, %ecx
movl %ebp, %r9d
xorl %eax, %eax
callq 0x51d6
leaq 0xfa1(%rip), %rdx       # 0x89fb
leaq 0xfb1(%rip), %r8        # 0x8a12
movl $0x3, %edi
movq %r13, %rsi
movl $0x7d, %ecx
movl %ebp, %r9d
xorl %eax, %eax
pushq %r12
pushq %r15
pushq %r14
pushq %rbx
callq 0x51d6
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 %rax
movl $0xa8, %edi
callq 0x1160
leaq 0x5de6(%rip), %rcx      # 0x70c4
movq %rcx, 0x38(%rax)
movaps 0x5d27(%rip), %xmm0     # 0x7010
movups %xmm0, (%rax)
movq $0x6, 0x20(%rax)
movaps 0x5d25(%rip), %xmm0     # 0x7020
movups %xmm0, 0x10(%rax)
leaq 0xbe3a(%rip), %rcx      # 0xd140
movq (%rcx), %rcx
movq %rax, 0x28(%rcx)
movl $0x1, 0xc(%rcx)
leaq 0x5dba(%rip), %rcx      # 0x70d5
movq %rcx, 0x48(%rax)
leaq 0x5dd7(%rip), %rcx      # 0x70fd
movq %rcx, 0x50(%rax)
leaq 0x5ded(%rip), %rcx      # 0x711e
movq %rcx, 0x68(%rax)
leaq 0x5e06(%rip), %rcx      # 0x7142
movq %rcx, 0x70(%rax)
leaq 0x5e35(%rip), %rcx      # 0x717c
movq %rcx, 0x78(%rax)
leaq 0x5e6e(%rip), %rcx      # 0x71c0
movq %rcx, 0x88(%rax)
leaq 0x5ef9(%rip), %rcx      # 0x7259
movq %rcx, 0x90(%rax)
leaq 0x5f3d(%rip), %rcx      # 0x72ab
movq %rcx, 0xa0(%rax)
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r14
pushq %rbx
pushq %rax
leaq 0xb72b(%rip), %rbx      # 0xd118
movq (%rbx), %rdi
callq 0x1090
movq (%rbx), %rdi
leaq 0xb739(%rip), %r14      # 0xd138
movq (%r14), %rax
movq 0x28(%rax), %rax
movl (%rax), %edx
movl 0x10(%rax), %ecx
movl 0x14(%rax), %r8d
movl 0x2c(%rax), %r9d
leaq 0x5abf(%rip), %rsi      # 0x74d9
xorl %eax, %eax
callq 0x1190
movq (%rbx), %rdi
movq (%r14), %rax
movq 0x28(%rax), %rax
movq 0x40(%rax), %rdx
leaq 0x5ae1(%rip), %rsi      # 0x7517
xorl %eax, %eax
callq 0x1190
movq (%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x10d0
// File: /workspace/github_c_makefile_star2_O3/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 %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x11c0
cmpl $0x7ffffffd, %eax       # imm = 0x7FFFFFFD
jg 0x1a56
cltq
imulq $0x2c000001, %rax, %rax # imm = 0x2C000001
movq %rax, %rcx
shrq $0x3f, %rcx
sarq $0x39, %rax
addl %ecx, %eax
cmpl 0x20(%rbx), %eax
jg 0x1a83
cmpl $0x0, 0x4(%rbx)
je 0x1acb
callq 0x11c0
cmpl $0x7ffffffd, %eax       # imm = 0x7FFFFFFD
jg 0x1a83
cltq
imulq $0x2c000001, %rax, %rax # imm = 0x2C000001
movq %rax, %rcx
shrq $0x3f, %rcx
sarq $0x39, %rax
addl %ecx, %eax
movl 0x10(%r14), %edi
cmpl 0x18(%r14), %eax
jle 0x1abd
movq 0x78(%r14), %rdx
movq %rbx, %rsi
callq 0x1f13
jmp 0x1ada
movq 0x48(%r14), %rdx
movq %rbx, %rsi
callq 0x1f83
jmp 0x1ada
movq 0x50(%r14), %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1ff7
movl 0x1c(%r14), %eax
cmpl $0xc, %eax
ja 0x1b76
movl $0x1410, %ecx           # imm = 0x1410
btl %eax, %ecx
jae 0x1b76
callq 0x11c0
cmpl $0x7ffffffd, %eax       # imm = 0x7FFFFFFD
jg 0x1af5
cltq
imulq $0x2c000001, %rax, %rax # imm = 0x2C000001
movq %rax, %rcx
shrq $0x3f, %rcx
sarq $0x39, %rax
addl %ecx, %eax
cmpl 0x20(%rbx), %eax
jle 0x1b59
callq 0x11c0
cmpl $0x7ffffffd, %eax       # imm = 0x7FFFFFFD
jg 0x1b1c
cltq
imulq $0x2c000001, %rax, %rax # imm = 0x2C000001
movq %rax, %rcx
shrq $0x3f, %rcx
sarq $0x39, %rax
addl %ecx, %eax
movl 0x10(%r14), %edi
cmpl 0x18(%r14), %eax
jle 0x1b6a
movq 0x80(%r14), %rdx
movq %rbx, %rsi
callq 0x1f13
jmp 0x1b76
movq 0x60(%r14), %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1ff7
jmp 0x1b76
movq 0x58(%r14), %rdx
movq %rbx, %rsi
callq 0x1f83
leaq 0xb59b(%rip), %rax      # 0xd118
movq (%rax), %rdi
callq 0x10d0
movq 0xb444(%rip), %rax      # 0xcfd0
movq (%rax), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1080
// File: /workspace/github_c_makefile_star2_O3/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 %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xb56f(%rip), %r14      # 0xd118
movq (%r14), %rdi
movq 0x70(%rbx), %rdx
leaq 0x5a75(%rip), %rsi      # 0x762c
xorl %eax, %eax
callq 0x1190
addl $0x2, 0x14(%rbx)
movl $0x1, 0x24(%rbx)
movq (%r14), %rdi
callq 0x10d0
movq 0xb3f8(%rip), %rax      # 0xcfd0
movq (%rax), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1080
// File: /workspace/github_c_makefile_star2_O3/return5[P]c_ish_one/./src/attack.c
// Function: criticalHit
static void criticalHit(Character *const attacker,Character *const enemy, const char *const str) {
	const int damage = (attacker->attack - enemy->defense > 0) ? (attacker->attack - enemy->defense) + 2 : 3;
	enemy->health -= damage;
	if(checkIfHealthIsHalf(enemy) == 0) {
		char *str1 = malloc(sizeof(char) * sizeof(str) + 5);
		sprintf(str1,str,damage);
		wprintw(prompt_win,"%s\n",str1);
		free(str1);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subl 0x14(%rsi), %edi
leal 0x2(%rdi), %eax
testl %edi, %edi
movl $0x3, %ebx
cmovgl %eax, %ebx
movq %rdx, %r14
subl %ebx, (%rsi)
movq %rsi, %rdi
callq 0x2077
testl %eax, %eax
je 0x1f3f
popq %rbx
popq %r14
popq %r15
retq
movl $0xd, %edi
callq 0x1160
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
movl %ebx, %edx
xorl %eax, %eax
callq 0x1180
leaq 0xb1b6(%rip), %rax      # 0xd118
movq (%rax), %rdi
leaq 0x56c0(%rip), %rsi      # 0x762c
movq %r15, %rdx
xorl %eax, %eax
callq 0x1190
movq %r15, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O3/return5[P]c_ish_one/./src/attack.c
// Function: regularHit
static void regularHit(Character *const attacker,Character *const defender, const char *const str) {
	const int damage = (attacker->attack - defender->defense > 0) ? attacker->attack - defender->defense : 1;
	defender->health -= damage;
	if(defender->type == 11 || checkIfHealthIsHalf(defender) == 0) {
		char *str1 = malloc(sizeof(char) * sizeof(str) + 5);
		sprintf(str1,str,damage);
		wprintw(prompt_win,"%s\n",str1);
		free(str1);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subl 0x14(%rsi), %edi
cmpl $0x2, %edi
movl $0x1, %ebx
cmovgel %edi, %ebx
subl %ebx, (%rsi)
movq %rdx, %r14
cmpl $0xb, 0x1c(%rsi)
je 0x1fb3
movq %rsi, %rdi
callq 0x2077
testl %eax, %eax
je 0x1fb3
popq %rbx
popq %r14
popq %r15
retq
movl $0xd, %edi
callq 0x1160
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
movl %ebx, %edx
xorl %eax, %eax
callq 0x1180
leaq 0xb142(%rip), %rax      # 0xd118
movq (%rax), %rdi
leaq 0x564c(%rip), %rsi      # 0x762c
movq %r15, %rdx
xorl %eax, %eax
callq 0x1190
movq %r15, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O3/return5[P]c_ish_one/./src/attack.c
// Function: throwOpponent
static void throwOpponent(Character *const attacker,Character *const defender) {
	switch(defender->type) {
		case 4://thief
		case 5://archer
		case 11://monster
		case 12://delmer
			//throws dont work on these guys
			wprintw(prompt_win,"%s\n",defender->special_fail);
			attacker->health -= 2;
			break;
		case 13://enraged halflings
		case 14://enraged halflings
		case 15://enraged monster
		case 16://enraged monster
		case 17://enraged delmer
		case 18://enraged delmer
				// throws dont work on enraged enemies
				wprintw(prompt_win,"%s\n",defender->special_fail);
				attacker->health -= 4;
			break;
		case 19: 
			wprintw(prompt_win,"%s\n",throwBoss()); //special throw against boss
			break;
		default: //against any other enemy
			if(getRandInt(10) > defender->chance_to_dodge) {
				wprintw(prompt_win,"%s\n",attacker->special_attack);
				defender->turn += 2;
				defender->health -= 2;
				attacker->special_count += 1;
			}
			else {
			wprintw(prompt_win,"%s\n",attacker->special_attack_miss);
			}
			break;
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl 0x1c(%rsi), %eax
cmpl $0x13, %eax
ja 0x268d
movl $0x7e000, %ecx          # imm = 0x7E000
btl %eax, %ecx
jae 0x25e9
leaq 0xab4c(%rip), %rax      # 0xd118
movq (%rax), %rdi
movq 0x98(%r14), %rdx
leaq 0x504f(%rip), %rsi      # 0x762c
xorl %eax, %eax
callq 0x1190
addl $-0x4, (%rbx)
jmp 0x2615
movl $0x1830, %ecx           # imm = 0x1830
btl %eax, %ecx
jae 0x261d
leaq 0xab1e(%rip), %rax      # 0xd118
movq (%rax), %rdi
movq 0x98(%r14), %rdx
leaq 0x5021(%rip), %rsi      # 0x762c
xorl %eax, %eax
callq 0x1190
addl $-0x2, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
cmpl $0x13, %eax
jne 0x268d
leaq 0xaaef(%rip), %rax      # 0xd118
movq (%rax), %rbx
callq 0x11c0
cmpl $0x7ffffffd, %eax       # imm = 0x7FFFFFFD
jg 0x262c
cltq
imulq $0x2c000001, %rax, %rcx # imm = 0x2C000001
movq %rcx, %rax
shrq $0x3f, %rax
sarq $0x39, %rcx
addl %eax, %ecx
leaq 0xaaeb(%rip), %rax      # 0xd140
movq (%rax), %rax
movq 0x28(%rax), %rax
cmpl 0x20(%rax), %ecx
jle 0x26ee
addl $-0x2, (%rax)
movl $0x2, 0x4(%rax)
leaq 0xaac2(%rip), %rax      # 0xd138
movq (%rax), %rax
movq 0x28(%rax), %rax
movl $0x1, 0x8(%rax)
leaq 0x584e(%rip), %rdx      # 0x7ed9
jmp 0x26f5
callq 0x11c0
cmpl $0x7ffffffd, %eax       # imm = 0x7FFFFFFD
jg 0x268d
cltq
imulq $0x2c000001, %rax, %rax # imm = 0x2C000001
movq %rax, %rcx
shrq $0x3f, %rcx
sarq $0x39, %rax
addl %ecx, %eax
leaq 0xaa62(%rip), %rcx      # 0xd118
movq (%rcx), %rdi
cmpl 0x20(%r14), %eax
jle 0x2701
movq 0x88(%rbx), %rdx
leaq 0x4f5f(%rip), %rsi      # 0x762c
xorl %eax, %eax
callq 0x1190
movq (%r14), %xmm0
paddd 0x495f(%rip), %xmm0     # 0x7040
movq %xmm0, (%r14)
incl 0x8(%rbx)
jmp 0x2615
leaq 0x5854(%rip), %rdx      # 0x7f49
leaq 0x4f30(%rip), %rsi      # 0x762c
movq %rbx, %rdi
jmp 0x270f
movq 0x90(%rbx), %rdx
leaq 0x4f1d(%rip), %rsi      # 0x762c
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1190
// File: /workspace/github_c_makefile_star2_O3/return5[P]c_ish_one/./src/attack.c
// Function: defenseDown
static void defenseDown(Character *const attacker,Character *const defender) {
	switch(defender->type) {
		case 2://skeleton
		case 6://spearman
		case 8://mage
		case 9://scrugg
			//spell doesnt work against these enemy types
			wprintw(prompt_win,"%s\n",defender->special_fail);
			attacker->health -= 2;
			break;
		case 13://enraged halfling
		case 14://enraged halfling
		case 15://enraged monster
		case 16://enraged monster
		case 17://enraged delmer
		case 18://enraged delmer
			//spells dont work on enraged monsters
			wprintw(prompt_win,"%s\n",defender->special_fail);
			attacker->health -= 4;
			break;
		case 19: wprintw(prompt_win,"%s\n",defensedownBoss()); //defense down against boss
			break;
		default: // against any other type of enemy.
			if(getRandInt(10) > defender->chance_to_dodge) {
				wprintw(prompt_win,"%s\n",attacker->special_attack);
				defender->defense -= 3;
				if(defender->defense < 0) {
					defender->defense = 0;
				}
				attacker->special_count += 1;
			}
			else {
				wprintw(prompt_win,"%s\n",attacker->special_attack_miss);
			}
			break;
	}
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movl 0x1c(%rsi), %eax
cmpl $0x13, %eax
ja 0x27fc
movl $0x7e000, %ecx          # imm = 0x7E000
btl %eax, %ecx
jae 0x2761
leaq 0xa9d4(%rip), %rax      # 0xd118
movq (%rax), %rdi
movq 0x98(%r14), %rdx
leaq 0x4ed7(%rip), %rsi      # 0x762c
xorl %eax, %eax
callq 0x1190
addl $-0x4, (%rbx)
jmp 0x278d
movl $0x344, %ecx            # imm = 0x344
btl %eax, %ecx
jae 0x2792
leaq 0xa9a6(%rip), %rax      # 0xd118
movq (%rax), %rdi
movq 0x98(%r14), %rdx
leaq 0x4ea9(%rip), %rsi      # 0x762c
xorl %eax, %eax
callq 0x1190
addl $-0x2, (%rbx)
popq %rbx
popq %r14
popq %rbp
retq
cmpl $0x13, %eax
jne 0x27fc
leaq 0xa97a(%rip), %rax      # 0xd118
movq (%rax), %rbx
callq 0x11c0
cmpl $0x7ffffffd, %eax       # imm = 0x7FFFFFFD
jg 0x27a1
cltq
imulq $0x2c000001, %rax, %rax # imm = 0x2C000001
movq %rax, %rcx
shrq $0x3f, %rcx
sarq $0x39, %rax
addl %ecx, %eax
leaq 0xa976(%rip), %rcx      # 0xd140
movq (%rcx), %rcx
movq 0x28(%rcx), %rcx
cmpl 0x20(%rcx), %eax
jle 0x285e
leaq 0xa957(%rip), %rax      # 0xd138
movq (%rax), %rax
movq 0x28(%rax), %rax
addl $0x2, 0x10(%rax)
movl $0x1, 0x8(%rax)
leaq 0x5795(%rip), %rdx      # 0x7f8f
jmp 0x2865
callq 0x11c0
cmpl $0x7ffffffd, %eax       # imm = 0x7FFFFFFD
jg 0x27fc
cltq
imulq $0x2c000001, %rax, %rax # imm = 0x2C000001
movq %rax, %rcx
shrq $0x3f, %rcx
sarq $0x39, %rax
addl %ecx, %eax
leaq 0xa8f3(%rip), %rcx      # 0xd118
movq (%rcx), %rdi
cmpl 0x20(%r14), %eax
jle 0x2871
movq 0x88(%rbx), %rdx
leaq 0x4df0(%rip), %rsi      # 0x762c
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x1190
movl 0x14(%r14), %eax
leal -0x3(%rax), %ecx
cmpl $0x3, %eax
cmovll %ebp, %ecx
movl %ecx, 0x14(%r14)
incl 0x8(%rbx)
jmp 0x278d
leaq 0x579c(%rip), %rdx      # 0x8001
leaq 0x4dc0(%rip), %rsi      # 0x762c
movq %rbx, %rdi
jmp 0x287f
movq 0x90(%rbx), %rdx
leaq 0x4dad(%rip), %rsi      # 0x762c
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x1190
// File: /workspace/github_c_makefile_star2_O3/return5[P]c_ish_one/./src/attack.c
// Function: computerSelection
static void computerSelection(int *const play) {
	wclear(prompt_win);
	switch(getRandInt(9)+1) {
		case 1:
		case 2:
		case 3:
		case 4:
		case 5:attackEnemySelection(ENEMY,PLAYER);
			break;
		case 6:
		case 7:
		case 8:(ENEMY->defense_up == 0) ? raiseDefense(ENEMY) : computerSelection(play);
			break;		
		case 9:
		case 10:(ENEMY->special_count < 1) ? useSpecial(ENEMY,PLAYER) : computerSelection(play);
			break;
		default:attackEnemySelection(ENEMY,PLAYER);
			break;
	}	
	if (PLAYER->health < 1 || ENEMY->health < 1) {
		*play = 0;
	}
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0xa883(%rip), %rax      # 0xd118
movq (%rax), %rdi
callq 0x1090
callq 0x11c0
cmpl $0x7ffffff7, %eax       # imm = 0x7FFFFFF7
jg 0x289d
movslq %eax, %rcx
imulq $-0x5ffffff5, %rcx, %rcx # imm = 0xA000000B
shrq $0x20, %rcx
addl %eax, %ecx
movl %ecx, %eax
shrl $0x1f, %eax
sarl $0x1b, %ecx
addl %eax, %ecx
cmpl $0x9, %ecx
ja 0x28d2
movl $0x1f, %eax
btl %ecx, %eax
jae 0x28f5
leaq 0xa867(%rip), %rax      # 0xd140
movq (%rax), %rax
movq 0x28(%rax), %rdi
leaq 0xa851(%rip), %rax      # 0xd138
movq (%rax), %rax
movq 0x28(%rax), %rsi
callq 0x1a4c
jmp 0x2936
movl $0xe0, %eax
btl %ecx, %eax
jae 0x291a
leaq 0xa83a(%rip), %rax      # 0xd140
movq (%rax), %rax
movq 0x28(%rax), %rdi
cmpl $0x0, 0x24(%rdi)
jne 0x292e
callq 0x1b9b
jmp 0x2936
leaq 0xa81f(%rip), %rax      # 0xd140
movq (%rax), %rax
movq 0x28(%rax), %rdi
cmpl $0x0, 0x8(%rdi)
jle 0x2964
movq %rbx, %rdi
callq 0x288a
leaq 0xa7fb(%rip), %rax      # 0xd138
movq (%rax), %rax
movq 0x28(%rax), %rax
cmpl $0x0, (%rax)
jle 0x295c
leaq 0xa7f0(%rip), %rax      # 0xd140
movq (%rax), %rax
movq 0x28(%rax), %rax
cmpl $0x0, (%rax)
jg 0x2962
movl $0x0, (%rbx)
popq %rbx
retq
leaq 0xa7cd(%rip), %rax      # 0xd138
movq (%rax), %rax
movq 0x28(%rax), %rsi
callq 0x1c20
jmp 0x2936
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/return5[P]c_ish_one/./src/initgame.c
// Function: setUpStart
void setUpStart(void) {
	player->x = 0;
	player->y = 0;
	map[0][0]->type = 0;
 	previous = map[0][0];
	map[0][0] = player;
}

// Assembly:
leaq 0xa402(%rip), %rax      # 0xd138
movq (%rax), %rax
movq $0x0, (%rax)
leaq 0xa419(%rip), %rcx      # 0xd160
movq (%rcx), %rdx
movl $0x0, 0xc(%rdx)
leaq 0xa3e8(%rip), %rsi      # 0xd140
movq %rdx, (%rsi)
movq %rax, (%rcx)
retq
nop
// File: /workspace/github_c_makefile_star2_O3/return5[P]c_ish_one/./src/main.c
// Function: killOrKilled
static void killOrKilled(void) {
	enemy_killed += continue_game;   //if enemy is killed, add one to count
	wclear(prompt_win);
	(continue_game) ? wprintw(prompt_win,"you defeated %s, good job!.",previous->character->name) : wprintw(prompt_win,"%s killed you. game over!",previous->character->name);
	wrefresh(prompt_win);
	getch();
}

// Assembly:
pushq %rbx
movl 0x9696(%rip), %eax      # 0xd0f8
addl %eax, 0x96e4(%rip)      # 0xd14c
leaq 0x96a9(%rip), %rbx      # 0xd118
movq (%rbx), %rdi
callq 0x1090
cmpl $0x0, 0x967a(%rip)      # 0xd0f8
movq (%rbx), %rdi
movq 0x96b8(%rip), %rax      # 0xd140
movq 0x28(%rax), %rax
movq 0x38(%rax), %rdx
leaq 0x47b5(%rip), %rax      # 0x824c
leaq 0x4792(%rip), %rsi      # 0x8230
cmoveq %rax, %rsi
xorl %eax, %eax
callq 0x1190
movq (%rbx), %rdi
callq 0x10d0
movq 0x9518(%rip), %rax      # 0xcfd0
movq (%rax), %rdi
popq %rbx
jmp 0x1080
// File: /workspace/github_c_makefile_star2_O3/return5[P]c_ish_one/./src/main.c
// Function: printShrineAndPlayer
static void printShrineAndPlayer(void) {
	wclear(game_win);
	printHeroPlaces(); //printobjects.c
	printPlaces(previous->type); //printobjects.c
	wrefresh(game_win);
}

// Assembly:
pushq %rbx
leaq 0x9647(%rip), %rbx      # 0xd110
movq (%rbx), %rdi
callq 0x1090
callq 0x6450
movq 0x9663(%rip), %rax      # 0xd140
movl 0xc(%rax), %edi
callq 0x6561
movq (%rbx), %rdi
popq %rbx
jmp 0x10d0
nop
// File: /workspace/github_c_makefile_star2_O3/return5[P]c_ish_one/./src/makemap.c
// Function: initMap
void initMap(void) {
	setUpMap();
	seedRandomNumber();
	setUPtile(getTile);
	initPieces();
	placePieces();
}

// Assembly:
pushq %rax
callq 0x3b21
xorl %edi, %edi
callq 0x1130
cmpq $-0x1, %rax
je 0x3af6
movl %eax, %edi
callq 0x1120
leaq 0x3a3(%rip), %rdi       # 0x3eb4
callq 0x3e46
callq 0x3ef8
popq %rax
jmp 0x3fef
// File: /workspace/github_c_makefile_star2_O3/return5[P]c_ish_one/./src/makemap.c
// Function: setUPtile
static void setUPtile(char (*tileGet)(void)) {
	int i,j;
	int right = WIDTH - 1;
	int upper = HEIGHT - 1;
	fruit(i = 0; i<upper; i+=2) {
		fruit(j = 0; j <right; j+=2) {
			const char sets = tileGet();
			map[i][j] -> tile_set = sets;
			map[i][j+1] -> tile_set = sets;
			map[i+1][j] -> tile_set = sets;
			map[i+1][j+1] -> tile_set = sets;
		}
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x94a0(%rip), %r14      # 0xd2f8
xorl %r15d, %r15d
movq $-0x2, %r12
callq *%rbx
movq -0x188(%r14,%r12,8), %rcx
movb %al, 0x20(%rcx)
movq -0x180(%r14,%r12,8), %rcx
movb %al, 0x20(%rcx)
movq 0x8(%r14,%r12,8), %rcx
movb %al, 0x20(%rcx)
movq 0x10(%r14,%r12,8), %rcx
movb %al, 0x20(%rcx)
addq $0x2, %r12
cmpq $0x2f, %r12
jb 0x3e62
leaq 0x2(%r15), %rax
addq $0x320, %r14            # imm = 0x320
cmpq $0x11, %r15
movq %rax, %r15
jb 0x3e5b
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/return5[P]c_ish_one/./src/makemap.c
// Function: getTile
static char getTile(void) {
	switch(getRand(6)) {
		case 0://
		case 1://
		case 2: return '^';
			break;
		case 3://
		case 4://
		case 5: return '/';
			break;
		case 6: return ' ';
			break;
		default : return ' ';
			break;
		}
}

// Assembly:
pushq %rax
callq 0x11c0
cmpl $0x7ffffffd, %eax       # imm = 0x7FFFFFFD
jg 0x3eb5
cltq
imulq $0x38000001, %rax, %rax # imm = 0x38000001
movq %rax, %rcx
shrq $0x3f, %rcx
sarq $0x3a, %rax
addl %ecx, %eax
leal (,%rax,8), %ecx
movabsq $0x202f2f2f5e5e5e, %rdx # imm = 0x202F2F2F5E5E5E
shrq %cl, %rdx
cmpl $0x7, %eax
movl $0x20, %eax
cmovbl %edx, %eax
popq %rcx
retq