// File: /workspace/github_cpp_makefile_star2_O1/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 $0x438, %rsp            # imm = 0x438
movq %rsi, %rbx
movq %rdi, -0x40(%rbp)
leaq -0x460(%rbp), %r15
movq %r15, %rdi
callq 0x4310
movq %r15, %rdi
movq %rbx, %rsi
movl $0x8, %edx
callq 0x41c0
leaq -0x1b8(%rbp), %rdi
callq 0x17bba
leaq -0x3e8(%rbp), %rdi
callq 0x40d0
testb %al, %al
je 0x162c9
movq %rsp, -0x68(%rbp)
leaq -0x50(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movl 0xd5de(%rip), %r14d     # 0x232c8
movq %rsp, %r12
movq %r14, %rax
shlq $0x5, %rax
subq %rax, %r12
movq %r12, %rsp
testq %r14, %r14
je 0x15d1d
leaq 0x10(%r12), %rcx
movq %rcx, -0x10(%rcx)
movq $0x0, -0x8(%rcx)
movb $0x0, (%rcx)
addq $0x20, %rcx
addq $-0x20, %rax
jne 0x15d04
movq -0x460(%rbp), %rax
addq -0x18(%rax), %r15
movq %r15, %rdi
movl $0xa, %esi
callq 0x42a0
movsbl %al, %edx
leaq -0x460(%rbp), %rbx
leaq -0x60(%rbp), %rsi
movq %rbx, %rdi
callq 0x44c0
leaq -0xa8(%rbp), %r15
leaq 0x20(%r12), %rax
movq %rax, -0x80(%rbp)
leaq 0x40(%r12), %rax
movq %rax, -0x78(%rbp)
movq -0x40(%rbp), %rax
leaq 0x60(%rax), %r13
movq %r12, -0x30(%rbp)
movq %r13, -0x70(%rbp)
movq -0x460(%rbp), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x42a0
movsbl %al, %edx
movq %rbx, %rdi
leaq -0x60(%rbp), %rsi
callq 0x44c0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x1619a
movq %r15, -0xb8(%rbp)
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rdx
addq %rsi, %rdx
leaq -0xb8(%rbp), %rdi
callq 0xf530
movl 0xd4f7(%rip), %edx      # 0x232c8
leaq -0xb8(%rbp), %rdi
movq %r12, %rsi
callq 0x125d6
movq -0xb8(%rbp), %rdi
cmpq %r15, %rdi
je 0x15df1
callq 0x4280
movq 0x8(%r12), %rcx
addq $-0x2, %rcx
leaq -0x118(%rbp), %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x42f0
movq 0x28(%r12), %rcx
addq $-0x2, %rcx
movl $0x1, %edx
leaq -0xf8(%rbp), %rdi
movq -0x80(%rbp), %rsi
callq 0x42f0
movq 0x48(%r12), %rcx
addq $-0x2, %rcx
movl $0x1, %edx
leaq -0xd8(%rbp), %rdi
movq -0x78(%rbp), %rsi
callq 0x42f0
movq 0x60(%r12), %rbx
callq 0x4050
movq %rax, %r15
movl (%rax), %r13d
movl $0x0, (%rax)
movq %rbx, %rdi
leaq -0x38(%rbp), %rsi
movl $0xa, %edx
callq 0x4390
cmpq %rbx, -0x38(%rbp)
je 0x16281
leaq -0x80000000(%rax), %rdx
movabsq $-0x100000000, %rcx     # imm = 0xFFFFFFFF00000000
cmpq %rcx, %rdx
jb 0x1628d
movl (%r15), %ecx
cmpl $0x22, %ecx
je 0x1628d
movq %rax, -0x98(%rbp)
testl %ecx, %ecx
jne 0x15eac
movl %r13d, (%r15)
movq 0x80(%r12), %rbx
movl (%r15), %r13d
movl $0x0, (%r15)
movq %rbx, %rdi
leaq -0x38(%rbp), %rsi
movl $0xa, %edx
callq 0x4390
cmpq %rbx, -0x38(%rbp)
je 0x16269
leaq -0x80000000(%rax), %rdx
movabsq $-0x100000000, %rcx     # imm = 0xFFFFFFFF00000000
cmpq %rcx, %rdx
jb 0x16275
movl (%r15), %ecx
cmpl $0x22, %ecx
je 0x16275
movq %rax, -0x90(%rbp)
testl %ecx, %ecx
jne 0x15f0d
movl %r13d, (%r15)
movq 0xa0(%r12), %rbx
movl (%r15), %r12d
movl $0x0, (%r15)
movq %rbx, %rdi
leaq -0x38(%rbp), %rsi
movl $0xa, %edx
callq 0x4390
cmpq %rbx, -0x38(%rbp)
je 0x16251
leaq -0x80000000(%rax), %rdx
movabsq $-0x100000000, %rcx     # imm = 0xFFFFFFFF00000000
cmpq %rcx, %rdx
jb 0x162a5
movl (%r15), %ecx
cmpl $0x22, %ecx
je 0x162a5
movq %rax, -0x88(%rbp)
testl %ecx, %ecx
jne 0x15f6e
movl %r12d, (%r15)
movq -0x30(%rbp), %rax
movq 0xc0(%rax), %r12
movl (%r15), %r13d
movl $0x0, (%r15)
movq %r12, %rdi
leaq -0x38(%rbp), %rsi
movl $0xa, %edx
callq 0x4390
cmpq %r12, -0x38(%rbp)
je 0x162b1
movq %rax, %rbx
addq $-0x80000000, %rax      # imm = 0x80000000
movabsq $-0x100000000, %rcx     # imm = 0xFFFFFFFF00000000
cmpq %rcx, %rax
jb 0x16299
movl (%r15), %eax
cmpl $0x22, %eax
je 0x16299
testl %eax, %eax
movq -0x30(%rbp), %rax
jne 0x15fd1
movl %r13d, (%r15)
movq 0xe0(%rax), %r12
movl (%r15), %r13d
movl $0x0, (%r15)
movq %r12, %rdi
leaq -0x38(%rbp), %rsi
movl $0xa, %edx
callq 0x4390
cmpq %r12, -0x38(%rbp)
je 0x162bd
leaq -0x80000000(%rax), %rcx
movabsq $-0x100000000, %rdx     # imm = 0xFFFFFFFF00000000
cmpq %rdx, %rcx
jb 0x1625d
movl (%r15), %ecx
cmpl $0x22, %ecx
je 0x1625d
testl %ecx, %ecx
movq -0x30(%rbp), %r12
jne 0x1602e
movl %r13d, (%r15)
subq $0x8, %rsp
leaq -0x258(%rbp), %r15
movq %r15, %rdi
leaq -0x118(%rbp), %rsi
leaq -0xf8(%rbp), %rdx
leaq -0xd8(%rbp), %rcx
movq -0x98(%rbp), %r8
movq -0x90(%rbp), %r9
pushq %rax
pushq %rbx
pushq -0x88(%rbp)
callq 0x106e2
addq $0x20, %rsp
leaq -0x1b8(%rbp), %rdi
movq %r15, %rsi
callq 0x4340
leaq -0x198(%rbp), %rdi
leaq -0x238(%rbp), %rsi
callq 0x4340
leaq -0x178(%rbp), %rdi
leaq -0x218(%rbp), %rsi
callq 0x4340
movq -0x1f8(%rbp), %rax
movq %rax, -0x158(%rbp)
leaq -0x150(%rbp), %rdi
leaq -0x1f0(%rbp), %r13
movq %r13, %rsi
callq 0x4598
leaq -0x460(%rbp), %rbx
leaq -0xa8(%rbp), %r15
movq %r13, %rdi
callq 0x1103c
movq -0x218(%rbp), %rdi
leaq -0x208(%rbp), %rax
cmpq %rax, %rdi
je 0x160f7
callq 0x4280
movq -0x238(%rbp), %rdi
leaq -0x228(%rbp), %rax
cmpq %rax, %rdi
movq -0x70(%rbp), %r13
je 0x16113
callq 0x4280
movq -0x258(%rbp), %rdi
leaq -0x248(%rbp), %rax
cmpq %rax, %rdi
je 0x1612b
callq 0x4280
movq -0xd8(%rbp), %rdi
leaq -0xc8(%rbp), %rax
cmpq %rax, %rdi
je 0x16143
callq 0x4280
movq -0xf8(%rbp), %rdi
leaq -0xe8(%rbp), %rax
cmpq %rax, %rdi
je 0x1615b
callq 0x4280
movq -0x118(%rbp), %rdi
leaq -0x108(%rbp), %rax
cmpq %rax, %rdi
je 0x16173
callq 0x4280
movq %r13, %rdi
leaq -0x1b8(%rbp), %rsi
callq 0x1936a
movq %rax, %rdi
movq %r13, %rsi
callq 0x4070
movq -0x40(%rbp), %rax
incq 0x70(%rax)
jmp 0x15d74
leaq -0x460(%rbp), %rdi
callq 0x40a0
testq %r14, %r14
je 0x161d2
shlq $0x5, %r14
leaq (%r14,%r12), %rbx
addq $-0x10, %rbx
negq %r14
movq -0x10(%rbx), %rdi
cmpq %rdi, %rbx
je 0x161c8
callq 0x4280
addq $-0x20, %rbx
addq $0x20, %r14
jne 0x161ba
movq -0x68(%rbp), %rsp
movq -0x60(%rbp), %rdi
leaq -0x50(%rbp), %rax
cmpq %rax, %rdi
je 0x161e8
callq 0x4280
leaq -0x150(%rbp), %rbx
movq %rbx, %rdi
callq 0x1103c
movq -0x28(%rbx), %rdi
leaq -0x168(%rbp), %rax
cmpq %rax, %rdi
je 0x1620c
callq 0x4280
leaq -0x188(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x16221
callq 0x4280
leaq -0x1a8(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x16236
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
leaq 0x59b2(%rip), %rdi      # 0x1bc0a
callq 0x41b0
leaq 0x59a6(%rip), %rdi      # 0x1bc0a
callq 0x43b0
leaq 0x599a(%rip), %rdi      # 0x1bc0a
callq 0x41b0
leaq 0x598e(%rip), %rdi      # 0x1bc0a
callq 0x43b0
leaq 0x5982(%rip), %rdi      # 0x1bc0a
callq 0x41b0
leaq 0x5976(%rip), %rdi      # 0x1bc0a
callq 0x43b0
leaq 0x596a(%rip), %rdi      # 0x1bc0a
callq 0x43b0
leaq 0x595e(%rip), %rdi      # 0x1bc0a
callq 0x43b0
leaq 0x5952(%rip), %rdi      # 0x1bc0a
callq 0x41b0
leaq 0x5946(%rip), %rdi      # 0x1bc0a
callq 0x41b0
movl $0x10, %edi
callq 0x4170
movq %rax, %r14
leaq 0x54c8(%rip), %rsi      # 0x1b7a5
movq %rax, %rdi
callq 0x4140
movq 0xccfc(%rip), %rsi      # 0x22fe8
movq 0xcc7d(%rip), %rdx      # 0x22f70
movq %r14, %rdi
callq 0x4440
movq %rax, %rbx
jmp 0x16404
movq %rax, %rbx
movq %r14, %rdi
callq 0x4220
jmp 0x16404
jmp 0x16315
movq %rax, %rbx
jmp 0x16410
jmp 0x163c3
movq %rax, %rbx
jmp 0x16379
movq %rax, %rdi
callq 0xf38c
movq %rax, %rbx
jmp 0x16391
movq %rax, %rbx
jmp 0x163a9
movq %rax, %rbx
movq -0xb8(%rbp), %rdi
cmpq %r15, %rdi
je 0x1634d
callq 0x4280
movq -0x30(%rbp), %r12
jmp 0x163c6
jmp 0x163c3
jmp 0x16369
jmp 0x16369
jmp 0x16369
movq %rax, %rbx
cmpl $0x0, (%r15)
jne 0x16375
movl %r12d, (%r15)
jmp 0x16375
movq %rax, %rbx
cmpl $0x0, (%r15)
jne 0x16375
movl %r13d, (%r15)
movq -0x30(%rbp), %r12
movq -0xd8(%rbp), %rdi
leaq -0xc8(%rbp), %rax
cmpq %rax, %rdi
je 0x16391
callq 0x4280
movq -0xf8(%rbp), %rdi
leaq -0xe8(%rbp), %rax
cmpq %rax, %rdi
je 0x163a9
callq 0x4280
movq -0x118(%rbp), %rdi
leaq -0x108(%rbp), %rax
cmpq %rax, %rdi
je 0x163c6
callq 0x4280
jmp 0x163c6
movq %rax, %rbx
testq %r14, %r14
je 0x163f2
shlq $0x5, %r14
leaq (%r14,%r12), %r15
addq $-0x10, %r15
negq %r14
movq -0x10(%r15), %rdi
cmpq %rdi, %r15
je 0x163e8
callq 0x4280
addq $-0x20, %r15
addq $0x20, %r14
jne 0x163da
movq -0x60(%rbp), %rdi
leaq -0x50(%rbp), %rax
cmpq %rax, %rdi
je 0x16404
callq 0x4280
leaq -0x1b8(%rbp), %rdi
callq 0x17d84
leaq -0x460(%rbp), %rdi
callq 0x40e0
movq %rbx, %rdi
callq 0x4490