// File: Karunika[P]Taxi_Agency_OODB/./src/TaxiAgency.cpp
// Function: TaxiAgency::export_customer_db(char const*)
void TaxiAgency::export_customer_db(const char* CUSTOMERS_FILE){
    srand(time(NULL));
    ofstream File;
    File.open(CUSTOMERS_FILE);
    if(File.is_open()){
        File << "\"firtsname\",\"lastname\",\"uuid\",\"balance\",\"status\"\n";
        for(auto customer : customer_db){
            File << "\"" << customer.getFirstname() << "\",";
            File << "\"" << customer.getLastname() << "\",";
            File << "\"" << customer.getUUID() << "\",";
            File << customer.getBalance() << ",";
            File << "\"" << (customer.getStatus() == IDLE ? "IDLE" : "ONSHIFT") << "\"\n";
        }
        File.close();
    }else{
        throw runtime_error("File couldn't be resolved");
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x380, %rsp            # imm = 0x380
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x310(%rbp)
xorl %eax, %eax
movl %eax, %edi
callq 0x42a0
movl %eax, %edi
callq 0x42c0
leaq -0x210(%rbp), %rdi
movq %rdi, -0x308(%rbp)
callq 0x44a0
movq -0x308(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x10, %edx
callq 0x4060
jmp 0x25298
leaq -0x210(%rbp), %rdi
callq 0x4250
movb %al, -0x311(%rbp)
jmp 0x252ac
movb -0x311(%rbp), %al
testb $0x1, %al
jne 0x252bb
jmp 0x2560b
leaq 0xcaac(%rip), %rsi      # 0x31d6e
leaq -0x210(%rbp), %rdi
callq 0x42d0
jmp 0x252d0
movq -0x310(%rbp), %rax
addq $0x30, %rax
movq %rax, -0x228(%rbp)
movq -0x228(%rbp), %rdi
callq 0x29c70
movq %rax, -0x230(%rbp)
movq -0x228(%rbp), %rdi
callq 0x29ca0
movq %rax, -0x238(%rbp)
leaq -0x230(%rbp), %rdi
leaq -0x238(%rbp), %rsi
callq 0x29cd0
testb $0x1, %al
jne 0x25324
jmp 0x255fb
leaq -0x230(%rbp), %rdi
callq 0x29d10
movq %rax, %rsi
leaq -0x2a0(%rbp), %rdi
callq 0x29d30
jmp 0x25341
leaq 0xb671(%rip), %rsi      # 0x309b9
leaq -0x210(%rbp), %rdi
callq 0x42d0
movq %rax, -0x320(%rbp)
jmp 0x2535d
leaq -0x2c0(%rbp), %rdi
leaq -0x2a0(%rbp), %rsi
callq 0x1e000
jmp 0x25372
movq -0x320(%rbp), %rdi
leaq -0x2c0(%rbp), %rsi
callq 0x4290
movq %rax, -0x328(%rbp)
jmp 0x2538e
movq -0x328(%rbp), %rdi
leaq 0xc92a(%rip), %rsi      # 0x31cc6
callq 0x42d0
jmp 0x253a3
leaq -0x2c0(%rbp), %rdi
callq 0x41f0
leaq 0xb603(%rip), %rsi      # 0x309b9
leaq -0x210(%rbp), %rdi
callq 0x42d0
movq %rax, -0x330(%rbp)
jmp 0x253cb
leaq -0x2e0(%rbp), %rdi
leaq -0x2a0(%rbp), %rsi
callq 0x1e030
jmp 0x253e0
movq -0x330(%rbp), %rdi
leaq -0x2e0(%rbp), %rsi
callq 0x4290
movq %rax, -0x338(%rbp)
jmp 0x253fc
movq -0x338(%rbp), %rdi
leaq 0xc8bc(%rip), %rsi      # 0x31cc6
callq 0x42d0
jmp 0x25411
leaq -0x2e0(%rbp), %rdi
callq 0x41f0
leaq 0xb595(%rip), %rsi      # 0x309b9
leaq -0x210(%rbp), %rdi
callq 0x42d0
movq %rax, -0x340(%rbp)
jmp 0x25439
leaq -0x300(%rbp), %rdi
leaq -0x2a0(%rbp), %rsi
callq 0x2a0e0
jmp 0x2544e
movq -0x340(%rbp), %rdi
leaq -0x300(%rbp), %rsi
callq 0x4290
movq %rax, -0x348(%rbp)
jmp 0x2546a
movq -0x348(%rbp), %rdi
leaq 0xc84e(%rip), %rsi      # 0x31cc6
callq 0x42d0
jmp 0x2547f
leaq -0x300(%rbp), %rdi
callq 0x41f0
leaq -0x2a0(%rbp), %rdi
callq 0x1f0d0
movl %eax, -0x34c(%rbp)
jmp 0x2549f
movl -0x34c(%rbp), %esi
leaq -0x210(%rbp), %rdi
callq 0x44d0
movq %rax, -0x358(%rbp)
jmp 0x254ba
movq -0x358(%rbp), %rdi
leaq 0xc7ff(%rip), %rsi      # 0x31cc7
callq 0x42d0
jmp 0x254cf
leaq 0xb4e3(%rip), %rsi      # 0x309b9
leaq -0x210(%rbp), %rdi
callq 0x42d0
movq %rax, -0x360(%rbp)
jmp 0x254eb
leaq -0x2a0(%rbp), %rdi
callq 0x1f0b0
movl %eax, -0x364(%rbp)
jmp 0x254ff
movq -0x360(%rbp), %rdi
movl -0x364(%rbp), %eax
subl $0x1, %eax
leaq 0xca98(%rip), %rax      # 0x31fae
leaq 0xc849(%rip), %rsi      # 0x31d66
cmoveq %rax, %rsi
callq 0x42d0
movq %rax, -0x370(%rbp)
jmp 0x2552f
movq -0x370(%rbp), %rdi
leaq 0xc98f(%rip), %rsi      # 0x31ecc
callq 0x42d0
jmp 0x25544
leaq -0x2a0(%rbp), %rdi
callq 0x29be0
leaq -0x230(%rbp), %rdi
callq 0x29d70
jmp 0x25308
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x218(%rbp)
movl %eax, -0x21c(%rbp)
jmp 0x25681
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x218(%rbp)
movl %eax, -0x21c(%rbp)
jmp 0x255ea
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x218(%rbp)
movl %eax, -0x21c(%rbp)
leaq -0x2c0(%rbp), %rdi
callq 0x41f0
jmp 0x255ea
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x218(%rbp)
movl %eax, -0x21c(%rbp)
leaq -0x2e0(%rbp), %rdi
callq 0x41f0
jmp 0x255ea
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x218(%rbp)
movl %eax, -0x21c(%rbp)
leaq -0x300(%rbp), %rdi
callq 0x41f0
leaq -0x2a0(%rbp), %rdi
callq 0x29be0
jmp 0x25681
leaq -0x210(%rbp), %rdi
callq 0x43f0
jmp 0x25609
jmp 0x2566c
movl $0x10, %edi
callq 0x41a0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x378(%rbp)
leaq 0xc525(%rip), %rsi      # 0x31b4e
callq 0x4140
jmp 0x25630
movq -0x378(%rbp), %rdi
movq 0x209b2(%rip), %rsi     # 0x45ff0
movq 0x2092b(%rip), %rdx     # 0x45f70
callq 0x44b0
jmp 0x25699
movq -0x378(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x218(%rbp)
movl %eax, -0x21c(%rbp)
callq 0x4240
jmp 0x25681
leaq -0x210(%rbp), %rdi
callq 0x4420
addq $0x380, %rsp            # imm = 0x380
popq %rbp
retq
leaq -0x210(%rbp), %rdi
callq 0x4420
movq -0x218(%rbp), %rdi
callq 0x44f0
nopl (%rax)