// File: /workspace/github_c_makefile_star2_O0/macournoyer[P]peg/compile.c
// Function: Rule_compile_c2
static void Rule_compile_c2(Node *node)
{
  assert(node);
  assert(Rule == node->type);

  if (!node->rule.expression)
    fprintf(stderr, "rule '%s' used but not defined\n", node->rule.name);
  else
    {
      int ko= yyl(), safe;

      if ((!(RuleUsed & node->rule.flags)) && (node != start))
	fprintf(stderr, "rule '%s' defined but not used\n", node->rule.name);

      safe= ((Query == node->rule.expression->type) || (Star == node->rule.expression->type));

      fprintf(output, "\nYY_RULE(int) yy_%s()\n{", node->rule.name);
      if (!safe) save(0);
      if (node->rule.variables)
	fprintf(output, "  yyDo(yyPush, %d, 0);", countVariables(node->rule.variables));
      fprintf(output, "\n  yyprintf((stderr, \"%%s\\n\", \"%s\"));", node->rule.name);
      Node_compile_c_ko(node->rule.expression, ko);
      fprintf(output, "\n  yyprintf((stderr, \"  ok   %%s @ %%s\\n\", \"%s\", yybuf+yypos));", node->rule.name);
      if (node->rule.variables)
	fprintf(output, "  yyDo(yyPop, %d, 0);", countVariables(node->rule.variables));
      fprintf(output, "\n  return 1;");
      if (!safe)
	{
	  label(ko);
	  restore(0);
	  fprintf(output, "\n  yyprintf((stderr, \"  fail %%s @ %%s\\n\", \"%s\", yybuf+yypos));", node->rule.name);
	  fprintf(output, "\n  return 0;");
	}
      fprintf(output, "\n}");
    }

  if (node->rule.next)
    Rule_compile_c2(node->rule.next);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x5715
jmp 0x5734
leaq 0x1ca2(%rip), %rdi      # 0x73be
leaq 0x336b(%rip), %rsi      # 0x8a8e
movl $0x114, %edx            # imm = 0x114
leaq 0x3369(%rip), %rcx      # 0x8a98
callq 0x1060
movq -0x8(%rbp), %rcx
movl $0x1, %eax
cmpl (%rcx), %eax
jne 0x5743
jmp 0x5762
leaq 0x1ca1(%rip), %rdi      # 0x73eb
leaq 0x333d(%rip), %rsi      # 0x8a8e
movl $0x115, %edx            # imm = 0x115
leaq 0x333b(%rip), %rcx      # 0x8a98
callq 0x1060
movq -0x8(%rbp), %rax
cmpq $0x0, 0x20(%rax)
jne 0x5792
movq 0x6884(%rip), %rax      # 0xbff8
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdx
leaq 0x332f(%rip), %rsi      # 0x8ab5
movb $0x0, %al
callq 0x10c0
jmp 0x597d
callq 0x59a0
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rax
movl 0x2c(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x57d9
movq -0x8(%rbp), %rax
leaq 0x6a04(%rip), %rcx      # 0xc1b8
cmpq (%rcx), %rax
je 0x57d9
movq 0x6838(%rip), %rax      # 0xbff8
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdx
leaq 0x3303(%rip), %rsi      # 0x8ad5
movb $0x0, %al
callq 0x10c0
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdx
movb $0x1, %al
movl $0xe, %ecx
cmpl (%rdx), %ecx
movb %al, -0x11(%rbp)
je 0x5804
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rcx
movl $0xf, %eax
cmpl (%rcx), %eax
sete %al
movb %al, -0x11(%rbp)
movb -0x11(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x10(%rbp)
leaq 0x69aa(%rip), %rax      # 0xc1c0
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdx
leaq 0x32cd(%rip), %rsi      # 0x8af5
movb $0x0, %al
callq 0x10c0
cmpl $0x0, -0x10(%rbp)
jne 0x583c
xorl %edi, %edi
callq 0x59c0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x5876
leaq 0x6972(%rip), %rax      # 0xc1c0
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x59f0
movq -0x20(%rbp), %rdi
movl %eax, %edx
leaq 0x329e(%rip), %rsi      # 0x8b0d
movb $0x0, %al
callq 0x10c0
leaq 0x6943(%rip), %rax      # 0xc1c0
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdx
leaq 0x3295(%rip), %rsi      # 0x8b24
movb $0x0, %al
callq 0x10c0
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdi
movl -0xc(%rbp), %esi
callq 0x5a30
leaq 0x6913(%rip), %rax      # 0xc1c0
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdx
leaq 0x328b(%rip), %rsi      # 0x8b4a
movb $0x0, %al
callq 0x10c0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x5900
leaq 0x68e8(%rip), %rax      # 0xc1c0
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x59f0
movq -0x28(%rbp), %rdi
movl %eax, %edx
leaq 0x3291(%rip), %rsi      # 0x8b8a
movb $0x0, %al
callq 0x10c0
leaq 0x68b9(%rip), %rax      # 0xc1c0
movq (%rax), %rdi
leaq 0x328f(%rip), %rsi      # 0x8ba0
movb $0x0, %al
callq 0x10c0
cmpl $0x0, -0x10(%rbp)
jne 0x5965
movl -0xc(%rbp), %edi
callq 0x5ec0
xorl %edi, %edi
callq 0x5ef0
leaq 0x688c(%rip), %rax      # 0xc1c0
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdx
leaq 0x3267(%rip), %rsi      # 0x8bad
movb $0x0, %al
callq 0x10c0
leaq 0x686c(%rip), %rax      # 0xc1c0
movq (%rax), %rdi
leaq 0x328f(%rip), %rsi      # 0x8bed
movb $0x0, %al
callq 0x10c0
leaq 0x6854(%rip), %rax      # 0xc1c0
movq (%rax), %rdi
leaq 0x3284(%rip), %rsi      # 0x8bfa
movb $0x0, %al
callq 0x10c0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x5995
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x5700
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)