// File: /workspace/github_cpp_makefile_star2_O1/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 0xfa90(%rip), %rsi      # 0x15146
leaq 0xfa97(%rip), %rdx      # 0x15154
leaq 0x48(%rsp), %rdi
callq 0xace8
leaq 0x28(%rsp), %rdx
movb $0x3b, (%rdx)
leaq 0x90(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x50e2
movq 0x48(%rsp), %rdi
cmpq %r14, %rdi
je 0x56f8
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x42b0
leaq 0x10(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x5174
movq 0x10(%rsp), %rax
cmpq %rax, 0x18(%rsp)
je 0x5781
movl $0x8, %r15d
xorl %r12d, %r12d
movq 0x18892(%rip), %rbx     # 0x1dfb8
leaq 0xfa28(%rip), %r14      # 0x15155
movq -0x8(%rax,%r15), %rsi
movq (%rax,%r15), %rdx
movq %rbx, %rdi
callq 0x4310
movq 0x18(%rsp), %rax
subq 0x10(%rsp), %rax
sarq $0x5, %rax
decq %rax
cmpq %rax, %r12
je 0x5764
movl $0x3, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4310
incq %r12
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
subq %rax, %rcx
sarq $0x5, %rcx
addq $0x20, %r15
cmpq %rcx, %r12
jb 0x572d
movq 0x18830(%rip), %rdi     # 0x1dfb8
leaq 0xfa4c(%rip), %rsi      # 0x151db
movl $0x1, %edx
callq 0x4310
movq 0x10(%rsp), %rbx
movq 0x18(%rsp), %rax
movq %rax, 0x88(%rsp)
cmpq %rax, %rbx
je 0x5879
movq 0x187fd(%rip), %r14     # 0x1dfb8
leaq 0x48(%rsp), %r12
leaq 0xf992(%rip), %r15      # 0x15159
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r14, %rdi
callq 0x4310
movl $0x2, %edx
movq %rax, %rdi
leaq 0xf930(%rip), %rsi      # 0x15115
callq 0x4310
leaq 0x90(%rsp), %rdi
movq %rbx, %rsi
callq 0x51f4
movq 0x90(%rsp), %rcx
imulq $0x38, %rax, %rax
leaq (%rcx,%rax), %rsi
addq $0x20, %rsi
movq %r12, %rdi
callq 0x5f66
movq 0x48(%rsp), %rbp
movq 0x50(%rsp), %r13
cmpq %r13, %rbp
je 0x584b
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 0x5820
movq %r12, %rdi
callq 0x5e34
movl $0x1, %edx
movq %r14, %rdi
leaq 0xf979(%rip), %rsi      # 0x151db
callq 0x4310
addq $0x20, %rbx
cmpq 0x88(%rsp), %rbx
jne 0x57c7
leaq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %r14
movq %r14, (%rdi)
leaq 0xf8cf(%rip), %rsi      # 0x1515c
leaq 0xf8cc(%rip), %rdx      # 0x15160
callq 0xace8
leaq 0x90(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x51f4
movq 0x90(%rsp), %rcx
imulq $0x38, %rax, %rax
leaq (%rcx,%rax), %rsi
addq $0x20, %rsi
leaq 0x28(%rsp), %rdi
callq 0x5f66
movq 0x48(%rsp), %rdi
cmpq %r14, %rdi
je 0x58e0
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x42b0
movq 0x28(%rsp), %r15
movq 0x30(%rsp), %r12
cmpq %r12, %r15
je 0x5925
movq 0x186c2(%rip), %rbx     # 0x1dfb8
leaq 0xf85c(%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 0x58fd
leaq 0x28(%rsp), %rdi
callq 0x5e34
movq 0x18682(%rip), %rdi     # 0x1dfb8
leaq 0xf89e(%rip), %rsi      # 0x151db
movl $0x1, %edx
callq 0x4310
leaq 0xd0(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x5e90
leaq 0x38(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0xf7f5(%rip), %rsi      # 0x15161
leaq 0xf7f8(%rip), %rdx      # 0x1516b
leaq 0x28(%rsp), %rdi
callq 0xace8
leaq 0xf(%rsp), %rdx
movb $0x3b, (%rdx)
leaq 0x48(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x53a8
movq 0x28(%rsp), %rdi
cmpq %r14, %rdi
je 0x59ab
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x42b0
leaq 0x48(%rsp), %rdi
leaq 0xd0(%rsp), %rsi
callq 0x5ff0
leaq 0x48(%rsp), %rdi
callq 0x5400
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x59e2
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x42b0
leaq 0x48(%rsp), %rdi
callq 0x5b98
leaq 0xd0(%rsp), %rdi
callq 0x5b98
leaq 0x10(%rsp), %rdi
callq 0x5e34
leaq 0xb8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5a24
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x42b0
leaq 0x90(%rsp), %rdi
callq 0x5b98
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 0x5aa4
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x42b0
jmp 0x5aa4
movq %rax, %rbx
jmp 0x5aa4
jmp 0x5adf
jmp 0x5adf
movq %rax, %rbx
jmp 0x5afb
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r14, %rdi
je 0x5b08
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x42b0
jmp 0x5b08
movq %rax, %rbx
jmp 0x5b08
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x60c6
leaq 0xd0(%rsp), %rdi
callq 0x5b98
jmp 0x5af1
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r14, %rdi
je 0x5af1
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x42b0
jmp 0x5af1
jmp 0x5adf
jmp 0x5adf
jmp 0x5adf
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
jmp 0x5aec
movq %rax, %rbx
jmp 0x5af1
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x5e34
leaq 0x10(%rsp), %rdi
callq 0x5e34
leaq 0x90(%rsp), %rdi
callq 0x60ec
movq %rbx, %rdi
callq 0x4470