// File: /workspace/github_cpp_makefile_star2_O3/iZhangHui[P]CppPrimer/CH01_GettingStarted/examples/add_item2.cc
// Function: main
int main() 
{
    Sales_item item1, item2;

    std::cin >> item1 >> item2;
	// first check that item1 and item2 represent the same book
	if (item1.isbn() == item2.isbn()) {
    	std::cout << item1 + item2 << std::endl;
    	return 0;   // indicate success
	} else {
    	std::cerr << "Data must refer to same ISBN" 
		          << std::endl;
    	return -1;  // indicate failure
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
leaq -0x78(%rbp), %rcx
movq %rcx, -0x10(%rcx)
xorl %eax, %eax
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
movl %eax, 0x10(%rcx)
movq %rax, 0x18(%rcx)
leaq -0xa8(%rbp), %r15
movq %r15, -0x10(%r15)
movq %rax, -0x8(%r15)
movb %al, (%r15)
movl %eax, 0x10(%r15)
movq %rax, 0x18(%r15)
movq 0x2a9d(%rip), %rdi      # 0x3fd8
leaq -0x88(%rbp), %rsi
callq 0x1303
movq 0x2a8a(%rip), %rdi      # 0x3fd8
leaq -0xb8(%rbp), %rsi
callq 0x1303
leaq -0x48(%rbp), %r12
movq %r12, -0x10(%r12)
movq -0x88(%rbp), %rsi
movq -0x80(%rbp), %rdx
addq %rsi, %rdx
leaq -0x58(%rbp), %rdi
callq 0x17a2
leaq -0xc8(%rbp), %r13
movq %r13, -0x10(%r13)
movq -0xb8(%rbp), %rsi
movq -0xb0(%rbp), %rdx
addq %rsi, %rdx
leaq -0xd8(%rbp), %rdi
callq 0x17a2
movq -0x50(%rbp), %rdx
cmpq -0xd0(%rbp), %rdx
jne 0x15cf
movq -0xd8(%rbp), %rbx
testq %rdx, %rdx
je 0x15db
movq -0x58(%rbp), %rdi
movq %rbx, %rsi
callq 0x10c0
testl %eax, %eax
sete %r14b
jmp 0x15de
movq -0xd8(%rbp), %rbx
xorl %r14d, %r14d
jmp 0x15de
movb $0x1, %r14b
cmpq %r13, %rbx
je 0x15f5
movq -0xc8(%rbp), %rsi
incq %rsi
movq %rbx, %rdi
callq 0x10b0
movq -0x58(%rbp), %rdi
cmpq %r12, %rdi
je 0x160a
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x10b0
testb %r14b, %r14b
je 0x16aa
leaq -0x58(%rbp), %rdi
movq %r12, (%rdi)
movq -0x88(%rbp), %rsi
movq -0x80(%rbp), %rdx
addq %rsi, %rdx
callq 0x17a2
leaq -0x68(%rbp), %rax
movups (%rax), %xmm0
leaq -0x58(%rbp), %rsi
movups %xmm0, 0x20(%rsi)
movl -0x98(%rbp), %eax
addl %eax, 0x20(%rsi)
movsd -0x90(%rbp), %xmm0
addsd 0x28(%rsi), %xmm0
movsd %xmm0, 0x28(%rsi)
movq 0x296a(%rip), %rbx      # 0x3fc8
movq %rbx, %rdi
callq 0x13c5
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x10a0
movsbl %al, %esi
movq 0x2944(%rip), %rdi      # 0x3fc8
callq 0x1030
movq %rax, %rdi
callq 0x1060
movq -0x58(%rbp), %rdi
cmpq %r12, %rdi
je 0x16a6
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x10b0
xorl %ebx, %ebx
jmp 0x16f5
movq 0x293f(%rip), %rbx      # 0x3ff0
leaq 0x94e(%rip), %rsi       # 0x2006
movl $0x1c, %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 0x290d(%rip), %rdi      # 0x3ff0
callq 0x1030
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movq %rax, %rdi
callq 0x1060
movq -0xb8(%rbp), %rdi
cmpq %r15, %rdi
je 0x1710
movq -0xa8(%rbp), %rsi
incq %rsi
callq 0x10b0
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x172c
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x10b0
movl %ebx, %eax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1760
jmp 0x1746
jmp 0x1760
movq %rax, %rbx
movq -0x58(%rbp), %rdi
cmpq %r12, %rdi
je 0x1763
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x10b0
jmp 0x1763
movq %rax, %rbx
movq -0xb8(%rbp), %rdi
cmpq %r15, %rdi
je 0x177e
movq -0xa8(%rbp), %rsi
incq %rsi
callq 0x10b0
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x179a
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x10b0
movq %rbx, %rdi
callq 0x1130