// File: /workspace/github_c_makefile_star2_O0/jondurbin[P]dre2/src/dre2_match.c
// Function: dre2_mn
struct dre2_match_value dre2_mn( struct dre2 *graph, unsigned char *input, int length, int *r_temp, int *reachable, int *state )
{
  int i;
  unsigned char *pch;
  struct dre2_single_match result;
  struct dre2_match_value ret_val;

  result.assertion_match = false;
  pch = input;
  while ( pch - input <= length && *pch != '\0' && !graph->starting_chars[*pch] )
    *pch++;
  while ( pch - input <= length && *pch != '\0' )
  {
    for ( i = 0; i < graph->starting_count; i++ )
    {
      result = dre2_matcher( graph, input, pch, graph->starting_points[i], DRE2_LEFT, length, r_temp, reachable, state );
      if ( result.match != NULL )
      {
        ret_val.start_pos = result.match - input;
        result = dre2_matcher( graph, input, pch, graph->starting_points[i], DRE2_RIGHT, length, r_temp, reachable, state );
        if ( result.match != NULL )
        {
          ret_val.matched = true;
          ret_val.end_pos = result.match - input + 1; 
          return ret_val;
        }
        if ( result.skip_to != DRE2_INFINITE )
          pch = input + result.skip_to;
      }
      if ( result.assertion_match )
        pch = input + length;
    }
    *pch++;
    while ( pch - input <= length && *pch != 0 && !graph->starting_chars[*pch] )
      *pch++;
  }
  ret_val.matched = false;
  return ret_val;
}

// Assembly:
pushq %rbx
subq $0xc0, %rsp
movq %rdi, 0xa8(%rsp)
movq %rsi, 0xa0(%rsp)
movl %edx, 0x9c(%rsp)
movq %rcx, 0x90(%rsp)
movq %r8, 0x88(%rsp)
movq %r9, 0x80(%rsp)
movl $0x0, 0x58(%rsp)
movq 0xa0(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0x70(%rsp), %rcx
movq 0xa0(%rsp), %rax
subq %rax, %rcx
movslq 0x9c(%rsp), %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
movb %al, 0x27(%rsp)
jg 0xaf66
movq 0x70(%rsp), %rax
movzbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, 0x27(%rsp)
je 0xaf66
movq 0xa8(%rsp), %rax
movq 0x418(%rax), %rax
movq 0x70(%rsp), %rcx
movzbl (%rcx), %ecx
cmpl $0x0, (%rax,%rcx,4)
setne %al
xorb $-0x1, %al
movb %al, 0x27(%rsp)
movb 0x27(%rsp), %al
testb $0x1, %al
jne 0xaf70
jmp 0xaf80
movq 0x70(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x70(%rsp)
jmp 0xaf0c
jmp 0xaf82
movq 0x70(%rsp), %rcx
movq 0xa0(%rsp), %rax
subq %rax, %rcx
movslq 0x9c(%rsp), %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
movb %al, 0x26(%rsp)
jg 0xafb7
movq 0x70(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x0, %eax
setne %al
movb %al, 0x26(%rsp)
movb 0x26(%rsp), %al
testb $0x1, %al
jne 0xafc4
jmp 0xb225
movl $0x0, 0x7c(%rsp)
movl 0x7c(%rsp), %eax
movq 0xa8(%rsp), %rcx
cmpl 0x438(%rcx), %eax
jge 0xb19e
movq 0xa8(%rsp), %rsi
movq 0xa0(%rsp), %rdx
movq 0x70(%rsp), %rcx
movq 0xa8(%rsp), %rax
movq 0x430(%rax), %rax
movslq 0x7c(%rsp), %rdi
movl (%rax,%rdi,4), %r8d
movl 0x9c(%rsp), %ebx
movq 0x90(%rsp), %r11
movq 0x88(%rsp), %r10
movq 0x80(%rsp), %rax
leaq 0x40(%rsp), %rdi
xorl %r9d, %r9d
movl %ebx, (%rsp)
movq %r11, 0x8(%rsp)
movq %r10, 0x10(%rsp)
movq %rax, 0x18(%rsp)
callq 0x2270
movq 0x40(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x68(%rsp)
cmpq $0x0, 0x68(%rsp)
je 0xb16d
movq 0x68(%rsp), %rax
movq 0xa0(%rsp), %rcx
subq %rcx, %rax
movl %eax, 0xb8(%rsp)
movq 0xa8(%rsp), %rsi
movq 0xa0(%rsp), %rdx
movq 0x70(%rsp), %rcx
movq 0xa8(%rsp), %rax
movq 0x430(%rax), %rax
movslq 0x7c(%rsp), %rdi
movl (%rax,%rdi,4), %r8d
movl 0x9c(%rsp), %ebx
movq 0x90(%rsp), %r11
movq 0x88(%rsp), %r10
movq 0x80(%rsp), %rax
leaq 0x28(%rsp), %rdi
movl $0x1, %r9d
movl %ebx, (%rsp)
movq %r11, 0x8(%rsp)
movq %r10, 0x10(%rsp)
movq %rax, 0x18(%rsp)
callq 0x2270
movq 0x28(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x68(%rsp)
cmpq $0x0, 0x68(%rsp)
je 0xb14f
movl $0x1, 0xb0(%rsp)
movq 0x68(%rsp), %rax
movq 0xa0(%rsp), %rcx
subq %rcx, %rax
addq $0x1, %rax
movl %eax, 0xbc(%rsp)
jmp 0xb230
cmpl $-0x1, 0x60(%rsp)
je 0xb16b
movq 0xa0(%rsp), %rax
movslq 0x60(%rsp), %rcx
addq %rcx, %rax
movq %rax, 0x70(%rsp)
jmp 0xb16d
cmpl $0x0, 0x58(%rsp)
je 0xb18c
movq 0xa0(%rsp), %rax
movslq 0x9c(%rsp), %rcx
addq %rcx, %rax
movq %rax, 0x70(%rsp)
jmp 0xb18e
movl 0x7c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x7c(%rsp)
jmp 0xafcc
movq 0x70(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x70(%rsp)
movq 0x70(%rsp), %rcx
movq 0xa0(%rsp), %rax
subq %rax, %rcx
movslq 0x9c(%rsp), %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
movb %al, 0x25(%rsp)
jg 0xb206
movq 0x70(%rsp), %rax
movzbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, 0x25(%rsp)
je 0xb206
movq 0xa8(%rsp), %rax
movq 0x418(%rax), %rax
movq 0x70(%rsp), %rcx
movzbl (%rcx), %ecx
cmpl $0x0, (%rax,%rcx,4)
setne %al
xorb $-0x1, %al
movb %al, 0x25(%rsp)
movb 0x25(%rsp), %al
testb $0x1, %al
jne 0xb210
jmp 0xb220
movq 0x70(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x70(%rsp)
jmp 0xb1ac
jmp 0xaf82
movl $0x0, 0xb0(%rsp)
movq 0xb0(%rsp), %rax
movq 0xb8(%rsp), %rdx
addq $0xc0, %rsp
popq %rbx
retq
nopl (%rax)