// File: Oralf[P]Heros/Hero.cpp
// Function: Hero::AttackHero(Hero&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>) const
void Hero:: AttackHero(Hero& defenceHero, string defenceCreature, string attackCreature)const{
	int numOfAttackC=0;
	Creature* attack;
	Creature* defence;
	if(attackCreature== "Black_Dragon"){
		numOfAttackC= numOfCretures[blackDragon_e];
		attack = new Black_Dragon;
	}
	else if( attackCreature== "Wizard"){
		numOfAttackC= numOfCretures[wizard_e];
		attack = new Wizard;
	}
	else if( attackCreature== "Archer"){
		numOfAttackC= numOfCretures[archer_e];
		attack = new Archer;
	}
	else if(attackCreature== "Vampire"){
		numOfAttackC= numOfCretures[vampire_e];
		attack = new Vampire;
	}
	else if(attackCreature== "Zombie"){
		numOfAttackC= numOfCretures[zombie_e];
		attack = new Zombie;
	}

	int  numOfDefenceC=0;
	creatureType place;
	if( defenceCreature== "Black_Dragon"){
		numOfDefenceC= defenceHero.numOfCretures[blackDragon_e];
		place = blackDragon_e;
		defence = new Black_Dragon;
	}
	else if( defenceCreature== "Wizard"){
		numOfDefenceC= defenceHero.numOfCretures[wizard_e];
		place = wizard_e;
		defence = new Wizard;
	}
	else if( defenceCreature== "Archer"){
		numOfDefenceC= defenceHero.numOfCretures[archer_e];
		place = archer_e;
		defence = new Archer;
	}
	else if(defenceCreature== "Vampire"){
		numOfDefenceC= defenceHero.numOfCretures[vampire_e];
		place = vampire_e;
		defence = new Vampire;
	}
	else if( defenceCreature== "Zombie"){
		numOfDefenceC= defenceHero.numOfCretures[zombie_e];
		place = zombie_e;
		defence = new Zombie;
	}
	int numOfDead=attack->CreatureAttack(numOfAttackC,*defence,numOfDefenceC);
	defenceHero.numOfCretures[place]-=numOfDead;
	defenceHero.setTotalCreatures(-numOfDead);
	delete attack;
	delete defence;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rcx, -0x70(%rbp)
movq %rdi, %rax
movq -0x70(%rbp), %rdi
movq %rdx, -0x68(%rbp)
movq %rdi, -0x60(%rbp)
movq %rax, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rdi, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x58(%rbp)
movl $0x0, -0x24(%rbp)
leaq 0x751f(%rip), %rsi      # 0xc0b3
callq 0x3b10
testb $0x1, %al
jne 0x4b9f
jmp 0x4bf0
movq -0x58(%rbp), %rax
movl 0x78(%rax), %eax
movl %eax, -0x24(%rbp)
movl $0x18, %edi
callq 0x3230
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x78(%rbp)
callq 0x3e40
jmp 0x4bc4
movq -0x78(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0x4db5
movq -0x78(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
movl $0x18, %esi
callq 0x3240
jmp 0x509b
movq -0x60(%rbp), %rdi
leaq 0x74c6(%rip), %rsi      # 0xc0c1
callq 0x3b10
testb $0x1, %al
jne 0x4c06
jmp 0x4c57
movq -0x58(%rbp), %rax
movl 0x7c(%rax), %eax
movl %eax, -0x24(%rbp)
movl $0x18, %edi
callq 0x3230
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x80(%rbp)
callq 0xba50
jmp 0x4c2b
movq -0x80(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0x4db3
movq -0x80(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
movl $0x18, %esi
callq 0x3240
jmp 0x509b
movq -0x60(%rbp), %rdi
leaq 0x7467(%rip), %rsi      # 0xc0c9
callq 0x3b10
testb $0x1, %al
jne 0x4c6d
jmp 0x4cca
movq -0x58(%rbp), %rax
movl 0x80(%rax), %eax
movl %eax, -0x24(%rbp)
movl $0x18, %edi
callq 0x3230
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x88(%rbp)
callq 0x3890
jmp 0x4c98
movq -0x88(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0x4db1
movq -0x88(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
movl $0x18, %esi
callq 0x3240
jmp 0x509b
movq -0x60(%rbp), %rdi
leaq 0x73fc(%rip), %rsi      # 0xc0d1
callq 0x3b10
testb $0x1, %al
jne 0x4ce0
jmp 0x4d3d
movq -0x58(%rbp), %rax
movl 0x84(%rax), %eax
movl %eax, -0x24(%rbp)
movl $0x18, %edi
callq 0x3230
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x90(%rbp)
callq 0xb690
jmp 0x4d0b
movq -0x90(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0x4daf
movq -0x90(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
movl $0x18, %esi
callq 0x3240
jmp 0x509b
movq -0x60(%rbp), %rdi
leaq 0x7392(%rip), %rsi      # 0xc0da
callq 0x3b10
testb $0x1, %al
jne 0x4d53
jmp 0x4dad
movq -0x58(%rbp), %rax
movl 0x88(%rax), %eax
movl %eax, -0x24(%rbp)
movl $0x18, %edi
callq 0x3230
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x98(%rbp)
callq 0xbbe0
jmp 0x4d7e
movq -0x98(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0x4dad
movq -0x98(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
movl $0x18, %esi
callq 0x3240
jmp 0x509b
jmp 0x4daf
jmp 0x4db1
jmp 0x4db3
jmp 0x4db5
movq -0x68(%rbp), %rdi
movl $0x0, -0x48(%rbp)
leaq 0x72ec(%rip), %rsi      # 0xc0b3
callq 0x3b10
testb $0x1, %al
jne 0x4dd2
jmp 0x4e33
movq -0x10(%rbp), %rax
movl 0x78(%rax), %eax
movl %eax, -0x48(%rbp)
movl $0x0, -0x4c(%rbp)
movl $0x18, %edi
callq 0x3230
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0xa0(%rbp)
callq 0x3e40
jmp 0x4e01
movq -0xa0(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0x501d
movq -0xa0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
movl $0x18, %esi
callq 0x3240
jmp 0x509b
movq -0x68(%rbp), %rdi
leaq 0x7283(%rip), %rsi      # 0xc0c1
callq 0x3b10
testb $0x1, %al
jne 0x4e49
jmp 0x4eaa
movq -0x10(%rbp), %rax
movl 0x7c(%rax), %eax
movl %eax, -0x48(%rbp)
movl $0x1, -0x4c(%rbp)
movl $0x18, %edi
callq 0x3230
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0xa8(%rbp)
callq 0xba50
jmp 0x4e78
movq -0xa8(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0x501b
movq -0xa8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
movl $0x18, %esi
callq 0x3240
jmp 0x509b
movq -0x68(%rbp), %rdi
leaq 0x7214(%rip), %rsi      # 0xc0c9
callq 0x3b10
testb $0x1, %al
jne 0x4ec0
jmp 0x4f24
movq -0x10(%rbp), %rax
movl 0x80(%rax), %eax
movl %eax, -0x48(%rbp)
movl $0x2, -0x4c(%rbp)
movl $0x18, %edi
callq 0x3230
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0xb0(%rbp)
callq 0x3890
jmp 0x4ef2
movq -0xb0(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0x5019
movq -0xb0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
movl $0x18, %esi
callq 0x3240
jmp 0x509b
movq -0x68(%rbp), %rdi
leaq 0x71a2(%rip), %rsi      # 0xc0d1
callq 0x3b10
testb $0x1, %al
jne 0x4f3a
jmp 0x4f9e
movq -0x10(%rbp), %rax
movl 0x84(%rax), %eax
movl %eax, -0x48(%rbp)
movl $0x3, -0x4c(%rbp)
movl $0x18, %edi
callq 0x3230
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0xb8(%rbp)
callq 0xb690
jmp 0x4f6c
movq -0xb8(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0x5017
movq -0xb8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
movl $0x18, %esi
callq 0x3240
jmp 0x509b
movq -0x68(%rbp), %rdi
leaq 0x7131(%rip), %rsi      # 0xc0da
callq 0x3b10
testb $0x1, %al
jne 0x4fb4
jmp 0x5015
movq -0x10(%rbp), %rax
movl 0x88(%rax), %eax
movl %eax, -0x48(%rbp)
movl $0x4, -0x4c(%rbp)
movl $0x18, %edi
callq 0x3230
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0xc0(%rbp)
callq 0xbbe0
jmp 0x4fe6
movq -0xc0(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0x5015
movq -0xc0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
movl $0x18, %esi
callq 0x3240
jmp 0x509b
jmp 0x5017
jmp 0x5019
jmp 0x501b
jmp 0x501d
movq -0x30(%rbp), %rdi
movl -0x24(%rbp), %esi
movq -0x38(%rbp), %rdx
movl -0x48(%rbp), %ecx
movq (%rdi), %rax
callq *0x10(%rax)
movl %eax, -0x50(%rbp)
movl -0x50(%rbp), %esi
movq -0x10(%rbp), %rax
movl -0x4c(%rbp), %ecx
movl 0x78(%rax,%rcx,4), %edx
subl %esi, %edx
movl %edx, 0x78(%rax,%rcx,4)
movq -0x10(%rbp), %rdi
xorl %esi, %esi
subl -0x50(%rbp), %esi
callq 0x50b0
movq -0x30(%rbp), %rax
movq %rax, -0xc8(%rbp)
cmpq $0x0, %rax
je 0x5074
movq -0xc8(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq -0x38(%rbp), %rax
movq %rax, -0xd0(%rbp)
cmpq $0x0, %rax
je 0x5092
movq -0xd0(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
addq $0xd0, %rsp
popq %rbp
retq
movq -0x40(%rbp), %rdi
callq 0x3400
nopw %cs:(%rax,%rax)