// File: iZhangHui[P]CppPrimer/CH16_TemplatesAndGenericProgramming/exercises/ex16_56.cc
// Function: main
int main(int argc, char const *argv[])
{
	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 $0x1b0, %rsp            # imm = 0x1B0
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x61(%rbp), %rdi
movq %rdi, -0x188(%rbp)
callq 0x22e0
movq -0x188(%rbp), %rdx
leaq 0x27a3(%rip), %rsi      # 0x503a
leaq -0x60(%rbp), %rdi
callq 0x2250
jmp 0x28a2
leaq -0x40(%rbp), %rdi
leaq -0x60(%rbp), %rsi
movl $0x19, %edx
movsd 0x2751(%rip), %xmm0     # 0x5008
callq 0x2fe0
jmp 0x28be
leaq -0x60(%rbp), %rdi
callq 0x2100
leaq -0x61(%rbp), %rdi
callq 0x21e0
leaq -0x99(%rbp), %rdi
movq %rdi, -0x190(%rbp)
callq 0x22e0
movq -0x190(%rbp), %rdx
leaq 0x2758(%rip), %rsi      # 0x5049
leaq -0x98(%rbp), %rdi
callq 0x2250
jmp 0x28ff
leaq -0x99(%rbp), %rdi
callq 0x21e0
leaq -0xa8(%rbp), %rdi
movl $0x2a, %esi
callq 0x3030
jmp 0x291e
leaq -0xc9(%rbp), %rdi
movq %rdi, -0x198(%rbp)
callq 0x22e0
movq -0x198(%rbp), %rdx
leaq 0x2716(%rip), %rsi      # 0x5055
leaq -0xc8(%rbp), %rdi
callq 0x2250
jmp 0x294d
leaq -0xc9(%rbp), %rdi
callq 0x21e0
leaq -0xa8(%rbp), %rdi
callq 0x31d0
movq %rax, -0x1a0(%rbp)
jmp 0x296e
movq -0x1a0(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq 0x566d(%rip), %rdi      # 0x7ff0
leaq 0x26d8(%rip), %r8       # 0x5062
leaq -0x98(%rbp), %rsi
leaq -0xd8(%rbp), %rdx
leaq -0xc8(%rbp), %rcx
leaq -0x40(%rbp), %r9
callq 0x3050
jmp 0x29aa
movq 0x563f(%rip), %rdi      # 0x7ff0
movq 0x5608(%rip), %rsi      # 0x7fc0
callq 0x21c0
jmp 0x29bf
leaq -0xf8(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0x2660
jmp 0x29d4
leaq -0xa8(%rbp), %rdi
callq 0x31d0
movq %rax, -0x1a8(%rbp)
jmp 0x29e9
movq -0x1a8(%rbp), %rax
movq %rax, -0x120(%rbp)
leaq -0x118(%rbp), %rdi
leaq -0x120(%rbp), %rsi
callq 0x3250
jmp 0x2a0c
leaq -0x140(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
callq 0x2660
jmp 0x2a21
leaq 0x2640(%rip), %rsi      # 0x5068
leaq -0x160(%rbp), %rdi
callq 0x27b0
jmp 0x2a36
leaq -0x180(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x3320
jmp 0x2a48
movq 0x55a1(%rip), %rdi      # 0x7ff0
leaq -0xf8(%rbp), %rsi
leaq -0x118(%rbp), %rdx
leaq -0x140(%rbp), %rcx
leaq -0x160(%rbp), %r8
leaq -0x180(%rbp), %r9
callq 0x31f0
jmp 0x2a79
leaq -0x180(%rbp), %rdi
callq 0x2100
leaq -0x160(%rbp), %rdi
callq 0x2100
leaq -0x140(%rbp), %rdi
callq 0x2100
leaq -0x118(%rbp), %rdi
callq 0x2100
leaq -0xf8(%rbp), %rdi
callq 0x2100
movq 0x5534(%rip), %rdi      # 0x7ff0
movq 0x54fd(%rip), %rsi      # 0x7fc0
callq 0x21c0
jmp 0x2aca
movl $0x0, -0x4(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x2100
leaq -0x98(%rbp), %rdi
callq 0x2100
leaq -0x40(%rbp), %rdi
callq 0x33f0
movl -0x4(%rbp), %eax
addq $0x1b0, %rsp            # imm = 0x1B0
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x2b21
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x2100
leaq -0x61(%rbp), %rdi
callq 0x21e0
jmp 0x2c2c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x99(%rbp), %rdi
callq 0x21e0
jmp 0x2c23
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x2c17
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0xc9(%rbp), %rdi
callq 0x21e0
jmp 0x2c17
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x2c0b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x2bff
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x2bf3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x2be7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x2bdb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x180(%rbp), %rdi
callq 0x2100
leaq -0x160(%rbp), %rdi
callq 0x2100
leaq -0x140(%rbp), %rdi
callq 0x2100
leaq -0x118(%rbp), %rdi
callq 0x2100
leaq -0xf8(%rbp), %rdi
callq 0x2100
leaq -0xc8(%rbp), %rdi
callq 0x2100
leaq -0x98(%rbp), %rdi
callq 0x2100
leaq -0x40(%rbp), %rdi
callq 0x33f0
movq -0x70(%rbp), %rdi
callq 0x22d0
nopw %cs:(%rax,%rax)
nop