// File: iZhangHui[P]CppPrimer/CH16_TemplatesAndGenericProgramming/examples/variadic.cc
// Function: main
int main()
{
	Sales_data item("978-0590353403", 25, 15.99);
	string fcnName("itemProcess");
	ErrorCode code(42);
	string otherData("invalid ISBN");

	errorMsg(cerr, fcnName, code.num(), otherData, "other", item);
	cerr << endl;

	print(cerr, debug_rep(fcnName), debug_rep(code.num()),
	            debug_rep(otherData), debug_rep("otherData"),
	            debug_rep(item));
	cerr << endl;

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1a0, %rsp            # imm = 0x1A0
movl $0x0, -0x4(%rbp)
leaq -0x59(%rbp), %rdi
movq %rdi, -0x180(%rbp)
callq 0x22e0
movq -0x180(%rbp), %rdx
leaq 0x27b9(%rip), %rsi      # 0x5029
leaq -0x58(%rbp), %rdi
callq 0x2250
jmp 0x287b
leaq -0x38(%rbp), %rdi
leaq -0x58(%rbp), %rsi
movl $0x19, %edx
movsd 0x2778(%rip), %xmm0     # 0x5008
callq 0x2fb0
jmp 0x2897
leaq -0x58(%rbp), %rdi
callq 0x2100
leaq -0x59(%rbp), %rdi
callq 0x21e0
leaq -0x91(%rbp), %rdi
movq %rdi, -0x188(%rbp)
callq 0x22e0
movq -0x188(%rbp), %rdx
leaq 0x276e(%rip), %rsi      # 0x5038
leaq -0x90(%rbp), %rdi
callq 0x2250
jmp 0x28d8
leaq -0x91(%rbp), %rdi
callq 0x21e0
leaq -0xa0(%rbp), %rdi
movl $0x2a, %esi
callq 0x3000
jmp 0x28f7
leaq -0xc1(%rbp), %rdi
movq %rdi, -0x190(%rbp)
callq 0x22e0
movq -0x190(%rbp), %rdx
leaq 0x272c(%rip), %rsi      # 0x5044
leaq -0xc0(%rbp), %rdi
callq 0x2250
jmp 0x2926
leaq -0xc1(%rbp), %rdi
callq 0x21e0
leaq -0xa0(%rbp), %rdi
callq 0x31a0
movq %rax, -0x198(%rbp)
jmp 0x2947
movq -0x198(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq 0x5694(%rip), %rdi      # 0x7ff0
leaq 0x26ee(%rip), %r8       # 0x5051
leaq -0x90(%rbp), %rsi
leaq -0xd0(%rbp), %rdx
leaq -0xc0(%rbp), %rcx
leaq -0x38(%rbp), %r9
callq 0x3020
jmp 0x2983
movq 0x5666(%rip), %rdi      # 0x7ff0
movq 0x5637(%rip), %rsi      # 0x7fc8
callq 0x21c0
jmp 0x2998
leaq -0xf0(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x2660
jmp 0x29ad
leaq -0xa0(%rbp), %rdi
callq 0x31a0
movq %rax, -0x1a0(%rbp)
jmp 0x29c2
movq -0x1a0(%rbp), %rax
movq %rax, -0x118(%rbp)
leaq -0x110(%rbp), %rdi
leaq -0x118(%rbp), %rsi
callq 0x3220
jmp 0x29e5
leaq -0x138(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
callq 0x2660
jmp 0x29fa
leaq 0x2656(%rip), %rsi      # 0x5057
leaq -0x158(%rbp), %rdi
callq 0x2790
jmp 0x2a0f
leaq -0x178(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x32d0
jmp 0x2a21
movq 0x55c8(%rip), %rdi      # 0x7ff0
leaq -0xf0(%rbp), %rsi
leaq -0x110(%rbp), %rdx
leaq -0x138(%rbp), %rcx
leaq -0x158(%rbp), %r8
leaq -0x178(%rbp), %r9
callq 0x31c0
jmp 0x2a52
leaq -0x178(%rbp), %rdi
callq 0x2100
leaq -0x158(%rbp), %rdi
callq 0x2100
leaq -0x138(%rbp), %rdi
callq 0x2100
leaq -0x110(%rbp), %rdi
callq 0x2100
leaq -0xf0(%rbp), %rdi
callq 0x2100
movq 0x555b(%rip), %rdi      # 0x7ff0
movq 0x552c(%rip), %rsi      # 0x7fc8
callq 0x21c0
jmp 0x2aa3
movl $0x0, -0x4(%rbp)
leaq -0xc0(%rbp), %rdi
callq 0x2100
leaq -0x90(%rbp), %rdi
callq 0x2100
leaq -0x38(%rbp), %rdi
callq 0x3380
movl -0x4(%rbp), %eax
addq $0x1a0, %rsp            # imm = 0x1A0
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x2afa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x2100
leaq -0x59(%rbp), %rdi
callq 0x21e0
jmp 0x2c05
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x91(%rbp), %rdi
callq 0x21e0
jmp 0x2bfc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x2bf0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0xc1(%rbp), %rdi
callq 0x21e0
jmp 0x2bf0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x2be4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x2bd8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x2bcc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x2bc0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x2bb4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x178(%rbp), %rdi
callq 0x2100
leaq -0x158(%rbp), %rdi
callq 0x2100
leaq -0x138(%rbp), %rdi
callq 0x2100
leaq -0x110(%rbp), %rdi
callq 0x2100
leaq -0xf0(%rbp), %rdi
callq 0x2100
leaq -0xc0(%rbp), %rdi
callq 0x2100
leaq -0x90(%rbp), %rdi
callq 0x2100
leaq -0x38(%rbp), %rdi
callq 0x3380
movq -0x68(%rbp), %rdi
callq 0x22d0
nop