// File: t0mm4rx[P]piscine_cpp/day07/ex01/iter.cpp
// Function: main
int main(void)
{
  int list[] = {0, 2, 3, -5, 6, 42, 8};
  std::string list2[] = {"Hey!", "Hello world,", "what's up?"};
  printList(list, 7);
  iter(list, 7, &fn);
  printList(list, 7);
  iter(list2, 3, &fn2);
  std::cout << std::endl;
  A list3[3];
  list3[0] = A(21);
  list3[1] = A(42);
  list3[2] = A(-42);
  iter(list3, 3, &fn3);
  std::cout << std::endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x140, %rsp            # imm = 0x140
movl $0x0, -0x4(%rbp)
movups 0xc23(%rip), %xmm0      # 0x305c
movups %xmm0, -0x14(%rbp)
movaps 0xc0c(%rip), %xmm0      # 0x3050
movaps %xmm0, -0x20(%rbp)
movb $0x1, -0x9f(%rbp)
leaq -0x80(%rbp), %rax
movq %rax, -0xc8(%rbp)
movq %rax, -0x88(%rbp)
leaq -0x89(%rbp), %rdi
movq %rdi, -0xc0(%rbp)
callq 0x21a0
movq -0xc8(%rbp), %rdi
movq -0xc0(%rbp), %rdx
leaq 0xb7d(%rip), %rsi       # 0x3006
callq 0x2800
jmp 0x2490
leaq -0x60(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq %rax, -0x88(%rbp)
leaq -0x9d(%rbp), %rdi
movq %rdi, -0xd0(%rbp)
callq 0x21a0
movq -0xd8(%rbp), %rdi
movq -0xd0(%rbp), %rdx
leaq 0xb41(%rip), %rsi       # 0x300b
callq 0x2800
jmp 0x24d1
leaq -0x40(%rbp), %rax
movq %rax, -0xe8(%rbp)
movq %rax, -0x88(%rbp)
leaq -0x9e(%rbp), %rdi
movq %rdi, -0xe0(%rbp)
callq 0x21a0
movq -0xe8(%rbp), %rdi
movq -0xe0(%rbp), %rdx
leaq 0xb0d(%rip), %rsi       # 0x3018
callq 0x2800
jmp 0x2512
movb $0x0, -0x9f(%rbp)
leaq -0x9e(%rbp), %rdi
callq 0x2110
leaq -0x9d(%rbp), %rdi
callq 0x2110
leaq -0x89(%rbp), %rdi
callq 0x2110
leaq -0x20(%rbp), %rdi
movl $0x7, %esi
callq 0x23b0
jmp 0x254d
leaq -0x244(%rip), %rdx      # 0x2310
leaq -0x20(%rbp), %rdi
movl $0x7, %esi
callq 0x28b0
jmp 0x2564
leaq -0x20(%rbp), %rdi
movl $0x7, %esi
callq 0x23b0
jmp 0x2574
leaq -0x24b(%rip), %rdx      # 0x2330
leaq -0x80(%rbp), %rdi
movl $0x3, %esi
callq 0x2900
jmp 0x258b
movq 0x2a46(%rip), %rdi      # 0x4fd8
movq 0x2a2f(%rip), %rsi      # 0x4fc8
callq 0x20f0
jmp 0x25a0
leaq -0xac(%rbp), %rax
movq %rax, %rcx
addq $0xc, %rcx
movq %rcx, -0xf8(%rbp)
movq %rax, -0xf0(%rbp)
movq -0xf0(%rbp), %rdi
movq %rdi, -0x100(%rbp)
xorl %esi, %esi
callq 0x2950
jmp 0x25d3
movq -0xf8(%rbp), %rcx
movq -0x100(%rbp), %rax
addq $0x4, %rax
cmpq %rcx, %rax
movq %rax, -0xf0(%rbp)
jne 0x25bc
leaq -0xb0(%rbp), %rdi
movl $0x15, %esi
callq 0x2950
jmp 0x2604
movl -0xb0(%rbp), %eax
movl %eax, -0xac(%rbp)
leaq -0xb4(%rbp), %rdi
movl $0x2a, %esi
callq 0x2950
jmp 0x2623
movl -0xb4(%rbp), %eax
movl %eax, -0xa8(%rbp)
leaq -0xb8(%rbp), %rdi
movl $0xffffffd6, %esi       # imm = 0xFFFFFFD6
callq 0x2950
jmp 0x2642
movl -0xb8(%rbp), %eax
movl %eax, -0xa4(%rbp)
leaq -0x2e5(%rip), %rdx      # 0x2370
leaq -0xac(%rbp), %rdi
movl $0x3, %esi
callq 0x2970
jmp 0x2668
movq 0x2969(%rip), %rdi      # 0x4fd8
movq 0x2952(%rip), %rsi      # 0x4fc8
callq 0x20f0
jmp 0x267d
leaq -0x80(%rbp), %rax
movq %rax, -0x110(%rbp)
addq $0x60, %rax
movq %rax, -0x108(%rbp)
movq -0x108(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x118(%rbp)
callq 0x2070
movq -0x110(%rbp), %rcx
movq -0x118(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x108(%rbp)
jne 0x2693
movl -0x4(%rbp), %eax
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x2722
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x2716
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x9e(%rbp), %rdi
callq 0x2110
leaq -0x9d(%rbp), %rdi
callq 0x2110
leaq -0x89(%rbp), %rdi
callq 0x2110
testb $0x1, -0x9f(%rbp)
jne 0x2739
jmp 0x2780
movq -0x88(%rbp), %rax
leaq -0x80(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x120(%rbp)
je 0x277e
movq -0x120(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x128(%rbp)
callq 0x2070
movq -0x128(%rbp), %rax
leaq -0x80(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x120(%rbp)
jne 0x2750
jmp 0x2780
jmp 0x27dd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x80(%rbp), %rax
movq %rax, -0x138(%rbp)
addq $0x60, %rax
movq %rax, -0x130(%rbp)
movq -0x130(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x140(%rbp)
callq 0x2070
movq -0x138(%rbp), %rcx
movq -0x140(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x130(%rbp)
jne 0x27aa
jmp 0x27dd
movq -0x98(%rbp), %rdi
callq 0x2190
nopl (%rax)