// File: /workspace/github_cpp_makefile_star2_O1/alfanick[P]rest-cpp/src/rest/router.cpp
// Function: REST::Router::find(REST::Request&, int)
Service* Router::find(Request &request, int worker_id) {
    const std::string &path = request.path;

    for (const auto &route : instance()->routes) {
      std::smatch matches;
      std::regex_match(path, matches, std::get<0>(route).first);

      if (!matches.empty()) {
        const auto &params = std::get<0>(route).second;

        for (size_t i = 1; i < matches.size(); i++) {
          request.parameters[params[i-1]] = matches[i];
          request.parameters[std::to_string(i)] = matches[i];
        }

        return std::get<2>(route)[worker_id];
      }
    }

    return nullptr;
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movl %esi, %ebp
movq %rdi, 0x28(%rsp)
movq 0x2580d(%rip), %rax     # 0x4dfa0
movb (%rax), %al
testb %al, %al
je 0x28aa7
movq 0x25824(%rip), %rax     # 0x4dfc8
movq (%rax), %rcx
movq 0x8(%rax), %rdx
movq %rdx, 0x78(%rsp)
cmpq %rdx, %rcx
je 0x28a90
leaq 0x18(%rsp), %r15
movq 0x28(%rsp), %rax
leaq 0x58(%rax), %r14
movq %rcx, %rax
movslq %ebp, %rcx
movq %rcx, 0x70(%rsp)
leaq 0x8(%rsp), %r12
movabsq $0x346dc5d63886594b, %r13 # imm = 0x346DC5D63886594B
vxorps %xmm0, %xmm0, %xmm0
vmovups %ymm0, 0x30(%rsp)
movq %rax, (%rsp)
leaq 0x38(%rax), %rcx
movq 0x28(%rsp), %rax
movq 0x8(%rax), %rdi
movq 0x10(%rax), %rsi
addq %rdi, %rsi
leaq 0x30(%rsp), %rdx
xorl %r8d, %r8d
vzeroupper
callq 0x22fd0
movq 0x38(%rsp), %rcx
subq 0x30(%rsp), %rcx
sarq $0x3, %rcx
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %rcx
movq %rcx, 0x80(%rsp)
cmpq $0x4, %rcx
jb 0x28a63
movl $0x1, %ebp
movq 0x30(%rsp), %rcx
movq 0x38(%rsp), %rax
cmpq %rax, %rcx
je 0x28873
movq %rax, %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
movabsq $-0x5555555555555555, %rsi # imm = 0xAAAAAAAAAAAAAAAB
imulq %rsi, %rdx
addq $-0x3, %rdx
jmp 0x28875
xorl %edx, %edx
cmpq %rdx, %rbp
jae 0x28a53
cmpq %rax, %rcx
je 0x288a1
movq %rax, %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
movabsq $-0x5555555555555555, %rsi # imm = 0xAAAAAAAAAAAAAAAB
imulq %rsi, %rdx
addq $-0x3, %rdx
jmp 0x288a3
xorl %edx, %edx
addq $-0x48, %rax
cmpq %rbp, %rdx
leaq (%rbp,%rbp,2), %rbx
leaq (%rcx,%rbx,8), %rcx
cmovbeq %rax, %rcx
cmpb $0x1, 0x10(%rcx)
jne 0x288d7
movq (%rcx), %rsi
movq 0x8(%rcx), %rdx
movq %r15, 0x8(%rsp)
movq %r12, %rdi
callq 0x226d0
movq (%rsp), %rax
jmp 0x288ee
movq %r15, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movb $0x0, 0x18(%rsp)
movq (%rsp), %rax
movq 0x58(%rax), %rax
movq %rbp, %rcx
shlq $0x5, %rcx
leaq -0x20(%rax,%rcx), %rsi
movq %r14, %rdi
callq 0x210b0
movq %rax, %rdi
movq %r12, %rsi
callq 0x22620
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x28920
callq 0x22130
movq 0x30(%rsp), %rcx
movq 0x38(%rsp), %rax
cmpq %rax, %rcx
je 0x2894d
movq %rax, %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
movabsq $-0x5555555555555555, %rsi # imm = 0xAAAAAAAAAAAAAAAB
imulq %rsi, %rdx
addq $-0x3, %rdx
jmp 0x2894f
xorl %edx, %edx
addq $-0x48, %rax
cmpq %rbp, %rdx
leaq (%rcx,%rbx,8), %rcx
cmovbeq %rax, %rcx
cmpb $0x1, 0x10(%rcx)
jne 0x28984
movq (%rcx), %rsi
movq 0x8(%rcx), %rdx
movq %r15, 0x8(%rsp)
movq %r12, %rdi
callq 0x226d0
leaq 0x60(%rsp), %rbx
leaq 0x50(%rsp), %r12
jmp 0x289a1
movq %r15, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movb $0x0, 0x18(%rsp)
leaq 0x60(%rsp), %rbx
leaq 0x50(%rsp), %r12
movl $0x1, %eax
cmpq $0xa, %rbp
jb 0x289f0
movl $0x4, %eax
movq %rbp, %rdx
cmpq $0x63, %rdx
jbe 0x289e9
cmpq $0x3e7, %rdx            # imm = 0x3E7
jbe 0x289ee
cmpq $0x2710, %rdx           # imm = 0x2710
jb 0x289f0
mulxq %r13, %rcx, %rcx
shrq $0xb, %rcx
addl $0x4, %eax
cmpq $0x1869f, %rdx          # imm = 0x1869F
movq %rcx, %rdx
ja 0x289b4
addl $-0x3, %eax
jmp 0x289f0
addl $-0x2, %eax
jmp 0x289f0
decl %eax
movl %eax, %esi
movq %rbx, 0x50(%rsp)
movq %r12, %rdi
xorl %edx, %edx
callq 0x22520
movq 0x50(%rsp), %rdi
movl 0x58(%rsp), %esi
movq %rbp, %rdx
callq 0x22110
movq %r14, %rdi
movq %r12, %rsi
callq 0x23330
movq %rax, %rdi
leaq 0x8(%rsp), %r12
movq %r12, %rsi
callq 0x22620
movq 0x50(%rsp), %rdi
cmpq %rbx, %rdi
je 0x28a3c
callq 0x22130
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x28a4b
callq 0x22130
incq %rbp
jmp 0x28846
movq (%rsp), %rax
movq (%rax), %rax
movq 0x70(%rsp), %rcx
movq (%rax,%rcx,8), %rbp
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x28a72
callq 0x22130
cmpq $0x4, 0x80(%rsp)
jae 0x28a92
movq (%rsp), %rax
addq $0x70, %rax
cmpq 0x78(%rsp), %rax
jne 0x287e1
xorl %ebp, %ebp
movq %rbp, %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x254f2(%rip), %rdi     # 0x4dfa0
callq 0x231e0
testl %eax, %eax
je 0x2879d
movq 0x25506(%rip), %rdi     # 0x4dfc8
callq 0x231c0
movq 0x2518a(%rip), %rdi     # 0x4dc58
movq 0x254f3(%rip), %rsi     # 0x4dfc8
leaq 0x267c4(%rip), %rdx     # 0x4f2a0
callq 0x21fa0
movq 0x254b8(%rip), %rdi     # 0x4dfa0
callq 0x21b30
jmp 0x2879d
movq %rax, %rbx
movq 0x254a4(%rip), %rdi     # 0x4dfa0
callq 0x21ac0
jmp 0x28b46
jmp 0x28b07
jmp 0x28b07
movq %rax, %rbx
jmp 0x28b37
jmp 0x28b25
movq %rbx, %rcx
movq %rax, %rbx
movq 0x50(%rsp), %rdi
cmpq %rcx, %rdi
je 0x28b28
callq 0x22130
jmp 0x28b28
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x28b37
callq 0x22130
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x28b46
callq 0x22130
movq %rbx, %rdi
callq 0x23170