// File: /workspace/github_cpp_makefile_star2_O3/jstaursky[P]hutch/src/Sleigh/slghsymbol.cc
// Function: SubtableSymbol::buildPattern(std::ostream&)
TokenPattern *SubtableSymbol::buildPattern(ostream &s)

{
  if (pattern != (TokenPattern *)0) return pattern; // Already built

  errors = false;
  beingbuilt = true;
  pattern = new TokenPattern();
  if (construct.empty()) {
    s << "Error: There are no constructors in table: "+getName() << endl;
    errors = true;
    return pattern;
  }
  try {
    construct.front()->buildPattern(s);
  } catch(SleighError &err) {
    s << "Error: " << err.explain << ": for ";
    construct.front()->printInfo(s);
    s << endl;
    errors = true;
  }
  *pattern = *construct.front()->getPattern();
  for(int4 i=1;i<construct.size();++i) {
    try {
      construct[i]->buildPattern(s);
    } catch(SleighError &err) {
      s << "Error: " << err.explain << ": for ";
      construct[i]->printInfo(s);
      s << endl;
      errors = true;
    }
    *pattern = construct[i]->getPattern()->commonSubPattern(*pattern);
  }
  beingbuilt = false;
  return pattern;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq 0x30(%rdi), %rax
testq %rax, %rax
jne 0x6b2b0
movq %rsi, %r14
movq %rdi, %rbx
movw $0x1, 0x38(%rdi)
movl $0x28, %edi
callq 0x40810
movq %rax, %r15
movq %rax, %rdi
callq 0x41320
movq %r15, 0x30(%rbx)
movq 0x40(%rbx), %rax
cmpq 0x48(%rbx), %rax
je 0x6b23c
movq (%rax), %rdi
movq %r14, %rsi
callq 0x41510
movq 0x30(%rbx), %rdi
movq 0x40(%rbx), %rax
movq (%rax), %rax
movq (%rax), %rsi
callq 0x414b0
movq 0x40(%rbx), %rax
movq 0x48(%rbx), %rcx
subq %rax, %rcx
cmpq $0x9, %rcx
jb 0x6b236
movl $0x1, %ebp
leaq 0x10(%rsp), %r15
leaq 0x1650e(%rip), %r12     # 0x81676
leaq 0x1650f(%rip), %r13     # 0x8167e
movq (%rax,%rbp,8), %rdi
movq %r14, %rsi
callq 0x41510
movq 0x30(%rbx), %rdx
movq 0x40(%rbx), %rax
movq (%rax,%rbp,8), %rax
movq (%rax), %rsi
movq %r15, %rdi
callq 0x417c0
movq 0x30(%rbx), %rdi
movq %r15, %rsi
callq 0x414b0
movq %r15, %rdi
callq 0x3fa70
incq %rbp
movq 0x40(%rbx), %rax
movq 0x48(%rbx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rbp, %rcx
ja 0x6b16f
jmp 0x6b236
movq %rax, 0x8(%rsp)
cmpl $0x1, %edx
jne 0x6b399
movq 0x8(%rsp), %rdi
callq 0x3f910
movq %rax, 0x8(%rsp)
movl $0x7, %edx
movq %r14, %rdi
movq %r12, %rsi
callq 0x40b90
movq 0x8(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %r14, %rdi
callq 0x40b90
movl $0x6, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x40b90
movq 0x40(%rbx), %rax
movq (%rax,%rbp,8), %rdi
movq %r14, %rsi
callq 0x421a0
movq %r14, %rdi
callq 0x3fad0
movb $0x1, 0x39(%rbx)
callq 0x41aa0
jmp 0x6b17b
movb $0x0, 0x38(%rbx)
jmp 0x6b2ac
leaq 0x8(%rbx), %rdx
leaq 0x16403(%rip), %rsi     # 0x8164a
leaq 0x10(%rsp), %r15
movq %r15, %rdi
callq 0x40510
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %r14, %rdi
callq 0x40b90
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x40750
movsbl %al, %esi
movq %r14, %rdi
callq 0x3f0a0
movq %rax, %rdi
callq 0x3ffd0
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6b2a8
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x40880
movb $0x1, 0x39(%rbx)
movq 0x30(%rbx), %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, 0x8(%rsp)
callq 0x41aa0
jmp 0x6b399
movq %rax, 0x8(%rsp)
cmpl $0x1, %edx
jne 0x6b399
movq 0x8(%rsp), %rdi
callq 0x3f910
movq %rax, %r15
leaq 0x16386(%rip), %rsi     # 0x81676
movl $0x7, %edx
movq %r14, %rdi
callq 0x40b90
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %r14, %rdi
callq 0x40b90
leaq 0x1636b(%rip), %rsi     # 0x8167e
movl $0x6, %edx
movq %rax, %rdi
callq 0x40b90
movq 0x40(%rbx), %rax
movq (%rax), %rdi
movq %r14, %rsi
callq 0x421a0
movq %r14, %rdi
callq 0x3fad0
movb $0x1, 0x39(%rbx)
callq 0x41aa0
jmp 0x6b12f
movq %rax, 0x8(%rsp)
callq 0x41aa0
jmp 0x6b399
movq %rax, %rdi
callq 0x47736
movq %rax, 0x8(%rsp)
movl $0x28, %esi
movq %r15, %rdi
jmp 0x6b383
movq %rax, 0x8(%rsp)
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6b399
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x40880
jmp 0x6b399
movq %rax, 0x8(%rsp)
leaq 0x10(%rsp), %rdi
callq 0x3fa70
movq 0x8(%rsp), %rdi
callq 0x41f10
nop