// File: /workspace/github_c_makefile_star2_O3/jflatow[P]jfdb/src/trie.c
// Function: JFT_cursor_find
JFT_Symbol JFT_cursor_find(JFT_Cursor *cursor, const JFT_Stem *stem) {
  if (stem->pre && stem->size)
    if (JFT_cursor_init(cursor, In, JFT_child(cursor->node, stem->pre, 0)) == JFT_SYMBOL_NIL)
      return cursor->symbol;
  JFT_KeySize size = stem->pre && stem->size ? stem->size - 1 : stem->size;
  for (JFT_KeySize i = 0; i < size; i++) {
    if (cursor->symbol == JFT_SYMBOL_NIL)
      return cursor->symbol;
    if (++cursor->point >= cursor->stem.size)
      switch (JFT_node_type(cursor->node)) {
        case Leaf:
          return cursor->symbol = JFT_SYMBOL_ANY;
        default:
          JFT_cursor_init(cursor, In, JFT_child(cursor->node, stem->data[i], 0));
      }
    if ((cursor->symbol = JFT_cursor_symbol_at_point(cursor)) != stem->data[i])
      return cursor->symbol = JFT_SYMBOL_NIL;
  }
  return cursor->symbol;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rax
testq %rax, %rax
je 0x3c25
cmpw $0x0, 0x8(%r14)
je 0x3c25
movq 0x8(%rbx), %rdx
movq (%rdx), %rcx
movq %rcx, %rsi
shrq $0x3e, %rsi
leaq 0x286f(%rip), %rdi      # 0x63a0
movslq (%rdi,%rsi,4), %rsi
addq %rdi, %rsi
jmpq *%rsi
cmpq $-0x2, %rax
je 0x3bf8
movq %rcx, %rsi
shrq $0x28, %rsi
movzbl %sil, %edi
shll $0x4, %edi
leaq 0x2887(%rip), %r8       # 0x63e0
movq (%rdi,%r8), %rsi
cmpq %rax, %rsi
ja 0x3bf8
cmpq %rax, 0x8(%rdi,%r8)
jb 0x3bf8
shrq $0x30, %rcx
andl $0xfff, %ecx            # imm = 0xFFF
addq %rdx, %rcx
leaq (%rcx,%rax,8), %rax
shlq $0x3, %rsi
subq %rsi, %rax
addq $0x8, %rax
movq (%rax), %rax
testq %rax, %rax
je 0x3bf8
addq %rax, %rdx
jmp 0x3bfa
cmpq $-0x2, %rax
je 0x3bf8
movq %rcx, %rsi
shrq $0x28, %rsi
movzbl %sil, %esi
testq %rsi, %rsi
je 0x3bf8
shrq $0x30, %rcx
andl $0xfff, %ecx            # imm = 0xFFF
leaq (%rdx,%rcx), %r8
leaq (%rdx,%rcx), %rdi
addq $0x8, %rdi
leaq (%rsi,%r8), %rcx
addq $0x8, %rcx
xorl %r8d, %r8d
leaq (%r8,%rsi), %r9
shrq %r9
movzbl (%rdi,%r9), %r10d
cmpq %r10, %rax
jbe 0x3bea
incq %r9
movq %r9, %r8
jmp 0x3bf3
jae 0x3dc3
movq %r9, %rsi
cmpq %rsi, %r8
jb 0x3bd1
xorl %edx, %edx
movq %rbx, %rdi
movl $0x1, %esi
callq 0x35c4
cmpq $-0x2, %rax
je 0x3d8e
cmpq $0x0, (%r14)
je 0x3c25
movzwl 0x8(%r14), %ebp
testw %bp, %bp
je 0x3c25
decl %ebp
jmp 0x3c2a
movzwl 0x8(%r14), %ebp
testw %bp, %bp
je 0x3d8e
movq 0x30(%rbx), %rax
xorl %r15d, %r15d
leaq 0x279f(%rip), %r12      # 0x63e0
cmpq $-0x2, %rax
je 0x3d9c
movq 0x28(%rbx), %rcx
incq %rcx
movq %rcx, 0x28(%rbx)
movzwl 0x18(%rbx), %eax
movzwl %r15w, %r13d
cmpq %rax, %rcx
jl 0x3d46
movq 0x8(%rbx), %rdx
movq (%rdx), %rcx
movq %rcx, %rdi
shrq $0x3e, %rdi
cmpq $0x3, %rdi
je 0x3db2
movq 0x10(%r14), %rax
movzbl (%rax,%r13), %eax
movq %rcx, %rsi
shrq $0x28, %rsi
cmpq $0x2, %rdi
je 0x3cf3
cmpl $0x1, %edi
jne 0x3cf3
movzbl %sil, %esi
testq %rsi, %rsi
je 0x3d33
shrq $0x30, %rcx
andl $0xfff, %ecx            # imm = 0xFFF
leaq (%rdx,%rcx), %r8
leaq (%rdx,%rcx), %rdi
addq $0x8, %rdi
leaq (%rsi,%r8), %rcx
addq $0x8, %rcx
xorl %r8d, %r8d
leaq (%r8,%rsi), %r9
shrq %r9
movb (%rdi,%r9), %r10b
cmpb %al, %r10b
jae 0x3ce0
incq %r9
movq %r9, %r8
jmp 0x3cec
cmpb %al, %r10b
jbe 0x3d88
movq %r9, %rsi
cmpq %rsi, %r8
jb 0x3cc8
jmp 0x3d33
movzbl %sil, %edi
shll $0x4, %edi
movq (%rdi,%r12), %rsi
cmpq %rax, %rsi
ja 0x3d33
cmpq %rax, 0x8(%rdi,%r12)
jb 0x3d33
shrq $0x30, %rcx
andl $0xfff, %ecx            # imm = 0xFFF
addq %rdx, %rcx
leaq (%rcx,%rax,8), %rax
shlq $0x3, %rsi
subq %rsi, %rax
addq $0x8, %rax
movq (%rax), %rax
testq %rax, %rax
je 0x3d33
addq %rax, %rdx
jmp 0x3d35
xorl %edx, %edx
movq %rbx, %rdi
movl $0x1, %esi
callq 0x35c4
movq 0x28(%rbx), %rcx
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0x3d60
testq %rcx, %rcx
je 0x3d67
movq 0x20(%rbx), %rax
addq %rax, %rcx
decq %rcx
jmp 0x3d64
addq 0x20(%rbx), %rcx
movzbl (%rcx), %eax
movq %rax, 0x30(%rbx)
movq 0x10(%r14), %rcx
movzbl (%rcx,%r13), %ecx
cmpq %rcx, %rax
jne 0x3d94
incl %r15d
cmpw %bp, %r15w
jne 0x3c41
jmp 0x3da3
leaq (%rcx,%r9,8), %rax
jmp 0x3d26
movq 0x30(%rbx), %rax
jmp 0x3da3
movq $-0x2, 0x30(%rbx)
movq $-0x2, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq $-0x1, 0x30(%rbx)
movq $-0x1, %rax
jmp 0x3da3
leaq (%rcx,%r9,8), %rax
jmp 0x3b8d