// File: /workspace/github_c_makefile_star2_O2/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 %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x1c(%rdi), %rax
xorl %ecx, %ecx
cmpq $0xb, %rcx
je 0xb343
andl $0x0, (%rax)
movl %ecx, -0x4(%rax)
incq %rcx
addq $0x20, %rax
jmp 0xb32e
leaq 0x413c(%rip), %rax      # 0xf486
movq %rax, (%rbx)
leaq 0x413e(%rip), %rax      # 0xf492
movq %rax, 0x8(%rbx)
movabsq $0x1400000000, %rax     # imm = 0x1400000000
movq %rax, 0x10(%rbx)
leaq 0x419d(%rip), %rax      # 0xf50a
movq %rax, 0x20(%rbx)
leaq 0x41a2(%rip), %rax      # 0xf51a
movq %rax, 0x28(%rbx)
movabsq $0xf00000000, %rax      # imm = 0xF00000000
movq %rax, 0x30(%rbx)
leaq 0x41ff(%rip), %rax      # 0xf590
movq %rax, 0x40(%rbx)
leaq 0x4201(%rip), %rax      # 0xf59d
movq %rax, 0x48(%rbx)
movabsq $0x6400000000, %rax     # imm = 0x6400000000
movq %rax, 0x50(%rbx)
leaq 0x42c2(%rip), %rax      # 0xf677
movq %rax, 0x60(%rbx)
leaq 0x42c9(%rip), %rax      # 0xf689
movq %rax, 0x68(%rbx)
movabsq $0x3e800000002, %rax    # imm = 0x3E800000002
movq %rax, 0x70(%rbx)
leaq 0x4309(%rip), %rax      # 0xf6e2
movq %rax, 0x80(%rbx)
leaq 0x4320(%rip), %rax      # 0xf707
movq %rax, 0x88(%rbx)
movl $0x5, 0x90(%rbx)
callq 0x11d0
pushq $0xa
popq %rcx
cltd
idivl %ecx
movl %edx, 0x94(%rbx)
leaq 0x4341(%rip), %rax      # 0xf751
movq %rax, 0xa0(%rbx)
leaq 0x433a(%rip), %rax      # 0xf758
movq %rax, 0xa8(%rbx)
movabsq $0x1400000001, %rax     # imm = 0x1400000001
movq %rax, 0xb0(%rbx)
leaq 0x4348(%rip), %rax      # 0xf785
movq %rax, 0xc0(%rbx)
leaq 0x4355(%rip), %rax      # 0xf7a0
movq %rax, 0xc8(%rbx)
pushq $0x6
popq %rbp
movl %ebp, 0xd0(%rbx)
callq 0x11d0
pushq $0x7
popq %r14
cltd
idivl %r14d
movl %edx, 0xd4(%rbx)
leaq 0x4362(%rip), %rax      # 0xf7d7
movq %rax, 0xe0(%rbx)
leaq 0x4362(%rip), %rax      # 0xf7e5
movq %rax, 0xe8(%rbx)
movl %ebp, 0xf0(%rbx)
callq 0x11d0
cltd
idivl %r14d
movl %edx, 0xf4(%rbx)
leaq 0x437e(%rip), %rax      # 0xf824
movq %rax, 0x100(%rbx)
leaq 0x4385(%rip), %rax      # 0xf839
movq %rax, 0x108(%rbx)
pushq $0x4
popq %rbp
movl %ebp, 0x110(%rbx)
callq 0x11d0
pushq $0xf
popq %r14
cltd
idivl %r14d
movl %edx, 0x114(%rbx)
leaq 0x43a5(%rip), %rax      # 0xf883
movq %rax, 0x120(%rbx)
leaq 0x43a8(%rip), %rax      # 0xf894
movq %rax, 0x128(%rbx)
movabsq $0x2800000003, %rax     # imm = 0x2800000003
movq %rax, 0x130(%rbx)
leaq 0x43f4(%rip), %rax      # 0xf8ff
movq %rax, 0x140(%rbx)
leaq 0x43f4(%rip), %rax      # 0xf90d
movq %rax, 0x148(%rbx)
movl %ebp, 0x150(%rbx)
callq 0x11d0
cltd
idivl %r14d
movl %edx, 0x154(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
nop