// File: /workspace/github_cpp_makefile_star2_O1/iZhangHui[P]CppPrimer/CH10_GenericAlgorithms/examples/bind2.cc
// Function: main
int main()
{
	string s;
	vector<string> words;
	while (cin >> s)
		words.push_back(s);

	for_each(words.begin(), words.end(), 
	         bind(print, ref(cout), _1, ' '));
	cout << endl;

	ofstream os("data/outFile1");
	for_each(words.begin(), words.end(), 
	         bind(print, ref(os), _1, ' '));
	os << endl;

	ifstream is("data/outFile1");
	istream_iterator<string> in(is), eof;
	for_each(in, eof, bind(print, ref(cout), _1, '\n'));
	cout << endl;

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x518, %rsp            # imm = 0x518
leaq -0x40(%rbp), %r13
movq %r13, -0x10(%r13)
xorl %eax, %eax
movq %rax, -0x8(%r13)
movb $0x0, (%r13)
leaq -0x70(%rbp), %rbx
movq %rax, 0x10(%rbx)
xorps %xmm0, %xmm0
movaps %xmm0, (%rbx)
movq 0x2c57(%rip), %r14      # 0x4fe0
leaq -0x50(%rbp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x2150
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x23b3
movq %rbx, %rdi
movq %r15, %rsi
callq 0x27f8
jmp 0x238d
movq -0x70(%rbp), %r15
movq -0x68(%rbp), %r12
cmpq %r12, %r15
je 0x23fd
movq 0x2c09(%rip), %rbx      # 0x4fd0
leaq -0x538(%rbp), %r14
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %rbx, %rdi
callq 0x2140
movb $0x20, -0x538(%rbp)
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x2140
addq $0x20, %r15
cmpq %r12, %r15
jne 0x23ce
movq 0x2bcc(%rip), %rdi      # 0x4fd0
movq (%rdi), %rax
addq -0x18(%rax), %rdi
movl $0xa, %esi
callq 0x2100
movsbl %al, %esi
movq 0x2bb1(%rip), %rdi      # 0x4fd0
callq 0x2030
movq %rax, %rdi
callq 0x20a0
leaq 0xbd1(%rip), %rsi       # 0x3004
leaq -0x330(%rbp), %rbx
movq %rbx, %rdi
movl $0x10, %edx
callq 0x2130
movq -0x70(%rbp), %r12
movq -0x68(%rbp), %r13
cmpq %r13, %r12
je 0x2493
leaq -0x330(%rbp), %r14
leaq -0x538(%rbp), %r15
movq (%r12), %rsi
movq 0x8(%r12), %rdx
movq %r14, %rdi
callq 0x2140
movb $0x20, -0x538(%rbp)
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x2140
addq $0x20, %r12
cmpq %r13, %r12
jne 0x2462
movq -0x330(%rbp), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x2100
movsbl %al, %esi
leaq -0x330(%rbp), %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20a0
leaq 0xb3b(%rip), %rsi       # 0x3004
leaq -0x538(%rbp), %rdi
movl $0x8, %edx
callq 0x21c0
leaq -0x130(%rbp), %rdi
leaq -0x538(%rbp), %rsi
callq 0x2844
xorl %eax, %eax
leaq -0xe8(%rbp), %r13
movq %rax, -0x18(%r13)
movq %r13, -0x10(%r13)
movq %rax, -0x8(%r13)
movb %al, (%r13)
movb %al, 0x10(%r13)
movq -0x130(%rbp), %rax
movq -0x128(%rbp), %rsi
leaq -0x98(%rbp), %rdi
movq %rax, -0x8(%rdi)
leaq -0x88(%rbp), %rax
movq %rax, -0x10(%rax)
movq -0x120(%rbp), %rdx
addq %rsi, %rdx
callq 0x2afe
movb -0x108(%rbp), %al
movb %al, -0x78(%rbp)
movq -0x100(%rbp), %rax
movq -0xf8(%rbp), %rsi
leaq -0xc8(%rbp), %rdi
movq %rax, -0x8(%rdi)
leaq -0xb8(%rbp), %r12
movq %r12, -0x10(%r12)
movq -0xf0(%rbp), %rdx
addq %rsi, %rdx
callq 0x2afe
movb -0xd8(%rbp), %al
movb %al, -0xa8(%rbp)
movq 0x2a43(%rip), %rbx      # 0x4fd0
leaq -0x29(%rbp), %r14
leaq -0xa0(%rbp), %r15
movb -0x78(%rbp), %al
cmpb -0xa8(%rbp), %al
jne 0x25b7
testb %al, %al
je 0x25eb
movq -0xa0(%rbp), %rax
cmpq -0xd0(%rbp), %rax
je 0x25eb
movq -0x98(%rbp), %rsi
movq -0x90(%rbp), %rdx
movq %rbx, %rdi
callq 0x2140
movb $0xa, -0x29(%rbp)
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x2140
movq %r15, %rdi
callq 0x2bfc
jmp 0x2598
movq -0xc8(%rbp), %rdi
cmpq %r12, %rdi
je 0x2606
movq -0xb8(%rbp), %rsi
incq %rsi
callq 0x2120
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
cmpq %rax, %rdi
je 0x2628
movq -0x88(%rbp), %rsi
incq %rsi
callq 0x2120
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x2100
movsbl %al, %esi
movq 0x298a(%rip), %rdi      # 0x4fd0
callq 0x2030
movq %rax, %rdi
callq 0x20a0
movq -0xf8(%rbp), %rdi
cmpq %r13, %rdi
je 0x266e
movq -0xe8(%rbp), %rsi
incq %rsi
callq 0x2120
leaq -0x118(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
leaq -0x40(%rbp), %rbx
je 0x2691
movq -0x118(%rbp), %rsi
incq %rsi
callq 0x2120
leaq -0x538(%rbp), %rdi
callq 0x2040
movq 0x2924(%rip), %rax      # 0x4fc8
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq -0x328(%rbp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, -0x330(%rbp,%rcx)
callq 0x20e0
leaq -0x238(%rbp), %rdi
callq 0x2060
leaq -0x70(%rbp), %rdi
callq 0x289c
movq -0x50(%rbp), %rdi
cmpq %rbx, %rdi
je 0x26f1
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2120
xorl %eax, %eax
addq $0x518, %rsp            # imm = 0x518
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x2759
movq %rax, %rbx
jmp 0x27b5
jmp 0x2729
movq %rax, %rbx
leaq -0x40(%rbp), %r13
jmp 0x27d1
jmp 0x2729
jmp 0x2733
movq %rax, %rbx
jmp 0x277b
movq %rax, %rbx
jmp 0x27c1
jmp 0x2733
movq %rax, %rbx
jmp 0x27d1
movq %rax, %rbx
movq -0xc8(%rbp), %rdi
cmpq %r12, %rdi
je 0x2759
movq -0xb8(%rbp), %rsi
incq %rsi
callq 0x2120
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
cmpq %rax, %rdi
je 0x277b
movq -0x88(%rbp), %rsi
incq %rsi
callq 0x2120
movq -0xf8(%rbp), %rdi
cmpq %r13, %rdi
je 0x2796
movq -0xe8(%rbp), %rsi
incq %rsi
callq 0x2120
leaq -0x118(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x27b5
movq -0x118(%rbp), %rsi
incq %rsi
callq 0x2120
leaq -0x538(%rbp), %rdi
callq 0x2040
leaq -0x40(%rbp), %r13
leaq -0x330(%rbp), %rdi
callq 0x2170
leaq -0x70(%rbp), %rdi
callq 0x289c
movq -0x50(%rbp), %rdi
cmpq %r13, %rdi
je 0x27ef
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2120
movq %rbx, %rdi
callq 0x21a0
nop