LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/voithos[P]awl/src/mpc.c
// Function: mpcf_escape_new
static mpc_val_t *mpcf_escape_new(mpc_val_t *x, char *input, char **output) {
  
  int i;
  int found;
  char *s = x;
  char *y = calloc(1, 1);
  char buff[2];
  
  while (*s) {
    
    i = 0;
    found = 0;

    while (output[i]) {
      if (*s == input[i]) {
        y = realloc(y, strlen(y) + strlen(output[i]) + 1);
        strcat(y, output[i]);
        found = 1;
        break;
      }
      i++;
    }
    
    if (!found) {
      y = realloc(y, strlen(y) + 2);
      buff[0] = *s; buff[1] = '\0';
      strcat(y, buff);
    }
    
    s++;
  }
  
  
  return y;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, 0x8(%rsp)
movq %rdi, %r15
movl $0x1, %edi
movl $0x1, %esi
callq 0x2200
movq %rax, %r14
movb (%r15), %al
testb %al, %al
je 0xc010
movq 0x8(%rsp), %rdx
movq (%rbx), %rbp
testq %rbp, %rbp
sete %r12b
je 0xbfc7
cmpb (%rdx), %al
jne 0xbf6d
xorl %r13d, %r13d
jmp 0xbf8a
xorl %ecx, %ecx
movq 0x8(%rbx,%rcx,8), %rbp
testq %rbp, %rbp
sete %r12b
je 0xbfc7
leaq 0x1(%rcx), %r13
cmpb 0x1(%rdx,%rcx), %al
movq %r13, %rcx
jne 0xbf6f
movq %r14, %rdi
callq 0x2110
movq %rax, 0x10(%rsp)
movq %rbp, %rdi
callq 0x2110
movq 0x10(%rsp), %rcx
leaq (%rcx,%rax), %rsi
incq %rsi
movq %r14, %rdi
callq 0x22e0
movq %rax, %r14
movq (%rbx,%r13,8), %rsi
movq %rax, %rdi
callq 0x2360
movq 0x8(%rsp), %rdx
testb %r12b, %r12b
je 0xc001
movq %r14, %rdi
callq 0x2110
leaq 0x2(%rax), %rsi
movq %r14, %rdi
callq 0x22e0
movq %rax, %r14
movb (%r15), %al
movb %al, 0x6(%rsp)
movb $0x0, 0x7(%rsp)
movq %r14, %rdi
leaq 0x6(%rsp), %rsi
callq 0x2360
movq 0x8(%rsp), %rdx
movb 0x1(%r15), %al
incq %r15
testb %al, %al
jne 0xbf58
movq %r14, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/voithos[P]awl/src/mpc.c
// Function: mpcf_unescape_new
static mpc_val_t *mpcf_unescape_new(mpc_val_t *x, char *input, char **output) {
  
  int i;
  int found = 0;
  char *s = x;
  char *y = calloc(1, 1);
  char buff[2];

  while (*s) {
    
    i = 0;
    found = 0;
    
    while (output[i]) {
      if ((*(s+0)) == output[i][0] &&
          (*(s+1)) == output[i][1]) {
        y = realloc(y, strlen(y) + 2);
        buff[0] = input[i]; buff[1] = '\0';
        strcat(y, buff);
        found = 1;
        s++;
        break;
      }
      i++;
    }
      
    if (!found) {
      y = realloc(y, strlen(y) + 2);
      buff[0] = *s; buff[1] = '\0';
      strcat(y, buff);
    }
    
    if (*s == '\0') { break; }
    else { s++; }
  }
  
  return y;
  
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, 0x10(%rsp)
movq %rdi, %r15
movl $0x1, %edi
movl $0x1, %esi
callq 0x2200
movq %rax, %r12
movb (%r15), %al
testb %al, %al
je 0xc13c
leaq 0xe(%rsp), %r13
movq (%rbx), %rcx
testq %rcx, %rcx
sete %bpl
je 0xc0f3
xorl %r14d, %r14d
cmpb (%rcx), %al
jne 0xc0a9
movb 0x1(%r15), %dl
cmpb 0x1(%rcx), %dl
je 0xc0bc
movq 0x8(%rbx,%r14,8), %rcx
incq %r14
testq %rcx, %rcx
sete %bpl
jne 0xc09c
jmp 0xc0f3
incq %r15
movq %r12, %rdi
callq 0x2110
leaq 0x2(%rax), %rsi
movq %r12, %rdi
callq 0x22e0
movq %rax, %r12
movq 0x10(%rsp), %rax
movb (%rax,%r14), %al
movb %al, 0xe(%rsp)
movb $0x0, 0xf(%rsp)
movq %r12, %rdi
movq %r13, %rsi
callq 0x2360
testb $0x1, %bpl
je 0xc127
movq %r12, %rdi
callq 0x2110
leaq 0x2(%rax), %rsi
movq %r12, %rdi
callq 0x22e0
movq %rax, %r12
movb (%r15), %al
movb %al, 0xe(%rsp)
movb $0x0, 0xf(%rsp)
movq %r12, %rdi
movq %r13, %rsi
callq 0x2360
cmpb $0x0, (%r15)
je 0xc13c
movb 0x1(%r15), %al
incq %r15
testb %al, %al
jne 0xc08d
movq %r12, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/voithos[P]awl/src/mpc.c
// Function: mpc_test_fail
int mpc_test_fail(mpc_parser_t *p, const char *s, void *d,
  int(*tester)(void*, void*),
  mpc_dtor_t destructor,
  void(*printer)(void*)) {

  mpc_result_t r;  
  if (mpc_parse("<test>", s, p, &r)) {

    if (tester(r.output, d)) {
      destructor(r.output);
      return 0;
    } else {
      destructor(r.output);
      return 1;
    }
  
  } else {
    mpc_err_delete(r.error);
    return 1;
  }
  
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, 0x8(%rsp)
movq %rcx, %r14
movq %rdx, %r15
movq %rdi, %r12
leaq 0x6560(%rip), %rdi      # 0x12d51
callq 0x93c9
movq %rax, %r13
leaq 0x10(%rsp), %rbp
movq %rax, %rdi
movq %r12, %rsi
movq %rbp, %rdx
callq 0x80cd
movl %eax, %ebx
movq %r13, %rdi
callq 0x9459
movq (%rbp), %r12
testl %ebx, %ebx
je 0xc838
movq %r12, %rdi
movq %r15, %rsi
callq *%r14
xorl %ebp, %ebp
testl %eax, %eax
sete %bpl
movq %r12, %rdi
callq *0x8(%rsp)
jmp 0xc845
movq %r12, %rdi
callq 0x7d64
movl $0x1, %ebp
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/voithos[P]awl/src/mpc.c
// Function: mpc_test_pass
int mpc_test_pass(mpc_parser_t *p, const char *s, void *d,
  int(*tester)(void*, void*), 
  mpc_dtor_t destructor, 
  void(*printer)(void*)) {

  mpc_result_t r;  
  if (mpc_parse("<test>", s, p, &r)) {
    
    if (tester(r.output, d)) {
      destructor(r.output);
      return 1;
    } else {
      printf("Got "); printer(r.output); printf("\n");
      printf("Expected "); printer(d); printf("\n");
      destructor(r.output);
      return 0;
    }
    
  } else {    
    mpc_err_print(r.error);
    mpc_err_delete(r.error);
    return 0;
    
  }
  
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, 0x8(%rsp)
movq %r8, (%rsp)
movq %rcx, %r13
movq %rdx, %r15
movq %rdi, %r12
leaq 0x64d4(%rip), %rdi      # 0x12d51
callq 0x93c9
movq %rax, %rbp
leaq 0x10(%rsp), %rbx
movq %rax, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x80cd
movl %eax, %r14d
movq %rbp, %rdi
callq 0x9459
movq (%rbx), %r12
movq %r12, %rdi
testl %r14d, %r14d
je 0xc8c5
movq %r15, %rsi
callq *%r13
testl %eax, %eax
je 0xc8d6
movq %r12, %rdi
callq *(%rsp)
movl $0x1, %ebp
jmp 0xc91d
callq 0x7db7
movq %r12, %rdi
callq 0x7d64
xorl %ebp, %ebp
jmp 0xc91d
leaq 0x647b(%rip), %rdi      # 0x12d58
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x2130
movq %r12, %rdi
movq 0x8(%rsp), %rbx
callq *%rbx
movl $0xa, %edi
callq 0x2040
leaq 0x645c(%rip), %rdi      # 0x12d5d
xorl %eax, %eax
callq 0x2130
movq %r15, %rdi
callq *%rbx
movl $0xa, %edi
callq 0x2040
movq %r12, %rdi
callq *(%rsp)
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/voithos[P]awl/src/mpc.c
// Function: mpc_ast_print_depth
static void mpc_ast_print_depth(mpc_ast_t *a, int d) {
  
  int i;
  for (i = 0; i < d; i++) { printf("  "); }
  
  if (strlen(a->contents)) {
    printf("%s:%i:%i '%s'\n", a->tag, a->state.row+1, a->state.col+1, a->contents);
  } else {
    printf("%s \n", a->tag);
  }
  
  for (i = 0; i < a->children_num; i++) {
    mpc_ast_print_depth(a->children[i], d+1);
  }
  
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
testl %esi, %esi
jle 0xcd24
leaq 0x67e5(%rip), %r15      # 0x134f9
movl %ebx, %ebp
movq %r15, %rdi
xorl %eax, %eax
callq 0x2130
decl %ebp
jne 0xcd16
movq (%r14), %rsi
movq 0x8(%r14), %r8
cmpb $0x0, (%r8)
je 0xcd4d
movl 0x14(%r14), %edx
movl 0x18(%r14), %ecx
incl %edx
incl %ecx
leaq 0x61d0(%rip), %rdi      # 0x12f14
xorl %eax, %eax
callq 0x2130
jmp 0xcd5b
leaq 0x61cf(%rip), %rdi      # 0x12f23
xorl %eax, %eax
callq 0x2130
cmpl $0x0, 0x1c(%r14)
jle 0xcd82
incl %ebx
xorl %r15d, %r15d
movq 0x20(%r14), %rax
movq (%rax,%r15,8), %rdi
movl %ebx, %esi
callq 0xccfd
incq %r15
movslq 0x1c(%r14), %rax
cmpq %rax, %r15
jl 0xcd67
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/voithos[P]awl/src/mpc.c
// Function: mpcf_state_ast
mpc_val_t *mpcf_state_ast(int n, mpc_val_t **xs) {
  mpc_state_t *s = ((mpc_state_t**)xs)[0];
  mpc_ast_t *a = ((mpc_ast_t**)xs)[1];
  a = mpc_ast_state(a, *s);
  free(s);
  return a;
}

// Assembly:
pushq %rbx
movq (%rsi), %rdi
movq 0x8(%rsi), %rbx
testq %rbx, %rbx
je 0xcf6b
movl 0x8(%rdi), %eax
movq (%rdi), %rcx
movq %rcx, 0x10(%rbx)
movl %eax, 0x18(%rbx)
callq 0x23f0
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/voithos[P]awl/src/mpc.c
// Function: mpcaf_grammar_repeat
static mpc_val_t *mpcaf_grammar_repeat(int n, mpc_val_t **xs) {
  
  int num;
  if (xs[1] == NULL) { return xs[0]; }  
  if (strcmp(xs[1], "*") == 0) { free(xs[1]); return mpca_many(xs[0]); }
  if (strcmp(xs[1], "+") == 0) { free(xs[1]); return mpca_many1(xs[0]); }
  if (strcmp(xs[1], "?") == 0) { free(xs[1]); return mpca_maybe(xs[0]); }
  if (strcmp(xs[1], "!") == 0) { free(xs[1]); return mpca_not(xs[0]); }
  num = *((int*)xs[1]);
  free(xs[1]);
  return mpca_count(num, xs[0]);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq 0x8(%rsi), %r14
testq %r14, %r14
je 0xda57
leaq 0x46dc(%rip), %rsi      # 0x12090
movq %r14, %rdi
callq 0x2210
testl %eax, %eax
je 0xda5f
leaq 0x46c3(%rip), %rsi      # 0x1208e
movq %r14, %rdi
callq 0x2210
testl %eax, %eax
je 0xda8a
leaq 0x4813(%rip), %rsi      # 0x121f5
movq %r14, %rdi
callq 0x2210
testl %eax, %eax
je 0xdac4
leaq 0x5576(%rip), %rsi      # 0x12f6f
movq %r14, %rdi
callq 0x2210
testl %eax, %eax
je 0xdaf3
movl (%r14), %ebp
movq %r14, %rdi
callq 0x23f0
movq (%rbx), %rbx
movl $0x1, %edi
movl $0x38, %esi
callq 0x2200
movb $0x0, (%rax)
movq $0x0, 0x8(%rax)
movb $0x18, 0x10(%rax)
movl %ebp, 0x18(%rax)
leaq -0xcb2(%rip), %rcx      # 0xcd8d
movq %rcx, 0x20(%rax)
movq %rbx, 0x28(%rax)
leaq -0x1120(%rip), %rcx     # 0xc92e
movq %rcx, 0x30(%rax)
jmp 0xdb36
movq (%rbx), %rax
jmp 0xdb36
movq %r14, %rdi
callq 0x23f0
movq (%rbx), %rbx
movl $0x1, %edi
movl $0x38, %esi
callq 0x2200
movb $0x0, (%rax)
movq $0x0, 0x8(%rax)
movb $0x16, 0x10(%rax)
jmp 0xdab3
movq %r14, %rdi
callq 0x23f0
movq (%rbx), %rbx
movl $0x1, %edi
movl $0x38, %esi
callq 0x2200
movb $0x0, (%rax)
movq $0x0, 0x8(%rax)
movb $0x17, 0x10(%rax)
movq %rbx, 0x28(%rax)
leaq -0xd31(%rip), %rcx      # 0xcd8d
movq %rcx, 0x20(%rax)
jmp 0xdb36
movq %r14, %rdi
callq 0x23f0
movq (%rbx), %rbx
movl $0x1, %edi
movl $0x38, %esi
callq 0x2200
movb $0x0, (%rax)
movq $0x0, 0x8(%rax)
movb $0x15, 0x10(%rax)
movq %rbx, 0x18(%rax)
jmp 0xdb2b
movq %r14, %rdi
callq 0x23f0
movq (%rbx), %rbx
movl $0x1, %edi
movl $0x38, %esi
callq 0x2200
movb $0x0, (%rax)
movq $0x0, 0x8(%rax)
movb $0x14, 0x10(%rax)
movq %rbx, 0x18(%rax)
leaq -0x11f9(%rip), %rcx     # 0xc92e
movq %rcx, 0x20(%rax)
leaq -0x3b37(%rip), %rcx     # 0x9ffb
movq %rcx, 0x28(%rax)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/voithos[P]awl/src/mpc.c
// Function: mpca_grammar
mpc_parser_t *mpca_grammar(int flags, const char *grammar, ...) {
  mpca_grammar_st_t st;
  mpc_parser_t *res;
  va_list va;
  va_start(va, grammar);
  
  st.va = &va;
  st.parsers_num = 0;
  st.parsers = NULL;
  st.flags = flags;
  
  res = mpca_grammar_st(grammar, &st);  
  free(st.parsers);
  va_end(va);
  return res;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xf8, %rsp
leaq 0x40(%rsp), %r10
movq %rdx, 0x10(%r10)
movq %rcx, 0x18(%r10)
movq %r8, 0x20(%r10)
movq %r9, 0x28(%r10)
testb %al, %al
je 0xdeea
movaps %xmm0, 0x70(%rsp)
movaps %xmm1, 0x80(%rsp)
movaps %xmm2, 0x90(%rsp)
movaps %xmm3, 0xa0(%rsp)
movaps %xmm4, 0xb0(%rsp)
movaps %xmm5, 0xc0(%rsp)
movaps %xmm6, 0xd0(%rsp)
movaps %xmm7, 0xe0(%rsp)
movq %rsp, %rax
movq %r10, 0x10(%rax)
leaq 0x110(%rsp), %rcx
movq %rcx, 0x8(%rax)
movabsq $0x3000000010, %rcx     # imm = 0x3000000010
movq %rcx, (%rax)
leaq 0x20(%rsp), %rbx
movq %rax, (%rbx)
movl $0x0, 0x8(%rbx)
movq $0x0, 0x10(%rbx)
movl %edi, 0x18(%rbx)
movq %rsi, %rdi
movq %rbx, %rsi
callq 0xd40e
movq %rax, %r14
movq 0x10(%rbx), %rdi
callq 0x23f0
movq %r14, %rax
addq $0xf8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/voithos[P]awl/src/mpc.c
// Function: mpca_lang_contents
mpc_err_t *mpca_lang_contents(int flags, const char *filename, ...) {
  
  mpca_grammar_st_t st;
  mpc_input_t *i;
  mpc_err_t *err;
  
  va_list va;

  FILE *f = fopen(filename, "rb");
  
  if (f == NULL) {
    return mpc_err_fail(filename, mpc_state_new(), "Unable to open file!");
  }
  
  va_start(va, filename);
  
  st.va = &va;
  st.parsers_num = 0;
  st.parsers = NULL;
  st.flags = flags;
  
  i = mpc_input_new_file(filename, f);
  err = mpca_lang_st(i, &st);
  mpc_input_delete(i);
  
  free(st.parsers);
  va_end(va);  
  
  fclose(f);
  
  return err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xf0, %rsp
movq %rsi, %r14
movl %edi, %ebp
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0xe831
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
leaq 0x42cd(%rip), %rsi      # 0x12b05
movq %r14, %rdi
callq 0x2330
testq %rax, %rax
je 0xe8d8
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq %rsp, %rcx
movq %rax, 0x10(%rcx)
leaq 0x120(%rsp), %rax
movq %rax, 0x8(%rcx)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%rcx)
leaq 0xd0(%rsp), %r15
movq %rcx, (%r15)
movl $0x0, 0x8(%r15)
movq $0x0, 0x10(%r15)
movl %ebp, 0x18(%r15)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x94d0
movq %rax, %r14
movq %rax, %rdi
movq %r15, %rsi
callq 0xe023
movq %rax, %r12
movq %r14, %rdi
callq 0x9459
movq 0x10(%r15), %rdi
callq 0x23f0
movq %rbx, %rdi
callq 0x2100
movq %r12, %rax
addq $0xf0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4229(%rip), %rcx      # 0x12b08
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
addq $0xf0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x8f2e
// File: /workspace/github_c_makefile_star2_O1/voithos[P]awl/src/mpc.c
// Function: mpc_input_getc
static char mpc_input_getc(mpc_input_t *i) {
  
  char c;
  switch (i->type) {
    
    case MPC_INPUT_STRING: c = i->string[i->state.pos]; break;
    case MPC_INPUT_FILE: c = fgetc(i->file); break;
    case MPC_INPUT_PIPE:
    
      if (!i->buffer) { c = getc(i->file); break; }
      
      if (i->buffer && mpc_input_buffer_in_range(i)) {
        c = mpc_input_buffer_get(i);
      } else {
        c = getc(i->file);
      }
    
    break;
    
  }
  
  return c;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl (%rdi), %ecx
cmpl $0x2, %ecx
je 0xe92a
cmpl $0x1, %ecx
je 0xe91f
testl %ecx, %ecx
jne 0xe960
movq 0x20(%rbx), %rax
movslq 0x10(%rbx), %rcx
movb (%rax,%rcx), %al
jmp 0xe960
movq 0x30(%rbx), %rdi
callq 0x2190
jmp 0xe960
movq 0x28(%rbx), %r14
testq %r14, %r14
je 0xe957
movslq 0x10(%rbx), %r15
movq %r14, %rdi
callq 0x2110
movq 0x40(%rbx), %rcx
movslq (%rcx), %rcx
addq %rcx, %rax
cmpq %r15, %rax
jbe 0xe957
subq %rcx, %r15
movb (%r14,%r15), %al
jmp 0xe960
movq 0x30(%rbx), %rdi
callq 0x23b0
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/voithos[P]awl/src/mpc.c
// Function: mpc_input_terminated
static int mpc_input_terminated(mpc_input_t *i) {
  if (i->type == MPC_INPUT_STRING && i->state.pos == strlen(i->string)) { return 1; }
  if (i->type == MPC_INPUT_FILE && feof(i->file)) { return 1; }
  if (i->type == MPC_INPUT_PIPE && feof(i->file)) { return 1; }
  return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl (%rdi), %ebp
cmpl $0x1, %ebp
je 0xe997
testl %ebp, %ebp
jne 0xe9ab
movslq 0x10(%rbx), %r14
movq 0x20(%rbx), %rdi
callq 0x2110
movq %rax, %rcx
movl $0x1, %eax
cmpq %r14, %rcx
je 0xe9c6
cmpl $0x1, %ebp
jne 0xe9ab
movq 0x30(%rbx), %rdi
callq 0x2240
movl %eax, %ecx
movl $0x1, %eax
testl %ecx, %ecx
jne 0xe9c6
cmpl $0x2, (%rbx)
jne 0xe9c4
movq 0x30(%rbx), %rdi
callq 0x2240
movl %eax, %ecx
movl $0x1, %eax
testl %ecx, %ecx
jne 0xe9c6
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/voithos[P]awl/src/mpc.c
// Function: mpc_input_failure
static int mpc_input_failure(mpc_input_t *i, char c) {

  switch (i->type) {
    case MPC_INPUT_STRING: break;
    case MPC_INPUT_FILE: fseek(i->file, -1, SEEK_CUR); break;
    case MPC_INPUT_PIPE:
      
      if (!i->buffer) { ungetc(c, i->file); break; }
      
      if (i->buffer && mpc_input_buffer_in_range(i)) {
        break;
      } else {
        ungetc(c, i->file); 
      }
      
  }
  
  return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl (%rdi), %eax
cmpl $0x2, %eax
je 0xe9f7
cmpl $0x1, %eax
jne 0xea1a
movq 0x30(%rbx), %rdi
movq $-0x1, %rsi
movl $0x1, %edx
popq %rbx
popq %r14
popq %rbp
jmp 0x22d0
movl %esi, %ebp
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0xea1f
movslq 0x10(%rbx), %r14
callq 0x2110
movq 0x40(%rbx), %rcx
movslq (%rcx), %rcx
addq %rax, %rcx
cmpq %r14, %rcx
jbe 0xea1f
popq %rbx
popq %r14
popq %rbp
retq
movsbl %bpl, %edi
movq 0x30(%rbx), %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x22c0
// File: /workspace/github_c_makefile_star2_O1/voithos[P]awl/src/mpc.c
// Function: mpc_input_success
static int mpc_input_success(mpc_input_t *i, char c, char **o) {
  
  if (i->type == MPC_INPUT_PIPE &&
      i->buffer &&
      !mpc_input_buffer_in_range(i)) {
    
    i->buffer = realloc(i->buffer, strlen(i->buffer) + 2);
    i->buffer[strlen(i->buffer) + 1] = '\0';
    i->buffer[strlen(i->buffer) + 0] = c;
  }
  
  i->last = c;
  i->state.pos++;
  i->state.col++;
  
  if (c == '\n') {
    i->state.col = 0;
    i->state.row++;
  }
  
  if (o) {
    (*o) = malloc(2);
    (*o)[0] = c;
    (*o)[1] = '\0';
  }
  
  return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r14
movl %esi, %ebx
movq %rdi, %r15
cmpl $0x2, (%rdi)
jne 0xea9a
movq 0x28(%r15), %r12
testq %r12, %r12
je 0xea9a
movslq 0x10(%r15), %r13
movq %r12, %rdi
callq 0x2110
movq 0x40(%r15), %rcx
movslq (%rcx), %rcx
addq %rax, %rcx
cmpq %r13, %rcx
ja 0xea9a
addq $0x2, %rax
movq %r12, %rdi
movq %rax, %rsi
callq 0x22e0
movq %rax, %r12
movq %rax, 0x28(%r15)
movq %rax, %rdi
callq 0x2110
movb $0x0, 0x1(%r12,%rax)
movq %r12, %rdi
callq 0x2110
movb %bl, (%r12,%rax)
movb %bl, 0x50(%r15)
incl 0x10(%r15)
incl 0x18(%r15)
cmpb $0xa, %bl
jne 0xeab7
movl $0x0, 0x18(%r15)
incl 0x14(%r15)
testq %r14, %r14
je 0xeacf
movl $0x2, %edi
callq 0x2290
movq %rax, (%r14)
movb %bl, (%rax)
movb $0x0, 0x1(%rax)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/voithos[P]awl/src/parser.c
// Function: awlval_parse
bool awlval_parse(const char* input, awlval** v, char** err) {
    mpc_result_t r;
    if (mpc_parse("<stdin>", input, Awl, &r)) {
        *v = awlval_read(r.output);
        mpc_ast_delete(r.output);
        return true;
    } else {
        *err = mpc_err_string(r.error);
        mpc_err_delete(r.error);
        return false;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rsi
movq 0xbf65(%rip), %rdx      # 0x1b3d0
leaq 0x408a(%rip), %rdi      # 0x134fc
movq %rsp, %r12
movq %r12, %rcx
callq 0x9396
movl %eax, %ebx
movq (%r12), %rdi
testl %eax, %eax
je 0xf49a
callq 0xf4bc
movq %rax, (%r15)
movq (%rsp), %rdi
callq 0xc92e
jmp 0xf4ab
callq 0x7e10
movq %rax, (%r14)
movq (%rsp), %rdi
callq 0x7d64
testl %ebx, %ebx
setne %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/voithos[P]awl/src/parser.c
// Function: awlval_parse_file
bool awlval_parse_file(const char* file, awlval** v, char** err) {
    mpc_result_t r;
    if (mpc_parse_contents(file, Awl, &r)) {
        *v = awlval_read(r.output);
        mpc_ast_delete(r.output);
        return true;
    } else {
        *err = mpc_err_string(r.error);
        mpc_err_delete(r.error);
        return false;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq 0xbae9(%rip), %rsi      # 0x1b3d0
movq %rsp, %r12
movq %r12, %rdx
callq 0x95f0
movl %eax, %ebx
movq (%r12), %rdi
testl %eax, %eax
je 0xf90f
callq 0xf4bc
movq %rax, (%r15)
movq (%rsp), %rdi
callq 0xc92e
jmp 0xf920
callq 0x7e10
movq %rax, (%r14)
movq (%rsp), %rdi
callq 0x7d64
testl %ebx, %ebx
setne %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/voithos[P]awl/src/parser.c
// Function: awlval_read_qsym
static awlval* awlval_read_qsym(const mpc_ast_t* t) {
    if (strstr(t->children[1]->tag, "symbol")) {
        return awlval_qsym(t->children[1]->contents);
    }

    // Handle qsym string form (:'sym')
    t->children[1]->contents[strlen(t->children[1]->contents) - 1] = '\0';

    char* unescaped = safe_malloc(strlen(t->children[1]->contents + 1) + 1);
    strcpy(unescaped, t->children[1]->contents + 1);
    unescaped = mpcf_unescape(unescaped);
    awlval* qsym = awlval_qsym(unescaped);

    free(unescaped);
    return qsym;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x20(%rdi), %rax
movq 0x8(%rax), %r14
movq (%r14), %rdi
leaq 0x2dc0(%rip), %rsi      # 0x1270a
callq 0x23c0
movq 0x8(%r14), %r14
testq %rax, %rax
je 0xf967
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x104ec
movq %r14, %rdi
callq 0x2110
movb $0x0, -0x1(%r14,%rax)
movq 0x20(%rbx), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rbx
incq %rbx
movq %rbx, %rdi
callq 0x2110
leaq 0x1(%rax), %rdi
callq 0x2290
testq %rax, %rax
je 0xf9d1
movq %rax, %r14
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2080
movq %r14, %rdi
callq 0xc022
movq %rax, %rbx
movq %rax, %rdi
callq 0x104ec
movq %rax, %r14
movq %rbx, %rdi
callq 0x23f0
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0x2606
// File: /workspace/github_c_makefile_star2_O1/voithos[P]awl/src/parser.c
// Function: awlval_read_dict
static awlval* awlval_read_dict(const mpc_ast_t* t) {
    awlval* x = awlval_dict();

    bool new_dict_item = true;
    awlval* qsym;
    awlval* val;

    for (int i = 0; i < t->children_num; i++) {
        if (streq(t->children[i]->contents, "[")) { continue; }
        if (streq(t->children[i]->contents, "]")) { continue; }
        if (streq(t->children[i]->tag, "regex")) { continue; }
        if (strstr(t->children[i]->tag, "comment")) { continue; }

        if (new_dict_item) {
            qsym = awlval_read(t->children[i]);
            new_dict_item = false;
        } else {
            val = awlval_read(t->children[i]);
            x = awlval_add_dict(x, qsym, val);
            new_dict_item = true;

            awlval_del(qsym);
            awlval_del(val);
        }
    }

    return x;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
callq 0x1068b
movq %rax, 0x10(%rsp)
cmpl $0x0, 0x1c(%rbx)
jle 0xfada
movb $0x1, %al
movl %eax, 0xc(%rsp)
xorl %r13d, %r13d
leaq 0x3306(%rip), %r15      # 0x12d11
leaq 0x34ec(%rip), %r12      # 0x12efe
movq 0x20(%rbx), %rax
movq (%rax,%r13,8), %rax
movq 0x8(%rax), %rdi
movq %r15, %rsi
callq 0x11b89
testb %al, %al
jne 0xfac4
movq 0x20(%rbx), %rax
movq (%rax,%r13,8), %rax
movq 0x8(%rax), %rdi
movq %r12, %rsi
callq 0x11b89
testb %al, %al
jne 0xfac4
movq 0x20(%rbx), %rax
movq (%rax,%r13,8), %rax
movq (%rax), %rdi
leaq 0x32ad(%rip), %rsi      # 0x12d05
callq 0x11b89
testb %al, %al
jne 0xfac4
movq 0x20(%rbx), %rax
movq (%rax,%r13,8), %r14
movq (%r14), %rdi
leaq 0x3518(%rip), %rsi      # 0x12f8b
callq 0x23c0
testq %rax, %rax
jne 0xfac4
movq %r14, %rdi
callq 0xf4bc
movq %rax, %r14
testb $0x1, 0xc(%rsp)
je 0xfa99
movl $0x0, 0xc(%rsp)
jmp 0xfac7
movq 0x10(%rsp), %rdi
movq %rbp, %rsi
movq %r14, %rdx
callq 0x108d0
movq %rax, 0x10(%rsp)
movq %rbp, %rdi
callq 0x10767
movq %r14, %rdi
callq 0x10767
movb $0x1, %al
movl %eax, 0xc(%rsp)
movq %rbp, %r14
incq %r13
movslq 0x1c(%rbx), %rax
movq %r14, %rbp
cmpq %rax, %r13
jl 0xfa12
movq 0x10(%rsp), %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/voithos[P]awl/src/print.c
// Function: awl_printf
void awl_printf(const char* format, ...) {
    /* TODO: Make it similar to stringbuilder_t? */
    char* buffer = safe_malloc(BUFSIZE);
    va_list arguments;
    va_start(arguments, format);

    vsnprintf(buffer, BUFSIZE, format, arguments);
    print_fn(buffer);

    va_end(arguments);
    free(buffer);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xd8, %rsp
movq %rdi, %rbx
movq %rsi, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0xfb77
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movl $0x1000, %edi           # imm = 0x1000
callq 0x2290
testq %rax, %rax
je 0xfbda
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq %rsp, %rcx
movq %rax, 0x10(%rcx)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%rcx)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rcx)
movl $0x1000, %esi           # imm = 0x1000
movq %r14, %rdi
movq %rbx, %rdx
callq 0x20c0
movq %r14, %rdi
callq *0xb811(%rip)           # 0x1b3d8
movq %r14, %rdi
callq 0x23f0
addq $0xd8, %rsp
popq %rbx
popq %r14
retq
callq 0x262b
// File: /workspace/github_c_makefile_star2_O1/voithos[P]awl/src/print.c
// Function: awlval_to_str
char* awlval_to_str(const awlval* v) {
    stringbuilder_t* sb = stringbuilder_new();
    awlval_write_sb(sb, v);
    char* str = stringbuilder_to_str(sb);
    stringbuilder_del(sb);
    return str;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x119dc
movq %rax, %r14
movq %rax, %rdi
movq %rbx, %rsi
callq 0xfc5a
movq %r14, %rdi
callq 0x11b3e
movq %rax, %rbx
movq %r14, %rdi
callq 0x11b73
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/voithos[P]awl/src/print.c
// Function: awlval_expr_print
static void awlval_expr_print(stringbuilder_t* sb, const awlval* v, const char* open, const char* close) {
    stringbuilder_write(sb, open);
    for (int i = 0; i < v->count; i++) {
        awlval_write_sb(sb, v->cell[i]);

        if (i != (v->count - 1)) {
            stringbuilder_write(sb, " ");
        }
    }
    stringbuilder_write(sb, close);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq %rdx, %rsi
xorl %eax, %eax
callq 0x11a1e
cmpl $0x0, 0x4(%r15)
jle 0xff62
leaq 0x35cf(%rip), %r12      # 0x134fa
xorl %r13d, %r13d
movq 0x8(%r15), %rax
movq (%rax,%r13,8), %rsi
movq %r14, %rdi
callq 0xfc5a
movl 0x4(%r15), %eax
decl %eax
cmpq %rax, %r13
je 0xff56
movq %r14, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x11a1e
incq %r13
movslq 0x4(%r15), %rax
cmpq %rax, %r13
jl 0xff2e
movq %r14, %rdi
movq %rbx, %rsi
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x11a1e
// File: /workspace/github_c_makefile_star2_O1/voithos[P]awl/src/repl.c
// Function: eval_repl
awlval* eval_repl(awlenv* e, awlval* v) {
    if (v->count == 0) {
        awlval_del(v);
        return awlval_qexpr();
    }
    if (v->count != 1) {
        awlval_del(v);
        return awlval_err("too many expressions in REPL; only one is allowed");
    }
    return awlval_eval(e, awlval_take(v, 0));
}

// Assembly:
pushq %rbx
movl 0x4(%rsi), %eax
cmpl $0x1, %eax
je 0xffb7
movq %rsi, %rdi
testl %eax, %eax
jne 0xffd0
callq 0x10767
popq %rbx
jmp 0x106fb
movq %rdi, %rbx
movq %rsi, %rdi
xorl %esi, %esi
callq 0x10c7f
movq %rbx, %rdi
movq %rax, %rsi
popq %rbx
jmp 0x5e90
callq 0x10767
leaq 0x35d0(%rip), %rdi      # 0x135ac
xorl %eax, %eax
popq %rbx
jmp 0x1032f
// File: /workspace/github_c_makefile_star2_O1/voithos[P]awl/src/repl.c
// Function: eval_repl_str
void eval_repl_str(awlenv* e, const char* input) {
    awlval* v;
    char* err;
    if (awlval_parse(input, &v, &err)) {
        awlval* x = eval_repl(e, v);
        if (!is_awlval_empty_qexpr(x)) {
            awlval_println(x);
        }
        awlval_del(x);
    } else {
        awl_printf("%s", err);
        free(err);
    }
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rax
movq %rdi, %rbx
leaq 0x8(%rsp), %rsi
movq %rsp, %rdx
movq %rax, %rdi
callq 0xf453
testb %al, %al
je 0x10031
movq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0xff9c
movq %rax, %rbx
movq %rax, %rdi
callq 0x113e5
testb %al, %al
jne 0x10027
movq %rbx, %rdi
callq 0xfbdf
movq %rbx, %rdi
callq 0x10767
jmp 0x1004c
movq (%rsp), %rsi
leaq 0x250d(%rip), %rdi      # 0x12549
xorl %eax, %eax
callq 0xfb16
movq (%rsp), %rdi
callq 0x23f0
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/voithos[P]awl/src/repl.c
// Function: run_repl
void run_repl(awlenv* e) {
    setup_sigint_handler();

    awl_printf("awl %s\n", get_awl_version());
    awl_printf("Ctrl+D to exit\n\n");

    load_history();

    while (!repl_aborted) {
        errno = 0;
        char* input = get_input("awl> ");
        if (!input) {
            if (errno == EAGAIN) {
                continue;
            } else {
                awl_printf("\n");
                break;
            }
        }
        add_history(input);
        eval_repl_str(e, input);
        free(input);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq 0xc5(%rip), %rsi        # 0x10132
movl $0x2, %edi
callq 0x2220
callq 0x2cd9
leaq 0x355b(%rip), %rdi      # 0x135de
movq %rax, %rsi
xorl %eax, %eax
callq 0xfb16
leaq 0x3552(%rip), %rdi      # 0x135e6
xorl %eax, %eax
callq 0xfb16
leaq 0x3501(%rip), %rdi      # 0x135a3
callq 0x7b38
cmpb $0x0, 0xb332(%rip)      # 0x1b3e0
jne 0x10111
callq 0x2060
movq %rax, %r14
leaq 0x3538(%rip), %r15      # 0x135f7
leaq 0x34dd(%rip), %r12      # 0x135a3
movl $0x0, (%r14)
movq %r15, %rdi
callq 0x7149
testq %rax, %rax
je 0x10102
movq %rax, %r13
movq %rax, %rdi
callq 0x7916
movq %r12, %rdi
callq 0x7ace
movq %rbx, %rdi
movq %r13, %rsi
callq 0xffe4
movq %r13, %rdi
callq 0x23f0
jmp 0x10108
cmpl $0xb, (%r14)
jne 0x1011b
cmpb $0x0, 0xb2d1(%rip)      # 0x1b3e0
je 0x100c6
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x34d3(%rip), %rdi      # 0x135f5
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xfb16
// File: /workspace/github_c_makefile_star2_O1/voithos[P]awl/src/types.c
// Function: awlval_err
awlval* awlval_err(const char* fmt, ...) {
    awlval* v = safe_malloc(sizeof(awlval));
    v->type = AWLVAL_ERR;

    va_list va;
    va_start(va, fmt);

    v->err = safe_malloc(512);
    vsnprintf(v->err, 512, fmt, va);

    unsigned int l = strlen(v->err) + 1;
    v->err = realloc(v->err, l);
    v->err[l - 1] = '\0';

    va_end(va);

    return v;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movq %rdi, %r14
movq %rsi, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0x10392
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movl $0x38, %edi
callq 0x2290
testq %rax, %rax
je 0x1042d
movq %rax, %rbx
movl $0x2, (%rax)
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%rsp)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rsp)
movl $0x200, %edi            # imm = 0x200
callq 0x2290
testq %rax, %rax
je 0x10432
movq %rax, %r15
movq %rax, 0x18(%rbx)
movq %rsp, %rcx
movl $0x200, %esi            # imm = 0x200
movq %rax, %rdi
movq %r14, %rdx
callq 0x20c0
movq %r15, %rdi
callq 0x2110
movq %rax, %r14
leal 0x1(%rax), %esi
movq %r15, %rdi
callq 0x22e0
movq %rax, 0x18(%rbx)
movl %r14d, %ecx
movb $0x0, (%rax,%rcx)
movq %rbx, %rax
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %r15
retq
callq 0x269a
callq 0x2675
// File: /workspace/github_c_makefile_star2_O1/voithos[P]awl/src/types.c
// Function: awlval_int
awlval* awlval_int(long x) {
    awlval* v = safe_malloc(sizeof(awlval));
    v->type = AWLVAL_INT;
    v->lng = x;
    return v;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x38, %edi
callq 0x2290
testq %rax, %rax
je 0x10456
movl $0x0, (%rax)
movq %rbx, 0x18(%rax)
popq %rbx
retq
callq 0x26bf
// File: /workspace/github_c_makefile_star2_O1/voithos[P]awl/src/types.c
// Function: awlval_float
awlval* awlval_float(double x) {
    awlval* v = safe_malloc(sizeof(awlval));
    v->type = AWLVAL_FLOAT;
    v->dbl = x;
    return v;
}

// Assembly:
pushq %rax
movsd %xmm0, (%rsp)
movl $0x38, %edi
callq 0x2290
testq %rax, %rax
je 0x10482
movl $0x1, (%rax)
movsd (%rsp), %xmm0
movsd %xmm0, 0x18(%rax)
popq %rcx
retq
callq 0x26e4
// File: /workspace/github_c_makefile_star2_O1/voithos[P]awl/src/types.c
// Function: awlval_sym_base
static awlval* awlval_sym_base(const char* s) {
    awlval* v = safe_malloc(sizeof(awlval));
    v->length = strlen(s);
    v->sym = safe_malloc(strlen(s) + 1);
    strcpy(v->sym, s);
    return v;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x38, %edi
callq 0x2290
testq %rax, %rax
je 0x104e2
movq %rax, %r14
movq %rbx, %rdi
callq 0x2110
movl %eax, 0x10(%r14)
leaq 0x1(%rax), %rdi
callq 0x2290
testq %rax, %rax
je 0x104e7
movq %rax, 0x18(%r14)
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2080
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0x272e
callq 0x2709
// File: /workspace/github_c_makefile_star2_O1/voithos[P]awl/src/types.c
// Function: awlval_str
awlval* awlval_str(const char* s) {
    awlval* v = safe_malloc(sizeof(awlval));
    v->type = AWLVAL_STR;
    v->length = strlen(s);
    v->str = safe_malloc(v->length + 1);
    strcpy(v->str, s);
    return v;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x38, %edi
callq 0x2290
testq %rax, %rax
je 0x1054e
movq %rax, %r14
movl $0x5, (%rax)
movq %rbx, %rdi
callq 0x2110
movl %eax, 0x10(%r14)
incl %eax
movslq %eax, %rdi
callq 0x2290
testq %rax, %rax
je 0x10553
movq %rax, 0x18(%r14)
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2080
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0x2778
callq 0x2753
// File: /workspace/github_c_makefile_star2_O1/voithos[P]awl/src/types.c
// Function: awlval_bool
awlval* awlval_bool(bool b) {
    awlval* v = safe_malloc(sizeof(awlval));
    v->type = AWLVAL_BOOL;
    v->bln = b;
    return v;
}

// Assembly:
pushq %rbx
movl %edi, %ebx
movl $0x38, %edi
callq 0x2290
testq %rax, %rax
je 0x10575
movl $0x6, (%rax)
movb %bl, 0x18(%rax)
popq %rbx
retq
callq 0x279d
// File: /workspace/github_c_makefile_star2_O1/voithos[P]awl/src/types.c
// Function: awlval_fun
awlval* awlval_fun(const awlbuiltin builtin, const char* builtin_name) {
    awlval* v = safe_malloc(sizeof(awlval));
    v->type = AWLVAL_BUILTIN;
    v->builtin = builtin;
    v->builtin_name = safe_malloc(strlen(builtin_name) + 1);
    strcpy(v->builtin_name, builtin_name);
    return v;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r15
movl $0x38, %edi
callq 0x2290
testq %rax, %rax
je 0x105cf
movq %rax, %r14
movl $0x7, (%rax)
movq %r15, 0x18(%rax)
movq %rbx, %rdi
callq 0x2110
leaq 0x1(%rax), %rdi
callq 0x2290
testq %rax, %rax
je 0x105d4
movq %rax, 0x20(%r14)
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2080
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
callq 0x27e7
callq 0x27c2
// File: /workspace/github_c_makefile_star2_O1/voithos[P]awl/src/types.c
// Function: awlval_lambda
awlval* awlval_lambda(awlenv* closure, awlval* formals, awlval* body) {
    awlval* v = safe_malloc(sizeof(awlval));
    v->type = AWLVAL_FN;
    v->env = awlenv_new();
    v->env->parent = closure;
    v->env->parent->references++;
    v->formals = formals;
    v->body = body;
    v->called = false;
    return v;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movl $0x38, %edi
callq 0x2290
testq %rax, %rax
je 0x10632
movq %rax, %r12
movl $0x8, (%rax)
callq 0x10637
movq %rax, 0x18(%r12)
movq %r15, (%rax)
incl 0x14(%r15)
movq %r14, 0x20(%r12)
movq %rbx, 0x28(%r12)
movb $0x0, 0x30(%r12)
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
callq 0x280c
// File: /workspace/github_c_makefile_star2_O1/voithos[P]awl/src/types.c
// Function: awlenv_new
awlenv* awlenv_new(void) {
    awlenv* e = safe_malloc(sizeof(awlenv));
    e->parent = NULL;
    e->internal_dict = dict_new(awlval_copy_proxy, awlval_del_proxy);
    e->top_level = false;
    e->references = 1;
    return e;
}

// Assembly:
pushq %rbx
movl $0x18, %edi
callq 0x2290
testq %rax, %rax
je 0x10678
movq %rax, %rbx
movq $0x0, (%rax)
leaq 0x75(%rip), %rdi        # 0x106cd
leaq 0x73(%rip), %rsi        # 0x106d2
callq 0x5920
movq %rax, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
movl $0x1, 0x14(%rbx)
movq %rbx, %rax
popq %rbx
retq
callq 0x2831
// File: /workspace/github_c_makefile_star2_O1/voithos[P]awl/src/types.c
// Function: awlval_dict
awlval* awlval_dict(void) {
    awlval* v = safe_malloc(sizeof(awlval));
    v->type = AWLVAL_DICT;
    v->count = 0;
    v->length = 0;
    v->d = dict_new(awlval_copy_proxy, awlval_del_proxy);
    return v;
}

// Assembly:
pushq %rbx
movl $0x38, %edi
callq 0x2290
testq %rax, %rax
je 0x106c8
movq %rax, %rbx
movq $0xa, (%rax)
movl $0x0, 0x10(%rax)
leaq 0x1a(%rip), %rdi        # 0x106cd
leaq 0x18(%rip), %rsi        # 0x106d2
callq 0x5920
movq %rax, 0x18(%rbx)
movq %rbx, %rax
popq %rbx
retq
callq 0x2856
// File: /workspace/github_c_makefile_star2_O1/voithos[P]awl/src/types.c
// Function: awlval_sexpr
awlval* awlval_sexpr(void) {
    awlval* v = safe_malloc(sizeof(awlval));
    v->type = AWLVAL_SEXPR;
    v->count = 0;
    v->length = 0;
    v->cell = NULL;
    return v;
}

// Assembly:
pushq %rax
movl $0x38, %edi
callq 0x2290
testq %rax, %rax
je 0x106f6
movl $0xb, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x4(%rax)
popq %rcx
retq
callq 0x287b
// File: /workspace/github_c_makefile_star2_O1/voithos[P]awl/src/types.c
// Function: awlval_qexpr
awlval* awlval_qexpr(void) {
    awlval* v = safe_malloc(sizeof(awlval));
    v->type = AWLVAL_QEXPR;
    v->count = 0;
    v->length = 0;
    v->cell = NULL;
    return v;
}

// Assembly:
pushq %rax
movl $0x38, %edi
callq 0x2290
testq %rax, %rax
je 0x1071a
movl $0xc, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x4(%rax)
popq %rcx
retq
callq 0x28a0
// File: /workspace/github_c_makefile_star2_O1/voithos[P]awl/src/types.c
// Function: awlval_eexpr
awlval* awlval_eexpr(void) {
    awlval* v = safe_malloc(sizeof(awlval));
    v->type = AWLVAL_EEXPR;
    v->count = 0;
    v->length = 0;
    v->cell = NULL;
    return v;
}

// Assembly:
pushq %rax
movl $0x38, %edi
callq 0x2290
testq %rax, %rax
je 0x1073e
movl $0xd, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x4(%rax)
popq %rcx
retq
callq 0x28c5
// File: /workspace/github_c_makefile_star2_O1/voithos[P]awl/src/types.c
// Function: awlval_cexpr
awlval* awlval_cexpr(void) {
    awlval* v = safe_malloc(sizeof(awlval));
    v->type = AWLVAL_CEXPR;
    v->count = 0;
    v->length = 0;
    v->cell = NULL;
    return v;
}

// Assembly:
pushq %rax
movl $0x38, %edi
callq 0x2290
testq %rax, %rax
je 0x10762
movl $0xe, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x4(%rax)
popq %rcx
retq
callq 0x28ea
// File: /workspace/github_c_makefile_star2_O1/voithos[P]awl/src/types.c
// Function: awlenv_del
void awlenv_del(awlenv* e) {
    e->references--;

    if (e->references <= 0 && !e->top_level) {
        if (e->parent && e->parent->references >= 1) {
            awlenv_del(e->parent);
        }

        dict_del(e->internal_dict);
        free(e);
    }
}

// Assembly:
pushq %rbx
movl 0x14(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x14(%rdi)
cmpl $0x1, %eax
jg 0x1080e
movq %rdi, %rbx
cmpb $0x0, 0x10(%rdi)
je 0x10810
popq %rbx
retq
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x10823
cmpl $0x0, 0x14(%rdi)
jle 0x10823
callq 0x107f6
movq 0x8(%rbx), %rdi
callq 0x59bc
movq %rbx, %rdi
popq %rbx
jmp 0x23f0
// File: /workspace/github_c_makefile_star2_O1/voithos[P]awl/src/types.c
// Function: awlval_add
awlval* awlval_add(awlval* v, awlval* x) {
    v->count++;
    v->length++;
    v->cell = realloc(v->cell, sizeof(awlval*) * v->count);
    v->cell[v->count - 1] = x;
    return v;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movslq 0x4(%rdi), %rax
leaq 0x1(%rax), %rcx
movl %ecx, 0x4(%rdi)
incl 0x10(%rdi)
movq %rsi, %r14
movq 0x8(%rdi), %rdi
leaq 0x8(,%rax,8), %rsi
callq 0x22e0
movq %rax, 0x8(%rbx)
movslq 0x4(%rbx), %rcx
movq %r14, -0x8(%rax,%rcx,8)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/voithos[P]awl/src/types.c
// Function: awlval_add_front
awlval* awlval_add_front(awlval* v, awlval* x) {
    v->count++;
    v->length++;
    v->cell = realloc(v->cell, sizeof(awlval*) * v->count);
    if (v->count > 1) {
        memmove(&v->cell[1], &v->cell[0], sizeof(awlval*) * (v->count - 1));
    }
    v->cell[0] = x;
    return v;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movslq 0x4(%rdi), %rax
leaq 0x1(%rax), %rcx
movl %ecx, 0x4(%rdi)
incl 0x10(%rdi)
movq %rsi, %r14
movq 0x8(%rdi), %rdi
leaq 0x8(,%rax,8), %rsi
callq 0x22e0
movq %rax, %r15
movq %rax, 0x8(%rbx)
movl 0x4(%rbx), %edx
cmpl $0x2, %edx
jl 0x108c4
movq %r15, %rdi
addq $0x8, %rdi
decl %edx
shlq $0x3, %rdx
movq %r15, %rsi
callq 0x22f0
movq %r14, (%r15)
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/voithos[P]awl/src/types.c
// Function: awlval_keys_dict
awlval* awlval_keys_dict(awlval* x) {
    int count = dict_count(x->d);
    char** keys = dict_all_keys(x->d);

    awlval* v = awlval_qexpr();
    for (int i = 0; i < count; i++) {
        awlval_add(v, awlval_qsym(keys[i]));
    }

    free(keys);
    return v;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
callq 0x5de6
movl %eax, %ebp
movq 0x18(%rbx), %rdi
callq 0x5dea
movq %rax, %rbx
callq 0x106fb
movq %rax, %r14
testl %ebp, %ebp
jle 0x109b7
movl %ebp, %r12d
xorl %r13d, %r13d
movq (%rbx,%r13,8), %rdi
callq 0x10495
movslq 0x4(%r14), %rbp
leaq 0x1(%rbp), %rcx
movl %ecx, 0x4(%r14)
incl 0x10(%r14)
movq %rax, %r15
movl $0x4, (%rax)
movq 0x8(%r14), %rdi
leaq 0x8(,%rbp,8), %rsi
callq 0x22e0
movq %rax, 0x8(%r14)
movq %r15, (%rax,%rbp,8)
incq %r13
cmpq %r13, %r12
jne 0x10974
movq %rbx, %rdi
callq 0x23f0
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/voithos[P]awl/src/types.c
// Function: awlval_vals_dict
awlval* awlval_vals_dict(awlval* x) {
    int count = dict_count(x->d);
    awlval** vals = (awlval**)dict_all_vals(x->d);

    awlval* v = awlval_qexpr();
    for (int i = 0; i < count; i++) {
        awlval_add(v, awlval_copy(vals[i]));
    }

    free(vals);
    return v;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
callq 0x5de6
movl %eax, %ebp
movq 0x18(%rbx), %rdi
callq 0x5e31
movq %rax, %rbx
callq 0x106fb
movq %rax, %r14
testl %ebp, %ebp
jle 0x10a45
movl %ebp, %r12d
xorl %r13d, %r13d
movq (%rbx,%r13,8), %rdi
callq 0x10a5f
movslq 0x4(%r14), %rbp
leaq 0x1(%rbp), %rcx
movl %ecx, 0x4(%r14)
incl 0x10(%r14)
movq %rax, %r15
movq 0x8(%r14), %rdi
leaq 0x8(,%rbp,8), %rsi
callq 0x22e0
movq %rax, 0x8(%r14)
movq %r15, (%rax,%rbp,8)
incq %r13
cmpq %r13, %r12
jne 0x10a08
movq %rbx, %rdi
callq 0x23f0
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/voithos[P]awl/src/types.c
// Function: awlval_pop
awlval* awlval_pop(awlval* v, int i) {
    awlval* x = v->cell[i];

    memmove(&v->cell[i], &v->cell[i + 1], sizeof(awlval*) * (v->count - i - 1));
    v->count--;
    v->length--;

    v->cell = realloc(v->cell, sizeof(awlval*) * v->count);
    return x;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rax
movslq %esi, %rcx
leaq (%rax,%rcx,8), %rdi
movq (%rdi), %r14
leaq (%rax,%rcx,8), %rsi
addq $0x8, %rsi
notl %ecx
addl 0x4(%rbx), %ecx
movslq %ecx, %rdx
shlq $0x3, %rdx
callq 0x22f0
movslq 0x4(%rbx), %rax
leaq -0x1(%rax), %rcx
movl %ecx, 0x4(%rbx)
decl 0x10(%rbx)
movq 0x8(%rbx), %rdi
leaq -0x8(,%rax,8), %rsi
callq 0x22e0
movq %rax, 0x8(%rbx)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/voithos[P]awl/src/types.c
// Function: awlval_join
awlval* awlval_join(awlval* x, awlval* y) {
    while (y->count) {
        x = awlval_add(x, awlval_pop(y, 0));
    }

    awlval_del(y);
    return x;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
cmpl $0x0, 0x4(%rsi)
je 0x10cf2
movq %r14, %rdi
xorl %esi, %esi
callq 0x10c23
movslq 0x4(%rbx), %rcx
leaq 0x1(%rcx), %rdx
movl %edx, 0x4(%rbx)
incl 0x10(%rbx)
movq %rax, %r15
movq 0x8(%rbx), %rdi
leaq 0x8(,%rcx,8), %rsi
callq 0x22e0
movq %rax, 0x8(%rbx)
movslq 0x4(%rbx), %rcx
movq %r15, -0x8(%rax,%rcx,8)
cmpl $0x0, 0x4(%r14)
jne 0x10cb2
movq %r14, %rdi
callq 0x10767
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/voithos[P]awl/src/types.c
// Function: awlval_insert
awlval* awlval_insert(awlval* x, awlval* y, int i) {
    x->count++;
    x->length++;
    x->cell = realloc(x->cell, sizeof(awlval*) * x->count);

    memmove(&x->cell[i + 1], &x->cell[i], sizeof(awlval*) * (x->count - i - 1));
    x->cell[i] = y;
    return x;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movslq 0x4(%rdi), %rax
leaq 0x1(%rax), %rcx
movl %ecx, 0x4(%rdi)
incl 0x10(%rdi)
movl %edx, %ebp
movq %rsi, %r14
movq 0x8(%rdi), %rdi
leaq 0x8(,%rax,8), %rsi
callq 0x22e0
movq %rax, 0x8(%rbx)
movslq %ebp, %rcx
leaq (%rax,%rcx,8), %rsi
leaq (%rax,%rcx,8), %r15
addq $0x8, %r15
notl %ecx
addl 0x4(%rbx), %ecx
movslq %ecx, %rdx
shlq $0x3, %rdx
movq %r15, %rdi
callq 0x22f0
movq %r14, -0x8(%r15)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/voithos[P]awl/src/types.c
// Function: awlval_shift
awlval* awlval_shift(awlval* x, awlval* y, int i) {
    while (y->count) {
        x = awlval_insert(x, awlval_pop(y, y->count - 1), i);
    }

    awlval_del(y);
    return x;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movl 0x4(%rsi), %esi
testl %esi, %esi
je 0x10d9c
movl %edx, %ebp
decl %esi
movq %r14, %rdi
callq 0x10c23
movq %rbx, %rdi
movq %rax, %rsi
movl %ebp, %edx
callq 0x10d03
movl 0x4(%r14), %esi
testl %esi, %esi
jne 0x10d7d
movq %r14, %rdi
callq 0x10767
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/voithos[P]awl/src/types.c
// Function: awlval_reverse
awlval* awlval_reverse(awlval* x) {
    if (x->type == AWLVAL_QEXPR) {
        return awlval_reverse_qexpr(x);
    } else if (x->type == AWLVAL_STR) {
        return awlval_reverse_str(x);
    } else {
        return awlval_reverse_qsym(x);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl (%rdi), %eax
cmpl $0x5, %eax
je 0x10e3d
cmpl $0xc, %eax
jne 0x10e3d
callq 0x106fb
movq %rax, %r12
movl 0x4(%rbx), %esi
testl %esi, %esi
je 0x10e33
movslq 0x4(%r12), %rbp
movl 0x10(%r12), %r14d
movq %r12, (%rsp)
movq 0x8(%r12), %r15
leaq 0x8(,%rbp,8), %r12
decl %esi
movq %rbx, %rdi
callq 0x10c23
movq %rax, %r13
incl %r14d
movq %r15, %rdi
movq %r12, %rsi
callq 0x22e0
movq %rax, %r15
movq %r13, -0x8(%rax,%r12)
movl 0x4(%rbx), %esi
incl %ebp
addq $0x8, %r12
testl %esi, %esi
jne 0x10df0
movq (%rsp), %r12
movl %ebp, 0x4(%r12)
movl %r14d, 0x10(%r12)
movq %r15, 0x8(%r12)
movq %rbx, %rdi
callq 0x10767
jmp 0x10e59
movq 0x18(%rbx), %rdi
callq 0x11b96
movq %rax, %r14
movq 0x18(%rbx), %rdi
callq 0x23f0
movq %r14, 0x18(%rbx)
movq %rbx, %r12
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq