// File: /workspace/github_c_makefile_star2_O1/macournoyer[P]peg/tree.c
// Function: Node_fprint
static void Node_fprint(FILE *stream, Node *node)
{
  assert(node);
  switch (node->type)
    {
    case Rule:		fprintf(stream, " %s", node->rule.name);				break;
    case Name:		fprintf(stream, " %s", node->name.rule->rule.name);			break;
    case Dot:		fprintf(stream, " .");							break;
    case Character:	fprintf(stream, " '%s'", node->character.value);			break;
    case String:	fprintf(stream, " \"%s\"", node->string.value);				break;
    case Class:		fprintf(stream, " [%s]", node->cclass.value);				break;
    case Action:	fprintf(stream, " { %s }", node->action.text);				break;
    case Predicate:	fprintf(stream, " ?{ %s }", node->action.text);				break;

    case Alternate:	node= node->alternate.first;
			fprintf(stream, " (");
			Node_fprint(stream, node);
			while ((node= node->any.next))
			  {
			    fprintf(stream, " |");
			    Node_fprint(stream, node);
			  }
			fprintf(stream, " )");
			break;

    case Sequence:	node= node->sequence.first;
			fprintf(stream, " (");
			Node_fprint(stream, node);
			while ((node= node->any.next))
			  Node_fprint(stream, node);
			fprintf(stream, " )");
			break;

    case PeekFor:	fprintf(stream, "&");  Node_fprint(stream, node->query.element);	break;
    case PeekNot:	fprintf(stream, "!");  Node_fprint(stream, node->query.element);	break;
    case Query:		Node_fprint(stream, node->query.element);  fprintf(stream, "?");	break;
    case Star:		Node_fprint(stream, node->query.element);  fprintf(stream, "*");	break;
    case Plus:		Node_fprint(stream, node->query.element);  fprintf(stream, "+");	break;
    default:
      fprintf(stream, "\nunknown node type %d\n", node->type);
      exit(1);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x19b5(%rip), %r15      # 0x52e4
testq %r14, %r14
je 0x3ade
movl (%r14), %edx
leal -0x1(%rdx), %eax
cmpl $0xf, %eax
ja 0x3afd
movslq (%r15,%rax,4), %rax
addq %r15, %rax
jmpq *%rax
movl $0x26, %edi
jmp 0x395c
movl $0x21, %edi
movq %rbx, %rsi
callq 0x1090
movq 0x10(%r14), %r14
jmp 0x392f
movq 0x10(%r14), %rsi
movq %rbx, %rdi
callq 0x391d
movl $0x3f, %edi
jmp 0x3a82
movq 0x10(%r14), %rsi
movq %rbx, %rdi
callq 0x391d
movl $0x2a, %edi
jmp 0x3a82
movq 0x10(%r14), %r14
leaq 0x1b96(%rip), %rdi      # 0x5537
movl $0x2, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x1180
movq %rbx, %rdi
movq %r14, %rsi
callq 0x391d
movq 0x8(%r14), %r14
testq %r14, %r14
je 0x3ac0
leaq 0x1b68(%rip), %r15      # 0x553a
movl $0x2, %esi
movl $0x1, %edx
movq %r15, %rdi
movq %rbx, %rcx
callq 0x1180
movq %rbx, %rdi
movq %r14, %rsi
callq 0x391d
movq 0x8(%r14), %r14
testq %r14, %r14
jne 0x39d2
jmp 0x3ac0
movq 0x10(%r14), %rdx
leaq 0x1b23(%rip), %rsi      # 0x552e
jmp 0x3a62
movq 0x10(%r14), %rdx
leaq 0x1b0e(%rip), %rsi      # 0x5526
jmp 0x3a62
movq 0x10(%r14), %rdx
leaq 0x1af5(%rip), %rsi      # 0x551a
jmp 0x3a62
movq 0x10(%r14), %rdx
leaq 0x16e6(%rip), %rsi      # 0x5118
jmp 0x3a62
leaq 0x1adc(%rip), %rdi      # 0x5517
jmp 0x3ac7
movq 0x10(%r14), %rdx
jmp 0x3a4e
movq 0x10(%r14), %rax
movq 0x10(%rax), %rdx
leaq 0x16b4(%rip), %rsi      # 0x5109
jmp 0x3a62
movq 0x10(%r14), %rdx
leaq 0x1abe(%rip), %rsi      # 0x5520
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0x10c0
movq 0x10(%r14), %rsi
movq %rbx, %rdi
callq 0x391d
movl $0x2b, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x1090
movq 0x10(%r14), %r14
leaq 0x1a9d(%rip), %rdi      # 0x5537
movl $0x2, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x1180
movq %rbx, %rdi
movq %r14, %rsi
callq 0x391d
movq 0x8(%r14), %r14
testq %r14, %r14
jne 0x3aac
leaq 0x1a76(%rip), %rdi      # 0x553d
movl $0x2, %esi
movl $0x1, %edx
movq %rbx, %rcx
popq %rbx
popq %r14
popq %r15
jmp 0x1180
leaq 0x186d(%rip), %rdi      # 0x5352
leaq 0x1848(%rip), %rsi      # 0x5334
leaq 0x1a03(%rip), %rcx      # 0x54f6
movl $0x128, %edx            # imm = 0x128
callq 0x1060
leaq 0x1a3c(%rip), %rsi      # 0x5540
movq %rbx, %rdi
xorl %eax, %eax
callq 0x10c0
movl $0x1, %edi
callq 0x1170