// File: /workspace/github_c_makefile_star2_O0/orangeduck[P]mpc/mpc.c
// Function: mpc_nodecount_unretained
static int mpc_nodecount_unretained(mpc_parser_t* p, int force) {

  int i, total;

  if (p->retained && !force) { return 0; }

  if (p->type == MPC_TYPE_EXPECT) { return 1 + mpc_nodecount_unretained(p->data.expect.x, 0); }

  if (p->type == MPC_TYPE_APPLY)    { return 1 + mpc_nodecount_unretained(p->data.apply.x, 0); }
  if (p->type == MPC_TYPE_APPLY_TO) { return 1 + mpc_nodecount_unretained(p->data.apply_to.x, 0); }
  if (p->type == MPC_TYPE_PREDICT)  { return 1 + mpc_nodecount_unretained(p->data.predict.x, 0); }

  if (p->type == MPC_TYPE_CHECK)    { return 1 + mpc_nodecount_unretained(p->data.check.x, 0); }
  if (p->type == MPC_TYPE_CHECK_WITH) { return 1 + mpc_nodecount_unretained(p->data.check_with.x, 0); }

  if (p->type == MPC_TYPE_NOT)   { return 1 + mpc_nodecount_unretained(p->data.not.x, 0); }
  if (p->type == MPC_TYPE_MAYBE) { return 1 + mpc_nodecount_unretained(p->data.not.x, 0); }

  if (p->type == MPC_TYPE_MANY)  { return 1 + mpc_nodecount_unretained(p->data.repeat.x, 0); }
  if (p->type == MPC_TYPE_MANY1) { return 1 + mpc_nodecount_unretained(p->data.repeat.x, 0); }
  if (p->type == MPC_TYPE_COUNT) { return 1 + mpc_nodecount_unretained(p->data.repeat.x, 0); }
  if (p->type == MPC_TYPE_SEPBY1) {
    total = 1;
    total += mpc_nodecount_unretained(p->data.sepby1.x, 0);
    total += mpc_nodecount_unretained(p->data.sepby1.sep, 0);
    total += mpc_nodecount_unretained(p->data.sepby1.x, 0);
    return total;
  }

  if (p->type == MPC_TYPE_OR) {
    total = 1;
    for(i = 0; i < p->data.or.n; i++) {
      total += mpc_nodecount_unretained(p->data.or.xs[i], 0);
    }
    return total;
  }

  if (p->type == MPC_TYPE_AND) {
    total = 1;
    for(i = 0; i < p->data.and.n; i++) {
      total += mpc_nodecount_unretained(p->data.and.xs[i], 0);
    }
    return total;
  }

  return 1;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movsbl 0x31(%rax), %eax
cmpl $0x0, %eax
je 0xdc9e
cmpl $0x0, -0x14(%rbp)
jne 0xdc9e
movl $0x0, -0x4(%rbp)
jmp 0xdf5e
movq -0x10(%rbp), %rax
movsbl 0x30(%rax), %eax
cmpl $0x5, %eax
jne 0xdcc5
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
xorl %esi, %esi
callq 0xdc70
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0xdf5e
movq -0x10(%rbp), %rax
movsbl 0x30(%rax), %eax
cmpl $0xf, %eax
jne 0xdcec
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
xorl %esi, %esi
callq 0xdc70
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0xdf5e
movq -0x10(%rbp), %rax
movsbl 0x30(%rax), %eax
cmpl $0x10, %eax
jne 0xdd13
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
xorl %esi, %esi
callq 0xdc70
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0xdf5e
movq -0x10(%rbp), %rax
movsbl 0x30(%rax), %eax
cmpl $0x11, %eax
jne 0xdd3a
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
xorl %esi, %esi
callq 0xdc70
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0xdf5e
movq -0x10(%rbp), %rax
movsbl 0x30(%rax), %eax
cmpl $0x19, %eax
jne 0xdd61
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
xorl %esi, %esi
callq 0xdc70
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0xdf5e
movq -0x10(%rbp), %rax
movsbl 0x30(%rax), %eax
cmpl $0x1a, %eax
jne 0xdd88
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
xorl %esi, %esi
callq 0xdc70
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0xdf5e
movq -0x10(%rbp), %rax
movsbl 0x30(%rax), %eax
cmpl $0x12, %eax
jne 0xddaf
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
xorl %esi, %esi
callq 0xdc70
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0xdf5e
movq -0x10(%rbp), %rax
movsbl 0x30(%rax), %eax
cmpl $0x13, %eax
jne 0xddd6
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
xorl %esi, %esi
callq 0xdc70
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0xdf5e
movq -0x10(%rbp), %rax
movsbl 0x30(%rax), %eax
cmpl $0x14, %eax
jne 0xddfd
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
xorl %esi, %esi
callq 0xdc70
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0xdf5e
movq -0x10(%rbp), %rax
movsbl 0x30(%rax), %eax
cmpl $0x15, %eax
jne 0xde24
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
xorl %esi, %esi
callq 0xdc70
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0xdf5e
movq -0x10(%rbp), %rax
movsbl 0x30(%rax), %eax
cmpl $0x16, %eax
jne 0xde4b
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
xorl %esi, %esi
callq 0xdc70
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0xdf5e
movq -0x10(%rbp), %rax
movsbl 0x30(%rax), %eax
cmpl $0x1d, %eax
jne 0xdea9
movl $0x1, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
xorl %esi, %esi
callq 0xdc70
addl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdi
xorl %esi, %esi
callq 0xdc70
addl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
xorl %esi, %esi
callq 0xdc70
addl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xdf5e
movq -0x10(%rbp), %rax
movsbl 0x30(%rax), %eax
cmpl $0x17, %eax
jne 0xdf00
movl $0x1, -0x1c(%rbp)
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jge 0xdef8
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
xorl %esi, %esi
callq 0xdc70
addl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0xdec4
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xdf5e
movq -0x10(%rbp), %rax
movsbl 0x30(%rax), %eax
cmpl $0x18, %eax
jne 0xdf57
movl $0x1, -0x1c(%rbp)
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jge 0xdf4f
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
xorl %esi, %esi
callq 0xdc70
addl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0xdf1b
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xdf5e
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)