// File: /workspace/github_c_makefile_star2_O2/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 0xa6e1
cmpb $0x0, (%rbx)
je 0xa6e1
movq 0x8(%rbx), %rsi
testq %rsi, %rsi
je 0xaabb
leaq 0x6846(%rip), %rdi      # 0x10f12
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 0xa6f9
leaq 0x682f(%rip), %rdi      # 0x10f1e
xorl %eax, %eax
callq 0x2130
movb 0x10(%rbx), %al
cmpb $0x1, %al
jne 0xa70e
leaq 0x681e(%rip), %rdi      # 0x10f22
xorl %eax, %eax
callq 0x2130
movb 0x10(%rbx), %al
cmpb $0x2, %al
jne 0xa723
leaq 0x680d(%rip), %rdi      # 0x10f26
xorl %eax, %eax
callq 0x2130
movb 0x10(%rbx), %al
cmpb $0x3, %al
jne 0xa738
leaq 0x67fc(%rip), %rdi      # 0x10f2a
xorl %eax, %eax
callq 0x2130
movb 0x10(%rbx), %al
cmpb $0x7, %al
jne 0xa74d
leaq 0x67eb(%rip), %rdi      # 0x10f2e
xorl %eax, %eax
callq 0x2130
movb 0x10(%rbx), %al
cmpb $0x6, %al
jne 0xa762
leaq 0x67db(%rip), %rdi      # 0x10f33
xorl %eax, %eax
callq 0x2130
movb 0x10(%rbx), %al
cmpb $0x5, %al
jne 0xa77b
movq 0x20(%rbx), %rsi
leaq 0x5dd8(%rip), %rdi      # 0x10549
xorl %eax, %eax
callq 0x2130
movb 0x10(%rbx), %al
cmpb $0x8, %al
jne 0xa790
leaq 0x67b2(%rip), %rdi      # 0x10f38
xorl %eax, %eax
callq 0x2130
movb 0x10(%rbx), %al
cmpb $0x9, %al
jne 0xa7a5
leaq 0x67a1(%rip), %rdi      # 0x10f3c
xorl %eax, %eax
callq 0x2130
movb 0x10(%rbx), %al
cmpb $0xa, %al
jne 0xa7ba
leaq 0x6790(%rip), %rdi      # 0x10f40
xorl %eax, %eax
callq 0x2130
movb 0x10(%rbx), %al
cmpb $0xf, %al
jne 0xa7cf
leaq 0x677f(%rip), %rdi      # 0x10f44
xorl %eax, %eax
callq 0x2130
movb 0x10(%rbx), %al
cmpb $0xb, %al
jne 0xa813
movb 0x18(%rbx), %al
leaq 0x6(%rsp), %rdi
movb %al, (%rdi)
movb $0x0, 0x1(%rdi)
leaq 0xea38(%rip), %rsi      # 0x19220
leaq 0xea41(%rip), %rdx      # 0x19230
callq 0xa2f2
movq %rax, %r14
leaq 0x5b4c(%rip), %rdi      # 0x1034a
movq %rax, %rsi
xorl %eax, %eax
callq 0x2130
movq %r14, %rdi
callq 0x23f0
movb 0x10(%rbx), %al
cmpb $0xe, %al
jne 0xa889
movb 0x18(%rbx), %al
leaq 0x6(%rsp), %r14
movb %al, (%r14)
xorl %ebp, %ebp
movb %bpl, 0x1(%r14)
leaq 0xe9f1(%rip), %r15      # 0x19220
leaq 0xe9fa(%rip), %r12      # 0x19230
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0xa2f2
movq %rax, %r13
movb 0x19(%rbx), %al
movb %al, (%r14)
movb %bpl, 0x1(%r14)
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0xa2f2
movq %rax, %r14
leaq 0x66df(%rip), %rdi      # 0x10f48
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 0xa8c3
movq 0x18(%rbx), %rdi
leaq 0xe988(%rip), %rsi      # 0x19220
leaq 0xe991(%rip), %rdx      # 0x19230
callq 0xa2f2
movq %rax, %r14
leaq 0x66a2(%rip), %rdi      # 0x10f50
movq %rax, %rsi
xorl %eax, %eax
callq 0x2130
movq %r14, %rdi
callq 0x23f0
movb 0x10(%rbx), %al
cmpb $0xd, %al
jne 0xa8fd
movq 0x18(%rbx), %rdi
leaq 0xe94e(%rip), %rsi      # 0x19220
leaq 0xe957(%rip), %rdx      # 0x19230
callq 0xa2f2
movq %rax, %r14
leaq 0x666d(%rip), %rdi      # 0x10f55
movq %rax, %rsi
xorl %eax, %eax
callq 0x2130
movq %r14, %rdi
callq 0x23f0
movb 0x10(%rbx), %al
cmpb $0x10, %al
jne 0xa937
movq 0x18(%rbx), %rdi
leaq 0xe914(%rip), %rsi      # 0x19220
leaq 0xe91d(%rip), %rdx      # 0x19230
callq 0xa2f2
movq %rax, %r14
leaq 0x62ce(%rip), %rdi      # 0x10bf0
movq %rax, %rsi
xorl %eax, %eax
callq 0x2130
movq %r14, %rdi
callq 0x23f0
movb 0x10(%rbx), %al
cmpb $0x11, %al
jne 0xa949
movq 0x18(%rbx), %rdi
xorl %esi, %esi
callq 0xa6a1
movb 0x10(%rbx), %al
cmpb $0x12, %al
jne 0xa95b
movq 0x18(%rbx), %rdi
xorl %esi, %esi
callq 0xa6a1
movb 0x10(%rbx), %al
cmpb $0x13, %al
jne 0xa96d
movq 0x18(%rbx), %rdi
xorl %esi, %esi
callq 0xa6a1
movb 0x10(%rbx), %al
cmpb $0x14, %al
jne 0xa987
movq 0x18(%rbx), %rdi
xorl %esi, %esi
callq 0xa6a1
pushq $0x21
popq %rdi
callq 0x2040
movb 0x10(%rbx), %al
cmpb $0x15, %al
jne 0xa9a1
movq 0x18(%rbx), %rdi
xorl %esi, %esi
callq 0xa6a1
pushq $0x3f
popq %rdi
callq 0x2040
movb 0x10(%rbx), %al
cmpb $0x16, %al
jne 0xa9bb
movq 0x28(%rbx), %rdi
xorl %esi, %esi
callq 0xa6a1
pushq $0x2a
popq %rdi
callq 0x2040
movb 0x10(%rbx), %al
cmpb $0x17, %al
jne 0xa9d5
movq 0x28(%rbx), %rdi
xorl %esi, %esi
callq 0xa6a1
pushq $0x2b
popq %rdi
callq 0x2040
movb 0x10(%rbx), %al
cmpb $0x18, %al
jne 0xa9f8
movq 0x28(%rbx), %rdi
xorl %esi, %esi
callq 0xa6a1
movl 0x18(%rbx), %esi
leaq 0x656d(%rip), %rdi      # 0x10f5b
xorl %eax, %eax
callq 0x2130
movb 0x10(%rbx), %al
cmpb $0x19, %al
jne 0xaa50
pushq $0x28
popq %rdi
callq 0x2040
leaq 0x6555(%rip), %r14      # 0x10f60
xorl %r15d, %r15d
movslq 0x18(%rbx), %rax
leaq -0x1(%rax), %rdx
movq 0x20(%rbx), %rcx
cmpq %rdx, %r15
jge 0xaa39
movq (%rcx,%r15,8), %rdi
xorl %esi, %esi
callq 0xa6a1
movq %r14, %rdi
xorl %eax, %eax
callq 0x2130
incq %r15
jmp 0xaa0e
movq -0x8(%rcx,%rax,8), %rdi
xorl %esi, %esi
callq 0xa6a1
pushq $0x29
popq %rdi
callq 0x2040
movb 0x10(%rbx), %al
cmpb $0x1a, %al
jne 0xaa8a
pushq $0x28
popq %rdi
callq 0x2040
xorl %r14d, %r14d
pushq $0x20
popq %rbp
movslq 0x18(%rbx), %rax
leaq -0x1(%rax), %rdx
movq 0x28(%rbx), %rcx
cmpq %rdx, %r14
jge 0xaa99
movq (%rcx,%r14,8), %rdi
xorl %esi, %esi
callq 0xa6a1
movl %ebp, %edi
callq 0x2040
incq %r14
jmp 0xaa62
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq -0x8(%rcx,%rax,8), %rdi
xorl %esi, %esi
callq 0xa6a1
pushq $0x29
popq %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2040
leaq 0x6455(%rip), %rdi      # 0x10f17
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2130