// File: zakimjz[P]SLEUTH/treeminer.cpp
// Function: lexsmaller(std::vector<int, std::allocator<int>>&, std::vector<int, std::allocator<int>>&)
bool lexsmaller(vector<int> &subtree, vector<int> &cand)
{
   int i,j;

   for (i=0, j=0; i < subtree.size() && j < cand.size();){

      if (subtree[i] > cand[j]){
         if (cand[j] != BranchIt) return false;
         else{
            while (cand[j] == BranchIt) j++;
            if (subtree[i] > cand[j]) return false;
            else if (subtree[i] < cand[j]) return true;
            else return false;
         }
         
      }
      else if (subtree[i] < cand[j]){
         if (subtree[i] != BranchIt) return true;
         else{
            while(subtree[i] == BranchIt) i++;
            if (subtree[i] > cand[j]) return false;
            else if (subtree[i] < cand[j]) return true;
            else return true;
         }
      }
      else{
         i++;
         j++;
      }
   }
   return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
movslq -0x1c(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
callq 0x4b80
movq -0x30(%rbp), %rcx
movq %rax, %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
movb %al, -0x21(%rbp)
jae 0xa801
movslq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rdi
callq 0x4b80
movq %rax, %rcx
movq -0x38(%rbp), %rax
cmpq %rcx, %rax
setb %al
movb %al, -0x21(%rbp)
movb -0x21(%rbp), %al
testb $0x1, %al
jne 0xa80d
jmp 0xa9e1
movq -0x10(%rbp), %rdi
movslq -0x1c(%rbp), %rsi
callq 0x6520
movl (%rax), %eax
movl %eax, -0x3c(%rbp)
movq -0x18(%rbp), %rdi
movslq -0x20(%rbp), %rsi
callq 0x6520
movq %rax, %rcx
movl -0x3c(%rbp), %eax
cmpl (%rcx), %eax
jle 0xa8ef
movq -0x18(%rbp), %rdi
movslq -0x20(%rbp), %rsi
callq 0x6520
movslq (%rax), %rax
cmpq 0x1396f(%rip), %rax     # 0x1e1c0
je 0xa85c
movb $0x0, -0x1(%rbp)
jmp 0xa9e5
jmp 0xa85e
movq -0x18(%rbp), %rdi
movslq -0x20(%rbp), %rsi
callq 0x6520
movslq (%rax), %rax
cmpq 0x1394b(%rip), %rax     # 0x1e1c0
jne 0xa882
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0xa85e
movq -0x10(%rbp), %rdi
movslq -0x1c(%rbp), %rsi
callq 0x6520
movl (%rax), %eax
movl %eax, -0x40(%rbp)
movq -0x18(%rbp), %rdi
movslq -0x20(%rbp), %rsi
callq 0x6520
movq %rax, %rcx
movl -0x40(%rbp), %eax
cmpl (%rcx), %eax
jle 0xa8b4
movb $0x0, -0x1(%rbp)
jmp 0xa9e5
movq -0x10(%rbp), %rdi
movslq -0x1c(%rbp), %rsi
callq 0x6520
movl (%rax), %eax
movl %eax, -0x44(%rbp)
movq -0x18(%rbp), %rdi
movslq -0x20(%rbp), %rsi
callq 0x6520
movq %rax, %rcx
movl -0x44(%rbp), %eax
cmpl (%rcx), %eax
jge 0xa8e6
movb $0x1, -0x1(%rbp)
jmp 0xa9e5
movb $0x0, -0x1(%rbp)
jmp 0xa9e5
movq -0x10(%rbp), %rdi
movslq -0x1c(%rbp), %rsi
callq 0x6520
movl (%rax), %eax
movl %eax, -0x48(%rbp)
movq -0x18(%rbp), %rdi
movslq -0x20(%rbp), %rsi
callq 0x6520
movq %rax, %rcx
movl -0x48(%rbp), %eax
cmpl (%rcx), %eax
jge 0xa9c8
movq -0x10(%rbp), %rdi
movslq -0x1c(%rbp), %rsi
callq 0x6520
movslq (%rax), %rax
cmpq 0x1388d(%rip), %rax     # 0x1e1c0
je 0xa93e
movb $0x1, -0x1(%rbp)
jmp 0xa9e5
jmp 0xa940
movq -0x10(%rbp), %rdi
movslq -0x1c(%rbp), %rsi
callq 0x6520
movslq (%rax), %rax
cmpq 0x13869(%rip), %rax     # 0x1e1c0
jne 0xa964
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xa940
movq -0x10(%rbp), %rdi
movslq -0x1c(%rbp), %rsi
callq 0x6520
movl (%rax), %eax
movl %eax, -0x4c(%rbp)
movq -0x18(%rbp), %rdi
movslq -0x20(%rbp), %rsi
callq 0x6520
movq %rax, %rcx
movl -0x4c(%rbp), %eax
cmpl (%rcx), %eax
jle 0xa993
movb $0x0, -0x1(%rbp)
jmp 0xa9e5
movq -0x10(%rbp), %rdi
movslq -0x1c(%rbp), %rsi
callq 0x6520
movl (%rax), %eax
movl %eax, -0x50(%rbp)
movq -0x18(%rbp), %rdi
movslq -0x20(%rbp), %rsi
callq 0x6520
movq %rax, %rcx
movl -0x50(%rbp), %eax
cmpl (%rcx), %eax
jge 0xa9c2
movb $0x1, -0x1(%rbp)
jmp 0xa9e5
movb $0x1, -0x1(%rbp)
jmp 0xa9e5
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0xa9dc
jmp 0xa7be
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x50, %rsp
popq %rbp
retq