// File: /workspace/github_cpp_makefile_star2_O3/iZhangHui[P]CppPrimer/CH06_Functions/examples/errMsg_initList.cc
// Function: main
int main()
{
	string expected = "description", actual = "some other case";
	initializer_list<int> li = {0,1,2,3};

	// expected, actual are strings 
	if (expected != actual)
		error_msg({"functionX", expected, actual});
	else
		error_msg({"functionX", "okay"});

	// expected, actual are strings 
	if (expected != actual)
		error_msg(ErrCode(42), {"functionX", expected, actual});
	else
		error_msg(ErrCode(0), {"functionX", "okay"});
	
	// can pass an empty list, calls second version of error_msg
	error_msg({}); // prints blank line

	// call function that list initializes its return value
	// results is a vector<string>
	auto results = functionX();
	for (auto i : results) 
		cout << i << " ";
	cout << endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
leaq -0x58(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x16a4(%rip), %rsi      # 0x4007
leaq 0x16a8(%rip), %rdx      # 0x4012
leaq -0x68(%rbp), %rdi
callq 0x30a2
leaq -0x38(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x1691(%rip), %rsi      # 0x4013
leaq 0x1699(%rip), %rdx      # 0x4022
leaq -0x48(%rbp), %rdi
callq 0x30a2
movq -0x60(%rbp), %rdx
cmpq -0x40(%rbp), %rdx
jne 0x29ba
testq %rdx, %rdx
je 0x2a61
movq -0x48(%rbp), %rsi
movq -0x68(%rbp), %rdi
callq 0x2120
testl %eax, %eax
je 0x2a61
leaq -0xb8(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x1657(%rip), %rsi      # 0x4023
leaq 0x1659(%rip), %rdx      # 0x402c
leaq -0xc8(%rbp), %rdi
callq 0x30a2
leaq -0xa8(%rbp), %r14
leaq -0x98(%rbp), %rax
movq %rax, -0x10(%rax)
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
addq %rsi, %rdx
movq %r14, %rdi
callq 0x3004
leaq -0x88(%rbp), %r14
leaq -0x78(%rbp), %rbx
movq %rbx, -0x10(%rbx)
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
addq %rsi, %rdx
movq %r14, %rdi
callq 0x3004
leaq -0xc8(%rbp), %rdi
movl $0x3, %esi
callq 0x2614
movq $-0x60, %r14
movq -0x10(%rbx), %rdi
cmpq %rdi, %rbx
je 0x2a52
movq (%rbx), %rsi
incq %rsi
callq 0x2110
addq $-0x20, %rbx
addq $0x20, %r14
jne 0x2a3e
jmp 0x2ae1
leaq -0xb8(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x15b0(%rip), %rsi      # 0x4023
leaq 0x15b2(%rip), %rdx      # 0x402c
leaq -0xc8(%rbp), %rdi
callq 0x30a2
leaq -0xa8(%rbp), %rdi
leaq -0x98(%rbp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x158e(%rip), %rsi      # 0x402d
leaq 0x158b(%rip), %rdx      # 0x4031
callq 0x30a2
leaq -0xc8(%rbp), %rdi
movl $0x2, %esi
callq 0x2614
movq $-0x40, %r14
movq -0x10(%rbx), %rdi
cmpq %rdi, %rbx
je 0x2ad7
movq (%rbx), %rsi
incq %rsi
callq 0x2110
addq $-0x20, %rbx
addq $0x20, %r14
jne 0x2ac3
movq -0x60(%rbp), %rdx
cmpq -0x40(%rbp), %rdx
jne 0x2b09
testq %rdx, %rdx
je 0x2bb5
movq -0x48(%rbp), %rsi
movq -0x68(%rbp), %rdi
callq 0x2120
testl %eax, %eax
je 0x2bb5
leaq -0xb8(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x1508(%rip), %rsi      # 0x4023
leaq 0x150a(%rip), %rdx      # 0x402c
leaq -0xc8(%rbp), %rdi
callq 0x30a2
leaq -0xa8(%rbp), %r14
leaq -0x98(%rbp), %rax
movq %rax, -0x10(%rax)
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
addq %rsi, %rdx
movq %r14, %rdi
callq 0x3004
leaq -0x88(%rbp), %r14
leaq -0x78(%rbp), %rbx
movq %rbx, -0x10(%rbx)
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
addq %rsi, %rdx
movq %r14, %rdi
callq 0x3004
leaq -0xc8(%rbp), %rsi
movl $0x3, %edx
movl $0x2a, %edi
callq 0x250c
movq $-0x60, %r14
movq -0x10(%rbx), %rdi
cmpq %rdi, %rbx
je 0x2ba6
movq (%rbx), %rsi
incq %rsi
callq 0x2110
addq $-0x20, %rbx
addq $0x20, %r14
jne 0x2b92
jmp 0x2c37
leaq -0xb8(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x145c(%rip), %rsi      # 0x4023
leaq 0x145e(%rip), %rdx      # 0x402c
leaq -0xc8(%rbp), %rdi
callq 0x30a2
leaq -0xa8(%rbp), %rdi
leaq -0x98(%rbp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x143a(%rip), %rsi      # 0x402d
leaq 0x1437(%rip), %rdx      # 0x4031
callq 0x30a2
leaq -0xc8(%rbp), %rsi
movl $0x2, %edx
xorl %edi, %edi
callq 0x250c
movq $-0x40, %r14
movq -0x10(%rbx), %rdi
cmpq %rdi, %rbx
je 0x2c2d
movq (%rbx), %rsi
incq %rsi
callq 0x2110
addq $-0x20, %rbx
addq $0x20, %r14
jne 0x2c19
xorl %edi, %edi
xorl %esi, %esi
callq 0x2614
leaq -0xe0(%rbp), %rdi
callq 0x269d
movq -0xe0(%rbp), %r12
movq -0xd8(%rbp), %rbx
cmpq %rbx, %r12
je 0x2cdd
leaq -0xb8(%rbp), %r13
movq 0x336b(%rip), %r14      # 0x5fd8
leaq 0x1391(%rip), %r15      # 0x4005
movq %r13, -0xc8(%rbp)
movq (%r12), %rsi
movq 0x8(%r12), %rdx
addq %rsi, %rdx
leaq -0xc8(%rbp), %rdi
callq 0x3004
movq -0xc8(%rbp), %rsi
movq -0xc0(%rbp), %rdx
movq %r14, %rdi
callq 0x2130
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x2130
movq -0xc8(%rbp), %rdi
cmpq %r13, %rdi
je 0x2cd4
movq -0xb8(%rbp), %rsi
incq %rsi
callq 0x2110
addq $0x20, %r12
cmpq %rbx, %r12
jne 0x2c74
movq 0x32f4(%rip), %rdi      # 0x5fd8
movq (%rdi), %rax
addq -0x18(%rax), %rdi
movl $0xa, %esi
callq 0x20f0
movsbl %al, %esi
movq 0x32d9(%rip), %rdi      # 0x5fd8
callq 0x2030
movq %rax, %rdi
callq 0x20a0
leaq -0xe0(%rbp), %rdi
callq 0x2f88
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
leaq -0x58(%rbp), %rbx
je 0x2d35
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2110
movq -0x68(%rbp), %rdi
cmpq %rbx, %rdi
je 0x2d4a
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x2110
xorl %eax, %eax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x88(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
callq 0x23a0
jmp 0x2e54
jmp 0x2d98
jmp 0x2df1
movq %rax, %rbx
leaq -0x88(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
callq 0x22f2
jmp 0x2e54
movq %rax, %rbx
movq -0xc8(%rbp), %rdi
cmpq %r14, %rdi
je 0x2e54
movq -0xb8(%rbp), %rsi
incq %rsi
callq 0x2110
jmp 0x2e54
jmp 0x2df1
movq %rax, %rbx
leaq -0x68(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
callq 0x2366
jmp 0x2e54
jmp 0x2df1
movq %rax, %rbx
leaq -0x68(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
callq 0x22b8
jmp 0x2e54
jmp 0x2df1
jmp 0x2df1
movq %rax, %rbx
jmp 0x2e54
movq %rax, %rbx
jmp 0x2e6d
movq %rax, %rbx
leaq -0xc8(%rbp), %rsi
movq %r14, %rdi
callq 0x232c
jmp 0x2e54
movq %rax, %rbx
leaq -0xc8(%rbp), %rsi
movq %r14, %rdi
callq 0x227e
jmp 0x2e54
jmp 0x2e25
movq %rax, %rbx
jmp 0x2e48
movq %rax, %rbx
movq -0xc8(%rbp), %rdi
cmpq %r13, %rdi
je 0x2e48
movq -0xb8(%rbp), %rsi
incq %rsi
callq 0x2110
leaq -0xe0(%rbp), %rdi
callq 0x2f88
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x2e6d
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2110
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x2e86
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x2110
movq %rbx, %rdi
callq 0x21a0