// File: /workspace/github_cpp_makefile_star2_O1/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 0xf8ec
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 0x147ff
movq %rsp, -0x58(%rbp)
leaq -0x40(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movl 0xef0f(%rip), %r12d     # 0x232c0
movq %rsp, %rbx
movq %r12, %rax
shlq $0x5, %rax
subq %rax, %rbx
movq %rbx, %rsp
testq %r12, %r12
je 0x143e3
leaq 0x10(%rbx), %rcx
movq %rcx, -0x10(%rcx)
movq $0x0, -0x8(%rcx)
movb $0x0, (%rcx)
addq $0x20, %rcx
addq $-0x20, %rax
jne 0x143ca
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 0x14740
leaq -0x98(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
addq %rsi, %rdx
leaq -0xa8(%rbp), %rdi
callq 0xf530
movl 0xedf8(%rip), %edx      # 0x232c0
leaq -0xa8(%rbp), %rdi
movq %rbx, %rsi
callq 0x125d6
movq -0xa8(%rbp), %rdi
leaq -0x98(%rbp), %rax
cmpq %rax, %rdi
je 0x144ef
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 0x7673(%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 0xfeb0
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 0x1462f
callq 0x4280
movq -0x190(%rbp), %rdi
leaq -0x180(%rbp), %rax
cmpq %rax, %rdi
leaq -0x1c0(%rbp), %rbx
je 0x1464e
callq 0x4280
movq -0x1b0(%rbp), %rdi
leaq -0x1a0(%rbp), %rax
cmpq %rax, %rdi
je 0x14666
callq 0x4280
movq -0x1d0(%rbp), %rdi
cmpq %rbx, %rdi
je 0x14677
callq 0x4280
movq -0x148(%rbp), %rdi
leaq -0x138(%rbp), %rax
cmpq %rax, %rdi
je 0x1468f
callq 0x4280
movq -0xc8(%rbp), %rdi
leaq -0xb8(%rbp), %rax
cmpq %rax, %rdi
je 0x146a7
callq 0x4280
movq -0xe8(%rbp), %rdi
leaq -0xd8(%rbp), %rax
cmpq %rax, %rdi
je 0x146bf
callq 0x4280
movq -0x108(%rbp), %rdi
leaq -0xf8(%rbp), %rax
cmpq %rax, %rdi
je 0x146d7
callq 0x4280
movq -0x128(%rbp), %rdi
leaq -0x118(%rbp), %rax
cmpq %rax, %rdi
je 0x146ef
callq 0x4280
movq %rbx, -0x1d0(%rbp)
movq %r15, %rdi
leaq 0x72f7(%rip), %rsi      # 0x1b9f7
leaq 0x72f7(%rip), %rdx      # 0x1b9fe
callq 0xf39a
movq -0x68(%rbp), %rdi
movq %r15, %rsi
callq 0x11638
incl (%rax)
movq -0x1d0(%rbp), %rdi
cmpq %rbx, %rdi
je 0x1472b
callq 0x4280
movq -0x60(%rbp), %rdi
movq %r14, %rsi
movq -0x30(%rbp), %rbx
callq 0x179f2
jmp 0x14459
leaq -0x460(%rbp), %rdi
callq 0x40a0
testq %r12, %r12
leaq -0x40(%rbp), %r14
leaq -0x1e8(%rbp), %r15
je 0x14782
shlq $0x5, %r12
addq %r12, %rbx
addq $-0x10, %rbx
negq %r12
movq -0x10(%rbx), %rdi
cmpq %rdi, %rbx
je 0x14778
callq 0x4280
addq $-0x20, %rbx
addq $0x20, %r12
jne 0x1476a
movq -0x58(%rbp), %rsp
movq -0x50(%rbp), %rdi
cmpq %r14, %rdi
je 0x14794
callq 0x4280
movq -0x1f8(%rbp), %rdi
cmpq %r15, %rdi
je 0x147a5
callq 0x4280
leaq -0x208(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x147ba
callq 0x4280
leaq -0x228(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x147cf
callq 0x4280
leaq -0x248(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x147e4
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 0x6f92(%rip), %rsi      # 0x1b7a5
movq %rax, %rdi
callq 0x4140
movq 0xe7c6(%rip), %rsi      # 0x22fe8
movq 0xe747(%rip), %rdx      # 0x22f70
movq %rbx, %rdi
callq 0x4440
movq %rax, %r15
jmp 0x1497d
movq %rax, %r15
movq %rbx, %rdi
callq 0x4220
jmp 0x1497d
jmp 0x1484b
movq %rax, %r15
jmp 0x14989
jmp 0x1493d
movq %rax, %r15
leaq -0x40(%rbp), %r14
jmp 0x14904
movq %rax, %r15
jmp 0x148cc
movq %rax, %r15
jmp 0x148b4
movq %rax, %r15
jmp 0x14887
movq %rax, %r15
movq -0x1d0(%rbp), %rdi
cmpq %rbx, %rdi
je 0x14887
callq 0x4280
leaq -0x40(%rbp), %r14
movq -0x30(%rbp), %rbx
jmp 0x14944
movq %rax, %r15
jmp 0x148e4
movq %rax, %r15
movq -0x148(%rbp), %rdi
leaq -0x138(%rbp), %rax
cmpq %rax, %rdi
je 0x148b4
callq 0x4280
movq -0xc8(%rbp), %rdi
leaq -0xb8(%rbp), %rax
cmpq %rax, %rdi
je 0x148cc
callq 0x4280
movq -0xe8(%rbp), %rdi
leaq -0xd8(%rbp), %rax
cmpq %rax, %rdi
je 0x148e4
callq 0x4280
movq -0x108(%rbp), %rdi
leaq -0xf8(%rbp), %rax
cmpq %rax, %rdi
je 0x148fc
callq 0x4280
leaq -0x40(%rbp), %r14
movq -0x30(%rbp), %rbx
movq -0x128(%rbp), %rdi
leaq -0x118(%rbp), %rax
cmpq %rax, %rdi
je 0x14944
callq 0x4280
jmp 0x14944
jmp 0x1493d
movq %rax, %r15
movq -0xa8(%rbp), %rdi
leaq -0x98(%rbp), %rax
cmpq %rax, %rdi
je 0x14940
callq 0x4280
jmp 0x14940
movq %rax, %r15
leaq -0x40(%rbp), %r14
testq %r12, %r12
je 0x1496f
shlq $0x5, %r12
addq %r12, %rbx
addq $-0x10, %rbx
negq %r12
movq -0x10(%rbx), %rdi
cmpq %rdi, %rbx
je 0x14965
callq 0x4280
addq $-0x20, %rbx
addq $0x20, %r12
jne 0x14957
movq -0x50(%rbp), %rdi
cmpq %r14, %rdi
je 0x1497d
callq 0x4280
leaq -0x258(%rbp), %rdi
callq 0x17998
leaq -0x460(%rbp), %rdi
callq 0x40e0
movq %r15, %rdi
callq 0x4490
nop