// File: /workspace/github_c_makefile_star2_O0/S01den[P]Lost_CavernRL/pnj.c
// Function: initQuest
void initQuest(Quest listQuests[])
{
	int i = 0;
	for(i = 0; i < NBR_QUESTS; i++)
	{
		listQuests[i].isSet = 0;
		listQuests[i].indice = i;
	}

	listQuests[0].name = "EXPIATION !"; // done
	listQuests[0].description = "Our god said that drugs are bad. I bet you can't stop it during the 3 next floors. And don't forget: GEMS ARE THE TRUTH";
	listQuests[0].typeReward = 0;  // 0 = heal from disease, 1 = heal life points, 2 = components, 3 = exotic blood, 4 = weapon, 5 = armor, 6 = drug
	listQuests[0].reward = 20; 

	listQuests[1].name = "EXHIBITIONIST !"; // done
	listQuests[1].description = "Our god said that wearing armors is sin. Please take of it until the next floor. And don't forget: GEMS ARE THE TRUTH";
	listQuests[1].typeReward = 0;
	listQuests[1].reward = 15;

	listQuests[2].name = "ERADICATOR !"; // done
	listQuests[2].description = "Our god said that technology is sin. Give up distance weapons now and forever and your soul will be treated. But don't abuse of our church, you wouldn't unleach the divine wrath... And don't forget: GEMS ARE THE TRUTH";
	listQuests[2].typeReward = 0;
	listQuests[2].reward = 100;

	listQuests[3].name = "THE LOST COMPUTER"; // done
	listQuests[3].description = "I've lost my laptop, it contains some... important data..., can you please bring me it ?";
	listQuests[3].typeReward = 2;
	listQuests[3].reward = 1000;

	listQuests[4].name = "KILL THE TURRETS, KILL THE TURRETS !"; //done
	listQuests[4].description = "The turrets are revolting against us ! Please help us to kill 5 of them !";
	listQuests[4].typeReward = 5;
	listQuests[4].reward = rand()%NBR_ARMORS;

	listQuests[5].name = "FIXING"; // done
	listQuests[5].description = "I need 50 components to fix my heal-machine.";
	listQuests[5].typeReward = 1;
	listQuests[5].reward = 20;

	listQuests[6].name = "THERE ARE MONSTERS HERE..."; //done
	listQuests[6].description = "Infected guardians terrify me, please kill 5 of them !";
	listQuests[6].typeReward = 6;
	listQuests[6].reward = rand()%NBR_DRUGS;
	
	listQuests[7].name = "THE LOST BONE"; // done
	listQuests[7].description = "I've lost my bone spear, can you bring me another one please ?";
	listQuests[7].typeReward = 6;
	listQuests[7].reward = rand()%NBR_DRUGS;

	listQuests[8].name = "BORN OF A BROKEN MAN"; //done
	listQuests[8].description = "Destroy 10 of theses damn droids; I can't stand this fucking corporation.";
	listQuests[8].typeReward = 4;
	listQuests[8].reward = rand()%NBR_WEAPONS;

	listQuests[9].name = "ANOTHER UNIVERSE"; // done
	listQuests[9].description = "I have to study the effects of hallucinogens drugs. Please kill someone under the effects of psychedelics.";
	listQuests[9].typeReward = 3;
	listQuests[9].reward = 40;

	listQuests[10].name = "GEMS ARE BLUE"; // done
	listQuests[10].description = "Thoses gems are a great source of power, we need to study it. Can you bring us 5 gems ?";
	listQuests[10].typeReward = 4;
	listQuests[10].reward = rand()%NBR_WEAPONS;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movl $0x0, -0xc(%rbp)
cmpl $0xb, -0xc(%rbp)
jge 0x14856
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movl $0x0, 0x1c(%rax)
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rdx
shlq $0x5, %rdx
addq %rdx, %rax
movl %ecx, 0x18(%rax)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x1481a
movq -0x8(%rbp), %rax
leaq 0x596d(%rip), %rcx      # 0x1a1ce
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
leaq 0x596b(%rip), %rcx      # 0x1a1da
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x10(%rax)
movq -0x8(%rbp), %rax
movl $0x14, 0x14(%rax)
movq -0x8(%rbp), %rax
leaq 0x59be(%rip), %rcx      # 0x1a252
movq %rcx, 0x20(%rax)
movq -0x8(%rbp), %rax
leaq 0x59bf(%rip), %rcx      # 0x1a262
movq %rcx, 0x28(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x30(%rax)
movq -0x8(%rbp), %rax
movl $0xf, 0x34(%rax)
movq -0x8(%rbp), %rax
leaq 0x5a10(%rip), %rcx      # 0x1a2d8
movq %rcx, 0x40(%rax)
movq -0x8(%rbp), %rax
leaq 0x5a0e(%rip), %rcx      # 0x1a2e5
movq %rcx, 0x48(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x50(%rax)
movq -0x8(%rbp), %rax
movl $0x64, 0x54(%rax)
movq -0x8(%rbp), %rax
leaq 0x5ac3(%rip), %rcx      # 0x1a3bf
movq %rcx, 0x60(%rax)
movq -0x8(%rbp), %rax
leaq 0x5ac6(%rip), %rcx      # 0x1a3d1
movq %rcx, 0x68(%rax)
movq -0x8(%rbp), %rax
movl $0x2, 0x70(%rax)
movq -0x8(%rbp), %rax
movl $0x3e8, 0x74(%rax)      # imm = 0x3E8
movq -0x8(%rbp), %rax
leaq 0x5afa(%rip), %rcx      # 0x1a42a
movq %rcx, 0x80(%rax)
movq -0x8(%rbp), %rax
leaq 0x5b0d(%rip), %rcx      # 0x1a44f
movq %rcx, 0x88(%rax)
movq -0x8(%rbp), %rax
movl $0x5, 0x90(%rax)
callq 0x21e0
movl $0xa, %ecx
cltd
idivl %ecx
movq -0x8(%rbp), %rax
movl %edx, 0x94(%rax)
movq -0x8(%rbp), %rax
leaq 0x5b20(%rip), %rcx      # 0x1a499
movq %rcx, 0xa0(%rax)
movq -0x8(%rbp), %rax
leaq 0x5b15(%rip), %rcx      # 0x1a4a0
movq %rcx, 0xa8(%rax)
movq -0x8(%rbp), %rax
movl $0x1, 0xb0(%rax)
movq -0x8(%rbp), %rax
movl $0x14, 0xb4(%rax)
movq -0x8(%rbp), %rax
leaq 0x5b14(%rip), %rcx      # 0x1a4cd
movq %rcx, 0xc0(%rax)
movq -0x8(%rbp), %rax
leaq 0x5b1d(%rip), %rcx      # 0x1a4e8
movq %rcx, 0xc8(%rax)
movq -0x8(%rbp), %rax
movl $0x6, 0xd0(%rax)
callq 0x21e0
movl $0x7, %ecx
cltd
idivl %ecx
movq -0x8(%rbp), %rax
movl %edx, 0xd4(%rax)
movq -0x8(%rbp), %rax
leaq 0x5b1d(%rip), %rcx      # 0x1a51f
movq %rcx, 0xe0(%rax)
movq -0x8(%rbp), %rax
leaq 0x5b19(%rip), %rcx      # 0x1a52d
movq %rcx, 0xe8(%rax)
movq -0x8(%rbp), %rax
movl $0x6, 0xf0(%rax)
callq 0x21e0
movl $0x7, %ecx
cltd
idivl %ecx
movq -0x8(%rbp), %rax
movl %edx, 0xf4(%rax)
movq -0x8(%rbp), %rax
leaq 0x5b21(%rip), %rcx      # 0x1a56c
movq %rcx, 0x100(%rax)
movq -0x8(%rbp), %rax
leaq 0x5b24(%rip), %rcx      # 0x1a581
movq %rcx, 0x108(%rax)
movq -0x8(%rbp), %rax
movl $0x4, 0x110(%rax)
callq 0x21e0
movl $0xf, %ecx
cltd
idivl %ecx
movq -0x8(%rbp), %rax
movl %edx, 0x114(%rax)
movq -0x8(%rbp), %rax
leaq 0x5b37(%rip), %rcx      # 0x1a5cb
movq %rcx, 0x120(%rax)
movq -0x8(%rbp), %rax
leaq 0x5b36(%rip), %rcx      # 0x1a5dc
movq %rcx, 0x128(%rax)
movq -0x8(%rbp), %rax
movl $0x3, 0x130(%rax)
movq -0x8(%rbp), %rax
movl $0x28, 0x134(%rax)
movq -0x8(%rbp), %rax
leaq 0x5b73(%rip), %rcx      # 0x1a647
movq %rcx, 0x140(%rax)
movq -0x8(%rbp), %rax
leaq 0x5b6f(%rip), %rcx      # 0x1a655
movq %rcx, 0x148(%rax)
movq -0x8(%rbp), %rax
movl $0x4, 0x150(%rax)
callq 0x21e0
movl $0xf, %ecx
cltd
idivl %ecx
movq -0x8(%rbp), %rax
movl %edx, 0x154(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)