// File: /workspace/github_c_makefile_star2_O1/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 0xc3c6
cmpb $0x0, (%rbx)
je 0xc3c6
movq 0x8(%rbx), %rsi
testq %rsi, %rsi
je 0xc716
leaq 0x6b11(%rip), %rdi      # 0x12ec2
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2130
cmpb $0x0, 0x10(%rbx)
jne 0xc3da
leaq 0x6afb(%rip), %rdi      # 0x12ece
xorl %eax, %eax
callq 0x2130
cmpb $0x1, 0x10(%rbx)
jne 0xc3ee
leaq 0x6aeb(%rip), %rdi      # 0x12ed2
xorl %eax, %eax
callq 0x2130
cmpb $0x2, 0x10(%rbx)
jne 0xc402
leaq 0x6adb(%rip), %rdi      # 0x12ed6
xorl %eax, %eax
callq 0x2130
cmpb $0x3, 0x10(%rbx)
jne 0xc416
leaq 0x6acb(%rip), %rdi      # 0x12eda
xorl %eax, %eax
callq 0x2130
cmpb $0x7, 0x10(%rbx)
jne 0xc42a
leaq 0x6abb(%rip), %rdi      # 0x12ede
xorl %eax, %eax
callq 0x2130
cmpb $0x6, 0x10(%rbx)
jne 0xc43e
leaq 0x6aac(%rip), %rdi      # 0x12ee3
xorl %eax, %eax
callq 0x2130
cmpb $0x5, 0x10(%rbx)
jne 0xc456
movq 0x20(%rbx), %rsi
leaq 0x60fa(%rip), %rdi      # 0x12549
xorl %eax, %eax
callq 0x2130
cmpb $0x8, 0x10(%rbx)
jne 0xc46a
leaq 0x6a85(%rip), %rdi      # 0x12ee8
xorl %eax, %eax
callq 0x2130
cmpb $0x9, 0x10(%rbx)
jne 0xc47e
leaq 0x6a75(%rip), %rdi      # 0x12eec
xorl %eax, %eax
callq 0x2130
cmpb $0xa, 0x10(%rbx)
jne 0xc492
leaq 0x6a65(%rip), %rdi      # 0x12ef0
xorl %eax, %eax
callq 0x2130
cmpb $0xf, 0x10(%rbx)
jne 0xc4a6
leaq 0x6a55(%rip), %rdi      # 0x12ef4
xorl %eax, %eax
callq 0x2130
cmpb $0xb, 0x10(%rbx)
jne 0xc4e9
movb 0x18(%rbx), %al
leaq 0x6(%rsp), %rdi
movb %al, (%rdi)
movb $0x0, 0x1(%rdi)
leaq 0xed5f(%rip), %rsi      # 0x1b220
leaq 0xed68(%rip), %rdx      # 0x1b230
callq 0xbf1d
movq %rax, %r14
leaq 0x5e73(%rip), %rdi      # 0x1234a
movq %rax, %rsi
xorl %eax, %eax
callq 0x2130
movq %r14, %rdi
callq 0x23f0
cmpb $0xe, 0x10(%rbx)
jne 0xc55e
movb 0x18(%rbx), %al
leaq 0x6(%rsp), %r14
movb %al, (%r14)
xorl %ebp, %ebp
movb %bpl, 0x1(%r14)
leaq 0xed19(%rip), %r15      # 0x1b220
leaq 0xed22(%rip), %r12      # 0x1b230
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0xbf1d
movq %rax, %r13
movb 0x19(%rbx), %al
movb %al, (%r14)
movb %bpl, 0x1(%r14)
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0xbf1d
movq %rax, %r14
leaq 0x69b7(%rip), %rdi      # 0x12ef8
movq %r13, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x2130
movq %r13, %rdi
callq 0x23f0
movq %r14, %rdi
callq 0x23f0
cmpb $0xc, 0x10(%rbx)
jne 0xc597
movq 0x18(%rbx), %rdi
leaq 0xecb1(%rip), %rsi      # 0x1b220
leaq 0xecba(%rip), %rdx      # 0x1b230
callq 0xbf1d
movq %rax, %r14
leaq 0x697b(%rip), %rdi      # 0x12f00
movq %rax, %rsi
xorl %eax, %eax
callq 0x2130
movq %r14, %rdi
callq 0x23f0
cmpb $0xd, 0x10(%rbx)
jne 0xc5d0
movq 0x18(%rbx), %rdi
leaq 0xec78(%rip), %rsi      # 0x1b220
leaq 0xec81(%rip), %rdx      # 0x1b230
callq 0xbf1d
movq %rax, %r14
leaq 0x6947(%rip), %rdi      # 0x12f05
movq %rax, %rsi
xorl %eax, %eax
callq 0x2130
movq %r14, %rdi
callq 0x23f0
cmpb $0x10, 0x10(%rbx)
jne 0xc609
movq 0x18(%rbx), %rdi
leaq 0xec3f(%rip), %rsi      # 0x1b220
leaq 0xec48(%rip), %rdx      # 0x1b230
callq 0xbf1d
movq %rax, %r14
leaq 0x65a9(%rip), %rdi      # 0x12ba0
movq %rax, %rsi
xorl %eax, %eax
callq 0x2130
movq %r14, %rdi
callq 0x23f0
cmpb $0x11, 0x10(%rbx)
jne 0xc61a
movq 0x18(%rbx), %rdi
xorl %esi, %esi
callq 0xc386
cmpb $0x12, 0x10(%rbx)
jne 0xc62b
movq 0x18(%rbx), %rdi
xorl %esi, %esi
callq 0xc386
cmpb $0x13, 0x10(%rbx)
jne 0xc63c
movq 0x18(%rbx), %rdi
xorl %esi, %esi
callq 0xc386
cmpb $0x14, 0x10(%rbx)
jne 0xc657
movq 0x18(%rbx), %rdi
xorl %esi, %esi
callq 0xc386
movl $0x21, %edi
callq 0x2040
cmpb $0x15, 0x10(%rbx)
jne 0xc672
movq 0x18(%rbx), %rdi
xorl %esi, %esi
callq 0xc386
movl $0x3f, %edi
callq 0x2040
cmpb $0x16, 0x10(%rbx)
jne 0xc68d
movq 0x28(%rbx), %rdi
xorl %esi, %esi
callq 0xc386
movl $0x2a, %edi
callq 0x2040
cmpb $0x17, 0x10(%rbx)
jne 0xc6a8
movq 0x28(%rbx), %rdi
xorl %esi, %esi
callq 0xc386
movl $0x2b, %edi
callq 0x2040
cmpb $0x18, 0x10(%rbx)
jne 0xc6ca
movq 0x28(%rbx), %rdi
xorl %esi, %esi
callq 0xc386
movl 0x18(%rbx), %esi
leaq 0x6848(%rip), %rdi      # 0x12f0b
xorl %eax, %eax
callq 0x2130
cmpb $0x19, 0x10(%rbx)
jne 0xc74f
movl $0x28, %edi
callq 0x2040
movl 0x18(%rbx), %eax
cmpl $0x2, %eax
jl 0xc732
leaq 0x6827(%rip), %r14      # 0x12f10
xorl %r15d, %r15d
movq 0x20(%rbx), %rax
movq (%rax,%r15,8), %rdi
xorl %esi, %esi
callq 0xc386
movq %r14, %rdi
xorl %eax, %eax
callq 0x2130
incq %r15
movslq 0x18(%rbx), %rax
decq %rax
cmpq %rax, %r15
jl 0xc6ec
jmp 0xc734
leaq 0x67aa(%rip), %rdi      # 0x12ec7
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2130
decl %eax
movq 0x20(%rbx), %rcx
cltq
movq (%rcx,%rax,8), %rdi
xorl %esi, %esi
callq 0xc386
movl $0x29, %edi
callq 0x2040
cmpb $0x1a, 0x10(%rbx)
jne 0xc794
movl $0x28, %edi
callq 0x2040
movl 0x18(%rbx), %eax
cmpl $0x2, %eax
jl 0xc7a3
xorl %r14d, %r14d
movq 0x28(%rbx), %rax
movq (%rax,%r14,8), %rdi
xorl %esi, %esi
callq 0xc386
movl $0x20, %edi
callq 0x2040
incq %r14
movslq 0x18(%rbx), %rax
decq %rax
cmpq %rax, %r14
jl 0xc76a
jmp 0xc7a5
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
decl %eax
movq 0x28(%rbx), %rcx
cltq
movq (%rcx,%rax,8), %rdi
xorl %esi, %esi
callq 0xc386
movl $0x29, %edi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2040