// File: iZhangHui[P]CppPrimer/CH10_GenericAlgorithms/examples/equal.cc
// Function: main
int main()
{
	list<const char *> roster1;
	vector<string> roster2;
	roster2 = {"hello", "so long", "tata"};
	roster1 = {"hello", "so long"};

	auto b = 
	// roster2 should have at least as many elements as roster1
	equal(roster1.cbegin(), roster1.cend(), roster2.cbegin());

	(b) ? cout << "true" : cout << "false";
	cout << endl;

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x190, %rsp            # imm = 0x190
movl $0x0, -0x4(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x2710
leaq -0x38(%rbp), %rdi
callq 0x2730
movb $0x1, -0xc7(%rbp)
leaq -0xa8(%rbp), %rax
movq %rax, -0x118(%rbp)
movq %rax, -0xb0(%rbp)
leaq -0xb1(%rbp), %rdi
movq %rdi, -0x110(%rbp)
callq 0x21b0
movq -0x118(%rbp), %rdi
movq -0x110(%rbp), %rdx
leaq 0x2c9c(%rip), %rsi      # 0x5004
callq 0x2150
jmp 0x236f
leaq -0x88(%rbp), %rax
movq %rax, -0x128(%rbp)
movq %rax, -0xb0(%rbp)
leaq -0xc5(%rbp), %rdi
movq %rdi, -0x120(%rbp)
callq 0x21b0
movq -0x128(%rbp), %rdi
movq -0x120(%rbp), %rdx
leaq 0x2c5e(%rip), %rsi      # 0x500a
callq 0x2150
jmp 0x23b3
leaq -0x68(%rbp), %rax
movq %rax, -0x138(%rbp)
movq %rax, -0xb0(%rbp)
leaq -0xc6(%rbp), %rdi
movq %rdi, -0x130(%rbp)
callq 0x21b0
movq -0x138(%rbp), %rdi
movq -0x130(%rbp), %rdx
leaq 0x2c25(%rip), %rsi      # 0x5012
callq 0x2150
jmp 0x23f4
movb $0x0, -0xc7(%rbp)
leaq -0xa8(%rbp), %rax
movq %rax, -0x48(%rbp)
movq $0x3, -0x40(%rbp)
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
leaq -0x38(%rbp), %rdi
callq 0x2750
jmp 0x2421
leaq -0xa8(%rbp), %rax
movq %rax, -0x148(%rbp)
addq $0x60, %rax
movq %rax, -0x140(%rbp)
movq -0x140(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x150(%rbp)
callq 0x20d0
movq -0x148(%rbp), %rcx
movq -0x150(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x140(%rbp)
jne 0x243a
leaq -0xc6(%rbp), %rdi
callq 0x2140
leaq -0xc5(%rbp), %rdi
callq 0x2140
leaq -0xb1(%rbp), %rdi
callq 0x2140
leaq 0x2b6e(%rip), %rax      # 0x5004
movq %rax, -0xe8(%rbp)
leaq 0x2b66(%rip), %rax      # 0x500a
movq %rax, -0xe0(%rbp)
leaq -0xe8(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq $0x2, -0xd0(%rbp)
movq -0xd8(%rbp), %rsi
movq -0xd0(%rbp), %rdx
leaq -0x20(%rbp), %rdi
callq 0x27a0
jmp 0x24dd
leaq -0x20(%rbp), %rdi
movq %rdi, -0x160(%rbp)
callq 0x2840
movq -0x160(%rbp), %rdi
movq %rax, -0xf8(%rbp)
callq 0x2870
movq %rax, -0x100(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x28a0
movq %rax, -0x108(%rbp)
movq -0xf8(%rbp), %rdi
movq -0x100(%rbp), %rsi
movq -0x108(%rbp), %rdx
callq 0x27f0
movb %al, -0x151(%rbp)
jmp 0x2539
movb -0x151(%rbp), %al
andb $0x1, %al
movb %al, -0xe9(%rbp)
testb $0x1, -0xe9(%rbp)
je 0x2567
movq 0x5a81(%rip), %rdi      # 0x7fd8
leaq 0x2ab9(%rip), %rsi      # 0x5017
callq 0x2100
jmp 0x2565
jmp 0x257e
movq 0x5a6a(%rip), %rdi      # 0x7fd8
leaq 0x2aa7(%rip), %rsi      # 0x501c
callq 0x2100
jmp 0x257c
jmp 0x257e
movq 0x5a53(%rip), %rdi      # 0x7fd8
movq 0x5a3c(%rip), %rsi      # 0x7fc8
callq 0x2130
jmp 0x2593
movl $0x0, -0x4(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x28d0
leaq -0x20(%rbp), %rdi
callq 0x2930
movl -0x4(%rbp), %eax
addq $0x190, %rsp            # imm = 0x190
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xc0(%rbp)
movl %eax, -0xc4(%rbp)
jmp 0x266d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xc0(%rbp)
movl %eax, -0xc4(%rbp)
jmp 0x2661
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xc0(%rbp)
movl %eax, -0xc4(%rbp)
jmp 0x2655
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xc0(%rbp)
movl %eax, -0xc4(%rbp)
leaq -0xa8(%rbp), %rax
movq %rax, -0x170(%rbp)
addq $0x60, %rax
movq %rax, -0x168(%rbp)
movq -0x168(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x178(%rbp)
callq 0x20d0
movq -0x170(%rbp), %rcx
movq -0x178(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x168(%rbp)
jne 0x2622
jmp 0x2655
leaq -0xc6(%rbp), %rdi
callq 0x2140
leaq -0xc5(%rbp), %rdi
callq 0x2140
leaq -0xb1(%rbp), %rdi
callq 0x2140
testb $0x1, -0xc7(%rbp)
jne 0x2684
jmp 0x26d1
movq -0xb0(%rbp), %rax
leaq -0xa8(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x180(%rbp)
je 0x26cf
movq -0x180(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x188(%rbp)
callq 0x20d0
movq -0x188(%rbp), %rax
leaq -0xa8(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x180(%rbp)
jne 0x269e
jmp 0x26d1
jmp 0x26e5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xc0(%rbp)
movl %eax, -0xc4(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x28d0
leaq -0x20(%rbp), %rdi
callq 0x2930
movq -0xc0(%rbp), %rdi
callq 0x21a0
nopw %cs:(%rax,%rax)
nopl (%rax)