// File: /workspace/github_cpp_makefile_star2_O2/Karunika[P]Taxi_Agency_OODB/./src/TaxiAgency.cpp
// Function: TaxiAgency::add_driver(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, Status)
void TaxiAgency::add_driver(string firstname, string lastname, string uuid, string dln, Status status){
    if(driver_db.size() == DriverLimit+1)
        throw range_error("The maximum vacancy of driver is reached. Need to upgrade the Agency!");
    for(int i = 0; i < driver_db.size(); i++){
        if(driver_db[i] == uuid){
            throw invalid_argument("User with the UUID already exist.");
        }
        if(driver_db[i] > uuid){
            Driver new_driver(firstname, lastname, uuid, dln, status);
            driver_db.insert(driver_db.begin() + i, new_driver);
            return;
        }
    };
    Driver new_driver(firstname, lastname, uuid, dln, status);
    driver_db.push_back(new_driver);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1b8, %rsp            # imm = 0x1B8
movl %r9d, -0x2c(%rbp)
movq %r8, -0x40(%rbp)
movq %rcx, %r15
movq %rdx, -0x50(%rbp)
movq %rsi, -0x48(%rbp)
movq 0x20(%rdi), %rax
subq 0x18(%rdi), %rax
movl $0x88, %ecx
cqto
idivq %rcx
movslq 0x84(%rdi), %rcx
incq %rcx
cmpq %rcx, %rax
je 0x10097
movq %rdi, %rsi
leaq 0x18(%rdi), %rax
movq %rax, -0x38(%rbp)
pushq $-0x1
popq %rbx
xorl %r13d, %r13d
movl $0x88, %r12d
movq %rdi, -0x58(%rbp)
movq 0x18(%rsi), %rdi
movq 0x20(%rsi), %rax
subq %rdi, %rax
cqto
idivq %r12
incq %rbx
cmpq %rbx, %rax
jbe 0xffa7
addq %r13, %rdi
movq %r15, %rsi
callq 0xc530
testb %al, %al
jne 0x10067
movl $0x88, %r12d
leaq (%r12,%r13), %r14
movq -0x38(%rbp), %rax
addq (%rax), %r13
movq %r13, %rdi
movq %r15, %rsi
callq 0xc522
movq %r14, %r13
testb %al, %al
movq -0x58(%rbp), %rsi
je 0xfe93
leaq -0x158(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0x4360
leaq -0x138(%rbp), %rdi
movq -0x50(%rbp), %rsi
callq 0x4360
leaq -0x118(%rbp), %rdi
movq %r15, %rsi
callq 0x4360
leaq -0xf8(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x4360
leaq -0x1e0(%rbp), %rdi
leaq -0x158(%rbp), %rsi
leaq -0x138(%rbp), %rdx
leaq -0x118(%rbp), %rcx
leaq -0xf8(%rbp), %r8
movl -0x2c(%rbp), %r9d
callq 0xc5c8
leaq -0xf8(%rbp), %rdi
callq 0x4170
leaq -0x118(%rbp), %rdi
callq 0x4170
leaq -0x138(%rbp), %rdi
callq 0x4170
leaq -0x158(%rbp), %rdi
callq 0x4170
movq -0x38(%rbp), %rdi
movq (%rdi), %rax
leaq (%rax,%r14), %rsi
addq $-0x88, %rsi
leaq -0x1e0(%rbp), %rdx
callq 0x11fba
jmp 0x10049
leaq -0xd8(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0x4360
leaq -0xb8(%rbp), %rdi
movq -0x50(%rbp), %rsi
callq 0x4360
leaq -0x98(%rbp), %rdi
movq %r15, %rsi
callq 0x4360
leaq -0x78(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x4360
leaq -0x1e0(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
leaq -0xb8(%rbp), %rdx
leaq -0x98(%rbp), %rcx
leaq -0x78(%rbp), %r8
movl -0x2c(%rbp), %r9d
callq 0xc5c8
leaq -0x78(%rbp), %rdi
callq 0x4170
leaq -0x98(%rbp), %rdi
callq 0x4170
leaq -0xb8(%rbp), %rdi
callq 0x4170
leaq -0xd8(%rbp), %rdi
callq 0x4170
leaq -0x1e0(%rbp), %rsi
movq -0x38(%rbp), %rdi
callq 0x11f38
leaq -0x1e0(%rbp), %rdi
callq 0x11f18
addq $0x1b8, %rsp            # imm = 0x1B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x4190
movq %rax, %r14
leaq 0x5980(%rip), %rsi      # 0x159f9
movq %rax, %rdi
callq 0x4470
movq 0xdf30(%rip), %rsi      # 0x1dfb8
movq 0xdf09(%rip), %rdx      # 0x1df98
movq %r14, %rdi
callq 0x4410
pushq $0x10
popq %rdi
callq 0x4190
movq %rax, %r14
leaq 0x59e4(%rip), %rsi      # 0x15a8d
movq %rax, %rdi
callq 0x4420
movq 0xdee8(%rip), %rsi      # 0x1dfa0
movq 0xdea1(%rip), %rdx      # 0x1df60
jmp 0x1008f
jmp 0x10104
movq %rax, %rbx
leaq -0xf8(%rbp), %rdi
callq 0x4170
jmp 0x100d7
movq %rax, %rbx
leaq -0x118(%rbp), %rdi
callq 0x4170
jmp 0x100e8
movq %rax, %rbx
leaq -0x138(%rbp), %rdi
callq 0x4170
jmp 0x100f9
movq %rax, %rbx
leaq -0x158(%rbp), %rdi
jmp 0x1014f
jmp 0x10156
movq %rax, %rbx
leaq -0x1e0(%rbp), %rdi
callq 0x11f18
jmp 0x10161
movq %rax, %rbx
leaq -0x78(%rbp), %rdi
callq 0x4170
jmp 0x10126
movq %rax, %rbx
leaq -0x98(%rbp), %rdi
callq 0x4170
jmp 0x10137
movq %rax, %rbx
leaq -0xb8(%rbp), %rdi
callq 0x4170
jmp 0x10148
movq %rax, %rbx
leaq -0xd8(%rbp), %rdi
callq 0x4170
jmp 0x10161
movq %rax, %rbx
movq %r14, %rdi
callq 0x4220
movq %rbx, %rdi
callq 0x4450
nop