LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: boczeratul[P]StarCraftGA/ga.cpp
// Function: mutationClock()
void mutationClock () {
    
    int nNextGeneration = nCurrent;
//    
//    if (pm <= 1e-6) return; // can't deal with too small pm
//
//    int pointer = (int) (log(1-uniform()) / log(1-pm) + 1);
//
//    while (pointer < nNextGeneration * ell) 
//    {
//        int q = pointer / ell;
//        int r = pointer % ell;
//
//        // for oneMax
//        //int val = offspring[q][r];
//        //offspring[q][r] = 1-val ;      
//        
//        // for SC
//        mutateChromosome(offspring[q], r);
//        
//        
//        
//
//        // Compute next mutation clock
//        pointer += (int) (log(1-uniform()) / log(1-pm) + 1);
//    }
    
    for ( int i = 0; i < nNextGeneration; ++i )
    {
        if (uniform () < pm)
            mutateChromosome(offspring[i], uniformInt(1, offspring[i][0]));
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl 0xc00a(%rip), %eax      # 0xe0f8
movl %eax, -0x4(%rbp)
movl $0x0, -0x8(%rbp)
movl -0x8(%rbp), %eax
cmpl -0x4(%rbp), %eax
jge 0x215c
callq 0x2e30
movaps %xmm0, %xmm1
movsd 0xbff0(%rip), %xmm0     # 0xe100
ucomisd %xmm1, %xmm0
jbe 0x214f
movq 0xc00b(%rip), %rax      # 0xe128
movslq -0x8(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x10(%rbp)
movq 0xbff8(%rip), %rax      # 0xe128
movslq -0x8(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl (%rax), %esi
movl $0x1, %edi
callq 0x2e80
movq -0x10(%rbp), %rdi
movl %eax, %esi
callq 0x2170
jmp 0x2151
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x20f8
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: boczeratul[P]StarCraftGA/ga.cpp
// Function: doIt(int, int, int, bool)
int doIt (int optimalFit, int maxGeneration, int maxNFe, bool output) {
    
    //printf("start\n");
    //fflush(NULL);
    generation = 0;
    bestFitness = INT_MAX;
    recordedBestFitness = INT_MAX;
    recordMaker = 0;
    avgFitness = INT_MAX;
    optimalFitness = optimalFit;
    maxGen = maxGeneration;
    maxFe = maxNFe;

    start = clock();
    while ( !shouldTerminate () )
    {
        oneRun (output);
    }
    end = clock();
    
    demoBuildOrder(population[bestIndex]);
    printf("\n## It took us %.3f seconds to find the BuildOrder! ##\n", double(end - start)/CLOCKS_PER_SEC);
    return generation;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb %cl, %al
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
andb $0x1, %al
movb %al, -0xd(%rbp)
movl $0x0, 0xbd72(%rip)      # 0xe114
movl $0x7fffffff, 0xbd00(%rip) # imm = 0x7FFFFFFF
movl $0x7fffffff, 0xbcfa(%rip) # imm = 0x7FFFFFFF
movl $0x0, 0xbd84(%rip)      # 0xe144
movsd 0x8c60(%rip), %xmm0     # 0xb028
movsd %xmm0, 0xbce8(%rip)     # 0xe0b8
movl -0x4(%rbp), %eax
movl %eax, 0xbd67(%rip)      # 0xe140
movl -0x8(%rbp), %eax
movl %eax, 0xbcbe(%rip)      # 0xe0a0
movl -0xc(%rbp), %eax
movl %eax, 0xbcb9(%rip)      # 0xe0a4
callq 0x1070
movq %rax, 0xc051(%rip)      # 0xe448
callq 0x2470
xorb $-0x1, %al
testb $0x1, %al
jne 0x2404
jmp 0x2413
movb -0xd(%rbp), %al
andb $0x1, %al
movzbl %al, %edi
callq 0x24e0
jmp 0x23f7
callq 0x1070
movq %rax, 0xc031(%rip)      # 0xe450
movq 0xbcfa(%rip), %rax      # 0xe120
movslq 0xbceb(%rip), %rcx      # 0xe118
movq (%rax,%rcx,8), %rdi
callq 0x8f10
movq 0xc013(%rip), %rax      # 0xe450
subq 0xc004(%rip), %rax      # 0xe448
cvtsi2sd %rax, %xmm0
movsd 0x8bdf(%rip), %xmm1     # 0xb030
divsd %xmm1, %xmm0
leaq 0x8bdc(%rip), %rdi      # 0xb038
movb $0x1, %al
callq 0x1040
movl 0xbcab(%rip), %eax      # 0xe114
addq $0x10, %rsp
popq %rbp
retq
nop
// File: boczeratul[P]StarCraftGA/ga.cpp
// Function: modifyChromosome()
void modifyChromosome() {
    for ( int i = 0; i < nCurrent; ++i )
    {
        //printf("chromosome %d = ", i);
        //printChromosome(offspring[i]);
        modifyChromosomeByRequest(offspring[i]);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
cmpl 0xbb10(%rip), %eax      # 0xe0f8
jge 0x2609
movq 0xbb37(%rip), %rax      # 0xe128
movslq -0x4(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x2910
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x25df
addq $0x10, %rsp
popq %rbp
retq
nop
// File: boczeratul[P]StarCraftGA/ga.cpp
// Function: printFitness(int, int)
void printFitness(int populationOrOffspring , int ith) {
    if ( populationOrOffspring == 0)
        printf("  (score=%d)", fitness[ith]);    
    else
        printf("  (score=%d)", offspringFitness[ith]);   
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
cmpl $0x0, -0x4(%rbp)
jne 0x26e2
movq 0xba65(%rip), %rax      # 0xe130
movslq -0x8(%rbp), %rcx
movl (%rax,%rcx,4), %esi
leaq 0x89d3(%rip), %rdi      # 0xb0ac
movb $0x0, %al
callq 0x1040
jmp 0x26fe
movq 0xba4f(%rip), %rax      # 0xe138
movslq -0x8(%rbp), %rcx
movl (%rax,%rcx,4), %esi
leaq 0x89b5(%rip), %rdi      # 0xb0ac
movb $0x0, %al
callq 0x1040
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: boczeratul[P]StarCraftGA/ga.cpp
// Function: printPopulationAndFitness(int**)
void printPopulationAndFitness(int** group) {
    if ( group == population )
    {
        for ( int i = 0; i < nCurrent; ++i )
        {
            printChromosome(group[i]);
            printFitness(0, i);
            printf("\n");
        }
    }
    else
    {
        for ( int i = 0; i < nCurrent; ++i )
        {
            printChromosome(group[i]);
            printFitness(1, i);
            printf("\n");
        }
    }
    
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq 0xb9a9(%rip), %rax      # 0xe120
jne 0x27c1
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
cmpl 0xb96f(%rip), %eax      # 0xe0f8
jge 0x27bf
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x2640
movl -0xc(%rbp), %esi
xorl %edi, %edi
callq 0x26b0
leaq 0x88e3(%rip), %rdi      # 0xb090
movb $0x0, %al
callq 0x1040
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x2780
jmp 0x280c
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl 0xb927(%rip), %eax      # 0xe0f8
jge 0x280a
movq -0x8(%rbp), %rax
movslq -0x10(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x2640
movl -0x10(%rbp), %esi
movl $0x1, %edi
callq 0x26b0
leaq 0x8898(%rip), %rdi      # 0xb090
movb $0x0, %al
callq 0x1040
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x27c8
jmp 0x280c
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: boczeratul[P]StarCraftGA/ga.cpp
// Function: processRequest(int*)
void processRequest(int request[60]) {
    totalRequest = 0;
    memcpy(requests, request, sizeof(int)*60);

    dontMindAction[0] = 0;
    requestAction[0] = 0;

    for ( int i = 0; i < 60; ++i )
    {
        if ( request[i] > 0 )
        {
            totalRequest = totalRequest + request[i];
            requestAction[requestAction[0]+1] = i;
            ++requestAction[0];
        }
        else if ( request[i] == -1 )
        {
            dontMindAction[dontMindAction[0]+1] = i;
            ++dontMindAction[0];
        }
    }
    
//    printf("requests :\n");
//    for ( int i = 0; i < 60; ++i )
//    {
//        printf("(%d,  %d)   ", i, requests[i]);
//    }
//    printf("\n\n\n\nrequestAction :\n");
//    for ( int i = 1; i < requestAction[0]+1; ++i   )
//    {
//        printf("%d  ", requestAction[i]);
//    }
//    printf("\n\n\n\ndontMindAction :\n");
//    for ( int i = 1; i < dontMindAction[0]+1; ++i   )
//    {
//        printf("%d  ", dontMindAction[i]);
//    }
    
    
    

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, 0xb912(%rip)      # 0xe148
movq -0x8(%rbp), %rsi
leaq 0xbb0f(%rip), %rdi      # 0xe350
movl $0xf0, %edx
callq 0x1080
movl $0x0, 0xb8fb(%rip)      # 0xe150
movl $0x0, 0xb9f1(%rip)      # 0xe250
movl $0x0, -0xc(%rbp)
cmpl $0x3c, -0xc(%rbp)
jge 0x2907
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
jle 0x28bf
movl 0xb8c4(%rip), %eax      # 0xe148
movq -0x8(%rbp), %rcx
movslq -0xc(%rbp), %rdx
addl (%rcx,%rdx,4), %eax
movl %eax, 0xb8b3(%rip)      # 0xe148
movl -0xc(%rbp), %edx
movl 0xb9b2(%rip), %eax      # 0xe250
addl $0x1, %eax
movslq %eax, %rcx
leaq 0xb9a5(%rip), %rax      # 0xe250
movl %edx, (%rax,%rcx,4)
movl 0xb99c(%rip), %eax      # 0xe250
addl $0x1, %eax
movl %eax, 0xb993(%rip)      # 0xe250
jmp 0x28f7
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
cmpl $-0x1, (%rax,%rcx,4)
jne 0x28f5
movl -0xc(%rbp), %edx
movl 0xb87a(%rip), %eax      # 0xe150
addl $0x1, %eax
movslq %eax, %rcx
leaq 0xb86d(%rip), %rax      # 0xe150
movl %edx, (%rax,%rcx,4)
movl 0xb864(%rip), %eax      # 0xe150
addl $0x1, %eax
movl %eax, 0xb85b(%rip)      # 0xe150
jmp 0x28f7
jmp 0x28f9
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x2866
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: boczeratul[P]StarCraftGA/myrand.cpp
// Function: initRand()
void initRand () {

    unsigned long init_key[N];

    srand ((unsigned long) time (NULL));

    for (int i = 0; i < N; i++)
        init_key[i] = (unsigned long) time (NULL) * rand ();

    init_by_array (init_key, N);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1390, %rsp           # imm = 0x1390
xorl %eax, %eax
movl %eax, %edi
callq 0x1090
movl %eax, %edi
callq 0x10a0
movl $0x0, -0x1384(%rbp)
cmpl $0x270, -0x1384(%rbp)   # imm = 0x270
jge 0x2de3
xorl %eax, %eax
movl %eax, %edi
callq 0x1090
movq %rax, -0x1390(%rbp)
callq 0x1050
movq -0x1390(%rbp), %rcx
cltq
imulq %rax, %rcx
movslq -0x1384(%rbp), %rax
movq %rcx, -0x1380(%rbp,%rax,8)
movl -0x1384(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1384(%rbp)
jmp 0x2d95
leaq -0x1380(%rbp), %rdi
movl $0x270, %esi            # imm = 0x270
callq 0x3130
addq $0x1390, %rsp           # imm = 0x1390
popq %rbp
retq
nopl (%rax)
// File: boczeratul[P]StarCraftGA/myrand.cpp
// Function: uniformArray(int*, int, int, int)
void uniformArray (int *array, int num, int a, int b)
{

    int *base = new int[b - a + 1];
    int i;
    int r;

    for (i = 0; i < b - a + 1; i++)
        base[i] = a + i;

    for (i = 0; i < num; i++) {
        r = uniformInt (0, b - a - i);
        array[i] = base[r];
        base[r] = base[b - a - i];
    }

    delete[]base;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movl -0x14(%rbp), %eax
subl -0x10(%rbp), %eax
addl $0x1, %eax
cltq
movl $0x4, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x1030
movq %rax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movl -0x14(%rbp), %ecx
subl -0x10(%rbp), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jge 0x2f38
movl -0x10(%rbp), %edx
addl -0x24(%rbp), %edx
movq -0x20(%rbp), %rax
movslq -0x24(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x2f0c
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x2f99
movl -0x14(%rbp), %esi
subl -0x10(%rbp), %esi
subl -0x24(%rbp), %esi
xorl %edi, %edi
callq 0x2e80
movl %eax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movslq -0x28(%rbp), %rcx
movl (%rax,%rcx,4), %edx
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movq -0x20(%rbp), %rax
movl -0x14(%rbp), %ecx
subl -0x10(%rbp), %ecx
subl -0x24(%rbp), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %edx
movq -0x20(%rbp), %rax
movslq -0x28(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x2f3f
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
je 0x2fb0
movq -0x30(%rbp), %rdi
callq 0x10e0
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: boczeratul[P]StarCraftGA/main.cpp
// Function: main
int main(int argc, char** argv) {
    setSCStateStrings();
    setSCActionVariables();
    setSCDependencies();
        
    int* r = (int*)calloc(60, sizeof(int));

    readRequest(r);
    processRequest(r);

    //initGA (int n_ell, int n_nInitial, int n_selectionPressure, double n_pc, double n_pm, int n_maxGen, int n_maxFe, int optimalFit)
    initGA (5, 1000, 2, 0.5, 0.5, -1, -1, 0);

    //printPopulation(population);
    
    //doIt (int optimalFit, int maxGeneration, int maxNFe, bool output)
    doIt (0, verificationTime, -1, true);
    
    free(r);

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
callq 0x37b0
callq 0x3bb0
callq 0x9ba0
movl $0x3c, %edi
movl $0x4, %esi
callq 0x1060
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x8ff0
movq -0x18(%rbp), %rdi
callq 0x2820
movl $0x5, %edi
movl $0x3e8, %esi            # imm = 0x3E8
movl $0x2, %edx
movsd 0x7fe7(%rip), %xmm1     # 0xb008
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
xorl %r9d, %r9d
movaps %xmm1, %xmm0
movl %r8d, %ecx
callq 0x1290
leaq 0x14ff4(%rip), %rax     # 0x18030
movl (%rax), %esi
xorl %edi, %edi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl $0x1, %ecx
callq 0x2380
movq -0x18(%rbp), %rdi
callq 0x10d0
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
// File: boczeratul[P]StarCraftGA/mt19937ar.cpp
// Function: init_genrand(unsigned long)
void
init_genrand (unsigned long s)
{
    mt[0] = s & 0xffffffffUL;
    for (mti = 1; mti < N; mti++) {
        mt[mti] = (1812433253UL * (mt[mti - 1] ^ (mt[mti - 1] >> 30)) + mti);
        /* See Knuth TAOCP Vol2. 3rd Ed. P.106 for multiplier. */
        /* In the previous versions, MSBs of the seed affect   */
        /* only MSBs of the array mt[].                        */
        /* 2002/01/09 modified by Makoto Matsumoto             */
        mt[mti] &= 0xffffffffUL;
        /* for >32 bit machines */
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movabsq $0xffffffff, %rax       # imm = 0xFFFFFFFF
andq -0x8(%rbp), %rax
movq %rax, 0xb3e3(%rip)      # 0xe460
movl $0x1, 0xb039(%rip)      # 0xe0c0
cmpl $0x270, 0xb02f(%rip)    # imm = 0x270
jge 0x312a
movl 0xb023(%rip), %eax      # 0xe0c0
subl $0x1, %eax
movslq %eax, %rcx
leaq 0xb3b6(%rip), %rax      # 0xe460
movq (%rax,%rcx,8), %rax
movl 0xb00c(%rip), %ecx      # 0xe0c0
subl $0x1, %ecx
movslq %ecx, %rdx
leaq 0xb39f(%rip), %rcx      # 0xe460
movq (%rcx,%rdx,8), %rcx
shrq $0x1e, %rcx
xorq %rcx, %rax
imulq $0x6c078965, %rax, %rdx # imm = 0x6C078965
movslq 0xafe6(%rip), %rax      # 0xe0c0
addq %rax, %rdx
movslq 0xafdc(%rip), %rcx      # 0xe0c0
leaq 0xb375(%rip), %rax      # 0xe460
movq %rdx, (%rax,%rcx,8)
movslq 0xafca(%rip), %rcx      # 0xe0c0
leaq 0xb363(%rip), %rax      # 0xe460
movabsq $0xffffffff, %rdx       # imm = 0xFFFFFFFF
andq (%rax,%rcx,8), %rdx
leaq 0xb34e(%rip), %rax      # 0xe460
movq %rdx, (%rax,%rcx,8)
movl 0xafa4(%rip), %eax      # 0xe0c0
addl $0x1, %eax
movl %eax, 0xaf9b(%rip)      # 0xe0c0
jmp 0x3087
popq %rbp
retq
nopl (%rax)
// File: boczeratul[P]StarCraftGA/SCTools.cpp
// Function: initializeGame
void initializeGame()
{
    if (SCVerbose)
    {
        printf("#### Welcome to Text-Based StarCraft 2 ####\n");
        printf("####   You have been spawned as Zerg   ####\n");
    }
    
    SCGameTime = 0;
    SCWaitTime = 0;
    numOfActions = 0;
    
    for (int i = 0; i < 73; i++)
        SCState[i] = 0;

    SCState[0] = 50; // initial minerals
    SCState[2] = 1; // initial hatchery
    SCState[15] = 3; // initial larvae
    SCState[16] = 6; // initial drones
    SCState[17] = 1; // initial overlord
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
cmpl $0x0, 0xc0d1(%rip)      # 0xf7e0
je 0x372d
leaq 0x79e8(%rip), %rdi      # 0xb100
movb $0x0, %al
callq 0x1040
leaq 0x7a07(%rip), %rdi      # 0xb12d
movb $0x0, %al
callq 0x1040
movl $0x0, 0xc0ad(%rip)      # 0xf7e4
movl $0x0, 0xc0a7(%rip)      # 0xf7e8
movl $0x0, 0x141c5(%rip)     # 0x17910
movl $0x0, -0x4(%rbp)
cmpl $0x49, -0x4(%rbp)
jge 0x3775
movslq -0x4(%rbp), %rcx
leaq 0xc08d(%rip), %rax      # 0xf7f0
movl $0x0, (%rax,%rcx,4)
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x3752
movl $0x32, 0xc071(%rip)     # 0xf7f0
movl $0x1, 0xc06f(%rip)      # 0xf7f8
movl $0x3, 0xc099(%rip)      # 0xf82c
movl $0x6, 0xc093(%rip)      # 0xf830
movl $0x1, 0xc08d(%rip)      # 0xf834
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: boczeratul[P]StarCraftGA/SCTools.cpp
// Function: getResources
void getResources()
{
    static int larva = 0;
    if ( (SCGameTime - larva) % 15 == 0 && SCState[2] * 3 > SCState[15])
        SCState[15] += SCState[2];
    
    int mineralGained = (SCState[16] - SCState[32]) * 7 / 10;
    if (SCGameTime % 10 < (SCState[16] - SCState[32]) * 7 % 10)
        mineralGained += 1;

    int gasGained = SCState[32] * 7 / 10;
    if (SCGameTime % 10 < SCState[32] * 7 % 10)
        gasGained += 1;

    SCState[0] += mineralGained;
    SCState[1] += gasGained;

    if (SCState[2] * 3 == SCState[15])
        larva = SCGameTime;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl 0x79fa(%rip), %eax      # 0xf7e4
subl 0x10244(%rip), %eax     # 0x18034
movl $0xf, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x7e1e
imull $0x3, 0x79f4(%rip), %eax # 0xf7f8
cmpl 0x7a22(%rip), %eax      # 0xf82c
jle 0x7e1e
movl 0x79e6(%rip), %eax      # 0xf7f8
addl 0x7a14(%rip), %eax      # 0xf82c
movl %eax, 0x7a0e(%rip)      # 0xf82c
movl 0x7a0c(%rip), %eax      # 0xf830
subl 0x7a46(%rip), %eax      # 0xf870
imull $0x7, %eax, %eax
movl $0xa, %ecx
cltd
idivl %ecx
movl %eax, -0x4(%rbp)
movl 0x79a6(%rip), %eax      # 0xf7e4
movl $0xa, %ecx
cltd
idivl %ecx
movl %edx, -0xc(%rbp)
movl 0x79e1(%rip), %eax      # 0xf830
subl 0x7a1b(%rip), %eax      # 0xf870
imull $0x7, %eax, %eax
movl $0xa, %ecx
cltd
idivl %ecx
movl %edx, %eax
movl -0xc(%rbp), %edx
cmpl %eax, %edx
jge 0x7e72
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
imull $0x7, 0x79f7(%rip), %eax # 0xf870
movl $0xa, %ecx
cltd
idivl %ecx
movl %eax, -0x8(%rbp)
movl 0x795a(%rip), %eax      # 0xf7e4
movl $0xa, %ecx
cltd
idivl %ecx
movl %edx, -0x10(%rbp)
imull $0x7, 0x79d4(%rip), %eax # 0xf870
movl $0xa, %ecx
cltd
idivl %ecx
movl %edx, %eax
movl -0x10(%rbp), %edx
cmpl %eax, %edx
jge 0x7eb6
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
movl -0x4(%rbp), %eax
addl 0x7931(%rip), %eax      # 0xf7f0
movl %eax, 0x792b(%rip)      # 0xf7f0
movl -0x8(%rbp), %eax
addl 0x7926(%rip), %eax      # 0xf7f4
movl %eax, 0x7920(%rip)      # 0xf7f4
imull $0x3, 0x791d(%rip), %eax # 0xf7f8
cmpl 0x794b(%rip), %eax      # 0xf82c
jne 0x7eef
movl 0x78fb(%rip), %eax      # 0xf7e4
movl %eax, 0x10145(%rip)     # 0x18034
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: boczeratul[P]StarCraftGA/SCTools.cpp
// Function: supply
int supply()
{
    int tmp = 0;
    
    tmp += SCState[16];
    tmp += (SCState[18] + SCState[19]) / 2;
    tmp += SCState[20] * 2;
    tmp += SCState[21] * 2;
    tmp += SCState[22] * 2;
    tmp += SCState[23] * 2;
    tmp += SCState[26] * 2;
    tmp += SCState[27] * 2;
    tmp += SCState[28] * 4;
    tmp += SCState[29] * 6;
    tmp += SCState[72];
    
    return tmp;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl $0x0, -0x4(%rbp)
movl 0x791f(%rip), %eax      # 0xf830
addl -0x4(%rbp), %eax
movl %eax, -0x4(%rbp)
movl 0x791b(%rip), %eax      # 0xf838
addl 0x7919(%rip), %eax      # 0xf83c
movl $0x2, %ecx
cltd
idivl %ecx
addl -0x4(%rbp), %eax
movl %eax, -0x4(%rbp)
movl 0x7909(%rip), %eax      # 0xf840
shll %eax
addl -0x4(%rbp), %eax
movl %eax, -0x4(%rbp)
movl 0x78ff(%rip), %eax      # 0xf844
shll %eax
addl -0x4(%rbp), %eax
movl %eax, -0x4(%rbp)
movl 0x78f5(%rip), %eax      # 0xf848
shll %eax
addl -0x4(%rbp), %eax
movl %eax, -0x4(%rbp)
movl 0x78eb(%rip), %eax      # 0xf84c
shll %eax
addl -0x4(%rbp), %eax
movl %eax, -0x4(%rbp)
movl 0x78e9(%rip), %eax      # 0xf858
shll %eax
addl -0x4(%rbp), %eax
movl %eax, -0x4(%rbp)
movl 0x78df(%rip), %eax      # 0xf85c
shll %eax
addl -0x4(%rbp), %eax
movl %eax, -0x4(%rbp)
movl 0x78d5(%rip), %eax      # 0xf860
shll $0x2, %eax
addl -0x4(%rbp), %eax
movl %eax, -0x4(%rbp)
imull $0x6, 0x78c9(%rip), %eax # 0xf864
addl -0x4(%rbp), %eax
movl %eax, -0x4(%rbp)
movl 0x7969(%rip), %eax      # 0xf910
addl -0x4(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: boczeratul[P]StarCraftGA/SCTools.cpp
// Function: showInformation
void showInformation()
{
    printf("supply: %d/%d\n", supply(), maxsupply());
    int i;
    for (i = 0; i < 72; i++)
        if (SCState[i] > 0)
            printf("%s: %d\n", SCStateString[i], SCState[i]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
callq 0x7f00
movl %eax, -0x8(%rbp)
callq 0x7fc0
movl -0x8(%rbp), %esi
movl %eax, %edx
leaq 0x37db(%rip), %rdi      # 0xb7ec
movb $0x0, %al
callq 0x1040
movl $0x0, -0x4(%rbp)
cmpl $0x48, -0x4(%rbp)
jge 0x806e
movslq -0x4(%rbp), %rcx
leaq 0x77c0(%rip), %rax      # 0xf7f0
cmpl $0x0, (%rax,%rcx,4)
jle 0x8061
movslq -0x4(%rbp), %rcx
leaq 0x78df(%rip), %rax      # 0xf920
movq (%rax,%rcx,8), %rsi
movslq -0x4(%rbp), %rcx
leaq 0x77a0(%rip), %rax      # 0xf7f0
movl (%rax,%rcx,4), %edx
leaq 0x37a1(%rip), %rdi      # 0xb7fb
movb $0x0, %al
callq 0x1040
jmp 0x8063
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x801f
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: boczeratul[P]StarCraftGA/SCTools.cpp
// Function: testBuildOrder
int testBuildOrder(int buildOrder[250])
{
    
    SCVerbose = 0;
    initializeGame();
    
    SCBuildOrderPointer = 1;
    validBO = 1;
    
    int i;
    for (i = 0; i <= SCBuildOrder[0]; i++)
        SCBuildOrder[i] = buildOrder[i];

    int SCContinue = 1;
    while(SCContinue)
    {
        SCContinue = oneSecInSCNonStop();
    }
    
    if (!validBO)
    {
        //printf("Invalid build order!\n");
        return INT_MAX;
    }
    
    return SCGameTime;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl $0x0, 0x695a(%rip)      # 0xf7e0
callq 0x3700
movl $0x1, 0xf193(%rip)      # 0x18028
movl $0x1, 0xf18d(%rip)      # 0x1802c
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl 0xed91(%rip), %eax      # 0x17c40
jg 0x8ed5
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movl (%rax,%rcx,4), %edx
movslq -0x14(%rbp), %rcx
leaq 0xed79(%rip), %rax      # 0x17c40
movl %edx, (%rax,%rcx,4)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x8ea6
movl $0x1, -0x18(%rbp)
cmpl $0x0, -0x18(%rbp)
je 0x8eec
callq 0x8970
movl %eax, -0x18(%rbp)
jmp 0x8edc
cmpl $0x0, 0xf139(%rip)      # 0x1802c
jne 0x8efe
movl $0x7fffffff, -0x4(%rbp) # imm = 0x7FFFFFFF
jmp 0x8f07
movl 0x68e0(%rip), %eax      # 0xf7e4
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
// File: boczeratul[P]StarCraftGA/SCTools.cpp
// Function: demoBuildOrder
int demoBuildOrder(int buildOrder[250])
{
    printf("\n\n## Demonstration of BuildOrder ##\n");
    SCVerbose = 0;
    initializeGame();
    
    SCBuildOrderPointer = 1;
    validBO = 1;
    
    int i;
    for (i = 0; i <= SCBuildOrder[0]; i++)
        SCBuildOrder[i] = buildOrder[i];

    int SCContinue = 1;
    while(SCContinue)
    {
        SCContinue = oneSecInSCDemo();
    }
    
    if (!validBO)
    {
        //printf("Invalid build order!\n");
        return INT_MAX;
    }
    
    printf("\n## BuildOrder finishes at %02d:%02d ##\nNow you have:\n", SCGameTime/60, SCGameTime%60);
    showInformation();
    return SCGameTime;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
leaq 0x2983(%rip), %rdi      # 0xb8a6
movb $0x0, %al
callq 0x1040
movl $0x0, 0x68ac(%rip)      # 0xf7e0
callq 0x3700
movl $0x1, 0xf0e5(%rip)      # 0x18028
movl $0x1, 0xf0df(%rip)      # 0x1802c
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl 0xece3(%rip), %eax      # 0x17c40
jg 0x8f83
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movl (%rax,%rcx,4), %edx
movslq -0x14(%rbp), %rcx
leaq 0xeccb(%rip), %rax      # 0x17c40
movl %edx, (%rax,%rcx,4)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x8f54
movl $0x1, -0x18(%rbp)
cmpl $0x0, -0x18(%rbp)
je 0x8f9a
callq 0x8bd0
movl %eax, -0x18(%rbp)
jmp 0x8f8a
cmpl $0x0, 0xf08b(%rip)      # 0x1802c
jne 0x8fac
movl $0x7fffffff, -0x4(%rbp) # imm = 0x7FFFFFFF
jmp 0x8fe6
movl 0x6832(%rip), %eax      # 0xf7e4
movl $0x3c, %ecx
cltd
idivl %ecx
movl %eax, %esi
movl 0x6822(%rip), %eax      # 0xf7e4
movl $0x3c, %ecx
cltd
idivl %ecx
leaq 0x28fa(%rip), %rdi      # 0xb8cb
movb $0x0, %al
callq 0x1040
callq 0x7ff0
movl 0x6801(%rip), %eax      # 0xf7e4
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: Matheus-Aguilar[P]Huffman/main.cpp
// Function: splitByte(unsigned char, std::vector<bool, std::allocator<bool>>&)
void splitByte(const unsigned char byte, vector<bool> &bits){
	//Auxiliar usado para retirar o bit mais significativo
	unsigned char pos = 1 << 7;
	while(pos){ 
		bits.push_back(((byte & pos) ? 1 : 0)); //Get the Least Significant Digit
		pos >>= 1; //Shift to the right
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %dil, %al
movb %al, -0x1(%rbp)
movq %rsi, -0x10(%rbp)
movb $-0x80, -0x11(%rbp)
cmpb $0x0, -0x11(%rbp)
je 0x2a13
movq -0x10(%rbp), %rdi
movzbl -0x1(%rbp), %edx
movzbl -0x11(%rbp), %eax
andl %eax, %edx
xorl %eax, %eax
movl $0x1, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
cmpl $0x0, %eax
setne %al
movzbl %al, %esi
andl $0x1, %esi
callq 0x2ea0
movzbl -0x11(%rbp), %eax
sarl %eax
movb %al, -0x11(%rbp)
jmp 0x29d6
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: Matheus-Aguilar[P]Huffman/main.cpp
// Function: main
int main(int argc, char **argv) {

	//c to compress, d to decompress
	if(argv[1][0] == 'c'){
		compressFile(argv[2], argv[3]);
	}
	else if(argv[1][0] == 'd'){
		descompressFile(argv[2], argv[3]);
	}
	else{
		throw("Invalid Flag!");
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movsbl (%rax), %eax
cmpl $0x63, %eax
jne 0x2d4d
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rsi
callq 0x2370
jmp 0x2d9d
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movsbl (%rax), %eax
cmpl $0x64, %eax
jne 0x2d74
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rsi
callq 0x2a20
jmp 0x2d9b
movl $0x8, %edi
callq 0x20b0
movq %rax, %rdi
leaq 0x627c(%rip), %rax      # 0x9004
movq %rax, (%rdi)
movq 0xa23e(%rip), %rsi      # 0xcfd0
xorl %eax, %eax
movl %eax, %edx
callq 0x21d0
jmp 0x2d9d
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Matheus-Aguilar[P]Huffman/Huffman.cpp
// Function: HuffmanTree::destroy(Node*)
void HuffmanTree::destroy(Node *node){
    if(node == NULL) return; //Leaf node
    destroy(node->left); //Destroys left child
    destroy(node->right); //Destroys right child
    delete node; //Free memory
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x5ef1
jmp 0x5f2e
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
callq 0x5ed0
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x5ed0
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x5f2e
movq -0x20(%rbp), %rdi
movl $0x20, %esi
callq 0x2130
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Matheus-Aguilar[P]Huffman/Huffman.cpp
// Function: HuffmanTree::buildCodes(Node*, std::vector<bool, std::allocator<bool>>&)
void HuffmanTree::buildCodes(Node *node, vector<bool> &codeString){
    
    //Reached a leaf node
    if(node->left == NULL && node->right == NULL){
        code[node->character] = codeString; //Copy the code to codes array
        return; //End recursion
    }

    //If there is a left child
    if(node->left != NULL){
        codeString.push_back(0); //Adds a left move to the code, represented by a 0
        buildCodes(node->left, codeString); //Recursively call to left child
        codeString.pop_back(); //Remove the last move (backtracking)
    }

    if(node->right != NULL){
        codeString.push_back(1); //Adds a right move to the code, represented by a 1
        buildCodes(node->right, codeString); //Recursively call to right child
        codeString.pop_back(); //Remove the last move (backtracking)
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x5f96
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x5f96
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq $0x408, %rdi            # imm = 0x408
movq -0x10(%rbp), %rax
movzbl 0x18(%rax), %eax
imulq $0x28, %rax, %rax
addq %rax, %rdi
callq 0x6450
jmp 0x5fff
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
je 0x5fc8
movq -0x18(%rbp), %rdi
xorl %esi, %esi
callq 0x2ea0
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movq -0x18(%rbp), %rdx
callq 0x5f40
movq -0x18(%rbp), %rdi
callq 0x3080
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x5fff
movq -0x18(%rbp), %rdi
movl $0x1, %esi
callq 0x2ea0
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x18(%rbp), %rdx
callq 0x5f40
movq -0x18(%rbp), %rdi
callq 0x3080
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Matheus-Aguilar[P]Huffman/Huffman.cpp
// Function: HuffmanTree::compress(std::vector<bool, std::allocator<bool>>&, std::vector<char, std::allocator<char>> const&) const
void HuffmanTree::compress(vector<bool> &out, const vector<char> &in) const{
    
    if(!out.empty()) out.clear(); //Clear the vector if not empty

    //Copying the codes to the vector
    for(int i = 0; i < in.size(); ++i){
        size_t pos = (unsigned char) in[i];
        for(int j = 0; j < code[pos].size(); j++)
            out.push_back(code[pos][j]);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
callq 0x65b0
testb $0x1, %al
jne 0x60b2
movq -0x10(%rbp), %rdi
callq 0x6630
movl $0x0, -0x1c(%rbp)
movslq -0x1c(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rdi
callq 0x30a0
movq %rax, %rcx
movq -0x40(%rbp), %rax
cmpq %rcx, %rax
jae 0x616f
movq -0x18(%rbp), %rdi
movslq -0x1c(%rbp), %rsi
callq 0x6680
movzbl (%rax), %eax
movq %rax, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movq -0x38(%rbp), %rdi
movslq -0x2c(%rbp), %rax
movq %rax, -0x48(%rbp)
addq $0x408, %rdi            # imm = 0x408
imulq $0x28, -0x28(%rbp), %rax
addq %rax, %rdi
callq 0x2e20
movq %rax, %rcx
movq -0x48(%rbp), %rax
cmpq %rcx, %rax
jae 0x615f
movq -0x38(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, -0x50(%rbp)
addq $0x408, %rdi            # imm = 0x408
imulq $0x28, -0x28(%rbp), %rax
addq %rax, %rdi
movslq -0x2c(%rbp), %rsi
callq 0x66a0
movq -0x50(%rbp), %rdi
movzbl %al, %esi
andl $0x1, %esi
callq 0x2ea0
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x60f5
jmp 0x6161
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x60b9
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Matheus-Aguilar[P]Huffman/Huffman.cpp
// Function: HuffmanTree::descompress(std::vector<char, std::allocator<char>>&, std::vector<bool, std::allocator<bool>> const&) const
void HuffmanTree::descompress(vector<char> &out, const vector<bool> &in) const{
    
    if(!out.empty()) out.clear(); //Clear if not empty
    
    Node *node = root; //Start in the root node
    for(int i = 0; i < in.size(); ++i){
        if(!in[i]) //Left move (code 0)
            node = node->left;
        else //Right move (code 1)
            node = node->right;

        //Reached a leaf
        if(node->left == NULL && node->right == NULL){
            out.push_back(node->character); //Copy the caracther of the leaf
            node = root; //Return to the root
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
callq 0x66f0
testb $0x1, %al
jne 0x61b2
movq -0x10(%rbp), %rdi
callq 0x6730
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movslq -0x24(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rdi
callq 0x2e20
movq %rax, %rcx
movq -0x38(%rbp), %rax
cmpq %rcx, %rax
jae 0x6252
movq -0x18(%rbp), %rdi
movslq -0x24(%rbp), %rsi
callq 0x66a0
testb $0x1, %al
jne 0x61ff
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x620b
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x6242
movq -0x20(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x6242
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movb 0x18(%rax), %al
movb %al, -0x25(%rbp)
leaq -0x25(%rbp), %rsi
callq 0x2df0
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x6244
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x61c4
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: attractivechaos[P]udb2/bkthomps-hashmap/test-1a.c
// Function: test_int
uint32_t test_int(uint32_t n, uint32_t x0)
{
	uint32_t i, x, z = 0;
	unordered_map h;
	h = unordered_map_init(sizeof(uint32_t), sizeof(uint32_t), hash_int, compare_int);
	for (i = 0, x = x0; i < n; ++i) {
		uint32_t key, v = 1;
		x = hash32(x);
		key = get_key(n, x);
		unordered_map_put(h, &key, &v);
		z += v;
	}
	fprintf(stderr, "# unique keys: %d; checksum: %u\n", unordered_map_size(h), z);
	x = unordered_map_size(h);
	unordered_map_destroy(h);
	return x;
}

// Assembly:
subq $0x38, %rsp
movl %edi, 0x34(%rsp)
movl %esi, 0x30(%rsp)
movl $0x0, 0x24(%rsp)
movl $0x4, %esi
leaq 0xe0(%rip), %rdx        # 0x16a0
leaq 0xf9(%rip), %rcx        # 0x16c0
movq %rsi, %rdi
callq 0x1700
movq %rax, 0x18(%rsp)
movl $0x0, 0x2c(%rsp)
movl 0x30(%rsp), %eax
movl %eax, 0x28(%rsp)
movl 0x2c(%rsp), %eax
cmpl 0x34(%rsp), %eax
jae 0x1641
movl $0x1, 0x10(%rsp)
movl 0x28(%rsp), %edi
callq 0x1240
movl %eax, 0x28(%rsp)
movl 0x34(%rsp), %edi
movl 0x28(%rsp), %esi
callq 0x12b0
movl %eax, 0x14(%rsp)
movq 0x18(%rsp), %rdi
leaq 0x14(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x19c0
movl 0x10(%rsp), %eax
addl 0x24(%rsp), %eax
movl %eax, 0x24(%rsp)
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x15e4
movq 0x39b0(%rip), %rax      # 0x4ff8
movq (%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x18(%rsp), %rdi
callq 0x1990
movq 0x8(%rsp), %rdi
movl %eax, %edx
movl 0x24(%rsp), %ecx
leaq 0x1a09(%rip), %rsi      # 0x3075
movb $0x0, %al
callq 0x1060
movq 0x18(%rsp), %rdi
callq 0x1990
movl %eax, 0x28(%rsp)
movq 0x18(%rsp), %rdi
callq 0x2290
movl 0x28(%rsp), %eax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: auton1[P]motiflocation/motiflocation.cpp
// Function: print_help()
void print_help() {

	printf("\nmotifhunter %0.1f\n", version);
	printf("Returns every location of a motif in a given file.\n\n");
	printf("*** Positions are zero based! ***.\n\n");
	
	printf("Options :\n");
	printf("-file1 <file>                Sequence data file 1 (required)\n");
	printf("-out <file>                  Output file (required)\n");
	printf("-startstr <string>           Starting Motif\n");
	printf("-chrom <string>              Output string used for chromosome\n");
	printf("-mutations <int>             Number of allowed mutations\n");
	printf("-outputseqlen                Output the chromosome length as well\n");
	printf("-uppercase_only              Only output results in uppercase sequence\n");
	printf("-lowercase_only              Only output results in lowercase sequence\n");
	printf("-1000G_ref                   FASTA headers are in 1000G format\n");
	printf("\n");
}

// Assembly:
pushq %rax
movsd 0x11147(%rip), %xmm0    # 0x17380
leaq 0xaf10(%rip), %rdi      # 0x11150
movb $0x1, %al
callq 0x4050
leaq 0xaf16(%rip), %rdi      # 0x11164
movb $0x0, %al
callq 0x4050
leaq 0xaf3d(%rip), %rdi      # 0x11199
movb $0x0, %al
callq 0x4050
leaq 0xaf54(%rip), %rdi      # 0x111be
movb $0x0, %al
callq 0x4050
leaq 0xaf51(%rip), %rdi      # 0x111c9
movb $0x0, %al
callq 0x4050
leaq 0xaf81(%rip), %rdi      # 0x11207
movb $0x0, %al
callq 0x4050
leaq 0xafa8(%rip), %rdi      # 0x1123c
movb $0x0, %al
callq 0x4050
leaq 0xafc7(%rip), %rdi      # 0x11269
movb $0x0, %al
callq 0x4050
leaq 0xaff9(%rip), %rdi      # 0x112a9
movb $0x0, %al
callq 0x4050
leaq 0xb025(%rip), %rdi      # 0x112e3
movb $0x0, %al
callq 0x4050
leaq 0xb05a(%rip), %rdi      # 0x11326
movb $0x0, %al
callq 0x4050
leaq 0xb094(%rip), %rdi      # 0x1136e
movb $0x0, %al
callq 0x4050
leaq 0xb0ce(%rip), %rdi      # 0x113b6
movb $0x0, %al
callq 0x4050
leaq 0xaec6(%rip), %rdi      # 0x111bc
movb $0x0, %al
callq 0x4050
popq %rax
retq
nop
// File: auton1[P]motiflocation/motif.cpp
// Function: motif::motif(bool)
motif::motif(bool is_nondegenerate)
{
	// Generate a random motif.
	int i;
    int maxlength=6;
	int length;
	string out;
	ExpVal = 0.0;

	length = ran2(2, maxlength+1);
	sequence.resize(length);
	for (i=0; i<length; i++)
	{
		sequence[i] = GetRandomBase(is_nondegenerate);
	}
	doComplement();

	CalcDegeneracy();
	get_max_length();
}

// Assembly:
subq $0x78, %rsp
movb %sil, %al
movq %rdi, 0x70(%rsp)
andb $0x1, %al
movb %al, 0x6f(%rsp)
movq 0x70(%rsp), %rdi
movq %rdi, 0x28(%rsp)
leaq 0xc2e5(%rip), %rax      # 0x16aa8
movq %rax, (%rdi)
addq $0x8, %rdi
movq %rdi, 0x18(%rsp)
callq 0x4450
movq 0x28(%rsp), %rdi
addq $0x28, %rdi
movq %rdi, 0x20(%rsp)
callq 0x4450
movl $0x6, 0x64(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x4450
movq 0x28(%rsp), %rax
movq $0x0, 0x78(%rax)
movl 0x64(%rsp), %esi
incl %esi
movl $0x2, %edi
callq 0xf3c0
movl %eax, 0x30(%rsp)
jmp 0xa81c
movq 0x28(%rsp), %rdi
movl 0x30(%rsp), %eax
movl %eax, 0x60(%rsp)
addq $0x8, %rdi
movslq 0x60(%rsp), %rsi
callq 0x4440
jmp 0xa839
movl $0x0, 0x68(%rsp)
movl 0x68(%rsp), %eax
cmpl 0x60(%rsp), %eax
jge 0xa8c3
movq 0x28(%rsp), %rdi
movzbl 0x6f(%rsp), %esi
andl $0x1, %esi
callq 0xa900
movb %al, 0x17(%rsp)
jmp 0xa863
movq 0x28(%rsp), %rdi
addq $0x8, %rdi
movslq 0x68(%rsp), %rsi
callq 0x46b0
movq %rax, 0x8(%rsp)
jmp 0xa87d
movq 0x8(%rsp), %rax
movb 0x17(%rsp), %cl
movb %cl, (%rax)
movl 0x68(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x68(%rsp)
jmp 0xa841
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x38(%rsp)
movl %eax, 0x34(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x4220
movq 0x20(%rsp), %rdi
callq 0x4220
movq 0x18(%rsp), %rdi
callq 0x4220
jmp 0xa8f6
movq 0x28(%rsp), %rdi
callq 0xaa50
jmp 0xa8cf
movq 0x28(%rsp), %rdi
callq 0xab00
jmp 0xa8db
movq 0x28(%rsp), %rdi
callq 0xace0
jmp 0xa8e7
leaq 0x40(%rsp), %rdi
callq 0x4220
addq $0x78, %rsp
retq
movq 0x38(%rsp), %rdi
callq 0x4600
// File: auton1[P]motiflocation/motif.cpp
// Function: motif::GetRandomBase(bool)
char motif::GetRandomBase(bool is_nondegenerate)
{
	int letter;
	if (is_nondegenerate == true)
	{
		letter = ran2(0,6);
		if (letter == 4) letter = 14;
		if (letter == 5) letter = 15;
	}
	else
		letter = ran2(0, 16);
	switch(letter)
	{
	case 0:	return 'a'; break;
	case 1:	return 'c'; break;
	case 2:	return 'g'; break;
	case 3:	return 't'; break;
	case 4:	return 'r'; break;
	case 5:	return 'y'; break;
	case 6:	return 'k'; break;
	case 7:	return 'm'; break;
	case 8:	return 's'; break;
	case 9:	return 'w'; break;
	case 10: return 'b'; break;
	case 11: return 'd'; break;
	case 12: return 'h'; break;
	case 13: return 'v'; break;
	case 14: return 'n'; break;
	case 15: 
		{	// insert a gap of size 1 to 9.
			int i; char out;
			i=ran2(1, 10);
			out = '0' + i;
			return out;
			break;
		}

	default:
		printf("error - illegal nucleotide\n");
		abort();
		return '-';
	}
}

// Assembly:
subq $0x28, %rsp
movb %sil, %al
movq %rdi, 0x18(%rsp)
andb $0x1, %al
movb %al, 0x17(%rsp)
movb 0x17(%rsp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0xa950
xorl %edi, %edi
movl $0x6, %esi
callq 0xf3c0
movl %eax, 0x10(%rsp)
cmpl $0x4, 0x10(%rsp)
jne 0xa93f
movl $0xe, 0x10(%rsp)
cmpl $0x5, 0x10(%rsp)
jne 0xa94e
movl $0xf, 0x10(%rsp)
jmp 0xa960
xorl %edi, %edi
movl $0x10, %esi
callq 0xf3c0
movl %eax, 0x10(%rsp)
movl 0x10(%rsp), %eax
movq %rax, (%rsp)
subq $0xf, %rax
ja 0xaa26
movq (%rsp), %rax
leaq 0x6aef(%rip), %rcx      # 0x1146c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movb $0x61, 0x27(%rsp)
jmp 0xaa39
movb $0x63, 0x27(%rsp)
jmp 0xaa39
movb $0x67, 0x27(%rsp)
jmp 0xaa39
movb $0x74, 0x27(%rsp)
jmp 0xaa39
movb $0x72, 0x27(%rsp)
jmp 0xaa39
movb $0x79, 0x27(%rsp)
jmp 0xaa39
movb $0x6b, 0x27(%rsp)
jmp 0xaa39
movb $0x6d, 0x27(%rsp)
jmp 0xaa39
movb $0x73, 0x27(%rsp)
jmp 0xaa39
movb $0x77, 0x27(%rsp)
jmp 0xaa39
movb $0x62, 0x27(%rsp)
jmp 0xaa39
movb $0x64, 0x27(%rsp)
jmp 0xaa39
movb $0x68, 0x27(%rsp)
jmp 0xaa39
movb $0x76, 0x27(%rsp)
jmp 0xaa39
movb $0x6e, 0x27(%rsp)
jmp 0xaa39
movl $0x1, %edi
movl $0xa, %esi
callq 0xf3c0
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %eax
addl $0x30, %eax
movb %al, 0xb(%rsp)
movb 0xb(%rsp), %al
movb %al, 0x27(%rsp)
jmp 0xaa39
leaq 0x6da1(%rip), %rdi      # 0x117ce
movb $0x0, %al
callq 0x4050
callq 0x41c0
movb 0x27(%rsp), %al
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: auton1[P]motiflocation/motif.cpp
// Function: motif::doComplement()
void motif::doComplement()
{
	unsigned int i;
	char base;
	unsigned int seqlen;
	seqlen = (unsigned int)sequence.length();
	complement.resize(seqlen);
	for (i=0; i<seqlen; i++)
	{
		base = sequence[i];
		complement[seqlen-i-1] = getComplement(base);
	}
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rdi
movq %rdi, 0x8(%rsp)
addq $0x8, %rdi
callq 0x4500
movq 0x8(%rsp), %rdi
movl %eax, 0x14(%rsp)
addq $0x28, %rdi
movl 0x14(%rsp), %eax
movl %eax, %esi
callq 0x4440
movl $0x0, 0x1c(%rsp)
movl 0x1c(%rsp), %eax
cmpl 0x14(%rsp), %eax
jae 0xaaf3
movq 0x8(%rsp), %rdi
addq $0x8, %rdi
movl 0x1c(%rsp), %eax
movl %eax, %esi
callq 0x46b0
movq 0x8(%rsp), %rdi
movb (%rax), %al
movb %al, 0x1b(%rsp)
movsbl 0x1b(%rsp), %esi
callq 0xaea0
movq 0x8(%rsp), %rdi
movb %al, 0x7(%rsp)
addq $0x28, %rdi
movl 0x14(%rsp), %eax
subl 0x1c(%rsp), %eax
subl $0x1, %eax
movl %eax, %eax
movl %eax, %esi
callq 0x46b0
movb 0x7(%rsp), %cl
movb %cl, (%rax)
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0xaa8c
addq $0x28, %rsp
retq
nopl (%rax,%rax)
// File: auton1[P]motiflocation/motif.cpp
// Function: motif::CalcDegeneracy()
void motif::CalcDegeneracy()
{
	unsigned int i;
	char base;
	degeneracy= 0.0;
	for (i=0; i<sequence.length(); i++)
	{
		base = sequence[i];
		switch (base)
		{
			case 'a': case 't': case 'g': case 'c':
				degeneracy++;
				break;
			case 'r': case 'y': case 'k': case 'm': case 's': case 'w':
				degeneracy += 2;
				break;
			case 'b': case 'd': case 'h': case 'v':
				degeneracy += 3;
				break;
			case 'n':
				degeneracy += 4;
				break;
			case '1': case '2': case '3': case '4': case '5': case '6': case '7':case '8': case '9':
				degeneracy += (4 * (base - '0' + 1));
				break;
			default:
				printf("Non-standard base in motif\n");
				cout << base << endl;
				cout << sequence << endl;
				abort();
		}
	}
	degeneracy /= (double)sequence.length();
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x60(%rax)
movl $0x0, 0x1c(%rsp)
movq 0x10(%rsp), %rdi
movl 0x1c(%rsp), %eax
movq %rax, 0x8(%rsp)
addq $0x8, %rdi
callq 0x4500
movq %rax, %rcx
movq 0x8(%rsp), %rax
cmpq %rcx, %rax
jae 0xac89
movq 0x10(%rsp), %rdi
addq $0x8, %rdi
movl 0x1c(%rsp), %eax
movl %eax, %esi
callq 0x46b0
movb (%rax), %al
movb %al, 0x1b(%rsp)
movsbl 0x1b(%rsp), %eax
addl $-0x31, %eax
movl %eax, %ecx
movq %rcx, (%rsp)
subl $0x48, %eax
ja 0xac20
movq (%rsp), %rax
leaq 0x6925(%rip), %rcx      # 0x114ac
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x10(%rsp), %rax
movsd 0x6b9b(%rip), %xmm0     # 0x11738
addsd 0x60(%rax), %xmm0
movsd %xmm0, 0x60(%rax)
jmp 0xac77
movq 0x10(%rsp), %rax
movsd 0x6b77(%rip), %xmm0     # 0x11730
addsd 0x60(%rax), %xmm0
movsd %xmm0, 0x60(%rax)
jmp 0xac77
movq 0x10(%rsp), %rax
movsd 0x6b53(%rip), %xmm0     # 0x11728
addsd 0x60(%rax), %xmm0
movsd %xmm0, 0x60(%rax)
jmp 0xac77
movq 0x10(%rsp), %rax
movsd 0x6b2f(%rip), %xmm0     # 0x11720
addsd 0x60(%rax), %xmm0
movsd %xmm0, 0x60(%rax)
jmp 0xac77
movq 0x10(%rsp), %rax
movsbl 0x1b(%rsp), %ecx
subl $0x30, %ecx
addl $0x1, %ecx
shll $0x2, %ecx
cvtsi2sd %ecx, %xmm0
addsd 0x60(%rax), %xmm0
movsd %xmm0, 0x60(%rax)
jmp 0xac77
leaq 0x6b8b(%rip), %rdi      # 0x117b2
movb $0x0, %al
callq 0x4050
movq 0xc3a3(%rip), %rdi      # 0x16fd8
movsbl 0x1b(%rsp), %esi
callq 0x43b0
movq %rax, %rdi
movq 0xc37f(%rip), %rsi      # 0x16fc8
callq 0x4360
movq 0x10(%rsp), %rsi
addq $0x8, %rsi
movq 0xc37a(%rip), %rdi      # 0x16fd8
callq 0x42f0
movq %rax, %rdi
movq 0xc35b(%rip), %rsi      # 0x16fc8
callq 0x4360
callq 0x41c0
jmp 0xac79
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0xab23
movq 0x10(%rsp), %rdi
addq $0x8, %rdi
callq 0x4500
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, %xmm1
movaps 0x6a55(%rip), %xmm0     # 0x11700
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movapd 0x6a59(%rip), %xmm0     # 0x11710
subpd %xmm0, %xmm1
movaps %xmm1, %xmm0
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm0, %xmm1
movsd 0x60(%rax), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, 0x60(%rax)
addq $0x28, %rsp
retq
nopl (%rax)
// File: auton1[P]motiflocation/motif.cpp
// Function: motif::get_max_length()
void motif::get_max_length()
{
	unsigned int out = 0;
	const char* wild = sequence.c_str();
	while (*wild)
	{
		if ((*wild > '1') && (*wild <= '9'))
		{
			out += (*wild - '0');
		}
		else
			out++;
		wild++;
	}
	//return out;
	max_length = out;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rdi
movq %rdi, 0x8(%rsp)
movl $0x0, 0x1c(%rsp)
addq $0x8, %rdi
callq 0x4140
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
cmpb $0x0, (%rax)
je 0xad5d
movq 0x10(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x31, %eax
jle 0xad42
movq 0x10(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x39, %eax
jg 0xad42
movq 0x10(%rsp), %rax
movsbl (%rax), %eax
subl $0x30, %eax
addl 0x1c(%rsp), %eax
movl %eax, 0x1c(%rsp)
jmp 0xad4d
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
movq 0x10(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x10(%rsp)
jmp 0xad09
movq 0x8(%rsp), %rax
movl 0x1c(%rsp), %ecx
movl %ecx, 0x70(%rax)
addq $0x28, %rsp
retq
nop
// File: auton1[P]motiflocation/motif.cpp
// Function: motif::motif(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
motif::motif(string input)
{
	// Set motif to input sting.
	ExpVal = 0.0;
	sequence = input;
	CalcDegeneracy();
	get_max_length();
	doComplement();
}

// Assembly:
subq $0x48, %rsp
movq %rsi, 0x20(%rsp)
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq 0x40(%rsp), %rdi
movq %rdi, 0x10(%rsp)
leaq 0xbd14(%rip), %rax      # 0x16aa8
movq %rax, (%rdi)
addq $0x8, %rdi
movq %rdi, 0x18(%rsp)
callq 0x4450
movq 0x10(%rsp), %rdi
addq $0x28, %rdi
movq %rdi, 0x8(%rsp)
callq 0x4450
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq $0x0, 0x78(%rax)
callq 0x4040
jmp 0xadd6
movq 0x10(%rsp), %rdi
callq 0xab00
jmp 0xade2
movq 0x10(%rsp), %rdi
callq 0xace0
jmp 0xadee
movq 0x10(%rsp), %rdi
callq 0xaa50
jmp 0xadfa
addq $0x48, %rsp
retq
movq 0x8(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x30(%rsp)
movl %eax, 0x2c(%rsp)
callq 0x4220
movq 0x18(%rsp), %rdi
callq 0x4220
movq 0x30(%rsp), %rdi
callq 0x4600
nopl (%rax,%rax)