// File: /workspace/github_c_makefile_star2_O0/voithos[P]awl/src/mpc.c
// Function: mpc_err_repeat
static mpc_err_t *mpc_err_repeat(mpc_err_t *x, const char *prefix) {

  int i;
  char *expect = malloc(strlen(prefix) + 1);
  strcpy(expect, prefix);
  
  if (x->expected_num == 1) {
    expect = realloc(expect, strlen(expect) + strlen(x->expected[0]) + 1);
    strcat(expect, x->expected[0]);
  }
  
  if (x->expected_num > 1) {
  
    for (i = 0; i < x->expected_num-2; i++) {
      expect = realloc(expect, strlen(expect) + strlen(x->expected[i]) + strlen(", ") + 1);
      strcat(expect, x->expected[i]);
      strcat(expect, ", ");
    }
    
    expect = realloc(expect, strlen(expect) + strlen(x->expected[x->expected_num-2]) + strlen(" or ") + 1);
    strcat(expect, x->expected[x->expected_num-2]);
    strcat(expect, " or ");
    expect = realloc(expect, strlen(expect) + strlen(x->expected[x->expected_num-1]) + 1);
    strcat(expect, x->expected[x->expected_num-1]);

  }
  
  mpc_err_clear_expected(x, expect);
  free(expect);
  
  return x;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x20f0
movq %rax, %rdi
addq $0x1, %rdi
callq 0x2250
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x2070
movq -0x8(%rbp), %rax
cmpl $0x1, 0xc(%rax)
jne 0x13fe1
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
callq 0x20f0
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq (%rax), %rdi
callq 0x20f0
movq -0x30(%rbp), %rsi
movq -0x28(%rbp), %rdi
addq %rax, %rsi
addq $0x1, %rsi
callq 0x22a0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq (%rax), %rsi
callq 0x2320
movq -0x8(%rbp), %rax
cmpl $0x1, 0xc(%rax)
jle 0x14172
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x8(%rbp), %rcx
movl 0xc(%rcx), %ecx
subl $0x2, %ecx
cmpl %ecx, %eax
jge 0x14084
movq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rdi
callq 0x20f0
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x20f0
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rdi
addq %rax, %rsi
addq $0x2, %rsi
addq $0x1, %rsi
callq 0x22a0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x2320
movq -0x20(%rbp), %rdi
leaq 0x6d77(%rip), %rsi      # 0x1ade8
callq 0x2320
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x13ff6
movq -0x20(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x20(%rbp), %rdi
callq 0x20f0
movq %rax, -0x60(%rbp)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x8(%rbp), %rcx
movl 0xc(%rcx), %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0x20f0
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rdi
addq %rax, %rsi
addq $0x4, %rsi
addq $0x1, %rsi
callq 0x22a0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x8(%rbp), %rcx
movl 0xc(%rcx), %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rsi
callq 0x2320
movq -0x20(%rbp), %rdi
leaq 0x70a9(%rip), %rsi      # 0x1b1a9
callq 0x2320
movq -0x20(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rdi
callq 0x20f0
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x8(%rbp), %rcx
movl 0xc(%rcx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0x20f0
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdi
addq %rax, %rsi
addq $0x1, %rsi
callq 0x22a0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x8(%rbp), %rcx
movl 0xc(%rcx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rsi
callq 0x2320
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x141a0
movq -0x20(%rbp), %rdi
callq 0x23a0
movq -0x8(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)