// File: Karunika[P]Taxi_Agency_OODB/./src/TaxiAgency.cpp
// Function: TaxiAgency::export_ongoing_shifts(char const*)
void TaxiAgency::export_ongoing_shifts(const char* CURRENT_SHIFTS_FILE){
    ofstream File;
    File.open(CURRENT_SHIFTS_FILE);
    if(File.is_open()){
        File << "\"customer_uuid\",\"driver_uuid\",\"taxi_id\"\n";
        for(list<Shift>::iterator shift = current_shifts.begin(); shift != current_shifts.end(); ++shift){
            File << "\"" << shift->getCustomerUUID() << "\",";
            File << "\"" << shift->getDriverUUID() << "\",";
            File << "\"" << shift->getCarID() << "\"";
            File << shift->getFareAmount() << ",";
            File << shift->getWaitingCharges() << "\n";
        }
        File.close();
    }else{
        throw runtime_error("File couldn't be resolved");
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2c0, %rsp            # imm = 0x2C0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x240(%rbp)
leaq -0x210(%rbp), %rdi
movq %rdi, -0x238(%rbp)
callq 0x44a0
movq -0x238(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x10, %edx
callq 0x4060
jmp 0x27c58
leaq -0x210(%rbp), %rdi
callq 0x4250
movb %al, -0x241(%rbp)
jmp 0x27c6c
movb -0x241(%rbp), %al
testb $0x1, %al
jne 0x27c7b
jmp 0x27ef2
leaq 0xa224(%rip), %rsi      # 0x31ea6
leaq -0x210(%rbp), %rdi
callq 0x42d0
jmp 0x27c90
movq -0x240(%rbp), %rdi
addq $0x48, %rdi
callq 0x2aa60
movq %rax, -0x228(%rbp)
movq -0x240(%rbp), %rdi
addq $0x48, %rdi
callq 0x2aac0
movq %rax, -0x230(%rbp)
leaq -0x228(%rbp), %rdi
leaq -0x230(%rbp), %rsi
callq 0x2aa90
testb $0x1, %al
jne 0x27cda
jmp 0x27ee2
leaq 0x8cd8(%rip), %rsi      # 0x309b9
leaq -0x210(%rbp), %rdi
callq 0x42d0
movq %rax, -0x250(%rbp)
jmp 0x27cf6
leaq -0x228(%rbp), %rdi
callq 0x2aaf0
movq %rax, %rdi
callq 0x1fab0
movq %rax, -0x258(%rbp)
jmp 0x27d13
movq -0x258(%rbp), %rsi
movq -0x250(%rbp), %rdi
callq 0x4290
movq %rax, -0x260(%rbp)
jmp 0x27d2f
movq -0x260(%rbp), %rdi
leaq 0x9f89(%rip), %rsi      # 0x31cc6
callq 0x42d0
jmp 0x27d44
leaq 0x8c6e(%rip), %rsi      # 0x309b9
leaq -0x210(%rbp), %rdi
callq 0x42d0
movq %rax, -0x268(%rbp)
jmp 0x27d60
leaq -0x228(%rbp), %rdi
callq 0x2aaf0
movq %rax, %rdi
callq 0x1fa90
movq %rax, -0x270(%rbp)
jmp 0x27d7d
movq -0x270(%rbp), %rsi
movq -0x268(%rbp), %rdi
callq 0x4290
movq %rax, -0x278(%rbp)
jmp 0x27d99
movq -0x278(%rbp), %rdi
leaq 0x9f1f(%rip), %rsi      # 0x31cc6
callq 0x42d0
jmp 0x27dae
leaq 0x8c04(%rip), %rsi      # 0x309b9
leaq -0x210(%rbp), %rdi
callq 0x42d0
movq %rax, -0x280(%rbp)
jmp 0x27dca
leaq -0x228(%rbp), %rdi
callq 0x2aaf0
movq %rax, %rdi
callq 0x1fac0
movq %rax, -0x288(%rbp)
jmp 0x27de7
movq -0x288(%rbp), %rsi
movq -0x280(%rbp), %rdi
callq 0x4290
movq %rax, -0x290(%rbp)
jmp 0x27e03
movq -0x290(%rbp), %rdi
leaq 0x8ba8(%rip), %rsi      # 0x309b9
callq 0x42d0
jmp 0x27e18
leaq -0x228(%rbp), %rdi
callq 0x2aaf0
movq %rax, %rdi
callq 0x1fae0
movq %rax, -0x298(%rbp)
jmp 0x27e35
movq -0x298(%rbp), %rax
movl (%rax), %esi
leaq -0x210(%rbp), %rdi
callq 0x44d0
movq %rax, -0x2a0(%rbp)
jmp 0x27e53
movq -0x2a0(%rbp), %rdi
leaq 0x9e66(%rip), %rsi      # 0x31cc7
callq 0x42d0
jmp 0x27e68
leaq -0x228(%rbp), %rdi
callq 0x2aaf0
movq %rax, %rdi
callq 0x1fb00
movq %rax, -0x2a8(%rbp)
jmp 0x27e85
movq -0x2a8(%rbp), %rax
movl (%rax), %esi
leaq -0x210(%rbp), %rdi
callq 0x44d0
movq %rax, -0x2b0(%rbp)
jmp 0x27ea3
movq -0x2b0(%rbp), %rdi
leaq 0xa01c(%rip), %rsi      # 0x31ecd
callq 0x42d0
jmp 0x27eb8
jmp 0x27eba
leaq -0x228(%rbp), %rdi
callq 0x2ab10
jmp 0x27ca7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x218(%rbp)
movl %eax, -0x21c(%rbp)
jmp 0x27f68
leaq -0x210(%rbp), %rdi
callq 0x43f0
jmp 0x27ef0
jmp 0x27f53
movl $0x10, %edi
callq 0x41a0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x2b8(%rbp)
leaq 0x9c3e(%rip), %rsi      # 0x31b4e
callq 0x4140
jmp 0x27f17
movq -0x2b8(%rbp), %rdi
movq 0x1e0cb(%rip), %rsi     # 0x45ff0
movq 0x1e044(%rip), %rdx     # 0x45f70
callq 0x44b0
jmp 0x27f80
movq -0x2b8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x218(%rbp)
movl %eax, -0x21c(%rbp)
callq 0x4240
jmp 0x27f68
leaq -0x210(%rbp), %rdi
callq 0x4420
addq $0x2c0, %rsp            # imm = 0x2C0
popq %rbp
retq
leaq -0x210(%rbp), %rdi
callq 0x4420
movq -0x218(%rbp), %rdi
callq 0x44f0