// File: /workspace/github_cpp_makefile_star2_O3/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 -0x468(%rbp), %r15
movq %r15, %rdi
callq 0x4310
movq %r15, %rdi
movq %rbx, %rsi
movl $0x8, %edx
callq 0x41c0
leaq -0x1c0(%rbp), %rdi
callq 0x179e0
leaq -0x3f0(%rbp), %rdi
callq 0x40d0
testb %al, %al
je 0x1611c
movq %rsp, -0x68(%rbp)
leaq -0x50(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movl 0xd7a0(%rip), %r14d     # 0x232c8
movq %rsp, %rbx
movq %r14, %rax
shlq $0x5, %rax
subq %rax, %rbx
movq %rbx, %rsp
testq %r14, %r14
je 0x15b5a
leaq 0x10(%rbx), %rcx
movq %rcx, -0x10(%rcx)
movq $0x0, -0x8(%rcx)
movb $0x0, (%rcx)
addq $0x20, %rcx
addq $-0x20, %rax
jne 0x15b41
movq -0x468(%rbp), %rax
addq -0x18(%rax), %r15
movq %r15, %rdi
movl $0xa, %esi
callq 0x42a0
movsbl %al, %edx
leaq -0x468(%rbp), %r15
leaq -0x60(%rbp), %rsi
movq %r15, %rdi
callq 0x44c0
leaq -0xb0(%rbp), %r12
leaq 0x20(%rbx), %rax
movq %rax, -0x80(%rbp)
leaq 0x40(%rbx), %rax
movq %rax, -0x78(%rbp)
movq -0x40(%rbp), %rax
leaq 0x60(%rax), %r13
movq %rbx, -0x30(%rbp)
movq %r13, -0x70(%rbp)
movq -0x468(%rbp), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x42a0
movsbl %al, %edx
movq %r15, %rdi
leaq -0x60(%rbp), %rsi
callq 0x44c0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x15ff1
movq %r12, -0xc0(%rbp)
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rdx
addq %rsi, %rdx
leaq -0xc0(%rbp), %rdi
callq 0xf492
movl 0xd6bc(%rip), %edx      # 0x232c8
leaq -0xc0(%rbp), %rdi
movq %rbx, %rsi
callq 0x12514
movq -0xc0(%rbp), %rdi
cmpq %r12, %rdi
je 0x15c2c
callq 0x4280
movq 0x8(%rbx), %rcx
addq $-0x2, %rcx
leaq -0x120(%rbp), %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x42f0
movq 0x28(%rbx), %rcx
addq $-0x2, %rcx
movl $0x1, %edx
leaq -0x100(%rbp), %rdi
movq -0x80(%rbp), %rsi
callq 0x42f0
movq 0x48(%rbx), %rcx
addq $-0x2, %rcx
movl $0x1, %edx
leaq -0xe0(%rbp), %rdi
movq -0x78(%rbp), %rsi
callq 0x42f0
movq 0x60(%rbx), %rbx
callq 0x4050
movq %rax, %r12
movl (%rax), %r15d
movl $0x0, (%rax)
movq %rbx, %rdi
leaq -0x38(%rbp), %rsi
movl $0xa, %edx
callq 0x4390
cmpq %rbx, -0x38(%rbp)
je 0x160d4
leaq -0x80000000(%rax), %rdx
movabsq $-0x100000000, %rcx     # imm = 0xFFFFFFFF00000000
cmpq %rcx, %rdx
jb 0x160e0
movl (%r12), %r13d
cmpl $0x22, %r13d
je 0x160e0
movq %rax, -0xa0(%rbp)
testl %r13d, %r13d
jne 0x15cea
movl %r15d, (%r12)
movl %r15d, %r13d
movq -0x30(%rbp), %rax
movq 0x80(%rax), %rbx
movl $0x0, (%r12)
movq %rbx, %rdi
leaq -0x38(%rbp), %rsi
movl $0xa, %edx
callq 0x4390
cmpq %rbx, -0x38(%rbp)
je 0x160bc
leaq -0x80000000(%rax), %rdx
movabsq $-0x100000000, %rcx     # imm = 0xFFFFFFFF00000000
cmpq %rcx, %rdx
jb 0x160c8
movl (%r12), %r15d
cmpl $0x22, %r15d
je 0x160c8
movq %rax, -0x98(%rbp)
testl %r15d, %r15d
jne 0x15d53
movl %r13d, (%r12)
movl %r13d, %r15d
movq -0x30(%rbp), %r13
movq 0xa0(%r13), %rbx
movl $0x0, (%r12)
movq %rbx, %rdi
leaq -0x38(%rbp), %rsi
movl $0xa, %edx
callq 0x4390
cmpq %rbx, -0x38(%rbp)
je 0x160a4
leaq -0x80000000(%rax), %rdx
movabsq $-0x100000000, %rcx     # imm = 0xFFFFFFFF00000000
cmpq %rcx, %rdx
jb 0x160f8
movl (%r12), %ebx
cmpl $0x22, %ebx
je 0x160f8
movq %rax, -0x90(%rbp)
testl %ebx, %ebx
jne 0x15dba
movl %r15d, (%r12)
movl %r15d, %ebx
movq 0xc0(%r13), %r13
movl $0x0, (%r12)
movq %r13, %rdi
leaq -0x38(%rbp), %rsi
movl $0xa, %edx
callq 0x4390
cmpq %r13, -0x38(%rbp)
je 0x16104
leaq -0x80000000(%rax), %rdx
movabsq $-0x100000000, %rcx     # imm = 0xFFFFFFFF00000000
cmpq %rcx, %rdx
jb 0x160ec
movl (%r12), %r15d
cmpl $0x22, %r15d
je 0x160ec
movq %rax, -0x88(%rbp)
testl %r15d, %r15d
movq -0x30(%rbp), %rax
jne 0x15e23
movl %ebx, (%r12)
movl %ebx, %r15d
movq 0xe0(%rax), %r13
movl $0x0, (%r12)
movq %r13, %rdi
leaq -0x38(%rbp), %rsi
movl $0xa, %edx
callq 0x4390
cmpq %r13, -0x38(%rbp)
je 0x16110
leaq -0x80000000(%rax), %rcx
movabsq $-0x100000000, %rdx     # imm = 0xFFFFFFFF00000000
cmpq %rdx, %rcx
leaq -0x1f8(%rbp), %r13
jb 0x160b0
movl (%r12), %ecx
cmpl $0x22, %ecx
je 0x160b0
testl %ecx, %ecx
movq -0x30(%rbp), %rbx
jne 0x15e87
movl %r15d, (%r12)
subq $0x8, %rsp
leaq -0x260(%rbp), %r15
movq %r15, %rdi
leaq -0x120(%rbp), %rsi
leaq -0x100(%rbp), %rdx
leaq -0xe0(%rbp), %rcx
movq -0xa0(%rbp), %r8
movq -0x98(%rbp), %r9
pushq %rax
pushq -0x88(%rbp)
pushq -0x90(%rbp)
callq 0x10652
addq $0x20, %rsp
leaq -0x1c0(%rbp), %rdi
movq %r15, %rsi
callq 0x4340
leaq -0x1a0(%rbp), %rdi
leaq -0x240(%rbp), %rsi
callq 0x4340
leaq -0x180(%rbp), %rdi
leaq -0x220(%rbp), %rsi
callq 0x4340
movq -0x200(%rbp), %rax
movq %rax, -0x160(%rbp)
leaq -0x158(%rbp), %rdi
movq %r13, %rsi
callq 0x4598
leaq -0x468(%rbp), %r15
leaq -0xb0(%rbp), %r12
movq %r13, %rdi
callq 0x10f92
movq -0x220(%rbp), %rdi
leaq -0x210(%rbp), %rax
cmpq %rax, %rdi
je 0x15f4e
callq 0x4280
movq -0x240(%rbp), %rdi
leaq -0x230(%rbp), %rax
cmpq %rax, %rdi
movq -0x70(%rbp), %r13
je 0x15f6a
callq 0x4280
movq -0x260(%rbp), %rdi
leaq -0x250(%rbp), %rax
cmpq %rax, %rdi
je 0x15f82
callq 0x4280
movq -0xe0(%rbp), %rdi
leaq -0xd0(%rbp), %rax
cmpq %rax, %rdi
je 0x15f9a
callq 0x4280
movq -0x100(%rbp), %rdi
leaq -0xf0(%rbp), %rax
cmpq %rax, %rdi
je 0x15fb2
callq 0x4280
movq -0x120(%rbp), %rdi
leaq -0x110(%rbp), %rax
cmpq %rax, %rdi
je 0x15fca
callq 0x4280
movq %r13, %rdi
leaq -0x1c0(%rbp), %rsi
callq 0x19176
movq %rax, %rdi
movq %r13, %rsi
callq 0x4070
movq -0x40(%rbp), %rax
incq 0x70(%rax)
jmp 0x15baf
leaq -0x468(%rbp), %rdi
callq 0x40a0
testq %r14, %r14
je 0x16028
shlq $0x5, %r14
addq %r14, %rbx
addq $-0x10, %rbx
negq %r14
movq -0x10(%rbx), %rdi
cmpq %rdi, %rbx
je 0x1601e
callq 0x4280
addq $-0x20, %rbx
addq $0x20, %r14
jne 0x16010
movq -0x68(%rbp), %rsp
movq -0x60(%rbp), %rdi
leaq -0x50(%rbp), %rax
cmpq %rax, %rdi
je 0x1603e
callq 0x4280
leaq -0x158(%rbp), %rdi
callq 0x10f92
leaq -0x170(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1605f
callq 0x4280
leaq -0x190(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x16074
callq 0x4280
leaq -0x1b0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x16089
callq 0x4280
leaq -0x468(%rbp), %rdi
callq 0x40e0
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5b5f(%rip), %rdi      # 0x1bc0a
callq 0x41b0
leaq 0x5b53(%rip), %rdi      # 0x1bc0a
callq 0x43b0
leaq 0x5b47(%rip), %rdi      # 0x1bc0a
callq 0x41b0
leaq 0x5b3b(%rip), %rdi      # 0x1bc0a
callq 0x43b0
leaq 0x5b2f(%rip), %rdi      # 0x1bc0a
callq 0x41b0
leaq 0x5b23(%rip), %rdi      # 0x1bc0a
callq 0x43b0
leaq 0x5b17(%rip), %rdi      # 0x1bc0a
callq 0x43b0
leaq 0x5b0b(%rip), %rdi      # 0x1bc0a
callq 0x43b0
leaq 0x5aff(%rip), %rdi      # 0x1bc0a
callq 0x41b0
leaq 0x5af3(%rip), %rdi      # 0x1bc0a
callq 0x41b0
movl $0x10, %edi
callq 0x4170
movq %rax, %r14
leaq 0x5675(%rip), %rsi      # 0x1b7a5
movq %rax, %rdi
callq 0x4140
movq 0xcea9(%rip), %rsi      # 0x22fe8
movq 0xce2a(%rip), %rdx      # 0x22f70
movq %r14, %rdi
callq 0x4440
movq %rax, %r15
jmp 0x16272
movq %rax, %r15
movq %r14, %rdi
callq 0x4220
jmp 0x16272
jmp 0x16168
movq %rax, %r15
jmp 0x1627e
jmp 0x16232
jmp 0x161d1
movq %rax, %rdi
callq 0xf2ea
movq %rax, %r15
jmp 0x16200
movq %rax, %r15
jmp 0x16218
movq %rax, %r15
movq -0xc0(%rbp), %rdi
cmpq %r12, %rdi
je 0x161a0
callq 0x4280
movq -0x30(%rbp), %rbx
jmp 0x16235
jmp 0x16232
movq %rax, %r15
cmpl $0x0, (%r12)
jne 0x161e4
movl %ebx, (%r12)
jmp 0x161e4
jmp 0x161c2
jmp 0x161c2
cmpl $0x0, (%r12)
jne 0x161cd
movl %r15d, (%r12)
movq -0x30(%rbp), %rbx
movq %rax, %r15
jmp 0x161e8
movq %rax, %r15
cmpl $0x0, (%r12)
jne 0x161e4
movl %r13d, (%r12)
movq -0x30(%rbp), %rbx
movq -0xe0(%rbp), %rdi
leaq -0xd0(%rbp), %rax
cmpq %rax, %rdi
je 0x16200
callq 0x4280
movq -0x100(%rbp), %rdi
leaq -0xf0(%rbp), %rax
cmpq %rax, %rdi
je 0x16218
callq 0x4280
movq -0x120(%rbp), %rdi
leaq -0x110(%rbp), %rax
cmpq %rax, %rdi
je 0x16235
callq 0x4280
jmp 0x16235
movq %rax, %r15
testq %r14, %r14
je 0x16260
shlq $0x5, %r14
addq %r14, %rbx
addq $-0x10, %rbx
negq %r14
movq -0x10(%rbx), %rdi
cmpq %rdi, %rbx
je 0x16256
callq 0x4280
addq $-0x20, %rbx
addq $0x20, %r14
jne 0x16248
movq -0x60(%rbp), %rdi
leaq -0x50(%rbp), %rax
cmpq %rax, %rdi
je 0x16272
callq 0x4280
leaq -0x1c0(%rbp), %rdi
callq 0x17b96
leaq -0x468(%rbp), %rdi
callq 0x40e0
movq %r15, %rdi
callq 0x4490