// File: /workspace/github_cpp_makefile_star2_O3/tanguysegarra[P]libcsv/src/main.cc
// Function: main
int main(void)
{
    /* TESTING READER CLASS */ 
    auto r = csv::Reader("tests/test.csv", ';');
    auto colnames = r.get_column_names();
    for (size_t i = 0; i < colnames.size(); i++)
    {
        std::cout << colnames[i];
        if (i != colnames.size() - 1)
            std::cout << " | ";
    }
    std::cout << "\n";

    for (auto& colname : colnames)
    {
        std::cout << colname << ": ";
        for (auto& val : r[colname])
            std::cout << val << ", ";
        std::cout << "\n";
    }

    for (auto& val : r["NAME"])
        std::cout << val << ", ";

    std::cout << "\n";

    /* TESTING WRITER CLASS */ 

    auto data = r.get_rows();

    auto w = csv::Writer("output.csv", ';');
    w.set_rows(data);
    w.write_rows();

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
leaq 0x58(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0xfaa4(%rip), %rsi      # 0x15146
leaq 0xfaab(%rip), %rdx      # 0x15154
leaq 0x48(%rsp), %rdi
callq 0xad1a
leaq 0x28(%rsp), %rdx
movb $0x3b, (%rdx)
leaq 0x90(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x50f4
movq 0x48(%rsp), %rdi
cmpq %r14, %rdi
je 0x56e4
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x42b0
leaq 0x10(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x5186
movq 0x10(%rsp), %rax
cmpq %rax, 0x18(%rsp)
je 0x5771
movl $0x8, %r15d
xorl %r12d, %r12d
movq 0x188a6(%rip), %rbx     # 0x1dfb8
leaq 0xfa3c(%rip), %r14      # 0x15155
movq -0x8(%rax,%r15), %rsi
movq (%rax,%r15), %rdx
movq %rbx, %rdi
callq 0x4310
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
subq %rax, %rcx
sarq $0x5, %rcx
leaq -0x1(%rcx), %rdx
cmpq %rdx, %r12
je 0x5765
movl $0x3, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4310
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
subq %rax, %rcx
sarq $0x5, %rcx
incq %r12
addq $0x20, %r15
cmpq %rcx, %r12
jb 0x5719
movq 0x18840(%rip), %rdi     # 0x1dfb8
leaq 0xfa5c(%rip), %rsi      # 0x151db
movl $0x1, %edx
callq 0x4310
movq 0x10(%rsp), %rbx
movq 0x18(%rsp), %rax
movq %rax, 0x88(%rsp)
cmpq %rax, %rbx
je 0x5869
movq 0x1880d(%rip), %r14     # 0x1dfb8
leaq 0x48(%rsp), %r12
leaq 0xf9a2(%rip), %r15      # 0x15159
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r14, %rdi
callq 0x4310
movl $0x2, %edx
movq %rax, %rdi
leaq 0xf940(%rip), %rsi      # 0x15115
callq 0x4310
leaq 0x90(%rsp), %rdi
movq %rbx, %rsi
callq 0x5206
movq 0x90(%rsp), %rcx
imulq $0x38, %rax, %rax
leaq (%rcx,%rax), %rsi
addq $0x20, %rsi
movq %r12, %rdi
callq 0x5f54
movq 0x48(%rsp), %rbp
movq 0x50(%rsp), %r13
cmpq %r13, %rbp
je 0x583b
movq (%rbp), %rsi
movq 0x8(%rbp), %rdx
movq %r14, %rdi
callq 0x4310
movl $0x2, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x4310
addq $0x20, %rbp
jmp 0x5810
movq %r12, %rdi
callq 0x5e20
movl $0x1, %edx
movq %r14, %rdi
leaq 0xf989(%rip), %rsi      # 0x151db
callq 0x4310
addq $0x20, %rbx
cmpq 0x88(%rsp), %rbx
jne 0x57b7
leaq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %r14
movq %r14, (%rdi)
leaq 0xf8df(%rip), %rsi      # 0x1515c
leaq 0xf8dc(%rip), %rdx      # 0x15160
callq 0xad1a
leaq 0x90(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x5206
movq 0x90(%rsp), %rcx
imulq $0x38, %rax, %rax
leaq (%rcx,%rax), %rsi
addq $0x20, %rsi
leaq 0x28(%rsp), %rdi
callq 0x5f54
movq 0x48(%rsp), %rdi
cmpq %r14, %rdi
je 0x58d0
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x42b0
movq 0x28(%rsp), %r15
movq 0x30(%rsp), %r12
cmpq %r12, %r15
je 0x5915
movq 0x186d2(%rip), %rbx     # 0x1dfb8
leaq 0xf86c(%rip), %r14      # 0x15159
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %rbx, %rdi
callq 0x4310
movl $0x2, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x4310
addq $0x20, %r15
cmpq %r12, %r15
jne 0x58ed
leaq 0x28(%rsp), %rdi
callq 0x5e20
movq 0x18692(%rip), %rdi     # 0x1dfb8
leaq 0xf8ae(%rip), %rsi      # 0x151db
movl $0x1, %edx
callq 0x4310
leaq 0xd0(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x5e7e
leaq 0x38(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0xf805(%rip), %rsi      # 0x15161
leaq 0xf808(%rip), %rdx      # 0x1516b
leaq 0x28(%rsp), %rdi
callq 0xad1a
leaq 0xf(%rsp), %rdx
movb $0x3b, (%rdx)
leaq 0x48(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x5392
movq 0x28(%rsp), %rdi
cmpq %r14, %rdi
je 0x599b
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x42b0
leaq 0x48(%rsp), %rdi
leaq 0xd0(%rsp), %rsi
callq 0x5fde
leaq 0x48(%rsp), %rdi
callq 0x53ea
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x59d2
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x42b0
leaq 0x48(%rsp), %rdi
callq 0x5b88
leaq 0xd0(%rsp), %rdi
callq 0x5b88
leaq 0x10(%rsp), %rdi
callq 0x5e20
leaq 0xb8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5a14
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x42b0
leaq 0x90(%rsp), %rdi
callq 0x5b88
xorl %eax, %eax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r14, %rdi
je 0x5a94
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x42b0
jmp 0x5a94
movq %rax, %rbx
jmp 0x5a94
jmp 0x5acf
jmp 0x5acf
movq %rax, %rbx
jmp 0x5aeb
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r14, %rdi
je 0x5af8
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x42b0
jmp 0x5af8
movq %rax, %rbx
jmp 0x5af8
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x60b4
leaq 0xd0(%rsp), %rdi
callq 0x5b88
jmp 0x5ae1
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r14, %rdi
je 0x5ae1
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x42b0
jmp 0x5ae1
jmp 0x5acf
jmp 0x5acf
jmp 0x5acf
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
jmp 0x5adc
movq %rax, %rbx
jmp 0x5ae1
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x5e20
leaq 0x10(%rsp), %rdi
callq 0x5e20
leaq 0x90(%rsp), %rdi
callq 0x60da
movq %rbx, %rdi
callq 0x4470