// File: /workspace/github_cpp_makefile_star2_O3/Karunika[P]Taxi_Agency_OODB/./src/TaxiAgency.cpp
// Function: TaxiAgency::populate_drivers_db(char const*)
void TaxiAgency::populate_drivers_db(const char* DRIVERS_FILE){
    ifstream File;
    File.open(DRIVERS_FILE);
    Driver driver;
    if(File.is_open()){
        string t, fields[Driver::DriverAttributesCount];
        getline(File, t); // skip heading row
        while(getline(File, t)){
            populate_fields(t, fields, Driver::DriverAttributesCount);
            driver = Driver(fields[0].substr(1, fields[0].length()-2),
                        fields[1].substr(1, fields[1].length()-2),
                        fields[2].substr(1, fields[2].length()-2),
                        fields[3].substr(1, fields[3].length()-2),
                        fields[4].substr(1, fields[4].length()-2) == "IDLE" ? IDLE : ONSHIFT
                    );
            stats["drivers"]++;
            driver_db.push_back(driver);
        }
        File.close();
    }else{
        throw runtime_error("File couldn't be resolved");
    }

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x438, %rsp            # imm = 0x438
movq %rsi, %rbx
movq %rdi, %r15
leaq -0x460(%rbp), %r14
movq %r14, %rdi
callq 0x4310
movq %r14, %rdi
movq %rbx, %rsi
movl $0x8, %edx
callq 0x41c0
leaq -0x258(%rbp), %rdi
callq 0xf864
leaq -0x1e8(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq -0x3e8(%rbp), %rdi
callq 0x40d0
testb %al, %al
je 0x146a5
movq %rsp, -0x58(%rbp)
leaq -0x40(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movl 0xf069(%rip), %r12d     # 0x232c0
movq %rsp, %rbx
movq %r12, %rax
shlq $0x5, %rax
subq %rax, %rbx
movq %rbx, %rsp
testq %r12, %r12
je 0x14289
leaq 0x10(%rbx), %rcx
movq %rcx, -0x10(%rcx)
movq $0x0, -0x8(%rcx)
movb $0x0, (%rcx)
addq $0x20, %rcx
addq $-0x20, %rax
jne 0x14270
movq -0x460(%rbp), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x42a0
movsbl %al, %edx
leaq -0x460(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x44c0
leaq 0x20(%rbx), %rax
movq %rax, -0x88(%rbp)
leaq 0x40(%rbx), %rax
movq %rax, -0x80(%rbp)
leaq 0x60(%rbx), %rax
movq %rax, -0x78(%rbp)
leaq 0x80(%rbx), %rax
movq %rax, -0x70(%rbp)
leaq 0xa0(%r15), %rax
movq %rax, -0x68(%rbp)
addq $0x18, %r15
movq %r15, -0x60(%rbp)
leaq -0x1d0(%rbp), %r15
leaq -0x258(%rbp), %r14
movq %rbx, -0x30(%rbp)
movq -0x460(%rbp), %rax
movq -0x18(%rax), %rdi
leaq -0x460(%rbp), %rax
addq %rax, %rdi
movl $0xa, %esi
callq 0x42a0
movsbl %al, %edx
leaq -0x460(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x44c0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x145e6
leaq -0x98(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
addq %rsi, %rdx
leaq -0xa8(%rbp), %rdi
callq 0xf492
movl 0xef52(%rip), %edx      # 0x232c0
leaq -0xa8(%rbp), %rdi
movq %rbx, %rsi
callq 0x12514
movq -0xa8(%rbp), %rdi
leaq -0x98(%rbp), %rax
cmpq %rax, %rdi
je 0x14395
callq 0x4280
movq 0x8(%rbx), %rcx
addq $-0x2, %rcx
movl $0x1, %edx
leaq -0x128(%rbp), %rdi
movq %rbx, %rsi
callq 0x42f0
movq 0x28(%rbx), %rcx
addq $-0x2, %rcx
movl $0x1, %edx
leaq -0x108(%rbp), %rdi
movq -0x88(%rbp), %rsi
callq 0x42f0
movq 0x48(%rbx), %rcx
addq $-0x2, %rcx
movl $0x1, %edx
leaq -0xe8(%rbp), %rdi
movq -0x80(%rbp), %rsi
callq 0x42f0
movq 0x68(%rbx), %rcx
addq $-0x2, %rcx
movl $0x1, %edx
leaq -0xc8(%rbp), %rdi
movq -0x78(%rbp), %rsi
callq 0x42f0
movq 0x88(%rbx), %rcx
addq $-0x2, %rcx
movl $0x1, %edx
leaq -0x148(%rbp), %r13
movq %r13, %rdi
movq -0x70(%rbp), %rsi
callq 0x42f0
movq %r13, %rdi
leaq 0x77cd(%rip), %rsi      # 0x1bc05
callq 0x4100
xorl %r9d, %r9d
testl %eax, %eax
sete %r9b
movq %r15, %rbx
movq %r15, %rdi
leaq -0x128(%rbp), %rsi
leaq -0x108(%rbp), %rdx
leaq -0xe8(%rbp), %rcx
leaq -0xc8(%rbp), %r8
callq 0xfe38
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4340
leaq -0x238(%rbp), %rdi
leaq -0x1b0(%rbp), %rsi
callq 0x4340
leaq -0x218(%rbp), %rdi
leaq -0x190(%rbp), %rsi
callq 0x4340
leaq -0x1f8(%rbp), %rdi
leaq -0x170(%rbp), %rsi
callq 0x4340
movl -0x150(%rbp), %eax
movl %eax, -0x1d8(%rbp)
movq -0x170(%rbp), %rdi
leaq -0x160(%rbp), %rax
cmpq %rax, %rdi
je 0x144d5
callq 0x4280
movq -0x190(%rbp), %rdi
leaq -0x180(%rbp), %rax
cmpq %rax, %rdi
leaq -0x1c0(%rbp), %rbx
je 0x144f4
callq 0x4280
movq -0x1b0(%rbp), %rdi
leaq -0x1a0(%rbp), %rax
cmpq %rax, %rdi
je 0x1450c
callq 0x4280
movq -0x1d0(%rbp), %rdi
cmpq %rbx, %rdi
je 0x1451d
callq 0x4280
movq -0x148(%rbp), %rdi
leaq -0x138(%rbp), %rax
cmpq %rax, %rdi
je 0x14535
callq 0x4280
movq -0xc8(%rbp), %rdi
leaq -0xb8(%rbp), %rax
cmpq %rax, %rdi
je 0x1454d
callq 0x4280
movq -0xe8(%rbp), %rdi
leaq -0xd8(%rbp), %rax
cmpq %rax, %rdi
je 0x14565
callq 0x4280
movq -0x108(%rbp), %rdi
leaq -0xf8(%rbp), %rax
cmpq %rax, %rdi
je 0x1457d
callq 0x4280
movq -0x128(%rbp), %rdi
leaq -0x118(%rbp), %rax
cmpq %rax, %rdi
je 0x14595
callq 0x4280
movq %rbx, -0x1d0(%rbp)
movq %r15, %rdi
leaq 0x7451(%rip), %rsi      # 0x1b9f7
leaq 0x7451(%rip), %rdx      # 0x1b9fe
callq 0xf2f8
movq -0x68(%rbp), %rdi
movq %r15, %rsi
callq 0x1158a
incl (%rax)
movq -0x1d0(%rbp), %rdi
cmpq %rbx, %rdi
je 0x145d1
callq 0x4280
movq -0x60(%rbp), %rdi
movq %r14, %rsi
movq -0x30(%rbp), %rbx
callq 0x17818
jmp 0x142ff
leaq -0x460(%rbp), %rdi
callq 0x40a0
testq %r12, %r12
leaq -0x40(%rbp), %r14
leaq -0x1e8(%rbp), %r15
je 0x14628
shlq $0x5, %r12
addq %r12, %rbx
addq $-0x10, %rbx
negq %r12
movq -0x10(%rbx), %rdi
cmpq %rdi, %rbx
je 0x1461e
callq 0x4280
addq $-0x20, %rbx
addq $0x20, %r12
jne 0x14610
movq -0x58(%rbp), %rsp
movq -0x50(%rbp), %rdi
cmpq %r14, %rdi
je 0x1463a
callq 0x4280
movq -0x1f8(%rbp), %rdi
cmpq %r15, %rdi
je 0x1464b
callq 0x4280
leaq -0x208(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x14660
callq 0x4280
leaq -0x228(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x14675
callq 0x4280
leaq -0x248(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1468a
callq 0x4280
leaq -0x460(%rbp), %rdi
callq 0x40e0
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x4170
movq %rax, %rbx
leaq 0x70ec(%rip), %rsi      # 0x1b7a5
movq %rax, %rdi
callq 0x4140
movq 0xe920(%rip), %rsi      # 0x22fe8
movq 0xe8a1(%rip), %rdx      # 0x22f70
movq %rbx, %rdi
callq 0x4440
movq %rax, %r15
jmp 0x14823
movq %rax, %r15
movq %rbx, %rdi
callq 0x4220
jmp 0x14823
jmp 0x146f1
movq %rax, %r15
jmp 0x1482f
jmp 0x147e3
movq %rax, %r15
leaq -0x40(%rbp), %r14
jmp 0x147aa
movq %rax, %r15
jmp 0x14772
movq %rax, %r15
jmp 0x1475a
movq %rax, %r15
jmp 0x1472d
movq %rax, %r15
movq -0x1d0(%rbp), %rdi
cmpq %rbx, %rdi
je 0x1472d
callq 0x4280
leaq -0x40(%rbp), %r14
movq -0x30(%rbp), %rbx
jmp 0x147ea
movq %rax, %r15
jmp 0x1478a
movq %rax, %r15
movq -0x148(%rbp), %rdi
leaq -0x138(%rbp), %rax
cmpq %rax, %rdi
je 0x1475a
callq 0x4280
movq -0xc8(%rbp), %rdi
leaq -0xb8(%rbp), %rax
cmpq %rax, %rdi
je 0x14772
callq 0x4280
movq -0xe8(%rbp), %rdi
leaq -0xd8(%rbp), %rax
cmpq %rax, %rdi
je 0x1478a
callq 0x4280
movq -0x108(%rbp), %rdi
leaq -0xf8(%rbp), %rax
cmpq %rax, %rdi
je 0x147a2
callq 0x4280
leaq -0x40(%rbp), %r14
movq -0x30(%rbp), %rbx
movq -0x128(%rbp), %rdi
leaq -0x118(%rbp), %rax
cmpq %rax, %rdi
je 0x147ea
callq 0x4280
jmp 0x147ea
jmp 0x147e3
movq %rax, %r15
movq -0xa8(%rbp), %rdi
leaq -0x98(%rbp), %rax
cmpq %rax, %rdi
je 0x147e6
callq 0x4280
jmp 0x147e6
movq %rax, %r15
leaq -0x40(%rbp), %r14
testq %r12, %r12
je 0x14815
shlq $0x5, %r12
addq %r12, %rbx
addq $-0x10, %rbx
negq %r12
movq -0x10(%rbx), %rdi
cmpq %rdi, %rbx
je 0x1480b
callq 0x4280
addq $-0x20, %rbx
addq $0x20, %r12
jne 0x147fd
movq -0x50(%rbp), %rdi
cmpq %r14, %rdi
je 0x14823
callq 0x4280
leaq -0x258(%rbp), %rdi
callq 0x177be
leaq -0x460(%rbp), %rdi
callq 0x40e0
movq %r15, %rdi
callq 0x4490
nop