// File: 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 %rbp
movq %rsp, %rbp
subq $0x1c0, %rsp            # imm = 0x1C0
leaq -0x41(%rbp), %rdi
movq %rdi, -0x198(%rbp)
callq 0x21c0
movq -0x198(%rbp), %rdx
leaq 0x99e(%rip), %rsi       # 0x3017
leaq -0x40(%rbp), %rdi
callq 0x2a80
jmp 0x2684
leaq -0x20(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x2570
jmp 0x2693
leaq -0x40(%rbp), %rdi
callq 0x2090
leaq -0x41(%rbp), %rdi
callq 0x2130
leaq -0xa1(%rbp), %rdi
movq %rdi, -0x1a0(%rbp)
callq 0x21c0
movq -0x1a0(%rbp), %rdx
leaq 0x963(%rip), %rsi       # 0x3029
leaq -0xa0(%rbp), %rdi
callq 0x2a80
jmp 0x26d4
leaq -0x80(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
leaq -0x20(%rbp), %rdx
callq 0x23b0
jmp 0x26ea
leaq -0xa0(%rbp), %rdi
callq 0x2090
leaq -0xa1(%rbp), %rdi
callq 0x2130
leaq -0x80(%rbp), %rdi
callq 0x23e0
jmp 0x270d
leaq -0xc9(%rbp), %rdi
movq %rdi, -0x1a8(%rbp)
callq 0x21c0
movq -0x1a8(%rbp), %rdx
leaq 0x8ff(%rip), %rsi       # 0x302d
leaq -0xc8(%rbp), %rdi
callq 0x2a80
jmp 0x273c
leaq -0x20(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
callq 0x2600
jmp 0x274e
leaq -0xc8(%rbp), %rdi
callq 0x2090
leaq -0xc9(%rbp), %rdi
callq 0x2130
leaq -0x80(%rbp), %rdi
callq 0x23e0
jmp 0x2771
leaq -0x111(%rbp), %rdi
movq %rdi, -0x1b0(%rbp)
callq 0x21c0
movq -0x1b0(%rbp), %rdx
leaq 0x885(%rip), %rsi       # 0x3017
leaq -0x110(%rbp), %rdi
callq 0x2a80
jmp 0x27a0
leaq -0xf0(%rbp), %rdi
leaq -0x110(%rbp), %rsi
callq 0x2570
jmp 0x27b5
leaq -0x110(%rbp), %rdi
callq 0x2090
leaq -0x111(%rbp), %rdi
callq 0x2130
leaq -0x161(%rbp), %rdi
movq %rdi, -0x1b8(%rbp)
callq 0x21c0
movq -0x1b8(%rbp), %rdx
leaq 0x857(%rip), %rsi       # 0x3045
leaq -0x160(%rbp), %rdi
callq 0x2a80
jmp 0x27fc
leaq -0x140(%rbp), %rdi
leaq -0x160(%rbp), %rsi
callq 0x2480
jmp 0x2811
leaq -0x160(%rbp), %rdi
callq 0x2090
leaq -0x161(%rbp), %rdi
callq 0x2130
leaq -0x140(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
callq 0x2550
jmp 0x283e
leaq -0x140(%rbp), %rdi
callq 0x24b0
jmp 0x284c
leaq -0x189(%rbp), %rdi
movq %rdi, -0x1c0(%rbp)
callq 0x21c0
movq -0x1c0(%rbp), %rdx
leaq 0x7c0(%rip), %rsi       # 0x302d
leaq -0x188(%rbp), %rdi
callq 0x2a80
jmp 0x287b
leaq -0xf0(%rbp), %rdi
leaq -0x188(%rbp), %rsi
callq 0x2600
jmp 0x2890
leaq -0x188(%rbp), %rdi
callq 0x2090
leaq -0x189(%rbp), %rdi
callq 0x2130
leaq -0x140(%rbp), %rdi
callq 0x24b0
jmp 0x28b6
leaq -0x140(%rbp), %rdi
callq 0x2b30
leaq -0xf0(%rbp), %rdi
callq 0x2b50
leaq -0x80(%rbp), %rdi
callq 0x2b70
leaq -0x20(%rbp), %rdi
callq 0x2b50
xorl %eax, %eax
addq $0x1c0, %rsp            # imm = 0x1C0
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x290e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x2090
leaq -0x41(%rbp), %rdi
callq 0x2130
jmp 0x2a70
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x2942
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x2090
leaq -0xa1(%rbp), %rdi
callq 0x2130
jmp 0x2a67
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x2a5e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x298a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x2090
leaq -0xc9(%rbp), %rdi
callq 0x2130
jmp 0x2a5e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x29c1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x110(%rbp), %rdi
callq 0x2090
leaq -0x111(%rbp), %rdi
callq 0x2130
jmp 0x2a5e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x29f8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x160(%rbp), %rdi
callq 0x2090
leaq -0x161(%rbp), %rdi
callq 0x2130
jmp 0x2a52
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x2a46
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x2a3a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x188(%rbp), %rdi
callq 0x2090
leaq -0x189(%rbp), %rdi
callq 0x2130
leaq -0x140(%rbp), %rdi
callq 0x2b30
leaq -0xf0(%rbp), %rdi
callq 0x2b50
leaq -0x80(%rbp), %rdi
callq 0x2b70
leaq -0x20(%rbp), %rdi
callq 0x2b50
movq -0x50(%rbp), %rdi
callq 0x21b0
nopl (%rax)