// File: /workspace/github_c_makefile_star2_O3/voithos[P]awl/src/mpc.c
// Function: mpc_print_unretained
static void mpc_print_unretained(mpc_parser_t *p, int force) {
  
  /* TODO: Print Everything Escaped */
  
  int i;
  char *s, *e;
  char buff[2];
  
  if (p->retained && !force) {;
    if (p->name) { printf("<%s>", p->name); }
    else { printf("<anon>"); }
    return;
  }
  
  if (p->type == MPC_TYPE_UNDEFINED) { printf("<?>"); }
  if (p->type == MPC_TYPE_PASS)   { printf("<:>"); }
  if (p->type == MPC_TYPE_FAIL)   { printf("<!>"); }
  if (p->type == MPC_TYPE_LIFT)   { printf("<#>"); }
  if (p->type == MPC_TYPE_STATE)  { printf("<S#>"); }
  if (p->type == MPC_TYPE_BOUNDARY)  { printf("<\\b>"); }
  if (p->type == MPC_TYPE_EXPECT) {
    printf("%s", p->data.expect.m);
    /*mpc_print_unretained(p->data.expect.x, 0);*/
  }
  
  if (p->type == MPC_TYPE_SOI) { printf("<^>"); }
  if (p->type == MPC_TYPE_EOI) { printf("<$>"); }
  
  if (p->type == MPC_TYPE_ANY) { printf("<.>"); }
  if (p->type == MPC_TYPE_SATISFY) { printf("<f>"); }

  if (p->type == MPC_TYPE_SINGLE) {
    buff[0] = p->data.single.x; buff[1] = '\0';
    s = mpcf_escape_new(
      buff,
      mpc_escape_input_c,
      mpc_escape_output_c);
    printf("'%s'", s);
    free(s);
  }
  
  if (p->type == MPC_TYPE_RANGE) {
    buff[0] = p->data.range.x; buff[1] = '\0';
    s = mpcf_escape_new(
      buff,
      mpc_escape_input_c,
      mpc_escape_output_c);
    buff[0] = p->data.range.y; buff[1] = '\0';
    e = mpcf_escape_new(
      buff,
      mpc_escape_input_c,
      mpc_escape_output_c);
    printf("[%s-%s]", s, e);
    free(s);
    free(e);
  }
  
  if (p->type == MPC_TYPE_ONEOF) {
    s = mpcf_escape_new(
      p->data.string.x,
      mpc_escape_input_c,
      mpc_escape_output_c);
    printf("[%s]", s);
    free(s);
  }
  
  if (p->type == MPC_TYPE_NONEOF) {
    s = mpcf_escape_new(
      p->data.string.x,
      mpc_escape_input_c,
      mpc_escape_output_c);
    printf("[^%s]", s);
    free(s);
  }
  
  if (p->type == MPC_TYPE_STRING) {
    s = mpcf_escape_new(
      p->data.string.x,
      mpc_escape_input_c,
      mpc_escape_output_c);
    printf("\"%s\"", s);
    free(s);
  }
  
  if (p->type == MPC_TYPE_APPLY)    { mpc_print_unretained(p->data.apply.x, 0); }
  if (p->type == MPC_TYPE_APPLY_TO) { mpc_print_unretained(p->data.apply_to.x, 0); }
  if (p->type == MPC_TYPE_PREDICT)  { mpc_print_unretained(p->data.predict.x, 0); }

  if (p->type == MPC_TYPE_NOT)   { mpc_print_unretained(p->data.not.x, 0); printf("!"); }
  if (p->type == MPC_TYPE_MAYBE) { mpc_print_unretained(p->data.not.x, 0); printf("?"); }

  if (p->type == MPC_TYPE_MANY)  { mpc_print_unretained(p->data.repeat.x, 0); printf("*"); }
  if (p->type == MPC_TYPE_MANY1) { mpc_print_unretained(p->data.repeat.x, 0); printf("+"); }
  if (p->type == MPC_TYPE_COUNT) { mpc_print_unretained(p->data.repeat.x, 0); printf("{%i}", p->data.repeat.n); }
  
  if (p->type == MPC_TYPE_OR) {
    printf("(");
    for(i = 0; i < p->data.or.n-1; i++) {
      mpc_print_unretained(p->data.or.xs[i], 0);
      printf(" | ");
    }
    mpc_print_unretained(p->data.or.xs[p->data.or.n-1], 0);
    printf(")");
  }
  
  if (p->type == MPC_TYPE_AND) {
    printf("(");
    for(i = 0; i < p->data.and.n-1; i++) {
      mpc_print_unretained(p->data.and.xs[i], 0);
      printf(" ");
    }
    mpc_print_unretained(p->data.and.xs[p->data.and.n-1], 0);
    printf(")");
  }
  
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
testl %esi, %esi
jne 0xbf9c
cmpb $0x0, (%rbx)
je 0xbf9c
movq 0x8(%rbx), %rsi
testq %rsi, %rsi
je 0xc30b
leaq 0x6f93(%rip), %rdi      # 0x12f1a
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2130
movb 0x10(%rbx), %al
testb %al, %al
jne 0xbfb4
leaq 0x6f7c(%rip), %rdi      # 0x12f26
xorl %eax, %eax
callq 0x2130
movb 0x10(%rbx), %al
cmpb $0x1, %al
jne 0xbfc9
leaq 0x6f6b(%rip), %rdi      # 0x12f2a
xorl %eax, %eax
callq 0x2130
movb 0x10(%rbx), %al
cmpb $0x2, %al
jne 0xbfde
leaq 0x6f5a(%rip), %rdi      # 0x12f2e
xorl %eax, %eax
callq 0x2130
movb 0x10(%rbx), %al
cmpb $0x3, %al
jne 0xbff3
leaq 0x6f49(%rip), %rdi      # 0x12f32
xorl %eax, %eax
callq 0x2130
movb 0x10(%rbx), %al
cmpb $0x7, %al
jne 0xc008
leaq 0x6f38(%rip), %rdi      # 0x12f36
xorl %eax, %eax
callq 0x2130
movb 0x10(%rbx), %al
cmpb $0x6, %al
jne 0xc01d
leaq 0x6f28(%rip), %rdi      # 0x12f3b
xorl %eax, %eax
callq 0x2130
movb 0x10(%rbx), %al
cmpb $0x5, %al
jne 0xc036
movq 0x20(%rbx), %rsi
leaq 0x651d(%rip), %rdi      # 0x12549
xorl %eax, %eax
callq 0x2130
movb 0x10(%rbx), %al
cmpb $0x8, %al
jne 0xc04b
leaq 0x6eff(%rip), %rdi      # 0x12f40
xorl %eax, %eax
callq 0x2130
movb 0x10(%rbx), %al
cmpb $0x9, %al
jne 0xc060
leaq 0x6eee(%rip), %rdi      # 0x12f44
xorl %eax, %eax
callq 0x2130
movb 0x10(%rbx), %al
cmpb $0xa, %al
jne 0xc075
leaq 0x6edd(%rip), %rdi      # 0x12f48
xorl %eax, %eax
callq 0x2130
movb 0x10(%rbx), %al
cmpb $0xf, %al
jne 0xc08a
leaq 0x6ecc(%rip), %rdi      # 0x12f4c
xorl %eax, %eax
callq 0x2130
movb 0x10(%rbx), %al
cmpb $0xb, %al
jne 0xc0ce
movb 0x18(%rbx), %al
leaq 0x6(%rsp), %rdi
movb %al, (%rdi)
movb $0x0, 0x1(%rdi)
leaq 0xf17d(%rip), %rsi      # 0x1b220
leaq 0xf186(%rip), %rdx      # 0x1b230
callq 0xbb58
movq %rax, %r14
leaq 0x6291(%rip), %rdi      # 0x1234a
movq %rax, %rsi
xorl %eax, %eax
callq 0x2130
movq %r14, %rdi
callq 0x23f0
movb 0x10(%rbx), %al
cmpb $0xe, %al
jne 0xc144
movb 0x18(%rbx), %al
leaq 0x6(%rsp), %r14
movb %al, (%r14)
xorl %ebp, %ebp
movb %bpl, 0x1(%r14)
leaq 0xf136(%rip), %r15      # 0x1b220
leaq 0xf13f(%rip), %r12      # 0x1b230
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0xbb58
movq %rax, %r13
movb 0x19(%rbx), %al
movb %al, (%r14)
movb %bpl, 0x1(%r14)
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0xbb58
movq %rax, %r14
leaq 0x6e2c(%rip), %rdi      # 0x12f50
movq %r13, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x2130
movq %r13, %rdi
callq 0x23f0
movq %r14, %rdi
callq 0x23f0
movb 0x10(%rbx), %al
cmpb $0xc, %al
jne 0xc17e
movq 0x18(%rbx), %rdi
leaq 0xf0cd(%rip), %rsi      # 0x1b220
leaq 0xf0d6(%rip), %rdx      # 0x1b230
callq 0xbb58
movq %rax, %r14
leaq 0x6def(%rip), %rdi      # 0x12f58
movq %rax, %rsi
xorl %eax, %eax
callq 0x2130
movq %r14, %rdi
callq 0x23f0
movb 0x10(%rbx), %al
cmpb $0xd, %al
jne 0xc1b8
movq 0x18(%rbx), %rdi
leaq 0xf093(%rip), %rsi      # 0x1b220
leaq 0xf09c(%rip), %rdx      # 0x1b230
callq 0xbb58
movq %rax, %r14
leaq 0x6dba(%rip), %rdi      # 0x12f5d
movq %rax, %rsi
xorl %eax, %eax
callq 0x2130
movq %r14, %rdi
callq 0x23f0
movb 0x10(%rbx), %al
cmpb $0x10, %al
jne 0xc1f2
movq 0x18(%rbx), %rdi
leaq 0xf059(%rip), %rsi      # 0x1b220
leaq 0xf062(%rip), %rdx      # 0x1b230
callq 0xbb58
movq %rax, %r14
leaq 0x6a1b(%rip), %rdi      # 0x12bf8
movq %rax, %rsi
xorl %eax, %eax
callq 0x2130
movq %r14, %rdi
callq 0x23f0
movb 0x10(%rbx), %al
cmpb $0x11, %al
jne 0xc204
movq 0x18(%rbx), %rdi
xorl %esi, %esi
callq 0xbf5c
movb 0x10(%rbx), %al
cmpb $0x12, %al
jne 0xc216
movq 0x18(%rbx), %rdi
xorl %esi, %esi
callq 0xbf5c
movb 0x10(%rbx), %al
cmpb $0x13, %al
jne 0xc228
movq 0x18(%rbx), %rdi
xorl %esi, %esi
callq 0xbf5c
movb 0x10(%rbx), %al
cmpb $0x14, %al
jne 0xc244
movq 0x18(%rbx), %rdi
xorl %esi, %esi
callq 0xbf5c
movl $0x21, %edi
callq 0x2040
movb 0x10(%rbx), %al
cmpb $0x15, %al
jne 0xc260
movq 0x18(%rbx), %rdi
xorl %esi, %esi
callq 0xbf5c
movl $0x3f, %edi
callq 0x2040
movb 0x10(%rbx), %al
cmpb $0x16, %al
jne 0xc27c
movq 0x28(%rbx), %rdi
xorl %esi, %esi
callq 0xbf5c
movl $0x2a, %edi
callq 0x2040
movb 0x10(%rbx), %al
cmpb $0x17, %al
jne 0xc298
movq 0x28(%rbx), %rdi
xorl %esi, %esi
callq 0xbf5c
movl $0x2b, %edi
callq 0x2040
movb 0x10(%rbx), %al
cmpb $0x18, %al
jne 0xc2bb
movq 0x28(%rbx), %rdi
xorl %esi, %esi
callq 0xbf5c
movl 0x18(%rbx), %esi
leaq 0x6cb2(%rip), %rdi      # 0x12f63
xorl %eax, %eax
callq 0x2130
movb 0x10(%rbx), %al
cmpb $0x19, %al
jne 0xc346
movl $0x28, %edi
callq 0x2040
movslq 0x18(%rbx), %rax
cmpq $0x1, %rax
jle 0xc327
leaq 0x6c8a(%rip), %r14      # 0x12f68
xorl %r15d, %r15d
movq 0x20(%rbx), %rax
movq (%rax,%r15,8), %rdi
xorl %esi, %esi
callq 0xbf5c
movq %r14, %rdi
xorl %eax, %eax
callq 0x2130
incq %r15
movslq 0x18(%rbx), %rax
decq %rax
cmpq %rax, %r15
jl 0xc2e1
jmp 0xc32a
leaq 0x6c0d(%rip), %rdi      # 0x12f1f
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2130
decq %rax
movq 0x20(%rbx), %rcx
movq (%rcx,%rax,8), %rdi
xorl %esi, %esi
callq 0xbf5c
movl $0x29, %edi
callq 0x2040
movb 0x10(%rbx), %al
cmpb $0x1a, %al
jne 0xc38b
movl $0x28, %edi
callq 0x2040
movslq 0x18(%rbx), %rax
cmpq $0x1, %rax
jle 0xc39a
xorl %r14d, %r14d
movq 0x28(%rbx), %rax
movq (%rax,%r14,8), %rdi
xorl %esi, %esi
callq 0xbf5c
movl $0x20, %edi
callq 0x2040
incq %r14
movslq 0x18(%rbx), %rax
decq %rax
cmpq %rax, %r14
jl 0xc361
jmp 0xc39d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
decq %rax
movq 0x28(%rbx), %rcx
movq (%rcx,%rax,8), %rdi
xorl %esi, %esi
callq 0xbf5c
movl $0x29, %edi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2040