// File: /workspace/github_c_makefile_star2_O0/orangeduck[P]mpc/mpc.c
// Function: mpcf_re_range
static mpc_val_t *mpcf_re_range(mpc_val_t *x) {

  mpc_parser_t *out;
  size_t i, j;
  size_t start, end;
  const char *tmp = NULL;
  const char *s = x;
  int comp = s[0] == '^' ? 1 : 0;
  char *range = calloc(1,1);

  if (s[0] == '\0') { free(range); free(x); return mpc_fail("Invalid Regex Range Expression"); }
  if (s[0] == '^' &&
      s[1] == '\0') { free(range); free(x); return mpc_fail("Invalid Regex Range Expression"); }

  for (i = comp; i < strlen(s); i++){

    /* Regex Range Escape */
    if (s[i] == '\\') {
      tmp = mpc_re_range_escape_char(s[i+1]);
      if (tmp != NULL) {
        range = realloc(range, strlen(range) + strlen(tmp) + 1);
        strcat(range, tmp);
      } else {
        range = realloc(range, strlen(range) + 1 + 1);
        range[strlen(range) + 1] = '\0';
        range[strlen(range) + 0] = s[i+1];
      }
      i++;
    }

    /* Regex Range...Range */
    else if (s[i] == '-') {
      if (s[i+1] == '\0' || i == 0) {
          range = realloc(range, strlen(range) + strlen("-") + 1);
          strcat(range, "-");
      } else {
        start = s[i-1]+1;
        end = s[i+1]-1;
        for (j = start; j <= end; j++) {
          range = realloc(range, strlen(range) + 1 + 1 + 1);
          range[strlen(range) + 1] = '\0';
          range[strlen(range) + 0] = (char)j;
        }
      }
    }

    /* Regex Range Normal */
    else {
      range = realloc(range, strlen(range) + 1 + 1);
      range[strlen(range) + 1] = '\0';
      range[strlen(range) + 0] = s[i];
    }

  }

  out = comp == 1 ? mpc_noneof(range) : mpc_oneof(range);

  free(x);
  free(range);

  return out;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdi, -0x10(%rbp)
movq $0x0, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movsbl (%rax), %edx
xorl %eax, %eax
movl $0x1, %ecx
cmpl $0x5e, %edx
cmovel %ecx, %eax
movl %eax, -0x4c(%rbp)
movl $0x1, %esi
movq %rsi, %rdi
callq 0x4390
movq %rax, -0x58(%rbp)
movq -0x48(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x9ffa
movq -0x58(%rbp), %rdi
callq 0x4850
movq -0x10(%rbp), %rdi
callq 0x4850
leaq 0x8901(%rip), %rdi      # 0x128ed
callq 0x46f0
movq %rax, -0x8(%rbp)
jmp 0xa3ac
movq -0x48(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x5e, %eax
jne 0xa03a
movq -0x48(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x0, %eax
jne 0xa03a
movq -0x58(%rbp), %rdi
callq 0x4850
movq -0x10(%rbp), %rdi
callq 0x4850
leaq 0x88c1(%rip), %rdi      # 0x128ed
callq 0x46f0
movq %rax, -0x8(%rbp)
jmp 0xa3ac
movslq -0x4c(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x48(%rbp), %rdi
callq 0x41b0
movq %rax, %rcx
movq -0x60(%rbp), %rax
cmpq %rcx, %rax
jae 0xa35f
movq -0x48(%rbp), %rax
movq -0x20(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x5c, %eax
jne 0xa16a
movq -0x48(%rbp), %rax
movq -0x20(%rbp), %rcx
movsbl 0x1(%rax,%rcx), %edi
callq 0x10fc0
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0xa0da
movq -0x58(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x58(%rbp), %rdi
callq 0x41b0
movq %rax, -0x70(%rbp)
movq -0x40(%rbp), %rdi
callq 0x41b0
movq -0x70(%rbp), %rsi
movq -0x68(%rbp), %rdi
addq %rax, %rsi
addq $0x1, %rsi
callq 0x45e0
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x4720
jmp 0xa159
movq -0x58(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x58(%rbp), %rdi
callq 0x41b0
movq -0x90(%rbp), %rdi
movq %rax, %rsi
addq $0x1, %rsi
addq $0x1, %rsi
callq 0x45e0
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x58(%rbp), %rdi
callq 0x41b0
movq %rax, %rcx
movq -0x88(%rbp), %rax
movb $0x0, 0x1(%rax,%rcx)
movq -0x48(%rbp), %rax
movq -0x20(%rbp), %rcx
movb 0x1(%rax,%rcx), %al
movb %al, -0x79(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x58(%rbp), %rdi
callq 0x41b0
movb -0x79(%rbp), %dl
movq %rax, %rcx
movq -0x78(%rbp), %rax
movb %dl, (%rax,%rcx)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0xa34c
movq -0x48(%rbp), %rax
movq -0x20(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x2d, %eax
jne 0xa2c0
movq -0x48(%rbp), %rax
movq -0x20(%rbp), %rcx
movsbl 0x1(%rax,%rcx), %eax
cmpl $0x0, %eax
je 0xa198
cmpq $0x0, -0x20(%rbp)
jne 0xa1dc
movq -0x58(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x58(%rbp), %rdi
callq 0x41b0
movq -0x98(%rbp), %rdi
movq %rax, %rsi
addq $0x1, %rsi
addq $0x1, %rsi
callq 0x45e0
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rdi
leaq 0x8504(%rip), %rsi      # 0x126d6
callq 0x4720
jmp 0xa2bb
movq -0x48(%rbp), %rax
movq -0x20(%rbp), %rcx
subq $0x1, %rcx
movsbl (%rax,%rcx), %eax
addl $0x1, %eax
cltq
movq %rax, -0x30(%rbp)
movq -0x48(%rbp), %rax
movq -0x20(%rbp), %rcx
movsbl 0x1(%rax,%rcx), %eax
subl $0x1, %eax
cltq
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x38(%rbp), %rax
ja 0xa2b9
movq -0x58(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0x58(%rbp), %rdi
callq 0x41b0
movq -0xb8(%rbp), %rdi
movq %rax, %rsi
addq $0x1, %rsi
addq $0x1, %rsi
addq $0x1, %rsi
callq 0x45e0
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq -0x58(%rbp), %rdi
callq 0x41b0
movq %rax, %rcx
movq -0xb0(%rbp), %rax
movb $0x0, 0x1(%rax,%rcx)
movq -0x28(%rbp), %rax
movb %al, -0xa1(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0x58(%rbp), %rdi
callq 0x41b0
movb -0xa1(%rbp), %dl
movq %rax, %rcx
movq -0xa0(%rbp), %rax
movb %dl, (%rax,%rcx)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0xa213
jmp 0xa2bb
jmp 0xa34a
movq -0x58(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0x58(%rbp), %rdi
callq 0x41b0
movq -0xd8(%rbp), %rdi
movq %rax, %rsi
addq $0x1, %rsi
addq $0x1, %rsi
callq 0x45e0
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq -0x58(%rbp), %rdi
callq 0x41b0
movq %rax, %rcx
movq -0xd0(%rbp), %rax
movb $0x0, 0x1(%rax,%rcx)
movq -0x48(%rbp), %rax
movq -0x20(%rbp), %rcx
movb (%rax,%rcx), %al
movb %al, -0xc1(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq -0x58(%rbp), %rdi
callq 0x41b0
movb -0xc1(%rbp), %dl
movq %rax, %rcx
movq -0xc0(%rbp), %rax
movb %dl, (%rax,%rcx)
jmp 0xa34c
jmp 0xa34e
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0xa042
cmpl $0x1, -0x4c(%rbp)
jne 0xa377
movq -0x58(%rbp), %rdi
callq 0x4220
movq %rax, -0xe0(%rbp)
jmp 0xa387
movq -0x58(%rbp), %rdi
callq 0x4080
movq %rax, -0xe0(%rbp)
movq -0xe0(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x4850
movq -0x58(%rbp), %rdi
callq 0x4850
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0xe0, %rsp
popq %rbp
retq
nopl (%rax)