// File: /workspace/github_cpp_makefile_star2_O1/iZhangHui[P]CppPrimer/CH08_TheIOLibrary/examples/add_itemV2.cc
// Function: main
int main()
{
	Sales_data data1, data2;
	if (read(cin, data1) && read(cin, data2)) {  // read the transactions
		if (data1.isbn() == data2.isbn()) {      // check isbns
			Sales_data sum = add(data1, data2);  // add the transactions
			print(cout, sum);                    // print the results
			cout << endl;                        // followed by a newline 
		}
	} else
		cerr << "Input failed!" << endl;        

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
leaq -0xc8(%rbp), %r14
movq %r14, -0x10(%r14)
xorl %eax, %eax
movq %rax, -0x8(%r14)
movb %al, (%r14)
movl %eax, 0x10(%r14)
movq %rax, 0x18(%r14)
leaq -0x98(%rbp), %r15
movq %r15, -0x10(%r15)
movq %rax, -0x8(%r15)
movb %al, (%r15)
movl %eax, 0x10(%r15)
movq %rax, 0x18(%r15)
movq 0x2cdb(%rip), %rdi      # 0x3fd8
leaq -0xd8(%rbp), %rsi
callq 0x163d
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x133c
movq 0x2cba(%rip), %rdi      # 0x3fd8
leaq -0xa8(%rbp), %rsi
callq 0x163d
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
je 0x13cc
movq 0x2cad(%rip), %rbx      # 0x3ff0
leaq 0xcba(%rip), %rsi       # 0x2004
movl $0xd, %edx
movq %rbx, %rdi
callq 0x10d0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x10a0
movsbl %al, %esi
movq 0x2c7b(%rip), %rdi      # 0x3ff0
callq 0x1030
movq %rax, %rdi
callq 0x1060
movq -0xa8(%rbp), %rdi
cmpq %r15, %rdi
je 0x139d
movq -0x98(%rbp), %rsi
incq %rsi
callq 0x10b0
movq -0xd8(%rbp), %rdi
cmpq %r14, %rdi
je 0x13b8
movq -0xc8(%rbp), %rsi
incq %rsi
callq 0x10b0
xorl %eax, %eax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq -0x48(%rbp), %r12
movq %r12, -0x10(%r12)
movq -0xd8(%rbp), %rsi
movq -0xd0(%rbp), %rdx
addq %rsi, %rdx
leaq -0x58(%rbp), %rdi
callq 0x1544
leaq -0x68(%rbp), %rbx
movq %rbx, -0x10(%rbx)
movq -0xa8(%rbp), %rsi
movq -0xa0(%rbp), %rdx
addq %rsi, %rdx
leaq -0x78(%rbp), %rdi
callq 0x1544
movq -0x50(%rbp), %rdx
cmpq -0x70(%rbp), %rdx
jne 0x1435
testq %rdx, %rdx
je 0x143a
movq -0x78(%rbp), %rsi
movq -0x58(%rbp), %rdi
callq 0x10c0
testl %eax, %eax
sete %r13b
jmp 0x143d
xorl %r13d, %r13d
jmp 0x143d
movb $0x1, %r13b
movq -0x78(%rbp), %rdi
cmpq %rbx, %rdi
je 0x1452
movq -0x68(%rbp), %rsi
incq %rsi
callq 0x10b0
movq -0x58(%rbp), %rdi
cmpq %r12, %rdi
je 0x1467
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x10b0
testb %r13b, %r13b
je 0x1382
leaq -0x58(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
leaq -0xa8(%rbp), %rdx
callq 0x16d2
movq 0x2b3a(%rip), %rbx      # 0x3fc8
leaq -0x58(%rbp), %rsi
movq %rbx, %rdi
callq 0x172b
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x10a0
movsbl %al, %esi
movq 0x2b10(%rip), %rdi      # 0x3fc8
callq 0x1030
movq %rax, %rdi
callq 0x1060
movq -0x58(%rbp), %rdi
cmpq %r12, %rdi
je 0x1382
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x10b0
jmp 0x1382
jmp 0x1503
jmp 0x14e9
jmp 0x1503
movq %rax, %rbx
movq -0x58(%rbp), %rdi
cmpq %r12, %rdi
je 0x1506
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x10b0
jmp 0x1506
movq %rax, %rbx
movq -0xa8(%rbp), %rdi
cmpq %r15, %rdi
je 0x1521
movq -0x98(%rbp), %rsi
incq %rsi
callq 0x10b0
movq -0xd8(%rbp), %rdi
cmpq %r14, %rdi
je 0x153c
movq -0xc8(%rbp), %rsi
incq %rsi
callq 0x10b0
movq %rbx, %rdi
callq 0x1120