// File: iZhangHui[P]CppPrimer/CH16_TemplatesAndGenericProgramming/exercises/ex16_05.cc
// Function: main
int main(int argc, char const *argv[])
{
	std::array<std::string, 3> array= {"HELLO", "CPLUSPLUS", "PRIMER"};
	std::string s[] = {"hello", "cplusplus", "primer"};
	char c[] = { 'a', 'b', 'c', 'd' };
	int  i[] = { 1 };

	print(i);
	print(c);
	print(s);
	print(array);

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1c0, %rsp            # imm = 0x1C0
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x70(%rbp), %rax
movq %rax, -0x118(%rbp)
movb $0x1, -0x8f(%rbp)
movq %rax, -0x78(%rbp)
leaq -0x79(%rbp), %rdi
movq %rdi, -0x110(%rbp)
callq 0x10d0
movq -0x118(%rbp), %rdi
movq -0x110(%rbp), %rdx
leaq 0xd90(%rip), %rsi       # 0x2004
callq 0x1090
jmp 0x127b
movq -0x118(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x128(%rbp)
movq %rax, -0x78(%rbp)
leaq -0x8d(%rbp), %rdi
movq %rdi, -0x120(%rbp)
callq 0x10d0
movq -0x128(%rbp), %rdi
movq -0x120(%rbp), %rdx
leaq 0xd51(%rip), %rsi       # 0x200a
callq 0x1090
jmp 0x12c0
movq -0x118(%rbp), %rax
addq $0x40, %rax
movq %rax, -0x138(%rbp)
movq %rax, -0x78(%rbp)
leaq -0x8e(%rbp), %rdi
movq %rdi, -0x130(%rbp)
callq 0x10d0
movq -0x138(%rbp), %rdi
movq -0x130(%rbp), %rdx
leaq 0xd16(%rip), %rsi       # 0x2014
callq 0x1090
jmp 0x1305
movb $0x0, -0x8f(%rbp)
leaq -0x8e(%rbp), %rdi
callq 0x1070
leaq -0x8d(%rbp), %rdi
callq 0x1070
leaq -0x79(%rbp), %rdi
callq 0x1070
movb $0x1, -0xfc(%rbp)
leaq -0xf0(%rbp), %rax
movq %rax, -0x148(%rbp)
movq %rax, -0xf8(%rbp)
leaq -0xf9(%rbp), %rdi
movq %rdi, -0x140(%rbp)
callq 0x10d0
movq -0x148(%rbp), %rdi
movq -0x140(%rbp), %rdx
leaq 0xcaa(%rip), %rsi       # 0x201b
callq 0x1090
jmp 0x1378
leaq -0xd0(%rbp), %rax
movq %rax, -0x158(%rbp)
movq %rax, -0xf8(%rbp)
leaq -0xfa(%rbp), %rdi
movq %rdi, -0x150(%rbp)
callq 0x10d0
movq -0x158(%rbp), %rdi
movq -0x150(%rbp), %rdx
leaq 0xc6c(%rip), %rsi       # 0x2021
callq 0x1090
jmp 0x13bc
leaq -0xb0(%rbp), %rax
movq %rax, -0x168(%rbp)
movq %rax, -0xf8(%rbp)
leaq -0xfb(%rbp), %rdi
movq %rdi, -0x160(%rbp)
callq 0x10d0
movq -0x168(%rbp), %rdi
movq -0x160(%rbp), %rdx
leaq 0xc32(%rip), %rsi       # 0x202b
callq 0x1090
jmp 0x1400
movb $0x0, -0xfc(%rbp)
leaq -0xfb(%rbp), %rdi
callq 0x1070
leaq -0xfa(%rbp), %rdi
callq 0x1070
leaq -0xf9(%rbp), %rdi
callq 0x1070
movl $0x64636261, -0x100(%rbp) # imm = 0x64636261
movl $0x1, -0x104(%rbp)
leaq -0x104(%rbp), %rdi
callq 0x16d0
jmp 0x144d
leaq -0x100(%rbp), %rdi
callq 0x1740
jmp 0x145b
leaq -0xf0(%rbp), %rdi
callq 0x17b0
jmp 0x1469
leaq -0x70(%rbp), %rdi
callq 0x1820
jmp 0x1474
movl $0x0, -0x4(%rbp)
leaq -0xf0(%rbp), %rax
movq %rax, -0x178(%rbp)
addq $0x60, %rax
movq %rax, -0x170(%rbp)
jmp 0x1636
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x14eb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x14df
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x8e(%rbp), %rdi
callq 0x1070
leaq -0x8d(%rbp), %rdi
callq 0x1070
leaq -0x79(%rbp), %rdi
callq 0x1070
testb $0x1, -0x8f(%rbp)
jne 0x14ff
jmp 0x1549
movq -0x118(%rbp), %rcx
movq -0x78(%rbp), %rax
cmpq %rax, %rcx
movq %rax, -0x180(%rbp)
je 0x1547
movq -0x180(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x188(%rbp)
callq 0x1030
movq -0x118(%rbp), %rcx
movq -0x188(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x180(%rbp)
jne 0x1516
jmp 0x1549
jmp 0x16b8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x15a0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x1594
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0xfb(%rbp), %rdi
callq 0x1070
leaq -0xfa(%rbp), %rdi
callq 0x1070
leaq -0xf9(%rbp), %rdi
callq 0x1070
testb $0x1, -0xfc(%rbp)
jne 0x15b7
jmp 0x1604
movq -0xf8(%rbp), %rax
leaq -0xf0(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x190(%rbp)
je 0x1602
movq -0x190(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x198(%rbp)
callq 0x1030
movq -0x198(%rbp), %rax
leaq -0xf0(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x190(%rbp)
jne 0x15d1
jmp 0x1604
jmp 0x16af
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0xf0(%rbp), %rax
movq %rax, -0x1a8(%rbp)
addq $0x60, %rax
movq %rax, -0x1a0(%rbp)
jmp 0x167c
movq -0x170(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x1b0(%rbp)
callq 0x1030
movq -0x178(%rbp), %rcx
movq -0x1b0(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x170(%rbp)
jne 0x1636
leaq -0x70(%rbp), %rdi
callq 0x18a0
movl -0x4(%rbp), %eax
addq $0x1c0, %rsp            # imm = 0x1C0
popq %rbp
retq
movq -0x1a0(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x1b8(%rbp)
callq 0x1030
movq -0x1a8(%rbp), %rcx
movq -0x1b8(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x1a0(%rbp)
jne 0x167c
jmp 0x16af
leaq -0x70(%rbp), %rdi
callq 0x18a0
movq -0x88(%rbp), %rdi
callq 0x10c0
nopw %cs:(%rax,%rax)
nop