// File: /workspace/github_cpp_makefile_star2_O3/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 0x153f9
leaq 0x694b(%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 0x153a5
leaq -0x38(%rbp), %r13
leaq 0x503c(%rip), %r15      # 0x1a19d
leaq -0x2d8(%rbp), %r12
leaq 0x67ae(%rip), %r14      # 0x1b91d
leaq -0xd8(%rbp), %rdi
movq %rbx, %rsi
callq 0x17856
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 0xf492
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 0x151da
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 0xf492
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 0x15236
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 0xf492
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 0x15292
callq 0x4280
movl $0x1, %edx
movq %r12, %rdi
movq %r15, %rsi
callq 0x4320
leaq -0x48(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
callq 0x10106
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 0x152e0
callq 0x4280
movl $0x1, %edx
movq %r12, %rdi
movq %r15, %rsi
callq 0x4320
leaq -0xd8(%rbp), %rdi
callq 0x10134
xorl %ecx, %ecx
cmpl $0x1, %eax
setne %cl
leaq 0x66b2(%rip), %rsi      # 0x1b9bd
leaq 0x68f3(%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 0x67ee(%rip), %rsi      # 0x1bb23
callq 0x4320
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x1534c
callq 0x4280
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
cmpq %rax, %rdi
je 0x15364
callq 0x4280
movq -0xb8(%rbp), %rdi
leaq -0xa8(%rbp), %rax
cmpq %rax, %rdi
je 0x1537c
callq 0x4280
movq -0xd8(%rbp), %rdi
leaq -0xc8(%rbp), %rax
cmpq %rax, %rdi
je 0x15394
callq 0x4280
addq $0x88, %rbx
cmpq -0x50(%rbp), %rbx
jne 0x1516f
leaq -0x2d8(%rbp), %rdi
callq 0x43a0
movq 0xdba0(%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 0x6398(%rip), %rsi      # 0x1b7a5
movq %rax, %rdi
callq 0x4140
movq 0xdbcc(%rip), %rsi      # 0x22fe8
movq 0xdb4d(%rip), %rdx      # 0x22f70
movq %r14, %rdi
callq 0x4440
movq %rax, %rbx
movq %r14, %rdi
callq 0x4220
jmp 0x1546f
jmp 0x1543a
movq %rax, %rbx
jmp 0x1546f
jmp 0x15460
jmp 0x15460
jmp 0x15460
jmp 0x15460
jmp 0x1544d
jmp 0x1544d
jmp 0x1544d
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x15463
callq 0x4280
jmp 0x15463
movq %rax, %rbx
leaq -0xd8(%rbp), %rdi
callq 0x177be
leaq -0x2d8(%rbp), %rdi
callq 0x43d0
movq %rbx, %rdi
callq 0x4490
nop