// File: /workspace/github_cpp_makefile_star2_O1/vgteam[P]stream/src/main.cpp
// Function: main
int main(int argc, char** argv) {
    Person person1;
    person1.set_name("Ralph");
    person1.set_id(42);
    person1.set_email("post please");
    Person person2;
    person2.set_name("Sal");
    person2.set_id(99929999);
    person2.set_email("morse code");
    ofstream out;
    out.open("test.stream");
    vector<Person> people = { person1, person2 };
    stream::write_buffered(out, people, 0);
    out.close();
    ifstream in;
    in.open("test.stream");
    function<void(Person&)> lambda = [](Person& p) {
        cout << p.name() << endl;
        cout << p.id() << endl;
    };
    stream::for_each(in, lambda);
    in.close();
    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x4a0, %rsp            # imm = 0x4A0
leaq 0x30(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x4696
orb $0x1, 0x10(%rbx)
leaq 0xa8(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x1a4b(%rip), %rsi      # 0x72bd
leaq 0x1a49(%rip), %rdx      # 0x72c2
leaq 0x98(%rsp), %rdi
callq 0x5fe6
movq 0x38(%rsp), %rsi
testb $0x1, %sil
jne 0x5c10
movq 0x48(%rsp), %rdi
cmpq 0x4707(%rip), %rdi      # 0x9fa8
je 0x58b2
leaq 0x98(%rsp), %rsi
callq 0x4180
jmp 0x58c4
leaq 0x48(%rsp), %rdi
leaq 0x98(%rsp), %rdx
callq 0x5456
movq 0x98(%rsp), %rdi
cmpq %r15, %rdi
je 0x58e1
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x42d0
movl $0x2a, 0x58(%rsp)
orb $0x6, 0x40(%rsp)
leaq 0x98(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x19c3(%rip), %rsi      # 0x72c3
leaq 0x19c7(%rip), %rdx      # 0x72ce
callq 0x5fe6
movq 0x38(%rsp), %rsi
testb $0x1, %sil
jne 0x5c1c
movq 0x50(%rsp), %rdi
cmpq 0x4681(%rip), %rdi      # 0x9fa8
je 0x5938
leaq 0x98(%rsp), %rsi
callq 0x4180
jmp 0x594a
leaq 0x50(%rsp), %rdi
leaq 0x98(%rsp), %rdx
callq 0x5456
movq 0x98(%rsp), %rdi
cmpq %r15, %rdi
je 0x5967
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x42d0
movq %rsp, %rdi
xorl %esi, %esi
callq 0x4696
orb $0x1, 0x10(%rsp)
leaq 0x98(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x1947(%rip), %rsi      # 0x72cf
leaq 0x1943(%rip), %rdx      # 0x72d2
callq 0x5fe6
movq 0x8(%rsp), %rsi
testb $0x1, %sil
jne 0x5c28
movq 0x18(%rsp), %rdi
cmpq 0x45f9(%rip), %rdi      # 0x9fa8
je 0x59c0
leaq 0x98(%rsp), %rsi
callq 0x4180
jmp 0x59d2
leaq 0x18(%rsp), %rdi
leaq 0x98(%rsp), %rdx
callq 0x5456
movq 0x98(%rsp), %rdi
cmpq %r15, %rdi
je 0x59ef
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x42d0
movl $0x5f4cf8f, 0x28(%rsp)  # imm = 0x5F4CF8F
orb $0x6, 0x10(%rsp)
leaq 0x98(%rsp), %r14
movq %r15, (%r14)
leaq 0x18c5(%rip), %rsi      # 0x72d3
leaq 0x18c8(%rip), %rdx      # 0x72dd
movq %r14, %rdi
callq 0x5fe6
movq 0x8(%rsp), %rsi
testb $0x1, %sil
jne 0x5c34
movq 0x20(%rsp), %rdi
cmpq 0x4570(%rip), %rdi      # 0x9fa8
je 0x5a49
leaq 0x98(%rsp), %rsi
callq 0x4180
jmp 0x5a5b
leaq 0x20(%rsp), %rdi
leaq 0x98(%rsp), %rdx
callq 0x5456
movq 0x98(%rsp), %rdi
cmpq %r15, %rdi
je 0x5a78
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x42d0
leaq 0x2a0(%rsp), %rdi
callq 0x4440
leaq 0x1852(%rip), %rsi      # 0x72de
leaq 0x2a0(%rsp), %rdi
movl $0x10, %edx
callq 0x4050
leaq 0x30(%rsp), %rsi
movq %r14, %r15
movq %r14, %rdi
callq 0x46e0
leaq 0xc8(%rsp), %r15
movq %rsp, %rsi
movq %r15, %rdi
callq 0x46e0
leaq 0x80(%rsp), %rdi
leaq 0x98(%rsp), %rsi
leaq 0x60(%rsp), %rcx
movl $0x2, %edx
callq 0x5e0e
movl $0x30, %ebx
leaq (%rsp,%rbx), %rdi
addq $0x98, %rdi
callq 0x479a
addq $-0x30, %rbx
cmpq $-0x30, %rbx
jne 0x5ae5
leaq 0x2a0(%rsp), %rdi
leaq 0x80(%rsp), %rsi
xorl %edx, %edx
callq 0x5e5a
leaq 0x2a0(%rsp), %rdi
callq 0x4350
leaq 0x98(%rsp), %rdi
callq 0x42e0
leaq 0x17a7(%rip), %rsi      # 0x72de
leaq 0x98(%rsp), %rdi
movl $0x8, %edx
callq 0x41c0
xorps %xmm0, %xmm0
leaq 0x60(%rsp), %rsi
movaps %xmm0, (%rsi)
leaq 0x215(%rip), %rax       # 0x5d70
movq %rax, 0x18(%rsi)
leaq 0x290(%rip), %rax       # 0x5df6
movq %rax, 0x10(%rsi)
leaq 0x98(%rsp), %rdi
callq 0x5f2e
leaq 0x98(%rsp), %rdi
callq 0x40a0
movq 0x70(%rsp), %rax
testq %rax, %rax
je 0x5b9d
leaq 0x60(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq 0x98(%rsp), %rdi
callq 0x40d0
leaq 0x80(%rsp), %rdi
callq 0x5fa4
movq 0x440a(%rip), %rax      # 0x9fc8
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0x2a8(%rsp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, 0x2a0(%rsp,%rcx)
callq 0x4250
leaq 0x398(%rsp), %rdi
callq 0x4110
movq %rsp, %rdi
callq 0x479a
leaq 0x30(%rsp), %rdi
callq 0x479a
xorl %eax, %eax
addq $0x4a0, %rsp            # imm = 0x4A0
popq %rbx
popq %r14
popq %r15
retq
andq $-0x2, %rsi
movq (%rsi), %rsi
jmp 0x5895
andq $-0x2, %rsi
movq (%rsi), %rsi
jmp 0x591b
andq $-0x2, %rsi
movq (%rsi), %rsi
jmp 0x59a3
andq $-0x2, %rsi
movq (%rsi), %rsi
jmp 0x5a2c
jmp 0x5d0e
movq %rax, %rbx
jmp 0x5cff
jmp 0x5d16
movq %rax, %rbx
movl $0x30, %r14d
leaq (%rsp,%r14), %rdi
addq $0x98, %rdi
callq 0x479a
addq $-0x30, %r14
cmpq $-0x30, %r14
jne 0x5c5b
jmp 0x5d26
movq %rax, %rbx
jmp 0x5d26
jmp 0x5cb1
jmp 0x5c88
jmp 0x5cb1
movq %rax, %rbx
movq 0x98(%rsp), %rdi
cmpq %r15, %rdi
je 0x5d33
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x42d0
jmp 0x5d33
movq %rax, %rbx
jmp 0x5d33
jmp 0x5cde
jmp 0x5cbc
jmp 0x5cde
movq %rax, %rbx
movq 0x98(%rsp), %rdi
cmpq %r15, %rdi
je 0x5d3b
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x42d0
jmp 0x5d3b
movq %rax, %rbx
jmp 0x5d3b
movq %rax, %rbx
movq 0x70(%rsp), %rax
testq %rax, %rax
je 0x5cff
leaq 0x60(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq 0x98(%rsp), %rdi
callq 0x40d0
jmp 0x5d19
movq %rax, %rdi
callq 0x52e3
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
callq 0x5fa4
leaq 0x2a0(%rsp), %rdi
callq 0x43b0
movq %rsp, %rdi
callq 0x479a
leaq 0x30(%rsp), %rdi
callq 0x479a
movq %rbx, %rdi
callq 0x4480
movq %rax, %rbx
cmpq %r15, %r14
je 0x5d26
leaq 0x98(%rsp), %r14
addq $-0x30, %r15
movq %r15, %rdi
callq 0x479a
cmpq %r14, %r15
jne 0x5d5d
jmp 0x5d26