// File: Karunika[P]Taxi_Agency_OODB/./src/TaxiAgency.cpp
// Function: IndexInstance<Customer> search_by_uuid<Customer>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::vector<Customer, std::allocator<Customer>>&)
static IndexInstance<T> search_by_uuid(string uuid, vector<T>& users_list){
    int high = 2*(users_list.size()-1);
    int low = 0;
    int mid;
    if(users_list[users_list.size()-1] < uuid)
        throw invalid_argument("User with the provided uuid doesn't exist");
    // cout << rang::fg::red << uuid << rang::fg::reset << endl;
    // cout << rang::fg::red << users_list.size() << rang::fg::reset << endl;
    while(low <= high){
        mid = (high+low)/2;
        // cout << rang::fg::blue << low << rang::fg::reset << " - " << mid << " - " << rang::fg::blue << high << rang::fg::reset << endl;
        if(users_list[mid] == uuid){
            // cout << endl;
            return {mid, &users_list[mid]};
        }else if(users_list[mid] < uuid){
            low = mid + 1;
        }else if(users_list[mid] > uuid){
            high = mid - 1;
        }
    }
    throw invalid_argument("User with the provided uuid doesn't exist");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x48(%rbp)
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x29d90
subq $0x1, %rax
shlq %rax
movl %eax, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x20(%rbp), %rdi
callq 0x29d90
movq -0x50(%rbp), %rdi
movq %rax, %rsi
subq $0x1, %rsi
callq 0x29dc0
movq -0x48(%rbp), %rsi
movq %rax, %rdi
callq 0x1e820
testb $0x1, %al
jne 0x24b11
jmp 0x24b64
movl $0x10, %edi
callq 0x41a0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x58(%rbp)
leaq 0xd559(%rip), %rsi      # 0x32085
callq 0x4530
jmp 0x24b33
movq -0x58(%rbp), %rdi
movq 0x2148a(%rip), %rsi     # 0x45fc8
movq 0x21463(%rip), %rdx     # 0x45fa8
callq 0x44b0
movq -0x58(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
callq 0x4240
jmp 0x24c6f
jmp 0x24b66
movl -0x28(%rbp), %eax
cmpl -0x24(%rbp), %eax
jg 0x24c21
movl -0x24(%rbp), %eax
addl -0x28(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, -0x2c(%rbp)
movq -0x20(%rbp), %rdi
movslq -0x2c(%rbp), %rsi
callq 0x29dc0
movq -0x48(%rbp), %rsi
movq %rax, %rdi
callq 0x1e880
testb $0x1, %al
jne 0x24ba2
jmp 0x24bc6
movl -0x2c(%rbp), %eax
movl %eax, -0x10(%rbp)
movq -0x20(%rbp), %rdi
movslq -0x2c(%rbp), %rsi
callq 0x29dc0
movq %rax, -0x8(%rbp)
movl -0x10(%rbp), %eax
movq -0x8(%rbp), %rdx
addq $0x60, %rsp
popq %rbp
retq
movq -0x20(%rbp), %rdi
movslq -0x2c(%rbp), %rsi
callq 0x29dc0
movq -0x48(%rbp), %rsi
movq %rax, %rdi
callq 0x1e820
testb $0x1, %al
jne 0x24be5
jmp 0x24bf0
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x24c1a
movq -0x20(%rbp), %rdi
movslq -0x2c(%rbp), %rsi
callq 0x29dc0
movq -0x48(%rbp), %rsi
movq %rax, %rdi
callq 0x1e850
testb $0x1, %al
jne 0x24c0f
jmp 0x24c18
movl -0x2c(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x24c1a
jmp 0x24c1c
jmp 0x24b66
movl $0x10, %edi
callq 0x41a0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x60(%rbp)
leaq 0xd449(%rip), %rsi      # 0x32085
callq 0x4530
jmp 0x24c43
movq -0x60(%rbp), %rdi
movq 0x2137a(%rip), %rsi     # 0x45fc8
movq 0x21353(%rip), %rdx     # 0x45fa8
callq 0x44b0
movq -0x60(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
callq 0x4240
movq -0x38(%rbp), %rdi
callq 0x44f0
nopl (%rax,%rax)