LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/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 0x1951
movq %r14, %rdi
movq %r15, %rsi
jmp 0x1957
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movl %r12d, %ecx
callq 0x1981
addl %r12d, %r12d
leal (%r12,%r12,4), %r12d
incl %r13d
cmpl $0xa, %r13d
jne 0x1943
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x19d5
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 0x19a2
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 0x19de
decl %r8d
js 0x1a37
movl %r8d, %r9d
movl (%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)
addq $-0x1, %r9
jb 0x19f7
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x1a3f
retq
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %xmm0
punpckldq 0x15c6(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x15ce(%rip), %xmm0     # 0x3030
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
movsd 0x159a(%rip), %xmm2     # 0x3010
divsd %xmm1, %xmm2
xorpd %xmm1, %xmm1
movapd %xmm2, %xmm0
cmpnlesd %xmm1, %xmm0
andpd %xmm0, %xmm2
movsd 0x1585(%rip), %xmm1     # 0x3018
andnpd %xmm1, %xmm0
orpd %xmm2, %xmm0
callq 0x1b17
movq %rax, %r15
testq %rbx, %rbx
je 0x1ad6
xorl %r12d, %r12d
movl (%r14,%r12,4), %esi
movq %r15, %rdi
callq 0x1ca5
incq %r12
cmpq %r12, %rbx
jne 0x1aab
xorl %r12d, %r12d
movq %r15, %rdi
callq 0x1f53
movl %eax, (%r14,%r12,4)
incq %r12
cmpq %r12, %rbx
jne 0x1ac2
movq %r15, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x1c16
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/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 0x746b(%rip), %rsi      # 0xa170
leaq 0x3498(%rip), %rdi      # 0x61a4
xorl %eax, %eax
callq 0x10a0
movq 0x73e6(%rip), %rsi      # 0xa100
movq 0x73e7(%rip), %rdx      # 0xa108
leaq 0x346b(%rip), %rdi      # 0x6193
xorl %eax, %eax
callq 0x10a0
movl $0xa, %edi
callq 0x1040
leaq 0x3ebd(%rip), %rdi      # 0x6bfd
callq 0x1060
leaq 0x3ef0(%rip), %rdi      # 0x6c3c
callq 0x1060
leaq 0x3f0f(%rip), %rdi      # 0x6c67
callq 0x1060
leaq 0x3f45(%rip), %rdi      # 0x6ca9
callq 0x1060
leaq 0x3f81(%rip), %rdi      # 0x6cf1
callq 0x1060
leaq 0x3fa4(%rip), %rdi      # 0x6d20
callq 0x1060
leaq 0x3fc8(%rip), %rdi      # 0x6d50
callq 0x1060
leaq 0x3ff9(%rip), %rdi      # 0x6d8d
callq 0x1060
leaq 0x4020(%rip), %rdi      # 0x6dc0
popq %rax
jmp 0x1060
nop
// File: /workspace/github_c_makefile_star2_O3/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 0x5257
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 0x2f30
cmpb $0x23, %bpl
je 0x2e99
movzbl %bpl, %eax
cmpl $0xa, %eax
jne 0x2eb6
movq %r14, %rdi
callq 0x10e0
testb %al, %al
je 0x2f06
movzbl %al, %eax
cmpl $0xff, %eax
je 0x2f06
cmpl $0xa, %eax
jne 0x2e99
jmp 0x2f06
movq %r14, %rdi
callq 0x2f3c
testq %rax, %rax
je 0x2f2e
movq %rax, %r15
movq (%rbx), %r12
movl 0x8(%rbx), %eax
leal 0x8(,%rax,8), %edi
callq 0x5257
movq %rax, (%rbx)
movslq 0x8(%rbx), %rcx
testq %rcx, %rcx
jle 0x2efc
xorl %eax, %eax
movq (%r12,%rax,8), %rdx
movq (%rbx), %rsi
movq %rdx, (%rsi,%rax,8)
incq %rax
cmpq %rax, %rcx
jne 0x2ee6
movq (%rbx), %rax
movq %r15, (%rax,%rcx,8)
leal 0x1(%rcx), %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 0x2e8a
jmp 0x2f30
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x5257
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 0x2fa5
cmpl $0x23, %eax
jne 0x2fc3
movq %r14, %rdi
callq 0x326b
testq %rax, %rax
je 0x3024
movl $0x3, (%rbx)
movq %rax, 0x8(%rbx)
jmp 0x2f61
cmpl $0x7c, %eax
jne 0x2fce
movq %r14, %rdi
callq 0x3046
testq %rax, %rax
je 0x3024
movl $0x2, (%rbx)
movq %rax, 0x8(%rbx)
jmp 0x2f61
testl %eax, %eax
je 0x3038
cmpl $0xa, %eax
jne 0x2fd5
jmp 0x3038
cmpl $0xff, %eax
je 0x3038
leal -0x61(%r15), %eax
cmpb $0x1a, %al
jb 0x300b
cmpb $0x5f, %r15b
je 0x300b
leal -0x41(%r15), %eax
cmpb $0x19, %al
jbe 0x300b
callq 0x11d0
movq (%rax), %rax
movsbq %r15b, %rcx
testb $0x20, 0x1(%rax,%rcx,2)
je 0x3028
movq %r14, %rdi
callq 0x3479
jmp 0x2f61
movq %r14, %rdi
callq 0x32f2
testq %rax, %rax
je 0x3024
movl $0x1, (%rbx)
movq %rax, 0x8(%rbx)
jmp 0x3038
xorl %ebx, %ebx
jmp 0x3038
leaq 0x3dc3(%rip), %rdi      # 0x6df2
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x5138
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x32c1
movzbl %bpl, %eax
cmpl $0xa, %eax
je 0x32c1
cmpl $0xff, %eax
je 0x32c1
cmpq $0xfff, %r14            # imm = 0xFFF
je 0x32ce
movq %rbx, %rdi
callq 0x10e0
movb %al, (%rsp,%r14)
incq %r14
jmp 0x327c
movq %rsp, %rdi
callq 0x523a
movq %rax, %rbx
jmp 0x32e3
leaq 0x3f58(%rip), %rdi      # 0x722d
xorl %ebx, %ebx
movl $0xfff, %esi            # imm = 0xFFF
xorl %eax, %eax
callq 0x5138
movq %rbx, %rax
addq $0x1000, %rsp           # imm = 0x1000
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x350c
movq %rdi, %rbx
movb (%rdi), %bpl
leaq 0x2ca3(%rip), %r14      # 0x6178
testb %bpl, %bpl
je 0x359d
callq 0x11d0
movq (%rax), %rax
leaq 0x1(%rbx), %r12
xorl %r15d, %r15d
movsbq %bpl, %rcx
testb $0x20, 0x1(%rax,%rcx,2)
je 0x3514
movb (%r12), %bpl
decq %r15
incq %r12
testb %bpl, %bpl
jne 0x34ed
jmp 0x359d
xorl %r14d, %r14d
jmp 0x359d
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 0x3524
movl %r13d, %edx
movb -0x1(%rbx,%rdx), %sil
testb %sil, %sil
je 0x3566
movq %r15, %rdx
negq %rdx
movsbq %sil, %rsi
testb $0x20, 0x1(%rax,%rsi,2)
je 0x3566
cmpq %rdx, %rcx
jle 0x3566
decl %r13d
movb -0x2(%rbx,%rcx), %sil
decq %rcx
testb %sil, %sil
jne 0x3546
leal (%r15,%r13), %ebx
movl %ebx, %edi
callq 0x5257
movq %rax, %r14
testl %ebx, %ebx
jle 0x358f
leal (%r15,%r13), %eax
xorl %ecx, %ecx
movb -0x1(%r12,%rcx), %dl
movb %dl, (%r14,%rcx)
incq %rcx
cmpq %rcx, %rax
jne 0x357e
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_O3/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 0x5257
movq %rax, %rbx
movq $0x0, (%rax)
xorl %r15d, %r15d
movq %r14, %rdi
callq 0x10e0
movl %eax, %ecx
shll $0x18, %ecx
je 0x3966
cmpl $0x7c000000, %ecx       # imm = 0x7C000000
je 0x3966
cmpq $0x3ff, %r15            # imm = 0x3FF
je 0x3978
cmpl $0xa000000, %ecx        # imm = 0xA000000
je 0x398f
cmpl $0xff000000, %ecx       # imm = 0xFF000000
je 0x3998
movb %al, (%rsp,%r15)
incq %r15
jmp 0x392d
movb $0x0, (%rsp,%r15)
movq %rsp, %rdi
callq 0x523a
movq %rax, (%rbx)
jmp 0x39a8
leaq 0x37e7(%rip), %rdi      # 0x7166
xorl %ebx, %ebx
movl $0x3ff, %esi            # imm = 0x3FF
xorl %eax, %eax
callq 0x5138
jmp 0x39a8
leaq 0x3848(%rip), %rdi      # 0x71de
jmp 0x399f
leaq 0x37f4(%rip), %rdi      # 0x7193
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x5138
movq %rbx, %rax
addq $0x400, %rsp            # imm = 0x400
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x628d(%rip), %esi      # 0xa17c
testl %esi, %esi
js 0x3f29
je 0x3f28
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %ebp, %ebp
leaq 0x3498(%rip), %r14      # 0x739d
movl $0x4, %esi
movl $0x1, %edx
movq %r14, %rdi
movq %rbx, %rcx
callq 0x11c0
incl %ebp
cmpl 0x625a(%rip), %ebp      # 0xa17c
jl 0x3f05
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x343f(%rip), %rdi      # 0x736f
xorl %eax, %eax
jmp 0x5138
nop
// File: /workspace/github_c_makefile_star2_O3/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 0x4ece
xorl %eax, %eax
jmp 0x4f3f
movq %rsi, %rbx
movq %rdi, %r14
testq %rdi, %rdi
je 0x4edd
movl 0x8(%r14), %r15d
testq %rbx, %rbx
je 0x4ee8
movl 0x8(%rbx), %r12d
jmp 0x4eeb
xorl %r12d, %r12d
leal (%r12,%r15), %edi
callq 0x5004
testl %r15d, %r15d
jle 0x4f16
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 0x4f04
testl %r12d, %r12d
jle 0x4f3f
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 0x4f2d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x5257
movq %rax, %rbx
leal (,%r14,8), %edi
callq 0x5257
movq %rax, (%rbx)
movl %r14d, 0x8(%rbx)
testl %r14d, %r14d
jle 0x4f90
movl %r14d, %eax
xorl %ecx, %ecx
movq (%rbx), %rdx
movq $0x0, (%rdx,%rcx,8)
incq %rcx
cmpq %rcx, %rax
jne 0x4f7d
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x4fdb
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 0x4fca
movslq %eax, %rcx
cmpq %r14, %rcx
jae 0x4fe3
leaq 0x11a7(%rip), %rdi      # 0x6178
popq %rbx
popq %r14
popq %r15
jmp 0x523a
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_O3/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 0x5257
movq %rax, %rbx
leal (,%r14,8), %edi
callq 0x5257
movq %rax, (%rbx)
movl %r14d, 0x8(%rbx)
testl %r14d, %r14d
jle 0x5042
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_O3/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 0x5257
movb %r15b, (%rax)
cmpl $0x7ffffffd, %r14d      # imm = 0x7FFFFFFD
ja 0x5093
movl %ebp, %ecx
decq %rcx
xorl %edx, %edx
movb (%rbx,%rdx), %sil
movb %sil, 0x1(%rax,%rdx)
incq %rdx
cmpq %rdx, %rcx
jne 0x5082
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_O3/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 0x5004
movq %rax, %rbx
testl %r15d, %r15d
jle 0x5129
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 0x5119
movq (%rbx), %rcx
movsd %xmm0, (%rcx,%rax,8)
incq %rax
cmpq %rax, %r15
jne 0x50f2
jmp 0x5129
leaq 0x23dd(%rip), %rdi      # 0x74fd
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x5138
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O3/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 0x148f
movq 0x8(%rsi), %rbx
jmp 0x1496
leaq 0x2b6e(%rip), %rbx      # 0x4004
movq %rbx, %rdi
callq 0x31fc
callq 0x3186
callq 0x2a08
movq %rbx, %rdi
callq 0x1b32
leaq 0x2b55(%rip), %rdx      # 0x400c
leaq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x1d18
testl %eax, %eax
js 0x14d6
leaq 0x8(%rsp), %rdi
callq 0x1e60
xorl %eax, %eax
jmp 0x14db
movl $0x1, %eax
addq $0x2430, %rsp           # imm = 0x2430
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x2b22(%rip), %rsi      # 0x4011
callq 0x1150
testq %rax, %rax
je 0x1502
movq %rax, %rdi
movq %rbx, %rsi
popq %rbx
jmp 0x1515
callq 0x1060
movl (%rax), %edi
callq 0x1180
movq %rax, (%rbx)
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x14e4
testq %rax, %rax
je 0x1b4f
addq $0x10, %rsp
popq %rbx
retq
movq 0x8(%rsp), %rdx
leaq 0x24b9(%rip), %rdi      # 0x4014
movq %rbx, %rsi
xorl %eax, %eax
callq 0x10c0
movl $0x1, %edi
callq 0x1160
// File: /workspace/github_c_makefile_star2_O3/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 0x55a0(%rip), %rdi      # 0x7120
movq %r14, %rsi
callq 0x2e33
testq %rax, %rax
je 0x1b98
movq (%rax), %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %r14, %rdi
callq 0x3230
testq %rax, %rax
je 0x1bb7
movq %rax, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1515
leaq 0x245e(%rip), %rax      # 0x401c
movq %rax, (%rbx)
xorl %eax, %eax
jmp 0x1b90
// File: /workspace/github_c_makefile_star2_O3/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 0x1b6f
testq %rax, %rax
je 0x1be2
addq $0x10, %rsp
popq %rbx
retq
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0x11a0
// File: /workspace/github_c_makefile_star2_O3/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, %r15d
movq %rsi, %rbx
movq %rdi, %r14
movzbl 0x18(%rdi), %r12d
cmpb %r15b, %r12b
jbe 0x1c4c
movq 0x60(%r14), %r13
movzbl %r15b, %esi
addq %r13, %rsi
movq %rbx, %rdi
callq 0x1100
testl %eax, %eax
jne 0x1c55
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testq %r12, %r12
je 0x1c79
movq 0x60(%r14), %r13
movq 0x10(%r14), %rbp
xorl %r15d, %r15d
movzwl (%rbp,%r15,4), %esi
addq %r13, %rsi
movq %rbx, %rdi
callq 0x1100
testl %eax, %eax
je 0x1c3a
incq %r15
cmpq %r15, %r12
jne 0x1c5c
movq %r14, %rdi
movq %rbx, %rsi
callq 0x11ca
// File: /workspace/github_c_makefile_star2_O3/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
movzbl 0xa(%r8,%rdx,4), %eax
movq 0x2410(%rdi), %rcx
movq 0x8(%rcx), %r9
movzbl 0xa(%r9), %r10d
subq %rax, %r10
movzbl 0xb(%r9), %eax
shlq $0x2, %r10
addq 0x2000(%rdi), %r10
leaq (%r10,%rax,4), %r9
movq %r9, 0x2000(%rdi)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq 0x2008(%rdi), %r9
ja 0x1e35
leaq 0x20(%rcx), %r10
movq %r10, 0x2410(%rdi)
cmpq 0x2418(%rdi), %r10
ja 0x1e35
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_O3/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 0x4eef(%rip), %rax      # 0x7928
movl %edi, (%rax)
movslq %edi, %rcx
addq %rax, %rcx
movq %rcx, 0x4ee0(%rip)      # 0x7928
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x2a32
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_O3/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 0x2a32
movq %rbx, 0x8(%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %rax
movl %esi, 0x4(%rsp)
movq %rdi, %r14
callq 0x2ad7
movl %eax, %ebp
movq %r14, %rdi
callq 0x2b31
movq %rax, %r15
xorl %r12d, %r12d
leaq 0x4126(%rip), %rbx      # 0x6cd0
movq (%r12,%rbx), %r13
movslq 0x8(%r13), %rdx
cmpl %ebp, %edx
jg 0x2bc6
movq (%r13), %rsi
movq %r15, %rdi
callq 0x1140
testl %eax, %eax
je 0x2bd7
addq $0x8, %r12
cmpq $0x10, %r12
jne 0x2baa
leaq 0x4109(%rip), %r13      # 0x6ce0
movq %r14, %rdi
callq 0x2b31
movq %rax, %r15
movq %r14, %rdi
callq 0x2ad7
movslq 0x8(%r13), %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 0x4(%rsp), %esi
movq %r12, %rdi
callq *0x10(%r13)
movq %rax, %rbx
movq %r12, %rdi
callq 0x1040
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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:
decb %sil
cmpb $0x2, %sil
ja 0x2d1c
pushq %rbx
movzbl %sil, %eax
leaq 0x1547(%rip), %rcx      # 0x4234
movslq (%rcx,%rax,4), %rsi
addq %rcx, %rsi
callq 0x1150
testq %rax, %rax
je 0x2d1f
movq %rax, %rbx
movl $0x18, %edi
callq 0x2a32
movq %rbx, 0x10(%rax)
leaq 0x4012(%rip), %rcx      # 0x6d28
movq %rcx, 0x8(%rax)
jmp 0x2d21
xorl %eax, %eax
retq
xorl %eax, %eax
popq %rbx
retq
nop
// File: /workspace/github_c_makefile_star2_O3/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 0x3ffa(%rip), %r12      # 0x6d40
leaq 0x5d(%rip), %rax        # 0x2daa
cmpl %r14d, 0x8(%r12)
jne 0x2d6a
movq (%r12), %rdi
movq %rbx, %rsi
movq %r15, %rdx
movq %rax, %r13
callq 0x1140
testl %eax, %eax
je 0x2d89
movq 0x38(%r12), %rax
addq $0x20, %r12
testq %rax, %rax
jne 0x2d4d
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 0x2d78
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_O3/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 0x2e56
leaq 0x1(%rbx), %rdx
xorl %ecx, %ecx
addb %al, %cl
movb (%rdx), %al
incq %rdx
testb %al, %al
jne 0x2e46
movzbl %cl, %eax
jmp 0x2e58
xorl %eax, %eax
movq (%rdi,%rax,8), %r14
testq %r14, %r14
je 0x2e76
movq (%r14), %rdi
movq %rbx, %rsi
callq 0x1100
testl %eax, %eax
je 0x2e79
movq 0x10(%r14), %r14
jmp 0x2e5c
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_O3/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 0x2eb7
leaq 0x1(%rbx), %rdx
xorl %ecx, %ecx
addb %al, %cl
movb (%rdx), %al
incq %rdx
testb %al, %al
jne 0x2ea6
movzbl %cl, %r15d
jmp 0x2eba
xorl %r15d, %r15d
movq (%r14,%r15,8), %r12
testq %r12, %r12
je 0x2eda
movq (%r12), %rdi
movq %rbx, %rsi
callq 0x1100
testl %eax, %eax
je 0x2ef1
movq 0x10(%r12), %r12
jmp 0x2ebe
leaq (%r14,%r15,8), %rsi
movq %r14, %rdi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2eff
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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
movq 0x41d4(%rip), %rax      # 0x70e8
testq %rax, %rax
je 0x2f40
movq (%rax), %rcx
movq %rcx, 0x41c5(%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 0x41a1(%rip), %rdi      # 0x70e8
callq 0x3058
movq 0x4195(%rip), %rax      # 0x70e8
jmp 0x2f19
// File: /workspace/github_c_makefile_star2_O3/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 0x2f80
leaq 0x1(%rbx), %rdx
xorl %ecx, %ecx
addb %al, %cl
movb (%rdx), %al
incq %rdx
testb %al, %al
jne 0x2f6f
movzbl %cl, %r12d
jmp 0x2f83
xorl %r12d, %r12d
movq (%r14,%r12,8), %r15
testq %r15, %r15
je 0x2fa1
movq (%r15), %rdi
movq %rbx, %rsi
callq 0x1100
testl %eax, %eax
je 0x2fbb
movq 0x10(%r15), %r15
jmp 0x2f87
leaq (%r14,%r12,8), %rsi
movq %r14, %rdi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2eff
addq $0x8, %r15
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/almk277[P]ROSE/lib/symtbl.c
// Function: symtbl_clear
void symtbl_clear(SymbolTable *tbl)
{
	int i;
	FOREACH(i, tbl) {
		SymbolSlistHead *head = &tbl->heads[i];
		while(!SLIST_EMPTY(head)) {
			//TODO delete symbol?
			mm_free(SymbolEntry, SLIST_FIRST(head));
			SLIST_REMOVE_HEAD(head, le);
		}
	}
	tbl->size = 0;
}

// Assembly:
xorl %eax, %eax
movq (%rdi,%rax,8), %rcx
testq %rcx, %rcx
je 0x2ffb
movq 0x4108(%rip), %rdx      # 0x70e8
movq %rdx, (%rcx)
movq (%rdi,%rax,8), %rdx
movq %rdx, 0x40fa(%rip)      # 0x70e8
movq 0x10(%rdx), %rcx
movq %rcx, (%rdi,%rax,8)
testq %rcx, %rcx
jne 0x2fe0
incq %rax
cmpq $0x100, %rax            # imm = 0x100
jne 0x2fd0
movl $0x0, 0x800(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O3/almk277[P]ROSE/lib/symtbl.c
// Function: symtbl_foreach
void symtbl_foreach(const SymbolTable *tbl,
		void (*fn)(Symbol *sym, const SymbolValue *val))
{
	int i;
	FOREACH(i, tbl) {
		const SymbolSlistHead *head = &tbl->heads[i];
		const SymbolEntry *ent;
		SLIST_FOREACH(ent, head, le)
			fn(ent->symbol, &ent->value);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
xorl %r15d, %r15d
movq (%r14,%r15,8), %r12
testq %r12, %r12
je 0x303d
movq (%r12), %rdi
leaq 0x8(%r12), %rsi
callq *%rbx
movq 0x10(%r12), %r12
jmp 0x3026
incq %r15
cmpq $0x100, %r15            # imm = 0x100
jne 0x3022
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/almk277[P]ROSE/lib/mm.c
// Function: mm_pool_alloc
void mm_pool_alloc(struct mm_pool_struct *pool)
{
	const unsigned size = pool->el_size;
	unsigned poolsize = pool->size;
	char *mem = malloc(size * poolsize);
#ifdef TEST
	++alloc_count;
#endif
	if(unlikely(mem == NULL)) {
		poolsize = MM_MIN_SIZE;
		mem = malloc(size * MM_MIN_SIZE);
		if(unlikely(mem == NULL)) {
			if(mm_on_error)
				mem = mm_on_error(pool);
			else {
				fputs(__FILE__ ": ERROR: Out of memory", stderr);
				exit(1);
			}
		}
	}

	pool->head = mem;
	for(--poolsize; poolsize != 0; --poolsize, mem += size)
		*(void **)mem = mem + size;
	*(void **)mem = NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movl 0x8(%rdi), %ebp
movl 0xc(%rdi), %ebx
movl %ebx, %edi
imull %ebp, %edi
callq 0x1130
testq %rax, %rax
je 0x30a1
movq %rax, (%r14)
decl %ebp
je 0x308f
movq %rax, %rcx
leaq (%rcx,%rbx), %rax
movq %rax, (%rcx)
movq %rax, %rcx
decl %ebp
jne 0x3081
movq $0x0, (%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rsp, %r15
movl %ebx, %edi
movq %r14, %rsi
movq %r15, %rdx
callq 0x132f
movq (%r15), %rax
movl $0x3, %ebp
jmp 0x307e
nop
// File: /workspace/github_c_makefile_star2_O3/almk277[P]ROSE/lib/loader.c
// Function: add
static int add(const char *path, int length)
{
	StdPath *sp;
	if(length == 0 || length > 255)
		return 0;
	sp = mm_alloc(StdPath);
	sp->length = length;
	memcpy(sp->buffer, path, length);
	if(path[length - 1] != '/')
		sp->buffer[sp->length++] = '/';
	SIMPLEQ_INSERT_TAIL(&stdpath_list, sp, pe);
	return 1;
}

// Assembly:
testl %esi, %esi
sete %cl
cmpl $0x100, %esi            # imm = 0x100
setge %dl
xorl %eax, %eax
orb %cl, %dl
jne 0x316d
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movq 0x400f(%rip), %r12      # 0x7108
testq %r12, %r12
je 0x316e
movq (%r12), %rax
movq %rax, 0x3fff(%rip)      # 0x7108
movb %bl, (%r12)
leaq 0x1(%r12), %rdi
movslq %ebx, %r15
movq %r14, %rsi
movq %r15, %rdx
callq 0x1120
cmpb $0x2f, -0x1(%r14,%r15)
je 0x3138
leal 0x1(%rbx), %eax
movb %al, (%r12)
movzbl %bl, %eax
movb $0x2f, 0x1(%r12,%rax)
leaq 0x108(%r12), %rax
movq $0x0, 0x108(%r12)
movq 0x3fad(%rip), %rcx      # 0x7100
movq %r12, (%rcx)
movq %rax, 0x3fa3(%rip)      # 0x7100
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x3f93(%rip), %rdi      # 0x7108
callq 0x3058
movq 0x3f87(%rip), %r12      # 0x7108
jmp 0x30fe
// File: /workspace/github_c_makefile_star2_O3/almk277[P]ROSE/lib/loader.c
// Function: loader_add_dirs_from_env
void loader_add_dirs_from_env()
{
	const char *rosepath = getenv("ROSEPATH");
	if(rosepath) {
		const char *start, *end;
		for(start = rosepath, end = strchr(rosepath, ':'); end;
				start = end + 1, end = strchr(start, ':')) {
			add(start, end - start);
		}
		add(start, strlen(start));
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0x10e1(%rip), %rdi      # 0x4272
callq 0x1030
testq %rax, %rax
je 0x31f4
movq %rax, %rbx
movq %rax, %rdi
movl $0x3a, %esi
callq 0x10b0
testq %rax, %rax
je 0x31db
movq %rax, %r14
movl %r14d, %esi
subl %ebx, %esi
movq %rbx, %rdi
callq 0x30cd
movq %r14, %rbx
incq %rbx
movq %rbx, %rdi
movl $0x3a, %esi
callq 0x10b0
movq %rax, %r14
testq %rax, %rax
jne 0x31b3
movq %rbx, %rdi
callq 0x10a0
movq %rbx, %rdi
movl %eax, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x30cd
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/almk277[P]ROSE/lib/loader.c
// Function: loader_add_dir_from_file
int loader_add_dir_from_file(const char *fname)
{
	const char *slash = strrchr(fname, '/');
	return slash ?
		add(fname, slash - fname + 1) : /* cut out last path component */
		add("./", 2);                   /* use current directory */
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x2f, %esi
callq 0x10d0
testq %rax, %rax
je 0x321e
subl %ebx, %eax
incl %eax
movq %rbx, %rdi
movl %eax, %esi
popq %rbx
jmp 0x30cd
leaq 0x1056(%rip), %rdi      # 0x427b
movl $0x2, %esi
popq %rbx
jmp 0x30cd
// File: /workspace/github_c_makefile_star2_O3/almk277[P]ROSE/lib/loader.c
// Function: loader_find_module
FILE *loader_find_module(Symbol *name)
{
	StdPath *ent;
	const int flen = strlen(name);
	SIMPLEQ_FOREACH(ent, &stdpath_list, pe) {
		FILE *f;
		static const char suffix[] = ".rmd";
		char *const buf = ent->buffer;
		const int dlen = ent->length;
		const int len = dlen + flen;
		if(len + sizeof suffix > 255)
			continue;
		strcpy(buf + dlen, name);
		memcpy(buf + len, suffix, sizeof suffix);
		f = fopen(buf, "rb");
		if(f)
			return f;
	}
	return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x10a0
movq 0x3eae(%rip), %r13      # 0x70f8
testq %r13, %r13
je 0x32b3
movq %rax, %r14
leaq 0xdb8(%rip), %r15       # 0x4011
movzbl (%r13), %eax
leal (%r14,%rax), %ecx
movslq %ecx, %rbp
leaq -0xfb(%rbp), %rcx
cmpq $-0x100, %rcx
jb 0x32a7
leaq 0x1(%r13), %r12
leaq (%rax,%r13), %rdi
incq %rdi
movq %rbx, %rsi
callq 0x1070
movl $0x646d722e, 0x1(%r13,%rbp) # imm = 0x646D722E
movb $0x0, 0x5(%r13,%rbp)
movq %r12, %rdi
movq %r15, %rsi
callq 0x1150
testq %rax, %rax
jne 0x32b5
movq 0x108(%r13), %r13
testq %r13, %r13
jne 0x3259
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/almk277[P]ROSE/lib/loader.c
// Function: loader_print_pathes
void loader_print_pathes()
{
	StdPath *ent;
	SIMPLEQ_FOREACH(ent, &stdpath_list, pe) {
		fwrite(ent->buffer, ent->length, 1, stdout);
		putchar('\n');
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x3e29(%rip), %rbx      # 0x70f8
testq %rbx, %rbx
je 0x3305
movq 0x3ced(%rip), %r14      # 0x6fc8
leaq 0x1(%rbx), %rdi
movzbl (%rbx), %esi
movq (%r14), %rcx
movl $0x1, %edx
callq 0x1170
movl $0xa, %edi
callq 0x1050
movq 0x108(%rbx), %rbx
testq %rbx, %rbx
jne 0x32db
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/cqueues.c
// Function: luaopen__cqueues_condition
int luaopen__cqueues_condition(lua_State *L) {
	lua_pushnil(L); /* initial upvalue */
	cqs_newmetatable(L, CQS_CONDITION, cond_methods, cond_metatable, 1);
	lua_pushvalue(L, -1); /* push self as replacement upvalue */
	cqs_setmetaupvalue(L, -2, 1); /* insert self as 1st upvalue  */

	/* capture metatable here, too. */
	luaL_newlibtable(L, cond_globals);
	lua_pushvalue(L, -2);
	luaL_setfuncs(L, cond_globals, 1);

	return 1;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0xf980
leaq 0x24125(%rip), %rsi     # 0x35050
leaq 0x3305e(%rip), %rdx     # 0x43f90
leaq 0x330b7(%rip), %rcx     # 0x43ff0
movq %rbx, %rdi
movl $0x1, %r8d
callq 0x11005
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xf9c0
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0xf280
movl %eax, %ebp
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xf9c0
movq %rbx, %rdi
movl %ebp, %esi
movl $0x1, %edx
callq 0x11927
leaq 0x241a1(%rip), %rdx     # 0x35127
movq %rbx, %rdi
movl %ebp, %esi
callq 0xf1e0
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0xf9c0
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movl $0x1, %edx
callq 0x11927
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x10640
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x10640
movq %rbx, %rdi
xorl %esi, %esi
movl $0x3, %edx
callq 0x101e0
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0xf9c0
leaq 0x33034(%rip), %rsi     # 0x44020
movq %rbx, %rdi
movl $0x1, %edx
callq 0x10240
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq