// File: elarielcl[P]ArielsSequitur/Rule.cpp
// Function: Rule::print()
void Rule::print() {
  std::vector<Rule*> v;
  this->printed = true;
  std::cout << "S" << this->symbol-this->grammar->M;
  std::cout << "->";
  Node* t = this->guard->next;
  while (!t->isGuard()) {
    if (t->symbol<this->grammar->M)
      std::cout <<  (char)t->symbol<< " ";
    else {
      std::cout <<  "S" << t->symbol-this->grammar->M << " ";
      if (!t->rule->printed)
        v.push_back(t->rule);
    }
    t = t->next;
  }
  std::cout << std::endl;
  for (int i = 0; i<v.size(); ++i)
    if (!v[i]->printed)v[i]->print();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x50(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x2b20
movq -0x50(%rbp), %rax
movb $0x1, 0x10(%rax)
movq 0x4789(%rip), %rdi      # 0x6fc8
leaq 0x189b(%rip), %rsi      # 0x40e1
callq 0x10c0
movq %rax, -0x48(%rbp)
jmp 0x2851
movq -0x48(%rbp), %rdi
movq -0x50(%rbp), %rax
movl 0xc(%rax), %esi
movq 0x489d(%rip), %rax      # 0x7100
movl 0x20(%rax), %eax
subl %eax, %esi
callq 0x1180
jmp 0x286f
movq 0x4752(%rip), %rdi      # 0x6fc8
leaq 0x1866(%rip), %rsi      # 0x40e3
callq 0x10c0
jmp 0x2884
movq -0x50(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
callq 0x3610
movb %al, -0x51(%rbp)
jmp 0x28a1
movb -0x51(%rbp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x28af
jmp 0x298d
movq -0x38(%rbp), %rax
movl (%rax), %eax
movq 0x4844(%rip), %rcx      # 0x7100
cmpl 0x20(%rcx), %eax
jge 0x290b
movq -0x38(%rbp), %rax
movsbl (%rax), %esi
movq 0x46f9(%rip), %rdi      # 0x6fc8
callq 0x1100
movq %rax, -0x60(%rbp)
jmp 0x28da
movq -0x60(%rbp), %rdi
leaq 0x1828(%rip), %rsi      # 0x410d
callq 0x10c0
jmp 0x28ec
jmp 0x297c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x2bf0
jmp 0x2a14
movq 0x46b6(%rip), %rdi      # 0x6fc8
leaq 0x17c8(%rip), %rsi      # 0x40e1
callq 0x10c0
movq %rax, -0x68(%rbp)
jmp 0x2924
movq -0x68(%rbp), %rdi
movq -0x38(%rbp), %rax
movl (%rax), %esi
movq 0x47cb(%rip), %rax      # 0x7100
movl 0x20(%rax), %eax
subl %eax, %esi
callq 0x1180
movq %rax, -0x70(%rbp)
jmp 0x2945
movq -0x70(%rbp), %rdi
leaq 0x17bd(%rip), %rsi      # 0x410d
callq 0x10c0
jmp 0x2957
movq -0x38(%rbp), %rax
movq 0x18(%rax), %rax
testb $0x1, 0x10(%rax)
jne 0x297a
movq -0x38(%rbp), %rsi
addq $0x18, %rsi
leaq -0x20(%rbp), %rdi
callq 0x2b40
jmp 0x2978
jmp 0x297a
jmp 0x297c
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x38(%rbp)
jmp 0x2893
movq 0x4634(%rip), %rdi      # 0x6fc8
movq 0x460d(%rip), %rsi      # 0x6fa8
callq 0x10f0
jmp 0x29a2
movl $0x0, -0x3c(%rbp)
movslq -0x3c(%rbp), %rax
movq %rax, -0x78(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x2bb0
movq %rax, %rcx
movq -0x78(%rbp), %rax
cmpq %rcx, %rax
jae 0x2a02
movslq -0x3c(%rbp), %rsi
leaq -0x20(%rbp), %rdi
callq 0x2bd0
movq (%rax), %rax
testb $0x1, 0x10(%rax)
jne 0x29f5
movslq -0x3c(%rbp), %rsi
leaq -0x20(%rbp), %rdi
callq 0x2bd0
movq (%rax), %rdi
callq 0x2810
jmp 0x29f3
jmp 0x29f5
jmp 0x29f7
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x29a9
leaq -0x20(%rbp), %rdi
callq 0x2bf0
addq $0x80, %rsp
popq %rbp
retq
movq -0x28(%rbp), %rdi
callq 0x1190
nopl (%rax)