// File: /workspace/github_cpp_makefile_star2_O1/iZhangHui[P]CppPrimer/CH16_TemplatesAndGenericProgramming/exercises/ex16_04.cc
// Function: main
int main(int argc, char const *argv[])
{
	std::vector<int> v = {1, 2, 3, 4, 5, 6};
	auto iterv = find(v.begin(), v.end(), 3);
	std::cout << (iterv != v.end() ? "found\n" : "not found\n");

	std::list<std::string> l = {"hello", "world", "cplusplus", "primer"};
	auto iterl = find(l.begin(), l.end(), "cplusplus");
	std::cout << (iterl != l.end() ? "found\n" : "not found\n");

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movups 0xd4d(%rip), %xmm0      # 0x2004
leaq -0xe0(%rbp), %rsi
movaps %xmm0, (%rsi)
movabsq $0x600000005, %rax      # imm = 0x600000005
movq %rax, 0x10(%rsi)
leaq -0x60(%rbp), %rbx
leaq -0x48(%rbp), %rcx
movl $0x6, %edx
movq %rbx, %rdi
callq 0x1528
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
cmpq %rcx, %rax
je 0x12fb
cmpl $0x3, (%rax)
je 0x12fb
addq $0x4, %rax
jmp 0x12eb
xorl %edx, %edx
cmpq %rcx, %rax
sete %dl
leaq 0xd12(%rip), %rax       # 0x201c
leaq 0xd0f(%rip), %rbx       # 0x2020
movq %rbx, %rsi
cmoveq %rax, %rsi
leaq 0x6(,%rdx,4), %rdx
movq 0x2cb1(%rip), %rdi      # 0x3fd8
callq 0x10d0
leaq -0xd0(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0xce9(%rip), %rsi       # 0x2027
leaq 0xce7(%rip), %rdx       # 0x202c
leaq -0xe0(%rbp), %r15
movq %r15, %rdi
callq 0x16a6
leaq -0xc0(%rbp), %r14
leaq -0xb0(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0xcc0(%rip), %rsi       # 0x202d
leaq 0xcbe(%rip), %rdx       # 0x2032
movq %r14, %rdi
callq 0x16a6
movq %r15, %r13
leaq -0xa0(%rbp), %r14
leaq -0x90(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0xc9b(%rip), %rsi       # 0x2033
leaq 0xc9d(%rip), %rdx       # 0x203c
movq %r14, %rdi
callq 0x16a6
leaq -0x80(%rbp), %r14
leaq -0x70(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0xc83(%rip), %rsi       # 0x203d
leaq 0xc82(%rip), %rdx       # 0x2043
movq %r14, %rdi
callq 0x16a6
leaq -0x48(%rbp), %r12
leaq -0xe0(%rbp), %rsi
leaq -0x29(%rbp), %rcx
movl $0x4, %edx
movq %r12, %rdi
callq 0x156e
movq $-0x80, %r14
movq -0x10(%r15), %rdi
cmpq %rdi, %r15
je 0x1400
movq (%r15), %rsi
incq %rsi
callq 0x10c0
addq $-0x20, %r15
addq $0x20, %r14
jne 0x13ec
movq -0x48(%rbp), %r15
cmpq %r12, %r15
je 0x1432
leaq 0xc19(%rip), %r14       # 0x2033
leaq 0x10(%r15), %rdi
movq %r14, %rsi
callq 0x1040
testl %eax, %eax
je 0x1432
movq (%r15), %r15
cmpq %r12, %r15
jne 0x141a
xorl %eax, %eax
cmpq %r12, %r15
sete %al
leaq 0xbdb(%rip), %rcx       # 0x201c
cmoveq %rcx, %rbx
leaq 0x6(,%rax,4), %rdx
movq 0x2b84(%rip), %rdi      # 0x3fd8
movq %rbx, %rsi
callq 0x10d0
leaq -0x48(%rbp), %rdi
callq 0x15ac
movq -0x60(%rbp), %rdi
testq %rdi, %rdi
je 0x147a
movq -0x50(%rbp), %rsi
subq %rdi, %rsi
callq 0x10c0
xorl %eax, %eax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x15ac
jmp 0x150a
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
callq 0x1130
movb $0x1, %al
jmp 0x14cc
jmp 0x14ba
jmp 0x14ba
movq %r15, %r13
movq %rax, %rbx
xorl %eax, %eax
jmp 0x14cc
movq %rax, %rbx
xorl %eax, %eax
movq %r15, %r13
movq %r15, %r14
cmpq %r14, %r13
sete %cl
orb %al, %cl
jne 0x150a
addq $-0x10, %r14
leaq -0xe0(%rbp), %r15
movq -0x10(%r14), %rdi
cmpq %rdi, %r14
je 0x14f5
movq (%r14), %rsi
incq %rsi
callq 0x10c0
leaq -0x20(%r14), %rax
addq $-0x10, %r14
cmpq %r15, %r14
movq %rax, %r14
jne 0x14e1
jmp 0x150a
movq %rax, %rbx
movq -0x60(%rbp), %rdi
testq %rdi, %rdi
je 0x151f
movq -0x50(%rbp), %rsi
subq %rdi, %rsi
callq 0x10c0
movq %rbx, %rdi
callq 0x1100
nop