// File: Karunika[P]Taxi_Agency_OODB/./src/TaxiAgency.cpp
// Function: TaxiAgency::import_shift_history(char const*)
void TaxiAgency::import_shift_history(const char* SHIFT_HISTORY_FILE){
    ifstream File;
    File.open(SHIFT_HISTORY_FILE);
    Shift shift;
    if(File.is_open()){
        string t, fields[Shift::HistoryShiftAttributesCount];
        getline(File, t); // skip heading row
        while(getline(File, t)){
            populate_fields(t, fields, Shift::HistoryShiftAttributesCount);
            shift = Shift(fields[0].substr(0, fields[0].length()-2),
                        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]),
                        stoi(fields[6]),
                        stoi(fields[7]));

            shift_history.push_back(shift);
        }
        File.close();
    }else{
        throw runtime_error("File couldn't be resolved");
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x4d0, %rsp            # imm = 0x4D0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x428(%rbp)
leaq -0x218(%rbp), %rdi
movq %rdi, -0x420(%rbp)
callq 0x4340
movq -0x420(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x8, %edx
callq 0x4200
jmp 0x271e8
leaq -0x2c8(%rbp), %rdi
callq 0x2a6b0
jmp 0x271f6
leaq -0x218(%rbp), %rdi
callq 0x4450
movb %al, -0x429(%rbp)
jmp 0x2720a
movb -0x429(%rbp), %al
testb $0x1, %al
jne 0x27219
jmp 0x2770b
leaq -0x2e8(%rbp), %rdi
callq 0x43e0
movl 0x1f0dd(%rip), %eax     # 0x46308
movq %rax, -0x440(%rbp)
movq %rsp, %rcx
movq %rcx, -0x2f0(%rbp)
movq %rax, %rdx
shlq $0x5, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x438(%rbp)
movq %rcx, %rsp
movq %rax, -0x2f8(%rbp)
cmpq $0x0, %rax
je 0x272b7
movq -0x438(%rbp), %rax
movq -0x440(%rbp), %rdx
shlq $0x5, %rdx
movq %rax, %rcx
addq %rdx, %rcx
movq %rcx, -0x450(%rbp)
movq %rax, -0x448(%rbp)
movq -0x448(%rbp), %rdi
movq %rdi, -0x458(%rbp)
callq 0x43e0
movq -0x458(%rbp), %rax
movq -0x450(%rbp), %rcx
addq $0x20, %rax
cmpq %rcx, %rax
movq %rax, -0x448(%rbp)
jne 0x27286
leaq -0x218(%rbp), %rdi
leaq -0x2e8(%rbp), %rsi
callq 0x4090
jmp 0x272cc
jmp 0x272ce
leaq -0x218(%rbp), %rdi
leaq -0x2e8(%rbp), %rsi
callq 0x4090
movq %rax, -0x460(%rbp)
jmp 0x272ea
movq -0x460(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x4380
movb %al, -0x461(%rbp)
jmp 0x27308
movb -0x461(%rbp), %al
testb $0x1, %al
jne 0x27317
jmp 0x2762a
leaq -0x318(%rbp), %rdi
leaq -0x2e8(%rbp), %rsi
callq 0x4170
jmp 0x2732c
movq -0x438(%rbp), %rsi
movl 0x1efcf(%rip), %edx     # 0x46308
leaq -0x318(%rbp), %rdi
callq 0x23670
jmp 0x27347
leaq -0x318(%rbp), %rdi
callq 0x41f0
movq -0x438(%rbp), %rdi
callq 0x4430
movq -0x438(%rbp), %rsi
movq %rax, %rcx
addq $-0x2, %rcx
xorl %eax, %eax
movl %eax, %edx
leaq -0x3d8(%rbp), %rdi
callq 0x4300
jmp 0x2737f
movq -0x438(%rbp), %rdi
addq $0x20, %rdi
movq %rdi, -0x470(%rbp)
callq 0x4430
movq -0x470(%rbp), %rsi
movq %rax, %rcx
addq $-0x2, %rcx
leaq -0x3f8(%rbp), %rdi
movl $0x1, %edx
callq 0x4300
jmp 0x273b7
movq -0x438(%rbp), %rdi
addq $0x40, %rdi
movq %rdi, -0x478(%rbp)
callq 0x4430
movq -0x478(%rbp), %rsi
movq %rax, %rcx
addq $-0x2, %rcx
leaq -0x418(%rbp), %rdi
movl $0x1, %edx
callq 0x4300
jmp 0x273ef
movq -0x438(%rbp), %rdi
addq $0x60, %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xa, %edx
callq 0x29600
movl %eax, -0x47c(%rbp)
jmp 0x27410
movq -0x438(%rbp), %rdi
subq $-0x80, %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xa, %edx
callq 0x29600
movl %eax, -0x480(%rbp)
jmp 0x27431
movq -0x438(%rbp), %rdi
addq $0xa0, %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xa, %edx
callq 0x29600
movl %eax, -0x484(%rbp)
jmp 0x27455
movq -0x438(%rbp), %rdi
addq $0xc0, %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xa, %edx
callq 0x29600
movl %eax, -0x488(%rbp)
jmp 0x27479
movq -0x438(%rbp), %rdi
addq $0xe0, %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xa, %edx
callq 0x29600
movl %eax, -0x48c(%rbp)
jmp 0x2749d
movl -0x480(%rbp), %r9d
movl -0x47c(%rbp), %r8d
movl -0x484(%rbp), %ecx
movl -0x488(%rbp), %edx
movl -0x48c(%rbp), %esi
subq $0x20, %rsp
movq %rsp, %rax
movl %esi, 0x10(%rax)
movl %edx, 0x8(%rax)
movl %ecx, (%rax)
leaq -0x3b8(%rbp), %rdi
leaq -0x3d8(%rbp), %rsi
leaq -0x3f8(%rbp), %rdx
leaq -0x418(%rbp), %rcx
callq 0x1f430
addq $0x20, %rsp
jmp 0x274f3
leaq -0x2c8(%rbp), %rdi
movq %rdi, -0x498(%rbp)
leaq -0x3b8(%rbp), %rsi
movq %rsi, -0x4a0(%rbp)
callq 0x2a950
movq -0x4a0(%rbp), %rdi
callq 0x2a9d0
leaq -0x418(%rbp), %rdi
callq 0x41f0
leaq -0x3f8(%rbp), %rdi
callq 0x41f0
leaq -0x3d8(%rbp), %rdi
callq 0x41f0
movq -0x428(%rbp), %rdi
movq -0x498(%rbp), %rsi
addq $0x60, %rdi
callq 0x2aa20
jmp 0x2755d
jmp 0x272ce
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
jmp 0x27795
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
jmp 0x27789
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
jmp 0x276a8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
leaq -0x318(%rbp), %rdi
callq 0x41f0
jmp 0x276a8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
jmp 0x2761c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
jmp 0x27610
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
leaq -0x418(%rbp), %rdi
callq 0x41f0
leaq -0x3f8(%rbp), %rdi
callq 0x41f0
leaq -0x3d8(%rbp), %rdi
callq 0x41f0
jmp 0x276a8
leaq -0x218(%rbp), %rdi
callq 0x40b0
jmp 0x27638
movq -0x438(%rbp), %rcx
movq -0x440(%rbp), %rdx
shlq $0x5, %rdx
movq %rcx, %rax
addq %rdx, %rax
cmpq %rax, %rcx
movq %rax, -0x4a8(%rbp)
je 0x2768d
movq -0x4a8(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x4b0(%rbp)
callq 0x41f0
movq -0x438(%rbp), %rcx
movq -0x4b0(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x4a8(%rbp)
jne 0x2765c
movq -0x2f0(%rbp), %rax
movq %rax, %rsp
leaq -0x2e8(%rbp), %rdi
callq 0x41f0
jmp 0x2776c
movq -0x438(%rbp), %rcx
movq -0x440(%rbp), %rdx
shlq $0x5, %rdx
movq %rcx, %rax
addq %rdx, %rax
cmpq %rax, %rcx
movq %rax, -0x4b8(%rbp)
je 0x276fd
movq -0x4b8(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x4c0(%rbp)
callq 0x41f0
movq -0x438(%rbp), %rcx
movq -0x4c0(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x4b8(%rbp)
jne 0x276cc
leaq -0x2e8(%rbp), %rdi
callq 0x41f0
jmp 0x27789
movl $0x10, %edi
callq 0x41a0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x4c8(%rbp)
leaq 0xa425(%rip), %rsi      # 0x31b4e
callq 0x4140
jmp 0x27730
movq -0x4c8(%rbp), %rdi
movq 0x1e8b2(%rip), %rsi     # 0x45ff0
movq 0x1e82b(%rip), %rdx     # 0x45f70
callq 0x44b0
jmp 0x277ad
movq -0x4c8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
callq 0x4240
jmp 0x27789
leaq -0x2c8(%rbp), %rdi
callq 0x2a9d0
leaq -0x218(%rbp), %rdi
callq 0x40f0
movq %rbp, %rsp
popq %rbp
retq
leaq -0x2c8(%rbp), %rdi
callq 0x2a9d0
leaq -0x218(%rbp), %rdi
callq 0x40f0
movq -0x220(%rbp), %rdi
callq 0x44f0
nopl (%rax)