LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/devkot[P]SearchEngine/functions.c
// Function: place
void place(pool_t *pool, int fd) {

    pthread_mutex_lock(&mtx);

    while (pool->count >= POOL_SIZE){
        pthread_cond_wait(&cond_nonfull, &mtx);
    }

    pool->end = (pool->end + 1) % POOL_SIZE;
    pool->fd[pool->end] = fd;
    pool->count++;

    pthread_mutex_unlock(&mtx);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %r14d
movq %rdi, %rbx
leaq 0x3b19(%rip), %rdi      # 0x51a8
callq 0x1290
movl 0x20(%rbx), %eax
cmpl $0x6, %eax
jl 0x16bd
leaq 0x3b85(%rip), %r15      # 0x5228
leaq 0x3afe(%rip), %r12      # 0x51a8
movq %r15, %rdi
movq %r12, %rsi
callq 0x1090
movl 0x20(%rbx), %eax
cmpl $0x5, %eax
jg 0x16aa
movl 0x1c(%rbx), %ecx
movl %ecx, %edx
incl %edx
movslq %edx, %rdx
imulq $0x2aaaaaab, %rdx, %rdx # imm = 0x2AAAAAAB
movq %rdx, %rsi
shrq $0x3f, %rsi
shrq $0x20, %rdx
addl %esi, %edx
addl %edx, %edx
leal (%rdx,%rdx,2), %edx
negl %edx
addl %edx, %ecx
incl %ecx
movl %ecx, 0x1c(%rbx)
movslq %ecx, %rcx
movl %r14d, (%rbx,%rcx,4)
incl %eax
movl %eax, 0x20(%rbx)
leaq 0x3aac(%rip), %rdi      # 0x51a8
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1170
// File: /workspace/github_c_makefile_star2_O3/devkot[P]SearchEngine/functions.c
// Function: obtain
int obtain(pool_t *pool) {
    int fd = 0;

    pthread_mutex_lock(&mtx);

    while (pool->count <= 0){
        pthread_cond_wait(&cond_nonempty, &mtx);
    }
    fd = pool->fd[pool->start];
    pool->start = (pool->start + 1) % POOL_SIZE;
    pool->count--;
    pthread_mutex_unlock(&mtx);

    return fd;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x3a8b(%rip), %rdi      # 0x51a8
callq 0x1290
movl 0x20(%rbx), %eax
testl %eax, %eax
jg 0x1749
leaq 0x3ac8(%rip), %r14      # 0x51f8
leaq 0x3a71(%rip), %r15      # 0x51a8
movq %r14, %rdi
movq %r15, %rsi
callq 0x1090
movl 0x20(%rbx), %eax
testl %eax, %eax
jle 0x1737
movslq 0x18(%rbx), %rcx
movl (%rbx,%rcx,4), %r14d
incl %ecx
movslq %ecx, %rcx
imulq $0x2aaaaaab, %rcx, %rdx # imm = 0x2AAAAAAB
movq %rdx, %rsi
shrq $0x3f, %rsi
shrq $0x20, %rdx
addl %esi, %edx
addl %edx, %edx
leal (%rdx,%rdx,2), %edx
subl %edx, %ecx
movl %ecx, 0x18(%rbx)
decl %eax
movl %eax, 0x20(%rbx)
leaq 0x3a28(%rip), %rdi      # 0x51a8
callq 0x1170
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/devkot[P]SearchEngine/functions.c
// Function: producer
void *producer(void *ptr) {
    struct sockaddr_in myaddr;
    int lsock, csock, serving_port;

    serving_port = *((int *) ptr);
    time (&start);

    if((lsock = socket( AF_INET, SOCK_STREAM, 0)) < 0)
        perror_exit("socket");

    myaddr.sin_addr.s_addr = htonl(INADDR_ANY);
    myaddr.sin_port = htons(serving_port);
    myaddr.sin_family = AF_INET;

    // Resolve address already in use
    if (setsockopt(lsock, SOL_SOCKET, SO_REUSEADDR, &myaddr, sizeof(myaddr)) == -1) {
        perror("setsockopt");
        exit(1);
    }

    if(bind(lsock, (struct sockaddr *)&myaddr, sizeof(myaddr)))
        perror_exit("bind");

    if(listen(lsock, 5) != 0)
        perror_exit("listen");

    printf("Server is ready. Awaiting client connections on port %d\n", serving_port);
    while(1){
        if((csock = accept(lsock, NULL, NULL)) < 0)
            perror_exit("accept");

        place(&pool, csock);
        pthread_cond_signal(&cond_nonempty);
    }
    close(csock);

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl (%rdi), %r14d
leaq 0x3ab6(%rip), %rdi      # 0x5260
callq 0x1150
movl $0x2, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x12a0
testl %eax, %eax
jns 0x17d0
leaq 0x1985(%rip), %rdi      # 0x3150
jmp 0x18a1
movl %eax, %ebx
leaq -0x28(%rbp), %rcx
movl $0x0, 0x4(%rcx)
movl %r14d, %eax
rolw $0x8, %ax
movw %ax, 0x2(%rcx)
movw $0x2, (%rcx)
movl %ebx, %edi
movl $0x1, %esi
movl $0x2, %edx
movl $0x10, %r8d
callq 0x1070
cmpl $-0x1, %eax
jne 0x1815
leaq 0x1947(%rip), %rdi      # 0x3157
jmp 0x18a1
leaq -0x28(%rbp), %rsi
movl %ebx, %edi
movl $0x10, %edx
callq 0x11a0
testl %eax, %eax
jne 0x1891
movl %ebx, %edi
movl $0x5, %esi
callq 0x1190
testl %eax, %eax
jne 0x189a
leaq 0x192e(%rip), %rdi      # 0x316e
movl %r14d, %esi
xorl %eax, %eax
callq 0x10b0
movl %ebx, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1210
testl %eax, %eax
js 0x1888
leaq 0x3920(%rip), %r14      # 0x5180
leaq 0x3991(%rip), %r15      # 0x51f8
movq %r14, %rdi
movl %eax, %esi
callq 0x1677
movq %r15, %rdi
callq 0x1110
movl %ebx, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1210
testl %eax, %eax
jns 0x1867
leaq 0x1918(%rip), %rdi      # 0x31a7
jmp 0x18a1
leaq 0x18ca(%rip), %rdi      # 0x3162
jmp 0x18a1
leaq 0x18c6(%rip), %rdi      # 0x3167
callq 0x11f0
movl $0x1, %edi
callq 0x1260
// File: /workspace/github_c_makefile_star2_O3/devkot[P]SearchEngine/functions.c
// Function: getFormattedTime
char *getFormattedTime(void) {
    time_t rawtime;
    struct tm* timeinfo;

    time(&rawtime);
    timeinfo = localtime(&rawtime);

    static char timeStamp[200];
    strftime(timeStamp, sizeof(timeStamp), "%a, %d %b %Y %H:%M:%S GMT", timeinfo);

    return timeStamp;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq -0x10(%rbp), %rbx
movq %rbx, %rdi
callq 0x1150
movq %rbx, %rdi
callq 0x1040
leaq 0x3655(%rip), %rbx      # 0x5270
leaq 0x177f(%rip), %rdx      # 0x33a1
movl $0xc8, %esi
movq %rbx, %rdi
movq %rax, %rcx
callq 0x11c0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/devkot[P]SearchEngine/functions.c
// Function: customRead
int customRead(int fd, char *payload, int remaining){
    int received = 0, b = 0;

    while (remaining > 0){
        b = read(fd, payload + received, remaining);    // Advance pointer by bytes read
        if(b < 0)
            perror_exit("customRead");
        received += b;
        remaining -= b;
    }

    return b;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testl %edx, %edx
jle 0x1ccc
movl %edx, %ebx
movq %rsi, %r14
movl %edi, %r15d
xorl %r12d, %r12d
movslq %r12d, %rsi
addq %r14, %rsi
movl %ebx, %edx
movl %r15d, %edi
callq 0x1100
testl %eax, %eax
js 0x1cd7
addl %eax, %r12d
subl %eax, %ebx
jg 0x1caf
jmp 0x1cce
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x12d8
// File: /workspace/github_c_makefile_star2_O3/devkot[P]SearchEngine/functions.c
// Function: customWrite
int customWrite(int fd, char *payload, int remaining) {
    int sent = 0, b = 0;

    while (remaining > 0){
        b = write(fd, payload + sent, remaining);       // Advance pointer by sent bytes
        if(b < 0)
            perror_exit("customWrite");
        sent += b;
        remaining -= b;
    }

    return b;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testl %edx, %edx
jle 0x1d13
movl %edx, %ebx
movq %rsi, %r14
movl %edi, %r15d
xorl %r12d, %r12d
movslq %r12d, %rsi
addq %r14, %rsi
movl %ebx, %edx
movl %r15d, %edi
callq 0x1080
testl %eax, %eax
js 0x1d1e
addl %eax, %r12d
subl %eax, %ebx
jg 0x1cf6
jmp 0x1d15
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x12f0
// File: /workspace/github_c_makefile_star2_O3/devkot[P]SearchEngine/functions.c
// Function: getRunTime
char *getRunTime(char *runTime, time_t start){
    int min, sec, hr, n, ms;
    time_t end;
    double dif;
    time (&end);
    dif = difftime (end,start);
    n = floor(dif);

    if(dif>3600){                               // If the server has been running for over an hour
        min = n/60;
        sec = n%60;
        hr = min/60;
        min = min%60;
        ms = sec%60;
        sprintf(runTime, "%.2d:%.2d:%.2d.%.2d", hr, min, sec, ms);
        return runTime;
    }
    else{                                       // If the server has been running for under an hour
        min = n/60;
        sec = n%60;
        ms = sec%60;
        sprintf(runTime, "%.2d:%.2d.%.2d", min, sec, ms);
        return runTime;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x28(%rbp), %r15
movq %r15, %rdi
callq 0x1150
movq (%r15), %rdi
movq %r14, %rsi
callq 0x10c0
movsd %xmm0, -0x20(%rbp)
callq 0x1220
cvttsd2si %xmm0, %eax
movslq %eax, %rdx
imulq $-0x77777777, %rdx, %rcx # imm = 0x88888889
shrq $0x20, %rcx
addl %edx, %ecx
movl %ecx, %eax
shrl $0x1f, %eax
sarl $0x5, %ecx
addl %eax, %ecx
imull $0x3c, %ecx, %eax
movl %edx, %r8d
subl %eax, %r8d
movsd -0x20(%rbp), %xmm0
ucomisd 0x1129(%rip), %xmm0     # 0x3148
jbe 0x206d
imulq $-0x6e5d4c3b, %rdx, %rax # imm = 0x91A2B3C5
shrq $0x20, %rax
addl %eax, %edx
movl %edx, %eax
shrl $0x1f, %eax
sarl $0xb, %edx
addl %eax, %edx
movslq %ecx, %rax
imulq $-0x77777777, %rax, %rax # imm = 0x88888889
shrq $0x20, %rax
addl %ecx, %eax
movl %eax, %esi
shrl $0x1f, %esi
sarl $0x5, %eax
addl %esi, %eax
imull $0x3c, %eax, %eax
subl %eax, %ecx
leaq 0x1374(%rip), %rsi      # 0x33d2
movq %rbx, %rdi
movl %r8d, %r9d
xorl %eax, %eax
callq 0x1250
jmp 0x2083
leaq 0x1363(%rip), %rsi      # 0x33d7
movq %rbx, %rdi
movl %ecx, %edx
movl %r8d, %ecx
xorl %eax, %eax
callq 0x1250
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/ArchLuke[P]YouSuck/Engine.c
// Function: MaterialDraw
int MaterialDraw(const S_BOARD *pos) {
        if (!pos->pceNum[wR] && !pos->pceNum[bR] && !pos->pceNum[wQ] && !pos->pceNum[bQ]) {
      if (!pos->pceNum[bB] && !pos->pceNum[wB]) {
          if (pos->pceNum[wN] < 3 && pos->pceNum[bN] < 3) {  return TRUE; }
      } else if (!pos->pceNum[wN] && !pos->pceNum[bN]) {
         if (abs(pos->pceNum[wB] - pos->pceNum[bB]) < 2) { return TRUE; }
      } else if ((pos->pceNum[wN] < 3 && !pos->pceNum[wB]) || (pos->pceNum[wB] == 1 && !pos->pceNum[wN])) {
        if ((pos->pceNum[bN] < 3 && !pos->pceNum[bB]) || (pos->pceNum[bB] == 1 && !pos->pceNum[bN]))  { return TRUE; }
      }
    }
    return FALSE;
}

// Assembly:
cmpl $0x0, 0x238(%rdi)
jne 0x12b7
cmpl $0x0, 0x250(%rdi)
jne 0x12b7
cmpl $0x0, 0x23c(%rdi)
jne 0x12b7
cmpl $0x0, 0x254(%rdi)
je 0x12ba
xorl %eax, %eax
retq
movl 0x24c(%rdi), %ecx
testl %ecx, %ecx
jne 0x12cd
cmpl $0x0, 0x234(%rdi)
je 0x1325
movl 0x230(%rdi), %eax
testl %eax, %eax
je 0x12de
cmpl $0x2, %eax
jg 0x12b7
jmp 0x12e7
cmpl $0x0, 0x248(%rdi)
je 0x1345
movl 0x234(%rdi), %edx
movl %edx, %esi
xorl $0x1, %esi
orl %esi, %eax
setne %al
testl %edx, %edx
je 0x12ff
testb %al, %al
jne 0x12b7
testl %ecx, %ecx
sete %sil
movl 0x248(%rdi), %edx
cmpl $0x3, %edx
setl %dil
movl $0x1, %eax
testb %dil, %sil
jne 0x12b9
xorl $0x1, %ecx
orl %edx, %ecx
jne 0x12b7
jmp 0x12b9
cmpl $0x2, 0x230(%rdi)
jg 0x12b7
movl $0x1, %eax
cmpl $0x3, 0x248(%rdi)
jge 0x12b7
jmp 0x12b9
movl 0x234(%rdi), %eax
subl %ecx, %eax
movl %eax, %ecx
negl %ecx
cmovsl %eax, %ecx
movl $0x1, %eax
cmpl $0x2, %ecx
jae 0x12b7
jmp 0x12b9
// File: /workspace/github_c_makefile_star2_O3/ArchLuke[P]YouSuck/Engine.c
// Function: PrintBitBoard
void PrintBitBoard(U64 bb) {

    U64 shiftMe = 1ULL;
    
    int rank = 0;
    int file = 0;
    int sq = 0;
    int sq64 = 0;
    
    printf("\n");
    for(rank = RANK_1; rank <= RANK_8; ++rank) {
        for(file = FILE_A; file <= FILE_H; ++file) {
            sq = FR2SQ(file,rank);    // 120 based        
            sq64 = SQ64(sq); // 64 based
            
            if((shiftMe << sq64) & bb)
                printf("X");
            else
                printf("-");
                
        }
        printf("\n");
    }  
    printf("\n\n");
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0xa, %edi
callq 0x1040
leaq 0xa5a1(%rip), %r14      # 0xb924
xorl %r15d, %r15d
xorl %r12d, %r12d
movl (%r14,%r12,4), %eax
btq %rax, %rbx
movl $0x2d, %edi
jae 0x139d
movl $0x58, %edi
callq 0x1040
incq %r12
cmpq $0x8, %r12
jne 0x1389
movl $0xa, %edi
callq 0x1040
incq %r15
addq $0x28, %r14
cmpq $0x8, %r15
jne 0x1386
leaq 0x6bf2(%rip), %rdi      # 0x7fbb
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x1060
// File: /workspace/github_c_makefile_star2_O3/ArchLuke[P]YouSuck/Engine.c
// Function: PrintBoard
void PrintBoard(const S_BOARD *pos) {
    
    int sq,file,rank,piece;

    printf("\nGame Board:\n\n");
    
    for(rank = RANK_8; rank >= RANK_1; rank--) {
        printf("%d  ",rank+1);
        for(file = FILE_A; file <= FILE_H; file++) {
            sq = FR2SQ(file,rank);
            piece = pos->pieces[sq];
            printf("%3c",PceChar[piece]);
        }
        printf("\n");
    }
    
    printf("\n   ");
    for(file = FILE_A; file <= FILE_H; file++) {
        printf("%3c",'a'+file);    
    }
    printf("\n");
    printf("side:%c\n",SideChar[pos->side]);
    printf("enPas:%d\n",pos->enPas);
    printf("castle:%c%c%c%c\n",
            pos->castlePerm & WKCA ? 'K' : '-',
            pos->castlePerm & WQCA ? 'Q' : '-',
            pos->castlePerm & BKCA ? 'k' : '-',
            pos->castlePerm & BQCA ? 'q' : '-'    
            );
    printf("PosKey:%llX\n",pos->posKey);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x6bde(%rip), %rdi      # 0x7fcc
callq 0x1060
movq %rbx, (%rsp)
leaq 0x16c(%rbx), %r12
movl $0x7, %r13d
leaq 0x67cd(%rip), %r14      # 0x7bd8
leaq 0x652b(%rip), %rbp      # 0x793d
leaq 0x67c4(%rip), %r15      # 0x7bdd
leal 0x1(%r13), %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x1080
xorl %ebx, %ebx
movslq (%r12,%rbx,4), %rax
movsbl (%rax,%rbp), %esi
movq %r15, %rdi
xorl %eax, %eax
callq 0x1080
incq %rbx
cmpq $0x8, %rbx
jne 0x1429
movl $0xa, %edi
callq 0x1040
addq $-0x28, %r12
subq $0x1, %r13
jae 0x1419
leaq 0x6782(%rip), %rdi      # 0x7be1
xorl %eax, %eax
callq 0x1080
movl $0x61, %ebp
leaq 0x676b(%rip), %r14      # 0x7bdd
movq %r14, %rdi
movl %ebp, %esi
xorl %eax, %eax
callq 0x1080
incl %ebp
cmpl $0x69, %ebp
jne 0x1472
movl $0xa, %edi
callq 0x1040
movq (%rsp), %rbx
movslq 0x200(%rbx), %rax
leaq 0x64b3(%rip), %rcx      # 0x7954
movsbl (%rax,%rcx), %esi
leaq 0x673a(%rip), %rdi      # 0x7be6
xorl %eax, %eax
callq 0x1080
movl 0x204(%rbx), %esi
leaq 0x672f(%rip), %rdi      # 0x7bef
xorl %eax, %eax
callq 0x1080
movd 0x214(%rbx), %xmm0
pshufd $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
pand 0x5b34(%rip), %xmm0     # 0x7010
pxor %xmm1, %xmm1
pcmpeqd %xmm0, %xmm1
movmskps %xmm1, %eax
testb $0x8, %al
movl $0x2d, %edi
movl $0x4b, %esi
cmovnel %edi, %esi
testb $0x4, %al
movl $0x51, %edx
cmovnel %edi, %edx
testb $0x2, %al
movl $0x6b, %ecx
cmovnel %edi, %ecx
testb $0x1, %al
movl $0x71, %r8d
cmovnel %edi, %r8d
leaq 0x66dc(%rip), %rdi      # 0x7bf9
xorl %eax, %eax
callq 0x1080
movq 0x220(%rbx), %rsi
leaq 0x66d8(%rip), %rdi      # 0x7c0a
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1080
// File: /workspace/github_c_makefile_star2_O3/ArchLuke[P]YouSuck/Engine.c
// Function: ParsePosition
static
void ParsePosition(char* lineIn, S_BOARD *pos) {
    
    lineIn += 9;
    char *ptrChar = lineIn;
    
    if(strncmp(lineIn, "startpos", 8) == 0){
        ParseFen(START_FEN, pos);
    } else {
        ptrChar = strstr(lineIn, "fen");
        if(ptrChar == NULL) {
            ParseFen(START_FEN, pos);
        } else {
            ptrChar+=4;
            ParseFen(ptrChar, pos);
        }
    }
    
    ptrChar = strstr(lineIn, "moves");
    int move;
    
    if(ptrChar != NULL) {
        ptrChar += 6;
        while(*ptrChar) {
              move = ParseMove(ptrChar,pos);
              if(move == NOMOVE) break;
              MakeMove(pos, move);
              pos->ply=0;
              while(*ptrChar && *ptrChar!= ' ') ptrChar++;
              ptrChar++;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x808, %rsp            # imm = 0x808
movq %rdi, %rbx
addq $0x9, %rbx
leaq 0x522d(%rip), %rsi      # 0x7c63
movl $0x8, %edx
movq %rbx, %rdi
callq 0x1050
testl %eax, %eax
je 0x2a6a
leaq 0x5257(%rip), %rsi      # 0x7ca5
movq %rbx, %rdi
callq 0x1120
leaq 0x4(%rax), %rcx
testq %rax, %rax
leaq 0x5208(%rip), %rdi      # 0x7c6c
cmovneq %rcx, %rdi
jmp 0x2a71
leaq 0x51fb(%rip), %rdi      # 0x7c6c
callq 0x32d9
leaq 0x53cb(%rip), %rsi      # 0x7e48
movq %rbx, %rdi
callq 0x1120
testq %rax, %rax
je 0x2bd4
movq %rax, %rbx
movb 0x6(%rax), %r15b
testb %r15b, %r15b
je 0x2bd4
addq $0x6, %rbx
movl $0x13cf, %ebp           # imm = 0x13CF
movb 0x1(%rbx), %r12b
leal -0x39(%r12), %eax
cmpb $-0x8, %al
jb 0x2bd4
leal -0x69(%r15), %eax
cmpb $-0x8, %al
jb 0x2bd4
movb 0x3(%rbx), %r13b
leal -0x39(%r13), %eax
cmpb $-0x8, %al
jb 0x2bd4
movzbl 0x2(%rbx), %r14d
leal -0x69(%r14), %eax
cmpb $-0x8, %al
jb 0x2bd4
movq %rsp, %rdi
xorl %esi, %esi
callq 0x3966
movslq 0x800(%rsp), %rax
testq %rax, %rax
jle 0x2bc8
movzbl %r15b, %ecx
addb $-0x31, %r12b
movzbl %r12b, %edx
leal (%rdx,%rdx,4), %edx
leal (%rcx,%rdx,2), %edx
addl $-0x4c, %edx
addb $-0x31, %r13b
movzbl %r13b, %ecx
leal (%rcx,%rcx,4), %ecx
leal (%r14,%rcx,2), %esi
addl $-0x4c, %esi
xorl %r8d, %r8d
movl (%rsp,%r8,8), %edi
movl %edi, %ecx
andl $0x7f, %ecx
cmpl %edx, %ecx
jne 0x2b91
movl %edi, %ecx
shrl $0x7, %ecx
andl $0x7f, %ecx
cmpl %esi, %ecx
jne 0x2b91
movl %edi, %ecx
shrl $0x14, %ecx
andl $0xf, %ecx
je 0x2b9b
movl $0x15d7, %r9d           # imm = 0x15D7
shrq %cl, %r9
btl %ecx, %ebp
jb 0x2b6d
movb 0x4(%rbx), %r10b
testb $0x1, %r9b
jne 0x2b7b
cmpb $0x71, %r10b
jne 0x2b81
jmp 0x2b9b
testb $0x1, %r9b
jne 0x2b81
cmpb $0x62, 0x4(%rbx)
jne 0x2b81
jmp 0x2b9b
cmpb $0x72, %r10b
je 0x2b9b
cmpl $0x8, %ecx
je 0x2b8b
cmpl $0x2, %ecx
jne 0x2b91
cmpb $0x6e, 0x4(%rbx)
je 0x2b9b
incq %r8
cmpq %r8, %rax
jne 0x2b2a
jmp 0x2bc8
testq %rdi, %rdi
je 0x2bd4
callq 0x36cf
movl $0x0, 0x92fd(%rip)      # 0xbeac
incq %rbx
movzbl -0x1(%rbx), %eax
testb $-0x21, %al
jne 0x2baf
movb (%rbx), %r15b
testb %r15b, %r15b
jne 0x2aa7
jmp 0x2bd4
leaq 0x5428(%rip), %rdi      # 0x7ff7
callq 0x1060
addq $0x808, %rsp            # imm = 0x808
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/ArchLuke[P]YouSuck/Engine.c
// Function: AddPawnMove
static void AddPawnMove( const S_BOARD *pos, const int from, const int to, S_MOVELIST *list ) {
    int side=pos->side;
    if(RanksBrd[from] == (side?RANK_2:RANK_7)) {
        AddQuietMove(pos, MOVE(from,to,EMPTY,(side?bQ:wQ),0), list);
        AddQuietMove(pos, MOVE(from,to,EMPTY,(side?bR:wR),0), list);
        AddQuietMove(pos, MOVE(from,to,EMPTY,(side?bB:wB),0), list);
        AddQuietMove(pos, MOVE(from,to,EMPTY,(side?bN:wN),0), list);
    } else {
        AddQuietMove(pos, MOVE(from,to,EMPTY,EMPTY,0), list);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movl 0x7ada(%rip), %eax      # 0xbea0
movslq %edi, %rcx
leaq 0x1fa70(%rip), %rdx     # 0x23e40
xorl %edi, %edi
testl %eax, %eax
sete %dil
leal (%rdi,%rdi,4), %edi
incl %edi
shll $0x7, %esi
movl %ecx, %ebp
orl %esi, %ebp
cmpl %edi, (%rdx,%rcx,4)
jne 0x444e
testl %eax, %eax
movl $0x500000, %eax         # imm = 0x500000
movl $0xb00000, %edi         # imm = 0xB00000
cmovel %eax, %edi
movl $0x400000, %eax         # imm = 0x400000
movl $0xa00000, %r14d        # imm = 0xA00000
cmovel %eax, %r14d
movl $0x300000, %eax         # imm = 0x300000
movl $0x900000, %r15d        # imm = 0x900000
cmovel %eax, %r15d
movl $0x200000, %eax         # imm = 0x200000
movl $0x800000, %r12d        # imm = 0x800000
cmovel %eax, %r12d
orl %ebp, %edi
movq %rbx, %rsi
callq 0x445d
orl %ebp, %r14d
movl %r14d, %edi
movq %rbx, %rsi
callq 0x445d
orl %ebp, %r15d
movl %r15d, %edi
movq %rbx, %rsi
callq 0x445d
orl %r12d, %ebp
movl %ebp, %edi
movq %rbx, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x445d
// File: /workspace/github_c_makefile_star2_O3/ArchLuke[P]YouSuck/Engine.c
// Function: AddQuietMove
static void AddQuietMove( const S_BOARD *pos, int move, S_MOVELIST *list ) {

    list->moves[list->count].move = move;
    
    if(pos->searchKillers[0][pos->ply] == move) {    
        list->moves[list->count].score = 900000;
    } else if(pos->searchKillers[1][pos->ply] == move) {    
        list->moves[list->count].score = 800000;
    } else {    
        list->moves[list->count].score = pos->searchHistory[pos->pieces[FROMSQ(move)]][TOSQ(move)];
    }
    list->count++;
}

// Assembly:
movslq 0x800(%rsi), %rax
movl %edi, (%rsi,%rax,8)
movslq 0x7a3e(%rip), %r8       # 0xbeac
leaq 0x782b(%rip), %rcx      # 0xbca0
movl $0xdbba0, %edx          # imm = 0xDBBA0
cmpl %edi, 0xde18(%rcx,%r8,4)
je 0x44b6
movl $0xc3500, %edx          # imm = 0xC3500
cmpl %edi, 0xdf18(%rcx,%r8,4)
je 0x44b6
movl %edi, %edx
andl $0x7f, %edx
movslq (%rcx,%rdx,4), %rdx
imulq $0x1e0, %rdx, %rdx      # imm = 0x1E0
addq %rcx, %rdx
shrl $0x5, %edi
andl $0x1fc, %edi            # imm = 0x1FC
movl 0xc5b8(%rdi,%rdx), %edx
movl %edx, 0x4(%rsi,%rax,8)
incl %eax
movl %eax, 0x800(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/ArchLuke[P]YouSuck/Engine.c
// Function: AddPawnCapMove
static void AddPawnCapMove( const S_BOARD *pos, const int from, const int to, const int cap, S_MOVELIST *list ) {    
    int side=pos->side;
    if(RanksBrd[from] == (side?RANK_2:RANK_7)) {
        AddCaptureMove(pos, MOVE(from,to,cap,(side?bQ:wQ),0), list);
        AddCaptureMove(pos, MOVE(from,to,cap,(side?bR:wR),0), list);
        AddCaptureMove(pos, MOVE(from,to,cap,(side?bB:wB),0), list);
        AddCaptureMove(pos, MOVE(from,to,cap,(side?bN:wN),0), list);
    } else {
        AddCaptureMove(pos, MOVE(from,to,cap,EMPTY,0), list);
    }
}

// Assembly:
movl 0x79d7(%rip), %eax      # 0xbea0
movslq %edi, %r8
leaq 0x1f96d(%rip), %r9      # 0x23e40
xorl %r10d, %r10d
testl %eax, %eax
sete %r10b
leal (%r10,%r10,4), %r10d
incl %r10d
shll $0x7, %esi
shll $0xe, %edx
orl %esi, %edx
orl %edi, %edx
cmpl %r10d, (%r9,%r8,4)
jne 0x45ec
pushq %rbp
pushq %r14
pushq %rbx
testl %eax, %eax
movl $0x500000, %eax         # imm = 0x500000
movl $0xb00000, %r10d        # imm = 0xB00000
cmovel %eax, %r10d
movl $0x400000, %eax         # imm = 0x400000
movl $0xa00000, %r9d         # imm = 0xA00000
cmovel %eax, %r9d
movl $0x300000, %eax         # imm = 0x300000
movl $0x900000, %r8d         # imm = 0x900000
cmovel %eax, %r8d
movl $0x200000, %eax         # imm = 0x200000
movl $0x800000, %esi         # imm = 0x800000
cmovel %eax, %esi
orl %edx, %r10d
movslq 0x800(%rcx), %rax
movl %r10d, (%rcx,%rax,8)
movl %edx, %r11d
shrl $0xe, %r11d
andl $0xf, %r11d
andl $0x7f, %edi
leaq 0x7746(%rip), %r10      # 0xbca0
movslq (%r10,%rdi,4), %r14
leaq 0x22c4b(%rip), %rbx     # 0x271b0
imulq $0x34, %r11, %r11
addq %rbx, %r11
movl $0xf4240, %ebx          # imm = 0xF4240
movl (%r11,%r14,4), %ebp
addl %ebx, %ebp
movl %ebp, 0x4(%rcx,%rax,8)
leaq 0x1(%rax), %r14
movl %r14d, 0x800(%rcx)
orl %edx, %r9d
movl %r9d, 0x8(%rcx,%rax,8)
movslq (%r10,%rdi,4), %r9
movl (%r11,%r9,4), %r9d
addl %ebx, %r9d
movl %r9d, 0xc(%rcx,%rax,8)
leaq 0x2(%rax), %r9
movl %r9d, 0x800(%rcx)
orl %edx, %r8d
movl %r8d, 0x10(%rcx,%rax,8)
movslq (%r10,%rdi,4), %r8
movl (%r11,%r8,4), %r8d
addl %ebx, %r8d
movl %r8d, 0x14(%rcx,%rax,8)
leaq 0x3(%rax), %r8
movl %r8d, 0x800(%rcx)
orl %edx, %esi
movl %esi, 0x18(%rcx,%rax,8)
movslq (%r10,%rdi,4), %rdx
addl (%r11,%rdx,4), %ebx
movl %ebx, 0x1c(%rcx,%rax,8)
addl $0x4, %eax
movl %eax, 0x800(%rcx)
popq %rbx
popq %r14
popq %rbp
retq
movslq 0x800(%rcx), %rax
movl %edx, (%rcx,%rax,8)
shrl $0xe, %edx
andl $0xf, %edx
andl $0x7f, %edi
leaq 0x769a(%rip), %rsi      # 0xbca0
movslq (%rsi,%rdi,4), %rsi
imulq $0x34, %rdx, %rdx
leaq 0x22b9b(%rip), %rdi     # 0x271b0
addq %rdx, %rdi
movl $0xf4240, %edx          # imm = 0xF4240
addl (%rdi,%rsi,4), %edx
movl %edx, 0x4(%rcx,%rax,8)
incl %eax
movl %eax, 0x800(%rcx)
retq
// File: /workspace/github_c_makefile_star2_O3/ArchLuke[P]YouSuck/Engine.c
// Function: ClearPiece
static void ClearPiece(const int sq, S_BOARD *pos) {

    
    int pce = pos->pieces[sq];
    
    
    int col = PieceCol[pce];
    int index = 0;
    int t_pceNum = -1;
    
    HASH_PCE(pce,sq);
    
    pos->pieces[sq] = EMPTY;
    pos->material[col] -= PieceVal[pce];
    
    if(PieceBig[pce]) {
        pos->bigPce[col]--;
        
    } else {
        CLRBIT(pos->pawns[col],SQ64(sq));
        CLRBIT(pos->pawns[BOTH],SQ64(sq));
    }
    
    for(index = 0; index < pos->pceNum[pce]; ++index) {
        if(pos->pList[pce][index] == sq) {
            t_pceNum = index;
            break;
        }
    }
    
    
    pos->pceNum[pce]--;        
    
    pos->pList[pce][t_pceNum] = pos->pList[pce][pos->pceNum[pce]];
 
}

// Assembly:
movslq %edi, %rdx
leaq 0x7669(%rip), %rax      # 0xbca0
movslq (%rax,%rdx,4), %rcx
imulq $0x3c0, %rcx, %rsi      # imm = 0x3C0
leaq 0x1fa57(%rip), %r8      # 0x240a0
addq %rsi, %r8
movq (%r8,%rdx,8), %rsi
xorq %rsi, 0x7869(%rip)      # 0xbec0
leaq 0x2d12(%rip), %rsi      # 0x7370
movslq (%rsi,%rcx,4), %rsi
movl $0x0, (%rax,%rdx,4)
leaq 0x2d40(%rip), %r8       # 0x73b0
movl (%r8,%rcx,4), %r8d
subl %r8d, 0x264(%rax,%rsi,4)
movl $0x83, %r8d
btq %rcx, %r8
jb 0x4691
decl 0x25c(%rax,%rsi,4)
jmp 0x46b6
leaq 0x7238(%rip), %r8       # 0xb8d0
movslq (%r8,%rdx,4), %rdx
leaq 0x1f29d(%rip), %r8      # 0x23940
movq (%r8,%rdx,8), %rdx
andq %rdx, 0x1e0(%rax,%rsi,8)
andq %rdx, 0x77da(%rip)      # 0xbe90
movslq 0x228(%rax,%rcx,4), %rdx
movq $-0x1, %rsi
leaq (%rcx,%rcx,4), %r8
testq %rdx, %rdx
jle 0x46ef
leaq (%rax,%r8,8), %r10
addq $0xc270, %r10           # imm = 0xC270
xorl %r9d, %r9d
cmpl %edi, (%r10,%r9,4)
je 0x46ec
incq %r9
cmpq %r9, %rdx
jne 0x46dc
jmp 0x46ef
movq %r9, %rsi
leal -0x1(%rdx), %edi
movl %edi, 0x228(%rax,%rcx,4)
leaq (%rax,%r8,8), %rax
movl 0xc26c(%rax,%rdx,4), %ecx
movl %ecx, 0xc270(%rax,%rsi,4)
retq
// File: /workspace/github_c_makefile_star2_O3/ArchLuke[P]YouSuck/Engine.c
// Function: MovePiece
static
void MovePiece(const int from, const int to, S_BOARD *pos) {

    int index = 0;
    int pce = pos->pieces[from];    
    int col = PieceCol[pce];
    
    int t_PieceNum = FALSE;

    HASH_PCE(pce,from);
    pos->pieces[from] = EMPTY;
    
    HASH_PCE(pce,to);
    pos->pieces[to] = pce;
    
    if(!PieceBig[pce]) {
        CLRBIT(pos->pawns[col],SQ64(from));
        CLRBIT(pos->pawns[BOTH],SQ64(from));
        SETBIT(pos->pawns[col],SQ64(to));
        SETBIT(pos->pawns[BOTH],SQ64(to));        
    }    
    
    for(index = 0; index < pos->pceNum[pce]; ++index) {
        if(pos->pList[pce][index] == from) {
            pos->pList[pce][index] = to;
            t_PieceNum = TRUE;
            break;
        }
    }
}

// Assembly:
movl %edi, %r8d
leaq 0x758a(%rip), %rax      # 0xbca0
movslq (%rax,%r8,4), %rcx
leaq 0x2c4f(%rip), %rdx      # 0x7370
movslq (%rdx,%rcx,4), %rdx
imulq $0x3c0, %rcx, %r9       # imm = 0x3C0
leaq 0x1f96d(%rip), %r10     # 0x240a0
addq %r9, %r10
movq 0x7783(%rip), %r11      # 0xbec0
xorq (%r10,%r8,8), %r11
movl $0x0, (%rax,%r8,4)
movl %esi, %r9d
xorq (%r10,%r9,8), %r11
movq %r11, 0x7769(%rip)      # 0xbec0
movl %ecx, (%rax,%r9,4)
movl $0x83, %r10d
btq %rcx, %r10
jae 0x47aa
leaq 0x7162(%rip), %r10      # 0xb8d0
movslq (%r10,%r8,4), %r8
leaq 0x1f1c7(%rip), %r11     # 0x23940
movq (%r11,%r8,8), %r8
andq %r8, 0x1e0(%rax,%rdx,8)
andq %r8, 0x7704(%rip)       # 0xbe90
movslq (%r10,%r9,4), %r8
leaq 0x1f3a9(%rip), %r9      # 0x23b40
movq (%r9,%r8,8), %r8
orq %r8, 0x1e0(%rax,%rdx,8)
orq %r8, 0x76e6(%rip)       # 0xbe90
movslq 0x228(%rax,%rcx,4), %rdx
testq %rdx, %rdx
jle 0x47d7
leaq (%rcx,%rcx,4), %rcx
leaq (%rax,%rcx,8), %r9
addq $0xc270, %r9            # imm = 0xC270
xorl %r8d, %r8d
cmpl %edi, (%r9,%r8,4)
je 0x47d8
incq %r8
cmpq %r8, %rdx
jne 0x47c9
retq
leaq (%rax,%rcx,8), %rax
movl %esi, 0xc270(%rax,%r8,4)
retq
// File: /workspace/github_c_makefile_star2_O3/ArchLuke[P]YouSuck/Engine.c
// Function: AddPiece
static void AddPiece(const int sq, S_BOARD *pos, const int pce) {

    
    int col = PieceCol[pce];

        HASH_PCE(pce,sq);
    
    pos->pieces[sq] = pce;

        if(PieceBig[pce]) {
        pos->bigPce[col]++;
    
    } else {
        SETBIT(pos->pawns[col],SQ64(sq));
        SETBIT(pos->pawns[BOTH],SQ64(sq));
    }
    
    pos->material[col] += PieceVal[pce];
    pos->pList[pce][pos->pceNum[pce]++] = sq;
    
}

// Assembly:
movl %esi, %eax
leaq 0x2b82(%rip), %rcx      # 0x7370
movslq (%rcx,%rax,4), %rcx
movslq %edi, %r8
imulq $0x3c0, %rax, %rdx      # imm = 0x3C0
leaq 0x1f89d(%rip), %r9      # 0x240a0
addq %rdx, %r9
movq (%r9,%r8,8), %rdx
xorq %rdx, 0x76af(%rip)      # 0xbec0
leaq 0x7488(%rip), %rdx      # 0xbca0
movl %esi, (%rdx,%r8,4)
movl $0x83, %r9d
btq %rsi, %r9
jb 0x4831
incl 0x25c(%rdx,%rcx,4)
jmp 0x4856
leaq 0x7098(%rip), %rsi      # 0xb8d0
movslq (%rsi,%r8,4), %rsi
leaq 0x1f2fd(%rip), %r8      # 0x23b40
movq (%r8,%rsi,8), %rsi
orq %rsi, 0x1e0(%rdx,%rcx,8)
orq %rsi, 0x763a(%rip)      # 0xbe90
leaq 0x2b53(%rip), %rsi      # 0x73b0
movl (%rsi,%rax,4), %esi
addl %esi, 0x264(%rdx,%rcx,4)
movslq 0x228(%rdx,%rax,4), %rcx
leal 0x1(%rcx), %esi
movl %esi, 0x228(%rdx,%rax,4)
leaq (%rax,%rax,4), %rax
leaq (%rdx,%rax,8), %rax
movl %edi, 0xc270(%rax,%rcx,4)
retq
// File: /workspace/github_c_makefile_star2_O3/ArchLuke[P]YouSuck/Engine.c
// Function: PrMove
static
char *PrMove(const int move) {

    static char MvStr[6];
    
    int ff = FilesBrd[FROMSQ(move)];
    int rf = RanksBrd[FROMSQ(move)];
    int ft = FilesBrd[TOSQ(move)];
    int rt = RanksBrd[TOSQ(move)];
    
    int promoted = PROMOTED(move);
    
    if(promoted) {
        char pchar = 'q';
        if(IsKn(promoted)) {
            pchar = 'n';
        } else if(IsRQ(promoted) && !IsBQ(promoted))  {
            pchar = 'r';
        } else if(!IsRQ(promoted) && IsBQ(promoted))  {
            pchar = 'b';
        }
        sprintf(MvStr, "%c%c%c%c%c", ('a'+ff), ('1'+rf), ('a'+ft), ('1'+rt), pchar);
    } else {
        sprintf(MvStr, "%c%c%c%c", ('a'+ff), ('1'+rf), ('a'+ft), ('1'+rt));
    }
    return MvStr;
}

// Assembly:
movl %edi, %eax
andl $0x7f, %eax
shll $0x2, %eax
leaq 0x704c(%rip), %rcx      # 0xbab0
movl (%rax,%rcx), %edx
leaq 0x1f3d2(%rip), %rsi     # 0x23e40
movl (%rax,%rsi), %eax
movl %edi, %r9d
shrl $0x5, %r9d
andl $0x1fc, %r9d            # imm = 0x1FC
movl (%r9,%rcx), %r8d
movl (%r9,%rsi), %r9d
shrl $0x14, %edi
andl $0xf, %edi
je 0x4aba
movl $0x6e, %esi
cmpl $0x2, %edi
je 0x4af0
cmpl $0x8, %edi
je 0x4af0
movl $0x15d7, %esi           # imm = 0x15D7
movl %edi, %ecx
shrq %cl, %rsi
movl $0x13cf, %ecx           # imm = 0x13CF
btl %edi, %ecx
jb 0x4adf
andl $0x1, %esi
addl $0x71, %esi
jmp 0x4af0
addl $0x61, %edx
addl $0x31, %eax
addl $0x61, %r8d
addl $0x31, %r9d
leaq 0x22985(%rip), %rdi     # 0x27454
leaq 0x3294(%rip), %rsi      # 0x7d6a
movl %eax, %ecx
xorl %eax, %eax
jmp 0x1110
testb $0x1, %sil
movl $0x62, %ecx
movl $0x71, %esi
cmovel %ecx, %esi
pushq %rax
addl $0x61, %edx
addl $0x31, %eax
addl $0x61, %r8d
addl $0x31, %r9d
movl %esi, (%rsp)
leaq 0x2294b(%rip), %rdi     # 0x27454
leaq 0x3258(%rip), %rsi      # 0x7d68
movl %eax, %ecx
xorl %eax, %eax
callq 0x1110
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O3/ArchLuke[P]YouSuck/Engine.c
// Function: GetPvLine
static
int GetPvLine(const int depth, S_BOARD *pos) {


    int move = ProbePvTable(pos);
    int count = 0;
    
    while(move != NOMOVE && count < depth) {
    
    
        if( MoveExists(pos, move) ) {
            MakeMove(pos, move);
            pos->PvArray[count++] = move;
        } else {
            break;
        }        
        move = ProbePvTable(pos);    
    }
    
    while(pos->ply > 0) {
        TakeMove(pos);
    }
    
    return count;
    
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x818, %rsp            # imm = 0x818
movq 0x6e9c(%rip), %rcx      # 0xbec0
movslq 0x130f5(%rip), %rsi     # 0x18120
xorl %ebx, %ebx
movq %rcx, %rax
xorl %edx, %edx
divq %rsi
movq 0x130dc(%rip), %rax     # 0x18118
movslq %edx, %rdx
leaq (%rdx,%rdx,2), %rdx
cmpq %rcx, (%rax,%rdx,8)
jne 0x5119
leaq (%rax,%rdx,8), %rax
movl 0x8(%rax), %ebp
testl %ebp, %ebp
sete %al
testl %edi, %edi
setle %cl
orb %al, %cl
jne 0x5119
movl %edi, %eax
movq %rax, 0x8(%rsp)
xorl %ebx, %ebx
leaq 0x10(%rsp), %rdi
movq %rdi, %r12
xorl %esi, %esi
callq 0x3966
movslq 0x810(%rsp), %r13
testq %r13, %r13
jle 0x5119
xorl %r14d, %r14d
movl 0x10(%rsp,%r14,8), %r15d
movl %r15d, %edi
callq 0x36cf
testl %eax, %eax
je 0x50ad
callq 0x4889
cmpl %ebp, %r15d
je 0x50b7
incq %r14
cmpq %r14, %r13
jne 0x5092
jmp 0x5119
movl %ebp, %edi
callq 0x36cf
leaq 0x6bdb(%rip), %rax      # 0xbca0
movl %ebp, 0xc4b8(%rax,%rbx,4)
incq %rbx
movq 0x6dea(%rip), %rcx      # 0xbec0
movslq 0x13043(%rip), %rsi     # 0x18120
movq %rcx, %rax
xorl %edx, %edx
divq %rsi
movq 0x1302c(%rip), %rax     # 0x18118
movslq %edx, %rdx
leaq (%rdx,%rdx,2), %rdx
cmpq %rcx, (%rax,%rdx,8)
jne 0x5119
leaq (%rax,%rdx,8), %rax
movl 0x8(%rax), %ebp
testl %ebp, %ebp
je 0x5119
movq %r12, %rdi
cmpq 0x8(%rsp), %rbx
jb 0x5074
jmp 0x5119
callq 0x4889
cmpl $0x0, 0x6d8c(%rip)      # 0xbeac
jg 0x5114
movl %ebx, %eax
addq $0x818, %rsp            # imm = 0x818
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/ArchLuke[P]YouSuck/Engine.c
// Function: CheckUp
static void CheckUp(S_SEARCHINFO *info) {
    // .. check if time up, or interrupt from GUI
    if(info->timeset == TRUE && GetTimeMs() > info->stoptime) {
        info->stopped = TRUE;
    }
        
    ReadInput(info);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x90, %rsp
cmpl $0x1, 0x21e56(%rip)     # 0x2717c
jne 0x536c
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1090
imull $0x3e8, (%rbx), %ecx    # imm = 0x3E8
movabsq $0x20c49ba5e353f7cf, %rax # imm = 0x20C49BA5E353F7CF
imulq 0x8(%rbx)
movq %rdx, %rax
shrq $0x3f, %rax
shrq $0x7, %rdx
addl %eax, %edx
addl %ecx, %edx
cmpl %edx, 0x21e14(%rip)     # 0x27174
jge 0x536c
movl $0x1, 0x21e24(%rip)     # 0x27190
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rbx
movaps %xmm0, (%rbx)
movaps %xmm0, 0x10(%rbx)
movaps %xmm0, 0x20(%rbx)
movaps %xmm0, 0x30(%rbx)
movaps %xmm0, 0x40(%rbx)
movaps %xmm0, 0x50(%rbx)
movaps %xmm0, 0x60(%rbx)
movaps %xmm0, 0x70(%rbx)
movq 0x5c2e(%rip), %r14      # 0xafc8
movq (%r14), %rdi
callq 0x10d0
leal 0x3f(%rax), %ecx
testl %eax, %eax
cmovnsl %eax, %ecx
andl $0xc0, %ecx
subl %ecx, %eax
movl $0x1, %r15d
movl %eax, %ecx
shlq %cl, %r15
movq (%r14), %rdi
callq 0x10d0
leal 0x3f(%rax), %ecx
testl %eax, %eax
cmovnsl %eax, %ecx
sarl $0x6, %ecx
movslq %ecx, %rax
orq %r15, 0x10(%rsp,%rax,8)
movq %rsp, %r8
xorps %xmm0, %xmm0
movaps %xmm0, (%r8)
movl $0x10, %edi
movq %rbx, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x10e0
movq (%r14), %rdi
callq 0x10d0
leal 0x3f(%rax), %ecx
testl %eax, %eax
cmovnsl %eax, %ecx
sarl $0x6, %ecx
movslq %ecx, %rax
movq 0x10(%rsp,%rax,8), %rbx
movq (%r14), %rdi
callq 0x10d0
btq %rax, %rbx
jae 0x5426
movl $0x1, 0x21d6a(%rip)     # 0x27190
addq $0x90, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/ArchLuke[P]YouSuck/Engine.c
// Function: EvalPosition
static int EvalPosition(const S_BOARD *pos) {

    int pce;
    int pceNum;
    int sq;
    int score = pos->material[WHITE] - pos->material[BLACK];
    if(!pos->pceNum[wP] && !pos->pceNum[bP]) {
        if(MaterialDraw(pos))
            return 0;
    }
    if(pos->material[BLACK]>0)
    {
        
        if (!pos->isCastled[WHITE])
        {
            score -= 20;
        }

        score += EvalWhitePawns(pos);
        score += EvalWhiteKnight(pos);
        score += EvalWhiteBishop(pos);
        score += EvalWhiteRook(pos);
        score += EvalWhiteQueen(pos);

    }
    score += EvalWhiteKing(pos);
    if(pos->material[WHITE]>0)
    {
        if (!pos->isCastled[BLACK])
        {
            score += 20;
        }
        

        score += EvalBlackPawns(pos);
        score += EvalBlackKnight(pos);
        score += EvalBlackBishop(pos);
        score += EvalBlackRook(pos);
        score += EvalBlackQueen(pos);

    }
    
    score += EvalBlackKing(pos);

    if(pos->side == WHITE) {
        return score;
    } else {
        return -score;
    }        
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl 0x6ac3(%rip), %ebx      # 0xbf04
movl 0x6ac1(%rip), %ebp      # 0xbf08
movl 0x6a97(%rip), %eax      # 0xbee4
orl 0x6a79(%rip), %eax      # 0xbecc
jne 0x546d
leaq 0x6844(%rip), %rdi      # 0xbca0
callq 0x1293
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
jne 0x555a
subl %ebp, %ebx
testl %ebp, %ebp
jle 0x54c6
leaq 0x6826(%rip), %r14      # 0xbca0
leal -0x14(%rbx), %r15d
cmpl $0x0, 0x6a33(%rip)      # 0xbeb8
cmovnel %ebx, %r15d
movq %r14, %rdi
callq 0x62fc
movl %eax, %ebx
movq %r14, %rdi
callq 0x5e90
movl %eax, %ebp
addl %ebx, %ebp
movq %r14, %rdi
callq 0x602c
movl %eax, %ebx
addl %ebp, %ebx
movq %r14, %rdi
callq 0x61fc
movl %eax, %ebp
addl %ebx, %ebp
movq %r14, %rdi
callq 0x5df0
movl %eax, %ebx
addl %ebp, %ebx
addl %r15d, %ebx
leaq 0x67d3(%rip), %rdi      # 0xbca0
callq 0x6470
movl %eax, %r14d
addl %ebx, %r14d
cmpl $0x0, 0x6a25(%rip)      # 0xbf04
jle 0x553b
leaq 0x67b8(%rip), %rbx      # 0xbca0
leal 0x14(%r14), %r12d
cmpl $0x0, 0x69c9(%rip)      # 0xbebc
cmovnel %r14d, %r12d
movq %rbx, %rdi
callq 0x63a8
movl %eax, %ebp
movq %rbx, %rdi
callq 0x5f5c
movl %eax, %r14d
addl %ebp, %r14d
movq %rbx, %rdi
callq 0x612e
movl %eax, %ebp
addl %r14d, %ebp
movq %rbx, %rdi
callq 0x6272
movl %eax, %r15d
addl %ebp, %r15d
movq %rbx, %rdi
callq 0x5e3d
movl %eax, %r14d
addl %r15d, %r14d
addl %r12d, %r14d
leaq 0x675e(%rip), %rdi      # 0xbca0
callq 0x64f5
movl %eax, %ecx
addl %r14d, %ecx
movl %ecx, %eax
negl %eax
cmpl $0x0, 0x6949(%rip)      # 0xbea0
cmovel %ecx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/ArchLuke[P]YouSuck/Engine.c
// Function: MakeNullMove
static    
void MakeNullMove(S_BOARD *pos) {

    pos->ply++;
    pos->history[pos->hisPly].posKey = pos->posKey;

    if(pos->enPas != NO_SQ) HASH_EP;

    pos->history[pos->hisPly].move = NOMOVE;
    pos->history[pos->hisPly].fiftyMove = pos->fiftyMove;
    pos->history[pos->hisPly].enPas = pos->enPas;
    pos->history[pos->hisPly].castlePerm = pos->castlePerm;
    pos->enPas = NO_SQ;

    pos->side ^= 1;
    pos->hisPly++;
    HASH_SIDE;
   
    return;
}

// Assembly:
incl 0x6943(%rip)            # 0xbeac
leaq 0x6730(%rip), %rdx      # 0xbca0
movq 0x6949(%rip), %rax      # 0xbec0
movslq 0x6932(%rip), %rcx      # 0xbeb0
leaq (%rcx,%rcx,2), %rsi
movq %rax, 0x280(%rdx,%rsi,8)
movslq 0x6913(%rip), %rdi      # 0xbea4
cmpq $0x63, %rdi
je 0x55a2
leaq 0x1eb02(%rip), %r8      # 0x240a0
xorq (%r8,%rdi,8), %rax
movl $0x0, 0x270(%rdx,%rsi,8)
movl 0x68f4(%rip), %r8d      # 0xbea8
movl %r8d, 0x27c(%rdx,%rsi,8)
movl %edi, 0x278(%rdx,%rsi,8)
movl 0x68eb(%rip), %edi      # 0xbeb4
movl %edi, 0x274(%rdx,%rsi,8)
movl $0x63, 0x68ca(%rip)     # 0xbea4
xorb $0x1, 0x68bf(%rip)      # 0xbea0
incl %ecx
movl %ecx, 0x68c7(%rip)      # 0xbeb0
xorq 0x21b70(%rip), %rax     # 0x27160
movq %rax, 0x68c9(%rip)      # 0xbec0
retq
// File: /workspace/github_c_makefile_star2_O3/ArchLuke[P]YouSuck/Engine.c
// Function: TakeNullMove
static
void TakeNullMove(S_BOARD *pos) {

    pos->hisPly--;
    pos->ply--;

    if(pos->enPas != NO_SQ) HASH_EP;

    pos->castlePerm = pos->history[pos->hisPly].castlePerm;
    pos->fiftyMove = pos->history[pos->hisPly].fiftyMove;
    pos->enPas = pos->history[pos->hisPly].enPas;

    if(pos->enPas != NO_SQ) HASH_EP;
    pos->side ^= 1;
    HASH_SIDE;
 
}

// Assembly:
movq 0x68ac(%rip), %xmm1     # 0xbeac
pcmpeqd %xmm0, %xmm0
paddd %xmm1, %xmm0
movq %xmm0, 0x689c(%rip)     # 0xbeac
movslq 0x688d(%rip), %rcx      # 0xbea4
movq 0x68a2(%rip), %rax      # 0xbec0
cmpq $0x63, %rcx
je 0x562f
leaq 0x1ea75(%rip), %rdx     # 0x240a0
xorq (%rdx,%rcx,8), %rax
pshufd $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
movd %xmm0, %ecx
movslq %ecx, %rcx
leaq (%rcx,%rcx,2), %rcx
leaq 0x665a(%rip), %rdx      # 0xbca0
movl 0x274(%rdx,%rcx,8), %esi
movl %esi, 0x6861(%rip)      # 0xbeb4
movq 0x278(%rdx,%rcx,8), %rcx
movq %rcx, 0x6842(%rip)      # 0xbea4
cmpl $0x63, %ecx
je 0x5675
movslq %ecx, %rcx
leaq 0x1ea2f(%rip), %rdx     # 0x240a0
xorq (%rdx,%rcx,8), %rax
xorb $0x1, 0x6824(%rip)      # 0xbea0
xorq 0x21add(%rip), %rax     # 0x27160
movq %rax, 0x6836(%rip)      # 0xbec0
retq
// File: /workspace/github_c_makefile_star2_O3/ArchLuke[P]YouSuck/Engine.c
// Function: StoreHashEntry
static void StoreHashEntry(S_BOARD *pos, const int move, int score, const int flags, const int depth) {
    int index = pos->posKey % pos->HashTable->numEntries;
    
    if( pos->HashTable->pTable[index].posKey == 0) {
        pos->HashTable->newWrite++;
    } else {
        pos->HashTable->overWrite++;
    }
    
    if(score > ISMATE) score += pos->ply;
        else if(score < -ISMATE) score -= pos->ply;
    
    pos->HashTable->pTable[index].move = move;
        pos->HashTable->pTable[index].posKey = pos->posKey;
    pos->HashTable->pTable[index].flags = flags;
    pos->HashTable->pTable[index].score = score;
    pos->HashTable->pTable[index].depth = depth;

}

// Assembly:
movl %edx, %r8d
movq 0x682b(%rip), %r9       # 0xbec0
movslq 0x12a84(%rip), %r10     # 0x18120
movq %r9, %rax
xorl %edx, %edx
divq %r10
movq 0x12a6d(%rip), %rax     # 0x18118
movslq %edx, %rdx
leaq (%rdx,%rdx,2), %rdx
cmpq $0x0, (%rax,%rdx,8)
je 0x56c1
incl 0x12a69(%rip)           # 0x18128
jmp 0x56c7
incl 0x12a5d(%rip)           # 0x18124
leaq (%rax,%rdx,8), %r10
cmpl $0x74f1, %esi           # imm = 0x74F1
jl 0x56db
addl 0x67d3(%rip), %esi      # 0xbeac
jmp 0x56e9
cmpl $0xffff8b0f, %esi       # imm = 0xFFFF8B0F
jg 0x56e9
subl 0x67c3(%rip), %esi      # 0xbeac
movl %edi, 0x8(%rax,%rdx,8)
movq %r9, (%r10)
movl %r8d, 0x14(%rax,%rdx,8)
movl %esi, 0xc(%rax,%rdx,8)
movl %ecx, 0x10(%rax,%rdx,8)
retq
// File: /workspace/github_c_makefile_star2_O3/ArchLuke[P]YouSuck/Engine.c
// Function: PopMove
static void PopMove(S_MOVELIST *list, int move)
{
    int counter;
    int index=-1;
    for(counter=0;counter<list->count; counter++)
    {
        if(move==list->moves[counter].move)
            index=counter;
    }
    if(index==-1)
        return;
    for(counter=index; counter<list->count-1; counter++)
    {
        list->moves[counter]=list->moves[counter+1];

    }
    list->count --;
    

}

// Assembly:
movslq 0x800(%rdi), %rax
testq %rax, %rax
jle 0x591a
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
xorl %edx, %edx
cmpl %esi, (%rdi,%rdx,8)
cmovel %edx, %ecx
incq %rdx
cmpq %rdx, %rax
jne 0x58d9
cmpl $-0x1, %ecx
je 0x591a
decl %eax
cmpl %eax, %ecx
jge 0x5914
movslq %ecx, %rcx
movq 0x8(%rdi,%rcx,8), %rax
movq %rax, (%rdi,%rcx,8)
leaq 0x1(%rcx), %rdx
movslq 0x800(%rdi), %rax
decq %rax
movq %rdx, %rcx
cmpq %rax, %rdx
jl 0x58f5
movl %eax, 0x800(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O3/ArchLuke[P]YouSuck/Engine.c
// Function: EvalCapture
static int EvalCapture(const S_BOARD *pos, const int capture, int pvMove)
{

    int fromsq, tosq, attackingSide, defendingSide, attackingPce, attackedPce, score;

    int attackers[MAXPIECES]={0};
    int defenders[MAXPIECES]={0};

    fromsq=FROMSQ(capture);
    tosq=TOSQ(capture);
    attackingPce=pos->pieces[fromsq];
    attackedPce=pos->pieces[tosq];
    attackingSide=PieceCol[attackingPce];
    defendingSide=attackingSide ^ 1;

    attackers[0]=fromsq;
    if(pvMove & MFLAGCAP)
    {
	int capturedSq=TOSQ(pvMove);
	if(capturedSq != tosq)
	{
		if((PieceVal[attackedPce])<PieceVal[CAPTURED(pvMove)])
			return FALSE;
	}	
    } 

    FillPieces(pos, attackers, attackingSide, tosq, fromsq);
    FillPieces(pos, defenders, defendingSide, tosq, NO_SQ);	

    score=PieceVal[attackedPce];

    for(int index=0;index<MAXPIECES;index++)
    {

	int attackerLocation=attackers[index];
	int defenderLocation=defenders[index];	

	if(index>0)
	{
		int captured=defenders[index-1];
		score += PieceVal[pos->pieces[captured]];
	}

	if(score<0)
		return FALSE;
	if(!attackerLocation)
		return FALSE;
	
	if(defenderLocation)
	{
		score -= PieceVal[pos->pieces[attackerLocation]];
	}
	if(score>=0)
		return TRUE;

    }
    return FALSE;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x58, %rsp
movl %edi, %ebx
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
xorl %eax, %eax
movq %rax, 0x50(%rsp)
movq %rax, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
movl %edi, %ecx
andl $0x7f, %ecx
shrl $0x7, %ebx
andl $0x7f, %ebx
leaq 0x6345(%rip), %r14      # 0xbca0
movslq (%r14,%rcx,4), %rax
movslq (%r14,%rbx,4), %r15
leaq 0x1a06(%rip), %rdx      # 0x7370
movl (%rdx,%rax,4), %edx
movl %ecx, 0x30(%rsp)
testl $0x7c000, %esi          # imm = 0x7C000
je 0x599e
movl %esi, %eax
shrl $0x7, %eax
andl $0x7f, %eax
cmpl %ebx, %eax
je 0x599e
leaq 0x1a24(%rip), %rdi      # 0x73b0
movl (%rdi,%r15,4), %r8d
shrl $0xc, %esi
andl $0x3c, %esi
xorl %eax, %eax
cmpl (%rsi,%rdi), %r8d
jl 0x5a11
movl %edx, %ebp
xorl $0x1, %ebp
leaq 0x30(%rsp), %rdi
movl %edx, %esi
movl %ebx, %edx
callq 0x5a1c
movq %rsp, %rdi
movl %ebp, %esi
movl %ebx, %edx
movl $0x63, %ecx
callq 0x5a1c
leaq 0x19e7(%rip), %rcx      # 0x73b0
movl (%rcx,%r15,4), %edx
xorl %esi, %esi
testq %rsi, %rsi
je 0x59e0
movslq -0x4(%rsp,%rsi,4), %rax
movslq (%r14,%rax,4), %rax
addl (%rcx,%rax,4), %edx
xorl %eax, %eax
testl %edx, %edx
js 0x5a11
movslq 0x30(%rsp,%rsi,4), %rdi
testl %edi, %edi
je 0x5a11
movl $0x1, %eax
cmpl $0x0, (%rsp,%rsi,4)
je 0x5a11
movslq (%r14,%rdi,4), %rdi
subl (%rcx,%rdi,4), %edx
jns 0x5a11
incq %rsi
movl $0x0, %eax
cmpq $0xa, %rsi
jne 0x59cf
addq $0x58, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/ArchLuke[P]YouSuck/Queen.c
// Function: EvalWhiteQueen
int EvalWhiteQueen(const S_BOARD *pos)
{
	int pceNum, sq, score=0;
	for(pceNum = 0; pceNum < pos->pceNum[wQ]; ++pceNum) {
		sq = pos->pList[wQ][pceNum];
		if(!(pos->pawns[BOTH] & FileBBMask[FilesBrd[sq]])) {
			score += QueenOpenFile;
		} 
	}	
	return score;

}

// Assembly:
movslq 0x23c(%rdi), %rcx
testq %rcx, %rcx
jle 0x5e3a
movq 0x1f0(%rdi), %rdx
xorl %esi, %esi
leaq 0x5ca4(%rip), %r8       # 0xbab0
leaq 0x1cead(%rip), %r9      # 0x22cc0
xorl %r10d, %r10d
movslq 0xc338(%rdi,%rsi,4), %rax
movslq (%r8,%rax,4), %r11
leal 0xa(%r10), %eax
testq %rdx, (%r9,%r11,8)
cmovnel %r10d, %eax
incq %rsi
movl %eax, %r10d
cmpq %rsi, %rcx
jne 0x5e16
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/ArchLuke[P]YouSuck/Queen.c
// Function: EvalBlackQueen
int EvalBlackQueen(const S_BOARD *pos)
{
	int pceNum, sq, score=0;
	for(pceNum = 0; pceNum < pos->pceNum[bQ]; ++pceNum) {
		sq = pos->pList[bQ][pceNum];
		if(!(pos->pawns[BOTH] & FileBBMask[FilesBrd[sq]])) {
			score += QueenOpenFile;
		} 
	}	
	return -score;
}

// Assembly:
movslq 0x254(%rdi), %rcx
testq %rcx, %rcx
jle 0x5e88
movq 0x1f0(%rdi), %rdx
xorl %esi, %esi
leaq 0x5c57(%rip), %r8       # 0xbab0
leaq 0x1ce60(%rip), %r9      # 0x22cc0
xorl %r10d, %r10d
movslq 0xc428(%rdi,%rsi,4), %rax
movslq (%r8,%rax,4), %r11
leal 0xa(%r10), %eax
testq %rdx, (%r9,%r11,8)
cmovnel %r10d, %eax
incq %rsi
movl %eax, %r10d
cmpq %rsi, %rcx
jne 0x5e63
jmp 0x5e8a
xorl %eax, %eax
negl %eax
retq
nopl (%rax)