// File: /workspace/github_c_makefile_star2_O0/return5[P]c_ish_one/./src/initgame.c
// Function: makePlayer
static void makePlayer(void) {
	player = malloc(sizeof(tile));
	Character *character = malloc(sizeof(Character));
	player->character = character;
	PLAYER->health = getRandInt(15) + 20;
	PLAYER->health_max = PLAYER->health;
	PLAYER->defense = getRandInt(2) + 2;
	PLAYER->attack = getRandInt(2) + 6;
	PLAYER->crit_chance = 7;
	player->tile_set = '@';
	PLAYER->chance_to_dodge = 6;
	PLAYER->defense_value = PLAYER->defense;
	PLAYER->defense_up = 0;
	PLAYER->type = 0;
	PLAYER->name = "you";
	PLAYER->food = getRandInt(2) + 1;
	PLAYER->special = getRandInt(2);
	PLAYER->special_count = 0;
	PLAYER->turn = 0;
	PLAYER->regular_attack = malloc(150);
	PLAYER->regular_miss = malloc(150);
	PLAYER->counter_miss = malloc(150);
	PLAYER->critical_hit = malloc(150);
	PLAYER->special_attack = malloc(150);
	PLAYER->special_attack_miss = malloc(150);
	PLAYER->raise_defense = "you raise your defense by 2.";

	switch (PLAYER->special) {
		case 0:PLAYER->special_name = "throw opponent";
			break;
		case 1:PLAYER->special_name = "cast defense down spell";
			break;
		case 2:PLAYER->special_name = "do a power attack";
			break;
		default: //do nothing
			break;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl $0x38, %edi
callq 0x1160
movq %rax, %rcx
leaq 0xd92c(%rip), %rax      # 0x11148
movq %rax, -0x18(%rbp)
movq %rcx, (%rax)
movl $0xa8, %edi
callq 0x1160
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, -0x8(%rbp)
movq -0x8(%rbp), %rcx
movq (%rax), %rax
movq %rcx, 0x28(%rax)
movl $0xf, %edi
callq 0x3b00
movl %eax, %edx
movq -0x18(%rbp), %rax
addl $0x14, %edx
movq (%rax), %rcx
movq 0x28(%rcx), %rcx
movl %edx, (%rcx)
movq (%rax), %rax
movq 0x28(%rax), %rax
movl (%rax), %ecx
movl %ecx, 0xc(%rax)
movl $0x2, %edi
movl %edi, -0x24(%rbp)
callq 0x3b00
movl -0x24(%rbp), %edi
movl %eax, %ecx
movq -0x18(%rbp), %rax
addl $0x2, %ecx
movq (%rax), %rax
movq 0x28(%rax), %rax
movl %ecx, 0x14(%rax)
callq 0x3b00
movl -0x24(%rbp), %edi
movl %eax, %edx
movq -0x18(%rbp), %rax
addl $0x6, %edx
movq (%rax), %rcx
movq 0x28(%rcx), %rcx
movl %edx, 0x10(%rcx)
movq (%rax), %rcx
movq 0x28(%rcx), %rcx
movl $0x7, 0x18(%rcx)
movq (%rax), %rcx
movb $0x40, 0x20(%rcx)
movq (%rax), %rcx
movq 0x28(%rcx), %rcx
movl $0x6, 0x20(%rcx)
movq (%rax), %rcx
movq 0x28(%rcx), %rcx
movl 0x14(%rcx), %edx
movl %edx, 0x28(%rcx)
movq (%rax), %rcx
movq 0x28(%rcx), %rcx
movl $0x0, 0x24(%rcx)
movq (%rax), %rcx
movq 0x28(%rcx), %rcx
movl $0x0, 0x1c(%rcx)
movq (%rax), %rax
movq 0x28(%rax), %rax
leaq 0x6a39(%rip), %rcx      # 0xa33c
movq %rcx, 0x38(%rax)
callq 0x3b00
movl -0x24(%rbp), %edi
movl %eax, %ecx
movq -0x18(%rbp), %rax
incl %ecx
movq (%rax), %rax
movq 0x28(%rax), %rax
movl %ecx, 0x2c(%rax)
callq 0x3b00
movl %eax, %edx
movq -0x18(%rbp), %rax
movq (%rax), %rcx
movq 0x28(%rcx), %rcx
movl %edx, 0x30(%rcx)
movq (%rax), %rcx
movq 0x28(%rcx), %rcx
movl $0x0, 0x8(%rcx)
movq (%rax), %rax
movq 0x28(%rax), %rax
movl $0x0, 0x4(%rax)
movl $0x96, %edi
movq %rdi, -0x20(%rbp)
callq 0x1160
movq -0x20(%rbp), %rdi
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq 0x28(%rax), %rax
movq %rcx, 0x48(%rax)
callq 0x1160
movq -0x20(%rbp), %rdi
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq 0x28(%rax), %rax
movq %rcx, 0x50(%rax)
callq 0x1160
movq -0x20(%rbp), %rdi
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq 0x28(%rax), %rax
movq %rcx, 0x68(%rax)
callq 0x1160
movq -0x20(%rbp), %rdi
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq 0x28(%rax), %rax
movq %rcx, 0x78(%rax)
callq 0x1160
movq -0x20(%rbp), %rdi
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq 0x28(%rax), %rax
movq %rcx, 0x88(%rax)
callq 0x1160
movq %rax, %rdx
movq -0x18(%rbp), %rax
movq (%rax), %rcx
movq 0x28(%rcx), %rcx
movq %rdx, 0x90(%rcx)
movq (%rax), %rcx
movq 0x28(%rcx), %rcx
leaq 0x76fc(%rip), %rdx      # 0xb109
movq %rdx, 0x70(%rcx)
movq (%rax), %rax
movq 0x28(%rax), %rax
movl 0x30(%rax), %eax
movl %eax, -0xc(%rbp)
testl %eax, %eax
je 0x3a38
jmp 0x3a24
movl -0xc(%rbp), %eax
subl $0x1, %eax
je 0x3a53
jmp 0x3a2e
movl -0xc(%rbp), %eax
subl $0x2, %eax
je 0x3a6e
jmp 0x3a89
leaq 0xd709(%rip), %rax      # 0x11148
movq (%rax), %rax
movq 0x28(%rax), %rax
leaq 0x76d9(%rip), %rcx      # 0xb126
movq %rcx, 0x40(%rax)
jmp 0x3a8b
leaq 0xd6ee(%rip), %rax      # 0x11148
movq (%rax), %rax
movq 0x28(%rax), %rax
leaq 0x76cd(%rip), %rcx      # 0xb135
movq %rcx, 0x40(%rax)
jmp 0x3a8b
leaq 0xd6d3(%rip), %rax      # 0x11148
movq (%rax), %rax
movq 0x28(%rax), %rax
leaq 0x76ca(%rip), %rcx      # 0xb14d
movq %rcx, 0x40(%rax)
jmp 0x3a8b
jmp 0x3a8b
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)