LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/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 0x684e(%rip)            # 0xbeac
leaq 0x663b(%rip), %rcx      # 0xbca0
movq 0x6854(%rip), %rdi      # 0xbec0
movslq 0x683d(%rip), %rax      # 0xbeb0
leaq (%rax,%rax,2), %rdx
movq %rdi, 0x280(%rcx,%rdx,8)
movslq 0x681e(%rip), %rsi      # 0xbea4
cmpq $0x63, %rsi
je 0x569e
leaq 0x1ea0d(%rip), %r8      # 0x240a0
xorq (%r8,%rsi,8), %rdi
movq %rdi, 0x6822(%rip)      # 0xbec0
movl $0x0, 0x270(%rcx,%rdx,8)
movl 0x67f9(%rip), %edi      # 0xbea8
movl %edi, 0x27c(%rcx,%rdx,8)
movl %esi, 0x278(%rcx,%rdx,8)
movl 0x67f1(%rip), %esi      # 0xbeb4
movl %esi, 0x274(%rcx,%rdx,8)
movl $0x63, 0x67d0(%rip)     # 0xbea4
xorb $0x1, 0x67c5(%rip)      # 0xbea0
incl %eax
movl %eax, 0x67cd(%rip)      # 0xbeb0
movq 0x21a76(%rip), %rax     # 0x27160
xorq %rax, 0x67cf(%rip)      # 0xbec0
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x67b2(%rip), %xmm1     # 0xbeac
pcmpeqd %xmm0, %xmm0
paddd %xmm1, %xmm0
movq %xmm0, 0x67a2(%rip)     # 0xbeac
movslq 0x6793(%rip), %rax      # 0xbea4
cmpq $0x63, %rax
je 0x5729
leaq 0x1e982(%rip), %rcx     # 0x240a0
movq (%rcx,%rax,8), %rax
xorq %rax, 0x6797(%rip)      # 0xbec0
pshufd $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
movd %xmm0, %eax
cltq
leaq (%rax,%rax,2), %rax
leaq 0x6561(%rip), %rcx      # 0xbca0
movl 0x274(%rcx,%rax,8), %edx
movl %edx, 0x6768(%rip)      # 0xbeb4
movq 0x278(%rcx,%rax,8), %rax
movq %rax, 0x6749(%rip)      # 0xbea4
cmpl $0x63, %eax
je 0x5774
cltq
leaq 0x1e937(%rip), %rcx     # 0x240a0
movq (%rcx,%rax,8), %rax
xorq %rax, 0x674c(%rip)      # 0xbec0
xorb $0x1, 0x6725(%rip)      # 0xbea0
movq 0x219de(%rip), %rax     # 0x27160
xorq %rax, 0x6737(%rip)      # 0xbec0
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x672c(%rip), %r9       # 0xbec0
movslq 0x12985(%rip), %r10     # 0x18120
movq %r9, %rax
xorl %edx, %edx
divq %r10
movq 0x1296e(%rip), %rax     # 0x18118
movslq %edx, %rdx
leaq (%rdx,%rdx,2), %rdx
cmpq $0x0, (%rax,%rdx,8)
je 0x57c0
incl 0x1296a(%rip)           # 0x18128
jmp 0x57c6
incl 0x1295e(%rip)           # 0x18124
leaq (%rax,%rdx,8), %r10
cmpl $0x74f1, %esi           # imm = 0x74F1
jl 0x57da
addl 0x66d4(%rip), %esi      # 0xbeac
jmp 0x57e8
cmpl $0xffff8b0f, %esi       # imm = 0xFFFF8B0F
jg 0x57e8
subl 0x66c4(%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_O1/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), %rcx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testq %rcx, %rcx
jle 0x59e0
xorl %edx, %edx
cmpl %esi, (%rdi,%rdx,8)
cmovel %edx, %eax
incq %rdx
cmpq %rdx, %rcx
jne 0x59d2
cmpl $-0x1, %eax
je 0x5a18
movl 0x800(%rdi), %ecx
decl %ecx
cmpl %ecx, %eax
jge 0x5a12
cltq
movq 0x8(%rdi,%rax,8), %rcx
movq %rcx, (%rdi,%rax,8)
leaq 0x1(%rax), %rdx
movslq 0x800(%rdi), %rcx
decq %rcx
movq %rdx, %rax
cmpq %rcx, %rdx
jl 0x59f3
movl %ecx, 0x800(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r12
pushq %rbx
subq $0x60, %rsp
movl %edi, %r14d
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
xorl %ebx, %ebx
movq %rbx, 0x50(%rsp)
movq %rbx, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
movl %edi, %ecx
andl $0x7f, %ecx
shrl $0x7, %r14d
andl $0x7f, %r14d
leaq 0x6242(%rip), %r15      # 0xbca0
movslq (%r15,%rcx,4), %rax
movslq (%r15,%r14,4), %r12
leaq 0x1903(%rip), %rdx      # 0x7370
movl (%rdx,%rax,4), %eax
movl %ecx, 0x30(%rsp)
testl $0x7c000, %esi          # imm = 0x7C000
je 0x5aa3
movl %esi, %edx
shrl $0x7, %edx
andl $0x7f, %edx
cmpl %r14d, %edx
je 0x5aa3
leaq 0x1920(%rip), %rdx      # 0x73b0
movl (%rdx,%r12,4), %edi
shrl $0xc, %esi
andl $0x3c, %esi
cmpl (%rsi,%rdx), %edi
jl 0x5b25
movl %eax, %ebp
xorl $0x1, %ebp
leaq 0x30(%rsp), %rdi
movl %eax, %esi
movl %r14d, %edx
callq 0x5b36
movq %rsp, %rdi
movl %ebp, %esi
movl %r14d, %edx
movl $0x63, %ecx
callq 0x5b36
leaq 0x18e0(%rip), %rax      # 0x73b0
movl (%rax,%r12,4), %ecx
movl $0x1, %edx
xorl %esi, %esi
testq %rsi, %rsi
je 0x5aec
movslq -0x4(%rsp,%rsi,4), %rdi
movslq (%r15,%rdi,4), %rdi
addl (%rax,%rdi,4), %ecx
xorl %edi, %edi
testl %ecx, %ecx
js 0x5b15
movslq 0x30(%rsp,%rsi,4), %r8
testl %r8d, %r8d
je 0x5b15
cmpl $0x0, (%rsp,%rsi,4)
je 0x5b09
movslq (%r15,%r8,4), %rdi
subl (%rax,%rdi,4), %ecx
movl %ecx, %edi
shrl $0x1f, %edi
testl %ecx, %ecx
cmovnsl %edx, %ebx
jmp 0x5b17
xorl %ebx, %ebx
testb %dil, %dil
je 0x5b27
incq %rsi
cmpq $0xa, %rsi
jne 0x5adb
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x5f26
movq 0x1f0(%rdi), %rdx
xorl %esi, %esi
leaq 0x5bb8(%rip), %r8       # 0xbab0
leaq 0x1cdc1(%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 0x5f02
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x5f74
movq 0x1f0(%rdi), %rdx
xorl %esi, %esi
leaq 0x5b6b(%rip), %r8       # 0xbab0
leaq 0x1cd74(%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 0x5f4f
jmp 0x5f76
xorl %eax, %eax
negl %eax
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/ArchLuke[P]YouSuck/Knight.c
// Function: EvalWhiteKnight
int EvalWhiteKnight(const S_BOARD *pos)
{

	int pceNum, index, sq, sq64, score=0;
	//loop through all the knights
	for(pceNum = 0; pceNum < pos->pceNum[wN]; ++pceNum) {
		sq = pos->pList[wN][pceNum];
		sq64=SQ64(sq);
//knight mobility
		//knight center control check
		score += KnightTable[sq64];
		//knight mobility check
		
		int squares=KnightMobility[sq64]-
			CountBits(WhiteKnightMobilityMask[sq64] & pos->pawns[BLACK]);
		score += (knightMobility*squares);
//knight outpost using bitmasks
		 //the knight needs to be in the enemy half of the board
		if(RanksBrd[sq]>RANK_4)
		{
			//no opposing black pawns to push the knight away, and the knight is supported by a white pawn
			if((pos->pawns[BLACK] & WhiteOutpostMask[sq64])==0 && 
			((WhitePawnSupportMask[sq64] & pos->pawns[WHITE]) != 0))
			{
				//add bonus to this knight for having an outpost
				score += outpost;
			}
		}

				
		
	}
	return score;
}

// Assembly:
cmpl $0x0, 0x230(%rdi)
jle 0x6045
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
xorl %eax, %eax
movslq 0xc2c0(%rbx,%r14,4), %r13
leaq 0x5925(%rip), %rcx      # 0xb8d0
movslq (%rcx,%r13,4), %r12
movl %eax, %ebp
leaq 0x20b8(%rip), %rax      # 0x8070
addl (%rax,%r12,4), %ebp
leaq 0x1bffd(%rip), %rax     # 0x21fc0
movl (%rax,%r12,4), %r15d
movq 0x1e8(%rbx), %rdi
leaq 0x1d16b(%rip), %rax     # 0x23140
andq (%rax,%r12,8), %rdi
callq 0x125c
subl %eax, %r15d
leal (%r15,%r15,2), %eax
addl %ebp, %eax
leaq 0x1de52(%rip), %rcx     # 0x23e40
cmpl $0x4, (%rcx,%r13,4)
jl 0x6023
leaq 0x1d344(%rip), %rcx     # 0x23340
movq (%rcx,%r12,8), %rcx
testq %rcx, 0x1e8(%rbx)
jne 0x6023
movq 0x1e0(%rbx), %rcx
leaq 0x1d729(%rip), %rdx     # 0x23740
testq %rcx, (%rdx,%r12,8)
leal 0xf(%rax), %ecx
cmovel %eax, %ecx
movl %ecx, %eax
incq %r14
movslq 0x230(%rbx), %rcx
cmpq %rcx, %r14
jl 0x5f9c
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/ArchLuke[P]YouSuck/Knight.c
// Function: EvalBlackKnight
int EvalBlackKnight(const S_BOARD *pos)
{
	int pceNum, index, sq, sq64, score=0;
//loop through all the knights
	for(pceNum = 0; pceNum < pos->pceNum[bN]; ++pceNum) {
		sq = pos->pList[bN][pceNum];
		sq64=SQ64(sq);
//knight mobility
		//knight center control check
		score += KnightTable[sq64];
		//knight mobility check
		
		int squares=KnightMobility[sq64]-
			CountBits(BlackKnightMobilityMask[sq64] & pos->pawns[WHITE]);
		score += (knightMobility*squares);	
//knight outpost using bitmasks
		 //the knight needs to be in the enemy half of the board
		if(RanksBrd[sq]<RANK_5)
		{
			//no opposing black pawns to push the knight away, and the knight is supported by a white pawn
			if((pos->pawns[WHITE] & BlackOutpostMask[sq64])==0 && 
			((BlackPawnSupportMask[sq64] & pos->pawns[BLACK]) != 0))
			{
				//add bonus to this knight for having an outpost
				score += outpost;
			}
		}

				
		
	}
	return -score;
}

// Assembly:
cmpl $0x0, 0x248(%rdi)
jle 0x6112
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
xorl %eax, %eax
movslq 0xc3b0(%rbx,%r14,4), %r13
leaq 0x5859(%rip), %rcx      # 0xb8d0
movslq (%rcx,%r13,4), %r12
movl %eax, %ebp
leaq 0x1fec(%rip), %rax      # 0x8070
addl (%rax,%r12,4), %ebp
leaq 0x1bf31(%rip), %rax     # 0x21fc0
movl (%rax,%r12,4), %r15d
movq 0x1e0(%rbx), %rdi
leaq 0x1c21f(%rip), %rax     # 0x222c0
andq (%rax,%r12,8), %rdi
callq 0x125c
subl %eax, %r15d
leal (%r15,%r15,2), %eax
addl %ebp, %eax
leaq 0x1dd86(%rip), %rcx     # 0x23e40
cmpl $0x3, (%rcx,%r13,4)
jg 0x60ef
leaq 0x1c3f8(%rip), %rcx     # 0x224c0
movq (%rcx,%r12,8), %rcx
testq %rcx, 0x1e0(%rbx)
jne 0x60ef
movq 0x1e8(%rbx), %rcx
leaq 0x1c7dd(%rip), %rdx     # 0x228c0
testq %rcx, (%rdx,%r12,8)
leal 0xf(%rax), %ecx
cmovel %eax, %ecx
movl %ecx, %eax
incq %r14
movslq 0x248(%rbx), %rcx
cmpq %rcx, %r14
jl 0x6068
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6114
xorl %eax, %eax
negl %eax
retq
nop
// File: /workspace/github_c_makefile_star2_O1/ArchLuke[P]YouSuck/Bishop.c
// Function: EvalWhiteBishop
int EvalWhiteBishop(const S_BOARD *pos)
{
	int pceNum;
	int sq;
	int index;
	int score=0;
//loop through all the white bishops
	for(pceNum = 0; pceNum < pos->pceNum[wB]; ++pceNum) {
		int mobility=7;
		sq = pos->pList[wB][pceNum];
		int sq64=SQ64(sq);
//the bishop should be on diagonals that control the center
		score += BishopTable[sq64];
		
		//check the diagonal influences
		U64 mask=WhiteBishopForwardMask[sq64][0] & pos->pawns[BOTH];	
		if(mask)
		{
			//int square=(63-__builtin_ctzll(mask));
			int square=FindBit(mask);
			mobility -= (WhiteMaxDiagonalDistance[sq64][0]-DiagonalDistance[sq][square]);
				
		}
 
		U64 mask2=WhiteBishopForwardMask[sq64][1] & pos->pawns[BOTH];		
		if(mask2)
		{
			//int square=(63-__builtin_ctzll(mask));
			int square=FindBit(mask2);
			mobility -= (WhiteMaxDiagonalDistance[sq64][1]-DiagonalDistance[sq64][square]);
		}
		score += mobility * bishopMobility;
		
				
	}
	//bishop pair
	if(pos->pceNum[wB]>1)
		score += BishopPair;

	return score;	
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpl $0x0, 0x234(%rdi)
jle 0x61fd
movq %rdi, %rbx
xorl %r15d, %r15d
xorl %r14d, %r14d
movslq 0xc2e8(%rbx,%r15,4), %r13
leaq 0x5788(%rip), %rax      # 0xb8d0
movslq (%rax,%r13,4), %rbp
leaq 0x202d(%rip), %rax      # 0x8180
addl (%rax,%rbp,4), %r14d
movq %rbp, %r12
shlq $0x4, %r12
movq 0x1f0(%rbx), %rdi
leaq 0x5354(%rip), %rax      # 0xb4c0
andq (%rax,%r12), %rdi
je 0x619a
callq 0x126f
cltq
shlq $0x8, %r13
addq 0x4e4c(%rip), %r13      # 0xafd0
movl (%r13,%rax,4), %r13d
leaq 0x1bf30(%rip), %rax     # 0x220c0
subl (%rax,%rbp,8), %r13d
addl $0x7, %r13d
jmp 0x61a0
movl $0x7, %r13d
addq 0x4e31(%rip), %r12      # 0xafd8
movq 0x1f0(%rbx), %rdi
andq 0x8(%r12), %rdi
je 0x61da
callq 0x126f
cltq
movq %rbp, %rcx
shlq $0x8, %rcx
addq 0x4e06(%rip), %rcx      # 0xafd0
leaq 0x1beef(%rip), %rdx     # 0x220c0
subl 0x4(%rdx,%rbp,8), %r13d
addl (%rcx,%rax,4), %r13d
leal (%r13,%r13,2), %eax
addl %eax, %r14d
incq %r15
movslq 0x234(%rbx), %rax
cmpq %rax, %r15
jl 0x6139
cmpl $0x2, %eax
setge %cl
jmp 0x6202
xorl %r14d, %r14d
xorl %ecx, %ecx
leal 0xa(%r14), %eax
testb %cl, %cl
cmovel %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ArchLuke[P]YouSuck/Bishop.c
// Function: EvalBlackBishop
int EvalBlackBishop(const S_BOARD *pos)
{
	int pceNum;
	int sq;
	int index;
	int score=0;

//loop through all the black bishops
	for(pceNum = 0; pceNum < pos->pceNum[bB]; ++pceNum) {
		int mobility=7;
		sq = pos->pList[bB][pceNum];
		int sq64=SQ64(sq);
//the bishop should be on diagonals that control the center
		score += BishopTable[sq64];
		
		//check the diagonal influences
		U64 mask=BlackBishopForwardMask[sq64][0] & pos->pawns[BOTH];
		if(mask)
		{
		//	int square=FindBit(mask2);
			int square=(63-__builtin_clzll(mask));

			mobility -= (BlackMaxDiagonalDistance[sq64][0]-DiagonalDistance[square][sq64]);
				
		}

		U64 mask2=BlackBishopForwardMask[sq64][1] & pos->pawns[BOTH];		

		if(mask2)
		{
		//	int square=FindBit(mask2);
			int square=(63-__builtin_clzll(mask2));
			mobility -= (BlackMaxDiagonalDistance[sq64][1]-DiagonalDistance[square][sq64]);
				
		}

		score += mobility * bishopMobility;				
	}
	//bishop pair
	if(pos->pceNum[bB]>1)
		score += BishopPair;
	
	return -score;	

}

// Assembly:
movslq 0x24c(%rdi), %rcx
testq %rcx, %rcx
jle 0x62d9
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0x1f0(%rdi), %rax
xorl %esi, %esi
leaq 0x568d(%rip), %r8       # 0xb8d0
leaq 0x1f36(%rip), %r9       # 0x8180
leaq 0x4e6f(%rip), %r10      # 0xb0c0
leaq 0x13a68(%rip), %r11     # 0x19cc0
leaq 0x13d61(%rip), %rbx     # 0x19fc0
xorl %edx, %edx
movslq 0xc3d8(%rdi,%rsi,4), %r14
movslq (%r8,%r14,4), %r14
movq %r14, %r12
shlq $0x4, %r12
movq (%r10,%r12), %r15
andq %rax, %r15
je 0x6296
bsrq %r15, %r15
shll $0x8, %r15d
addq %rbx, %r15
movl (%r15,%r14,4), %r15d
subl (%r11,%r14,8), %r15d
addl $0x7, %r15d
jmp 0x629c
movl $0x7, %r15d
addq %r10, %r12
movq 0x8(%r12), %r12
andq %rax, %r12
je 0x62bd
bsrq %r12, %r12
shll $0x8, %r12d
addq %rbx, %r12
subl 0x4(%r11,%r14,8), %r15d
addl (%r12,%r14,4), %r15d
addl (%r9,%r14,4), %edx
leal (%r15,%r15,2), %ebp
addl %ebp, %edx
incq %rsi
cmpq %rsi, %rcx
jne 0x6261
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x62db
xorl %edx, %edx
leal 0xa(%rdx), %eax
cmpl $0x2, %ecx
cmovll %edx, %eax
negl %eax
retq
nop
// File: /workspace/github_c_makefile_star2_O1/ArchLuke[P]YouSuck/Rook.c
// Function: EvalWhiteRook
int EvalWhiteRook(const S_BOARD *pos)
{
	int pceNum, sq, score=0;
	for(pceNum = 0; pceNum < pos->pceNum[wR]; ++pceNum) {
		sq = pos->pList[wR][pceNum];
		score += RookTable[SQ64(sq)];
		if(!(pos->pawns[BOTH] & FileBBMask[FilesBrd[sq]])) {
			score += RookOpenFile;
		} else if(!(pos->pawns[WHITE] & FileBBMask[FilesBrd[sq]])) {
			score += RookSemiOpenFile;
		}
	}	
	return score;
}

// Assembly:
movslq 0x238(%rdi), %rcx
testq %rcx, %rcx
jle 0x635b
pushq %r14
pushq %rbx
movq 0x1f0(%rdi), %rdx
xorl %esi, %esi
leaq 0x55c9(%rip), %r8       # 0xb8d0
leaq 0x1f82(%rip), %r9       # 0x8290
leaq 0x579b(%rip), %r10      # 0xbab0
leaq 0x1c9a4(%rip), %r11     # 0x22cc0
xorl %eax, %eax
movslq 0xc310(%rdi,%rsi,4), %rbx
movslq (%r8,%rbx,4), %r14
addl (%r9,%r14,4), %eax
movslq (%r10,%rbx,4), %rbx
movq (%r11,%rbx,8), %rbx
testq %rdx, %rbx
je 0x634c
testq %rbx, 0x1e0(%rdi)
leal 0xa(%rax), %ebx
cmovnel %eax, %ebx
movl %ebx, %eax
jmp 0x634f
addl $0xf, %eax
incq %rsi
cmpq %rsi, %rcx
jne 0x631e
popq %rbx
popq %r14
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/ArchLuke[P]YouSuck/Rook.c
// Function: EvalBlackRook
int EvalBlackRook(const S_BOARD *pos)
{
	int pceNum, sq, score=0;
	for(pceNum = 0; pceNum < pos->pceNum[bR]; ++pceNum) {
		sq = pos->pList[bR][pceNum];
		score += RookTable[MIRROR64(SQ64(sq))];
		if(!(pos->pawns[BOTH] & FileBBMask[FilesBrd[sq]])) {
			score += RookOpenFile;
		} else if(!(pos->pawns[BLACK] & FileBBMask[FilesBrd[sq]])) {
			score += RookSemiOpenFile;
		}
	}	
	return -score;
}

// Assembly:
movslq 0x250(%rdi), %rcx
testq %rcx, %rcx
jle 0x63e3
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
movq 0x1f0(%rdi), %rdx
xorl %esi, %esi
leaq 0x5550(%rip), %r8       # 0xb8d0
leaq 0xee9(%rip), %r9        # 0x7270
leaq 0x1f02(%rip), %r10      # 0x8290
leaq 0x571b(%rip), %r11      # 0xbab0
leaq 0x1c924(%rip), %rbx     # 0x22cc0
xorl %eax, %eax
movslq 0xc400(%rdi,%rsi,4), %r14
movslq (%r8,%r14,4), %r15
movslq (%r9,%r15,4), %r15
addl (%r10,%r15,4), %eax
movslq (%r11,%r14,4), %r14
movq (%rbx,%r14,8), %r14
testq %rdx, %r14
je 0x63d0
testq %r14, 0x1e8(%rdi)
leal 0xa(%rax), %ebp
cmovnel %eax, %ebp
movl %ebp, %eax
jmp 0x63d3
addl $0xf, %eax
incq %rsi
cmpq %rsi, %rcx
jne 0x639e
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x63e5
xorl %eax, %eax
negl %eax
retq
// File: /workspace/github_c_makefile_star2_O1/ArchLuke[P]YouSuck/Pawn.c
// Function: EvalWhitePawns
int EvalWhitePawns(const S_BOARD *pos)
{
	int pceNum, sq, score=0;
	for(pceNum = 0; pceNum < pos->pceNum[wP]; ++pceNum) {
		sq = pos->pList[wP][pceNum];
		score += PawnTable[SQ64(sq)];	
		
		if( (IsolatedMask[SQ64(sq)] & pos->pawns[WHITE]) == 0) {
			score += PawnIsolated;
		}
		
		if( (WhitePassedMask[SQ64(sq)] & pos->pawns[BLACK]) == 0) {
			score += PawnPassed[RanksBrd[sq]];
		}
		if( (DoubledPawnsMask[SQ64(sq)] & pos->pawns[WHITE]) !=0) {
			score += PawnDoubled;
		}
			
	}
	return score;
}

// Assembly:
movslq 0x22c(%rdi), %rcx
testq %rcx, %rcx
jle 0x6491
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq 0x1e0(%rdi), %rdx
movq 0x1e8(%rdi), %rsi
xorl %r8d, %r8d
leaq 0x54b6(%rip), %r9       # 0xb8d0
leaq 0x1f9f(%rip), %r10      # 0x83c0
leaq 0x1c8d8(%rip), %r11     # 0x22d00
leaq 0x1d111(%rip), %rbx     # 0x23540
leaq 0x1c68a(%rip), %r12     # 0x22ac0
xorl %eax, %eax
movslq 0xc298(%rdi,%r8,4), %r14
movslq (%r9,%r14,4), %r13
movl (%r10,%r13,4), %ebp
leal (%rax,%rbp), %r15d
testq %rdx, (%r11,%r13,8)
leal -0xf(%rbp,%rax), %ebp
cmovnel %r15d, %ebp
testq %rsi, (%rbx,%r13,8)
jne 0x6474
leaq 0x1d9db(%rip), %rax     # 0x23e40
movslq (%rax,%r14,4), %rax
leaq 0x1f30(%rip), %r14      # 0x83a0
addl (%r14,%rax,4), %ebp
leal -0xa(%rbp), %eax
testq %rdx, (%r12,%r13,8)
cmovel %ebp, %eax
incq %r8
cmpq %r8, %rcx
jne 0x6438
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/ArchLuke[P]YouSuck/Pawn.c
// Function: EvalBlackPawns
int EvalBlackPawns(const S_BOARD *pos)
{
	int pceNum, sq, score=0;
	for(pceNum = 0; pceNum < pos->pceNum[bP]; ++pceNum) {
		sq = pos->pList[bP][pceNum];
	
		score += PawnTable[MIRROR64(SQ64(sq))];	
		
		if( (IsolatedMask[SQ64(sq)] & pos->pawns[BLACK]) == 0) {
			score += PawnIsolated;
		}
		
		if( (BlackPassedMask[SQ64(sq)] & pos->pawns[WHITE]) == 0) {
			score += PawnPassed[7 - RanksBrd[sq]];
		}

		if( (DoubledPawnsMask[SQ64(sq)] & pos->pawns[BLACK]) !=0) {
			score += PawnDoubled;
		}
	}
	return -score;
}

// Assembly:
movslq 0x244(%rdi), %rcx
testq %rcx, %rcx
jle 0x6556
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq 0x1e0(%rdi), %rdx
movq 0x1e8(%rdi), %rsi
xorl %r8d, %r8d
leaq 0xdaa(%rip), %r10       # 0x7270
leaq 0x1ef3(%rip), %r11      # 0x83c0
leaq 0x1c82c(%rip), %rbx     # 0x22d00
leaq 0x1c1e5(%rip), %r14     # 0x226c0
leaq 0x1c5de(%rip), %r13     # 0x22ac0
xorl %eax, %eax
movslq 0xc388(%rdi,%r8,4), %r12
leaq 0x53dd(%rip), %r9       # 0xb8d0
movslq (%r9,%r12,4), %rbp
movslq (%r10,%rbp,4), %r15
movl (%r11,%r15,4), %r15d
leal (%r15,%rax), %r9d
testq %rsi, (%rbx,%rbp,8)
leal -0xf(%r15,%rax), %r15d
cmovnel %r9d, %r15d
testq %rdx, (%r14,%rbp,8)
jne 0x6535
leaq 0x1d923(%rip), %rax     # 0x23e40
movslq (%rax,%r12,4), %rax
movl $0x7, %r9d
subq %rax, %r9
leaq 0x1e6f(%rip), %rax      # 0x83a0
addl (%rax,%r9,4), %r15d
leal -0xa(%r15), %eax
testq %rsi, (%r13,%rbp,8)
cmovel %r15d, %eax
incq %r8
cmpq %r8, %rcx
jne 0x64e4
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6558
xorl %eax, %eax
negl %eax
retq
nop
// File: /workspace/github_c_makefile_star2_O1/c-zhou[P]yahs/sdict.c
// Function: write_fasta_file_from_agp
void write_fasta_file_from_agp(const char *fa, const char *agp, FILE *fo, int line_wd, int allow_unknown_oris)
{
    sdict_t *sdict = make_sdict_from_fa(fa, 0);
    asm_dict_t *dict = make_asm_dict_from_agp(sdict, agp, allow_unknown_oris);
    uint64_t len = write_asm_dict_to_fasta(dict, line_wd, fo);
    fprintf(stderr, "[I::%s] Number sequences: %u\n", __func__, dict->n);
    fprintf(stderr, "[I::%s] Number bases: %lu\n", __func__, len);
    asm_destroy(dict);
    sd_destroy(sdict);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %ebp
movl %ecx, %r15d
movq %rdx, %r12
movq %rsi, %r14
xorl %esi, %esi
callq 0x48bc
movq %rax, %rbx
movq %rax, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x578c
movq %rax, %r14
movq %rax, %rdi
movl %r15d, %esi
movq %r12, %rdx
callq 0x8467
movq %rax, %r15
movq 0xbac6(%rip), %r13      # 0xdff0
movq (%r13), %rdi
movl (%r14), %ecx
leaq 0x83de(%rip), %rsi      # 0xa916
leaq 0x83f5(%rip), %r12      # 0xa934
movq %r12, %rdx
xorl %eax, %eax
callq 0x2200
movq (%r13), %rdi
leaq 0x83fa(%rip), %rsi      # 0xa94e
movq %r12, %rdx
movq %r15, %rcx
xorl %eax, %eax
callq 0x2200
movq %r14, %rdi
callq 0x4310
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4274
// File: /workspace/github_c_makefile_star2_O1/c-zhou[P]yahs/asset.c
// Function: ram_limit
void ram_limit(long *total, long *avail)
{
    long t, a, a1;
    struct rlimit lim;
    getrlimit(RLIMIT_RSS, &lim);
    a = lim.rlim_cur;
    getrlimit(RLIMIT_AS, &lim);
    a = MAX(a, (long) lim.rlim_cur);
    // a1 = (long) (sysconf(_SC_AVPHYS_PAGES) * sysconf(_SC_PAGESIZE));
    a1 = physmem_avail();
    a = a > 0? MIN(a, a1) : a1;
    // t = sysconf(_SC_PHYS_PAGES) * sysconf(_SC_PAGESIZE);
    t = physmem_total();
    *avail = a;
    *total = t;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rsp), %r15
movl $0x5, %edi
movq %r15, %rsi
callq 0x2390
movq (%r15), %r12
movl $0x9, %edi
movq %r15, %rsi
callq 0x2390
movq (%r15), %r13
cmpq %r13, %r12
cmovgq %r12, %r13
movl $0x56, %edi
callq 0x22f0
movq %rax, %r15
movl $0x1e, %edi
callq 0x22f0
movq %rax, %rcx
imulq %r15, %rcx
xorl %r12d, %r12d
orq %rax, %r15
cmovsq %r12, %rcx
cmpq %rcx, %r13
movq %rcx, %rbp
cmovlq %r13, %rbp
testq %r13, %r13
cmovleq %rcx, %rbp
movl $0x55, %edi
callq 0x22f0
movq %rax, %r15
movl $0x1e, %edi
callq 0x22f0
movq %rax, %rcx
imulq %r15, %rcx
orq %rax, %r15
cmovsq %r12, %rcx
movq %rbp, (%r14)
movq %rcx, (%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/c-zhou[P]yahs/asset.c
// Function: file_copy
int file_copy(char *fin, char *fout)
{
    FILE *fptr1, *fptr2;
    int c;
    fptr1 = fopen(fin, "r");
    fptr2 = fopen(fout, "w");
    c = fgetc(fptr1);
    while (c != EOF) {
        fputc(c, fptr2);
        c = fgetc(fptr1);
    }
    fclose(fptr1);
    fclose(fptr2);
    return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
leaq 0x804c(%rip), %rsi      # 0xab6a
callq 0x22c0
movq %rax, %rbx
leaq 0x74e3(%rip), %rsi      # 0xa010
movq %r14, %rdi
callq 0x22c0
movq %rax, %r14
movq %rbx, %rdi
callq 0x2170
cmpl $-0x1, %eax
je 0x2b51
movl %eax, %edi
movq %r14, %rsi
callq 0x21a0
jmp 0x2b38
movq %rbx, %rdi
callq 0x2100
movq %r14, %rdi
callq 0x2100
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/c-zhou[P]yahs/asset.c
// Function: is_read_pair
int8_t is_read_pair(const char *rname0, const char *rname1)
{
    int n = strlen(rname0);
    if (n == 0 || n != strlen(rname1))
          return 0;
    if (!strcmp(rname0, rname1) || 
            (n > 2 &&
             !strncmp(rname0, rname1, n - 1) &&
             rname0[n - 2] == '/' &&
             rname1[n - 2] == '/' &&
             rname0[n - 1] != rname1[n - 1]))
        return 1;
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
callq 0x2110
movq %rax, %r15
testl %r15d, %r15d
je 0x2be4
movslq %r15d, %r12
movq %rbx, %rdi
callq 0x2110
cmpq %rax, %r12
jne 0x2be4
movq %r14, %rdi
movq %rbx, %rsi
callq 0x21e0
movb $0x1, %bpl
testl %eax, %eax
je 0x2be6
cmpl $0x3, %r15d
jl 0x2be4
leal -0x1(%r15), %r12d
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x2090
testl %eax, %eax
jne 0x2be4
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
addl %eax, %r15d
cmpb $0x2f, (%r14,%r15)
jne 0x2be4
cmpb $0x2f, (%rbx,%r15)
jne 0x2be4
movb (%r14,%r12), %al
cmpb (%rbx,%r12), %al
jne 0x2be6
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/c-zhou[P]yahs/asset.c
// Function: linear_scale
uint64_t linear_scale(uint64_t g, int *scale, uint64_t max_g)
{
    int s;
    s = 0;
    while (g > max_g) {
        ++s;
        g >>= 1;
    }
    
    *scale = s;
    return g;
}

// Assembly:
movq %rdi, %rax
xorl %ecx, %ecx
cmpq %rdx, %rdi
jbe 0x2c46
xorl %ecx, %ecx
incl %ecx
shrq %rax
cmpq %rdx, %rax
ja 0x2c3c
movl %ecx, (%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/c-zhou[P]yahs/asset.c
// Function: is_empty_line
int is_empty_line(char *line)
{
    while (isspace(*line))
        line++;
    if(*line == '\0')
        return 1;
    return 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x23e0
movq (%rax), %rax
movsbq (%rbx), %rcx
incq %rbx
testb $0x20, 0x1(%rax,%rcx,2)
jne 0x2d00
xorl %eax, %eax
testb %cl, %cl
sete %al
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/c-zhou[P]yahs/asset.c
// Function: iostream_open
iostream_t *iostream_open(const char *spath)
{
    iostream_t *iostream;
    iostream = (iostream_t *) calloc(1, sizeof(iostream_t));
    if (iostream == NULL)
        return NULL;
    iostream->koaux = kopen(spath, &iostream->fd);
    if (iostream->koaux == 0) {
        free(iostream);
        return NULL;
    }
    iostream->fp = gzdopen(iostream->fd, "r");
    if (iostream->fp == Z_NULL) {
        kclose(iostream->koaux);
        free(iostream);
        return NULL;
    }
    iostream->stream = ks_init(iostream->fp);
    iostream->buffer = kstring_init(BUFF_SIZE);

    return iostream;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
movl $0x1, %edi
movl $0x30, %esi
callq 0x21d0
testq %rax, %rax
je 0x2de2
movq %rax, %rbx
movq %r14, %rdi
movq %rax, %rsi
callq 0x3408
movq %rax, 0x20(%rbx)
testq %rax, %rax
je 0x2dda
movl (%rbx), %edi
leaq 0x7e0f(%rip), %rsi      # 0xab6a
callq 0x20f0
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x2dd1
movq %rax, %r14
movl $0x1, %edi
movl $0x20, %esi
callq 0x21d0
movq %rax, %r15
movq %r14, 0x10(%rax)
movl 0x8(%rax), %eax
andl $0x3, %eax
orl $0x4000, %eax           # imm = 0x4000
movl %eax, 0x8(%r15)
movl $0x1000, %edi           # imm = 0x1000
callq 0x2250
movq %rax, 0x18(%r15)
movq %r15, 0x10(%rbx)
movl $0x1, %edi
movl $0x18, %esi
callq 0x21d0
movq %rax, %r14
movq $0x1000, 0x8(%rax)      # imm = 0x1000
movl $0x1000, %edi           # imm = 0x1000
callq 0x2250
movq %rax, 0x10(%r14)
movq %r14, 0x18(%rbx)
jmp 0x2de4
movq 0x20(%rbx), %rdi
callq 0x3e07
movq %rbx, %rdi
callq 0x2050
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/c-zhou[P]yahs/asset.c
// Function: iostream_close
void iostream_close(iostream_t *iostream)
{
    if (!iostream) return;
    ks_destroy(iostream->stream);
    kstring_destroy(iostream->buffer);
    gzclose(iostream->fp);
    kclose(iostream->koaux);
    free(iostream);
}

// Assembly:
testq %rdi, %rdi
je 0x2e4e
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rdi), %r14
testq %r14, %r14
je 0x2e13
movq 0x18(%r14), %rdi
callq 0x2050
movq %r14, %rdi
callq 0x2050
movq 0x18(%rbx), %r14
testq %r14, %r14
je 0x2e2d
movq 0x10(%r14), %rdi
callq 0x2050
movq %r14, %rdi
callq 0x2050
movq 0x8(%rbx), %rdi
callq 0x2040
movq 0x20(%rbx), %rdi
callq 0x3e07
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2050
retq
// File: /workspace/github_c_makefile_star2_O1/c-zhou[P]yahs/asset.c
// Function: iostream_getline
char *iostream_getline(iostream_t *iostream)
{
    int len;
    kstring_t *buffer;
    buffer = (kstring_t *) (iostream->buffer);
    len = ks_getuntil(iostream->stream, KS_SEP_LINE, buffer, 0);
    if (len >= 0) {
        iostream->nline += 1;
        return buffer->s;
    }
    return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %r15
movq 0x18(%rdi), %r14
movq $0x0, (%r14)
movl (%r15), %eax
cmpl 0x4(%r15), %eax
jl 0x2e7e
testb $0x3, 0x8(%r15)
jne 0x2ff8
movl (%r15), %eax
cmpl 0x4(%r15), %eax
jl 0x2ecd
movl 0x8(%r15), %edx
testb $0x3, %dl
jne 0x2fa0
movl $0x0, (%r15)
movq 0x10(%r15), %rdi
movq 0x18(%r15), %rsi
sarl $0x2, %edx
callq 0x21f0
movl %eax, 0x4(%r15)
movl 0x8(%r15), %ecx
movl %ecx, %edx
sarl $0x2, %edx
cmpl %edx, %eax
jge 0x2ec5
andl $-0x4, %ecx
incl %ecx
movl %ecx, 0x8(%r15)
testl %eax, %eax
je 0x2fa0
movl (%r15), %eax
movl 0x4(%r15), %ecx
movl %eax, %r12d
cmpl %ecx, %eax
jge 0x2ef8
movslq %eax, %rdx
addq 0x18(%r15), %rdx
movl %eax, %r12d
cmpb $0xa, (%rdx)
je 0x2ef8
incl %r12d
incq %rdx
cmpl %r12d, %ecx
jne 0x2ee5
movl %ecx, %r12d
movq (%r14), %rcx
movq 0x8(%r14), %rsi
subq %rcx, %rsi
movl %r12d, %edx
subl %eax, %edx
leal 0x1(%rdx), %eax
cltq
cmpq %rax, %rsi
jae 0x2f66
movslq %edx, %rax
addq %rax, %rcx
movq %rcx, %rax
shrq %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x2, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x4, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x8, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x10, %rax
orq %rcx, %rax
movq %rax, %rsi
shrq $0x20, %rsi
orq %rax, %rsi
incq %rsi
movq %rsi, 0x8(%r14)
movq 0x10(%r14), %rdi
callq 0x2290
movq %rax, 0x10(%r14)
movq 0x10(%r14), %rdi
addq (%r14), %rdi
movslq (%r15), %rax
movq 0x18(%r15), %rsi
addq %rax, %rsi
movslq %r12d, %r13
movq %r13, %rdx
subq %rax, %rdx
callq 0x2220
movslq (%r15), %rax
subq %rax, %r13
addq %r13, (%r14)
leal 0x1(%r12), %eax
movl %eax, (%r15)
cmpl 0x4(%r15), %r12d
jge 0x2e7e
movq 0x10(%r14), %rcx
testq %rcx, %rcx
je 0x2fc1
movq (%r14), %rax
cmpq $0x2, %rax
jb 0x2fdc
cmpb $0xd, -0x1(%rcx,%rax)
jne 0x2fdc
decq %rax
movq %rax, (%r14)
jmp 0x2fdc
movq $0x1, 0x8(%r14)
movl $0x1, %edi
movl $0x1, %esi
callq 0x21d0
movq %rax, 0x10(%r14)
movq (%r14), %rax
movq 0x10(%r14), %rcx
movb $0x0, (%rcx,%rax)
testb $-0x80, 0x3(%r14)
jne 0x2ff8
incq 0x28(%rbx)
movq 0x10(%r14), %rax
jmp 0x2ffa
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/c-zhou[P]yahs/kalloc.c
// Function: km_init2
void *km_init2(void *km_par, size_t min_core_size)
{
	kmem_t *km;
	km = (kmem_t*)kcalloc(km_par, 1, sizeof(kmem_t));
	km->par = km_par;
	km->min_core_size = min_core_size > 0? min_core_size : 0x80000;
	return (void*)km;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl $0x1, %esi
movl $0x30, %edx
callq 0x3038
movq %r14, (%rax)
testq %rbx, %rbx
movl $0x80000, %ecx          # imm = 0x80000
cmovneq %rbx, %rcx
movq %rcx, 0x8(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/c-zhou[P]yahs/sdict.c
// Function: sd_init
sdict_t *sd_init(void)
{
    sdict_t *d;
    d = (sdict_t *) calloc(1, sizeof(sdict_t));
    d->n = 0;
    d->m = 16;
    d->s = (sd_seq_t *) malloc(d->m * sizeof(sd_seq_t));
    d->h = kh_init(sdict);
    return d;
}

// Assembly:
pushq %rbx
movl $0x1, %edi
movl $0x18, %esi
callq 0x21d0
movq %rax, %rbx
movabsq $0x1000000000, %rax     # imm = 0x1000000000
movq %rax, (%rbx)
movl $0x180, %edi            # imm = 0x180
callq 0x2250
movq %rax, 0x8(%rbx)
movl $0x1, %esi
movl $0x28, %edx
xorl %edi, %edi
callq 0x3038
movq %rax, 0x10(%rbx)
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/c-zhou[P]yahs/sdict.c
// Function: asm_init
asm_dict_t *asm_init(sdict_t *sdict)
{
    asm_dict_t *d;
    d = (asm_dict_t *) calloc(1, sizeof(asm_dict_t));
    d->n = 0;
    d->m = 16;
    d->s = (sd_aseq_t *) malloc(d->m * sizeof(sd_aseq_t));
    d->h = kh_init(sdict);
    d->u = 0;
    d->v = 16;
    d->seg = (sd_seg_t *) malloc(d->v * sizeof(sd_seg_t));
    d->a = (uint64_t *) malloc(sdict->n * sizeof(uint64_t));
    d->index = 0;
    d->sdict = sdict;
    return d;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x1, %edi
movl $0x40, %esi
callq 0x21d0
movq %rax, %r14
movabsq $0x1000000000, %r15     # imm = 0x1000000000
movq %r15, (%rax)
movl $0x580, %edi            # imm = 0x580
callq 0x2250
movq %rax, 0x8(%r14)
movl $0x1, %esi
movl $0x28, %edx
xorl %edi, %edi
callq 0x3038
movq %rax, 0x10(%r14)
movq %r15, 0x18(%r14)
movl $0x300, %edi            # imm = 0x300
callq 0x2250
movq %rax, 0x20(%r14)
movl (%rbx), %edi
shlq $0x3, %rdi
callq 0x2250
movq %rax, 0x28(%r14)
movq $0x0, 0x30(%r14)
movq %rbx, 0x38(%r14)
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/c-zhou[P]yahs/sdict.c
// Function: sd_destroy
void sd_destroy(sdict_t *d)
{
    if (!d) return;
    uint32_t i;
    if (d == 0)
        return;
    if (d->h)
        kh_destroy(sdict, d->h);
    if(d->s) {
        for (i = 0; i < d->n; ++i) {
            free(d->s[i].name);
            if (d->s[i].seq)
                free(d->s[i].seq);
        }
        free(d->s);
    }
    free(d);
}

// Assembly:
testq %rdi, %rdi
je 0x430f
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %r14
testq %r14, %r14
je 0x42b9
movq 0x18(%r14), %rsi
xorl %edi, %edi
callq 0x30da
movq 0x10(%r14), %rsi
xorl %edi, %edi
callq 0x30da
movq 0x20(%r14), %rsi
xorl %edi, %edi
callq 0x30da
xorl %edi, %edi
movq %r14, %rsi
callq 0x30da
cmpq $0x0, 0x8(%rbx)
je 0x4302
cmpl $0x0, (%rbx)
je 0x42f9
xorl %r14d, %r14d
xorl %r15d, %r15d
movq 0x8(%rbx), %rax
movq (%rax,%r14), %rdi
callq 0x2050
movq 0x8(%rbx), %rax
movq 0x8(%rax,%r14), %rdi
testq %rdi, %rdi
je 0x42eb
callq 0x2050
incq %r15
movl (%rbx), %eax
addq $0x18, %r14
cmpq %rax, %r15
jb 0x42cb
movq 0x8(%rbx), %rdi
callq 0x2050
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2050
retq
// File: /workspace/github_c_makefile_star2_O1/c-zhou[P]yahs/sdict.c
// Function: asm_destroy
void asm_destroy(asm_dict_t *d)
{
    if (!d) return;
    uint32_t i;
    if (d == 0)
        return;
    if (d->s) {
        for (i = 0; i < d->n; ++i) {
            free(d->s[i].name);
            free(d->s[i].gs);
            free(d->s[i].gsize);
            free(d->s[i].gcomp);
            free(d->s[i].gtype);
            free(d->s[i].glink);
            free(d->s[i].gevid);
        }
        free(d->s);
    }
    if (d->seg)
        free(d->seg);
    if (d->a)
        free(d->a);
    if (d->index)
        free(d->index);
    if (d->h)
        kh_destroy(sdict, d->h);
    free(d);
}

// Assembly:
testq %rdi, %rdi
je 0x441a
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpq $0x0, 0x8(%rdi)
je 0x43af
cmpl $0x0, (%rbx)
je 0x43a6
xorl %r14d, %r14d
xorl %r15d, %r15d
movq 0x8(%rbx), %rax
movq (%rax,%r14), %rdi
callq 0x2050
movq 0x8(%rbx), %rax
movq 0x28(%rax,%r14), %rdi
callq 0x2050
movq 0x8(%rbx), %rax
movq 0x30(%rax,%r14), %rdi
callq 0x2050
movq 0x8(%rbx), %rax
movq 0x38(%rax,%r14), %rdi
callq 0x2050
movq 0x8(%rbx), %rax
movq 0x40(%rax,%r14), %rdi
callq 0x2050
movq 0x8(%rbx), %rax
movq 0x48(%rax,%r14), %rdi
callq 0x2050
movq 0x8(%rbx), %rax
movq 0x50(%rax,%r14), %rdi
callq 0x2050
incq %r15
movl (%rbx), %eax
addq $0x58, %r14
cmpq %rax, %r15
jb 0x4337
movq 0x8(%rbx), %rdi
callq 0x2050
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x43bd
callq 0x2050
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x43cb
callq 0x2050
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0x43d9
callq 0x2050
movq 0x10(%rbx), %r14
testq %r14, %r14
je 0x440d
movq 0x18(%r14), %rsi
xorl %edi, %edi
callq 0x30da
movq 0x10(%r14), %rsi
xorl %edi, %edi
callq 0x30da
movq 0x20(%r14), %rsi
xorl %edi, %edi
callq 0x30da
xorl %edi, %edi
movq %r14, %rsi
callq 0x30da
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2050
retq
// File: /workspace/github_c_makefile_star2_O1/c-zhou[P]yahs/sdict.c
// Function: sd_put
uint32_t sd_put(sdict_t *d, const char *name, uint32_t len)
{
    if (!name)
        return UINT32_MAX;
    sdhash_t *h = d->h;
    khint_t k;
    int absent;
    k = kh_put(sdict, h, name, &absent);
    if (absent) {
        sd_seq_t *s;
        if (d->n == d->m) {
            d->m = d->m? d->m<<1 : 16;
            d->s = (sd_seq_t *) realloc(d->s, d->m * sizeof(sd_seq_t));
        }
        s = &d->s[d->n];
        s->len = len;
        s->seq = 0;
        kh_key(h, k) = s->name = strdup(name);
        kh_val(h, k) = d->n++;
    }
    return kh_val(h, k);
}

// Assembly:
testq %rsi, %rsi
je 0x44f7
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %r14
movq 0x10(%rdi), %rbx
leaq 0x14(%rsp), %r12
movq %rbx, %rdi
movq %r12, %rdx
callq 0x44fd
cmpl $0x0, (%r12)
movl %eax, %ecx
je 0x44e1
movl %ebp, 0x4(%rsp)
movq %rcx, 0x8(%rsp)
movl 0x4(%r14), %eax
cmpl %eax, (%r14)
jne 0x4493
leal (%rax,%rax), %ecx
testl %eax, %eax
movl $0x10, %eax
cmovnel %ecx, %eax
movl %eax, 0x4(%r14)
movq 0x8(%r14), %rdi
shlq $0x3, %rax
leaq (%rax,%rax,2), %rsi
callq 0x2290
movq %rax, 0x8(%r14)
movq 0x8(%r14), %r13
movl (%r14), %ebp
leaq (,%rbp,2), %r12
addq %rbp, %r12
movl 0x4(%rsp), %eax
movl %eax, 0x10(%r13,%r12,8)
movq $0x0, 0x8(%r13,%r12,8)
movq %r15, %rdi
callq 0x23b0
movq %rax, (%r13,%r12,8)
movq 0x18(%rbx), %rcx
movq 0x8(%rsp), %rdx
movq %rax, (%rcx,%rdx,8)
movq %rdx, %rcx
leal 0x1(%rbp), %eax
movl %eax, (%r14)
movq 0x20(%rbx), %rax
movl %ebp, (%rax,%rdx,4)
movq 0x20(%rbx), %rax
movl (%rax,%rcx,4), %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
// File: /workspace/github_c_makefile_star2_O1/c-zhou[P]yahs/sdict.c
// Function: sd_get
uint32_t sd_get(sdict_t *d, const char *name)
{
    sdhash_t *h = d->h;
    khint_t k;
    k = kh_get(sdict, h, name);
    return k == kh_end(h)? UINT32_MAX : kh_val(h, k);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq 0x10(%rdi), %rax
movq %rax, 0x8(%rsp)
movl (%rax), %ecx
testl %ecx, %ecx
je 0x4785
movq %rsi, %r14
leal -0x1(%rcx), %edi
movsbl (%rsi), %r13d
testl %r13d, %r13d
movq %rcx, 0x18(%rsp)
je 0x478d
movb 0x1(%r14), %al
testb %al, %al
je 0x4790
leaq 0x2(%r14), %rcx
movl %r13d, %edx
shll $0x5, %edx
subl %r13d, %edx
movsbl %al, %r13d
addl %edx, %r13d
movb (%rcx), %al
incq %rcx
testb %al, %al
jne 0x476a
jmp 0x4790
xorl %r15d, %r15d
jmp 0x481b
xorl %r13d, %r13d
andl %edi, %r13d
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rdx
movl $0x1, %ebx
movl %r13d, %r15d
movl %edi, 0x14(%rsp)
movq %rdx, 0x20(%rsp)
movl %r15d, %eax
shrl $0x4, %eax
movl (%rdx,%rax,4), %r12d
leal (%r15,%r15), %ebp
andl $0x1e, %ebp
movl %r12d, %eax
movl %ebp, %ecx
shrl %cl, %eax
testb $0x2, %al
jne 0x4809
testb $0x1, %al
jne 0x47f2
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rax
movl %r15d, %ecx
movq (%rax,%rcx,8), %rdi
movq %r14, %rsi
callq 0x21e0
movq 0x20(%rsp), %rdx
movl 0x14(%rsp), %edi
testl %eax, %eax
je 0x4809
addl %ebx, %r15d
andl %edi, %r15d
incl %ebx
cmpl %r13d, %r15d
jne 0x47ad
movq 0x18(%rsp), %rcx
movl %ecx, %r15d
jmp 0x481b
movl %ebp, %ecx
shrl %cl, %r12d
testb $0x3, %r12b
movq 0x18(%rsp), %rcx
cmovnel %ecx, %r15d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %ecx, %r15d
je 0x4834
movq 0x8(%rsp), %rax
movq 0x20(%rax), %rax
movl %r15d, %ecx
movl (%rax,%rcx,4), %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/c-zhou[P]yahs/sdict.c
// Function: sd_hash
void sd_hash(sdict_t *d)
{
    uint32_t i;
    sdhash_t *h;
    if (d->h)
        return;
    d->h = h = kh_init(sdict);
    for (i = 0; i < d->n; ++i) {
        int absent;
        khint_t k;
        k = kh_put(sdict, h, d->s[i].name, &absent);
        kh_val(h, k) = i;
    }
}

// Assembly:
cmpq $0x0, 0x10(%rdi)
je 0x484b
retq
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl $0x1, %esi
movl $0x28, %edx
xorl %edi, %edi
callq 0x3038
movq %rax, 0x10(%rbx)
cmpl $0x0, (%rbx)
je 0x48ae
movq %rax, %r14
xorl %r12d, %r12d
leaq 0xc(%rsp), %r15
xorl %r13d, %r13d
movq 0x8(%rbx), %rax
movq (%rax,%r12), %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x44fd
movq 0x20(%r14), %rcx
movl %eax, %eax
movl %r13d, (%rcx,%rax,4)
incq %r13
movl (%rbx), %eax
addq $0x18, %r12
cmpq %rax, %r13
jb 0x4883
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/c-zhou[P]yahs/sdict.c
// Function: make_sdict_from_index
sdict_t *make_sdict_from_index(const char *f, uint32_t min_len)
{
    iostream_t *fp;
    char *line;
    char name[4096];
    int64_t len;

    fp = iostream_open(f);
    if (fp == NULL) {
        fprintf(stderr, "[E::%s] cannot open file %s for reading\n", __func__, f);
        exit(EXIT_FAILURE);
    }
    
    sdict_t *d;
    d = sd_init();
    while ((line = iostream_getline(fp)) != NULL) {
        if (is_empty_line(line))
            continue;
        sscanf(line, "%s %ld", name, &len);
        if (len > UINT32_MAX) {
            fprintf(stderr, "[E::%s] >4G sequence chunks are not supported: %s [%ld]\n", __func__, name, len);
            exit(EXIT_FAILURE);
        }
        if (len >= min_len)
            sd_put(d, name, len);
    }

    iostream_close(fp);
    return d;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1018, %rsp           # imm = 0x1018
movl %esi, %r15d
movq %rdi, %r14
callq 0x2d17
testq %rax, %rax
je 0x4e35
movq %rax, %rbx
callq 0x41ac
movq %rax, %r14
movq %rbx, %rdi
callq 0x2e4f
testq %rax, %rax
je 0x4e0b
movq %rax, %rbp
movl %r15d, %r15d
leaq 0x10(%rsp), %r12
movabsq $0x100000000, %r13      # imm = 0x100000000
movq %rbp, %rdi
callq 0x2cf4
testl %eax, %eax
jne 0x4dfb
movq %rbp, %rdi
leaq 0x56e1(%rip), %rsi      # 0xa4b3
movq %r12, %rdx
leaq 0x8(%rsp), %rcx
xorl %eax, %eax
callq 0x2260
movq 0x8(%rsp), %rdx
cmpq %r13, %rdx
jge 0x4e28
cmpq %r15, %rdx
jl 0x4dfb
movq %r14, %rdi
movq %r12, %rsi
callq 0x441b
movq %rbx, %rdi
callq 0x2e4f
movq %rax, %rbp
testq %rax, %rax
jne 0x4dbc
movq %rbx, %rdi
callq 0x2ded
movq %r14, %rax
addq $0x1018, %rsp           # imm = 0x1018
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x10(%rsp), %rdi
movq %rdx, %rsi
callq 0x25dc
movq %r14, %rdi
callq 0x260a
// File: /workspace/github_c_makefile_star2_O1/c-zhou[P]yahs/sdict.c
// Function: make_sdict_from_gfa
sdict_t *make_sdict_from_gfa(const char *f, uint32_t min_len)
{
    iostream_t *fp;
    char *line;
    char name[4096], lens[4096];
    uint64_t len;

    fp = iostream_open(f);
    if (fp == NULL) {
        fprintf(stderr, "[E::%s] cannot open file %s for reading\n", __func__, f);
        exit(EXIT_FAILURE);
    }

    sdict_t *d;
    d = sd_init();
    while ((line = iostream_getline(fp)) != NULL) {
        if (is_empty_line(line))
            continue;
        if (line[0] == 'S') {
            sscanf(line, "%*s %s %*s %s", name, lens);
            len = strtoul(lens + 5, NULL, 10);
            if (len > UINT32_MAX) {
                fprintf(stderr, "[E::%s] >4G sequence chunks are not supported: %s [%ld]\n", __func__, name, len);
                exit(EXIT_FAILURE);
            }
            if (len >= min_len)
                sd_put(d, name, len);
        }
    }
    iostream_close(fp);

    return d;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2008, %rsp           # imm = 0x2008
movl %esi, %ebp
movq %rdi, %r14
callq 0x2d17
testq %rax, %rax
je 0x4f1c
movq %rax, %rbx
callq 0x41ac
movq %rax, %r14
movq %rbx, %rdi
callq 0x2e4f
testq %rax, %rax
je 0x4eef
movq %rax, %r15
movl %ebp, %r12d
leaq 0x1000(%rsp), %r13
movq %rsp, %rbp
movq %r15, %rdi
callq 0x2cf4
testl %eax, %eax
jne 0x4edf
cmpb $0x53, (%r15)
jne 0x4edf
movq %r15, %rdi
leaq 0x5628(%rip), %rsi      # 0xa4ce
movq %r13, %rdx
movq %rbp, %rcx
xorl %eax, %eax
callq 0x2260
leaq 0x5(%rsp), %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x2320
movq %rax, %rcx
shrq $0x20, %rcx
jne 0x4f0c
cmpq %r12, %rax
jb 0x4edf
movq %r14, %rdi
movq %r13, %rsi
movl %eax, %edx
callq 0x441b
movq %rbx, %rdi
callq 0x2e4f
movq %rax, %r15
testq %rax, %rax
jne 0x4e8a
movq %rbx, %rdi
callq 0x2ded
movq %r14, %rax
addq $0x2008, %rsp           # imm = 0x2008
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1000(%rsp), %rdi
movq %rax, %rsi
callq 0x2635
movq %r14, %rdi
callq 0x2663