// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x448, %rsp            # imm = 0x448
movq %rsi, %rbx
movq %rdi, -0x40(%rbp)
leaq -0x3c8(%rbp), %r14
movq %r14, %rdi
callq 0x42e0
pushq $0x8
popq %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x41e0
leaq -0x1c0(%rbp), %rdi
callq 0x1206c
leaq -0x350(%rbp), %rdi
callq 0x40d0
testb %al, %al
je 0x10afe
leaq -0x90(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movq %rsp, -0x48(%rbp)
movb $0x0, (%rax)
movl 0xda2b(%rip), %ebx      # 0x1e2a0
movq %rsp, %rcx
movq %rbx, %rax
shlq $0x5, %rax
subq %rax, %rcx
movq %rcx, -0x30(%rbp)
movq %rcx, %rsp
testq %rbx, %rbx
je 0x108ac
movq -0x30(%rbp), %rcx
addq $0x10, %rcx
movq %rcx, -0x10(%rcx)
andq $0x0, -0x8(%rcx)
movb $0x0, (%rcx)
addq $0x20, %rcx
addq $-0x20, %rax
jne 0x10896
leaq -0x3c8(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x4080
movq -0x30(%rbp), %rax
leaq 0x20(%rax), %rcx
movq %rcx, -0x80(%rbp)
leaq 0x40(%rax), %rcx
movq %rcx, -0x78(%rbp)
leaq 0x60(%rax), %rcx
movq %rcx, -0x70(%rbp)
leaq 0x80(%rax), %rcx
movq %rcx, -0x68(%rbp)
leaq 0xa0(%rax), %rcx
movq %rcx, -0x60(%rbp)
leaq 0xc0(%rax), %rcx
movq %rcx, -0x58(%rbp)
addq $0xe0, %rax
movq %rax, -0x50(%rbp)
addq $0x60, -0x40(%rbp)
pushq $0xa
popq %r13
leaq -0x3c8(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x4080
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x10a9b
leaq -0x120(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x4360
movl 0xd953(%rip), %edx      # 0x1e2a0
leaq -0x120(%rbp), %r15
movq %r15, %rdi
movq -0x30(%rbp), %r14
movq %r14, %rsi
callq 0xe410
movq %r15, %rdi
callq 0x4170
movq 0x8(%r14), %rcx
addq $-0x2, %rcx
leaq -0x100(%rbp), %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x42c0
movq 0x28(%r14), %rcx
addq $-0x2, %rcx
leaq -0xe0(%rbp), %rdi
movq -0x80(%rbp), %rsi
pushq $0x1
popq %r15
movq %r15, %rdx
callq 0x42c0
movq 0x48(%r14), %rcx
addq $-0x2, %rcx
leaq -0xc0(%rbp), %rdi
movq -0x78(%rbp), %rsi
movq %r15, %rdx
callq 0x42c0
movq -0x70(%rbp), %rdi
xorl %esi, %esi
movl %r13d, %edx
callq 0x11b99
movl %eax, -0x34(%rbp)
movq -0x68(%rbp), %rdi
xorl %esi, %esi
movl %r13d, %edx
callq 0x11b99
movl %eax, %r14d
movq -0x60(%rbp), %rdi
xorl %esi, %esi
movl %r13d, %edx
callq 0x11b99
movl %eax, %r12d
movq -0x58(%rbp), %rdi
xorl %esi, %esi
movl %r13d, %edx
callq 0x11b99
movl %eax, %r15d
movq -0x50(%rbp), %rdi
xorl %esi, %esi
movl %r13d, %edx
callq 0x11b99
subq $0x8, %rsp
leaq -0x468(%rbp), %rdi
leaq -0x100(%rbp), %rsi
leaq -0xe0(%rbp), %rdx
leaq -0xc0(%rbp), %rcx
movl -0x34(%rbp), %r8d
movl %r14d, %r9d
pushq %rax
pushq %r15
pushq %r12
callq 0xcb5c
addq $0x20, %rsp
leaq -0x1c0(%rbp), %r15
movq %r15, %rdi
leaq -0x468(%rbp), %r14
movq %r14, %rsi
callq 0x121ba
movq %r14, %rdi
callq 0x12206
leaq -0xc0(%rbp), %rdi
callq 0x4170
leaq -0xe0(%rbp), %rdi
callq 0x4170
leaq -0x100(%rbp), %rdi
callq 0x4170
movq -0x40(%rbp), %rdi
movq %r15, %rsi
callq 0x12238
jmp 0x1090f
leaq -0x3c8(%rbp), %rdi
callq 0x40a0
testq %rbx, %rbx
movq -0x30(%rbp), %r14
je 0x10ac7
addq $-0x20, %r14
shlq $0x5, %rbx
leaq (%r14,%rbx), %rdi
callq 0x4170
addq $-0x20, %rbx
jne 0x10ab8
movq -0x48(%rbp), %rsp
leaq -0xa0(%rbp), %rdi
callq 0x4170
leaq -0x1c0(%rbp), %rdi
callq 0x12206
leaq -0x3c8(%rbp), %rdi
callq 0x40e0
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x4190
movq %rax, %rbx
leaq 0x4d15(%rip), %rsi      # 0x15825
movq %rax, %rdi
callq 0x4130
movq 0xd4c9(%rip), %rsi      # 0x1dfe8
movq 0xd442(%rip), %rdx      # 0x1df68
movq %rbx, %rdi
callq 0x4410
movq %rax, %r14
jmp 0x10bbc
movq %rax, %r14
movq %rbx, %rdi
callq 0x4220
jmp 0x10bbc
jmp 0x10b45
movq %rax, %r14
jmp 0x10bc8
jmp 0x10b64
movq %rax, %r14
jmp 0x10b84
movq %rax, %r14
jmp 0x10b78
jmp 0x10b64
movq %rax, %r14
leaq -0x120(%rbp), %rdi
jmp 0x10b8b
movq %rax, %r14
jmp 0x10b90
movq %rax, %r14
leaq -0xc0(%rbp), %rdi
callq 0x4170
leaq -0xe0(%rbp), %rdi
callq 0x4170
leaq -0x100(%rbp), %rdi
callq 0x4170
testq %rbx, %rbx
movq -0x30(%rbp), %r15
je 0x10bb0
addq $-0x20, %r15
shlq $0x5, %rbx
leaq (%r15,%rbx), %rdi
callq 0x4170
addq $-0x20, %rbx
jne 0x10ba1
leaq -0xa0(%rbp), %rdi
callq 0x4170
leaq -0x1c0(%rbp), %rdi
callq 0x12206
leaq -0x3c8(%rbp), %rdi
callq 0x40e0
movq %r14, %rdi
callq 0x4450