// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
subq $0x4a8, %rsp            # imm = 0x4A8
leaq 0x70(%rsp), %rbx
movq %rbx, %rdi
callq 0x5228
leaq 0x1b9d(%rip), %rsi      # 0x7293
movq %rbx, %rdi
callq 0x5996
leaq 0x70(%rsp), %rdi
orb $0x4, 0x10(%rdi)
movl $0x2a, 0x28(%rdi)
leaq 0x1b84(%rip), %rsi      # 0x7299
callq 0x5a6c
leaq 0x40(%rsp), %rdi
callq 0x5228
leaq 0x1b7a(%rip), %rsi      # 0x72a5
leaq 0x40(%rsp), %rdi
callq 0x5996
leaq 0x40(%rsp), %rdi
orb $0x4, 0x10(%rdi)
movl $0x5f4cf8f, 0x28(%rdi)  # imm = 0x5F4CF8F
leaq 0x1b5d(%rip), %rsi      # 0x72a9
callq 0x5a6c
leaq 0x2a8(%rsp), %rdi
callq 0x4430
leaq 0x1b4f(%rip), %rsi      # 0x72b4
leaq 0x2a8(%rsp), %rdi
pushq $0x10
popq %rdx
callq 0x4040
leaq 0xa0(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x4676
leaq 0xd0(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x4676
leaq 0x8(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
pushq $0x2
popq %rdx
leaq 0x20(%rsp), %rcx
callq 0x5b42
pushq $0x30
popq %rbx
leaq (%rsp,%rbx), %rdi
addq $0xa0, %rdi
callq 0x4738
addq $-0x30, %rbx
cmpq $-0x30, %rbx
jne 0x57b6
leaq 0x2a8(%rsp), %rdi
leaq 0x8(%rsp), %rsi
xorl %edx, %edx
callq 0x5b7b
leaq 0x2a8(%rsp), %rdi
callq 0x4340
leaq 0xa0(%rsp), %rdi
callq 0x42d0
leaq 0x1aaf(%rip), %rsi      # 0x72b4
leaq 0xa0(%rsp), %rdi
pushq $0x8
popq %rdx
callq 0x41d0
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %rsi
movaps %xmm0, (%rsi)
leaq 0x11b(%rip), %rax       # 0x5942
movq %rax, 0x18(%rsi)
leaq 0x14c(%rip), %rax       # 0x597e
movq %rax, 0x10(%rsi)
leaq 0xa0(%rsp), %rdi
callq 0x5bfc
leaq 0xa0(%rsp), %rdi
callq 0x4090
leaq 0x20(%rsp), %rdi
callq 0x6480
leaq 0xa0(%rsp), %rdi
callq 0x40c0
leaq 0x8(%rsp), %rdi
callq 0x5c4a
leaq 0x2a8(%rsp), %rdi
callq 0x43a0
leaq 0x40(%rsp), %rdi
callq 0x4738
leaq 0x70(%rsp), %rdi
callq 0x4738
xorl %eax, %eax
addq $0x4a8, %rsp            # imm = 0x4A8
popq %rbx
popq %r14
retq
movq %rax, %rbx
jmp 0x58f3
jmp 0x5902
movq %rax, %rbx
pushq $0x30
popq %r14
leaq (%rsp,%r14), %rdi
addq $0xa0, %rdi
callq 0x4738
addq $-0x30, %r14
cmpq $-0x30, %r14
jne 0x58ad
jmp 0x590f
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
callq 0x4738
jmp 0x590f
jmp 0x58dd
movq %rax, %rbx
jmp 0x590f
jmp 0x591e
jmp 0x593d
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x6480
leaq 0xa0(%rsp), %rdi
callq 0x40c0
jmp 0x5905
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x5c4a
leaq 0x2a8(%rsp), %rdi
callq 0x43a0
jmp 0x5921
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x4738
leaq 0x70(%rsp), %rdi
callq 0x4738
movq %rbx, %rdi
callq 0x4470
movq %rax, %rbx
jmp 0x592b