// File: Karunika[P]Taxi_Agency_OODB/./src/TaxiAgency.cpp
// Function: TaxiAgency::populate_taxies(char const*)
void TaxiAgency::populate_taxies(const char* TAXIES_FILE){
    ifstream File;
    File.open(TAXIES_FILE);
    Taxi taxi;
    if(File.is_open()){
        string t, fields[Taxi::TaxiAttributesCount];
        getline(File, t); // skip heading row
        while(getline(File, t)){
            populate_fields(t, fields, Taxi::TaxiAttributesCount);
            taxi = Taxi(fields[0] == "\"True\"" ? true : false,
                        fields[1].substr(1, fields[1].length()-2),
                        fields[2].substr(1, fields[2].length()-2),
                        stoi(fields[3]),
                        stoi(fields[4]),
                        stoi(fields[5]));

            stats["total_taxies"] += taxi.number;
            stats["total_idol_taxies"] += taxi.available_number;
            taxies.push_back(taxi);
        }
        File.close();
    }else{
        throw runtime_error("File couldn't be resolved");
    }

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x4a0, %rsp            # imm = 0x4A0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x3c8(%rbp)
leaq -0x218(%rbp), %rdi
movq %rdi, -0x3c0(%rbp)
callq 0x4340
movq -0x3c0(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x8, %edx
callq 0x4200
jmp 0x22f78
leaq -0x280(%rbp), %rdi
callq 0x295a0
jmp 0x22f86
leaq -0x218(%rbp), %rdi
callq 0x4450
movb %al, -0x3c9(%rbp)
jmp 0x22f9a
movb -0x3c9(%rbp), %al
testb $0x1, %al
jne 0x22fa9
jmp 0x235c0
leaq -0x2a0(%rbp), %rdi
callq 0x43e0
movl 0x2333d(%rip), %eax     # 0x462f8
movq %rax, -0x3e0(%rbp)
movq %rsp, %rcx
movq %rcx, -0x2a8(%rbp)
movq %rax, %rdx
shlq $0x5, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x3d8(%rbp)
movq %rcx, %rsp
movq %rax, -0x2b0(%rbp)
cmpq $0x0, %rax
je 0x23047
movq -0x3d8(%rbp), %rax
movq -0x3e0(%rbp), %rdx
shlq $0x5, %rdx
movq %rax, %rcx
addq %rdx, %rcx
movq %rcx, -0x3f0(%rbp)
movq %rax, -0x3e8(%rbp)
movq -0x3e8(%rbp), %rdi
movq %rdi, -0x3f8(%rbp)
callq 0x43e0
movq -0x3f8(%rbp), %rax
movq -0x3f0(%rbp), %rcx
addq $0x20, %rax
cmpq %rcx, %rax
movq %rax, -0x3e8(%rbp)
jne 0x23016
leaq -0x218(%rbp), %rdi
leaq -0x2a0(%rbp), %rsi
callq 0x4090
jmp 0x2305c
jmp 0x2305e
leaq -0x218(%rbp), %rdi
leaq -0x2a0(%rbp), %rsi
callq 0x4090
movq %rax, -0x400(%rbp)
jmp 0x2307a
movq -0x400(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x4380
movb %al, -0x401(%rbp)
jmp 0x23098
movb -0x401(%rbp), %al
testb $0x1, %al
jne 0x230a7
jmp 0x234df
leaq -0x2d0(%rbp), %rdi
leaq -0x2a0(%rbp), %rsi
callq 0x4170
jmp 0x230bc
movq -0x3d8(%rbp), %rsi
movl 0x2322f(%rip), %edx     # 0x462f8
leaq -0x2d0(%rbp), %rdi
callq 0x23670
jmp 0x230d7
leaq -0x2d0(%rbp), %rdi
callq 0x41f0
movq -0x3d8(%rbp), %rdi
leaq 0xea56(%rip), %rsi      # 0x31b47
callq 0x295d0
movb %al, -0x402(%rbp)
jmp 0x230fe
movq -0x3d8(%rbp), %rdi
movb -0x402(%rbp), %al
andb $0x1, %al
negb %al
movb %al, -0x411(%rbp)
addq $0x20, %rdi
movq %rdi, -0x410(%rbp)
callq 0x4430
movq -0x410(%rbp), %rsi
movq %rax, %rcx
addq $-0x2, %rcx
leaq -0x348(%rbp), %rdi
movl $0x1, %edx
callq 0x4300
jmp 0x23146
movq -0x3d8(%rbp), %rdi
addq $0x40, %rdi
movq %rdi, -0x420(%rbp)
callq 0x4430
movq -0x420(%rbp), %rsi
movq %rax, %rcx
addq $-0x2, %rcx
leaq -0x368(%rbp), %rdi
movl $0x1, %edx
callq 0x4300
jmp 0x2317e
movq -0x3d8(%rbp), %rdi
addq $0x60, %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xa, %edx
callq 0x29600
movl %eax, -0x424(%rbp)
jmp 0x2319f
movq -0x3d8(%rbp), %rdi
subq $-0x80, %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xa, %edx
callq 0x29600
movl %eax, -0x428(%rbp)
jmp 0x231c0
movq -0x3d8(%rbp), %rdi
addq $0xa0, %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xa, %edx
callq 0x29600
movl %eax, -0x42c(%rbp)
jmp 0x231e4
movl -0x428(%rbp), %r9d
movl -0x424(%rbp), %r8d
movb -0x411(%rbp), %al
movl -0x42c(%rbp), %edx
subq $0x10, %rsp
movq %rsp, %rcx
movl %edx, (%rcx)
movzbl %al, %esi
andl $0x1, %esi
leaq -0x328(%rbp), %rdi
leaq -0x348(%rbp), %rdx
leaq -0x368(%rbp), %rcx
callq 0x29640
addq $0x10, %rsp
jmp 0x2322d
leaq -0x280(%rbp), %rdi
leaq -0x328(%rbp), %rsi
movq %rsi, -0x450(%rbp)
callq 0x29760
movq -0x450(%rbp), %rdi
callq 0x297d0
leaq -0x368(%rbp), %rdi
callq 0x41f0
leaq -0x348(%rbp), %rdi
callq 0x41f0
movq -0x3c8(%rbp), %rax
movl -0x234(%rbp), %ecx
movl %ecx, -0x444(%rbp)
addq $0xa0, %rax
movq %rax, -0x440(%rbp)
leaq -0x389(%rbp), %rdi
movq %rdi, -0x438(%rbp)
callq 0x4500
movq -0x438(%rbp), %rdx
leaq 0xe72f(%rip), %rsi      # 0x319db
leaq -0x388(%rbp), %rdi
callq 0x43d0
jmp 0x232ba
movq -0x440(%rbp), %rdi
leaq -0x388(%rbp), %rsi
callq 0x203b0
movq %rax, -0x458(%rbp)
jmp 0x232d6
movq -0x458(%rbp), %rax
movl -0x444(%rbp), %edx
movl (%rax), %ecx
addl %edx, %ecx
movl %ecx, (%rax)
leaq -0x388(%rbp), %rdi
callq 0x41f0
leaq -0x389(%rbp), %rdi
callq 0x4330
movq -0x3c8(%rbp), %rax
movl -0x230(%rbp), %ecx
movl %ecx, -0x46c(%rbp)
addq $0xa0, %rax
movq %rax, -0x468(%rbp)
leaq -0x3b1(%rbp), %rdi
movq %rdi, -0x460(%rbp)
callq 0x4500
movq -0x460(%rbp), %rdx
leaq 0xe677(%rip), %rsi      # 0x319b9
leaq -0x3b0(%rbp), %rdi
callq 0x43d0
jmp 0x23350
movq -0x468(%rbp), %rdi
leaq -0x3b0(%rbp), %rsi
callq 0x203b0
movq %rax, -0x478(%rbp)
jmp 0x2336c
movq -0x478(%rbp), %rax
movl -0x46c(%rbp), %edx
movl (%rax), %ecx
addl %edx, %ecx
movl %ecx, (%rax)
leaq -0x3b0(%rbp), %rdi
callq 0x41f0
leaq -0x3b1(%rbp), %rdi
callq 0x4330
movq -0x3c8(%rbp), %rdi
leaq -0x280(%rbp), %rsi
callq 0x29800
jmp 0x233ac
jmp 0x2305e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
jmp 0x2364a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
jmp 0x2363e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
jmp 0x2355d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
leaq -0x2d0(%rbp), %rdi
callq 0x41f0
jmp 0x2355d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
jmp 0x2344b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
leaq -0x368(%rbp), %rdi
callq 0x41f0
leaq -0x348(%rbp), %rdi
callq 0x41f0
jmp 0x2355d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
jmp 0x2348e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
leaq -0x388(%rbp), %rdi
callq 0x41f0
leaq -0x389(%rbp), %rdi
callq 0x4330
jmp 0x2355d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
jmp 0x234d1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
leaq -0x3b0(%rbp), %rdi
callq 0x41f0
leaq -0x3b1(%rbp), %rdi
callq 0x4330
jmp 0x2355d
leaq -0x218(%rbp), %rdi
callq 0x40b0
jmp 0x234ed
movq -0x3d8(%rbp), %rcx
movq -0x3e0(%rbp), %rdx
shlq $0x5, %rdx
movq %rcx, %rax
addq %rdx, %rax
cmpq %rax, %rcx
movq %rax, -0x480(%rbp)
je 0x23542
movq -0x480(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x488(%rbp)
callq 0x41f0
movq -0x3d8(%rbp), %rcx
movq -0x488(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x480(%rbp)
jne 0x23511
movq -0x2a8(%rbp), %rax
movq %rax, %rsp
leaq -0x2a0(%rbp), %rdi
callq 0x41f0
jmp 0x23621
movq -0x3d8(%rbp), %rcx
movq -0x3e0(%rbp), %rdx
shlq $0x5, %rdx
movq %rcx, %rax
addq %rdx, %rax
cmpq %rax, %rcx
movq %rax, -0x490(%rbp)
je 0x235b2
movq -0x490(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x498(%rbp)
callq 0x41f0
movq -0x3d8(%rbp), %rcx
movq -0x498(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x490(%rbp)
jne 0x23581
leaq -0x2a0(%rbp), %rdi
callq 0x41f0
jmp 0x2363e
movl $0x10, %edi
callq 0x41a0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x4a0(%rbp)
leaq 0xe570(%rip), %rsi      # 0x31b4e
callq 0x4140
jmp 0x235e5
movq -0x4a0(%rbp), %rdi
movq 0x229fd(%rip), %rsi     # 0x45ff0
movq 0x22976(%rip), %rdx     # 0x45f70
callq 0x44b0
jmp 0x23662
movq -0x4a0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
callq 0x4240
jmp 0x2363e
leaq -0x280(%rbp), %rdi
callq 0x297d0
leaq -0x218(%rbp), %rdi
callq 0x40f0
movq %rbp, %rsp
popq %rbp
retq
leaq -0x280(%rbp), %rdi
callq 0x297d0
leaq -0x218(%rbp), %rdi
callq 0x40f0
movq -0x220(%rbp), %rdi
callq 0x44f0
nopw %cs:(%rax,%rax)