// File: /workspace/github_cpp_makefile_star2_O2/attractivechaos[P]udb2/stb/./stb.h
// Function: stb_regex
int stb_regex(char *regex, char *str)
{
   static stb_perfect p;
   static stb_matcher ** matchers;
   static char        ** regexps;
   static char        ** regexp_cache;
   static unsigned short *mapping;
   int z = stb_perfect_hash(&p, (int) regex);
   if (z >= 0) {
      if (strcmp(regex, regexp_cache[(int) mapping[z]])) {
         int i = mapping[z];
         stb_matcher_free(matchers[i]);
         free(regexp_cache[i]);
         regexps[i] = regex;
         regexp_cache[i] = strdup(regex);
         matchers[i] = stb_regex_matcher(regex);
      }
   } else {
      int i,n;
      if (regex == NULL) {
         for (i=0; i < stb_arr_len(matchers); ++i) {
            stb_matcher_free(matchers[i]);
            free(regexp_cache[i]);
         }
         stb_arr_free(matchers);
         stb_arr_free(regexps);
         stb_arr_free(regexp_cache);
         stb_perfect_destroy(&p);
         free(mapping); mapping = NULL;
         return -1;
      }
      stb_arr_push(regexps, regex);
      stb_arr_push(regexp_cache, strdup(regex));
      stb_arr_push(matchers, stb_regex_matcher(regex));
      stb_perfect_destroy(&p);
      n = stb_perfect_create(&p, (unsigned int *) (char **) regexps, stb_arr_len(regexps));
      mapping = (unsigned short *) realloc(mapping, n * sizeof(*mapping));
      for (i=0; i < stb_arr_len(regexps); ++i)
         mapping[stb_perfect_hash(&p, (int) regexps[i])] = i;
      z = stb_perfect_hash(&p, (int) regex);
   }
   return stb_matcher_find(matchers[(int) mapping[z]], str);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x10dab(%rip), %rdi     # 0x1ddd8
movl %r14d, %esi
callq 0x550e
testl %eax, %eax
js 0xd0c9
movl %eax, %ebp
movq 0x10dda(%rip), %rax     # 0x1de20
movq 0x10ddb(%rip), %r15     # 0x1de28
movl %ebp, %ecx
movzwl (%r15,%rcx,2), %r12d
movq (%rax,%r12,8), %rsi
movq %r14, %rdi
callq 0x21e0
testl %eax, %eax
je 0xd2c1
movq 0x10da1(%rip), %rax     # 0x1de10
shll $0x3, %r12d
movq (%rax,%r12), %rdi
callq 0x4992
movq 0x10d9d(%rip), %rax     # 0x1de20
movq (%rax,%r12), %rdi
callq 0x23c0
movq 0x10d85(%rip), %rax     # 0x1de18
movq %r14, (%rax,%r12)
movq %r14, %rdi
callq 0x2380
movq 0x10d7a(%rip), %rcx     # 0x1de20
movq %rax, (%rcx,%r12)
movq %r14, %rdi
callq 0xc005
movq 0x10d57(%rip), %rcx     # 0x1de10
movq %rax, (%rcx,%r12)
movq 0x10d64(%rip), %r15     # 0x1de28
jmp 0xd2c1
testq %r14, %r14
je 0xd1c3
movq 0x10d3f(%rip), %rax     # 0x1de18
testq %rax, %rax
je 0xd0ed
movl -0x10(%rax), %ecx
cmpl -0xc(%rax), %ecx
jge 0xd0ed
incl %ecx
movl %ecx, -0x10(%rax)
jmp 0xd106
leaq 0x10d24(%rip), %rdi     # 0x1de18
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
callq 0x521e
movq 0x10d12(%rip), %rax     # 0x1de18
movslq -0x10(%rax), %rcx
movq %r14, -0x8(%rax,%rcx,8)
movq %r14, %rdi
callq 0x2380
movq %rax, %r15
movq 0x10cff(%rip), %rax     # 0x1de20
testq %rax, %rax
je 0xd135
movl -0x10(%rax), %ecx
cmpl -0xc(%rax), %ecx
jge 0xd135
incl %ecx
movl %ecx, -0x10(%rax)
jmp 0xd14e
leaq 0x10ce4(%rip), %rdi     # 0x1de20
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
callq 0x521e
movq 0x10cd2(%rip), %rax     # 0x1de20
movslq -0x10(%rax), %rcx
movq %r15, -0x8(%rax,%rcx,8)
movq %r14, %rdi
callq 0xc005
movq %rax, %r15
movq 0x10ca7(%rip), %rax     # 0x1de10
testq %rax, %rax
je 0xd17d
movl -0x10(%rax), %ecx
cmpl -0xc(%rax), %ecx
jge 0xd17d
incl %ecx
movl %ecx, -0x10(%rax)
jmp 0xd196
leaq 0x10c8c(%rip), %rdi     # 0x1de10
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
callq 0x521e
movq 0x10c7a(%rip), %rax     # 0x1de10
movslq -0x10(%rax), %rcx
movq %r15, -0x8(%rax,%rcx,8)
leaq 0x10c32(%rip), %rdi     # 0x1ddd8
callq 0x5c5e
movq 0x10c66(%rip), %rsi     # 0x1de18
testq %rsi, %rsi
je 0xd249
movl -0x10(%rsi), %edx
jmp 0xd24b
pushq $-0x1
popq %rbp
xorl %r15d, %r15d
movq 0x10c40(%rip), %rax     # 0x1de10
testq %rax, %rax
je 0xd1db
movslq -0x10(%rax), %rcx
jmp 0xd1dd
xorl %ecx, %ecx
cmpq %rcx, %r15
jge 0xd200
movq (%rax,%r15,8), %rdi
callq 0x4992
movq 0x10c2e(%rip), %rax     # 0x1de20
movq (%rax,%r15,8), %rdi
callq 0x23c0
incq %r15
jmp 0xd1c9
leaq 0x10c09(%rip), %rdi     # 0x1de10
callq 0x510d
leaq 0x10c05(%rip), %rdi     # 0x1de18
callq 0x510d
leaq 0x10c01(%rip), %rdi     # 0x1de20
callq 0x510d
leaq 0x10bad(%rip), %rdi     # 0x1ddd8
callq 0x5c5e
movq 0x10bf1(%rip), %rdi     # 0x1de28
callq 0x23c0
andq $0x0, 0x10be4(%rip)     # 0x1de28
xorl %r15d, %r15d
jmp 0xd2bc
xorl %edx, %edx
leaq 0x10b86(%rip), %r12     # 0x1ddd8
movq %r12, %rdi
callq 0x555e
movq 0x10bc7(%rip), %rdi     # 0x1de28
movslq %eax, %rsi
addq %rsi, %rsi
callq 0x22b0
movq %rax, %r15
movq %rax, 0x10bb2(%rip)     # 0x1de28
xorl %r13d, %r13d
movq 0x10b98(%rip), %rbp     # 0x1de18
testq %rbp, %rbp
je 0xd28b
movslq -0x10(%rbp), %rax
jmp 0xd28d
xorl %eax, %eax
cmpq %rax, %r13
jge 0xd2ab
movl (%rbp,%r13,8), %esi
movq %r12, %rdi
callq 0x550e
cltq
movw %r13w, (%r15,%rax,2)
incq %r13
jmp 0xd280
leaq 0x10b26(%rip), %rdi     # 0x1ddd8
movl %r14d, %esi
callq 0x550e
movl %eax, %ebp
testq %r14, %r14
je 0xd2ea
movq 0x10b48(%rip), %rax     # 0x1de10
movslq %ebp, %rcx
movzwl (%r15,%rcx,2), %ecx
movq (%rax,%rcx,8), %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xca0c
pushq $-0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq