LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/xiongxu[P]bam2bedGraph2/hiredis/./dict.c
// Function: dictAdd
int dictAdd(dict *ht, void *key, void *val) {
    int index;
    dictEntry *entry;

    /* Get the index of the new element, or -1 if
     * the element already exists. */
    if ((index = _dictKeyIndex(ht, key)) == -1)
        return DICT_ERR;

    /* Allocates the memory and stores key */
    entry = malloc(sizeof(*entry));
    entry->next = ht->table[index];
    ht->table[index] = entry;

    /* Set the hash entry fields. */
    dictSetHashKey(ht, entry, key);
    dictSetHashVal(ht, entry, val);
    ht->used++;
    return DICT_OK;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x10(%rdi), %rsi
testq %rsi, %rsi
je 0x68df
cmpq %rsi, 0x20(%rbx)
jne 0x68fb
addq %rsi, %rsi
jmp 0x68e4
movl $0x4, %esi
movq %rbx, %rdi
callq 0x6778
movl %eax, %ecx
movl $0x1, %eax
testl %ecx, %ecx
jne 0x69af
movq 0x8(%rbx), %rax
movq %r15, %rdi
callq *(%rax)
movl %eax, %r12d
andl 0x18(%rbx), %r12d
movq (%rbx), %rax
movq (%rax,%r12,8), %r13
testq %r13, %r13
je 0x6943
movq 0x8(%rbx), %rax
movq 0x18(%rax), %rax
testq %rax, %rax
je 0x6937
movq 0x28(%rbx), %rdi
movq (%r13), %rdx
movq %r15, %rsi
callq *%rax
testl %eax, %eax
jne 0x693d
jmp 0x69aa
cmpq %r15, (%r13)
jne 0x69aa
movq 0x10(%r13), %r13
jmp 0x6912
cmpl $-0x1, %r12d
je 0x69aa
movl $0x18, %edi
callq 0x3440
movq %rax, %r13
movq (%rbx), %rax
movslq %r12d, %rcx
movq (%rax,%rcx,8), %rdx
movq %rdx, 0x10(%r13)
movq %r13, (%rax,%rcx,8)
movq 0x8(%rbx), %rax
movq 0x8(%rax), %rcx
testq %rcx, %rcx
je 0x6985
movq 0x28(%rbx), %rdi
movq %r15, %rsi
callq *%rcx
movq %rax, %r15
movq 0x8(%rbx), %rax
movq %r15, (%r13)
movq 0x10(%rax), %rax
testq %rax, %rax
je 0x699e
movq 0x28(%rbx), %rdi
movq %r14, %rsi
callq *%rax
movq %rax, %r14
movq %r14, 0x8(%r13)
incq 0x20(%rbx)
xorl %eax, %eax
jmp 0x69af
movl $0x1, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/xiongxu[P]bam2bedGraph2/hiredis/./dict.c
// Function: dictDelete
int dictDelete(dict *ht, const void *key) {
    unsigned int h;
    dictEntry *de, *prevde;

    if (ht->size == 0)
        return DICT_ERR;
    h = dictHashKey(ht, key) & ht->sizemask;
    de = ht->table[h];

    prevde = NULL;
    while(de) {
        if (!dictCompareHashKeys(ht,key,de->key)) {
            /* Unlink the element from the list */
            if (prevde)
                prevde->next = de->next;
            else
                ht->table[h] = de->next;

            dictFreeEntryKey(ht,de);
            dictFreeEntryVal(ht,de);
            free(de);
            ht->used--;
            return DICT_OK;
        }
        prevde = de;
        de = de->next;
    }
    return DICT_ERR; /* not found */
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl $0x1, %ebp
cmpq $0x0, 0x10(%rdi)
je 0x6b5e
movq %rsi, %r12
movq %rdi, %rbx
movq 0x8(%rdi), %rax
movq %rsi, %rdi
callq *(%rax)
movl %eax, %r15d
andl 0x18(%rbx), %r15d
movq (%rbx), %rax
movq (%rax,%r15,8), %rax
testq %rax, %rax
je 0x6b5e
xorl %r13d, %r13d
movq %rax, %r14
movq 0x8(%rbx), %rax
movq 0x18(%rax), %rax
testq %rax, %rax
je 0x6af3
movq 0x28(%rbx), %rdi
movq (%r14), %rdx
movq %r12, %rsi
callq *%rax
testl %eax, %eax
jne 0x6af8
jmp 0x6b06
cmpq %r12, (%r14)
jne 0x6b06
movq 0x10(%r14), %rax
movq %r14, %r13
testq %rax, %rax
jne 0x6ad1
jmp 0x6b5e
movq 0x10(%r14), %rax
testq %r13, %r13
je 0x6b15
addq $0x10, %r13
jmp 0x6b1f
shlq $0x3, %r15
addq (%rbx), %r15
movq %r15, %r13
movq %rax, (%r13)
movq 0x8(%rbx), %rcx
movq 0x20(%rcx), %rax
testq %rax, %rax
je 0x6b3d
movq 0x28(%rbx), %rdi
movq (%r14), %rsi
callq *%rax
movq 0x8(%rbx), %rcx
movq 0x28(%rcx), %rax
testq %rax, %rax
je 0x6b50
movq 0x28(%rbx), %rdi
movq 0x8(%r14), %rsi
callq *%rax
movq %r14, %rdi
callq 0x3060
decq 0x20(%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/xiongxu[P]bam2bedGraph2/hiredis/hiredis.c
// Function: redisFree
void redisFree(redisContext *c) {
    if (c == NULL)
        return;
    if (c->fd > 0)
        close(c->fd);
    if (c->obuf != NULL)
        sdsfree(c->obuf);
    if (c->reader != NULL)
        redisReaderFree(c->reader);
    free(c);
}

// Assembly:
testq %rdi, %rdi
je 0x932e
pushq %rbx
movq %rdi, %rbx
movl 0x84(%rdi), %edi
testl %edi, %edi
jle 0x9303
callq 0x32a0
movq 0x90(%rbx), %rdi
testq %rdi, %rdi
je 0x9314
callq 0x559b
movq 0x98(%rbx), %rdi
testq %rdi, %rdi
je 0x9325
callq 0x82dc
movq %rbx, %rdi
popq %rbx
jmp 0x3060
retq
// File: /workspace/github_c_makefile_star2_O3/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_5/exercise_5_17/sort.c
// Function: fieldscmp
int fieldscmp(const char *s1, const char *s2)
{
  int i = 0;
  while (i < nr_of_fields)
  {
    size_t start_s1 = str_nth_blank_pos(s1, fields_options[i][INDEX] - 1);
    size_t end_s1 = str_nth_blank_pos(s1, fields_options[i][INDEX]);
    char *field_s1 = substr(s1, start_s1, end_s1);

    size_t start_s2 = str_nth_blank_pos(s2, fields_options[i][INDEX] - 1);
    size_t end_s2 = str_nth_blank_pos(s2, fields_options[i][INDEX]);
    char *field_s2 = substr(s2, start_s2, end_s2);

    comp = fields_comp[i];
    order = fields_options[i][ORDER];
    fold = fields_options[i][FOLD];
    directory = fields_options[i][DIRECTORY];

    int comp_result = comp(field_s1, field_s2);

    afree(field_s1);
    afree(field_s2);

    if (comp_result == 0)
    {
      ++i;
    }
    else
    {
      return comp_result;
    }
  }

  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, 0x10(%rsp)
movq %rdi, 0x8(%rsp)
leaq 0x3241(%rip), %rax      # 0x4a00
addq $0x2710, %rax           # imm = 0x2710
movq %rax, (%rsp)
xorl %ebx, %ebx
xorl %r14d, %r14d
movslq 0x28c3(%rip), %rax      # 0x4098
cmpq %rax, %r14
jge 0x18e0
leaq 0x28bb(%rip), %rax      # 0x40a0
movslq (%rax,%rbx,2), %r12
movq %rax, %rbp
leaq -0x1(%r12), %rsi
movq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x18f1
movq %rax, %r13
movq %r15, %rdi
movq %r12, %rsi
callq 0x18f1
movq %r15, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x192a
movq %rax, %r12
movslq (%rbp,%rbx,2), %r13
leaq -0x1(%r13), %rsi
movq 0x10(%rsp), %r15
movq %r15, %rdi
callq 0x18f1
movq %rax, %rbp
movq %r15, %rdi
movq %r13, %rsi
callq 0x18f1
movq %r15, %rdi
movq %rbp, %rsi
movq %rax, %rdx
callq 0x192a
movq %rax, %r13
leaq 0x2e87(%rip), %rax      # 0x46e0
movq (%rbx,%rax), %rax
movq %rax, 0x280c(%rip)      # 0x4070
leaq 0x2835(%rip), %rsi      # 0x40a0
movl 0x4(%rsi,%rbx,2), %ecx
movl 0x8(%rsi,%rbx,2), %edx
movl %ecx, 0x27ef(%rip)      # 0x4068
movl %edx, 0x2811(%rip)      # 0x4090
movl 0xc(%rsi,%rbx,2), %ecx
movl %ecx, 0x280b(%rip)      # 0x4094
movq %r12, %rdi
movq %r13, %rsi
callq *%rax
leaq 0x3168(%rip), %rcx      # 0x4a00
cmpq %rcx, %r12
setae %dl
movq (%rsp), %r8
cmpq %r8, %r12
setb %sil
cmpq %rcx, %r13
setae %dil
cmpq %r8, %r13
setb %cl
andb %dil, %cl
testb %sil, %dl
jne 0x18c2
testb %cl, %cl
je 0x18cf
testb %cl, %cl
cmovneq %r13, %r12
movq %r12, 0x27a9(%rip)      # 0x4078
incq %r14
addq $0x8, %rbx
testl %eax, %eax
je 0x17ce
jmp 0x18e2
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_5/exercise_5_17/sort.c
// Function: str_nth_blank_pos
size_t str_nth_blank_pos(const char *s, size_t n)
{
  size_t pos = 0;
  while (n && *s != '\0')
  {
    if (*s == ' ' || *s == '\t')
    {
      do
      {
        ++pos;
        ++s;
      } while (*s == ' ' || *s == '\t');

      --n;
    }
    else
    {
      ++pos;
      ++s;
    }
  }

  return pos;
}

// Assembly:
xorl %eax, %eax
testq %rsi, %rsi
je 0x1929
movzbl (%rdi), %ecx
cmpl $0x9, %ecx
je 0x1911
cmpl $0x20, %ecx
je 0x1911
testl %ecx, %ecx
je 0x1929
incq %rax
incq %rdi
jmp 0x18f3
incq %rdi
incq %rax
movzbl (%rdi), %ecx
cmpl $0x20, %ecx
je 0x1911
cmpl $0x9, %ecx
je 0x1911
decq %rsi
jmp 0x18f3
retq
// File: /workspace/github_c_makefile_star2_O3/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_5/exercise_5_17/sort.c
// Function: substr
char *substr(const char *s, size_t start, size_t end)
{
  if (start > end)
  {
    return NULL;
  }

  const size_t len = end - start;
  char *dest = alloc(len + 1);

  for (size_t i = start; i < end && s[i] != '\0'; ++i)
  {
    *dest = s[i];
    ++dest;
  }
  *dest = '\0';

  return dest - len;
}

// Assembly:
movq %rdx, %rcx
subq %rsi, %rcx
jae 0x1935
xorl %eax, %eax
retq
leaq 0x1(%rcx), %r8
movq 0x2738(%rip), %rax      # 0x4078
leaq 0x30b9(%rip), %r9       # 0x4a00
subq %rax, %r9
addq $0x2710, %r9            # imm = 0x2710
cmpq %r8, %r9
jae 0x195a
xorl %eax, %eax
jmp 0x1964
addq %rax, %r8
movq %r8, 0x2714(%rip)       # 0x4078
subq %rsi, %rdx
jbe 0x1986
addq %rsi, %rdi
xorl %esi, %esi
movb (%rdi,%rsi), %r8b
testb %r8b, %r8b
je 0x1983
movb %r8b, (%rax,%rsi)
incq %rsi
cmpq %rsi, %rdx
jne 0x196e
addq %rsi, %rax
movb $0x0, (%rax)
subq %rcx, %rax
retq
// File: /workspace/github_c_makefile_star2_O3/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_2/exercise_2_03/htoi.c
// Function: main
int main(void)
{
  char hex[MAXLINE];

  get_line(hex, MAXLINE);

  printf("%d", htoi(hex));

  return 0;
}

// Assembly:
pushq %rbx
subq $0x70, %rsp
xorl %ebx, %ebx
callq 0x1070
cmpb $0xa, %al
je 0x11c8
movzbl %al, %ecx
cmpl $0xff, %ecx
je 0x11c8
movb %al, (%rsp,%rbx)
incq %rbx
cmpq $0x63, %rbx
jne 0x11a3
movl $0x63, %ebx
movb $0x0, (%rsp,%rbx)
movq %rsp, %rdi
callq 0x1240
leaq 0xe35(%rip), %rdi       # 0x2010
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
xorl %eax, %eax
addq $0x70, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_2/exercise_2_03/htoi.c
// Function: get_line
int get_line(char line[], int lim)
{
  char c;
  int i = 0;
  while (i < lim - 1 && (c = getchar()) != EOF && c != '\n')
  {
    line[i++] = c;
  }

  line[i] = '\0';

  return i;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
cmpl $0x2, %esi
jl 0x122b
movl %esi, %ebp
decl %ebp
movl %ebp, %r15d
xorl %r14d, %r14d
callq 0x1070
cmpb $0xa, %al
je 0x122b
movzbl %al, %ecx
cmpl $0xff, %ecx
je 0x122b
movb %al, (%rbx,%r14)
incq %r14
cmpq %r14, %r15
jne 0x1208
movl %ebp, %r14d
movl %r14d, %eax
movb $0x0, (%rbx,%rax)
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_2/exercise_2_03/htoi.c
// Function: htoi
int htoi(char hex[])
{
  int result = 0;

  int i = 0, len = strlen(hex);

  while (i < len)
  {
    if (hex[i] == '0' && (hex[i + 1] == 'x' || hex[i + 1] == 'X'))
    {
      i += 2;
    }

    int temp = tolower(hex[i]);

    if (isdigit(temp))
    {
      temp -= 48;
    }

    if (isalpha(temp) && temp <= 'f')
    {
      temp = temp - 'a' + 10;
    }

    if ((hex[i] >= '0' && hex[i] <= '9') || (hex[i] >= 'a' && hex[i] <= 'f') || (hex[i] >= 'A' && hex[i] <= 'F'))
    {
      result += temp * (int)pow(16, len - i - 1);
    }
    else
    {
      printf("Error: Not a valid hex value.\n Try this format: 0xHHHH, where H is a hex digit.\n");
    }

    ++i;
  }

  return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x1050
movq %rax, %r14
testl %r14d, %r14d
jle 0x1336
callq 0x1080
movq %rax, (%rsp)
xorl %ebp, %ebp
callq 0x1090
movq %rax, %r12
xorl %r13d, %r13d
movslq %r13d, %rcx
movb (%rbx,%rcx), %al
cmpb $0x30, %al
jne 0x129b
movzbl 0x1(%rbx,%rcx), %eax
orl $0x20, %eax
cmpl $0x78, %eax
jne 0x1299
movb 0x2(%rbx,%rcx), %al
addq $0x2, %rcx
movl %ecx, %r13d
jmp 0x129b
movb $0x30, %al
movq (%rsp), %rcx
movq (%rcx), %rcx
movsbq %al, %rdx
movslq (%rcx,%rdx,4), %rcx
movq (%r12), %rsi
leal -0x30(%rcx), %edi
testb $0x8, 0x1(%rsi,%rcx,2)
cmovel %ecx, %edi
movslq %edi, %rcx
leal -0x57(%rcx), %r15d
cmpl $0x67, %ecx
cmovgel %ecx, %r15d
testb $0x4, 0x1(%rsi,%rcx,2)
cmovel %ecx, %r15d
addb $-0x30, %dl
cmpb $0xa, %dl
jb 0x12f3
movzbl %al, %eax
addl $-0x41, %eax
cmpl $0x25, %eax
ja 0x1328
movabsq $0x3f0000003f, %rcx     # imm = 0x3F0000003F
btq %rax, %rcx
jae 0x1328
movl %r13d, %eax
notl %eax
addl %r14d, %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
mulsd 0xcfe(%rip), %xmm0      # 0x2008
callq 0x1030
cvttsd2si %xmm0, %eax
imull %eax, %r15d
addl %r15d, %ebp
incl %r13d
cmpl %r14d, %r13d
jl 0x1275
jmp 0x1338
leaq 0xce4(%rip), %rdi       # 0x2013
callq 0x1040
jmp 0x131a
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/nh13[P]ksw/src/parasail/tests/test_matrix.c
// Function: print_matrix
static void print_matrix(const parasail_matrix_t *matrix) {
    int i = 0;
    int j = 0;
    const char *alphabet = NULL;
    alphabet = matrix->alphabet;

    printf("matrix '%s'\n", matrix->name);
    printf("  ");
    for (i=0; i<matrix->size; ++i) {
        printf("%4c", alphabet[i]);
    }
    printf("\n");
    for (j=0; j<matrix->length; ++j) {
        if (matrix->type == PARASAIL_MATRIX_TYPE_SQUARE) {
            printf("%c ", alphabet[j]);
        }
        else {
            if (matrix->query != NULL) {
                printf("%c ", matrix->query[j]);
            }
            else {
                printf("* ");
            }
        }
        for (i=0; i<matrix->size; ++i) {
            printf("%4d", matrix->matrix[j*matrix->size + i]);
        }
        printf("\n");
    }
    printf("max = %d\n", matrix->max);
    printf("min = %d\n", matrix->min);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rsi
movq 0x38(%rdi), %r13
leaq 0x2cc33(%rip), %rdi     # 0x33a34
xorl %eax, %eax
callq 0x5090
leaq 0x427c(%rip), %rdi      # 0xb08b
xorl %eax, %eax
callq 0x5090
cmpl $0x0, 0x18(%rbx)
jle 0x6e42
leaq 0x426b(%rip), %r14      # 0xb08e
xorl %r15d, %r15d
movsbl (%r13,%r15), %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x5090
incq %r15
movslq 0x18(%rbx), %rax
cmpq %rax, %r15
jl 0x6e26
movl $0xa, %edi
callq 0x5050
cmpl $0x0, 0x34(%rbx)
jle 0x6edf
leaq 0x4235(%rip), %r14      # 0xb092
leaq 0x4235(%rip), %r15      # 0xb099
xorl %ebp, %ebp
cmpl $0x0, 0x30(%rbx)
je 0x6e7b
movq 0x40(%rbx), %rax
testq %rax, %rax
je 0x6e8d
movsbl (%rax,%rbp), %esi
jmp 0x6e81
movsbl (%r13,%rbp), %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x5090
jmp 0x6e9b
leaq 0x4202(%rip), %rdi      # 0xb096
xorl %eax, %eax
callq 0x5090
movl 0x18(%rbx), %eax
testl %eax, %eax
jle 0x6ec9
xorl %r12d, %r12d
movq 0x8(%rbx), %rcx
imull %ebp, %eax
cltq
addq %r12, %rax
movl (%rcx,%rax,4), %esi
movq %r15, %rdi
xorl %eax, %eax
callq 0x5090
movl 0x18(%rbx), %eax
incq %r12
cmpl %eax, %r12d
jl 0x6ea5
movl $0xa, %edi
callq 0x5050
incq %rbp
movslq 0x34(%rbx), %rax
cmpq %rax, %rbp
jl 0x6e66
movl 0x1c(%rbx), %esi
leaq 0x41b4(%rip), %rdi      # 0xb09d
xorl %eax, %eax
callq 0x5090
movl 0x20(%rbx), %esi
leaq 0x41ad(%rip), %rdi      # 0xb0a7
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5090
// File: /workspace/github_c_makefile_star2_O3/nh13[P]ksw/src/parasail/tests/test_matrix.c
// Function: print_mapper
static void print_mapper(const parasail_matrix_t *matrix) {
    int i = 0;
    const int *mapper = matrix->mapper;

    for (i=0; i<256; ++i) {
        if (i%16 == 0) printf("\n");
        printf("%5d", mapper[i]);
    }
    printf("\n");
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x4193(%rip), %r14      # 0xb0b1
xorl %r15d, %r15d
testb $0xf, %r15b
jne 0x6f31
movl $0xa, %edi
callq 0x5050
movl (%rbx,%r15,4), %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x5090
incq %r15
cmpq $0x100, %r15            # imm = 0x100
jne 0x6f21
movl $0xa, %edi
popq %rbx
popq %r14
popq %r15
jmp 0x5050
nop
// File: /workspace/github_c_makefile_star2_O3/stefpant[P]TCPserver/webserver/functions.c
// Function: analyze_request
int analyze_request(char* request,char **req_page){
	if(request == NULL) return -1;//bad request
	int start=0;
	char *word;
	short flagGET=0,flagCON=0,flagHOST=0;//flagUA=0,flagACL=0,flagACE=0;
	while(start!=-1){
		word = NULL;
		start = nextWord(request,&word,start);//save word
		if(start == -2) break;//request was empty
		if( !strcmp(word,"GET") ){
			flagGET=1;
			start = nextWord(request,req_page,start);//save req_page
			free(word);
			word=NULL;
			start = nextWord(request,&word,start);//check protocol
			if( strcmp(word,"HTTP/1.1") ){
				free(word);
				break;
			}
		}
		else if( !strcmp(word,"Host:") ) flagHOST=1;
		//else if( !strcmp(word,"User-Agent:") ) flagUA=1;
		//else if( !strcmp(word,"Accept-Language:") ) flagACL=1;
		//else if( !strcmp(word,"Accept-Encoding:") ) flagACE=1;
		else if( !strcmp(word,"Connection:") ) flagCON=1;
		free(word);
	}

	//if(flagGET && flagCON && flagUA && flagHOST && flagACL && flagACE)
	if(flagGET && flagCON &&  flagHOST)
		return 0;//OK

	return -1;//error missing one header
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, -0x40(%rbp)
testq %rdi, %rdi
je 0x2a23
movq %rdi, %r14
movl $0x0, -0x2c(%rbp)
leaq -0x38(%rbp), %r15
xorl %r12d, %r12d
movl $0x0, -0x30(%rbp)
xorl %r13d, %r13d
movq $0x0, -0x38(%rbp)
movq %r14, %rdi
movq %r15, %rsi
movl %r13d, %edx
callq 0x257a
cmpl $-0x2, %eax
je 0x2a01
movl %eax, %r13d
movq -0x38(%rbp), %rbx
movq %rbx, %rdi
leaq 0x16a7(%rip), %rsi      # 0x4004
callq 0x2190
testl %eax, %eax
je 0x2995
movq %rbx, %rdi
leaq 0x16a1(%rip), %rsi      # 0x4011
callq 0x2190
testl %eax, %eax
je 0x29e8
movq %rbx, %rdi
leaq 0x1694(%rip), %rsi      # 0x4017
callq 0x2190
testl %eax, %eax
movl $0x1, %eax
cmovel %eax, %r12d
jmp 0x29ef
movq %r14, %rdi
movq -0x40(%rbp), %rsi
movl %r13d, %edx
callq 0x257a
movl %eax, %r13d
movq %rbx, %rdi
callq 0x2030
movq $0x0, -0x38(%rbp)
movq %r14, %rdi
movq %r15, %rsi
movl %r13d, %edx
callq 0x257a
movl %eax, %r13d
movq -0x38(%rbp), %rbx
movq %rbx, %rdi
leaq 0x1632(%rip), %rsi      # 0x4008
callq 0x2190
testl %eax, %eax
jne 0x2a37
movw $0x1, %ax
movl %eax, -0x30(%rbp)
jmp 0x29ef
movw $0x1, %ax
movl %eax, -0x2c(%rbp)
movq %rbx, %rdi
callq 0x2030
cmpl $-0x1, %r13d
jne 0x292d
cmpw $0x0, -0x30(%rbp)
sete %al
testw %r12w, %r12w
sete %cl
orb %al, %cl
cmpw $0x0, -0x2c(%rbp)
sete %al
orb %cl, %al
movzbl %al, %eax
negl %eax
jmp 0x2a28
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x2030
xorl %eax, %eax
jmp 0x2a09
// File: /workspace/github_c_makefile_star2_O3/stefpant[P]TCPserver/webserver/functions.c
// Function: copy_page
char* copy_page(char *page,int* count){
	*count=0;
	FILE *fp = fopen(page,"r");
	int maxlen = 20;
	char c;
	char* cppage = malloc(20*sizeof(char));
	while( 1 ){
		if(*count == maxlen){
			maxlen*=2;
			cppage = realloc(cppage,maxlen*sizeof(char));
		}
		c = fgetc(fp);
		if( !feof(fp) )
			cppage[*count] = c;
		else{
			cppage[*count] = '\0';
			break;
		}
		(*count)++;
	}
	fclose(fp);
	cppage = realloc(cppage,(*count + 1)*sizeof(char));
	return cppage;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl $0x0, (%rsi)
leaq 0x15c2(%rip), %rsi      # 0x4023
callq 0x22b0
movq %rax, %r14
movl $0x14, %edi
callq 0x21f0
movq %rax, %r15
movl (%rbx), %r12d
movl $0x14, %r13d
cmpl %r13d, %r12d
jne 0x2a98
addl %r12d, %r12d
movslq %r12d, %rsi
movq %r15, %rdi
callq 0x2220
movq %rax, %r15
movl %r12d, %r13d
movq %r14, %rdi
callq 0x2130
movl %eax, %r12d
movq %r14, %rdi
callq 0x21a0
testl %eax, %eax
jne 0x2ac1
movslq (%rbx), %rax
movb %r12b, (%r15,%rax)
movl (%rbx), %r12d
incl %r12d
movl %r12d, (%rbx)
jmp 0x2a7f
movslq (%rbx), %rax
movb $0x0, (%r15,%rax)
movq %r14, %rdi
callq 0x20d0
movslq (%rbx), %rsi
incq %rsi
movq %r15, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2220
// File: /workspace/github_c_makefile_star2_O3/stefpant[P]TCPserver/webserver/webserver.c
// Function: place
void place(reqArray** ra,int fd){// place request in buffer
	pthread_mutex_lock(&mtx);
	while((*ra)->count>=MAXR){
		//printf("Pool found full\n");
		pthread_cond_wait(&cv_notfull,&mtx);
	}
	(*ra)->end = ((*ra)->end+1)%MAXR;
	(*ra)->fds[(*ra)->end] = fd;
	//printf("placed: %d\n",(*ra)->fds[(*ra)->end]);
	(*ra)->count++;
	pthread_mutex_unlock(&mtx);

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
leaq 0x2eb3(%rip), %rdi      # 0x61d8
callq 0x2350
movq (%r14), %rax
cmpl $0x32, 0x8(%rax)
jl 0x3355
leaq 0x2ec6(%rip), %r15      # 0x6200
leaq 0x2e97(%rip), %r12      # 0x61d8
movq %r15, %rdi
movq %r12, %rsi
callq 0x20c0
movq (%r14), %rax
cmpl $0x31, 0x8(%rax)
jg 0x3341
movl 0x10(%rax), %ecx
movl %ecx, %edx
incl %edx
movslq %edx, %rdx
imulq $0x51eb851f, %rdx, %rdx # imm = 0x51EB851F
movq %rdx, %rsi
shrq $0x3f, %rsi
sarq $0x24, %rdx
addl %esi, %edx
imull $0x32, %edx, %edx
negl %edx
addl %edx, %ecx
incl %ecx
movl %ecx, 0x10(%rax)
movq (%rax), %rdx
movslq %ecx, %rcx
movl %ebx, (%rdx,%rcx,4)
incl 0x8(%rax)
leaq 0x2e46(%rip), %rdi      # 0x61d8
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x21e0
// File: /workspace/github_c_makefile_star2_O3/stefpant[P]TCPserver/webserver/webserver.c
// Function: obtain
int obtain(reqArray** ra){//get request from buffer
	int data;
	pthread_mutex_lock(&mtx);
	while( (*ra)->count <= 0 ){
		//printf("Pool found empty\n");
		pthread_cond_wait(&cv_notempty,&mtx);
	}
	data = (*ra)->fds[(*ra)->start];
	(*ra)->start = ( (*ra)->start + 1 ) % MAXR;
	(*ra)->count--;
	pthread_mutex_unlock(&mtx);
	return data;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x2e25(%rip), %rdi      # 0x61d8
callq 0x2350
movq (%rbx), %rax
movl 0x8(%rax), %ecx
testl %ecx, %ecx
jg 0x33e5
leaq 0x2e67(%rip), %r14      # 0x6230
leaq 0x2e08(%rip), %r15      # 0x61d8
movq %r14, %rdi
movq %r15, %rsi
callq 0x20c0
movq (%rbx), %rax
movl 0x8(%rax), %ecx
testl %ecx, %ecx
jle 0x33d0
movq (%rax), %rdx
movslq 0xc(%rax), %rsi
movl (%rdx,%rsi,4), %ebx
leal 0x1(%rsi), %edx
movslq %edx, %rdx
imulq $0x51eb851f, %rdx, %rsi # imm = 0x51EB851F
movq %rsi, %rdi
shrq $0x3f, %rdi
sarq $0x24, %rsi
addl %edi, %esi
imull $0x32, %esi, %esi
subl %esi, %edx
movl %edx, 0xc(%rax)
decl %ecx
movl %ecx, 0x8(%rax)
leaq 0x2dbb(%rip), %rdi      # 0x61d8
callq 0x21e0
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/stefpant[P]TCPserver/webserver/webserver.c
// Function: threadExec
void *threadExec(void * rootdir){
	char *buf;
	char *page = NULL;
	char *ans = NULL;
	int anslen;
	char *rdir = (char *)rootdir;
	char *rdpage = NULL;
	int reqerr,localbytes;
	while( 1 ){//try to obtain a file desc and exit if u obtain -1
		buf = NULL;//malloc(10*sizeof(char));
		int data;
		data = obtain(&ra);
		//printf("thread: %d\n",data);
		pthread_cond_signal(&cv_notfull);
		if( data == -1) break;
		pthread_mutex_lock(&mtxcounter);
		totalrc++;
		pthread_mutex_unlock(&mtxcounter);
		while( (buf = read_request(data,BUFFERSIZE)) == NULL ){}//in case client haven't answered yet,repeat
		//printf("buf= %s\n",buf);
		reqerr = analyze_request(buf,&page);
		if(page != NULL){
			rdpage = (char *)malloc((strlen(page) + strlen(rdir) + 1)*sizeof(char));
			strcpy(rdpage,rdir);
			strcat(rdpage,page);
		}
		//printf("%s\n",rdpage);
		ans = create_answer(&anslen,rdpage,reqerr,&localbytes);
		pthread_mutex_lock(&mtxbytes);
		totalBytes += localbytes;
		pthread_mutex_unlock(&mtxbytes);
		//printf("%s\n",ans);
		write(data,ans,anslen);
		close(data);
		free(page);
		free(ans);
		free(rdpage);
		free(buf);
	}
	free(buf);
	printf("thread exiting...\n");
	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, -0x48(%rbp)
movq $0x0, -0x30(%rbp)
leaq 0x2e0d(%rip), %rdi      # 0x6260
callq 0x339f
movl %eax, %r12d
leaq 0x2d9e(%rip), %rdi      # 0x6200
callq 0x2160
cmpl $-0x1, %r12d
je 0x358f
xorl %r13d, %r13d
leaq 0x2ded(%rip), %rbx      # 0x6268
movq %rbx, %rdi
callq 0x2350
incl 0x2d47(%rip)            # 0x61d0
movq %rbx, %rdi
callq 0x21e0
movl %r12d, %edi
movl $0x80, %esi
callq 0x2812
testq %rax, %rax
je 0x3491
movq %rax, %r14
movq %rax, %rdi
leaq -0x30(%rbp), %rsi
callq 0x28f4
movq -0x30(%rbp), %rbx
testq %rbx, %rbx
je 0x34fd
movq %rbx, %rdi
movl %eax, -0x34(%rbp)
callq 0x20e0
movq %rax, %r13
movq -0x48(%rbp), %r15
movq %r15, %rdi
callq 0x20e0
leaq (%rax,%r13), %rdi
incq %rdi
callq 0x21f0
movq %rax, %r13
movq %rax, %rdi
movq %r15, %rsi
callq 0x2070
movq %r13, %rdi
movq %rbx, %rsi
callq 0x22f0
movl -0x34(%rbp), %eax
leaq -0x3c(%rbp), %rdi
movq %r13, %rsi
movl %eax, %edx
leaq -0x38(%rbp), %rcx
callq 0x2aed
movq %rax, %rbx
leaq 0x2d77(%rip), %r15      # 0x6290
movq %r15, %rdi
callq 0x2350
movl -0x38(%rbp), %eax
addl %eax, 0x2caa(%rip)      # 0x61d4
movq %r15, %rdi
callq 0x21e0
movslq -0x3c(%rbp), %rdx
movl %r12d, %edi
movq %rbx, %rsi
callq 0x20b0
movl %r12d, %edi
callq 0x2140
movq -0x30(%rbp), %rdi
callq 0x2030
movq %rbx, %rdi
callq 0x2030
movq %r13, %rdi
callq 0x2030
movq %r14, %rdi
callq 0x2030
leaq 0x2cef(%rip), %rdi      # 0x6260
callq 0x339f
movl %eax, %r12d
leaq 0x2c80(%rip), %rdi      # 0x6200
callq 0x2160
cmpl $-0x1, %r12d
jne 0x3474
leaq 0xe81(%rip), %rdi       # 0x4417
callq 0x2090
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/CSerxzm[P]WindowstoLinuxInterface/src/DEL.c
// Function: del_file
int del_file(const char *dir){
    DIR* dirp;
    struct dirent *dp;
    struct stat dir_stat;
    char dir_name[255];

    if(access(dir,F_OK)!=0){
        return 0;
    }
    if(stat(dir, &dir_stat)<0){
        perror("失败!\n");
        return -1;
    } 
    if(S_ISREG(dir_stat.st_mode)){
        remove(dir);
    }
    else{
        perror("error!\n");
    }

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x90, %rsp
movq %rdi, %r14
xorl %ebx, %ebx
xorl %esi, %esi
callq 0x1070
testl %eax, %eax
jne 0x12f8
leaq -0xa0(%rbp), %rsi
movq %r14, %rdi
callq 0x1060
testl %eax, %eax
js 0x1306
movl $0xf000, %eax           # imm = 0xF000
andl -0x88(%rbp), %eax
cmpl $0x8000, %eax           # imm = 0x8000
jne 0x1319
movq %r14, %rdi
callq 0x1030
movl %ebx, %eax
addq $0x90, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0xcf7(%rip), %rdi       # 0x2004
callq 0x1080
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x12f8
leaq 0xced(%rip), %rdi       # 0x200d
callq 0x1080
jmp 0x12f8
// File: /workspace/github_c_makefile_star2_O3/CSerxzm[P]WindowstoLinuxInterface/src/DEL.c
// Function: main
int main(int argc, char** argv){
    char lines[argc+1][255];
    predealLine(argc, argv, lines);

    if((strcmp("DEL",lines[0])==0)||(strcmp("del",lines[0])==0)){
        for(int i=1;i<argc;i++){
            del_file(lines[i]);
        }
    }
    else{
        perror("error after lines\n");
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edi, %r14d
leal 0x1(%r14), %eax
movq %rax, %rcx
shlq $0x8, %rcx
subq %rax, %rcx
addq $0xf, %rcx
movabsq $0x1fffffffff0, %rax    # imm = 0x1FFFFFFFFF0
andq %rcx, %rax
movq %rsp, %rbx
subq %rax, %rbx
movq %rbx, %rsp
movq %rbx, %rdx
callq 0x11ac
leaq 0xcad(%rip), %rdi       # 0x2015
movq %rbx, %rsi
callq 0x1050
testl %eax, %eax
je 0x1387
leaq 0xc9e(%rip), %rdi       # 0x2019
movq %rbx, %rsi
callq 0x1050
testl %eax, %eax
jne 0x13b9
cmpl $0x2, %r14d
jl 0x13ae
movl %r14d, %r14d
addq $0xff, %rbx
decq %r14
movq %rbx, %rdi
callq 0x12ad
addq $0xff, %rbx
decq %r14
jne 0x139a
xorl %eax, %eax
leaq -0x10(%rbp), %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0xc5d(%rip), %rdi       # 0x201d
callq 0x1080
jmp 0x13ae
// File: /workspace/github_c_makefile_star2_O3/yueyoum[P]termgif/record.c
// Function: main
int main(int argc, char *argv[])
{
    Display *d = XOpenDisplay(NULL);
    if (d==NULL) {
        fprintf(stderr, "can not connect x server!\n");
        exit(2);
    }
    Window active;
    int revert;
    XWindowAttributes attr;

    XGetInputFocus(d, &active, &revert);
    /* active = current_window(d); */
    active = target_window(d);
    XGetWindowAttributes(d, active, &attr);

    int width = attr.width;
    int height = attr.height;
    printf("%d, %d, %d, %d\n", attr.x, attr.y, width, height);


    struct timeval delay;
    delay.tv_sec = 0;
    int i;
    char name[12] = {'\0'};
    XImage *image = XGetImage(d, active, 0, 0, width, height, AllPlanes, ZPixmap);
    init_wjpeg(image->width, image->height);

    for(i = 0; i<20; i++)
    {
        sprintf(name, "test_%02d.jpg", i);
        printf("%s\n", name);
        fflush(stdout);
        image = XGetImage(d, active, 0, 0, width, height, AllPlanes, ZPixmap);
        write_jpeg(image, name);
        delay.tv_usec = 500 * 1000;
        select(0, NULL, NULL, NULL, &delay);
    }

    destroy_wjpeg();
    XCloseDisplay(d);
    return(0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
xorl %edi, %edi
callq 0x20b0
testq %rax, %rax
je 0x2438
movq %rax, %rbx
leaq -0x30(%rbp), %r12
leaq -0x34(%rbp), %rdx
movq %rax, %rdi
movq %r12, %rsi
callq 0x2190
movq %rbx, %rdi
callq 0x262c
movq %rax, (%r12)
leaq -0xe0(%rbp), %r13
movq %rbx, %rdi
movq %rax, %rsi
movq %r13, %rdx
callq 0x2110
movl 0x8(%r13), %r14d
movl 0xc(%r13), %r15d
movl (%r13), %esi
movl 0x4(%r13), %edx
leaq 0x2ecd1(%rip), %rdi     # 0x3101f
movl %r14d, %ecx
movl %r15d, %r8d
xorl %eax, %eax
callq 0x2090
leaq -0x48(%rbp), %rax
xorl %ecx, %ecx
movq %rcx, (%rax)
leaq -0x58(%rbp), %r13
movq %rcx, (%r13)
movl $0x0, 0x8(%r13)
movq (%r12), %rsi
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
movl %r14d, %r8d
movl %r15d, %r9d
pushq $0x2
pushq $-0x1
callq 0x2180
addq $0x10, %rsp
movl (%rax), %edi
movl 0x4(%rax), %esi
callq 0x2440
xorl %r12d, %r12d
movq %r13, %rdi
leaq 0x2ec86(%rip), %rsi     # 0x3102f
movl %r12d, %edx
xorl %eax, %eax
callq 0x2130
movq %r13, %rdi
callq 0x2050
movq 0x6eb7e(%rip), %rax     # 0x70f40
movq (%rax), %rdi
callq 0x20f0
movq -0x30(%rbp), %rsi
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
movl %r14d, %r8d
movl %r15d, %r9d
pushq $0x2
pushq $-0x1
callq 0x2180
addq $0x10, %rsp
movq %rax, %rdi
movq %r13, %rsi
callq 0x2488
movq $0x7a120, -0x40(%rbp)   # imm = 0x7A120
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
leaq -0x48(%rbp), %r8
callq 0x20d0
incl %r12d
cmpl $0x14, %r12d
jne 0x239f
xorl %eax, %eax
callq 0x246b
movq %rbx, %rdi
callq 0x2170
xorl %eax, %eax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x21c0
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/mtnygard[P]complisp/lisp.c
// Function: repl
int repl(REPL_Callback callback) {
  do {
    // Read a line
    fprintf(stdout, "lisp> ");
    char *line = NULL;
    size_t size = 0;
    ssize_t nchars = getline(&line, &size, stdin);
    if (nchars < 0) {
      fprintf(stderr, "Goodbye.\n");
      free(line);
      free(heap);
      break;
    }

    callback(line);
    free(line);
  } while (true);
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq 0x13df5(%rip), %rax     # 0x14fd0
movq (%rax), %rcx
leaq 0xf359(%rip), %rdi      # 0x1053e
pushq $0x6
popq %rsi
pushq $0x1
popq %rdx
callq 0x1190
leaq -0x30(%rbp), %rdi
andq $0x0, (%rdi)
leaq -0x38(%rbp), %rsi
andq $0x0, (%rsi)
movq 0x13dd1(%rip), %rax     # 0x14fd8
movq (%rax), %rdx
callq 0x1170
testq %rax, %rax
js 0x1273
pushq $0x6
popq %r15
pushq $0x1
popq %r12
leaq -0x30(%rbp), %r13
leaq -0x38(%rbp), %r14
movq -0x30(%rbp), %rdi
callq *%rbx
movq -0x30(%rbp), %rdi
callq 0x1030
movq 0x13d96(%rip), %rax     # 0x14fd0
movq (%rax), %rcx
leaq 0xf2fa(%rip), %rdi      # 0x1053e
movq %r15, %rsi
movq %r12, %rdx
callq 0x1190
andq $0x0, -0x30(%rbp)
andq $0x0, -0x38(%rbp)
movq 0x13d78(%rip), %rax     # 0x14fd8
movq (%rax), %rdx
movq %r13, %rdi
movq %r14, %rsi
callq 0x1170
testq %rax, %rax
jns 0x1224
movq 0x13d7e(%rip), %rax     # 0x14ff8
movq (%rax), %rcx
leaq 0xf2c1(%rip), %rdi      # 0x10545
pushq $0x9
popq %rsi
pushq $0x1
popq %rdx
callq 0x1190
movq -0x30(%rbp), %rdi
callq 0x1030
movq 0x140f9(%rip), %rdi     # 0x15398
callq 0x1030
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mtnygard[P]complisp/lisp.c
// Function: Env_find
bool Env_find(Env *env, const char *key, word *result) {
  if (env == NULL) {
    return false;
  }
  if (strcmp(env->name, key) == 0) {
    *result = env->value;
    return true;
  }
  return Env_find(env->prev, key, result);
}

// Assembly:
testq %rdi, %rdi
je 0x18cf
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq (%r14), %rdi
movq %r15, %rsi
callq 0x10f0
testl %eax, %eax
je 0x18d2
movq 0x10(%r14), %r14
testq %r14, %r14
jne 0x18b3
xorl %eax, %eax
jmp 0x18db
xorl %eax, %eax
retq
movq 0x8(%r14), %rax
movq %rax, (%rbx)
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mtnygard[P]complisp/lisp.c
// Function: AST_heap_free
void AST_heap_free(ASTNode *node) {
  if (!AST_is_heap_object(node)) {
    return;
  }
  if (AST_is_pair(node)) {
    AST_heap_free(AST_pair_car(node));
    AST_heap_free(AST_pair_cdr(node));
  }
  free((void *)Object_address(node));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
testb $0x3, %bl
sete %al
movl %ebx, %ecx
notl %ecx
testb $0x7, %cl
sete %cl
orb %al, %cl
jne 0x1a1f
movl %ebx, %eax
andl $0x7, %eax
andq $-0x8, %rbx
cmpl $0x1, %eax
jne 0x1a11
movq (%rbx), %rdi
callq 0x19d5
movq 0x8(%rbx), %rdi
callq 0x19d5
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x1030
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mtnygard[P]complisp/lisp.c
// Function: AST_new_pair
ASTNode *AST_new_pair(ASTNode *car, ASTNode *cdr) {
  ASTNode *node = AST_heap_alloc(kPairTag, sizeof(Pair));
  AST_pair_set_car(node, car);
  AST_pair_set_cdr(node, cdr);
  return node;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl $0x10, %edi
movl $0x1, %esi
callq 0x10e0
movq %rax, %rcx
orq $0x1, %rax
movl %eax, %edx
andl $0x7, %edx
cmpl $0x1, %edx
jne 0x1add
andq $-0x8, %rcx
movq %r14, (%rcx)
movq %rbx, 0x8(%rcx)
popq %rbx
popq %r14
popq %rbp
retq
leaq 0xdb32(%rip), %rdi      # 0xf616
leaq 0xda90(%rip), %rsi      # 0xf57b
leaq 0xdb36(%rip), %rcx      # 0xf628
movl $0xf0, %edx
callq 0x1090
// File: /workspace/github_c_makefile_star2_O3/mtnygard[P]complisp/lisp.c
// Function: AST_new_symbol
ASTNode *AST_new_symbol(const char *str) {
  word data_length = strlen(str) + 1;
  ASTNode *node = AST_heap_alloc(kSymbolTag, sizeof(Symbol) + data_length);
  Symbol *s = AST_as_symbol(node);
  s->length = data_length;
  memcpy(s->cstr, str, data_length);
  return node;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x1070
movq %rax, %r14
leaq 0x9(%rax), %rdi
movl $0x1, %esi
callq 0x10e0
movq %rax, %r15
orq $0x5, %r15
movl %r15d, %ecx
andl $0x7, %ecx
cmpl $0x5, %ecx
jne 0x1bfb
incq %r14
andq $-0x8, %rax
movq %r14, (%rax)
addq $0x8, %rax
movq %rax, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x1110
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0xda43(%rip), %rdi      # 0xf645
leaq 0xd972(%rip), %rsi      # 0xf57b
leaq 0xda49(%rip), %rcx      # 0xf659
movl $0x110, %edx            # imm = 0x110
callq 0x1090
// File: /workspace/github_c_makefile_star2_O3/mtnygard[P]complisp/lisp.c
// Function: Buffer_alloc_writable
byte *Buffer_alloc_writable(size_t capacity) {
  byte *result = mmap(NULL, capacity, PROT_READ | PROT_WRITE,
                      MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);
  assert(result != MAP_FAILED);
  return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, %rsi
xorl %edi, %edi
movl $0x3, %edx
movl $0x22, %ecx
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
xorl %r9d, %r9d
callq 0x1080
cmpq $-0x1, %rax
je 0x1d01
popq %rbp
retq
leaq 0xd972(%rip), %rdi      # 0xf67a
leaq 0xd86c(%rip), %rsi      # 0xf57b
leaq 0xd979(%rip), %rcx      # 0xf68f
movl $0x12e, %edx            # imm = 0x12E
callq 0x1090
// File: /workspace/github_c_makefile_star2_O3/mtnygard[P]complisp/lisp.c
// Function: Buffer_init
void Buffer_init(Buffer *result, size_t capacity) {
  result->address = Buffer_alloc_writable(capacity);
  assert(result->address != MAP_FAILED);
  result->state = kWritable;
  result->len = 0;
  result->capacity = capacity;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x1cd8
movq %rax, (%r14)
movl $0x0, 0x8(%r14)
movq $0x0, 0x10(%r14)
movq %rbx, 0x18(%r14)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mtnygard[P]complisp/lisp.c
// Function: Buffer_ensure_capacity
void Buffer_ensure_capacity(Buffer *buf, word additional_capacity) {
  if (buf->len + additional_capacity <= buf->capacity) {
    return;
  }
  word new_capacity =
      max(buf->capacity * 2, buf->capacity + additional_capacity);
  byte *address = Buffer_alloc_writable(new_capacity);
  memcpy(address, buf->address, buf->len);
  int result = munmap(buf->address, buf->capacity);
  assert(result == 0 && "munmap failed");
  buf->address = address;
  buf->capacity = new_capacity;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq 0x10(%rdi), %rcx
addq %rsi, %rcx
movq 0x18(%rdi), %rax
cmpq %rax, %rcx
jbe 0x1e54
movq %rsi, %rbx
movq %rdi, %r14
leaq (%rax,%rax), %rcx
addq %rax, %rbx
cmpq %rbx, %rcx
cmovgq %rcx, %rbx
movq %rbx, %rdi
callq 0x1cd8
movq %rax, %r15
movq (%r14), %rsi
movq 0x10(%r14), %rdx
movq %rax, %rdi
callq 0x1110
movq (%r14), %rdi
movq 0x18(%r14), %rsi
callq 0x1150
testl %eax, %eax
jne 0x1e5f
movq %r15, (%r14)
movq %rbx, 0x18(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0xd84d(%rip), %rdi      # 0xf6b3
leaq 0xd70e(%rip), %rsi      # 0xf57b
leaq 0xd85e(%rip), %rcx      # 0xf6d2
movl $0x15d, %edx            # imm = 0x15D
callq 0x1090
// File: /workspace/github_c_makefile_star2_O3/mtnygard[P]complisp/lisp.c
// Function: Emit_mov_reg_imm32
void Emit_mov_reg_imm32(Buffer *buf, Register dst, int32_t src) {
  Buffer_write8(buf, kRexPrefix);
  Buffer_write8(buf, 0xc7);
  Buffer_write8(buf, modrm(3, dst, 0));
  Buffer_write32(buf, src);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %r15d
movq %rdi, %r14
movl $0x1, %esi
callq 0x1df5
movq (%r14), %rax
movq 0x10(%r14), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x10(%r14)
movb $0x48, (%rax,%rcx)
movl $0x1, %esi
movq %r14, %rdi
callq 0x1df5
movq (%r14), %rax
movq 0x10(%r14), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x10(%r14)
movb $-0x39, (%rax,%rcx)
andb $0x7, %r15b
orb $-0x40, %r15b
movl $0x1, %esi
movq %r14, %rdi
callq 0x1df5
movq (%r14), %rax
movq 0x10(%r14), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x10(%r14)
movb %r15b, (%rax,%rcx)
movq %r14, %rdi
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1eab
// File: /workspace/github_c_makefile_star2_O3/mtnygard[P]complisp/lisp.c
// Function: Emit_add_reg_imm32
void Emit_add_reg_imm32(Buffer *buf, Register dst, int32_t src) {
  Buffer_write8(buf, kRexPrefix);
  if (dst == kRax) {
    // Optimization: add eax, {imm32} can either be encoded as 05 {imm32} or 81
    // c0 {imm32}.
    Buffer_write8(buf, 0x05);
  } else {
    Buffer_write8(buf, 0x81);
    Buffer_write8(buf, modrm(3, dst, 0));
  }
  Buffer_write32(buf, src);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %r15d
movq %rdi, %r14
movl $0x1, %esi
callq 0x1df5
movq (%r14), %rax
movq 0x10(%r14), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x10(%r14)
movb $0x48, (%rax,%rcx)
movl $0x1, %esi
movq %r14, %rdi
callq 0x1df5
movq (%r14), %rax
movq 0x10(%r14), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x10(%r14)
testl %r15d, %r15d
je 0x20ce
movb $-0x7f, (%rax,%rcx)
andb $0x7, %r15b
orb $-0x40, %r15b
movl $0x1, %esi
movq %r14, %rdi
callq 0x1df5
movq (%r14), %rax
movq 0x10(%r14), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x10(%r14)
movb %r15b, (%rax,%rcx)
jmp 0x20d2
movb $0x5, (%rax,%rcx)
movq %r14, %rdi
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1eab
// File: /workspace/github_c_makefile_star2_O3/mtnygard[P]complisp/lisp.c
// Function: Emit_sub_reg_imm32
void Emit_sub_reg_imm32(Buffer *buf, Register dst, int32_t src) {
  Buffer_write8(buf, kRexPrefix);
  if (dst == kRax) {
    // Optimization: sub eax, {imm32} can either be encoded as 2d {imm32} or 81
    // e8 {imm32}.
    Buffer_write8(buf, 0x2d);
  } else {
    Buffer_write8(buf, 0x81);
    Buffer_write8(buf, modrm(3, dst, 5));
  }
  Buffer_write32(buf, src);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %r15d
movq %rdi, %r14
movl $0x1, %esi
callq 0x1df5
movq (%r14), %rax
movq 0x10(%r14), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x10(%r14)
movb $0x48, (%rax,%rcx)
movl $0x1, %esi
movq %r14, %rdi
callq 0x1df5
movq (%r14), %rax
movq 0x10(%r14), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x10(%r14)
testl %r15d, %r15d
je 0x2164
movb $-0x7f, (%rax,%rcx)
andb $0x7, %r15b
orb $-0x18, %r15b
movl $0x1, %esi
movq %r14, %rdi
callq 0x1df5
movq (%r14), %rax
movq 0x10(%r14), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x10(%r14)
movb %r15b, (%rax,%rcx)
jmp 0x2168
movb $0x2d, (%rax,%rcx)
movq %r14, %rdi
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1eab
// File: /workspace/github_c_makefile_star2_O3/mtnygard[P]complisp/lisp.c
// Function: Emit_shl_reg_imm8
void Emit_shl_reg_imm8(Buffer *buf, Register dst, int8_t bits) {
  Buffer_write8(buf, kRexPrefix);
  Buffer_write8(buf, 0xc1);
  Buffer_write8(buf, modrm(3, dst, 4));
  Buffer_write8(buf, bits);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %r15d
movq %rdi, %r14
movl $0x1, %esi
callq 0x1df5
movq (%r14), %rax
movq 0x10(%r14), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x10(%r14)
movb $0x48, (%rax,%rcx)
movl $0x1, %esi
movq %r14, %rdi
callq 0x1df5
movq (%r14), %rax
movq 0x10(%r14), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x10(%r14)
movb $-0x3f, (%rax,%rcx)
andb $0x7, %r15b
orb $-0x20, %r15b
movl $0x1, %esi
movq %r14, %rdi
callq 0x1df5
movq (%r14), %rax
movq 0x10(%r14), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x10(%r14)
movb %r15b, (%rax,%rcx)
movl $0x1, %esi
movq %r14, %rdi
callq 0x1df5
movq (%r14), %rax
movq 0x10(%r14), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x10(%r14)
movb %bl, (%rax,%rcx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mtnygard[P]complisp/lisp.c
// Function: Emit_or_reg_imm8
void Emit_or_reg_imm8(Buffer *buf, Register dst, uint8_t tag) {
  Buffer_write8(buf, kRexPrefix);
  Buffer_write8(buf, 0x83);
  Buffer_write8(buf, modrm(3, dst, 1));
  Buffer_write8(buf, tag);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %r15d
movq %rdi, %r14
movl $0x1, %esi
callq 0x1df5
movq (%r14), %rax
movq 0x10(%r14), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x10(%r14)
movb $0x48, (%rax,%rcx)
movl $0x1, %esi
movq %r14, %rdi
callq 0x1df5
movq (%r14), %rax
movq 0x10(%r14), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x10(%r14)
movb $-0x7d, (%rax,%rcx)
andb $0x7, %r15b
orb $-0x38, %r15b
movl $0x1, %esi
movq %r14, %rdi
callq 0x1df5
movq (%r14), %rax
movq 0x10(%r14), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x10(%r14)
movb %r15b, (%rax,%rcx)
movl $0x1, %esi
movq %r14, %rdi
callq 0x1df5
movq (%r14), %rax
movq 0x10(%r14), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x10(%r14)
movb %bl, (%rax,%rcx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mtnygard[P]complisp/lisp.c
// Function: Emit_cmp_reg_imm32
void Emit_cmp_reg_imm32(Buffer *buf, Register left, int32_t right) {
  Buffer_write8(buf, kRexPrefix);
  if (left == kRax) {
    // Optimization: cmp rax, {imm32} can be encoded as 0x3d {imm32}
    Buffer_write8(buf, 0x3d);
  } else {
    Buffer_write8(buf, 0x81);
    Buffer_write8(buf, modrm(3, left, 7));
  }
  Buffer_write32(buf, right);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %r15d
movq %rdi, %r14
movl $0x1, %esi
callq 0x1df5
movq (%r14), %rax
movq 0x10(%r14), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x10(%r14)
movb $0x48, (%rax,%rcx)
movl $0x1, %esi
movq %r14, %rdi
callq 0x1df5
movq (%r14), %rax
movq 0x10(%r14), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x10(%r14)
testl %r15d, %r15d
je 0x247a
movb $-0x7f, (%rax,%rcx)
orb $-0x8, %r15b
movl $0x1, %esi
movq %r14, %rdi
callq 0x1df5
movq (%r14), %rax
movq 0x10(%r14), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x10(%r14)
movb %r15b, (%rax,%rcx)
jmp 0x247e
movb $0x3d, (%rax,%rcx)
movq %r14, %rdi
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1eab
// File: /workspace/github_c_makefile_star2_O3/mtnygard[P]complisp/lisp.c
// Function: Emit_jcc
word Emit_jcc(Buffer *buf, Condition cond, int32_t offset) {
  Buffer_write8(buf, 0x0f);
  Buffer_write8(buf, 0x80 + cond);
  word pos = Buffer_len(buf);
  Buffer_write32(buf, disp32(offset));
  return pos;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %r15d
movq %rdi, %r14
movl $0x1, %esi
callq 0x1df5
movq (%r14), %rax
movq 0x10(%r14), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x10(%r14)
movb $0xf, (%rax,%rcx)
addb $-0x80, %r15b
movl $0x1, %esi
movq %r14, %rdi
callq 0x1df5
movq (%r14), %rax
movq 0x10(%r14), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x10(%r14)
movb %r15b, (%rax,%rcx)
movq 0x10(%r14), %r15
movq %r14, %rdi
movl %ebx, %esi
callq 0x1eab
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mtnygard[P]complisp/lisp.c
// Function: Emit_jmp
word Emit_jmp(Buffer *buf, int32_t offset) {
  Buffer_write8(buf, 0xe9);
  word pos = Buffer_len(buf);
  Buffer_write32(buf, disp32(offset));
  return pos;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movl $0x1, %esi
callq 0x1df5
movq (%r14), %rax
movq 0x10(%r14), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x10(%r14)
movb $-0x17, (%rax,%rcx)
movq 0x10(%r14), %r15
movq %r14, %rdi
movl %ebx, %esi
callq 0x1eab
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mtnygard[P]complisp/lisp.c
// Function: Emit_rsp_adjust
void Emit_rsp_adjust(Buffer *buf, word adjust) {
  if (adjust < 0) {
    Emit_sub_reg_imm32(buf, kRsp, -adjust);
  } else if (adjust > 0) {
    Emit_add_reg_imm32(buf, kRsp, adjust);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rsi, %rdx
testq %rsi, %rsi
js 0x29b3
je 0x29c0
movl $0x4, %esi
popq %rbp
jmp 0x2050
negl %edx
movl $0x4, %esi
popq %rbp
jmp 0x20e6
popq %rbp
retq