// File: 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
subq $0x420, %rsp            # imm = 0x420
movl $0x0, -0x4(%rbp)
leaq -0x29(%rbp), %rdi
movq %rdi, -0x2b0(%rbp)
callq 0x21f0
movq -0x2b0(%rbp), %rdx
leaq 0x2567(%rip), %rsi      # 0x5007
leaq -0x28(%rbp), %rdi
callq 0x2180
jmp 0x2aab
leaq -0x29(%rbp), %rdi
callq 0x2150
leaq -0x61(%rbp), %rdi
movq %rdi, -0x2b8(%rbp)
callq 0x21f0
movq -0x2b8(%rbp), %rdx
leaq 0x2541(%rip), %rsi      # 0x5013
leaq -0x60(%rbp), %rdi
callq 0x2180
jmp 0x2add
leaq -0x61(%rbp), %rdi
callq 0x2150
movl $0x0, -0x88(%rbp)
movl $0x1, -0x84(%rbp)
movl $0x2, -0x80(%rbp)
movl $0x3, -0x7c(%rbp)
leaq -0x88(%rbp), %rax
movq %rax, -0x78(%rbp)
movq $0x4, -0x70(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x37c0
testb $0x1, %al
jne 0x2b31
jmp 0x2d41
movb $0x1, -0x102(%rbp)
leaq -0xf8(%rbp), %rax
movq %rax, -0x2c8(%rbp)
movq %rax, -0x100(%rbp)
leaq -0x101(%rbp), %rdi
movq %rdi, -0x2c0(%rbp)
callq 0x21f0
movq -0x2c8(%rbp), %rdi
movq -0x2c0(%rbp), %rdx
leaq 0x24ae(%rip), %rsi      # 0x5023
callq 0x2180
jmp 0x2b7c
leaq -0xd8(%rbp), %rdi
movq %rdi, -0x100(%rbp)
leaq -0x28(%rbp), %rsi
callq 0x2070
jmp 0x2b95
leaq -0xb8(%rbp), %rdi
movq %rdi, -0x100(%rbp)
leaq -0x60(%rbp), %rsi
callq 0x2070
jmp 0x2bae
movb $0x0, -0x102(%rbp)
leaq -0xf8(%rbp), %rax
movq %rax, -0x98(%rbp)
movq $0x3, -0x90(%rbp)
movq -0x98(%rbp), %rdi
movq -0x90(%rbp), %rsi
callq 0x2440
jmp 0x2be3
leaq -0xf8(%rbp), %rax
movq %rax, -0x2d8(%rbp)
addq $0x60, %rax
movq %rax, -0x2d0(%rbp)
movq -0x2d0(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x2e0(%rbp)
callq 0x20b0
movq -0x2d8(%rbp), %rcx
movq -0x2e0(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x2d0(%rbp)
jne 0x2bfc
leaq -0x101(%rbp), %rdi
callq 0x2150
jmp 0x2f55
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x29(%rbp), %rdi
callq 0x2150
jmp 0x350a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x61(%rbp), %rdi
callq 0x2150
jmp 0x3501
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x2cd8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0xf8(%rbp), %rax
movq %rax, -0x2f0(%rbp)
addq $0x60, %rax
movq %rax, -0x2e8(%rbp)
movq -0x2e8(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x2f8(%rbp)
callq 0x20b0
movq -0x2f0(%rbp), %rcx
movq -0x2f8(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x2e8(%rbp)
jne 0x2ca5
jmp 0x2cd8
leaq -0x101(%rbp), %rdi
callq 0x2150
testb $0x1, -0x102(%rbp)
jne 0x2cef
jmp 0x2d3c
movq -0x100(%rbp), %rax
leaq -0xf8(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x300(%rbp)
je 0x2d3a
movq -0x300(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x308(%rbp)
callq 0x20b0
movq -0x308(%rbp), %rax
leaq -0xf8(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x300(%rbp)
jne 0x2d09
jmp 0x2d3c
jmp 0x34f8
movb $0x1, -0x163(%rbp)
leaq -0x158(%rbp), %rax
movq %rax, -0x318(%rbp)
movq %rax, -0x160(%rbp)
leaq -0x161(%rbp), %rdi
movq %rdi, -0x310(%rbp)
callq 0x21f0
movq -0x318(%rbp), %rdi
movq -0x310(%rbp), %rdx
leaq 0x229e(%rip), %rsi      # 0x5023
callq 0x2180
jmp 0x2d8c
leaq -0x138(%rbp), %rax
movq %rax, -0x328(%rbp)
movq %rax, -0x160(%rbp)
leaq -0x162(%rbp), %rdi
movq %rdi, -0x320(%rbp)
callq 0x21f0
movq -0x328(%rbp), %rdi
movq -0x320(%rbp), %rdx
leaq 0x2264(%rip), %rsi      # 0x502d
callq 0x2180
jmp 0x2dd0
movb $0x0, -0x163(%rbp)
leaq -0x158(%rbp), %rax
movq %rax, -0x118(%rbp)
movq $0x2, -0x110(%rbp)
movq -0x118(%rbp), %rdi
movq -0x110(%rbp), %rsi
callq 0x2440
jmp 0x2e05
leaq -0x158(%rbp), %rax
movq %rax, -0x338(%rbp)
addq $0x40, %rax
movq %rax, -0x330(%rbp)
movq -0x330(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x340(%rbp)
callq 0x20b0
movq -0x338(%rbp), %rcx
movq -0x340(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x330(%rbp)
jne 0x2e1e
leaq -0x162(%rbp), %rdi
callq 0x2150
leaq -0x161(%rbp), %rdi
callq 0x2150
jmp 0x2f55
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x2eec
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x2ee0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x158(%rbp), %rax
movq %rax, -0x350(%rbp)
addq $0x40, %rax
movq %rax, -0x348(%rbp)
movq -0x348(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x358(%rbp)
callq 0x20b0
movq -0x350(%rbp), %rcx
movq -0x358(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x348(%rbp)
jne 0x2ead
jmp 0x2ee0
leaq -0x162(%rbp), %rdi
callq 0x2150
leaq -0x161(%rbp), %rdi
callq 0x2150
testb $0x1, -0x163(%rbp)
jne 0x2f03
jmp 0x2f50
movq -0x160(%rbp), %rax
leaq -0x158(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x360(%rbp)
je 0x2f4e
movq -0x360(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x368(%rbp)
callq 0x20b0
movq -0x368(%rbp), %rax
leaq -0x158(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x360(%rbp)
jne 0x2f1d
jmp 0x2f50
jmp 0x34f8
leaq -0x28(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x37c0
testb $0x1, %al
jne 0x2f6b
jmp 0x3171
leaq -0x168(%rbp), %rdi
movl $0x2a, %esi
callq 0x37f0
jmp 0x2f7e
movb $0x1, -0x1e2(%rbp)
leaq -0x1d8(%rbp), %rax
movq %rax, -0x378(%rbp)
movq %rax, -0x1e0(%rbp)
leaq -0x1e1(%rbp), %rdi
movq %rdi, -0x370(%rbp)
callq 0x21f0
movq -0x378(%rbp), %rdi
movq -0x370(%rbp), %rdx
leaq 0x2061(%rip), %rsi      # 0x5023
callq 0x2180
jmp 0x2fc9
leaq -0x1b8(%rbp), %rdi
movq %rdi, -0x1e0(%rbp)
leaq -0x28(%rbp), %rsi
callq 0x2070
jmp 0x2fe2
leaq -0x198(%rbp), %rdi
movq %rdi, -0x1e0(%rbp)
leaq -0x60(%rbp), %rsi
callq 0x2070
jmp 0x2ffb
movb $0x0, -0x1e2(%rbp)
leaq -0x1d8(%rbp), %rax
movq %rax, -0x178(%rbp)
movq $0x3, -0x170(%rbp)
movl -0x168(%rbp), %edi
movq -0x178(%rbp), %rsi
movq -0x170(%rbp), %rdx
callq 0x2340
jmp 0x3036
leaq -0x1d8(%rbp), %rax
movq %rax, -0x388(%rbp)
addq $0x60, %rax
movq %rax, -0x380(%rbp)
movq -0x380(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x390(%rbp)
callq 0x20b0
movq -0x388(%rbp), %rcx
movq -0x390(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x380(%rbp)
jne 0x304f
leaq -0x1e1(%rbp), %rdi
callq 0x2150
jmp 0x339b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x34f8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x3108
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x1d8(%rbp), %rax
movq %rax, -0x3a0(%rbp)
addq $0x60, %rax
movq %rax, -0x398(%rbp)
movq -0x398(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x3a8(%rbp)
callq 0x20b0
movq -0x3a0(%rbp), %rcx
movq -0x3a8(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x398(%rbp)
jne 0x30d5
jmp 0x3108
leaq -0x1e1(%rbp), %rdi
callq 0x2150
testb $0x1, -0x1e2(%rbp)
jne 0x311f
jmp 0x316c
movq -0x1e0(%rbp), %rax
leaq -0x1d8(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x3b0(%rbp)
je 0x316a
movq -0x3b0(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x3b8(%rbp)
callq 0x20b0
movq -0x3b8(%rbp), %rax
leaq -0x1d8(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x3b0(%rbp)
jne 0x3139
jmp 0x316c
jmp 0x34f8
leaq -0x1e8(%rbp), %rdi
xorl %esi, %esi
callq 0x37f0
jmp 0x3181
movb $0x1, -0x243(%rbp)
leaq -0x238(%rbp), %rax
movq %rax, -0x3c8(%rbp)
movq %rax, -0x240(%rbp)
leaq -0x241(%rbp), %rdi
movq %rdi, -0x3c0(%rbp)
callq 0x21f0
movq -0x3c8(%rbp), %rdi
movq -0x3c0(%rbp), %rdx
leaq 0x1e5e(%rip), %rsi      # 0x5023
callq 0x2180
jmp 0x31cc
leaq -0x218(%rbp), %rax
movq %rax, -0x3d8(%rbp)
movq %rax, -0x240(%rbp)
leaq -0x242(%rbp), %rdi
movq %rdi, -0x3d0(%rbp)
callq 0x21f0
movq -0x3d8(%rbp), %rdi
movq -0x3d0(%rbp), %rdx
leaq 0x1e24(%rip), %rsi      # 0x502d
callq 0x2180
jmp 0x3210
movb $0x0, -0x243(%rbp)
leaq -0x238(%rbp), %rax
movq %rax, -0x1f8(%rbp)
movq $0x2, -0x1f0(%rbp)
movl -0x1e8(%rbp), %edi
movq -0x1f8(%rbp), %rsi
movq -0x1f0(%rbp), %rdx
callq 0x2340
jmp 0x324b
leaq -0x238(%rbp), %rax
movq %rax, -0x3e8(%rbp)
addq $0x40, %rax
movq %rax, -0x3e0(%rbp)
movq -0x3e0(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x3f0(%rbp)
callq 0x20b0
movq -0x3e8(%rbp), %rcx
movq -0x3f0(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x3e0(%rbp)
jne 0x3264
leaq -0x242(%rbp), %rdi
callq 0x2150
leaq -0x241(%rbp), %rdi
callq 0x2150
jmp 0x339b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x3332
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x3326
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x238(%rbp), %rax
movq %rax, -0x400(%rbp)
addq $0x40, %rax
movq %rax, -0x3f8(%rbp)
movq -0x3f8(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x408(%rbp)
callq 0x20b0
movq -0x400(%rbp), %rcx
movq -0x408(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x3f8(%rbp)
jne 0x32f3
jmp 0x3326
leaq -0x242(%rbp), %rdi
callq 0x2150
leaq -0x241(%rbp), %rdi
callq 0x2150
testb $0x1, -0x243(%rbp)
jne 0x3349
jmp 0x3396
movq -0x240(%rbp), %rax
leaq -0x238(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x410(%rbp)
je 0x3394
movq -0x410(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x418(%rbp)
callq 0x20b0
movq -0x418(%rbp), %rax
leaq -0x238(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x410(%rbp)
jne 0x3363
jmp 0x3396
jmp 0x34f8
leaq -0x258(%rbp), %rdi
callq 0x3810
movq -0x258(%rbp), %rdi
movq -0x250(%rbp), %rsi
callq 0x2440
jmp 0x33bc
leaq -0x270(%rbp), %rdi
callq 0x24c0
jmp 0x33ca
leaq -0x270(%rbp), %rax
movq %rax, -0x278(%rbp)
movq -0x278(%rbp), %rdi
callq 0x3830
movq %rax, -0x280(%rbp)
movq -0x278(%rbp), %rdi
callq 0x3860
movq %rax, -0x288(%rbp)
leaq -0x280(%rbp), %rdi
leaq -0x288(%rbp), %rsi
callq 0x3890
testb $0x1, %al
jne 0x341a
jmp 0x34ad
leaq -0x280(%rbp), %rdi
callq 0x38d0
movq %rax, %rsi
leaq -0x2a8(%rbp), %rdi
callq 0x2070
jmp 0x3437
movq 0x3b9a(%rip), %rdi      # 0x6fd8
leaq -0x2a8(%rbp), %rsi
callq 0x20f0
movq %rax, -0x420(%rbp)
jmp 0x3453
movq -0x420(%rbp), %rdi
leaq 0x1ba4(%rip), %rsi      # 0x5005
callq 0x2100
jmp 0x3468
leaq -0x2a8(%rbp), %rdi
callq 0x20b0
leaq -0x280(%rbp), %rdi
callq 0x38f0
jmp 0x33fe
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x34ec
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x2a8(%rbp), %rdi
callq 0x20b0
jmp 0x34ec
movq 0x3b24(%rip), %rdi      # 0x6fd8
movq 0x3b0d(%rip), %rsi      # 0x6fc8
callq 0x2140
jmp 0x34c2
leaq -0x270(%rbp), %rdi
callq 0x3910
leaq -0x60(%rbp), %rdi
callq 0x20b0
leaq -0x28(%rbp), %rdi
callq 0x20b0
movl -0x4(%rbp), %eax
addq $0x420, %rsp            # imm = 0x420
popq %rbp
retq
leaq -0x270(%rbp), %rdi
callq 0x3910
leaq -0x60(%rbp), %rdi
callq 0x20b0
leaq -0x28(%rbp), %rdi
callq 0x20b0
movq -0x38(%rbp), %rdi
callq 0x21e0
nopw %cs:(%rax,%rax)
nopl (%rax)