// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
subq $0x568, %rsp            # imm = 0x568
leaq -0x40(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq -0x30(%rbp), %rbx
andq $0x0, 0x10(%rbx)
xorps %xmm0, %xmm0
movaps %xmm0, (%rbx)
movq 0x2cb1(%rip), %r14      # 0x3fe0
leaq -0x50(%rbp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x1110
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x1359
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1570
jmp 0x1333
movq -0x30(%rbp), %rsi
movq -0x28(%rbp), %rdx
leaq -0x8c(%rip), %r15       # 0x12dc
leaq -0x170(%rbp), %rcx
movq %r15, (%rcx)
movb $0x20, 0x8(%rcx)
movq 0x2c53(%rip), %rax      # 0x3fd0
movq %rax, 0x10(%rcx)
leaq -0x378(%rbp), %rdi
callq 0x15ab
movq 0x2c3c(%rip), %rbx      # 0x3fd0
movq %rbx, %rdi
callq 0x1080
leaq 0xc61(%rip), %rsi       # 0x2004
leaq -0x578(%rbp), %r14
pushq $0x10
popq %rdx
movq %r14, %rdi
callq 0x10f0
movq -0x30(%rbp), %rsi
movq -0x28(%rbp), %rdx
leaq -0x158(%rbp), %rcx
movq %r15, (%rcx)
movb $0x20, 0x8(%rcx)
movq %r14, 0x10(%rcx)
leaq -0x378(%rbp), %rdi
callq 0x15fb
leaq -0x578(%rbp), %rdi
callq 0x1080
leaq 0xc16(%rip), %rsi       # 0x2004
leaq -0x378(%rbp), %rdi
pushq $0x8
popq %rdx
callq 0x1190
leaq -0xe0(%rbp), %rdi
leaq -0x378(%rbp), %rsi
callq 0x164c
leaq -0x108(%rbp), %r14
andq $0x0, -0x8(%r14)
leaq -0xf8(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
xorl %ecx, %ecx
movb %cl, (%rax)
movb %cl, 0x10(%rax)
leaq -0xb0(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
callq 0x1700
leaq -0x80(%rbp), %rdi
leaq -0x110(%rbp), %rsi
callq 0x1700
leaq -0x140(%rbp), %rcx
movq %r15, (%rcx)
movb $0xa, 0x8(%rcx)
movq %rbx, 0x10(%rcx)
leaq -0x128(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
leaq -0x80(%rbp), %rdx
callq 0x168c
leaq -0x78(%rbp), %rdi
callq 0x1070
leaq -0xa8(%rbp), %rdi
callq 0x1070
movq 0x2b35(%rip), %rdi      # 0x3fd0
callq 0x1080
movq %r14, %rdi
callq 0x1070
leaq -0xd8(%rbp), %rdi
callq 0x1070
leaq -0x378(%rbp), %rdi
callq 0x1030
leaq -0x578(%rbp), %rdi
callq 0x1150
leaq -0x30(%rbp), %rdi
callq 0x172c
leaq -0x50(%rbp), %rdi
callq 0x1070
xorl %eax, %eax
addq $0x568, %rsp            # imm = 0x568
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x78(%rbp), %rdi
callq 0x1070
jmp 0x14ff
movq %rax, %rbx
leaq -0xa8(%rbp), %rdi
callq 0x1070
jmp 0x1524
movq %rax, %rbx
jmp 0x1538
jmp 0x1516
jmp 0x1516
movq %rax, %rbx
jmp 0x1544
jmp 0x1552
jmp 0x1552
jmp 0x1552
movq %rax, %rbx
movq %r14, %rdi
callq 0x1070
leaq -0xd8(%rbp), %rdi
callq 0x1070
leaq -0x378(%rbp), %rdi
callq 0x1030
leaq -0x578(%rbp), %rdi
callq 0x1150
jmp 0x1555
movq %rax, %rbx
leaq -0x30(%rbp), %rdi
callq 0x172c
leaq -0x50(%rbp), %rdi
callq 0x1070
movq %rbx, %rdi
callq 0x1180
nop