// File: /workspace/github_cpp_makefile_star2_O3/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 0x1516
movq (%rbx), %rcx
movq 0x8(%rbx), %rax
cmpq %rax, %rcx
je 0x1301
cmpl $0x3, (%rcx)
je 0x1301
addq $0x4, %rcx
cmpq %rax, %rcx
jne 0x12f0
movq %rax, %rcx
xorl %edx, %edx
cmpq %rax, %rcx
sete %dl
leaq 0xd0c(%rip), %rax       # 0x201c
leaq 0xd09(%rip), %rbx       # 0x2020
movq %rbx, %rsi
cmoveq %rax, %rsi
leaq 0x6(,%rdx,4), %rdx
movq 0x2cab(%rip), %rdi      # 0x3fd8
callq 0x10d0
leaq -0xd0(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0xce3(%rip), %rsi       # 0x2027
leaq 0xce1(%rip), %rdx       # 0x202c
leaq -0xe0(%rbp), %r14
movq %r14, %rdi
callq 0x1686
leaq -0xc0(%rbp), %r15
leaq -0xb0(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0xcba(%rip), %rsi       # 0x202d
leaq 0xcb8(%rip), %rdx       # 0x2032
movq %r15, %rdi
callq 0x1686
leaq -0xa0(%rbp), %r15
leaq -0x90(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0xc98(%rip), %rsi       # 0x2033
leaq 0xc9a(%rip), %rdx       # 0x203c
movq %r15, %rdi
callq 0x1686
leaq -0x80(%rbp), %r15
leaq -0x70(%rbp), %r13
movq %r13, -0x10(%r13)
leaq 0xc80(%rip), %rsi       # 0x203d
leaq 0xc7f(%rip), %rdx       # 0x2043
movq %r15, %rdi
callq 0x1686
leaq -0x48(%rbp), %r12
leaq -0xe0(%rbp), %rsi
leaq -0x29(%rbp), %rcx
movl $0x4, %edx
movq %r12, %rdi
callq 0x155c
movq $-0x80, %r15
movq -0x10(%r13), %rdi
cmpq %rdi, %r13
je 0x1404
movq (%r13), %rsi
incq %rsi
callq 0x10c0
addq $-0x20, %r13
addq $0x20, %r15
jne 0x13ef
movq -0x48(%rbp), %r13
movq %r12, %r14
cmpq %r12, %r13
je 0x1443
leaq 0xc12(%rip), %r15       # 0x2033
leaq -0x48(%rbp), %r14
leaq 0x10(%r13), %rdi
movq %r15, %rsi
callq 0x1040
testl %eax, %eax
je 0x1440
movq (%r13), %r13
cmpq %r14, %r13
jne 0x1425
jmp 0x1443
movq %r13, %r14
xorl %eax, %eax
cmpq %r12, %r14
sete %al
leaq 0xbca(%rip), %rcx       # 0x201c
cmoveq %rcx, %rbx
leaq 0x6(,%rax,4), %rdx
movq 0x2b73(%rip), %rdi      # 0x3fd8
movq %rbx, %rsi
callq 0x10d0
leaq -0x48(%rbp), %rdi
callq 0x159a
movq -0x60(%rbp), %rdi
testq %rdi, %rdi
je 0x148b
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 0x159a
jmp 0x14f8
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
callq 0x1130
jmp 0x14f8
jmp 0x14c6
jmp 0x14c6
movq %rax, %rbx
addq $-0x10, %r15
movq -0x10(%r15), %rdi
cmpq %rdi, %r15
je 0x14e1
movq (%r15), %rsi
incq %rsi
callq 0x10c0
leaq -0x20(%r15), %rax
addq $-0x10, %r15
cmpq %r14, %r15
movq %rax, %r15
jne 0x14cd
jmp 0x14f8
jmp 0x14f5
movq %rax, %rbx
movq -0x60(%rbp), %rdi
testq %rdi, %rdi
je 0x150d
movq -0x50(%rbp), %rsi
subq %rdi, %rsi
callq 0x10c0
movq %rbx, %rdi
callq 0x1100
nop