LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/millimat[P]Soft-Heap/sorts.c
// Function: time_sort
static void time_sort(int *A, size_t length, sorter sort, char *sort_name) {
  printf("----------------- Timing %s ------------------\n", sort_name);
  printf("Making copy of original array...\n");
  int B[length];
  memcpy(B, A, length * sizeof(int));

  printf("Timing %s on array...\n", sort_name);

  clock_t tick = clock();
  sort(B, length);
  clock_t tock = clock();
  double elapsed_secs = (double)(tock - tick) / CLOCKS_PER_SEC;
  
  if(!sorted(B, length)) error(1,0, "%s failed", sort_name);
  printf("Success.\n");
  printf("%s\t %4.6f s \n\n", sort_name, elapsed_secs);  
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r13
movq %rsi, %r14
movq %rdi, %r12
leaq 0x1bdf(%rip), %rdi      # 0x30e3
movq %rcx, %rsi
xorl %eax, %eax
callq 0x1070
leaq 0x1c7d(%rip), %rdi      # 0x3192
callq 0x1040
movq %rsp, %r15
leaq 0xf(,%r14,4), %rax
andq $-0x10, %rax
subq %rax, %r15
movq %r15, %rsp
leaq (,%r14,4), %rdx
movq %r15, %rdi
movq %r12, %rsi
callq 0x10c0
leaq 0x1bca(%rip), %rdi      # 0x3113
movq %rbx, %rsi
xorl %eax, %eax
callq 0x1070
callq 0x1060
movq %rax, %r12
movq %r15, %rdi
movq %r14, %rsi
callq *%r13
callq 0x1060
movq %rax, %r13
movl $0x1, %eax
subq %r14, %rax
decq %r14
movq $-0x1, %rcx
leaq (%rax,%rcx), %rdx
cmpq $-0x1, %rdx
je 0x159d
movl 0x4(%r15,%rcx,4), %esi
leaq 0x1(%rcx), %rdx
cmpl 0x8(%r15,%rcx,4), %esi
movq %rdx, %rcx
jle 0x157e
jmp 0x15a0
movq %r14, %rdx
cmpq %rdx, %r14
jbe 0x15bd
leaq 0x1b7e(%rip), %rdx      # 0x312a
movl $0x1, %edi
xorl %esi, %esi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x10f0
subq %r12, %r13
cvtsi2sd %r13, %xmm0
divsd 0x1a3b(%rip), %xmm0     # 0x3008
movsd %xmm0, -0x30(%rbp)
leaq 0x1bda(%rip), %rdi      # 0x31b3
callq 0x1040
leaq 0x1b4f(%rip), %rdi      # 0x3134
movq %rbx, %rsi
movsd -0x30(%rbp), %xmm0
movb $0x1, %al
callq 0x1070
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/millimat[P]Soft-Heap/sorts.c
// Function: mergesort
static void mergesort(int *A, int *aux1, int *aux2, int l, int r) {
  if(l >= r) return;
  
  // Recursively sort two halves
  int q = (l+r)/2;
  mergesort(A, aux1, aux2, l, q);
  mergesort(A, aux1, aux2, q+1, r);
  
  // Copy the two sorted halves into aux arrays
  int nlo = q - l + 1, nhi = r - q;
  memcpy(aux1, A + l, nlo * sizeof(int));
  memcpy(aux2, A + q + 1, nhi * sizeof(int));

  // Merge the arrays by filling A[l..r] with the lower current elem
  // of the smallest two unconsidered elements in aux1 and aux2
  int i = 0, j = 0, pos = l;
  while(i < nlo && j < nhi) {
    if(aux1[i] <= aux2[j]) A[pos++] = aux1[i++];
    else A[pos++] = aux2[j++];
  }
  
  // fill the remainder of A[l..r] with whichever subarray isn't done
  while(i < nlo) A[pos++] = aux1[i++];
  while(j < nhi) A[pos++] = aux2[j++];
}

// Assembly:
cmpl %r8d, %ecx
jge 0x17c4
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r8d, %r15d
movq %rdx, %rbx
movq %rsi, %rbp
leal (%r15,%rcx), %r12d
shrl %r12d
movl %r12d, %r8d
movq %rdi, (%rsp)
movq %rcx, %r14
callq 0x1640
leal 0x1(%r12), %ecx
movq (%rsp), %rdi
movq %rbp, %rsi
movq %rbx, %rdx
movl %r15d, %r8d
callq 0x1640
movl %r12d, %r13d
movq %r14, 0x10(%rsp)
subl %r14d, %r13d
subl %r12d, %r15d
movl %r14d, %eax
movq (%rsp), %rcx
leaq (%rcx,%rax,4), %rsi
movslq %r13d, %rax
movq %rax, 0x8(%rsp)
leaq 0x4(,%rax,4), %rdx
movq %rbp, %rdi
callq 0x10c0
movl %r12d, %eax
movq (%rsp), %rcx
leaq (%rcx,%rax,4), %rsi
addq $0x4, %rsi
movslq %r15d, %r14
leaq (,%r14,4), %rdx
movq %rbx, %rdi
callq 0x10c0
cmpl $0x0, 0x8(%rsp)
setns %al
testl %r14d, %r14d
setg %sil
andb %al, %sil
xorl %edx, %edx
movl $0x0, %ecx
movq 0x10(%rsp), %rax
movq %rax, %r11
cmpb $0x1, %sil
jne 0x1757
movq %r11, %rdx
movslq %edx, %rax
movq (%rsp), %rcx
leaq (%rcx,%rax,4), %rsi
xorl %ecx, %ecx
movl %edx, %eax
xorl %edx, %edx
movl %edx, %edi
movl %ecx, %r8d
movl %edx, %ecx
movl (%rbp,%rcx,4), %r9d
movl %r8d, %ecx
movl (%rbx,%rcx,4), %r10d
xorl %ecx, %ecx
xorl %edx, %edx
cmpl %r10d, %r9d
setg %cl
setle %dl
cmovll %r9d, %r10d
addl %edi, %edx
addl %r8d, %ecx
movl %r10d, (%rsi)
incl %eax
cmpl %r13d, %edx
jg 0x1757
addq $0x4, %rsi
cmpl %r15d, %ecx
jl 0x171b
cmpl %r13d, %edx
jg 0x1792
movslq %eax, %rdi
movslq %edx, %rsi
leaq (,%rsi,4), %rsi
addq %rbp, %rsi
subl %edx, %r12d
subl %r11d, %r12d
incl %r12d
movq (%rsp), %rdx
leaq (%rdx,%rdi,4), %rdi
xorl %edx, %edx
movl (%rsi,%rdx,4), %r8d
movl %r8d, (%rdi,%rdx,4)
incq %rdx
cmpl %edx, %r12d
jne 0x1780
addl %edx, %eax
cmpl %r15d, %ecx
jge 0x17b6
movslq %eax, %rdx
movslq %ecx, %rax
movq (%rsp), %rcx
leaq (%rcx,%rdx,4), %rcx
movl (%rbx,%rax,4), %edx
incq %rax
movl %edx, (%rcx)
addq $0x4, %rcx
cmpq %r14, %rax
jl 0x17a5
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/millimat[P]Soft-Heap/sorts.c
// Function: heapsort
static void heapsort(int *A, size_t length) {
  build_maxheap(A, length);
  for(size_t i = length - 1; i >= 1; i--) {
    swap(A, i, 0);
    max_heapify(A, i, 0);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rax
shrq %rax
decl %eax
js 0x1814
movl %eax, %r15d
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x1253
leaq -0x1(%r15), %rax
testq %r15, %r15
movq %rax, %r15
jg 0x17dd
jmp 0x1814
movl (%r14,%rbx,4), %eax
movl (%r14), %ecx
movl %ecx, (%r14,%rbx,4)
movl %eax, (%r14)
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x1253
decq %rbx
jne 0x17f9
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/millimat[P]Soft-Heap/sorts.c
// Function: quicksort
static void quicksort(int *A, int l, int r) {
  if(l >= r) return;
  int rand_pivot = l + (rand() % (r - l + 1));
  swap(A, l, rand_pivot);

  int q = partition(A, l, r);
  quicksort(A, l, q-1);
  quicksort(A, q+1, r);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
movabsq $-0x100000000, %r15     # imm = 0xFFFFFFFF00000000
leal 0x1(%rbx), %eax
movl %eax, 0x4(%rsp)
movabsq $0x100000000, %r13      # imm = 0x100000000
movl %ebx, %r12d
subl %ebp, %r12d
jle 0x190a
callq 0x1120
incl %r12d
cltd
idivl %r12d
addl %ebp, %edx
movslq %ebp, %rax
movslq %edx, %rcx
movl (%r14,%rax,4), %edx
movl (%r14,%rcx,4), %esi
movl %esi, (%r14,%rax,4)
movl %edx, (%r14,%rcx,4)
movl (%r14,%rax,4), %ecx
movl 0x4(%rsp), %edx
movl %ebp, %r12d
movslq %edx, %rdx
movq %rdx, %rsi
shlq $0x20, %rsi
movl -0x4(%r14,%rdx,4), %edi
decq %rdx
addq %r15, %rsi
cmpl %ecx, %edi
jg 0x1898
movslq %r12d, %r12
sarq $0x20, %rsi
movq %r12, %r8
shlq $0x20, %r8
addq %r15, %r8
movq %r12, %r10
addq %r13, %r8
movl 0x4(%r14,%r12,4), %r9d
incq %r12
cmpq %rsi, %r10
jge 0x18d0
cmpl %ecx, %r9d
jl 0x18b8
cmpq %rdx, %r12
jge 0x18df
movl %edi, (%r14,%r12,4)
movl %r9d, (%r14,%rdx,4)
jmp 0x188e
movl (%r14,%rax,4), %ecx
sarq $0x1e, %r8
movl (%r14,%r8), %edx
movl %edx, (%r14,%rax,4)
movl %ecx, (%r14,%r8)
leal -0x2(%r12), %edx
movq %r14, %rdi
movl %ebp, %esi
callq 0x1826
movl %r12d, %ebp
jmp 0x1853
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/millimat[P]Soft-Heap/sorts.c
// Function: radix_sort
static void radix_sort(int *A, size_t length) {
  int b = 10; // radix sort base
  int ndigits = ceil(log(RAND_MAX)/log(b));
  int B[length];
  memset(B, 0, sizeof(int) * length); // Valgrind gets pissed if I don't do this

  int divisor = 1; // (x / divisor) % (b) is the log_b(divisor)th least sigdig of x

  for(int i = 0; i < ndigits; i++) {
    // On even-numbered runs, current progress moves A->B; on even, B->A
    if(i % 2 == 0) radix_pass(A, B, length, b, divisor);
    else radix_pass(B, A, length, b, divisor);
    divisor *= b;
  }

  // After the final pass, the sorted array will be B if ndigits was odd.
  // If this is the case, copy B into A to complete the sort.
  if(ndigits % 2 == 1) memcpy(A, B, length * sizeof(int));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq %rsp, %r15
leaq 0xf(,%rsi,4), %rax
andq $-0x10, %rax
subq %rax, %r15
movq %r15, %rsp
leaq (,%rsi,4), %rdx
xorl %r13d, %r13d
movq %r15, %rdi
xorl %esi, %esi
callq 0x1090
movl $0x1, %r12d
testb $0x1, %r13b
jne 0x1981
movq %r14, %rdi
movq %r15, %rsi
jmp 0x1987
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movl %r12d, %ecx
callq 0x19b1
addl %r12d, %r12d
leal (%r12,%r12,4), %r12d
incl %r13d
cmpl $0xa, %r13d
jne 0x1973
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/millimat[P]Soft-Heap/sorts.c
// Function: radix_pass
static void radix_pass(int *input, int *output, size_t length, int b, int divisor) {
  int counter[b];
  memset(counter, 0, sizeof(int) * b); // set digit counts to 0
   
  // Count the number of representatives there are of each digit across all values
  for(int i = 0; i < length; i++) {
    int dig_i = (input[i] / divisor) % b; 
    counter[dig_i]++;
  }

  // Change counter so that counter[i] counts how many elements have appropriate LSD
  // less than or equal to i. This is 1 plus the max index at which an element 
  // with that digit should appear in a zero-indexed array. 
  for(int i = 1; i < b; i++) {
    counter[i] += counter[i-1];
  }
  
  for(int i = length - 1; i >= 0; i--) {
    int elem = input[i];
    int dig_i = (elem / divisor) % b;
    output[counter[dig_i] - 1] = elem;
    counter[dig_i]--; // so that next elem with this digit can be placed before this one
  }
}

// Assembly:
movq %rdx, %r8
xorps %xmm0, %xmm0
movaps %xmm0, -0x18(%rsp)
movaps %xmm0, -0x28(%rsp)
movq $0x0, -0x8(%rsp)
testq %rdx, %rdx
je 0x1a05
xorl %r9d, %r9d
movl (%rdi,%r9,4), %eax
cltd
idivl %ecx
cltq
imulq $0x66666667, %rax, %rdx # imm = 0x66666667
movq %rdx, %r10
sarq $0x22, %rdx
shrq $0x3f, %r10
addl %r10d, %edx
addl %edx, %edx
leal (%rdx,%rdx,4), %edx
subl %edx, %eax
cltq
incl -0x28(%rsp,%rax,4)
incq %r9
cmpq %r9, %r8
jne 0x19d2
movl $0x1, %eax
movl -0x28(%rsp), %edx
addl -0x28(%rsp,%rax,4), %edx
movl %edx, -0x28(%rsp,%rax,4)
incq %rax
cmpq $0xa, %rax
jne 0x1a0e
decl %r8d
js 0x1a6a
movl %r8d, %r9d
incq %r9
movl -0x4(%rdi,%r9,4), %r8d
movl %r8d, %eax
cltd
idivl %ecx
cltq
imulq $0x66666667, %rax, %rdx # imm = 0x66666667
movq %rdx, %r10
shrq $0x3f, %r10
sarq $0x22, %rdx
addl %r10d, %edx
addl %edx, %edx
leal (%rdx,%rdx,4), %edx
subl %edx, %eax
cltq
movslq -0x28(%rsp,%rax,4), %rdx
movl %r8d, -0x4(%rsi,%rdx,4)
decl %edx
movl %edx, -0x28(%rsp,%rax,4)
decq %r9
jg 0x1a2a
retq
// File: /workspace/github_c_makefile_star2_O1/millimat[P]Soft-Heap/sorts.c
// Function: softheap_sort
static void softheap_sort(int *A, size_t length) {
  if(length == 1) return; // already sorted
  double epsilon = (double)1/length;
  if(epsilon <= 0) epsilon = DBL_MIN; // guarantee positive epsilon

  softheap *sh = makeheap_empty(epsilon);
  for(int i = 0; i < length; i++) insert(sh, A[i]);
  for(int i = 0; i < length; i++) A[i] = extract_min(sh);
  destroy_heap(sh);
}

// Assembly:
cmpq $0x1, %rsi
jne 0x1a72
retq
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %xmm0
punpckldq 0x1593(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x159b(%rip), %xmm0     # 0x3030
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
movsd 0x1567(%rip), %xmm2     # 0x3010
divsd %xmm1, %xmm2
xorpd %xmm1, %xmm1
movapd %xmm2, %xmm0
cmpnlesd %xmm1, %xmm0
andpd %xmm0, %xmm2
movsd 0x1552(%rip), %xmm1     # 0x3018
andnpd %xmm1, %xmm0
orpd %xmm2, %xmm0
callq 0x1b47
movq %rax, %r15
testq %rbx, %rbx
je 0x1b09
xorl %r12d, %r12d
movl (%r14,%r12,4), %esi
movq %r15, %rdi
callq 0x1cd5
incq %r12
cmpq %r12, %rbx
jne 0x1ade
xorl %r12d, %r12d
movq %r15, %rdi
callq 0x1f71
movl %eax, (%r14,%r12,4)
incq %r12
cmpq %r12, %rbx
jne 0x1af5
movq %r15, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x1c46
// File: /workspace/github_c_makefile_star2_O1/pipde[P]deos-songlib/utils/processtab/processtab.c
// Function: printHelp
static void
printHelp()
	{
	printf("Usage: %s [OPTION]... [FILE]\n", programCmdLine);
	printVersion();
    printf("\n");
    printf("FILE argument is mandatory, or must be omitted with option -i.\n");
    printf("  -h           print this help information\n");
    printf("  -i           input from stdin (output default name is 'song.c')\n");
    printf("  -m           output makefile to stdout (cannot be used with -o or -s)\n");
    printf("  -n NAME      set program name for the output\n");
    printf("  -o           output songlib program to stdout\n");
    printf("  -s           skip makefile output (cannot be used with -m)\n");
    printf("  -v           output version information and exit\n");
    printf("  -V VERSION   set program version for the output\n");
	}

// Assembly:
pushq %rax
movq 0x64b3(%rip), %rsi      # 0x9170
leaq 0x24e0(%rip), %rdi      # 0x51a4
xorl %eax, %eax
callq 0x10a0
movq 0x642e(%rip), %rsi      # 0x9100
movq 0x642f(%rip), %rdx      # 0x9108
leaq 0x24b3(%rip), %rdi      # 0x5193
xorl %eax, %eax
callq 0x10a0
movl $0xa, %edi
callq 0x1040
leaq 0x2f05(%rip), %rdi      # 0x5bfd
callq 0x1060
leaq 0x2f38(%rip), %rdi      # 0x5c3c
callq 0x1060
leaq 0x2f57(%rip), %rdi      # 0x5c67
callq 0x1060
leaq 0x2f8d(%rip), %rdi      # 0x5ca9
callq 0x1060
leaq 0x2fc9(%rip), %rdi      # 0x5cf1
callq 0x1060
leaq 0x2fec(%rip), %rdi      # 0x5d20
callq 0x1060
leaq 0x3010(%rip), %rdi      # 0x5d50
callq 0x1060
leaq 0x3041(%rip), %rdi      # 0x5d8d
callq 0x1060
leaq 0x3068(%rip), %rdi      # 0x5dc0
popq %rax
jmp 0x1060
nop
// File: /workspace/github_c_makefile_star2_O1/pipde[P]deos-songlib/utils/processtab/tabparser.c
// Function: parseTab
ASTTab *
parseTab(FILE *in)
    {
    ASTTab *t = newASTTab();
    ASTCommand *c;
    char ch;
    int i = 0;

    while ((ch = peekChar(in)) && ch != EOF)
        {
        i++;
        /* comment or empty line */
        if (ch == '#' || ch == '\n') 
            {
            while ((ch = fgetc(in)) && ch != '\n' && ch != EOF)
                {
//printf("[parseTab] consumed character '%s'\n", ch == EOF ? "EOF" : ch == '\n' ? "\\n" : "unknown char");
                /* consume */
                }
            continue;
            }
//printf("[parseTab] parsing command\n");
        c = parseCommand(in);
        if (c == 0) return 0;
        addASTCommandToASTTab(c, t);
        }
//printf("[parseTab] ended with character '%s'\n", ch == EOF ? "EOF" : ch == '\n' ? "\\n" : "unknown char");
        
    return t;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %r14
movl $0x10, %edi
callq 0x4c71
movq %rax, %rbx
movq $0x0, (%rax)
movl $0x0, 0x8(%rax)
movq %r14, %rdi
callq 0x10e0
movl %eax, %ebp
movsbl %bpl, %r15d
movl %r15d, %edi
movq %r14, %rsi
callq 0x1160
decb %r15b
cmpb $-0x3, %r15b
ja 0x2ee7
cmpb $0x23, %bpl
je 0x2e51
movzbl %bpl, %eax
cmpl $0xa, %eax
jne 0x2e6e
movq %r14, %rdi
callq 0x10e0
testb %al, %al
je 0x2ebd
movzbl %al, %eax
cmpl $0xff, %eax
je 0x2ebd
cmpl $0xa, %eax
jne 0x2e51
jmp 0x2ebd
movq %r14, %rdi
callq 0x2ef3
testq %rax, %rax
je 0x2ee5
movq %rax, %r15
movq (%rbx), %r12
movl 0x8(%rbx), %eax
leal 0x8(,%rax,8), %edi
callq 0x4c71
movq %rax, (%rbx)
movslq 0x8(%rbx), %rax
testq %rax, %rax
jle 0x2eb1
xorl %ecx, %ecx
movq (%r12,%rcx,8), %rdx
movq (%rbx), %rsi
movq %rdx, (%rsi,%rcx,8)
incq %rcx
cmpq %rcx, %rax
jne 0x2e9e
movq (%rbx), %rcx
movq %r15, (%rcx,%rax,8)
incl %eax
movl %eax, 0x8(%rbx)
movq %r14, %rdi
callq 0x10e0
movl %eax, %ebp
movsbl %bpl, %r15d
movl %r15d, %edi
movq %r14, %rsi
callq 0x1160
decb %r15b
cmpb $-0x2, %r15b
jb 0x2e42
jmp 0x2ee7
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/pipde[P]deos-songlib/utils/processtab/tabparser.c
// Function: parseCommand
ASTCommand *
parseCommand(FILE *in)
    {
    ASTCommand *c = newASTCommand();
    char ch;
    ASTAttribute *a = 0;
    ASTStave *s = 0;
    char *comment = 0;
    
    while ((ch = peekChar(in)) && ch != EOF && ch != '\n')
        {
    //printf("[parseCommand] read character: '%c'\n", ch);   
        if (ch == '|')
            {  
            s = parseStave(in);
            if (s == 0) return 0;
            
            c->commandType = StaveCommand;
            c->un.stave = s;
            }
        else if (ch == '#')
            {  
            comment = parseComment(in);
            if (comment == 0) return 0;
            
            c->commandType = CommentCommand;
            c->un.comment = comment;
            }
        else if ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || ch == '_')
            {
            a = parseAttribute(in);  
            if (a == 0) return 0;
            
            c->commandType = AttributeCommand;
            c->un.attribute = a;
            break;
            }   
        else if (isspace(ch))
            {
            skipWhiteSpace(in);
            }
        else
            {
            Fatal("unexpected character '%c' reading beginning of line\n");
            return 0;
            }                 
        }
//printf("[parseCommand] consumed character '%s'\n", ch == EOF ? "EOF" : ch == '\n' ? "\\n" : "unknown char");
    
    return c;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movl $0x10, %edi
callq 0x4c71
movq %rax, %rbx
movl $0x0, (%rax)
movq $0x0, 0x8(%rax)
movq %r14, %rdi
callq 0x10e0
movl %eax, %r15d
movsbl %r15b, %ebp
movl %ebp, %edi
movq %r14, %rsi
callq 0x1160
movzbl %bpl, %eax
cmpl $0x7b, %eax
jg 0x2f5c
cmpl $0x23, %eax
jne 0x2f7a
movq %r14, %rdi
callq 0x3224
testq %rax, %rax
je 0x2fdb
movl $0x3, (%rbx)
movq %rax, 0x8(%rbx)
jmp 0x2f18
cmpl $0x7c, %eax
jne 0x2f85
movq %r14, %rdi
callq 0x2ffd
testq %rax, %rax
je 0x2fdb
movl $0x2, (%rbx)
movq %rax, 0x8(%rbx)
jmp 0x2f18
testl %eax, %eax
je 0x2fef
cmpl $0xa, %eax
jne 0x2f8c
jmp 0x2fef
cmpl $0xff, %eax
je 0x2fef
leal -0x61(%r15), %eax
cmpb $0x1a, %al
jb 0x2fc2
cmpb $0x5f, %r15b
je 0x2fc2
leal -0x41(%r15), %eax
cmpb $0x19, %al
jbe 0x2fc2
callq 0x11d0
movq (%rax), %rax
movsbq %r15b, %rcx
testb $0x20, 0x1(%rax,%rcx,2)
je 0x2fdf
movq %r14, %rdi
callq 0x3432
jmp 0x2f18
movq %r14, %rdi
callq 0x32ab
testq %rax, %rax
je 0x2fdb
movl $0x1, (%rbx)
movq %rax, 0x8(%rbx)
jmp 0x2fef
xorl %ebx, %ebx
jmp 0x2fef
leaq 0x2e0c(%rip), %rdi      # 0x5df2
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x4b44
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/pipde[P]deos-songlib/utils/processtab/tabparser.c
// Function: parseComment
char *
parseComment(FILE *in)
    {
    char ch;
    char buffer[COMMENT_LENGTH_MAX];
    int index = 0;
    
    while ((ch = peekChar(in)) && ch != '\n' && ch != EOF)
        {
        if (index == COMMENT_LENGTH_MAX - 1)
            {
            Fatal("Comment string cannot be longer than %i characters\n", COMMENT_LENGTH_MAX - 1);
            return 0;
            }
        ch = fgetc(in);
        buffer[index++] = ch;
        }
    return StringDup(buffer);
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x1000, %rsp           # imm = 0x1000
movq %rdi, %rbx
xorl %r14d, %r14d
movq %rbx, %rdi
callq 0x10e0
movl %eax, %ebp
movsbl %bpl, %edi
movq %rbx, %rsi
callq 0x1160
testb %bpl, %bpl
je 0x327a
movzbl %bpl, %eax
cmpl $0xa, %eax
je 0x327a
cmpl $0xff, %eax
je 0x327a
cmpq $0xfff, %r14            # imm = 0xFFF
je 0x3287
movq %rbx, %rdi
callq 0x10e0
movb %al, (%rsp,%r14)
incq %r14
jmp 0x3235
movq %rsp, %rdi
callq 0x4c54
movq %rax, %rbx
jmp 0x329c
leaq 0x2f9f(%rip), %rdi      # 0x622d
xorl %ebx, %ebx
movl $0xfff, %esi            # imm = 0xFFF
xorl %eax, %eax
callq 0x4b44
movq %rbx, %rax
addq $0x1000, %rsp           # imm = 0x1000
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/pipde[P]deos-songlib/utils/processtab/tabparser.c
// Function: trimWhiteSpace
static char *
trimWhiteSpace(char *str)
    {
    int frontIndex = 0;
    int backIndex = 0;
    char ch;
    char *newString;
    int i;
    
    if (str == 0) return 0;
    
    while ((ch = str[backIndex]) && ch != '\0' && isspace(ch))
        {
        frontIndex++;
        backIndex++;
        }
        
    if (ch == '\0') return "";
        
    backIndex++;
        
    while ((ch = str[backIndex]) && ch != '\0')
        {
        backIndex++;
        }

    while ((ch = str[backIndex-1]) && isspace(ch) && backIndex > frontIndex)
        {
        backIndex--;
        }
    newString  = (char *)New(sizeof(char) * (backIndex-frontIndex));
    
    for (i = 0; i < backIndex - frontIndex; i++)
        {
        newString[i] = str[frontIndex + i];
        }
    
    newString[backIndex - frontIndex] = '\0';
    return newString;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x34c5
movq %rdi, %rbx
movb (%rdi), %bpl
leaq 0x1cea(%rip), %r14      # 0x5178
testb %bpl, %bpl
je 0x3556
callq 0x11d0
movq (%rax), %rax
leaq 0x1(%rbx), %r12
xorl %r15d, %r15d
movsbq %bpl, %rcx
testb $0x20, 0x1(%rax,%rcx,2)
je 0x34cd
movb (%r12), %bpl
decq %r15
incq %r12
testb %bpl, %bpl
jne 0x34a6
jmp 0x3556
xorl %r14d, %r14d
jmp 0x3556
movq %r15, %r13
negq %r13
leal 0x1(%r13), %ecx
movslq %ecx, %rcx
decq %rcx
incq %rcx
cmpb $0x0, 0x1(%rbx,%r13)
leaq 0x1(%r13), %r13
jne 0x34dd
movl %r13d, %edx
movb -0x1(%rbx,%rdx), %sil
testb %sil, %sil
je 0x351f
movq %r15, %rdx
negq %rdx
movsbq %sil, %rsi
testb $0x20, 0x1(%rax,%rsi,2)
je 0x351f
cmpq %rdx, %rcx
jle 0x351f
decl %r13d
movb -0x2(%rbx,%rcx), %sil
decq %rcx
testb %sil, %sil
jne 0x34ff
leal (%r15,%r13), %ebx
movl %ebx, %edi
callq 0x4c71
movq %rax, %r14
testl %ebx, %ebx
jle 0x3548
leal (%r15,%r13), %eax
xorl %ecx, %ecx
movb -0x1(%r12,%rcx), %dl
movb %dl, (%r14,%rcx)
incq %rcx
cmpq %rcx, %rax
jne 0x3537
movslq %r13d, %rax
movq %r14, %rcx
addq %rax, %rcx
movb $0x0, (%r15,%rcx)
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/pipde[P]deos-songlib/utils/processtab/tabparser.c
// Function: parseMeasure
ASTMeasure *
parseMeasure(FILE *in)
    {
    ASTMeasure *m = newASTMeasure();
    char ch;
    char buffer[AST_MEASURE_LENGTH_MAX];
    int index = 0;
    
    while ((ch = fgetc(in)) && ch != '|')
        {
            if (index == AST_MEASURE_LENGTH_MAX - 1)
                {
                Fatal("measure cannot be longer than %i characters\n", AST_MEASURE_LENGTH_MAX - 1);
                return 0;
                }
            if (ch == EOF)
                {
                Fatal("unexpected EOF reading measure (ensure last character on the line is '|')\n");
                return 0;
                }
            if (ch == '\n')
                {
                Fatal("unexpected newline reading measure (ensure last character on the line is '|')\n");
                return 0;
                }

            buffer[index++] = ch;
        }
        
    buffer[index] = '\0';
    m->events = StringDup(buffer);
    
    return m;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x400, %rsp            # imm = 0x400
movq %rdi, %r14
movl $0x8, %edi
callq 0x4c71
movq %rax, %rbx
movq $0x0, (%rax)
xorl %r15d, %r15d
movq %r14, %rdi
callq 0x10e0
movl %eax, %ecx
shll $0x18, %ecx
je 0x391d
cmpl $0x7c000000, %ecx       # imm = 0x7C000000
je 0x391d
cmpq $0x3ff, %r15            # imm = 0x3FF
je 0x392f
cmpl $0xa000000, %ecx        # imm = 0xA000000
je 0x3946
cmpl $0xff000000, %ecx       # imm = 0xFF000000
je 0x394f
movb %al, (%rsp,%r15)
incq %r15
jmp 0x38e4
movb $0x0, (%rsp,%r15)
movq %rsp, %rdi
callq 0x4c54
movq %rax, (%rbx)
jmp 0x395f
leaq 0x2830(%rip), %rdi      # 0x6166
xorl %ebx, %ebx
movl $0x3ff, %esi            # imm = 0x3FF
xorl %eax, %eax
callq 0x4b44
jmp 0x395f
leaq 0x2891(%rip), %rdi      # 0x61de
jmp 0x3956
leaq 0x283d(%rip), %rdi      # 0x6193
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x4b44
movq %rbx, %rax
addq $0x400, %rsp            # imm = 0x400
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/pipde[P]deos-songlib/utils/processtab/tabparser.c
// Function: indent
void
indent(FILE *out)
	{
    int i;
    if (indentLevel < 0)
    	{
    	Fatal("indentLevel less than zero, actual value: %i\n", indentLevel);
    	return;
    	}
    for (i = 0; i < indentLevel; i++)
        {
        fprintf(out, "    ");        
        }
    }

// Assembly:
movl 0x530d(%rip), %esi      # 0x917c
testl %esi, %esi
js 0x3eb0
cmpl $0x0, 0x5302(%rip)      # 0x917c
jle 0x3eaf
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %ebp, %ebp
leaq 0x2511(%rip), %r14      # 0x639d
movl $0x4, %esi
movl $0x1, %edx
movq %r14, %rdi
movq %rbx, %rcx
callq 0x11c0
incl %ebp
cmpl 0x52d3(%rip), %ebp      # 0x917c
jl 0x3e8c
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x24b8(%rip), %rdi      # 0x636f
xorl %eax, %eax
jmp 0x4b44
nop
// File: /workspace/github_c_makefile_star2_O1/pipde[P]deos-songlib/utils/processtab/tabchecker.c
// Function: concatDoubleArrays
static DoubleArray *
concatDoubleArrays(DoubleArray *first, DoubleArray *second)
    {
//printf("[concatDoubleArrays]\n");
    DoubleArray *newArray;
    int i, firstLength = 0, secondLength = 0;
    
    if (first == 0 && second == 0) return 0;
    
//printf("[concatDoubleArrays] first: {%zu}\n", (size_t)first);
//printf("[concatDoubleArrays] second: {%zu}\n", (size_t)second);
    
    if (first == 0) firstLength = 0;
    else firstLength = first->length;

    if (second == 0) secondLength = 0;
    else secondLength = second->length;
        
//printf("[concatDoubleArrays] firstLength: %i\n", firstLength);
//printf("[concatDoubleArrays] secondLength: %i\n", secondLength);
    
    newArray = newDoubleArray(firstLength + secondLength);
        
    for (i = 0; i < firstLength; i++)
        {
        newArray->values[i] = first->values[i];
        }
    for (i = 0; i < secondLength; i++)
        {
        newArray->values[firstLength + i] = second->values[i];
        }
//printf("[concatDoubleArrays] newArray: {%zu}\n", (size_t)newArray);
//printf("[concatDoubleArrays] newArray->length: %i\n", newArray->length);
    return newArray;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
xorl %r15d, %r15d
movq %rdi, %rax
orq %rsi, %rax
jne 0x48dc
xorl %eax, %eax
jmp 0x494d
movq %rsi, %rbx
movq %rdi, %r14
testq %rdi, %rdi
je 0x48eb
movl 0x8(%r14), %r15d
testq %rbx, %rbx
je 0x48f6
movl 0x8(%rbx), %r12d
jmp 0x48f9
xorl %r12d, %r12d
leal (%r12,%r15), %edi
callq 0x4a12
testl %r15d, %r15d
jle 0x4924
movq (%r14), %rcx
movq (%rax), %rdx
movl %r15d, %esi
xorl %edi, %edi
movsd (%rcx,%rdi,8), %xmm0
movsd %xmm0, (%rdx,%rdi,8)
incq %rdi
cmpq %rdi, %rsi
jne 0x4912
testl %r12d, %r12d
jle 0x494d
movq (%rbx), %rcx
movslq %r15d, %rdx
movl %r12d, %esi
shlq $0x3, %rdx
addq (%rax), %rdx
xorl %edi, %edi
movsd (%rcx,%rdi,8), %xmm0
movsd %xmm0, (%rdx,%rdi,8)
incq %rdi
cmpq %rdi, %rsi
jne 0x493b
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/pipde[P]deos-songlib/utils/processtab/tabchecker.c
// Function: newStringArray
static StringArray *
newStringArray(int size)
    {
    StringArray *sa = (StringArray *) New(sizeof(StringArray));
    int i;
    
    sa->values = (char **) New(sizeof(char *) * size);
    sa->length = size;
    for (i=0; i<size; i++)
        {
        sa->values[i] = 0;
        }
    return sa;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %r14d
movl $0x10, %edi
callq 0x4c71
movq %rax, %rbx
leal (,%r14,8), %edi
callq 0x4c71
movq %rax, (%rbx)
movl %r14d, 0x8(%rbx)
testl %r14d, %r14d
jle 0x499e
movl %r14d, %eax
xorl %ecx, %ecx
movq (%rbx), %rdx
movq $0x0, (%rdx,%rcx,8)
incq %rcx
cmpq %rcx, %rax
jne 0x498b
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/pipde[P]deos-songlib/utils/processtab/tabchecker.c
// Function: substring
static char *
substring(const char* str, size_t begin, size_t len)
    {
    int strLength;
    int realLength = len;
    
//printf("[substring] 1\n");
    if (str == 0)
        {
        return 0;
        }
        
    strLength = strlen(str);
//printf("[substring] 2\n");
        
    if (len == 0 || strLength == 0 || strLength < begin)
        {
        return StringDup("");
        }
        
//printf("[substring] 3\n");
    if (strLength < (begin+len))
        {
        realLength = strLength - begin;
        }

//printf("[substring] 4\n");
    return strndup(str + begin, realLength);
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x49e9
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
callq 0x1080
testq %r15, %r15
sete %cl
testl %eax, %eax
sete %dl
orb %cl, %dl
jne 0x49d8
movslq %eax, %rcx
cmpq %r14, %rcx
jae 0x49f1
leaq 0x799(%rip), %rdi       # 0x5178
popq %rbx
popq %r14
popq %r15
jmp 0x4c54
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
leaq (%r15,%r14), %rdx
subl %r14d, %eax
cmpq %rdx, %rcx
cmovaeq %r15, %rax
addq %r14, %rbx
movslq %eax, %rsi
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x1100
// File: /workspace/github_c_makefile_star2_O1/pipde[P]deos-songlib/utils/processtab/tabchecker.c
// Function: newDoubleArray
static DoubleArray *
newDoubleArray(int size)
    {
    DoubleArray *da = (DoubleArray *) New(sizeof(DoubleArray));
    int i;
    
    da->values = (double *) New(sizeof(double) * size);
    da->length = size;
    for (i=0; i<size; i++)
        {
        da->values[i] = 0;
        }
    return da;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %r14d
movl $0x10, %edi
callq 0x4c71
movq %rax, %rbx
leal (,%r14,8), %edi
callq 0x4c71
movq %rax, (%rbx)
movl %r14d, 0x8(%rbx)
testl %r14d, %r14d
jle 0x4a50
movl %r14d, %edx
shlq $0x3, %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0x10d0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/pipde[P]deos-songlib/utils/processtab/tabchecker.c
// Function: cons_str
static char *
cons_str(char car, char *cdr)
    {
    int i, newLength = strlen(cdr) + 2;
    
    char *newString = (char *)New(sizeof(char) * newLength);
    newString[0] = car;
    
    for (i = 1; i < newLength; i++)
        {
        newString[i] = cdr[i-1];
        }
	newString[newLength - 1] = '\0';
    return newString;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %r15d
movq %rsi, %rdi
callq 0x1080
movq %rax, %r14
leal 0x2(%rax), %ebp
movl %ebp, %edi
callq 0x4c71
movb %r15b, (%rax)
cmpl $0x7ffffffd, %r14d      # imm = 0x7FFFFFFD
ja 0x4aa1
movl %ebp, %ecx
decq %rcx
xorl %edx, %edx
movb (%rbx,%rdx), %sil
movb %sil, 0x1(%rax,%rdx)
incq %rdx
cmpq %rdx, %rcx
jne 0x4a90
leal 0x1(%r14), %ecx
movslq %ecx, %rcx
movb $0x0, (%rax,%rcx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/pipde[P]deos-songlib/utils/processtab/tabchecker.c
// Function: parseGenericTimingEvents
static DoubleArray *
parseGenericTimingEvents(char *timingEvents, double totalValue)
    {
//printf("[parseGenericTimingEvents]\n");
    int length = strlen(timingEvents);
    DoubleArray *retVal = newDoubleArray(length);
    int i;
    char ch;
    
    for (i = 0; i < length; i++)
        {
        ch = timingEvents[i];
        /* expect only spaces and dots after first event */
        if (ch != '.' && i != 0)
            {
            Fatal("Timing '.' expected; found '%c'\n", timingEvents[i]);
            return 0;
            }
        retVal->values[i] = totalValue / length;
//printf("[parseGenericTimingEvents] Converted '%c' into duration: %f\n", timingEvents[i], retVal->values[i]);
        }
//printf("[parseGenericTimingEvents] retVal length: %i\n", retVal->length);
    return retVal;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movsd %xmm0, 0x8(%rsp)
movq %rdi, %r14
callq 0x1080
movq %rax, %r15
movl %r15d, %edi
callq 0x4a12
movq %rax, %rbx
testl %r15d, %r15d
jle 0x4b37
xorps %xmm0, %xmm0
cvtsi2sd %r15d, %xmm0
movsd 0x8(%rsp), %xmm1
divsd %xmm0, %xmm1
andl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
xorl %eax, %eax
movapd %xmm1, %xmm0
movsbl (%r14,%rax), %esi
cmpl $0x2e, %esi
sete %cl
testq %rax, %rax
sete %dl
orb %cl, %dl
je 0x4b27
movq (%rbx), %rcx
movsd %xmm0, (%rcx,%rax,8)
incq %rax
cmpq %rax, %r15
jne 0x4b00
jmp 0x4b37
leaq 0x193f(%rip), %rdi      # 0x646d
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x4b44
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/almk277[P]ROSE/rose/rose.c
// Function: main
int main(int argc, char *argv[])
{
	Module *m;
	Thread t;
	const char *file = argc > 1 ? argv[1] : "out.rmd";
	loader_add_dir_from_file(file);
	loader_add_dirs_from_env();
	heap_create();

   	m = module_load_obligatory(file);
	if(thread_init(&t, m, "main") < 0)
		return 1;
	thread_run(&t);

	return 0;
}

// Assembly:
pushq %rbx
subq $0x2430, %rsp           # imm = 0x2430
cmpl $0x2, %edi
jl 0x146f
movq 0x8(%rsi), %rbx
jmp 0x1476
leaq 0x2b8e(%rip), %rbx      # 0x4004
movq %rbx, %rdi
callq 0x3282
callq 0x320c
callq 0x2a34
movq %rbx, %rdi
callq 0x1b44
leaq 0x2b75(%rip), %rdx      # 0x400c
leaq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x1d44
testl %eax, %eax
js 0x14b6
leaq 0x8(%rsp), %rdi
callq 0x1e8c
xorl %eax, %eax
jmp 0x14bb
movl $0x1, %eax
addq $0x2430, %rsp           # imm = 0x2430
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/almk277[P]ROSE/rose/module.c
// Function: module_load
Module *module_load(const char *path, const char **errstr)
{
	FILE *f = fopen(path, "rb");
	if(f)
		return load_header(f, errstr);

	*errstr = sys_error();
	return NULL;
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
leaq 0x2b42(%rip), %rsi      # 0x4011
callq 0x1150
testq %rax, %rax
je 0x14e2
movq %rax, %rdi
movq %rbx, %rsi
popq %rbx
jmp 0x14f5
callq 0x1060
movl (%rax), %edi
callq 0x1180
movq %rax, (%rbx)
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/almk277[P]ROSE/rose/module.c
// Function: module_load_obligatory
Module *module_load_obligatory(const char *path)
{
	const char *errstr;
	Module *m = module_load(path, &errstr);
	if(!m) {
		printf("%s: %s\n", path, errstr);
		exit(1);
	}
	return m;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %rsi
callq 0x14c4
testq %rax, %rax
je 0x1b61
addq $0x10, %rsp
popq %rbx
retq
movq 0x8(%rsp), %rdx
leaq 0x24a7(%rip), %rdi      # 0x4014
movq %rbx, %rsi
xorl %eax, %eax
callq 0x10c0
movl $0x1, %edi
callq 0x1160
// File: /workspace/github_c_makefile_star2_O1/almk277[P]ROSE/rose/module.c
// Function: module_get
Module *module_get(Symbol *name, const char **errstr)
{
	SymbolValue *v;
	FILE *f;

   	v = symtbl_find(&module_tbl, name);
	if(v)
		return v->p;

	f = loader_find_module(name);
	if(f)
		return load_header(f, errstr);

	*errstr = "can not find module";
	return NULL;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x558e(%rip), %rdi      # 0x7120
movq %r14, %rsi
callq 0x2ea7
testq %rax, %rax
je 0x1baa
movq (%rax), %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %r14, %rdi
callq 0x32b6
testq %rax, %rax
je 0x1bc9
movq %rax, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x14f5
leaq 0x244c(%rip), %rax      # 0x401c
movq %rax, (%rbx)
xorl %eax, %eax
jmp 0x1ba2
// File: /workspace/github_c_makefile_star2_O1/almk277[P]ROSE/rose/module.c
// Function: module_get_obligatory
Module *module_get_obligatory(Symbol *name)
{
	const char *errstr;
	Module *m = module_get(name, &errstr);
	if(!m) {
		fprintf(stderr, "%s: %s\n", name, errstr);
		exit(1);
	}
	return m;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %rsi
callq 0x1b81
testq %rax, %rax
je 0x1bf4
addq $0x10, %rsp
popq %rbx
retq
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0x11a0
// File: /workspace/github_c_makefile_star2_O1/almk277[P]ROSE/rose/module.c
// Function: module_exp_get_obligatory
RA_Export module_exp_get_obligatory(const Module *m,
		Symbol *name, RA_Export hint)
{
	if(!module_exp_find(m, name, &hint)) {
		fprintf(stderr, "%s.%s: procedure not found\n",
				module_name(m), name);
		exit(1);
	}
	return hint;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
movzbl 0x18(%rdi), %r15d
cmpb %bpl, %r15b
jbe 0x1c48
movzbl %bpl, %esi
addq 0x60(%r14), %rsi
movq %rbx, %rdi
callq 0x1100
testl %eax, %eax
je 0x1c8d
movb $0x1, %al
testq %r15, %r15
je 0x1c8f
movq 0x10(%r14), %r12
movq %r14, (%rsp)
movq 0x60(%r14), %r14
xorl %r13d, %r13d
movzwl (%r12,%r13,4), %esi
addq %r14, %rsi
movq %rbx, %rdi
callq 0x1100
testl %eax, %eax
je 0x1c82
incq %r13
cmpq %r13, %r15
jne 0x1c5e
movq (%rsp), %r14
movb $0x1, %al
jmp 0x1c8f
xorl %eax, %eax
movl %r13d, %ebp
movq (%rsp), %r14
jmp 0x1c8f
xorl %eax, %eax
testb %al, %al
jne 0x1ca4
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
movq %rbx, %rsi
callq 0x11ca
// File: /workspace/github_c_makefile_star2_O1/almk277[P]ROSE/rose/thread.c
// Function: thread_init
int thread_init(Thread *t, struct Module *m, Symbol *proc)
{
	const Segments *seg = &m->seg;
	RA_Export exp_idx = module_exp_get_obligatory(m, proc, 0);

	const RMDExport *exp = exp_get(seg, exp_idx);
	const RMDProcedure *ptbl_ent = ptbl_get(seg, exp->idx);
	t->pc.byte = text_get(seg, ptbl_ent->addr);

	t->vars = t->vstack;
	t->vars_end = t->vars + sizeof t->vstack / sizeof t->vstack[0] - 1;

	/* Create first stack frame manually as if startup code
	   calls function @proc. There is only 'exit' instruction
	   in startup code, so we do not need all fields */
	t->pstack[0].retaddr = startup_code;
	t->pstack[0].proc = ptbl_ent;
	t->pstack[0].module = m;
	t->procs = t->pstack;
	t->procs_end = t->procs + sizeof t->pstack / sizeof t->pstack[0] - 1;
	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
movq %rdx, %rsi
xorl %edx, %edx
callq 0x1c17
movq 0x10(%r14), %rcx
movq 0x20(%r14), %rdx
movzbl %al, %eax
movzbl 0x2(%rcx,%rax,4), %eax
leaq (%rax,%rax,2), %rax
leaq (%rdx,%rax,4), %rax
movl (%rax), %ecx
addq 0x50(%r14), %rcx
movq %rcx, 0x2420(%rbx)
movq %rbx, 0x2000(%rbx)
leaq 0x1ffc(%rbx), %rcx
movq %rcx, 0x2008(%rbx)
leaq 0x2010(%rbx), %rcx
leaq 0x2421(%rip), %rdx      # 0x41c4
movq %rdx, 0x2020(%rbx)
movq %rax, 0x2018(%rbx)
movq %r14, 0x2010(%rbx)
movq %rcx, 0x2410(%rbx)
leaq 0x23f0(%rbx), %rax
movq %rax, 0x2418(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/almk277[P]ROSE/rose/thread.c
// Function: thread_call_intern
int thread_call_intern(Thread *t, Module *module, RA_Proc p_idx)
{
	const Segments *seg = &module->seg;
	const RMDProcedure *p = ptbl_get(seg, p_idx);
	if(alloc_frame(t, p) || save_procedure(t, p))
		return -1;
	t->pc.byte = text_get(seg, p->addr);
	t->procs->module = module;
	return 0;
}

// Assembly:
movq 0x20(%rsi), %r8
movl %edx, %eax
leaq (%rax,%rax,2), %rdx
movq 0x2410(%rdi), %rcx
movq 0x8(%rcx), %rax
movzbl 0xa(%rax), %r10d
movzbl 0xb(%rax), %r9d
addq %r10, %r9
movzbl 0xa(%r8,%rdx,4), %eax
subq %rax, %r9
shlq $0x2, %r9
addq 0x2000(%rdi), %r9
movq %r9, 0x2000(%rdi)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq 0x2008(%rdi), %r9
ja 0x1e60
leaq 0x20(%rcx), %r10
movq %r10, 0x2410(%rdi)
cmpq 0x2418(%rdi), %r10
ja 0x1e60
leaq (%r8,%rdx,4), %rax
movq %rax, 0x28(%rcx)
movq %r9, 0x38(%rcx)
movq 0x2420(%rdi), %rdx
movq %rdx, 0x30(%rcx)
movl (%rax), %eax
addq 0x50(%rsi), %rax
movq %rax, 0x2420(%rdi)
movq %rsi, 0x20(%rcx)
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/almk277[P]ROSE/rose/heap.c
// Function: heap_alloc
RefData *heap_alloc(R_Word size)
{
	RefData *d = (RefData*)hcur;
	d->size = size;
	hcur += size;
	return d;
}

// Assembly:
movq 0x4ec3(%rip), %rax      # 0x7928
movl %edi, (%rax)
movslq %edi, %rcx
addq %rax, %rcx
movq %rcx, 0x4eb4(%rip)      # 0x7928
retq
// File: /workspace/github_c_makefile_star2_O1/almk277[P]ROSE/rose/array.c
// Function: bytearray_load
RD_ByteArray *bytearray_load(const void *source)
{
	RA_Array size = deserial(*(RA_Array*)source);
	RD_ByteArray *a = bytearray_new(size);
	memcpy(a + 1, (RA_Array*)source + 1, size);
	return a;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl (%rdi), %r14d
leal 0x8(%r14), %edi
callq 0x2a5e
movq %rax, %r15
movl %r14d, 0x4(%rax)
leaq 0x8(%rax), %rdi
addq $0x4, %rbx
movq %rbx, %rsi
movq %r14, %rdx
callq 0x1120
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/almk277[P]ROSE/rose/object.c
// Function: object_new
RD_Object *object_new(struct Module *module)
{
	RD_Object *o = (RD_Object*)heap_alloc(
			sizeof(RD_Object) + module_data_size(module));
	o->module = module;
	return o;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movzbl 0x80(%rdi), %edi
addl $0x10, %edi
callq 0x2a5e
movq %rbx, 0x8(%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/almk277[P]ROSE/rose/file.c
// Function: file_open
RD_File *file_open(const RD_ByteArray *name, R_Byte mode)
{
	const scheme *s;
	const R_Byte *fname;
	char *c_fname;
	int len;
	RD_File *f;

	s = get_scheme(name);

	/* make a zero-terminated string copy without scheme prefix */
	fname = bytearray_data_c(name);
	len = bytearray_length(name) + 1;
	fname += s->name.len;
	len -= s->name.len;;

	c_fname = malloc(len);
	memcpy(c_fname, fname, len);
	c_fname[len] = '\0';

	f = s->open(c_fname, mode);

	free(c_fname);
	return f;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, 0xc(%rsp)
movq %rdi, %rbx
callq 0x2b03
movl %eax, %ebp
movq %rbx, 0x10(%rsp)
movq %rbx, %rdi
callq 0x2b5d
movq %rax, %r15
xorl %r12d, %r12d
leaq 0x40f2(%rip), %rbx      # 0x6cd0
movq (%r12,%rbx), %r13
movslq 0x8(%r13), %rdx
cmpl %ebp, %edx
jg 0x2bfa
movq (%r13), %rsi
movq %r15, %rdi
callq 0x1140
testl %eax, %eax
je 0x2c0c
movb $0x1, %al
testb %al, %al
je 0x2c13
addq $0x8, %r12
cmpq $0x10, %r12
jne 0x2bde
jmp 0x2c18
xorl %eax, %eax
movq %r13, %r14
jmp 0x2bfc
movq %r14, %rbx
jmp 0x2c1f
leaq 0x40c1(%rip), %rbx      # 0x6ce0
movq 0x10(%rsp), %r14
movq %r14, %rdi
callq 0x2b5d
movq %rax, %r15
movq %r14, %rdi
callq 0x2b03
movslq 0x8(%rbx), %rcx
addq %rcx, %r15
subl %ecx, %eax
incl %eax
movslq %eax, %r14
movq %r14, %rdi
callq 0x1130
movq %rax, %r12
movq %rax, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1120
movb $0x0, (%r12,%r14)
movzbl 0xc(%rsp), %esi
movq %r12, %rdi
callq *0x10(%rbx)
movq %rax, %rbx
movq %r12, %rdi
callq 0x1040
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/almk277[P]ROSE/rose/file.c
// Function: local_open
static RD_File *local_open(const char *name, R_Byte mode)
{
	LocalFile *f;
	FILE *file;
	const char *mode_s;

	mode_s = f_mode(mode);
	if (!mode_s)
		return RD_null;

	file = fopen(name, mode_s);
	if(!file)
		return RD_null;

	f = (LocalFile*)heap_alloc(sizeof(LocalFile));
	f->file = file;
	f->obj.op = &op_local;

	return &f->obj;
}

// Assembly:
cmpl $0x1, %esi
je 0x2d45
cmpl $0x3, %esi
je 0x2d3c
cmpl $0x2, %esi
jne 0x2d50
leaq 0x14ef(%rip), %rsi      # 0x4229
jmp 0x2d4c
leaq 0x14e8(%rip), %rsi      # 0x422b
jmp 0x2d4c
leaq 0x14fd(%rip), %rsi      # 0x4249
xorl %eax, %eax
jmp 0x2d54
movb $0x1, %al
xorl %esi, %esi
testb %al, %al
je 0x2d5b
xorl %eax, %eax
retq
pushq %rbx
callq 0x1150
testq %rax, %rax
je 0x2d84
movq %rax, %rbx
movl $0x18, %edi
callq 0x2a5e
movq %rbx, 0x10(%rax)
leaq 0x3faa(%rip), %rcx      # 0x6d28
movq %rcx, 0x8(%rax)
jmp 0x2d86
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/almk277[P]ROSE/rose/file_rose.c
// Function: file_rose_open
RD_File *file_rose_open(const char *name, R_Byte mode)
{
	int len;
	const File *f;

	len = strlen(name);
	for (f = rose_f; f->open; ++f)
		if (f->name.len  == len && memcmp(f->name.data, name, len) == 0)
			return (f->mode & mode) ? f->open(name) : RD_null;

	return RD_null;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
callq 0x10a0
movq %rax, %r14
movslq %r14d, %r15
leaq 0x3f96(%rip), %r12      # 0x6d40
leaq 0x5d(%rip), %rax        # 0x2e0e
cmpl %r14d, 0x8(%r12)
jne 0x2dce
movq (%r12), %rdi
movq %rbx, %rsi
movq %r15, %rdx
movq %rax, %r13
callq 0x1140
testl %eax, %eax
je 0x2ded
movq 0x38(%r12), %rax
addq $0x20, %r12
testq %rax, %rax
jne 0x2db1
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movzbl %bpl, %eax
testl %eax, 0x10(%r12)
je 0x2ddc
movq %r13, %rcx
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%rcx
// File: /workspace/github_c_makefile_star2_O1/almk277[P]ROSE/lib/symtbl.c
// Function: symtbl_find
SymbolValue *symtbl_find(const SymbolTable *tbl, Symbol *s)
{
	unsigned char idx = symbol_hash(s);
	const SymbolSlistHead *list = &tbl->heads[idx];
	SymbolEntry *e = list_find(list, s);
	if(e)
		return &e->value;
	return NULL;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movb (%rsi), %al
testb %al, %al
je 0x2eca
leaq 0x1(%rbx), %rdx
xorl %ecx, %ecx
addb %al, %cl
movb (%rdx), %al
incq %rdx
testb %al, %al
jne 0x2eba
movzbl %cl, %eax
jmp 0x2ecc
xorl %eax, %eax
movq (%rdi,%rax,8), %r14
testq %r14, %r14
je 0x2eea
movq (%r14), %rdi
movq %rbx, %rsi
callq 0x1100
testl %eax, %eax
je 0x2eed
movq 0x10(%r14), %r14
jmp 0x2ed0
xorl %r14d, %r14d
leaq 0x8(%r14), %rax
testq %r14, %r14
cmoveq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/almk277[P]ROSE/lib/symtbl.c
// Function: symtbl_add_unique
SymbolValue *symtbl_add_unique(SymbolTable *tbl, Symbol *symbol)
{
	unsigned char idx = symbol_hash(symbol);
	SymbolSlistHead *list = &tbl->heads[idx];
	SymbolEntry *ent = list_find(list, symbol);
	if(ent)
		return NULL;
	return add(tbl, list, symbol);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movb (%rsi), %al
testb %al, %al
je 0x2f2b
leaq 0x1(%rbx), %rdx
xorl %ecx, %ecx
addb %al, %cl
movb (%rdx), %al
incq %rdx
testb %al, %al
jne 0x2f1a
movzbl %cl, %r15d
jmp 0x2f2e
xorl %r15d, %r15d
movq (%r14,%r15,8), %r12
testq %r12, %r12
je 0x2f4e
movq (%r12), %rdi
movq %rbx, %rsi
callq 0x1100
testl %eax, %eax
je 0x2f65
movq 0x10(%r12), %r12
jmp 0x2f32
leaq (%r14,%r15,8), %rsi
movq %r14, %rdi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2f73
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/almk277[P]ROSE/lib/symtbl.c
// Function: add
static SymbolValue *add(SymbolTable *tbl, SymbolSlistHead *list, Symbol *s)
{
	SymbolEntry *e = mm_alloc(SymbolEntry);
	e->symbol = s;
	SLIST_INSERT_HEAD(list, e, le);
	++tbl->size;
	return &e->value;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
cmpq $0x0, 0x415f(%rip)      # 0x70e8
je 0x2fb9
movq 0x4156(%rip), %rax      # 0x70e8
movq (%rax), %rcx
movq %rcx, 0x414c(%rip)      # 0x70e8
movq %r15, (%rax)
movq (%r14), %rcx
movq %rcx, 0x10(%rax)
movq %rax, (%r14)
incl 0x800(%rbx)
addq $0x8, %rax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x4128(%rip), %rdi      # 0x70e8
callq 0x30cc
jmp 0x2f8b
// File: /workspace/github_c_makefile_star2_O1/almk277[P]ROSE/lib/symtbl.c
// Function: symtbl_add_or_get
SymbolValue *symtbl_add_or_get(SymbolTable *tbl, Symbol *symbol)
{
	unsigned char idx = symbol_hash(symbol);
	SymbolSlistHead *list = &tbl->heads[idx];
	SymbolEntry *ent = list_find(list, symbol);
	if(ent)
		return &ent->value;
	return add(tbl, list, symbol);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movb (%rsi), %al
testb %al, %al
je 0x2ff2
leaq 0x1(%rbx), %rdx
xorl %ecx, %ecx
addb %al, %cl
movb (%rdx), %al
incq %rdx
testb %al, %al
jne 0x2fe1
movzbl %cl, %r12d
jmp 0x2ff5
xorl %r12d, %r12d
movq (%r14,%r12,8), %r15
testq %r15, %r15
je 0x3013
movq (%r15), %rdi
movq %rbx, %rsi
callq 0x1100
testl %eax, %eax
je 0x3016
movq 0x10(%r15), %r15
jmp 0x2ff9
xorl %r15d, %r15d
testq %r15, %r15
je 0x302e
addq $0x8, %r15
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq (%r14,%r12,8), %rsi
movq %r14, %rdi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2f73