// File: /workspace/github_cpp_makefile_star2_O1/jstaursky[P]hutch/src/Sleigh/slghpatexpress.cc
// Function: LessEqualEquation::genPattern(std::vector<TokenPattern, std::allocator<TokenPattern>> const&) const
void LessEqualEquation::genPattern(const vector<TokenPattern> &ops) const

{
  intb lhsmin = lhs->minValue();
  intb lhsmax = lhs->maxValue();
  vector<const PatternValue *> semval;
  vector<intb> min;
  vector<intb> max;
  vector<intb> cur;
  int4 count=0;

  rhs->listValues(semval);
  rhs->getMinMax(min,max);
  cur = min;

  do {
    intb lhsval;
    intb val = rhs->getSubValue(cur);
    for(lhsval=lhsmin;lhsval<=lhsmax;++lhsval) {
      if (lhsval > val) continue;
      if (count==0)
	resultpattern = buildPattern(lhs,lhsval,semval,cur);
      else
	resultpattern = resultpattern.doOr(buildPattern(lhs,lhsval,semval,cur));
      count += 1;
    }
  } while(advance_combo(cur,min,max));
  if (count == 0)
    throw SleighError("Less than or equal constraint is impossible to match");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %rdi, %rbx
movq 0x38(%rdi), %rdi
movq (%rdi), %rax
callq *0x50(%rax)
movq %rax, %r13
movq 0x38(%rbx), %rdi
movq (%rdi), %rax
callq *0x58(%rax)
movq %rax, 0x48(%rsp)
xorl %eax, %eax
leaq 0x70(%rsp), %rsi
movq %rax, 0x10(%rsi)
xorps %xmm0, %xmm0
movaps %xmm0, (%rsi)
movq %rax, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movq %rax, 0x60(%rsp)
movaps %xmm0, 0x50(%rsp)
movq %rax, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movq %rbx, 0x8(%rsp)
movq 0x40(%rbx), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
movq 0x8(%rsp), %rax
movq 0x40(%rax), %rdi
movq (%rdi), %rax
leaq 0x30(%rsp), %rsi
leaq 0x50(%rsp), %rdx
callq *0x28(%rax)
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x3f030
movq 0x8(%rsp), %rax
leaq 0x10(%rax), %rbp
movq 0x48(%rsp), %rax
incq %rax
movq %rax, 0x90(%rsp)
xorl %ebx, %ebx
movq %r13, 0x88(%rsp)
movq 0x8(%rsp), %rax
movq 0x40(%rax), %rdi
movl $0x0, 0x98(%rsp)
movq (%rdi), %rax
leaq 0x10(%rsp), %rsi
leaq 0x98(%rsp), %r14
movq %r14, %rdx
callq *0x30(%rax)
cmpq 0x48(%rsp), %r13
jg 0x5f76f
movq %rax, %r15
cmpq %r15, %r13
jg 0x5f75e
testl %ebx, %ebx
je 0x5f72b
movq 0x8(%rsp), %rax
movq 0x38(%rax), %rsi
leaq 0xc0(%rsp), %r12
movq %r12, %rdi
movq %r13, %rdx
leaq 0x70(%rsp), %rcx
leaq 0x10(%rsp), %r8
callq 0x5ed83
leaq 0x98(%rsp), %r14
movq %r14, %rdi
movq %rbp, %rsi
movq %r12, %rdx
callq 0x40d20
movq %rbp, %rdi
movq %r14, %rsi
callq 0x414a0
movq %r14, %rdi
callq 0x3fa70
leaq 0xc0(%rsp), %rdi
jmp 0x5f757
movq 0x8(%rsp), %rax
movq 0x38(%rax), %rsi
movq %r14, %rdi
movq %r13, %rdx
leaq 0x70(%rsp), %rcx
leaq 0x10(%rsp), %r8
callq 0x5ed83
movq %rbp, %rdi
movq %r14, %rsi
callq 0x414a0
movq %r14, %rdi
callq 0x3fa70
incl %ebx
incq %r13
cmpq %r13, 0x90(%rsp)
jne 0x5f6c5
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rax
subq %rdi, %rax
setne %cl
movq 0x88(%rsp), %r13
je 0x5f7e9
sarq $0x3, %rax
movq 0x50(%rsp), %rcx
movq 0x30(%rsp), %rdx
cmpq $0x1, %rax
movq %rax, %rsi
adcq $0x0, %rsi
movq (%rdi), %r8
leaq 0x1(%r8), %r9
movq %r9, (%rdi)
cmpq (%rcx), %r8
jl 0x5f68d
movl $0x1, %r9d
movq %r9, %r8
movq -0x8(%rdx,%r9,8), %r9
movq %r9, -0x8(%rdi,%r8,8)
cmpq %r8, %rsi
je 0x5f7e3
movq (%rdi,%r8,8), %r10
leaq 0x1(%r10), %r9
movq %r9, (%rdi,%r8,8)
leaq 0x1(%r8), %r9
cmpq (%rcx,%r8,8), %r10
jge 0x5f7bb
cmpq %r8, %rax
seta %cl
testb %cl, %cl
jne 0x5f68d
testl %ebx, %ebx
je 0x5f861
testq %rdi, %rdi
je 0x5f807
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x40870
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x5f81e
movq 0x60(%rsp), %rsi
subq %rdi, %rsi
callq 0x40870
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x5f835
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x40870
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x5f84f
movq 0x80(%rsp), %rsi
subq %rdi, %rsi
callq 0x40870
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x3fb00
movq %rax, %r14
leaq 0xa8(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x2120c(%rip), %rsi     # 0x80a8d
leaq 0x21239(%rip), %rdx     # 0x80ac1
leaq 0x98(%rsp), %rdi
callq 0x3f8a0
movb $0x1, %bpl
leaq 0x98(%rsp), %rsi
movq %r14, %rdi
callq 0x3f890
xorl %ebp, %ebp
movq 0x435df(%rip), %rsi     # 0xa2e90
movq 0x43380(%rip), %rdx     # 0xa2c38
movq %r14, %rdi
callq 0x41d60
movq %rax, %rbx
movq 0x98(%rsp), %rdi
cmpq %r15, %rdi
je 0x5f8e8
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x40870
jmp 0x5f8e8
movq %rax, %rbx
movb $0x1, %bpl
testb %bpl, %bpl
je 0x5f931
movq %r14, %rdi
callq 0x40080
jmp 0x5f931
jmp 0x5f90f
jmp 0x5f90f
movq %rax, %rbx
leaq 0x98(%rsp), %rdi
jmp 0x5f92c
jmp 0x5f90f
movq %rax, %rbx
jmp 0x5f924
movq %rax, %rbx
jmp 0x5f931
movq %rax, %rbx
leaq 0x98(%rsp), %rdi
callq 0x3fa70
leaq 0xc0(%rsp), %rdi
callq 0x3fa70
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x5f948
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x40870
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x5f95f
movq 0x60(%rsp), %rsi
subq %rdi, %rsi
callq 0x40870
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x5f976
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x40870
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x5f990
movq 0x80(%rsp), %rsi
subq %rdi, %rsi
callq 0x40870
movq %rbx, %rdi
callq 0x41f00