// File: /workspace/github_cpp_makefile_star2_O1/Karunika[P]Taxi_Agency_OODB/./src/TaxiAgency.cpp
// Function: TaxiAgency::export_driver_db(char const*)
void TaxiAgency::export_driver_db(const char* DRIVERS_FILE){
    ofstream File;
    File.open(DRIVERS_FILE);
    if(File.is_open()){
        File << "\"firtsname\",\"lastname\",\"uuid\",\"dln\",\"status\"\n";
        for(auto driver : driver_db){
            File << "\"" << driver.getFirstname() << "\",";
            File << "\"" << driver.getLastname() << "\",";
            File << "\"" << driver.getUUID() << "\",";
            File << "\"" << driver.getDLN() << "\",";
            File << "\"" << (driver.getStatus() == IDLE ? "IDLE" : "ONSHIFT") << "\"\n";
        }
        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 $0x2b8, %rsp            # imm = 0x2B8
movq %rsi, %rbx
movq %rdi, %r14
leaq -0x2d8(%rbp), %r15
movq %r15, %rdi
callq 0x4430
movq %r15, %rdi
movq %rbx, %rsi
movl $0x10, %edx
callq 0x4060
leaq -0x268(%rbp), %rdi
callq 0x40d0
testb %al, %al
je 0x155c5
leaq 0x677f(%rip), %rsi      # 0x1ba7b
leaq -0x2d8(%rbp), %rdi
movl $0x2d, %edx
callq 0x4320
movq 0x18(%r14), %rbx
movq 0x20(%r14), %rax
movq %rax, -0x50(%rbp)
cmpq %rax, %rbx
je 0x15571
leaq -0x38(%rbp), %r13
leaq 0x4e70(%rip), %r15      # 0x1a19d
leaq -0x2d8(%rbp), %r12
leaq 0x65e2(%rip), %r14      # 0x1b91d
leaq -0xd8(%rbp), %rdi
movq %rbx, %rsi
callq 0x17a30
movl $0x1, %edx
movq %r12, %rdi
movq %r15, %rsi
callq 0x4320
movq %r13, -0x48(%rbp)
movq -0xd8(%rbp), %rsi
movq -0xd0(%rbp), %rdx
addq %rsi, %rdx
leaq -0x48(%rbp), %rdi
callq 0xf530
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq %r12, %rdi
callq 0x4320
movl $0x2, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x4320
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x153a6
callq 0x4280
movl $0x1, %edx
movq %r12, %rdi
movq %r15, %rsi
callq 0x4320
movq %r13, -0x48(%rbp)
movq -0xb8(%rbp), %rsi
movq -0xb0(%rbp), %rdx
addq %rsi, %rdx
leaq -0x48(%rbp), %rdi
callq 0xf530
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq %r12, %rdi
callq 0x4320
movl $0x2, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x4320
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x15402
callq 0x4280
movl $0x1, %edx
movq %r12, %rdi
movq %r15, %rsi
callq 0x4320
movq %r13, -0x48(%rbp)
movq -0x98(%rbp), %rsi
movq -0x90(%rbp), %rdx
addq %rsi, %rdx
leaq -0x48(%rbp), %rdi
callq 0xf530
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq %r12, %rdi
callq 0x4320
movl $0x2, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x4320
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x1545e
callq 0x4280
movl $0x1, %edx
movq %r12, %rdi
movq %r15, %rsi
callq 0x4320
leaq -0x48(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
callq 0x1017e
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq %r12, %rdi
callq 0x4320
movl $0x2, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x4320
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x154ac
callq 0x4280
movl $0x1, %edx
movq %r12, %rdi
movq %r15, %rsi
callq 0x4320
leaq -0xd8(%rbp), %rdi
callq 0x101ac
xorl %ecx, %ecx
cmpl $0x1, %eax
setne %cl
leaq 0x64e6(%rip), %rsi      # 0x1b9bd
leaq 0x6727(%rip), %rax      # 0x1bc05
cmoveq %rax, %rsi
leaq (%rcx,%rcx,2), %rdx
addq $0x4, %rdx
movq %r12, %rdi
callq 0x4320
movl $0x2, %edx
movq %r12, %rdi
leaq 0x6622(%rip), %rsi      # 0x1bb23
callq 0x4320
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x15518
callq 0x4280
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
cmpq %rax, %rdi
je 0x15530
callq 0x4280
movq -0xb8(%rbp), %rdi
leaq -0xa8(%rbp), %rax
cmpq %rax, %rdi
je 0x15548
callq 0x4280
movq -0xd8(%rbp), %rdi
leaq -0xc8(%rbp), %rax
cmpq %rax, %rdi
je 0x15560
callq 0x4280
addq $0x88, %rbx
cmpq -0x50(%rbp), %rbx
jne 0x1533b
leaq -0x2d8(%rbp), %rdi
callq 0x43a0
movq 0xd9d4(%rip), %rax      # 0x22f58
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq -0x2d0(%rbp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, -0x2d8(%rbp,%rcx)
callq 0x4250
leaq -0x1e0(%rbp), %rdi
callq 0x4110
addq $0x2b8, %rsp            # imm = 0x2B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x4170
movq %rax, %r14
leaq 0x61cc(%rip), %rsi      # 0x1b7a5
movq %rax, %rdi
callq 0x4140
movq 0xda00(%rip), %rsi      # 0x22fe8
movq 0xd981(%rip), %rdx      # 0x22f70
movq %r14, %rdi
callq 0x4440
movq %rax, %rbx
movq %r14, %rdi
callq 0x4220
jmp 0x1563b
jmp 0x15606
movq %rax, %rbx
jmp 0x1563b
jmp 0x1562c
jmp 0x1562c
jmp 0x1562c
jmp 0x1562c
jmp 0x15619
jmp 0x15619
jmp 0x15619
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x1562f
callq 0x4280
jmp 0x1562f
movq %rax, %rbx
leaq -0xd8(%rbp), %rdi
callq 0x17998
leaq -0x2d8(%rbp), %rdi
callq 0x43d0
movq %rbx, %rdi
callq 0x4490
nop