// File: /workspace/github_cpp_makefile_star2_O3/t0mm4rx[P]piscine_cpp/day01/ex06/main.cpp
// Function: main
int main()
{

	Weapon club1 = Weapon("crude spiked club");
	HumanA bob("Bob", club1);
	bob.attack();
	club1.setType("some other type of club");
	bob.attack();

	Weapon club2 = Weapon("crude spiked club");
	HumanB jim("Jim");
	jim.setWeapon(club2);
	jim.attack();
	club2.setType("some other type of club");
	jim.attack();

}

// Assembly:
pushq %r14
pushq %rbx
subq $0x158, %rsp            # imm = 0x158
leaq 0x148(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0xa70(%rip), %rsi       # 0x2041
leaq 0xa7a(%rip), %rdx       # 0x2052
leaq 0x138(%rsp), %rbx
movq %rbx, %rdi
callq 0x19ba
leaq 0xf0(%rsp), %rdi
movq %rbx, %rsi
callq 0x14e0
movq 0x138(%rsp), %rdi
cmpq %r14, %rdi
je 0x1615
movq 0x148(%rsp), %rsi
incq %rsi
callq 0x10a0
leaq 0xb8(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0xa2b(%rip), %rsi       # 0x2053
leaq 0xa27(%rip), %rdx       # 0x2056
leaq 0xa8(%rsp), %rdi
callq 0x19ba
leaq 0x110(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
leaq 0xf0(%rsp), %rdx
callq 0x126c
movq 0xa8(%rsp), %rdi
cmpq %r14, %rdi
je 0x1676
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x10a0
leaq 0x110(%rsp), %rdi
callq 0x1290
leaq 0x98(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x9c1(%rip), %rsi       # 0x2057
leaq 0x9d1(%rip), %rdx       # 0x206e
leaq 0x88(%rsp), %rdi
callq 0x19ba
leaq 0xf0(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x158c
movq 0x88(%rsp), %rdi
cmpq %r14, %rdi
je 0x16dc
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x10a0
leaq 0x110(%rsp), %rdi
callq 0x1290
leaq 0x58(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x948(%rip), %rsi       # 0x2041
leaq 0x952(%rip), %rdx       # 0x2052
leaq 0x48(%rsp), %rdi
callq 0x19ba
leaq 0x68(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x14e0
movq 0x48(%rsp), %rdi
cmpq %r14, %rdi
je 0x1730
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x10a0
leaq 0x38(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x92f(%rip), %rsi       # 0x206f
leaq 0x92b(%rip), %rdx       # 0x2072
leaq 0x28(%rsp), %rdi
callq 0x19ba
leaq 0xc8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x13f0
movq 0x28(%rsp), %rdi
cmpq %r14, %rdi
je 0x177a
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x10a0
leaq 0xc8(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x14da
leaq 0xc8(%rsp), %rdi
callq 0x1412
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x8ae(%rip), %rsi       # 0x2057
leaq 0x8be(%rip), %rdx       # 0x206e
leaq 0x8(%rsp), %rdi
callq 0x19ba
leaq 0x68(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x158c
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x17e0
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x10a0
leaq 0xc8(%rsp), %rdi
callq 0x1412
leaq 0xe0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x180e
movq 0xe0(%rsp), %rsi
incq %rsi
callq 0x10a0
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1829
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x10a0
leaq 0x128(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x184a
movq 0x128(%rsp), %rsi
incq %rsi
callq 0x10a0
leaq 0x100(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x186b
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x10a0
xorl %eax, %eax
addq $0x158, %rsp            # imm = 0x158
popq %rbx
popq %r14
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x1938
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x10a0
jmp 0x1938
jmp 0x1935
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r14, %rdi
je 0x1959
movq 0x38(%rsp), %rsi
jmp 0x1951
movq %rax, %rbx
jmp 0x1959
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r14, %rdi
je 0x1974
movq 0x58(%rsp), %rsi
jmp 0x196c
jmp 0x1930
movq %rax, %rbx
movq 0x88(%rsp), %rdi
cmpq %r14, %rdi
je 0x1974
movq 0x98(%rsp), %rsi
jmp 0x196c
jmp 0x1930
movq %rax, %rbx
movq 0xa8(%rsp), %rdi
cmpq %r14, %rdi
je 0x1995
movq 0xb8(%rsp), %rsi
jmp 0x198d
movq %rax, %rbx
jmp 0x1995
movq %rax, %rbx
movq 0x138(%rsp), %rdi
jmp 0x19a1
movq %rax, %rbx
jmp 0x1974
movq %rax, %rbx
leaq 0xe0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1959
movq 0xe0(%rsp), %rsi
incq %rsi
callq 0x10a0
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1974
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x10a0
leaq 0x128(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1995
movq 0x128(%rsp), %rsi
incq %rsi
callq 0x10a0
leaq 0x100(%rsp), %r14
movq -0x10(%r14), %rdi
cmpq %r14, %rdi
je 0x19b1
movq (%r14), %rsi
incq %rsi
callq 0x10a0
movq %rbx, %rdi
callq 0x10d0
nop