// File: Karunika[P]Taxi_Agency_OODB/./src/TaxiAgency.cpp
// Function: TaxiAgency::populate_customer_db(char const*)
void TaxiAgency::populate_customer_db(const char* CUSTOMERS_FILE){
    ifstream File;
    File.open(CUSTOMERS_FILE);
    Customer customer;
    if(File.is_open()){
        string t, fields[Customer::CustomerDetailsCount];
        getline(File, t); // skip heading row
        while(getline(File, t)){
            populate_fields(t, fields, Customer::CustomerDetailsCount);
            customer = Customer(fields[0].substr(1, fields[0].length()-2),
                        fields[1].substr(1, fields[1].length()-2),
                        fields[2].substr(1, fields[2].length()-2),
                        stoi(fields[3]),
                        fields[4].substr(1, fields[4].length()-2) == "IDLE" ? IDLE : ONSHIFT);
            customer_db.push_back(customer);
        }
        File.close();
    }else{
        throw runtime_error("File couldn't be resolved");
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x480, %rsp            # imm = 0x480
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x3d8(%rbp)
leaq -0x218(%rbp), %rdi
movq %rdi, -0x3d0(%rbp)
callq 0x4340
movq -0x3d0(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x8, %edx
callq 0x4200
jmp 0x24328
leaq -0x290(%rbp), %rdi
callq 0x29b80
jmp 0x24336
leaq -0x218(%rbp), %rdi
callq 0x4450
movb %al, -0x3d9(%rbp)
jmp 0x2434a
movb -0x3d9(%rbp), %al
testb $0x1, %al
jne 0x24359
jmp 0x24820
leaq -0x2b0(%rbp), %rdi
callq 0x43e0
movl 0x21f91(%rip), %eax     # 0x462fc
movq %rax, -0x3f0(%rbp)
movq %rsp, %rcx
movq %rcx, -0x2b8(%rbp)
movq %rax, %rdx
shlq $0x5, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x3e8(%rbp)
movq %rcx, %rsp
movq %rax, -0x2c0(%rbp)
cmpq $0x0, %rax
je 0x243f7
movq -0x3e8(%rbp), %rax
movq -0x3f0(%rbp), %rdx
shlq $0x5, %rdx
movq %rax, %rcx
addq %rdx, %rcx
movq %rcx, -0x400(%rbp)
movq %rax, -0x3f8(%rbp)
movq -0x3f8(%rbp), %rdi
movq %rdi, -0x408(%rbp)
callq 0x43e0
movq -0x408(%rbp), %rax
movq -0x400(%rbp), %rcx
addq $0x20, %rax
cmpq %rcx, %rax
movq %rax, -0x3f8(%rbp)
jne 0x243c6
leaq -0x218(%rbp), %rdi
leaq -0x2b0(%rbp), %rsi
callq 0x4090
jmp 0x2440c
jmp 0x2440e
leaq -0x218(%rbp), %rdi
leaq -0x2b0(%rbp), %rsi
callq 0x4090
movq %rax, -0x410(%rbp)
jmp 0x2442a
movq -0x410(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x4380
movb %al, -0x411(%rbp)
jmp 0x24448
movb -0x411(%rbp), %al
testb $0x1, %al
jne 0x24457
jmp 0x2473f
leaq -0x2e0(%rbp), %rdi
leaq -0x2b0(%rbp), %rsi
callq 0x4170
jmp 0x2446c
movq -0x3e8(%rbp), %rsi
movl 0x21e83(%rip), %edx     # 0x462fc
leaq -0x2e0(%rbp), %rdi
callq 0x23670
jmp 0x24487
leaq -0x2e0(%rbp), %rdi
callq 0x41f0
movq -0x3e8(%rbp), %rdi
callq 0x4430
movq -0x3e8(%rbp), %rsi
movq %rax, %rcx
addq $-0x2, %rcx
leaq -0x368(%rbp), %rdi
movl $0x1, %edx
callq 0x4300
jmp 0x244c0
movq -0x3e8(%rbp), %rdi
addq $0x20, %rdi
movq %rdi, -0x420(%rbp)
callq 0x4430
movq -0x420(%rbp), %rsi
movq %rax, %rcx
addq $-0x2, %rcx
leaq -0x388(%rbp), %rdi
movl $0x1, %edx
callq 0x4300
jmp 0x244f8
movq -0x3e8(%rbp), %rdi
addq $0x40, %rdi
movq %rdi, -0x428(%rbp)
callq 0x4430
movq -0x428(%rbp), %rsi
movq %rax, %rcx
addq $-0x2, %rcx
leaq -0x3a8(%rbp), %rdi
movl $0x1, %edx
callq 0x4300
jmp 0x24530
movq -0x3e8(%rbp), %rdi
addq $0x60, %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xa, %edx
callq 0x29600
movl %eax, -0x42c(%rbp)
jmp 0x24551
movq -0x3e8(%rbp), %rdi
subq $-0x80, %rdi
movq %rdi, -0x438(%rbp)
callq 0x4430
movq -0x438(%rbp), %rsi
movq %rax, %rcx
addq $-0x2, %rcx
leaq -0x3c8(%rbp), %rdi
movl $0x1, %edx
callq 0x4300
jmp 0x24589
leaq 0xda1e(%rip), %rsi      # 0x31fae
leaq -0x3c8(%rbp), %rdi
callq 0x295d0
movb %al, -0x439(%rbp)
jmp 0x245a4
movl -0x42c(%rbp), %r8d
movb -0x439(%rbp), %al
movzbl %al, %r9d
andl $0x1, %r9d
leaq -0x348(%rbp), %rdi
leaq -0x368(%rbp), %rsi
leaq -0x388(%rbp), %rdx
leaq -0x3a8(%rbp), %rcx
callq 0x1ee20
jmp 0x245dc
leaq -0x290(%rbp), %rdi
movq %rdi, -0x448(%rbp)
leaq -0x348(%rbp), %rsi
movq %rsi, -0x450(%rbp)
callq 0x29ba0
movq -0x450(%rbp), %rdi
callq 0x29be0
leaq -0x3c8(%rbp), %rdi
callq 0x41f0
leaq -0x3a8(%rbp), %rdi
callq 0x41f0
leaq -0x388(%rbp), %rdi
callq 0x41f0
leaq -0x368(%rbp), %rdi
callq 0x41f0
movq -0x3d8(%rbp), %rdi
movq -0x448(%rbp), %rsi
addq $0x30, %rdi
callq 0x29c00
jmp 0x24652
jmp 0x2440e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
jmp 0x248aa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
jmp 0x2489e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
jmp 0x247bd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
leaq -0x2e0(%rbp), %rdi
callq 0x41f0
jmp 0x247bd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
jmp 0x24731
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
jmp 0x24725
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
jmp 0x24719
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
leaq -0x3c8(%rbp), %rdi
callq 0x41f0
leaq -0x3a8(%rbp), %rdi
callq 0x41f0
leaq -0x388(%rbp), %rdi
callq 0x41f0
leaq -0x368(%rbp), %rdi
callq 0x41f0
jmp 0x247bd
leaq -0x218(%rbp), %rdi
callq 0x40b0
jmp 0x2474d
movq -0x3e8(%rbp), %rcx
movq -0x3f0(%rbp), %rdx
shlq $0x5, %rdx
movq %rcx, %rax
addq %rdx, %rax
cmpq %rax, %rcx
movq %rax, -0x458(%rbp)
je 0x247a2
movq -0x458(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x460(%rbp)
callq 0x41f0
movq -0x3e8(%rbp), %rcx
movq -0x460(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x458(%rbp)
jne 0x24771
movq -0x2b8(%rbp), %rax
movq %rax, %rsp
leaq -0x2b0(%rbp), %rdi
callq 0x41f0
jmp 0x24881
movq -0x3e8(%rbp), %rcx
movq -0x3f0(%rbp), %rdx
shlq $0x5, %rdx
movq %rcx, %rax
addq %rdx, %rax
cmpq %rax, %rcx
movq %rax, -0x468(%rbp)
je 0x24812
movq -0x468(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x470(%rbp)
callq 0x41f0
movq -0x3e8(%rbp), %rcx
movq -0x470(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x468(%rbp)
jne 0x247e1
leaq -0x2b0(%rbp), %rdi
callq 0x41f0
jmp 0x2489e
movl $0x10, %edi
callq 0x41a0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x478(%rbp)
leaq 0xd310(%rip), %rsi      # 0x31b4e
callq 0x4140
jmp 0x24845
movq -0x478(%rbp), %rdi
movq 0x2179d(%rip), %rsi     # 0x45ff0
movq 0x21716(%rip), %rdx     # 0x45f70
callq 0x44b0
jmp 0x248c2
movq -0x478(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
callq 0x4240
jmp 0x2489e
leaq -0x290(%rbp), %rdi
callq 0x29be0
leaq -0x218(%rbp), %rdi
callq 0x40f0
movq %rbp, %rsp
popq %rbp
retq
leaq -0x290(%rbp), %rdi
callq 0x29be0
leaq -0x218(%rbp), %rdi
callq 0x40f0
movq -0x220(%rbp), %rdi
callq 0x44f0
nopw %cs:(%rax,%rax)