// File: /workspace/github_cpp_makefile_star2_O1/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), %r14
movq %r14, -0x10(%r14)
xorl %eax, %eax
movq %rax, -0x8(%r14)
movb %al, (%r14)
movl %eax, 0x10(%r14)
movq %rax, 0x18(%r14)
leaq -0xa8(%rbp), %r15
movq %r15, -0x10(%r15)
movq %rax, -0x8(%r15)
movb %al, (%r15)
movl %eax, 0x10(%r15)
movq %rax, 0x18(%r15)
movq 0x2a8f(%rip), %rdi      # 0x3fd8
leaq -0x88(%rbp), %rsi
callq 0x1303
movq 0x2a7c(%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), %rbx
movq %rbx, -0x10(%rbx)
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 0x15da
testq %rdx, %rdx
je 0x15df
movq -0xd8(%rbp), %rsi
movq -0x58(%rbp), %rdi
callq 0x10c0
testl %eax, %eax
sete %r13b
jmp 0x15e2
xorl %r13d, %r13d
jmp 0x15e2
movb $0x1, %r13b
movq -0xd8(%rbp), %rdi
cmpq %rbx, %rdi
je 0x15fd
movq -0xc8(%rbp), %rsi
incq %rsi
callq 0x10b0
movq -0x58(%rbp), %rdi
cmpq %r12, %rdi
je 0x1612
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x10b0
testb %r13b, %r13b
je 0x16b2
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 0x2962(%rip), %rbx      # 0x3fc8
movq %rbx, %rdi
callq 0x13d1
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x10a0
movsbl %al, %esi
movq 0x293c(%rip), %rdi      # 0x3fc8
callq 0x1030
movq %rax, %rdi
callq 0x1060
movq -0x58(%rbp), %rdi
cmpq %r12, %rdi
je 0x16ae
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x10b0
xorl %ebx, %ebx
jmp 0x16fd
movq 0x2937(%rip), %rbx      # 0x3ff0
leaq 0x946(%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 0x2905(%rip), %rdi      # 0x3ff0
callq 0x1030
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movq %rax, %rdi
callq 0x1060
movq -0xb8(%rbp), %rdi
cmpq %r15, %rdi
je 0x1718
movq -0xa8(%rbp), %rsi
incq %rsi
callq 0x10b0
movq -0x88(%rbp), %rdi
cmpq %r14, %rdi
je 0x1730
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 0x1764
jmp 0x174a
jmp 0x1764
movq %rax, %rbx
movq -0x58(%rbp), %rdi
cmpq %r12, %rdi
je 0x1767
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x10b0
jmp 0x1767
movq %rax, %rbx
movq -0xb8(%rbp), %rdi
cmpq %r15, %rdi
je 0x1782
movq -0xa8(%rbp), %rsi
incq %rsi
callq 0x10b0
movq -0x88(%rbp), %rdi
cmpq %r14, %rdi
je 0x179a
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x10b0
movq %rbx, %rdi
callq 0x1130