// File: /workspace/github_c_makefile_star2_O0/orangeduck[P]mpc/tests/core.c
// Function: test_sepby
void test_sepby(void) {
  mpc_parser_t* CommaSepIdent = mpc_sepby1(mpcf_strfold, mpc_char(','), mpc_ident());

  PT_ASSERT(mpc_test_fail(CommaSepIdent, "", "", streq, free, strprint));
  PT_ASSERT(mpc_test_pass(CommaSepIdent, "one", "one", streq, free, strprint));
  PT_ASSERT(mpc_test_pass(CommaSepIdent, "one,", "one", streq, free, strprint));
  PT_ASSERT(mpc_test_pass(CommaSepIdent, "one,two,", "onetwo", streq, free, strprint));
  PT_ASSERT(mpc_test_pass(CommaSepIdent, "one,two,three", "onetwothree", streq, free, strprint));

  mpc_delete(CommaSepIdent);

  mpc_parser_t* CommaSepIdent1 = mpc_sepby1(fold_vals, mpc_char(','), mpc_ident());
  mpc_result_t r;

  mpc_parse("<test>", "uno,dos,tres,cuatro", CommaSepIdent1, &r);
  char **vals = r.output;
  PT_ASSERT(strcmp("uno",    vals[0]) == 0);
  PT_ASSERT(strcmp("dos",    vals[1]) == 0);
  PT_ASSERT(strcmp("tres",   vals[2]) == 0);
  PT_ASSERT(strcmp("cuatro", vals[3]) == 0);

  free(vals);
  mpc_delete(CommaSepIdent1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl $0x2c, %edi
callq 0x9f20
movq %rax, -0x30(%rbp)
callq 0xb6c0
movq -0x30(%rbp), %rsi
movq %rax, %rdx
leaq 0x7207(%rip), %rdi      # 0xad60
callq 0xa750
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x13a7d(%rip), %rdx     # 0x175ea
leaq -0xe74(%rip), %rcx      # 0x2d00
movq 0x1844d(%rip), %r8      # 0x1bfc8
leaq -0xe52(%rip), %r9       # 0x2d30
movq %rdx, %rsi
callq 0xd6f0
movl %eax, %edi
leaq 0x10d9a(%rip), %rsi     # 0x1492d
leaq 0x105aa(%rip), %rdx     # 0x14144
movl $0xfd, %ecx
callq 0x5780
movq -0x8(%rbp), %rdi
leaq 0x10dba(%rip), %rdx     # 0x14969
leaq -0xeb6(%rip), %rcx      # 0x2d00
movq 0x1840b(%rip), %r8      # 0x1bfc8
leaq -0xe94(%rip), %r9       # 0x2d30
movq %rdx, %rsi
callq 0xd780
movl %eax, %edi
leaq 0x10d98(%rip), %rsi     # 0x1496d
leaq 0x10568(%rip), %rdx     # 0x14144
movl $0xfe, %ecx
callq 0x5780
movq -0x8(%rbp), %rdi
leaq 0x10dbe(%rip), %rsi     # 0x149af
leaq 0x10d71(%rip), %rdx     # 0x14969
leaq -0xeff(%rip), %rcx      # 0x2d00
movq 0x183c2(%rip), %r8      # 0x1bfc8
leaq -0xedd(%rip), %r9       # 0x2d30
callq 0xd780
movl %eax, %edi
leaq 0x10d99(%rip), %rsi     # 0x149b4
leaq 0x10522(%rip), %rdx     # 0x14144
movl $0xff, %ecx
callq 0x5780
movq -0x8(%rbp), %rdi
leaq 0x10dc0(%rip), %rsi     # 0x149f7
leaq 0x10dc2(%rip), %rdx     # 0x14a00
leaq -0xf45(%rip), %rcx      # 0x2d00
movq 0x1837c(%rip), %r8      # 0x1bfc8
leaq -0xf23(%rip), %r9       # 0x2d30
callq 0xd780
movl %eax, %edi
leaq 0x10da6(%rip), %rsi     # 0x14a07
leaq 0x104dc(%rip), %rdx     # 0x14144
movl $0x100, %ecx            # imm = 0x100
callq 0x5780
movq -0x8(%rbp), %rdi
leaq 0x10dd4(%rip), %rsi     # 0x14a51
leaq 0x10ddb(%rip), %rdx     # 0x14a5f
leaq -0xf8b(%rip), %rcx      # 0x2d00
movq 0x18336(%rip), %r8      # 0x1bfc8
leaq -0xf69(%rip), %r9       # 0x2d30
callq 0xd780
movl %eax, %edi
leaq 0x10dc4(%rip), %rsi     # 0x14a6b
leaq 0x10496(%rip), %rdx     # 0x14144
movl $0x101, %ecx            # imm = 0x101
callq 0x5780
movq -0x8(%rbp), %rdi
callq 0x9160
movl $0x2c, %edi
callq 0x9f20
movq %rax, -0x28(%rbp)
callq 0xb6c0
movq -0x28(%rbp), %rsi
movq %rax, %rdx
leaq 0x12e(%rip), %rdi       # 0x3e10
callq 0xa750
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdx
leaq 0x10dc9(%rip), %rdi     # 0x14abf
leaq 0x10dc9(%rip), %rsi     # 0x14ac6
leaq -0x18(%rbp), %rcx
callq 0x88a0
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rsi
leaq 0x10dbe(%rip), %rdi     # 0x14ada
callq 0x2110
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movzbl %al, %edi
leaq 0x10dab(%rip), %rsi     # 0x14ade
leaq 0x1040a(%rip), %rdx     # 0x14144
movl $0x10a, %ecx            # imm = 0x10A
callq 0x5780
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rsi
leaq 0x10da7(%rip), %rdi     # 0x14afa
callq 0x2110
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movzbl %al, %edi
leaq 0x10d94(%rip), %rsi     # 0x14afe
leaq 0x103d3(%rip), %rdx     # 0x14144
movl $0x10b, %ecx            # imm = 0x10B
callq 0x5780
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rsi
leaq 0x10d90(%rip), %rdi     # 0x14b1a
callq 0x2110
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movzbl %al, %edi
leaq 0x10d7e(%rip), %rsi     # 0x14b1f
leaq 0x1039c(%rip), %rdx     # 0x14144
movl $0x10c, %ecx            # imm = 0x10C
callq 0x5780
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rsi
leaq 0x10d12(%rip), %rdi     # 0x14ad3
callq 0x2110
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movzbl %al, %edi
leaq 0x10d64(%rip), %rsi     # 0x14b3c
leaq 0x10365(%rip), %rdx     # 0x14144
movl $0x10d, %ecx            # imm = 0x10D
callq 0x5780
movq -0x20(%rbp), %rdi
callq 0x2240
movq -0x10(%rbp), %rdi
callq 0x9160
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)