// File: /workspace/github_c_makefile_star2_O1/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
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x1c(%rdi), %rax
xorl %ecx, %ecx
movl $0x0, (%rax)
movl %ecx, -0x4(%rax)
incq %rcx
addq $0x20, %rax
cmpq $0xb, %rcx
jne 0xca44
leaq 0x4965(%rip), %rax      # 0x113c6
movq %rax, (%rbx)
leaq 0x4967(%rip), %rax      # 0x113d2
movq %rax, 0x8(%rbx)
movabsq $0x1400000000, %rax     # imm = 0x1400000000
movq %rax, 0x10(%rbx)
leaq 0x49c6(%rip), %rax      # 0x1144a
movq %rax, 0x20(%rbx)
leaq 0x49cb(%rip), %rax      # 0x1145a
movq %rax, 0x28(%rbx)
movabsq $0xf00000000, %rax      # imm = 0xF00000000
movq %rax, 0x30(%rbx)
leaq 0x4a28(%rip), %rax      # 0x114d0
movq %rax, 0x40(%rbx)
leaq 0x4a2a(%rip), %rax      # 0x114dd
movq %rax, 0x48(%rbx)
movabsq $0x6400000000, %rax     # imm = 0x6400000000
movq %rax, 0x50(%rbx)
leaq 0x4aeb(%rip), %rax      # 0x115b7
movq %rax, 0x60(%rbx)
leaq 0x4af2(%rip), %rax      # 0x115c9
movq %rax, 0x68(%rbx)
movabsq $0x3e800000002, %rax    # imm = 0x3E800000002
movq %rax, 0x70(%rbx)
leaq 0x4b32(%rip), %rax      # 0x11622
movq %rax, 0x80(%rbx)
leaq 0x4b49(%rip), %rax      # 0x11647
movq %rax, 0x88(%rbx)
movl $0x5, 0x90(%rbx)
callq 0x11d0
cltq
imulq $0x66666667, %rax, %rcx # imm = 0x66666667
movq %rcx, %rdx
shrq $0x3f, %rdx
shrq $0x20, %rcx
sarl $0x2, %ecx
addl %edx, %ecx
addl %ecx, %ecx
leal (%rcx,%rcx,4), %ecx
subl %ecx, %eax
movl %eax, 0x94(%rbx)
leaq 0x4b50(%rip), %rax      # 0x11691
movq %rax, 0xa0(%rbx)
leaq 0x4b49(%rip), %rax      # 0x11698
movq %rax, 0xa8(%rbx)
movabsq $0x1400000001, %rax     # imm = 0x1400000001
movq %rax, 0xb0(%rbx)
leaq 0x4b57(%rip), %rax      # 0x116c5
movq %rax, 0xc0(%rbx)
leaq 0x4b64(%rip), %rax      # 0x116e0
movq %rax, 0xc8(%rbx)
movl $0x6, %ebp
movl %ebp, 0xd0(%rbx)
callq 0x11d0
cltq
imulq $-0x6db6db6d, %rax, %rcx # imm = 0x92492493
shrq $0x20, %rcx
addl %eax, %ecx
movl %ecx, %edx
shrl $0x1f, %edx
sarl $0x2, %ecx
addl %edx, %ecx
leal (,%rcx,8), %edx
subl %edx, %ecx
addl %eax, %ecx
movl %ecx, 0xd4(%rbx)
leaq 0x4b53(%rip), %rax      # 0x11717
movq %rax, 0xe0(%rbx)
leaq 0x4b53(%rip), %rax      # 0x11725
movq %rax, 0xe8(%rbx)
movl %ebp, 0xf0(%rbx)
callq 0x11d0
cltq
imulq $-0x6db6db6d, %rax, %rcx # imm = 0x92492493
shrq $0x20, %rcx
addl %eax, %ecx
movl %ecx, %edx
shrl $0x1f, %edx
sarl $0x2, %ecx
addl %edx, %ecx
leal (,%rcx,8), %edx
subl %edx, %ecx
addl %eax, %ecx
movl %ecx, 0xf4(%rbx)
leaq 0x4b4f(%rip), %rax      # 0x11764
movq %rax, 0x100(%rbx)
leaq 0x4b56(%rip), %rax      # 0x11779
movq %rax, 0x108(%rbx)
movl $0x4, %ebp
movl %ebp, 0x110(%rbx)
callq 0x11d0
cltq
imulq $-0x77777777, %rax, %rcx # imm = 0x88888889
shrq $0x20, %rcx
addl %eax, %ecx
movl %ecx, %edx
shrl $0x1f, %edx
sarl $0x3, %ecx
addl %edx, %ecx
leal (%rcx,%rcx,4), %ecx
leal (%rcx,%rcx,2), %ecx
subl %ecx, %eax
movl %eax, 0x114(%rbx)
leaq 0x4b5b(%rip), %rax      # 0x117c3
movq %rax, 0x120(%rbx)
leaq 0x4b5e(%rip), %rax      # 0x117d4
movq %rax, 0x128(%rbx)
movabsq $0x2800000003, %rax     # imm = 0x2800000003
movq %rax, 0x130(%rbx)
leaq 0x4baa(%rip), %rax      # 0x1183f
movq %rax, 0x140(%rbx)
leaq 0x4baa(%rip), %rax      # 0x1184d
movq %rax, 0x148(%rbx)
movl %ebp, 0x150(%rbx)
callq 0x11d0
cltq
imulq $-0x77777777, %rax, %rcx # imm = 0x88888889
shrq $0x20, %rcx
addl %eax, %ecx
movl %ecx, %edx
shrl $0x1f, %edx
sarl $0x3, %ecx
addl %edx, %ecx
leal (%rcx,%rcx,4), %ecx
leal (%rcx,%rcx,2), %ecx
subl %ecx, %eax
movl %eax, 0x154(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop