// File: /workspace/github_cpp_makefile_star2_O2/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 $0xd8, %rsp
leaq 0xe0ad(%rip), %rsi      # 0x13146
leaq 0x40(%rsp), %rdi
leaq 0x20(%rsp), %rdx
callq 0x5474
leaq 0x8(%rsp), %rdx
movb $0x3b, (%rdx)
leaq 0x98(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x4c4e
leaq 0x40(%rsp), %rdi
callq 0x4170
leaq 0x8(%rsp), %rdi
leaq 0x98(%rsp), %rsi
callq 0x4cb2
xorl %r15d, %r15d
movq 0x18ec8(%rip), %rbx     # 0x1dfb0
leaq 0xe066(%rip), %r14      # 0x13155
xorl %r12d, %r12d
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rax
subq %rsi, %rax
sarq $0x5, %rax
cmpq %rax, %r12
jae 0x513d
addq %r15, %rsi
movq %rbx, %rdi
callq 0x4290
movq 0x10(%rsp), %rax
subq 0x8(%rsp), %rax
sarq $0x5, %rax
decq %rax
cmpq %rax, %r12
je 0x5134
movq %rbx, %rdi
movq %r14, %rsi
callq 0x42b0
incq %r12
addq $0x20, %r15
jmp 0x50f2
movq 0x18e6c(%rip), %rdi     # 0x1dfb0
leaq 0xe090(%rip), %rsi      # 0x131db
callq 0x42b0
movq 0x8(%rsp), %rbx
movq 0x10(%rsp), %rbp
movq 0x18e4f(%rip), %r14     # 0x1dfb0
leaq 0xdff1(%rip), %r15      # 0x13159
cmpq %rbp, %rbx
je 0x51e6
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4290
movq %rax, %rdi
leaq 0xdf93(%rip), %rsi      # 0x13115
callq 0x42b0
leaq 0x40(%rsp), %rdi
leaq 0x98(%rsp), %rsi
movq %rbx, %rdx
callq 0x4de8
movq 0x40(%rsp), %r13
movq 0x48(%rsp), %r12
cmpq %r12, %r13
je 0x51c7
movq %r14, %rdi
movq %r13, %rsi
callq 0x4290
movq %rax, %rdi
movq %r15, %rsi
callq 0x42b0
addq $0x20, %r13
jmp 0x51a6
leaq 0x40(%rsp), %rdi
callq 0x572c
movq %r14, %rdi
leaq 0xe000(%rip), %rsi      # 0x131db
callq 0x42b0
addq $0x20, %rbx
jmp 0x5168
leaq 0xdf6f(%rip), %rsi      # 0x1315c
leaq 0x40(%rsp), %rdi
leaq 0x80(%rsp), %rdx
callq 0x5474
leaq 0x20(%rsp), %rdi
leaq 0x98(%rsp), %rsi
leaq 0x40(%rsp), %rdx
callq 0x4de8
leaq 0x40(%rsp), %rdi
callq 0x4170
movq 0x20(%rsp), %rbx
movq 0x28(%rsp), %r12
movq 0x18d7f(%rip), %r14     # 0x1dfb0
leaq 0xdf21(%rip), %r15      # 0x13159
cmpq %r12, %rbx
je 0x5259
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4290
movq %rax, %rdi
movq %r15, %rsi
callq 0x42b0
addq $0x20, %rbx
jmp 0x5238
leaq 0x20(%rsp), %rdi
callq 0x572c
movq 0x18d46(%rip), %rdi     # 0x1dfb0
leaq 0xdf6a(%rip), %rsi      # 0x131db
callq 0x42b0
leaq 0x80(%rsp), %rdi
leaq 0x98(%rsp), %rsi
callq 0x574e
leaq 0xdecf(%rip), %rsi      # 0x13161
leaq 0x20(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x5474
leaq 0x6(%rsp), %rdx
movb $0x3b, (%rdx)
leaq 0x40(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x4e5a
leaq 0x20(%rsp), %rdi
callq 0x4170
leaq 0x40(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x5852
leaq 0x40(%rsp), %rdi
callq 0x4e9a
leaq 0x40(%rsp), %rdi
callq 0x5930
leaq 0x80(%rsp), %rdi
callq 0x54e0
leaq 0x8(%rsp), %rdi
callq 0x572c
leaq 0x98(%rsp), %rdi
callq 0x5946
xorl %eax, %eax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x4170
jmp 0x536d
movq %rax, %rbx
jmp 0x536d
jmp 0x538c
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x4170
jmp 0x539e
jmp 0x538c
movq %rax, %rbx
jmp 0x53a8
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x4170
jmp 0x53b5
movq %rax, %rbx
jmp 0x53b5
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x5930
leaq 0x80(%rsp), %rdi
callq 0x54e0
jmp 0x539e
jmp 0x538c
jmp 0x538c
jmp 0x538c
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
jmp 0x5399
movq %rax, %rbx
jmp 0x539e
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x572c
leaq 0x8(%rsp), %rdi
callq 0x572c
leaq 0x98(%rsp), %rdi
callq 0x5946
movq %rbx, %rdi
callq 0x44b0