LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/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
xorl %ebp, %ebp
movq 0x5bc5(%rip), %rdi      # 0xc8d8
cmpl 0xc(%rdi), %ebp
jae 0x6d27
movl %ebp, %esi
callq 0x385f
cmpl %ebx, (%rax)
je 0x6d2c
incl %ebp
jmp 0x6d0c
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
movq 0x5ba2(%rip), %rdi      # 0xc8d8
movl %ebp, %esi
callq 0x38bf
leaq 0x5ba4(%rip), %rax      # 0xc8e8
movq (%rax), %rdi
movl 0x4(%r14), %esi
callq 0x3070
movq %r14, %rdi
callq 0x3060
leaq 0x19d8(%rip), %rsi      # 0x8737
leaq 0x19f6(%rip), %rdx      # 0x875c
leaq 0x19ff(%rip), %r8       # 0x876c
pushq $0x3
popq %rdi
movl $0xd4, %ecx
movl %ebx, %r9d
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x50dd
// File: /workspace/github_c_makefile_star2_O2/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 0x6d95
movq 0x10(%rax), %rdi
jmp 0x4d71
leaq 0x5b14(%rip), %rax      # 0xc8b0
movq (%rax), %rdi
jmp 0x4d26
// File: /workspace/github_c_makefile_star2_O2/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 0x6dc9
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
leaq 0x15b6(%rip), %rsi      # 0x8372
callq 0x4d71
cmpl %ebp, (%rax)
jae 0x6dca
popq %rbx
popq %r14
popq %rbp
retq
movl %ebp, 0x20(%rbx)
leaq 0x5b04(%rip), %r14      # 0xc8d8
movq (%r14), %rdi
callq 0x383d
testq %rax, %rax
je 0x6dc5
cmpq %rbx, 0x18(%rax)
jne 0x6dd4
movl 0x20(%rbx), %ecx
movl 0x4(%rax), %edi
cmpl 0x24(%rax), %ecx
jne 0x6df9
callq 0x7244
jmp 0x6dd4
callq 0x727e
jmp 0x6dd4
// File: /workspace/github_c_makefile_star2_O2/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 0x5612(%rip), %r14      # 0xc8e8
movq (%r14), %rdi
leaq 0x5630(%rip), %r15      # 0xc910
movq (%r15), %rcx
movl 0x84(%rcx), %ecx
pushq $0x20
popq %r9
xorl %esi, %esi
movl %ebx, %edx
movl %ecx, %r8d
pushq %rax
pushq $0x2
callq 0x3650
popq %rcx
popq %rdx
movq (%r14), %rdi
pushq $0x1
popq %rsi
movl %ebx, %edx
xorl %ecx, %ecx
callq 0x35f0
movq (%r15), %rdi
xorl %esi, %esi
movl %ebx, %edx
callq 0x3110
leaq 0x1590(%rip), %rsi      # 0x88b0
leaq 0x15fa(%rip), %rdx      # 0x8921
leaq 0x1600(%rip), %r8       # 0x892e
pushq $0x3
popq %rdi
pushq $0x2a
popq %rcx
movl %ebx, %r9d
xorl %eax, %eax
callq 0x50dd
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rbx
subq $0x10, %rsp
movl %edi, %ebx
leaq 0xc(%rsp), %rdx
andl $0x0, (%rdx)
pushq $0x40
popq %rsi
callq 0x7204
leaq 0x154a(%rip), %rsi      # 0x88b0
leaq 0x15d6(%rip), %rdx      # 0x8943
leaq 0x15dc(%rip), %r8       # 0x8950
pushq $0x3
popq %rdi
pushq $0x35
popq %rcx
movl %ebx, %r9d
xorl %eax, %eax
callq 0x50dd
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq %rbx
pushq %rax
movl %edi, %ebx
leaq 0x4(%rsp), %rdx
movl $0x1, (%rdx)
pushq $0x40
popq %rbp
movl %ebp, %esi
callq 0x7204
leaq 0x1505(%rip), %rsi      # 0x88b0
leaq 0x15b2(%rip), %rdx      # 0x8964
leaq 0x15b8(%rip), %r8       # 0x8971
pushq $0x3
popq %rdi
movl %ebp, %ecx
movl %ebx, %r9d
xorl %eax, %eax
callq 0x50dd
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r12
pushq %rbx
subq $0x10, %rsp
movl %r8d, %ebx
movl %ecx, %r14d
movl %edx, %r12d
movl %esi, %r15d
movl %edi, %ebp
movq %rsp, %rdx
movl %esi, (%rdx)
movl %r12d, 0x4(%rdx)
movl %r8d, 0x8(%rdx)
movl %ecx, 0xc(%rdx)
pushq $0xf
popq %rsi
callq 0x7204
leaq 0x137d(%rip), %rsi      # 0x88b0
leaq 0x14b1(%rip), %rdx      # 0x89eb
leaq 0x14c1(%rip), %r8       # 0x8a02
pushq $0x3
popq %rdi
pushq $0x7d
popq %rcx
movl %ebp, %r9d
xorl %eax, %eax
pushq %r12
pushq %r15
pushq %r14
pushq %rbx
callq 0x50dd
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rbx
subq $0x10, %rsp
movl %edx, %r8d
movl %esi, %ecx
movl %edi, %edx
leaq 0x5370(%rip), %rbx      # 0xc8e8
movq (%rbx), %rdi
movl $0x100, (%rsp)          # imm = 0x100
xorl %esi, %esi
xorl %r9d, %r9d
callq 0x30d0
movq (%rbx), %rdi
movl %eax, %esi
xorl %edx, %edx
callq 0x3500
movq %rax, %rdi
addq $0x10, %rsp
popq %rbx
jmp 0x3180
// File: /workspace/github_c_makefile_star2_O2/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 0xce3a(%rip), %rcx      # 0xe140
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_O2/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 0xc783(%rip), %rbx      # 0xe118
movq (%rbx), %rdi
callq 0x1090
movq (%rbx), %rdi
leaq 0xc791(%rip), %r14      # 0xe138
movq (%r14), %rax
movq 0x28(%rax), %rax
movl (%rax), %edx
movl 0x10(%rax), %ecx
movl 0x14(%rax), %r8d
movl 0x2c(%rax), %r9d
leaq 0x5b17(%rip), %rsi      # 0x74d9
xorl %eax, %eax
callq 0x1190
movq (%rbx), %rdi
movq (%r14), %rax
movq 0x28(%rax), %rax
movq 0x40(%rax), %rdx
leaq 0x5b39(%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_O2/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
pushq $0xa
popq %rdi
callq 0x1d8c
cmpl 0x20(%rbx), %eax
jg 0x1a11
cmpl $0x0, 0x4(%rbx)
je 0x1a41
pushq $0xa
popq %rdi
callq 0x1d8c
cmpl 0x18(%r14), %eax
jle 0x1a30
movq 0x78(%r14), %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1db2
jmp 0x1a50
movq 0x48(%r14), %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1e21
jmp 0x1a50
movq 0x50(%r14), %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1e94
movl 0x1c(%r14), %eax
cmpl $0xc, %eax
ja 0x1ab2
movl $0x1410, %ecx           # imm = 0x1410
btl %eax, %ecx
jae 0x1ab2
pushq $0xa
popq %rdi
callq 0x1d8c
cmpl 0x20(%rbx), %eax
jle 0x1a92
pushq $0xa
popq %rdi
callq 0x1d8c
cmpl 0x18(%r14), %eax
jle 0x1aa3
movq 0x80(%r14), %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1db2
jmp 0x1ab2
movq 0x60(%r14), %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1e94
jmp 0x1ab2
movq 0x58(%r14), %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1e21
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1769
// File: /workspace/github_c_makefile_star2_O2/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 %rbx
movq %rdi, %rbx
leaq 0xc64f(%rip), %rax      # 0xe118
movq (%rax), %rdi
movq 0x70(%rbx), %rdx
leaq 0x5b55(%rip), %rsi      # 0x762c
xorl %eax, %eax
callq 0x1190
addl $0x2, 0x14(%rbx)
movl $0x1, 0x24(%rbx)
popq %rbx
jmp 0x1769
// File: /workspace/github_c_makefile_star2_O2/return5[P]c_ish_one/./src/attack.c
// Function: getRandInt
static int getRandInt(const int limit) {
	const int divisor = RAND_MAX/(limit + 1);
	int value;
	do{
		value = rand() / divisor;
	} while(value > limit);

	return value;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
leal 0x1(%rbx), %ecx
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
xorl %edx, %edx
divl %ecx
movl %eax, %ebp
callq 0x11c0
cltd
idivl %ebp
cmpl %ebx, %eax
jg 0x1d9f
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
movl 0x10(%rdi), %eax
subl 0x14(%rsi), %eax
leal 0x2(%rax), %ecx
testl %eax, %eax
pushq $0x3
popq %rbx
cmovgl %ecx, %ebx
movq %rdx, %r14
subl %ebx, (%rsi)
movq %rsi, %rdi
callq 0x1efa
testl %eax, %eax
je 0x1ddf
popq %rbx
popq %r14
popq %r15
retq
pushq $0xd
popq %rdi
callq 0x1160
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
movl %ebx, %edx
xorl %eax, %eax
callq 0x1180
leaq 0xc318(%rip), %rax      # 0xe118
movq (%rax), %rdi
leaq 0x5822(%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_O2/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
movl 0x10(%rdi), %eax
subl 0x14(%rsi), %eax
cmpl $0x2, %eax
pushq $0x1
popq %rbx
cmovgel %eax, %ebx
subl %ebx, (%rsi)
movq %rdx, %r14
cmpl $0xb, 0x1c(%rsi)
je 0x1e52
movq %rsi, %rdi
callq 0x1efa
testl %eax, %eax
je 0x1e52
popq %rbx
popq %r14
popq %r15
retq
pushq $0xd
popq %rdi
callq 0x1160
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
movl %ebx, %edx
xorl %eax, %eax
callq 0x1180
leaq 0xc2a5(%rip), %rax      # 0xe118
movq (%rax), %rdi
leaq 0x57af(%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_O2/return5[P]c_ish_one/./src/attack.c
// Function: powerAttack
static void powerAttack(Character *const attacker,Character *const defender) {
	switch(defender->type) {
		case 1://swordsman
		case 3://slinger
		case 7://four legged beast
		case 10://halfling
			//power attacks dont work against these 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
			//cant use special attack against enraged enemy
			wprintw(prompt_win,"%s\n",defender->special_fail);
			attacker->health -= 4;
			break;
		case 19: 
			wprintw(prompt_win,"%s\n",powerAttackBoss()); //power attack against boss
			break;
		default: //against any other enemy
			if(getRandInt(10) > defender->chance_to_dodge) {
				const int damage = (attacker->attack + 4) - defender->defense;
				wprintw(prompt_win,"%s\n",attacker->special_attack);
				defender->health -= damage;
				attacker->special_count += 1;
			}
			else{
				wprintw(prompt_win,"%s\n",attacker->special_attack_miss);
			}
			break;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl 0x1c(%rsi), %eax
cmpl $0x13, %eax
ja 0x231f
movl $0x7e000, %ecx          # imm = 0x7E000
btl %eax, %ecx
jae 0x2278
leaq 0xbebd(%rip), %rax      # 0xe118
movq (%rax), %rdi
movq 0x98(%r14), %rdx
leaq 0x53c0(%rip), %rsi      # 0x762c
xorl %eax, %eax
callq 0x1190
addl $-0x4, (%rbx)
jmp 0x22a4
movl $0x48a, %ecx            # imm = 0x48A
btl %eax, %ecx
jae 0x22af
leaq 0xbe8f(%rip), %rax      # 0xe118
movq (%rax), %rdi
movq 0x98(%r14), %rdx
leaq 0x5392(%rip), %rsi      # 0x762c
xorl %eax, %eax
callq 0x1190
addl $-0x2, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x13, %eax
jne 0x231f
leaq 0xbe5d(%rip), %rax      # 0xe118
movq (%rax), %rbx
pushq $0xa
popq %rdi
callq 0x1d8c
leaq 0xbe73(%rip), %rcx      # 0xe140
movq (%rcx), %rcx
movq 0x28(%rcx), %rcx
cmpl 0x20(%rcx), %eax
jle 0x2368
leaq 0xbe54(%rip), %rax      # 0xe138
movq (%rax), %rax
movq 0x28(%rax), %rax
movl 0x10(%rax), %ebp
subl 0x14(%rcx), %ebp
addl $0x4, %ebp
subl %ebp, (%rcx)
movl $0x1, 0x8(%rax)
movl $0xa0, %edi
callq 0x1160
movq %rax, %r14
leaq 0x5af9(%rip), %rsi      # 0x7e0a
movq %rax, %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0x1180
jmp 0x236f
pushq $0xa
popq %rdi
callq 0x1d8c
cmpl 0x20(%r14), %eax
jle 0x237e
movl 0x14(%r14), %r15d
subl 0x10(%rbx), %r15d
leaq 0xbddc(%rip), %rax      # 0xe118
movq (%rax), %rdi
movq 0x88(%rbx), %rdx
leaq 0x52df(%rip), %rsi      # 0x762c
xorl %eax, %eax
callq 0x1190
movl (%r14), %eax
addl %r15d, %eax
addl $-0x4, %eax
movl %eax, (%r14)
incl 0x8(%rbx)
jmp 0x22a4
leaq 0x5b37(%rip), %r14      # 0x7ea6
leaq 0x52b6(%rip), %rsi      # 0x762c
movq %rbx, %rdi
movq %r14, %rdx
jmp 0x2396
leaq 0xbd93(%rip), %rax      # 0xe118
movq (%rax), %rdi
movq 0x90(%rbx), %rdx
leaq 0x5296(%rip), %rsi      # 0x762c
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1190
// File: /workspace/github_c_makefile_star2_O2/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 0x2471
movl $0x7e000, %ecx          # imm = 0x7E000
btl %eax, %ecx
jae 0x23eb
leaq 0xbd4a(%rip), %rax      # 0xe118
movq (%rax), %rdi
movq 0x98(%r14), %rdx
leaq 0x524d(%rip), %rsi      # 0x762c
xorl %eax, %eax
callq 0x1190
addl $-0x4, (%rbx)
jmp 0x2417
movl $0x1830, %ecx           # imm = 0x1830
btl %eax, %ecx
jae 0x241f
leaq 0xbd1c(%rip), %rax      # 0xe118
movq (%rax), %rdi
movq 0x98(%r14), %rdx
leaq 0x521f(%rip), %rsi      # 0x762c
xorl %eax, %eax
callq 0x1190
addl $-0x2, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
cmpl $0x13, %eax
jne 0x2471
leaq 0xbced(%rip), %rax      # 0xe118
movq (%rax), %rbx
pushq $0xa
popq %rdi
callq 0x1d8c
leaq 0xbd03(%rip), %rcx      # 0xe140
movq (%rcx), %rcx
movq 0x28(%rcx), %rcx
cmpl 0x20(%rcx), %eax
jle 0x24b8
addl $-0x2, (%rcx)
movl $0x2, 0x4(%rcx)
leaq 0xbcde(%rip), %rax      # 0xe138
movq (%rax), %rax
movq 0x28(%rax), %rax
movl $0x1, 0x8(%rax)
leaq 0x5a6a(%rip), %rdx      # 0x7ed9
jmp 0x24bf
pushq $0xa
popq %rdi
callq 0x1d8c
leaq 0xbc98(%rip), %rcx      # 0xe118
movq (%rcx), %rdi
cmpl 0x20(%r14), %eax
jle 0x24cb
movq 0x88(%rbx), %rdx
leaq 0x5195(%rip), %rsi      # 0x762c
xorl %eax, %eax
callq 0x1190
movq (%r14), %xmm0
paddd 0x4b95(%rip), %xmm0     # 0x7040
movq %xmm0, (%r14)
incl 0x8(%rbx)
jmp 0x2417
leaq 0x5a8a(%rip), %rdx      # 0x7f49
leaq 0x5166(%rip), %rsi      # 0x762c
movq %rbx, %rdi
jmp 0x24d9
movq 0x90(%rbx), %rdx
leaq 0x5153(%rip), %rsi      # 0x762c
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1190
// File: /workspace/github_c_makefile_star2_O2/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 0x25a8
movl $0x7e000, %ecx          # imm = 0x7E000
btl %eax, %ecx
jae 0x252b
leaq 0xbc0a(%rip), %rax      # 0xe118
movq (%rax), %rdi
movq 0x98(%r14), %rdx
leaq 0x510d(%rip), %rsi      # 0x762c
xorl %eax, %eax
callq 0x1190
addl $-0x4, (%rbx)
jmp 0x2557
movl $0x344, %ecx            # imm = 0x344
btl %eax, %ecx
jae 0x255c
leaq 0xbbdc(%rip), %rax      # 0xe118
movq (%rax), %rdi
movq 0x98(%r14), %rdx
leaq 0x50df(%rip), %rsi      # 0x762c
xorl %eax, %eax
callq 0x1190
addl $-0x2, (%rbx)
popq %rbx
popq %r14
popq %rbp
retq
cmpl $0x13, %eax
jne 0x25a8
leaq 0xbbb0(%rip), %rax      # 0xe118
movq (%rax), %rbx
pushq $0xa
popq %rdi
callq 0x1d8c
leaq 0xbbc6(%rip), %rcx      # 0xe140
movq (%rcx), %rcx
movq 0x28(%rcx), %rcx
cmpl 0x20(%rcx), %eax
jle 0x25f0
leaq 0xbbab(%rip), %rax      # 0xe138
movq (%rax), %rax
movq 0x28(%rax), %rax
addl $0x2, 0x10(%rax)
movl $0x1, 0x8(%rax)
leaq 0x59e9(%rip), %rdx      # 0x7f8f
jmp 0x25f7
pushq $0xa
popq %rdi
callq 0x1d8c
leaq 0xbb61(%rip), %rcx      # 0xe118
movq (%rcx), %rdi
cmpl 0x20(%r14), %eax
jle 0x2603
movq 0x88(%rbx), %rdx
leaq 0x505e(%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 0x2557
leaq 0x5a0a(%rip), %rdx      # 0x8001
leaq 0x502e(%rip), %rsi      # 0x762c
movq %rbx, %rdi
jmp 0x2611
movq 0x90(%rbx), %rdx
leaq 0x501b(%rip), %rsi      # 0x762c
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x1190
// File: /workspace/github_c_makefile_star2_O2/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 0xbaf1(%rip), %rax      # 0xe118
movq (%rax), %rdi
callq 0x1090
pushq $0x9
popq %rdi
callq 0x1d8c
cmpl $0x9, %eax
ja 0x2644
pushq $0x1f
popq %rcx
btl %eax, %ecx
jae 0x2667
leaq 0xbaf5(%rip), %rax      # 0xe140
movq (%rax), %rax
movq 0x28(%rax), %rdi
leaq 0xbadf(%rip), %rax      # 0xe138
movq (%rax), %rax
movq 0x28(%rax), %rsi
callq 0x19f4
jmp 0x26a8
movl $0xe0, %ecx
btl %eax, %ecx
jae 0x268c
leaq 0xbac8(%rip), %rax      # 0xe140
movq (%rax), %rax
movq 0x28(%rax), %rdi
cmpl $0x0, 0x24(%rdi)
jne 0x26a0
callq 0x1abe
jmp 0x26a8
leaq 0xbaad(%rip), %rax      # 0xe140
movq (%rax), %rax
movq 0x28(%rax), %rdi
cmpl $0x0, 0x8(%rdi)
jle 0x26d3
movq %rbx, %rdi
callq 0x261c
leaq 0xba89(%rip), %rax      # 0xe138
movq (%rax), %rax
movq 0x28(%rax), %rax
cmpl $0x0, (%rax)
jle 0x26ce
leaq 0xba7e(%rip), %rax      # 0xe140
movq (%rax), %rax
movq 0x28(%rax), %rax
cmpl $0x0, (%rax)
jg 0x26d1
andl $0x0, (%rbx)
popq %rbx
retq
leaq 0xba5e(%rip), %rax      # 0xe138
movq (%rax), %rax
movq 0x28(%rax), %rsi
callq 0x1b16
jmp 0x26a8
// File: /workspace/github_c_makefile_star2_O2/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 0xb77b(%rip), %rax      # 0xe138
movq (%rax), %rax
andq $0x0, (%rax)
leaq 0xb795(%rip), %rcx      # 0xe160
movq (%rcx), %rdx
andl $0x0, 0xc(%rdx)
leaq 0xb767(%rip), %rsi      # 0xe140
movq %rdx, (%rsi)
movq %rax, (%rcx)
retq
// File: /workspace/github_c_makefile_star2_O2/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 0xa9ad(%rip), %eax      # 0xe0f8
addl %eax, 0xa9fb(%rip)      # 0xe14c
leaq 0xa9c0(%rip), %rbx      # 0xe118
movq (%rbx), %rdi
callq 0x1090
cmpl $0x0, 0xa991(%rip)      # 0xe0f8
movq (%rbx), %rdi
movq 0xa9cf(%rip), %rax      # 0xe140
movq 0x28(%rax), %rax
movq 0x38(%rax), %rdx
leaq 0x4acc(%rip), %rax      # 0x824c
leaq 0x4aa9(%rip), %rsi      # 0x8230
cmoveq %rax, %rsi
xorl %eax, %eax
callq 0x1190
movq (%rbx), %rdi
callq 0x10d0
movq 0xa82f(%rip), %rax      # 0xdfd0
movq (%rax), %rdi
popq %rbx
jmp 0x1080
// File: /workspace/github_c_makefile_star2_O2/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 0xa95e(%rip), %rbx      # 0xe110
movq (%rbx), %rdi
callq 0x1090
callq 0x5c78
movq 0xa97a(%rip), %rax      # 0xe140
movl 0xc(%rax), %edi
callq 0x5d8c
movq (%rbx), %rdi
popq %rbx
jmp 0x10d0
nop
// File: /workspace/github_c_makefile_star2_O2/return5[P]c_ish_one/./src/makemap.c
// Function: initMap
void initMap(void) {
	setUpMap();
	seedRandomNumber();
	setUPtile(getTile);
	initPieces();
	placePieces();
}

// Assembly:
pushq %rax
callq 0x3809
xorl %edi, %edi
callq 0x1130
cmpq $-0x1, %rax
je 0x37de
movl %eax, %edi
callq 0x1120
leaq 0x1bb(%rip), %rdi       # 0x39b4
callq 0x394a
callq 0x39dc
popq %rax
jmp 0x3ac9
// File: /workspace/github_c_makefile_star2_O2/return5[P]c_ish_one/./src/makemap.c
// Function: setUpMap
static void setUpMap(void) {
	int i,j;
	fruit(i = 0; i < HEIGHT;i+= 2) {
		fruit(j = 0; j < WIDTH; j+= 10) {
			setUpPiece(i,j);
			setUpPiece(i,j+1);
			setUpPiece(i,j+2);
			setUpPiece(i,j+3);
			setUpPiece(i,j+4);
			setUpPiece(i,j+5);
			setUpPiece(i,j+6);
			setUpPiece(i,j+7);
			setUpPiece(i,j+8);
			setUpPiece(i,j+9);
			setUpPiece(i+1,j);
			setUpPiece(i+1,j+1);
			setUpPiece(i+1,j+2);
			setUpPiece(i+1,j+3);
			setUpPiece(i+1,j+4);
			setUpPiece(i+1,j+5);
			setUpPiece(i+1,j+6);
			setUpPiece(i+1,j+7);
			setUpPiece(i+1,j+8);
			setUpPiece(i+1,j+9);
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
xorl %ebx, %ebx
cmpl $0x13, %ebx
ja 0x393b
movl %ebx, %ebp
orl $0x1, %ebp
xorl %r14d, %r14d
cmpl $0x31, %r14d
ja 0x3933
movl %ebx, %edi
movl %r14d, %esi
callq 0x4055
leal 0x1(%r14), %esi
movl %esi, 0x14(%rsp)
movl %ebx, %edi
callq 0x4055
leal 0x2(%r14), %esi
movl %esi, 0x10(%rsp)
movl %ebx, %edi
callq 0x4055
leal 0x3(%r14), %esi
movl %esi, 0xc(%rsp)
movl %ebx, %edi
callq 0x4055
leal 0x4(%r14), %esi
movl %esi, 0x8(%rsp)
movl %ebx, %edi
callq 0x4055
leal 0x5(%r14), %esi
movl %esi, 0x4(%rsp)
movl %ebx, %edi
callq 0x4055
leal 0x6(%r14), %esi
movl %esi, (%rsp)
movl %ebx, %edi
callq 0x4055
leal 0x7(%r14), %r15d
movl %ebx, %edi
movl %r15d, %esi
callq 0x4055
leal 0x8(%r14), %r12d
movl %ebx, %edi
movl %r12d, %esi
callq 0x4055
leal 0x9(%r14), %r13d
movl %ebx, %edi
movl %r13d, %esi
callq 0x4055
movl %ebp, %edi
movl %r14d, %esi
callq 0x4055
movl %ebp, %edi
movl 0x14(%rsp), %esi
callq 0x4055
movl %ebp, %edi
movl 0x10(%rsp), %esi
callq 0x4055
movl %ebp, %edi
movl 0xc(%rsp), %esi
callq 0x4055
movl %ebp, %edi
movl 0x8(%rsp), %esi
callq 0x4055
movl %ebp, %edi
movl 0x4(%rsp), %esi
callq 0x4055
movl %ebp, %edi
movl (%rsp), %esi
callq 0x4055
movl %ebp, %edi
movl %r15d, %esi
callq 0x4055
movl %ebp, %edi
movl %r12d, %esi
callq 0x4055
movl %ebp, %edi
movl %r13d, %esi
callq 0x4055
addl $0xa, %r14d
jmp 0x382a
addl $0x2, %ebx
jmp 0x3819
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0xa99c(%rip), %r14      # 0xe2f8
xorl %r15d, %r15d
cmpq $0x12, %r15
ja 0x39a8
xorl %r12d, %r12d
cmpq $0x30, %r12
ja 0x399b
callq *%rbx
movq -0x198(%r14,%r12,8), %rcx
movb %al, 0x20(%rcx)
movq -0x190(%r14,%r12,8), %rcx
movb %al, 0x20(%rcx)
movq -0x8(%r14,%r12,8), %rcx
movb %al, 0x20(%rcx)
movq (%r14,%r12,8), %rcx
movb %al, 0x20(%rcx)
addq $0x2, %r12
jmp 0x3968
addq $0x2, %r15
addq $0x320, %r14            # imm = 0x320
jmp 0x395f
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/return5[P]c_ish_one/./src/makemap.c
// Function: initPieces
static void initPieces(void) {
	makeList(ENEMY_LIMIT,enemy_x,enemy_y); //make enemy list
	makeList(CAMP_LIMIT,camp_x,camp_y);  //make camp list
	checkLocation(ENEMY_LIMIT,enemy_x,enemy_y,ENEMY_LIMIT,enemy_x,enemy_y); //check if enemy is on another
	checkLocation(CAMP_LIMIT,camp_x,camp_y,CAMP_LIMIT,camp_x,camp_y);  //checks if camp is located at or near another
	makeList(SHRINE_LIMIT, shrine_x,shrine_y); //make shrine list
	makeList(WELL_LIMIT,well_x,well_y);  //make well list
	checkLocation(SHRINE_LIMIT,shrine_x,shrine_y,SHRINE_LIMIT,shrine_x,shrine_y); //checks if shrine is at or near another shrine
	checkLocation(WELL_LIMIT,well_x,well_y,WELL_LIMIT,well_x,well_y); //checks if well is located at or near another one
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0xc6b2(%rip), %rbx      # 0x100a0
leaq 0xc79b(%rip), %r14      # 0x10190
pushq $0x3c
popq %rbp
movl %ebp, %edi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x4094
leaq 0xc874(%rip), %r15      # 0x10280
leaq 0xc8dd(%rip), %r12      # 0x102f0
pushq $0x19
popq %r13
movl %r13d, %edi
movq %r15, %rsi
movq %r12, %rdx
callq 0x4094
movl %ebp, %edi
movq %rbx, %rsi
movq %r14, %rdx
movl %ebp, %ecx
movq %rbx, %r8
movq %r14, %r9
callq 0x40e8
movl %r13d, %edi
movq %r15, %rsi
movq %r12, %rdx
movl %r13d, %ecx
movq %r15, %r8
movq %r12, %r9
callq 0x40e8
leaq 0xc8fc(%rip), %rbx      # 0x10354
leaq 0xc901(%rip), %r14      # 0x10360
pushq $0x3
popq %rbp
movl %ebp, %edi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x4094
leaq 0xc8fa(%rip), %r15      # 0x10370
leaq 0xc913(%rip), %r12      # 0x10390
pushq $0x5
popq %r13
movl %r13d, %edi
movq %r15, %rsi
movq %r12, %rdx
callq 0x4094
movl %ebp, %edi
movq %rbx, %rsi
movq %r14, %rdx
movl %ebp, %ecx
movq %rbx, %r8
movq %r14, %r9
callq 0x40e8
movl %r13d, %edi
movq %r15, %rsi
movq %r12, %rdx
movl %r13d, %ecx
movq %r15, %r8
movq %r12, %r9
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x40e8
// File: /workspace/github_c_makefile_star2_O2/return5[P]c_ish_one/./src/makemap.c
// Function: initMap2
void initMap2(void) {
	freeMap();
	free(previous);
	setUpMap();
	setUPtile(getTile2);
	initPieces();
	placePieces();
}

// Assembly:
pushq %rax
callq 0x3edd
leaq 0xa287(%rip), %rax      # 0xe140
movq (%rax), %rdi
callq 0x1030
callq 0x3809
leaq 0x13a(%rip), %rdi       # 0x4007
callq 0x394a
callq 0x39dc
popq %rax
jmp 0x3ac9
// File: /workspace/github_c_makefile_star2_O2/return5[P]c_ish_one/./src/makemap.c
// Function: freeMap
void freeMap(void) {
	fruit(int i = 0; i < HEIGHT; i+=2) {
		fruit(int j = 0; j < WIDTH; j+=10) {
			free(map[i][j]);
			free(map[i][j+1]);
			free(map[i][j+2]);
			free(map[i][j+3]);
			free(map[i][j+4]);
			free(map[i][j+5]);
			free(map[i][j+6]);
			free(map[i][j+7]);
			free(map[i][j+8]);
			free(map[i][j+9]);
			free(map[i+1][j]);
			free(map[i+1][j+1]);
			free(map[i+1][j+2]);
			free(map[i+1][j+3]);
			free(map[i+1][j+4]);
			free(map[i+1][j+5]);
			free(map[i+1][j+6]);
			free(map[i+1][j+7]);
			free(map[i+1][j+8]);
			free(map[i+1][j+9]);
		}
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
leaq 0xa44f(%rip), %rbx      # 0xe338
xorl %r14d, %r14d
cmpq $0x13, %r14
ja 0x4001
xorl %r15d, %r15d
cmpq $0x32, %r15
jae 0x3ff1
movq -0x1d8(%rbx,%r15,8), %rdi
callq 0x1030
movq -0x1d0(%rbx,%r15,8), %rdi
callq 0x1030
movq -0x1c8(%rbx,%r15,8), %rdi
callq 0x1030
movq -0x1c0(%rbx,%r15,8), %rdi
callq 0x1030
movq -0x1b8(%rbx,%r15,8), %rdi
callq 0x1030
movq -0x1b0(%rbx,%r15,8), %rdi
callq 0x1030
movq -0x1a8(%rbx,%r15,8), %rdi
callq 0x1030
movq -0x1a0(%rbx,%r15,8), %rdi
callq 0x1030
movq -0x198(%rbx,%r15,8), %rdi
callq 0x1030
movq -0x190(%rbx,%r15,8), %rdi
callq 0x1030
movq -0x48(%rbx,%r15,8), %rdi
callq 0x1030
movq -0x40(%rbx,%r15,8), %rdi
callq 0x1030
movq -0x38(%rbx,%r15,8), %rdi
callq 0x1030
movq -0x30(%rbx,%r15,8), %rdi
callq 0x1030
movq -0x28(%rbx,%r15,8), %rdi
callq 0x1030
movq -0x20(%rbx,%r15,8), %rdi
callq 0x1030
movq -0x18(%rbx,%r15,8), %rdi
callq 0x1030
movq -0x10(%rbx,%r15,8), %rdi
callq 0x1030
movq -0x8(%rbx,%r15,8), %rdi
callq 0x1030
movq (%rbx,%r15,8), %rdi
callq 0x1030
addq $0xa, %r15
jmp 0x3ef9
addq $0x2, %r14
addq $0x320, %rbx            # imm = 0x320
jmp 0x3eec
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/return5[P]c_ish_one/./src/makemap.c
// Function: setUpPiece
static void setUpPiece(const int i, const int j) {
	map[i][j] = malloc(TILE_SIZE);
	map[i][j]->x = i;
	map[i][j]->y = j;
	map[i][j]->type = 0;
	map[i][j]->visited = 0;
	map[i][j]->discovered = 0;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebx
movl %edi, %ebp
pushq $0x38
popq %rdi
callq 0x1160
movslq %ebp, %rcx
movslq %ebx, %rdx
imulq $0x190, %rcx, %rsi      # imm = 0x190
leaq 0xa0e8(%rip), %rdi      # 0xe160
addq %rsi, %rdi
movl %ecx, (%rax)
movl %edx, 0x4(%rax)
andq $0x0, 0xc(%rax)
movq %rax, (%rdi,%rdx,8)
andl $0x0, 0x1c(%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/return5[P]c_ish_one/./src/makemap.c
// Function: makeList
static void makeList(const int limit, int *const x, int *const y) {
	int i;
	fruit(i = 0; i < limit; i++) {
		x[i] = getRand(WIDTH - 1);
		y[i] = getRand(HEIGHT - 1);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movl %edi, %r15d
xorl %r13d, %r13d
testl %edi, %edi
cmovlel %r13d, %r15d
pushq $0x31
popq %rbp
pushq $0x13
popq %r12
cmpq %r13, %r15
je 0x40d9
movl %ebp, %edi
callq 0x402f
movl %eax, (%r14,%r13,4)
movl %r12d, %edi
callq 0x402f
movl %eax, (%rbx,%r13,4)
incq %r13
jmp 0x40b8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/return5[P]c_ish_one/./src/makemap.c
// Function: checkLocation
static void checkLocation(const int limit, int *const x, int *const y, const int check_limit, const int *const check_x,const int *const check_y) {
	//im sure there is a better way to do this. need to work on this part. 
	int i,j,k,change;
	i = 0;
	//while i is less than the length of x and y arrays
	while(i < limit) {
		change = 0;
		//loops through each element of check_x and check_y
		fruit(j = 0 ;j < check_limit; j++) {
			//if the elements to be compared are not the same
			if(&x[i] != &check_x[j]) {
				//check location -1, location 0, and then location +1
				fruit(k = -1; k < 2; k++) {
					//if item in x/y is to the left, at, or right of item in check_x/y
					if(x[i] == ((check_x[j]) + k) && y[i] == (check_y[j])) {
						x[i] = getRand(WIDTH-1);
						y[i] = getRand(HEIGHT-1);
						change = 1;
					}
					//if item in x/y is to the bottom, at, or above item in check_x/y
					else if(x[i] == (check_x[j]) && y[i] == ((check_y[j]) + k)) {
						x[i] = getRand(WIDTH - 1);
						y[i] = getRand(HEIGHT-1);
						change = 1;
					}
				}
			}
		}
		//if something was not changed, go to next item in x and y arrays
		if (change == 0) {
			i++;
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, %r12
movq %r8, 0x18(%rsp)
movq %rdx, %rbp
movq %rsi, 0x10(%rsp)
movl %edi, 0x8(%rsp)
xorl %eax, %eax
testl %ecx, %ecx
cmovlel %eax, %ecx
movq %rcx, 0x20(%rsp)
cmpl 0x8(%rsp), %eax
jge 0x41bc
movl %eax, 0xc(%rsp)
movl %eax, %r14d
movq 0x10(%rsp), %rax
leaq (%rax,%r14,4), %rax
movq %rax, (%rsp)
xorl %r15d, %r15d
xorl %eax, %eax
cmpq 0x20(%rsp), %r15
je 0x41ad
movq 0x18(%rsp), %rcx
leaq (%rcx,%r15,4), %r13
cmpq %r13, (%rsp)
je 0x41a8
pushq $-0x1
popq %rcx
movl %ecx, %ebx
cmpl $0x2, %ebx
je 0x41a8
movq (%rsp), %rcx
movl (%rcx), %ecx
movl (%r13), %edi
leal (%rbx,%rdi), %esi
cmpl %ecx, %esi
jne 0x4175
movl (%rbp,%r14,4), %esi
cmpl (%r12,%r15,4), %esi
je 0x4186
cmpl %edi, %ecx
jne 0x41a4
movl (%r12,%r15,4), %ecx
addl %ebx, %ecx
cmpl (%rbp,%r14,4), %ecx
jne 0x41a4
pushq $0x31
popq %rdi
callq 0x402f
movq (%rsp), %rcx
movl %eax, (%rcx)
pushq $0x13
popq %rdi
callq 0x402f
movl %eax, (%rbp,%r14,4)
pushq $0x1
popq %rax
incl %ebx
jmp 0x4154
incq %r15
jmp 0x4139
cmpl $0x1, %eax
movl 0xc(%rsp), %eax
adcl $0x0, %eax
jmp 0x4116
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/return5[P]c_ish_one/./src/printenemy.c
// Function: printHero
void printHero(void) {
	wattron(game_win,WHITE);
	mvwprintw(game_win,11,10,"\\"); //sword
	mvwprintw(game_win,12,11,"\\"); //sword
	wattroff(game_win,WHITE);
	wattron(game_win,GREEN);
	mvwprintw(game_win,12,14,"|"); //upper torso
	mvwprintw(game_win,13,14,"|"); //lower torso
	wattroff(game_win,GREEN);
	wattron(game_win,YELLOW);
	mvwprintw(game_win,11,14,"O"); //head
	mvwprintw(game_win,12,12,"__"); //arms
	mvwprintw(game_win,12,15,"__"); //arms
	mvwprintw(game_win,14,13,"/ \\"); //legs
	mvwprintw(game_win,15,12,"/   \\"); //lowr legs
	wattroff(game_win,YELLOW);
	wattron(game_win,RED);
	mvwprintw(game_win,12,17,"|"); //sheild
	mvwprintw(game_win,13,17,"|"); //sheild
	wattroff(game_win,RED);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x9a2e(%rip), %rbp      # 0xe110
movq (%rbp), %rdi
movl $0x200, %esi            # imm = 0x200
xorl %edx, %edx
callq 0x1110
movq (%rbp), %rdi
leaq 0x64a0(%rip), %r14      # 0xab9d
pushq $0xb
popq %r15
pushq $0xa
popq %rdx
movl %r15d, %esi
movq %r14, %rcx
xorl %eax, %eax
callq 0x10e0
movq (%rbp), %rdi
pushq $0xc
popq %rbx
movl %ebx, %esi
movl %r15d, %edx
movq %r14, %rcx
xorl %eax, %eax
callq 0x10e0
movq (%rbp), %rdi
movl $0x200, %esi            # imm = 0x200
xorl %edx, %edx
callq 0x11b0
movq (%rbp), %rdi
movl $0x300, %esi            # imm = 0x300
xorl %edx, %edx
callq 0x1110
movq (%rbp), %rdi
leaq 0x6574(%rip), %r13      # 0xacc6
pushq $0xe
popq %r12
movl %ebx, %esi
movl %r12d, %edx
movq %r13, %rcx
xorl %eax, %eax
callq 0x10e0
movq (%rbp), %rdi
pushq $0xd
popq %r14
movl %r14d, %esi
movl %r12d, %edx
movq %r13, %rcx
xorl %eax, %eax
callq 0x10e0
movq (%rbp), %rdi
movl $0x300, %esi            # imm = 0x300
xorl %edx, %edx
callq 0x11b0
movq (%rbp), %rdi
movl $0x400, %esi            # imm = 0x400
xorl %edx, %edx
callq 0x1110
movq (%rbp), %rdi
leaq 0x635e(%rip), %rcx      # 0xab06
movl %r15d, %esi
movl %r12d, %edx
xorl %eax, %eax
callq 0x10e0
movq (%rbp), %rdi
leaq 0x633f(%rip), %r15      # 0xaaff
movl %ebx, %esi
movl %ebx, %edx
movq %r15, %rcx
xorl %eax, %eax
callq 0x10e0
movq (%rbp), %rdi
pushq $0xf
popq %r13
movl %ebx, %esi
movl %r13d, %edx
movq %r15, %rcx
xorl %eax, %eax
callq 0x10e0
movq (%rbp), %rdi
leaq 0x6302(%rip), %rcx      # 0xaaf2
movl %r12d, %esi
movl %r14d, %edx
xorl %eax, %eax
callq 0x10e0
movq (%rbp), %rdi
leaq 0x62a8(%rip), %rcx      # 0xaab0
movl %r13d, %esi
movl %ebx, %edx
xorl %eax, %eax
callq 0x10e0
movq (%rbp), %rdi
movl $0x400, %esi            # imm = 0x400
xorl %edx, %edx
callq 0x11b0
movq (%rbp), %rdi
movl $0x600, %esi            # imm = 0x600
xorl %edx, %edx
callq 0x1110
movq (%rbp), %rdi
pushq $0x11
popq %r15
movl %ebx, %esi
movl %r15d, %edx
leaq 0x647e(%rip), %rbx      # 0xacc6
movq %rbx, %rcx
xorl %eax, %eax
callq 0x10e0
movq (%rbp), %rdi
movl %r14d, %esi
movl %r15d, %edx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x10e0
movq (%rbp), %rdi
movl $0x600, %esi            # imm = 0x600
xorl %edx, %edx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x11b0
// File: /workspace/github_c_makefile_star2_O2/return5[P]c_ish_one/./src/printenemy.c
// Function: printDog
void printDog(void) {
	wattron(game_win,WHITE);
	mvwprintw(game_win,12,26,"_"); //top of head
	mvwprintw(game_win,13,25,"<"); //snout
	wattroff(game_win,WHITE);
	wattron(game_win,RED);
	mvwprintw(game_win,13,26,"="); //eyes?
	wattroff(game_win,RED);	
	wattron(game_win,YELLOW);
	mvwprintw(game_win,12,27,"/"); //ears
	mvwprintw(game_win,13,27,"\\_______/"); //upperbody
	mvwprintw(game_win,14,28,"/\\    /\\"); //upper legs
	mvwprintw(game_win,15,27,"/  \\  /  \\"); //lower legs
	wattroff(game_win,YELLOW);	
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0x987e(%rip), %r15      # 0xe110
movq (%r15), %rdi
movl $0x200, %esi            # imm = 0x200
xorl %edx, %edx
callq 0x1110
movq (%r15), %rdi
leaq 0x63cc(%rip), %rcx      # 0xac77
pushq $0xc
popq %rbx
pushq $0x1a
popq %r14
movl %ebx, %esi
movl %r14d, %edx
xorl %eax, %eax
callq 0x10e0
movq (%r15), %rdi
leaq 0x61ee(%rip), %rcx      # 0xaab6
pushq $0xd
popq %rbp
pushq $0x19
popq %rdx
movl %ebp, %esi
xorl %eax, %eax
callq 0x10e0
movq (%r15), %rdi
movl $0x200, %esi            # imm = 0x200
xorl %edx, %edx
callq 0x11b0
movq (%r15), %rdi
movl $0x600, %esi            # imm = 0x600
xorl %edx, %edx
callq 0x1110
movq (%r15), %rdi
leaq 0x61b9(%rip), %rcx      # 0xaab8
movl %ebp, %esi
movl %r14d, %edx
xorl %eax, %eax
callq 0x10e0
movq (%r15), %rdi
movl $0x600, %esi            # imm = 0x600
xorl %edx, %edx
callq 0x11b0
movq (%r15), %rdi
movl $0x400, %esi            # imm = 0x400
xorl %edx, %edx
callq 0x1110
movq (%r15), %rdi
leaq 0x627e(%rip), %rcx      # 0xabb1
pushq $0x1b
popq %r14
movl %ebx, %esi
movl %r14d, %edx
xorl %eax, %eax
callq 0x10e0
movq (%r15), %rdi
leaq 0x616d(%rip), %rcx      # 0xaaba
movl %ebp, %esi
movl %r14d, %edx
xorl %eax, %eax
callq 0x10e0
movq (%r15), %rdi
leaq 0x6161(%rip), %rcx      # 0xaac4
pushq $0xe
popq %rsi
pushq $0x1c
popq %rdx
xorl %eax, %eax
callq 0x10e0
movq (%r15), %rdi
leaq 0x6153(%rip), %rcx      # 0xaacd
pushq $0xf
popq %rsi
movl %r14d, %edx
xorl %eax, %eax
callq 0x10e0
movq (%r15), %rdi
movl $0x400, %esi            # imm = 0x400
xorl %edx, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x11b0
// File: /workspace/github_c_makefile_star2_O2/return5[P]c_ish_one/./src/printenemy.c
// Function: printDelmerBody
void printDelmerBody(const int y, const int x) {
	wattron(game_win,YELLOW);
	mvwprintw(game_win,11+y,29+x,"^"); //top of body
	mvwprintw(game_win,12+y,27+x,"<( )>"); //side of body
	mvwprintw(game_win,13+y,29+x,"v"); // bottom of body
	wattroff(game_win,YELLOW);
	wattron(game_win,RED);
	mvwprintw(game_win,12+y,29+x,"0"); //eye
	wattroff(game_win,RED);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %r15d
movl %edi, %r14d
leaq 0x975b(%rip), %r12      # 0xe110
movq (%r12), %rdi
movl $0x400, %esi            # imm = 0x400
xorl %edx, %edx
callq 0x1110
movq (%r12), %rdi
leal 0xb(%r14), %esi
leal 0x1d(%r15), %ebx
leaq 0x6181(%rip), %rcx      # 0xab59
movl %ebx, %edx
xorl %eax, %eax
callq 0x10e0
movq (%r12), %rdi
leal 0xc(%r14), %ebp
addl $0x1b, %r15d
leaq 0x60e4(%rip), %rcx      # 0xaad8
movl %ebp, %esi
movl %r15d, %edx
xorl %eax, %eax
callq 0x10e0
movq (%r12), %rdi
addl $0xd, %r14d
leaq 0x60cf(%rip), %rcx      # 0xaade
movl %r14d, %esi
movl %ebx, %edx
xorl %eax, %eax
callq 0x10e0
movq (%r12), %rdi
movl $0x400, %esi            # imm = 0x400
xorl %edx, %edx
callq 0x11b0
movq (%r12), %rdi
movl $0x600, %esi            # imm = 0x600
xorl %edx, %edx
callq 0x1110
movq (%r12), %rdi
leaq 0x609a(%rip), %rcx      # 0xaae0
movl %ebp, %esi
movl %ebx, %edx
xorl %eax, %eax
callq 0x10e0
movq (%r12), %rdi
movl $0x600, %esi            # imm = 0x600
xorl %edx, %edx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x11b0