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

  result.assertion_match = false;
  c = graph->c;
  pch = memchr( input + graph->initial_skip, c, length );
  while ( pch != NULL && pch - input <= length && *pch != '\0' )
  {
    if ( graph->starting_point == 0 )
    {
      result = dre2_matcher( graph, input, pch, graph->starting_point, DRE2_RIGHT, length, r_temp, reachable, state );
      if ( result.match != NULL )
      {
        ret_val.matched = true;
        ret_val.start_pos = pch - input;
        ret_val.end_pos = result.match - input + 1;
        return ret_val;
      }
      if ( result.skip_to != DRE2_INFINITE )
        pch = input + result.skip_to;
    } else
    {
      result = dre2_matcher( graph, input, pch, graph->starting_point, 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_point, 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 = memchr( pch + 1, c, length - ( pch - input ) );
  }
  ret_val.matched = false;
  return ret_val;
}

// Assembly:
pushq %rbx
subq $0xe0, %rsp
movq %rdi, 0xc8(%rsp)
movq %rsi, 0xc0(%rsp)
movl %edx, 0xbc(%rsp)
movq %rcx, 0xb0(%rsp)
movq %r8, 0xa8(%rsp)
movq %r9, 0xa0(%rsp)
movl $0x0, 0x78(%rsp)
movq 0xc8(%rsp), %rax
movb 0x428(%rax), %al
movb %al, 0x9f(%rsp)
movq 0xc0(%rsp), %rdi
movq 0xc8(%rsp), %rax
movslq 0x864(%rax), %rax
addq %rax, %rdi
movzbl 0x9f(%rsp), %esi
movslq 0xbc(%rsp), %rdx
callq 0x21b0
movq %rax, 0x90(%rsp)
xorl %eax, %eax
cmpq $0x0, 0x90(%rsp)
movb %al, 0x2f(%rsp)
je 0xa347
movq 0x90(%rsp), %rcx
movq 0xc0(%rsp), %rax
subq %rax, %rcx
movslq 0xbc(%rsp), %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
movb %al, 0x2f(%rsp)
jg 0xa347
movq 0x90(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x0, %eax
setne %al
movb %al, 0x2f(%rsp)
movb 0x2f(%rsp), %al
testb $0x1, %al
jne 0xa354
jmp 0xa678
movq 0xc8(%rsp), %rax
cmpl $0x0, 0x410(%rax)
jne 0xa472
movq 0xc8(%rsp), %rsi
movq 0xc0(%rsp), %rdx
movq 0x90(%rsp), %rcx
movq 0xc8(%rsp), %rax
movl 0x410(%rax), %r8d
movl 0xbc(%rsp), %ebx
movq 0xb0(%rsp), %r11
movq 0xa8(%rsp), %r10
movq 0xa0(%rsp), %rax
leaq 0x60(%rsp), %rdi
movl $0x1, %r9d
movl %ebx, (%rsp)
movq %r11, 0x8(%rsp)
movq %r10, 0x10(%rsp)
movq %rax, 0x18(%rsp)
callq 0x2270
movq 0x60(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0x80(%rsp)
movq 0x70(%rsp), %rax
movq %rax, 0x88(%rsp)
cmpq $0x0, 0x88(%rsp)
je 0xa448
movl $0x1, 0xd0(%rsp)
movq 0x90(%rsp), %rax
movq 0xc0(%rsp), %rcx
subq %rcx, %rax
movl %eax, 0xd8(%rsp)
movq 0x88(%rsp), %rax
movq 0xc0(%rsp), %rcx
subq %rcx, %rax
addq $0x1, %rax
movl %eax, 0xdc(%rsp)
jmp 0xa683
cmpl $-0x1, 0x80(%rsp)
je 0xa46d
movq 0xc0(%rsp), %rax
movslq 0x80(%rsp), %rcx
addq %rcx, %rax
movq %rax, 0x90(%rsp)
jmp 0xa634
movq 0xc8(%rsp), %rsi
movq 0xc0(%rsp), %rdx
movq 0x90(%rsp), %rcx
movq 0xc8(%rsp), %rax
movl 0x410(%rax), %r8d
movl 0xbc(%rsp), %ebx
movq 0xb0(%rsp), %r11
movq 0xa8(%rsp), %r10
movq 0xa0(%rsp), %rax
leaq 0x48(%rsp), %rdi
xorl %r9d, %r9d
movl %ebx, (%rsp)
movq %r11, 0x8(%rsp)
movq %r10, 0x10(%rsp)
movq %rax, 0x18(%rsp)
callq 0x2270
movq 0x48(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x80(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x88(%rsp)
cmpq $0x0, 0x88(%rsp)
je 0xa610
movq 0x88(%rsp), %rax
movq 0xc0(%rsp), %rcx
subq %rcx, %rax
movl %eax, 0xd8(%rsp)
movq 0xc8(%rsp), %rsi
movq 0xc0(%rsp), %rdx
movq 0x90(%rsp), %rcx
movq 0xc8(%rsp), %rax
movl 0x410(%rax), %r8d
movl 0xbc(%rsp), %ebx
movq 0xb0(%rsp), %r11
movq 0xa8(%rsp), %r10
movq 0xa0(%rsp), %rax
leaq 0x30(%rsp), %rdi
movl $0x1, %r9d
movl %ebx, (%rsp)
movq %r11, 0x8(%rsp)
movq %r10, 0x10(%rsp)
movq %rax, 0x18(%rsp)
callq 0x2270
movq 0x30(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x80(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x88(%rsp)
cmpq $0x0, 0x88(%rsp)
je 0xa5e9
movl $0x1, 0xd0(%rsp)
movq 0x88(%rsp), %rax
movq 0xc0(%rsp), %rcx
subq %rcx, %rax
addq $0x1, %rax
movl %eax, 0xdc(%rsp)
jmp 0xa683
cmpl $-0x1, 0x80(%rsp)
je 0xa60e
movq 0xc0(%rsp), %rax
movslq 0x80(%rsp), %rcx
addq %rcx, %rax
movq %rax, 0x90(%rsp)
jmp 0xa610
cmpl $0x0, 0x78(%rsp)
je 0xa632
movq 0xc0(%rsp), %rax
movslq 0xbc(%rsp), %rcx
addq %rcx, %rax
movq %rax, 0x90(%rsp)
jmp 0xa634
movq 0x90(%rsp), %rdi
addq $0x1, %rdi
movzbl 0x9f(%rsp), %esi
movslq 0xbc(%rsp), %rdx
movq 0x90(%rsp), %rax
movq 0xc0(%rsp), %rcx
subq %rcx, %rax
subq %rax, %rdx
callq 0x21b0
movq %rax, 0x90(%rsp)
jmp 0xa2fb
movl $0x0, 0xd0(%rsp)
movq 0xd0(%rsp), %rax
movq 0xd8(%rsp), %rdx
addq $0xe0, %rsp
popq %rbx
retq
nopl (%rax)