// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r15
movq %rdx, %r13
movq %rsi, -0x30(%rbp)
movq %rdi, %r14
leaq 0x507d(%rip), %rsi      # 0x90b3
movq %rcx, %rdi
callq 0x37cd
testb %al, %al
je 0x405e
movl 0x78(%r14), %ebx
pushq $0x18
popq %rdi
callq 0x31b0
movq %rax, %r15
movq %rax, %rdi
callq 0x3898
jmp 0x411c
leaq 0x505c(%rip), %rsi      # 0x90c1
movq %r15, %rdi
callq 0x37cd
testb %al, %al
je 0x408d
movl 0x7c(%r14), %ebx
pushq $0x18
popq %rdi
callq 0x31b0
movq %rax, %r15
movq %rax, %rdi
callq 0x7e80
jmp 0x411c
leaq 0x5035(%rip), %rsi      # 0x90c9
movq %r15, %rdi
callq 0x37cd
testb %al, %al
je 0x40bc
movl 0x80(%r14), %ebx
pushq $0x18
popq %rdi
callq 0x31b0
movq %rax, %r15
movq %rax, %rdi
callq 0x369c
jmp 0x411c
leaq 0x500e(%rip), %rsi      # 0x90d1
movq %r15, %rdi
callq 0x37cd
testb %al, %al
je 0x40eb
movl 0x84(%r14), %ebx
pushq $0x18
popq %rdi
callq 0x31b0
movq %rax, %r15
movq %rax, %rdi
callq 0x7c4c
jmp 0x411c
leaq 0x4fe8(%rip), %rsi      # 0x90da
movq %r15, %rdi
callq 0x37cd
testb %al, %al
je 0x4287
movl 0x88(%r14), %ebx
pushq $0x18
popq %rdi
callq 0x31b0
movq %rax, %r15
movq %rax, %rdi
callq 0x7f3c
movq %r15, %r12
leaq 0x4f8d(%rip), %rsi      # 0x90b3
movq %r13, %rdi
callq 0x37cd
testb %al, %al
je 0x4155
movq -0x30(%rbp), %rax
movl 0x78(%rax), %r13d
pushq $0x18
popq %rdi
callq 0x31b0
movq %rax, %r15
movq %rax, %rdi
callq 0x3898
xorl %r14d, %r14d
jmp 0x422d
leaq 0x4f65(%rip), %rsi      # 0x90c1
movq %r13, %rdi
callq 0x37cd
testb %al, %al
je 0x418a
movq -0x30(%rbp), %rax
movl 0x7c(%rax), %r13d
pushq $0x18
popq %rdi
callq 0x31b0
movq %rax, %r15
movq %rax, %rdi
callq 0x7e80
pushq $0x1
jmp 0x422b
leaq 0x4f38(%rip), %rsi      # 0x90c9
movq %r13, %rdi
callq 0x37cd
testb %al, %al
je 0x41bf
movq -0x30(%rbp), %rax
movl 0x80(%rax), %r13d
pushq $0x18
popq %rdi
callq 0x31b0
movq %rax, %r15
movq %rax, %rdi
callq 0x369c
pushq $0x2
jmp 0x422b
leaq 0x4f0b(%rip), %rsi      # 0x90d1
movq %r13, %rdi
callq 0x37cd
testb %al, %al
je 0x41f4
movq -0x30(%rbp), %rax
movl 0x84(%rax), %r13d
pushq $0x18
popq %rdi
callq 0x31b0
movq %rax, %r15
movq %rax, %rdi
callq 0x7c4c
pushq $0x3
jmp 0x422b
leaq 0x4edf(%rip), %rsi      # 0x90da
movq %r13, %rdi
callq 0x37cd
testb %al, %al
je 0x428e
movq -0x30(%rbp), %rax
movl 0x88(%rax), %r13d
pushq $0x18
popq %rdi
callq 0x31b0
movq %rax, %r15
movq %rax, %rdi
callq 0x7f3c
pushq $0x4
popq %r14
movq (%r12), %rax
movq %r12, %rdi
movl %ebx, %esi
movq %r15, %rdx
movl %r13d, %ecx
callq *0x10(%rax)
movq -0x30(%rbp), %rcx
subl %eax, 0x78(%rcx,%r14,4)
testl %eax, %eax
je 0x4252
subl %eax, 0x8c(%rcx)
movq (%r12), %rax
movq %r12, %rdi
callq *0x8(%rax)
testq %r15, %r15
je 0x4278
movq (%r15), %rax
movq %r15, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *0x8(%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %ebx, %ebx
jmp 0x411f
xorl %r13d, %r13d
jmp 0x414d
jmp 0x42a8
jmp 0x42a8
jmp 0x42a8
jmp 0x42a8
jmp 0x42a8
jmp 0x42a8
jmp 0x42a8
jmp 0x42a8
jmp 0x42a8
movq %rax, %rbx
pushq $0x18
popq %rsi
movq %r15, %rdi
callq 0x31c0
movq %rbx, %rdi
callq 0x32f0