// File: /workspace/github_c_makefile_star2_O3/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
testq %rsi, %rsi
je 0x36b6
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x1c49(%rip), %r15      # 0x52cc
movl (%r14), %edx
leal -0x1(%rdx), %eax
cmpl $0xf, %eax
ja 0x383f
movl $0x21, %edi
movslq (%r15,%rax,4), %rax
addq %r15, %rax
jmpq *%rax
movl $0x26, %edi
movq %rbx, %rsi
callq 0x1090
movq 0x10(%r14), %r14
testq %r14, %r14
jne 0x3683
leaq 0x1c7d(%rip), %rdi      # 0x533a
leaq 0x1c58(%rip), %rsi      # 0x531c
leaq 0x1e13(%rip), %rcx      # 0x54de
movl $0x128, %edx            # imm = 0x128
callq 0x1060
movq 0x10(%r14), %rsi
movq %rbx, %rdi
callq 0x366c
movl $0x3f, %edi
jmp 0x3742
movq 0x10(%r14), %rsi
movq %rbx, %rdi
callq 0x366c
movl $0x2a, %edi
jmp 0x3742
movq 0x10(%r14), %r14
leaq 0x1e19(%rip), %rdi      # 0x551f
movl $0x2, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x1180
movq %rbx, %rdi
movq %r14, %rsi
callq 0x366c
movq 0x8(%r14), %r14
testq %r14, %r14
jne 0x3718
jmp 0x3821
movq 0x10(%r14), %rsi
movq %rbx, %rdi
callq 0x366c
movl $0x2b, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x1090
movq 0x10(%r14), %rdx
leaq 0x1dbc(%rip), %rsi      # 0x5516
jmp 0x37b1
movq 0x10(%r14), %rdx
leaq 0x1d9b(%rip), %rsi      # 0x5502
jmp 0x37b1
movq 0x10(%r14), %rdx
leaq 0x1d94(%rip), %rsi      # 0x5508
jmp 0x37b1
movq 0x10(%r14), %rdx
leaq 0x1898(%rip), %rsi      # 0x5019
jmp 0x37b1
movq 0x10(%r14), %rax
movq 0x10(%rax), %rdx
jmp 0x37aa
leaq 0x1d6b(%rip), %rdi      # 0x54ff
jmp 0x3828
movq 0x10(%r14), %rdx
leaq 0x1d6a(%rip), %rsi      # 0x550e
jmp 0x37b1
movq 0x10(%r14), %rdx
leaq 0x1859(%rip), %rsi      # 0x500a
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0x10c0
movq 0x10(%r14), %r14
leaq 0x1d54(%rip), %rdi      # 0x551f
movl $0x2, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x1180
movq %rbx, %rdi
movq %r14, %rsi
callq 0x366c
movq 0x8(%r14), %r14
testq %r14, %r14
je 0x3821
leaq 0x1d2a(%rip), %r15      # 0x5522
movl $0x2, %esi
movl $0x1, %edx
movq %r15, %rdi
movq %rbx, %rcx
callq 0x1180
movq %rbx, %rdi
movq %r14, %rsi
callq 0x366c
movq 0x8(%r14), %r14
testq %r14, %r14
jne 0x37f8
leaq 0x1cfd(%rip), %rdi      # 0x5525
movl $0x2, %esi
movl $0x1, %edx
movq %rbx, %rcx
popq %rbx
popq %r14
popq %r15
jmp 0x1180
leaq 0x1ce2(%rip), %rsi      # 0x5528
movq %rbx, %rdi
xorl %eax, %eax
callq 0x10c0
movl $0x1, %edi
callq 0x1170