// File: /workspace/github_c_makefile_star2_O0/orangeduck[P]mpc/mpc.c
// Function: mpc_undefine_unretained
static void mpc_undefine_unretained(mpc_parser_t *p, int force) {

  if (p->retained && !force) { return; }

  switch (p->type) {

    case MPC_TYPE_FAIL: free(p->data.fail.m); break;

    case MPC_TYPE_ONEOF:
    case MPC_TYPE_NONEOF:
    case MPC_TYPE_STRING:
      free(p->data.string.x);
      break;

    case MPC_TYPE_APPLY:    mpc_undefine_unretained(p->data.apply.x, 0);    break;
    case MPC_TYPE_APPLY_TO: mpc_undefine_unretained(p->data.apply_to.x, 0); break;
    case MPC_TYPE_PREDICT:  mpc_undefine_unretained(p->data.predict.x, 0);  break;

    case MPC_TYPE_MAYBE:
    case MPC_TYPE_NOT:
      mpc_undefine_unretained(p->data.not.x, 0);
      break;

    case MPC_TYPE_EXPECT:
      mpc_undefine_unretained(p->data.expect.x, 0);
      free(p->data.expect.m);
      break;

    case MPC_TYPE_MANY:
    case MPC_TYPE_MANY1:
    case MPC_TYPE_COUNT:
      mpc_undefine_unretained(p->data.repeat.x, 0);
      break;

    case MPC_TYPE_SEPBY1:
      mpc_undefine_unretained(p->data.sepby1.x, 0);
      mpc_undefine_unretained(p->data.sepby1.sep, 0);
      break;

    case MPC_TYPE_OR:  mpc_undefine_or(p);  break;
    case MPC_TYPE_AND: mpc_undefine_and(p); break;

    case MPC_TYPE_CHECK:
      mpc_undefine_unretained(p->data.check.x, 0);
      free(p->data.check.e);
      break;

    case MPC_TYPE_CHECK_WITH:
      mpc_undefine_unretained(p->data.check_with.x, 0);
      free(p->data.check_with.e);
      break;

    default: break;
  }

  if (!force) {
    free(p->name);
    free(p);
  }

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movsbl 0x31(%rax), %eax
cmpl $0x0, %eax
je 0x6c67
cmpl $0x0, -0xc(%rbp)
jne 0x6c67
jmp 0x6dca
movq -0x8(%rbp), %rax
movsbl 0x30(%rax), %eax
addl $-0x2, %eax
movl %eax, %ecx
movq %rcx, -0x18(%rbp)
subl $0x1b, %eax
ja 0x6dad
movq -0x18(%rbp), %rax
leaq 0xb470(%rip), %rcx      # 0x120fc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x4850
jmp 0x6daf
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x4850
jmp 0x6daf
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
xorl %esi, %esi
callq 0x6c40
jmp 0x6daf
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
xorl %esi, %esi
callq 0x6c40
jmp 0x6daf
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
xorl %esi, %esi
callq 0x6c40
jmp 0x6daf
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
xorl %esi, %esi
callq 0x6c40
jmp 0x6daf
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
xorl %esi, %esi
callq 0x6c40
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x4850
jmp 0x6daf
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
xorl %esi, %esi
callq 0x6c40
jmp 0x6daf
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
xorl %esi, %esi
callq 0x6c40
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdi
xorl %esi, %esi
callq 0x6c40
jmp 0x6daf
movq -0x8(%rbp), %rdi
callq 0x10cc0
jmp 0x6daf
movq -0x8(%rbp), %rdi
callq 0x10d20
jmp 0x6daf
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
xorl %esi, %esi
callq 0x6c40
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x4850
jmp 0x6daf
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
xorl %esi, %esi
callq 0x6c40
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0x4850
jmp 0x6daf
jmp 0x6daf
cmpl $0x0, -0xc(%rbp)
jne 0x6dca
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x4850
movq -0x8(%rbp), %rdi
callq 0x4850
addq $0x20, %rsp
popq %rbp
retq