// File: iZhangHui[P]CppPrimer/CH10_GenericAlgorithms/examples/sortSI.cc
// Function: main
int main() 
{
    Sales_item trans;
    vector<Sales_item> file;

    while (std::cin >> trans)  // read the transations
        file.push_back(trans);

	for (auto i : file)        // print what was read
		cout << i << endl;
	cout << "\n\n";

	sort(file.begin(), file.end(), compareIsbn); // sort into ISBN order
	for (auto i : file)        // print in ISBN order
		cout << i << endl;

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
movl $0x0, -0x4(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x2910
leaq -0x50(%rbp), %rdi
callq 0x29c0
movq 0x59b5(%rip), %rdi      # 0x7fe0
leaq -0x38(%rbp), %rsi
callq 0x23f0
movq %rax, -0x108(%rbp)
jmp 0x263d
movq -0x108(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x2170
movb %al, -0x109(%rbp)
jmp 0x265b
movb -0x109(%rbp), %al
testb $0x1, %al
jne 0x2667
jmp 0x2689
leaq -0x50(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x29e0
jmp 0x2676
jmp 0x2624
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x288f
leaq -0x50(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rdi
callq 0x2a50
movq %rax, -0x70(%rbp)
movq -0x68(%rbp), %rdi
callq 0x2a80
movq %rax, -0x78(%rbp)
leaq -0x70(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x2ab0
testb $0x1, %al
jne 0x26be
jmp 0x273d
leaq -0x70(%rbp), %rdi
callq 0x2af0
movq %rax, %rsi
leaq -0xa8(%rbp), %rdi
callq 0x28b0
jmp 0x26d8
movq 0x58f1(%rip), %rdi      # 0x7fd0
leaq -0xa8(%rbp), %rsi
callq 0x24a0
movq %rax, -0x118(%rbp)
jmp 0x26f4
movq -0x118(%rbp), %rdi
movq 0x58be(%rip), %rsi      # 0x7fc0
callq 0x2150
jmp 0x2709
leaq -0xa8(%rbp), %rdi
callq 0x28f0
leaq -0x70(%rbp), %rdi
callq 0x2b10
jmp 0x26ab
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x28f0
jmp 0x288f
movq 0x588c(%rip), %rdi      # 0x7fd0
leaq 0x28bb(%rip), %rsi      # 0x5006
callq 0x2120
jmp 0x2752
leaq -0x50(%rbp), %rdi
movq %rdi, -0x120(%rbp)
callq 0x2a50
movq -0x120(%rbp), %rdi
movq %rax, -0xb0(%rbp)
callq 0x2a80
movq %rax, -0xb8(%rbp)
movq -0xb0(%rbp), %rdi
movq -0xb8(%rbp), %rsi
leaq 0x3ef(%rip), %rdx       # 0x2b80
callq 0x2b30
jmp 0x2798
leaq -0x50(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq -0xc0(%rbp), %rdi
callq 0x2a50
movq %rax, -0xc8(%rbp)
movq -0xc0(%rbp), %rdi
callq 0x2a80
movq %rax, -0xd0(%rbp)
leaq -0xc8(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0x2ab0
testb $0x1, %al
jne 0x27e5
jmp 0x286a
leaq -0xc8(%rbp), %rdi
callq 0x2af0
movq %rax, %rsi
leaq -0x100(%rbp), %rdi
callq 0x28b0
jmp 0x2802
movq 0x57c7(%rip), %rdi      # 0x7fd0
leaq -0x100(%rbp), %rsi
callq 0x24a0
movq %rax, -0x128(%rbp)
jmp 0x281e
movq -0x128(%rbp), %rdi
movq 0x5794(%rip), %rsi      # 0x7fc0
callq 0x2150
jmp 0x2833
leaq -0x100(%rbp), %rdi
callq 0x28f0
leaq -0xc8(%rbp), %rdi
callq 0x2b10
jmp 0x27c9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x100(%rbp), %rdi
callq 0x28f0
jmp 0x288f
movl $0x0, -0x4(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x2c00
leaq -0x38(%rbp), %rdi
callq 0x28f0
movl -0x4(%rbp), %eax
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
leaq -0x50(%rbp), %rdi
callq 0x2c00
leaq -0x38(%rbp), %rdi
callq 0x28f0
movq -0x58(%rbp), %rdi
callq 0x21f0
nopw (%rax,%rax)