LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/upcrob[P]garry/chess.c
// Function: moveLoopDetected()
int moveLoopDetected()
{
	// setup variables
	int i, j, type, len, dupCount;
	int duplicates[MQ_SIZE];
	if (queueFull == TRUE)
		len = MQ_SIZE;
	else
		len = queueIndex;
	
	// clear duplicate array
	for (i = 0; i < len; i++)
		duplicates[i] = 0;
	
	// check for duplicates
	type = 1;
	for (i = 0; i < len; i++)
	{
		// go to next move if this has been classified
		if (duplicates[i] != 0)
			continue;
		
		// classify
		duplicates[i] = type;
		
		// classify next moves
		for (j = i + 1; j < len; j++)
		{
			// skip if classified
			if (duplicates[j] != 0)
				continue;
		
			Move* a = moveQueue[i];
			Move* b = moveQueue[j];
			if (a->pieceId == b->pieceId && a->startRow == b->startRow &&
				a->startCol == b->startCol && a->endRow == b->endRow &&
				a->endCol == b->endCol)
			{
				// moves were the same
				duplicates[j] = type;
			}
		}
				
		// next type
		type++;
	}
	
	// count duplicates
	int playerDup = 0;
	for (i = 1; i <= type; i++)
	{
		dupCount = 0;
		for (j = 0; j < len; j++)
		{
			if (duplicates[j] == i)
				dupCount++;
		}
		
		if (dupCount > MAX_REPEATS)
		{
			playerDup++;
			if (playerDup > 1)
				return TRUE;
		}
	}
	
	return FALSE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x58, %rsp
cmpl $0x1, 0xa444(%rip)      # 0xc124
movl $0x14, %ebx
je 0x1ced
movl 0xa433(%rip), %ebx      # 0xc120
movl %ebx, %r14d
testl %ebx, %ebx
jle 0x1d07
leaq (,%r14,4), %rdx
leaq -0x70(%rbp), %rdi
xorl %esi, %esi
callq 0x1080
testl %ebx, %ebx
jle 0x1da3
movq 0xa402(%rip), %rax      # 0xc118
movl $0x1, %ecx
leaq -0x70(%rbp), %rdx
xorl %esi, %esi
movq %r14, %rdi
movq %rax, %r8
cmpl $0x0, -0x70(%rbp,%rsi,4)
jne 0x1d8e
movl %ecx, -0x70(%rbp,%rsi,4)
leaq 0x1(%rsi), %r9
cmpq %r14, %r9
jae 0x1d8c
movl $0x1, %r9d
cmpl $0x0, (%rdx,%r9,4)
jne 0x1d84
movq (%rax,%rsi,8), %r10
movq (%r8,%r9,8), %r11
movb (%r10), %r15b
cmpb (%r11), %r15b
jne 0x1d84
movb 0x1(%r10), %r15b
cmpb 0x1(%r11), %r15b
jne 0x1d84
movb 0x2(%r10), %r15b
cmpb 0x2(%r11), %r15b
jne 0x1d84
movb 0x3(%r10), %r15b
cmpb 0x3(%r11), %r15b
jne 0x1d84
movb 0x4(%r10), %r10b
cmpb 0x4(%r11), %r10b
jne 0x1d84
movl %ecx, (%rdx,%r9,4)
incq %r9
cmpq %r9, %rdi
jne 0x1d41
incl %ecx
incq %rsi
addq $0x8, %r8
addq $0x4, %rdx
decq %rdi
cmpq %r14, %rsi
jne 0x1d27
jmp 0x1da8
movl $0x1, %ecx
testl %ecx, %ecx
jle 0x1ded
movl $0x1, %esi
xorl %edx, %edx
testl %ebx, %ebx
jle 0x1de4
xorl %eax, %eax
xorl %edi, %edi
xorl %r8d, %r8d
cmpl %esi, -0x70(%rbp,%rax,4)
sete %r8b
addl %r8d, %edi
incq %rax
cmpq %rax, %r14
jne 0x1dbb
cmpl $0x4, %edi
jb 0x1de4
movl $0x1, %eax
testl %edx, %edx
movl $0x1, %edx
jg 0x1def
leal 0x1(%rsi), %eax
cmpl %ecx, %esi
movl %eax, %esi
jne 0x1db3
xorl %eax, %eax
addq $0x58, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/upcrob[P]garry/chess.c
// Function: logMove(char const*, Move*)
void logMove(const char* filename, Move* move)
{
	//Open file
	FILE* fp = fopen(filename, "a");
	
	//Log move
	char* moveStr = moveToString(move);
	fprintf(fp, "%s", moveStr);
	free(moveStr);
	
	//Close file
	fclose(fp);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
leaq 0x7251(%rip), %rsi      # 0x905c
callq 0x1120
movq %rax, %r14
movq %rbx, %rdi
callq 0x7ce9
movq %rax, %rbx
movq %rax, %rdi
movq %r14, %rsi
callq 0x10f0
movq %rbx, %rdi
callq 0x1130
movq %r14, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x10e0
// File: /workspace/github_c_makefile_star2_O1/upcrob[P]garry/chess.c
// Function: printScore(int)
void printScore(int score)
{
	if (score > 0)
		printf("Board Score = %d (WHITE).\n", score);
	else if (score < 0)
		printf("Board Score = %d (BLACK).\n", -score);
	else
		printf("Board Score = EVEN.\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, %esi
testl %edi, %edi
jle 0x1e83
leaq 0x71a9(%rip), %rdi      # 0x9024
xorl %eax, %eax
popq %rbp
jmp 0x1030
js 0x1e92
leaq 0x72d4(%rip), %rdi      # 0x9160
popq %rbp
jmp 0x1190
negl %esi
leaq 0x71a4(%rip), %rdi      # 0x903f
jmp 0x1e7b
// File: /workspace/github_c_makefile_star2_O1/upcrob[P]garry/boardutil.c
// Function: printBoard(char*)
void printBoard(char* board)
{
	char black = '#';
	char white = '@';
	char pieceId;
	int i, j;
	for (i = 7; i >= 0; i--)
	{
		printf("%d|", i + 1);
		for (j = 0; j < 8; j++)
		{
			pieceId = getPieceAt(board, i, j);
			if (pieceId == EMPTY)
			{
				//empty square
				printf("  ");
			} else if (pieceId > BLACK) {
				//black
				pieceId = (char) (pieceId - BLACK);
				switch (pieceId)
				{
					case PAWN:
						printf("%cP", black);
						break;
					case ROOK:
						printf("%cR", black);
						break;
					case KNIGHT:
						printf("%cN", black);
						break;
					case BISHOP:
						printf("%cB", black);
						break;
					case QUEEN:
						printf("%cQ", black);
						break;
					case KING:
						printf("%cK", black);
						break;
				}
			} else {
				//white
				switch (pieceId)
				{
					case PAWN:
						printf("%cP", white);
						break;
					case ROOK:
						printf("%cR", white);
						break;
					case KNIGHT:
						printf("%cN", white);
						break;
					case BISHOP:
						printf("%cB", white);
						break;
					case QUEEN:
						printf("%cQ", white);
						break;
					case KING:
						printf("%cK", white);
						break;
				}
			}

			if (j < 8)
			{
				printf("|");
			}
		}
		printf("\n");
	}

	printf("-|--|--|--|--|--|--|--|--|\n");
	printf(" | A| B| C| D| E| F| G| H|\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
addq $0x38, %rbx
movl $0x7, %r12d
leaq 0x714c(%rip), %r13      # 0x918c
leaq 0x712d(%rip), %r14      # 0x9174
leal 0x1(%r12), %esi
leaq 0x73b6(%rip), %rdi      # 0x9409
xorl %eax, %eax
callq 0x1030
xorl %r15d, %r15d
movzbl (%rbx,%r15), %eax
testl %eax, %eax
je 0x2089
cmpb $0x33, %al
jl 0x209c
addl $-0x33, %eax
cmpl $0x5, %eax
ja 0x211e
movslq (%r13,%rax,4), %rax
addq %r13, %rax
jmpq *%rax
leaq 0x7389(%rip), %rdi      # 0x9410
jmp 0x2104
leaq 0x737d(%rip), %rdi      # 0x940d
xorl %eax, %eax
callq 0x1030
jmp 0x211e
decl %eax
cmpl $0x5, %eax
ja 0x211e
movslq (%r14,%rax,4), %rax
addq %r14, %rax
jmpq *%rax
leaq 0x735d(%rip), %rdi      # 0x9410
jmp 0x2112
leaq 0x7364(%rip), %rdi      # 0x9420
jmp 0x2104
leaq 0x735b(%rip), %rdi      # 0x9420
jmp 0x2112
leaq 0x734a(%rip), %rdi      # 0x9418
jmp 0x2104
leaq 0x7341(%rip), %rdi      # 0x9418
jmp 0x2112
leaq 0x733c(%rip), %rdi      # 0x941c
jmp 0x2104
leaq 0x7333(%rip), %rdi      # 0x941c
jmp 0x2112
leaq 0x7322(%rip), %rdi      # 0x9414
jmp 0x2104
leaq 0x7319(%rip), %rdi      # 0x9414
jmp 0x2112
leaq 0x7320(%rip), %rdi      # 0x9424
movl $0x23, %esi
jmp 0x2117
leaq 0x7312(%rip), %rdi      # 0x9424
movl $0x40, %esi
xorl %eax, %eax
callq 0x1030
movl $0x7c, %edi
callq 0x1150
incq %r15
cmpq $0x8, %r15
jne 0x205d
movl $0xa, %edi
callq 0x1150
addq $-0x8, %rbx
subq $0x1, %r12
jae 0x2047
leaq 0x72d4(%rip), %rdi      # 0x9428
callq 0x1190
leaq 0x72e3(%rip), %rdi      # 0x9443
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1190
nop
// File: /workspace/github_c_makefile_star2_O1/upcrob[P]garry/moves.c
// Function: kingInCheck(char*, char)
char kingInCheck(char* board, char color)
{
	int i, j, row, col;
	if (color == WHITE)
	{
		//Find white king
		for (i = 0; i < 8; i++)
		{
			for (j = 0; j < 8; j++)
			{
				if (getPieceAt(board, i, j) == KING)
				{
					row = i;
					col = j;
				}
			}
		}

		return !pieceSafe(board, row, col);
	} else {
		//Find black king
		for (i = 0; i < 8; i++)
		{
			for (j = 0; j < 8; j++)
			{
				if (getPieceAt(board, i, j) == KING + BLACK)
				{
					row = i;
					col = j;
				}
			}
		}

		return !pieceSafe(board, row, col);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r12d, %r12d
testb %sil, %sil
je 0x21bc
xorl %r13d, %r13d
movq %rbx, %rdi
movl %r12d, %esi
movl %r13d, %edx
callq 0x1f8b
cmpb $0x38, %al
cmovel %r12d, %r15d
cmovel %r13d, %r14d
incl %r13d
cmpl $0x8, %r13d
jne 0x2190
incl %r12d
cmpl $0x8, %r12d
jne 0x218d
jmp 0x21e9
xorl %r13d, %r13d
movq %rbx, %rdi
movl %r12d, %esi
movl %r13d, %edx
callq 0x1f8b
cmpb $0x6, %al
cmovel %r12d, %r15d
cmovel %r13d, %r14d
incl %r13d
cmpl $0x8, %r13d
jne 0x21bf
incl %r12d
cmpl $0x8, %r12d
jne 0x21bc
movq %rbx, %rdi
movl %r15d, %esi
movl %r14d, %edx
callq 0x220b
testb %al, %al
sete %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/upcrob[P]garry/moves.c
// Function: spaceSafe(char*, char, int, int)
char spaceSafe(char* board, char color, int row, int col)
{
	if (row < 0 || row > 7 || col < 0 || col > 7)
	{
		return FALSE;
	} else {
		if (getPieceAt(board, row, col) != EMPTY)
		{
			return FALSE;
		} else {
			char p;
			if (color == WHITE)
				p = PAWN;
			else
				p = BLACK + PAWN;
			setPieceAt(board, row, col, p);
			if (pieceSafe(board, row, col))
			{
				setPieceAt(board, row, col, EMPTY);
				return TRUE;
			} else {
				setPieceAt(board, row, col, EMPTY);
				return FALSE;
			}
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %eax
orl %edx, %eax
cmpl $0x7, %eax
ja 0x2ed8
movl %ecx, %ebx
movl %edx, %r14d
movl %esi, %r12d
movq %rdi, %r15
movl %edx, %esi
movl %ecx, %edx
callq 0x1f8b
testb %al, %al
je 0x2ee7
xorl %r12d, %r12d
movl %r12d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
testb %r12b, %r12b
movl $0x1, %eax
movl $0x33, %ecx
cmovel %eax, %ecx
movq %r15, %rdi
movl %r14d, %esi
movl %ebx, %edx
callq 0x1fae
movq %r15, %rdi
movl %r14d, %esi
movl %ebx, %edx
callq 0x220b
testb %al, %al
setne %r12b
movq %r15, %rdi
movl %r14d, %esi
movl %ebx, %edx
xorl %ecx, %ecx
callq 0x1fae
jmp 0x2edb
// File: /workspace/github_c_makefile_star2_O1/upcrob[P]garry/moves.c
// Function: newMoveSet()
MoveSet* newMoveSet()
{
	MoveSet* set = (MoveSet*) malloc(sizeof(MoveSet));
	set->cap = 100;
	set->size = 0;
	set->moves = (Move**) malloc(sizeof(Move*) * set->cap);
	return set;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl $0x10, %edi
callq 0x1140
movq %rax, %rbx
movq $0x64, (%rax)
movl $0x320, %edi            # imm = 0x320
callq 0x1140
movq %rax, 0x8(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/upcrob[P]garry/moves.c
// Function: addMove(MoveSet*, char, int, int, int, int, int)
void addMove(MoveSet* set, char pieceId, int startRow, int startCol, int endRow, int endCol, int boardScore)
{
	//Check for expansion
	if (set->size >= set->cap)
	{
		set->cap *= 2;
		int i;
		Move** oMoves = set->moves;
		set->moves = (Move**) malloc(sizeof(Move*) * set->cap);
		for (i = 0; i < set->size; i++)
			set->moves[i] = oMoves[i];
		free(oMoves);
	}

	//Add move
	Move* move = (Move*) malloc(sizeof(Move));
	move->pieceId = pieceId;
	move->startRow = (char) startRow;
	move->startCol = (char) startCol;
	move->endRow = (char) endRow;
	move->endCol = (char) endCol;
	move->boardScore = boardScore;
	set->moves[set->size++] = move;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, %r15d
movl %r8d, -0x34(%rbp)
movl %ecx, -0x30(%rbp)
movl %edx, %r13d
movl %esi, %r14d
movq %rdi, %rbx
movl 0x4(%rdi), %r12d
movslq (%rdi), %rdi
cmpl %edi, %r12d
jl 0x74ea
movl %r15d, -0x2c(%rbp)
leal (%rdi,%rdi), %eax
movl %eax, (%rbx)
movq 0x8(%rbx), %r15
shlq $0x4, %rdi
callq 0x1140
movq %rax, 0x8(%rbx)
testl %r12d, %r12d
jle 0x74de
xorl %eax, %eax
movq (%r15,%rax,8), %rcx
movq 0x8(%rbx), %rdx
movq %rcx, (%rdx,%rax,8)
incq %rax
cmpq %rax, %r12
jne 0x74ca
movq %r15, %rdi
callq 0x1130
movl -0x2c(%rbp), %r15d
movl $0xc, %edi
callq 0x1140
movb %r14b, (%rax)
movb %r13b, 0x1(%rax)
movl -0x30(%rbp), %ecx
movb %cl, 0x2(%rax)
movl -0x34(%rbp), %ecx
movb %cl, 0x3(%rax)
movb %r15b, 0x4(%rax)
movl 0x10(%rbp), %ecx
movl %ecx, 0x8(%rax)
movq 0x8(%rbx), %rcx
movslq 0x4(%rbx), %rdx
leal 0x1(%rdx), %esi
movl %esi, 0x4(%rbx)
movq %rax, (%rcx,%rdx,8)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/upcrob[P]garry/moves.c
// Function: printMove(Move*)
void printMove(Move* move)
{
	if (move->startRow == CASTLE && move->endRow == KINGSIDE)
		if (isBlack(move->pieceId))
			printf("BLACK CASTLE KINGSIDE.\n");
		else
			printf("WHITE CASTLE KINGSIDE.\n");
	else if (move->startRow == CASTLE && move->endRow == QUEENSIDE)
		if (isBlack(move->pieceId))
			printf("BLACK CASTLE QUEENSIDE.\n");
		else
			printf("WHITE CASTLE QUEENSIDE.\n");
	else
		printf("%s at %s to %s.\n", toString(move->pieceId), positionString(move->startRow, move->startCol), positionString(move->endRow, move->endCol));
	fflush(stdout);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movb 0x1(%rdi), %al
cmpb $-0x2, %al
jne 0x7c7a
cmpb $-0x3, 0x3(%rbx)
jne 0x7c5b
movsbl (%rbx), %edi
callq 0x1fbc
testb %al, %al
je 0x7cbb
leaq 0x18c1(%rip), %rdi      # 0x951a
jmp 0x7cc2
cmpb $-0x2, %al
jne 0x7c7a
cmpb $-0x4, 0x3(%rbx)
jne 0x7c7a
movsbl (%rbx), %edi
callq 0x1fbc
testb %al, %al
je 0x7ce0
leaq 0x1873(%rip), %rdi      # 0x94eb
jmp 0x7cc2
movsbl (%rbx), %edi
callq 0x1f06
movq %rax, %r14
movsbl 0x1(%rbx), %edi
movsbl 0x2(%rbx), %esi
callq 0x1f62
movq %rax, %r15
movsbl 0x3(%rbx), %edi
movsbl 0x4(%rbx), %esi
callq 0x1f62
leaq 0x180f(%rip), %rdi      # 0x94b8
movq %r14, %rsi
movq %r15, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x1030
jmp 0x7cc7
leaq 0x1841(%rip), %rdi      # 0x9503
callq 0x1190
movq 0x42da(%rip), %rax      # 0xbfa8
movq (%rax), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1110
leaq 0x17ec(%rip), %rdi      # 0x94d3
jmp 0x7cc2
// File: /workspace/github_c_makefile_star2_O1/upcrob[P]garry/moves.c
// Function: moveToString(Move*)
char* moveToString(Move* move)
{
	char* str = (char*) malloc(6);
	if (move->startRow == CASTLE && move->endRow == KINGSIDE)
			sprintf(str, "CK\n");
	else if (move->startRow == CASTLE && move->endRow == QUEENSIDE)
			sprintf(str, "CQ\n");
	else
		sprintf(str, "%c%d%c%d\n", getColumnChar(move->startCol), move->startRow + 1, getColumnChar(move->endCol), move->endRow + 1);
	
	return str;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
movl $0x6, %edi
callq 0x1140
movq %rax, %rbx
movsbl 0x1(%r14), %ecx
cmpl $-0x2, %ecx
jne 0x7d2d
cmpb $-0x3, 0x3(%r14)
jne 0x7d19
movl $0xa4b43, (%rbx)        # imm = 0xA4B43
jmp 0x7d68
cmpb $-0x2, %cl
jne 0x7d2d
cmpb $-0x4, 0x3(%r14)
jne 0x7d2d
movl $0xa5143, (%rbx)        # imm = 0xA5143
jmp 0x7d68
movzbl 0x2(%r14), %eax
leal 0x41(%rax), %edx
xorl %esi, %esi
cmpl $0x8, %eax
cmovael %esi, %edx
incl %ecx
movzbl 0x4(%r14), %eax
leal 0x41(%rax), %r8d
cmpl $0x8, %eax
cmovael %esi, %r8d
movsbl 0x3(%r14), %r9d
incl %r9d
leaq 0x176b(%rip), %rsi      # 0x94c9
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1040
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/upcrob[P]garry/moves.c
// Function: destroyMoveSet(MoveSet*)
void destroyMoveSet(MoveSet* set)
{
	int i;
	for (i = 0; i < set->size; i++)
		free(set->moves[i]);
	free(set->moves);
	free(set);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpl $0x0, 0x4(%rdi)
jle 0x7de1
xorl %r14d, %r14d
movq 0x8(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x1130
incq %r14
movslq 0x4(%rbx), %rax
cmpq %rax, %r14
jl 0x7dc8
movq 0x8(%rbx), %rdi
callq 0x1130
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x1130
// File: /workspace/github_c_makefile_star2_O1/upcrob[P]garry/moves.c
// Function: subMoveSet(MoveSet*, int, int)
MoveSet* subMoveSet(MoveSet* set, int start, int length)
{
	int i, j;
	MoveSet* s = (MoveSet*) malloc(sizeof(MoveSet));
	s->size = length;
	s->cap = length;
	s->moves = (Move**) malloc(sizeof(Move*) * length);
	
	for (j = 0, i = start; j < length; i++, j++)
		s->moves[j] = set->moves[i];
	return s;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r15d
movl %esi, %r12d
movq %rdi, %r14
movl $0x10, %edi
callq 0x1140
movq %rax, %rbx
movl %r15d, 0x4(%rax)
movl %r15d, (%rax)
movslq %r15d, %r13
leaq (,%r13,8), %rdi
callq 0x1140
movq %rax, 0x8(%rbx)
testl %r13d, %r13d
jle 0x8176
movslq %r12d, %rcx
movl %r15d, %edx
shlq $0x3, %rcx
addq 0x8(%r14), %rcx
xorl %esi, %esi
movq (%rcx,%rsi,8), %rdi
movq %rdi, (%rax,%rsi,8)
incq %rsi
cmpq %rsi, %rdx
jne 0x8166
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/upcrob[P]garry/moves.c
// Function: sendMoveSet(int, MoveSet*)
void sendMoveSet(int receiver, MoveSet* set)
{
	//Send set size
	int i;
	int size = set->size;
	COMM_WORLD.Send(&size, 1, MPI_INT, receiver, 0);
	
	//Send move data
	for (i = 0; i < size; i++)
	{
		COMM_WORLD.Send(&set->moves[i]->pieceId, 1, MPI_CHAR, receiver, 0);
		COMM_WORLD.Send(&set->moves[i]->startRow, 1, MPI_CHAR, receiver, 0);
		COMM_WORLD.Send(&set->moves[i]->startCol, 1, MPI_CHAR, receiver, 0);
		COMM_WORLD.Send(&set->moves[i]->endRow, 1, MPI_CHAR, receiver, 0);
		COMM_WORLD.Send(&set->moves[i]->endCol, 1, MPI_CHAR, receiver, 0);
		COMM_WORLD.Send(&set->moves[i]->boardScore, 1, MPI_INT, receiver, 0);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %r14d
movl 0x4(%rsi), %eax
leaq -0x2c(%rbp), %r15
movl %eax, (%r15)
movq 0x3e23(%rip), %r13      # 0xbfd0
movq 0x8(%r13), %r9
movq 0x3e20(%rip), %rdx      # 0xbfd8
movq %r15, %rdi
movl $0x1, %esi
movl %r14d, %ecx
xorl %r8d, %r8d
callq 0x1060
cmpl $0x0, (%r15)
jle 0x82c0
xorl %r12d, %r12d
movq 0x3dd1(%rip), %r15      # 0xbfb0
movq 0x8(%rbx), %rax
movq (%rax,%r12,8), %rdi
movq 0x8(%r13), %r9
movl $0x1, %esi
movq %r15, %rdx
movl %r14d, %ecx
xorl %r8d, %r8d
callq 0x1060
movq 0x8(%rbx), %rax
movq (%rax,%r12,8), %rdi
incq %rdi
movq 0x8(%r13), %r9
movl $0x1, %esi
movq %r15, %rdx
movl %r14d, %ecx
xorl %r8d, %r8d
callq 0x1060
movq 0x8(%rbx), %rax
movq (%rax,%r12,8), %rdi
addq $0x2, %rdi
movq 0x8(%r13), %r9
movl $0x1, %esi
movq %r15, %rdx
movl %r14d, %ecx
xorl %r8d, %r8d
callq 0x1060
movq 0x8(%rbx), %rax
movq (%rax,%r12,8), %rdi
addq $0x3, %rdi
movq 0x8(%r13), %r9
movl $0x1, %esi
movq %r15, %rdx
movl %r14d, %ecx
xorl %r8d, %r8d
callq 0x1060
movq 0x8(%rbx), %rax
movq (%rax,%r12,8), %rdi
addq $0x4, %rdi
movq 0x8(%r13), %r9
movl $0x1, %esi
movq %r15, %rdx
movl %r14d, %ecx
xorl %r8d, %r8d
callq 0x1060
movq 0x8(%rbx), %rax
movq (%rax,%r12,8), %rdi
addq $0x8, %rdi
movq 0x8(%r13), %r9
movl $0x1, %esi
movq 0x3d33(%rip), %rdx      # 0xbfd8
movl %r14d, %ecx
xorl %r8d, %r8d
callq 0x1060
incq %r12
movslq -0x2c(%rbp), %rax
cmpq %rax, %r12
jl 0x81df
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/upcrob[P]garry/moves.c
// Function: sendMove(int, Move*)
void sendMove(int receiver, Move* move)
{
	COMM_WORLD.Send(&move->pieceId, 1, MPI_CHAR, receiver, 0);
	COMM_WORLD.Send(&move->startRow, 1, MPI_CHAR, receiver, 0);
	COMM_WORLD.Send(&move->startCol, 1, MPI_CHAR, receiver, 0);
	COMM_WORLD.Send(&move->endRow, 1, MPI_CHAR, receiver, 0);
	COMM_WORLD.Send(&move->endCol, 1, MPI_CHAR, receiver, 0);
	COMM_WORLD.Send(&move->boardScore, 1, MPI_INT, receiver, 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movl %edi, %ebx
movq 0x3cea(%rip), %r12      # 0xbfd0
movq 0x8(%r12), %r9
movq 0x3cbe(%rip), %r15      # 0xbfb0
movq %rsi, %rdi
movl $0x1, %esi
movq %r15, %rdx
movl %ebx, %ecx
xorl %r8d, %r8d
callq 0x1060
leaq 0x1(%r14), %rdi
movq 0x8(%r12), %r9
movl $0x1, %esi
movq %r15, %rdx
movl %ebx, %ecx
xorl %r8d, %r8d
callq 0x1060
leaq 0x2(%r14), %rdi
movq 0x8(%r12), %r9
movl $0x1, %esi
movq %r15, %rdx
movl %ebx, %ecx
xorl %r8d, %r8d
callq 0x1060
leaq 0x3(%r14), %rdi
movq 0x8(%r12), %r9
movl $0x1, %esi
movq %r15, %rdx
movl %ebx, %ecx
xorl %r8d, %r8d
callq 0x1060
leaq 0x4(%r14), %rdi
movq 0x8(%r12), %r9
movl $0x1, %esi
movq %r15, %rdx
movl %ebx, %ecx
xorl %r8d, %r8d
callq 0x1060
addq $0x8, %r14
movq 0x8(%r12), %r9
movq 0x3c55(%rip), %rdx      # 0xbfd8
movq %r14, %rdi
movl $0x1, %esi
movl %ebx, %ecx
xorl %r8d, %r8d
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1060
// File: /workspace/github_c_makefile_star2_O1/upcrob[P]garry/moves.c
// Function: receiveMoveDef(int)
MoveDef* receiveMoveDef(int sender)
{
	int bestIndex;
	int bestValue;
	COMM_WORLD.Recv(&bestIndex, 1, MPI_INT, sender, 0);
	COMM_WORLD.Recv(&bestValue, 1, MPI_INT, sender, 0);
	MoveDef* best = (MoveDef*) malloc(sizeof(MoveDef));
	best->index = bestIndex;
	best->value = bestValue;
	return best;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edi, %ebx
movq 0x3c19(%rip), %r12      # 0xbfd0
movq 0x8(%r12), %r9
xorl %r13d, %r13d
movq %r13, (%rsp)
movq 0x3c0e(%rip), %r14      # 0xbfd8
leaq -0x30(%rbp), %r15
movq %r15, %rdi
movl $0x1, %esi
movq %r14, %rdx
movl %ebx, %ecx
xorl %r8d, %r8d
callq 0x10a0
movq 0x8(%r12), %r9
movq %r13, (%rsp)
leaq -0x2c(%rbp), %r12
movq %r12, %rdi
movl $0x1, %esi
movq %r14, %rdx
movl %ebx, %ecx
xorl %r8d, %r8d
callq 0x10a0
movl $0x8, %edi
callq 0x1140
movl (%r15), %ecx
movl %ecx, (%rax)
movl (%r12), %ecx
movl %ecx, 0x4(%rax)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/upcrob[P]garry/moves.c
// Function: constructMove(char, char, char, char, char, int)
Move* constructMove(char pieceId, char startRow, char startCol, char endRow, char endCol, int boardScore)
{
	Move* m = (Move*) malloc(sizeof(Move));
	m->pieceId = pieceId;
	m->startRow = startRow;
	m->endRow = endRow;
	m->startCol = startCol;
	m->endCol = endCol;
	m->boardScore = boardScore;
	return m;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, -0x2c(%rbp)
movl %r8d, %r14d
movl %ecx, %r15d
movl %edx, %r12d
movl %esi, %r13d
movl %edi, %ebx
movl $0xc, %edi
callq 0x1140
movb %bl, (%rax)
movb %r13b, 0x1(%rax)
movb %r15b, 0x3(%rax)
movb %r12b, 0x2(%rax)
movb %r14b, 0x4(%rax)
movl -0x2c(%rbp), %ecx
movl %ecx, 0x8(%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/upcrob[P]garry/moves.c
// Function: cloneMove(Move*)
Move* cloneMove(Move* m)
{
	Move* n = (Move*) malloc(sizeof(Move));
	n->pieceId = m->pieceId;
	n->startRow = m->startRow;
	n->startCol = m->startCol;
	n->endRow = m->endRow;
	n->endCol = m->endCol;
	n->boardScore = m->boardScore;
	return n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0xc, %edi
callq 0x1140
movb (%rbx), %cl
movb %cl, (%rax)
movb 0x1(%rbx), %cl
movb %cl, 0x1(%rax)
movb 0x2(%rbx), %cl
movb %cl, 0x2(%rax)
movb 0x3(%rbx), %cl
movb %cl, 0x3(%rax)
movb 0x4(%rbx), %cl
movb %cl, 0x4(%rax)
movl 0x8(%rbx), %ecx
movl %ecx, 0x8(%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/upcrob[P]garry/moves.c
// Function: receiveMoveSet()
MoveSet* receiveMoveSet()
{
	//Get set size
	int i;
	int size;
	COMM_WORLD.Recv(&size, 1, MPI_INT, HEAD, 0);
	
	//Allocate MoveSet structure
	MoveSet* set = (MoveSet*) malloc(sizeof(MoveSet));
	set->size = size;
	set->cap = size;
	set->moves  = (Move**) malloc(sizeof(Move*) * size);
	
	//Receive move data
	for (i = 0; i < size; i++)
	{
		Move* m = (Move*) malloc(sizeof(Move));
		COMM_WORLD.Recv(&m->pieceId, 1, MPI_CHAR, HEAD, 0);
		COMM_WORLD.Recv(&m->startRow, 1, MPI_CHAR, HEAD, 0);
		COMM_WORLD.Recv(&m->startCol, 1, MPI_CHAR, HEAD, 0);
		COMM_WORLD.Recv(&m->endRow, 1, MPI_CHAR, HEAD, 0);
		COMM_WORLD.Recv(&m->endCol, 1, MPI_CHAR, HEAD, 0);
		COMM_WORLD.Recv(&m->boardScore, 1, MPI_INT, HEAD, 0);
		set->moves[i] = m;
	}
	
	//Return MoveSet
	return set;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq 0x3828(%rip), %rax      # 0xbfd0
movq 0x8(%rax), %r9
movq $0x0, (%rsp)
movq 0x381d(%rip), %rdx      # 0xbfd8
leaq -0x2c(%rbp), %r15
movq %r15, %rdi
movl $0x1, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x10a0
movl $0x10, %edi
callq 0x1140
movq %rax, %r14
movslq (%r15), %rdi
movl %edi, 0x4(%rax)
movl %edi, (%rax)
shlq $0x3, %rdi
callq 0x1140
movq %r14, -0x38(%rbp)
movq %rax, 0x8(%r14)
cmpl $0x0, (%r15)
jle 0x88f5
xorl %r12d, %r12d
movq 0x37a5(%rip), %r15      # 0xbfb0
xorl %r14d, %r14d
movq %rax, -0x40(%rbp)
movl $0xc, %edi
callq 0x1140
movq %rax, %r13
movq 0x37aa(%rip), %rbx      # 0xbfd0
movq 0x8(%rbx), %r9
movq %r12, (%rsp)
movq %rax, %rdi
movl $0x1, %esi
movq %r15, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x10a0
leaq 0x1(%r13), %rdi
movq 0x8(%rbx), %r9
movq %r12, (%rsp)
movl $0x1, %esi
movq %r15, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x10a0
leaq 0x2(%r13), %rdi
movq 0x8(%rbx), %r9
movq %r12, (%rsp)
movl $0x1, %esi
movq %r15, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x10a0
leaq 0x3(%r13), %rdi
movq 0x8(%rbx), %r9
movq %r12, (%rsp)
movl $0x1, %esi
movq %r15, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x10a0
leaq 0x4(%r13), %rdi
movq 0x8(%rbx), %r9
movq %r12, (%rsp)
movl $0x1, %esi
movq %r15, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x10a0
leaq 0x8(%r13), %rdi
movq 0x8(%rbx), %r9
movq %r12, (%rsp)
movl $0x1, %esi
movq 0x3705(%rip), %rdx      # 0xbfd8
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x10a0
movq -0x40(%rbp), %rax
movq %r13, (%rax,%r14,8)
incq %r14
movslq -0x2c(%rbp), %rcx
cmpq %rcx, %r14
jl 0x8812
movq -0x38(%rbp), %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/upcrob[P]garry/moves.c
// Function: receiveMove()
Move* receiveMove()
{
	Move* m = (Move*) malloc(sizeof(Move));
	COMM_WORLD.Recv(&m->pieceId, 1, MPI_CHAR, HEAD, 0);
	COMM_WORLD.Recv(&m->startRow, 1, MPI_CHAR, HEAD, 0);
	COMM_WORLD.Recv(&m->startCol, 1, MPI_CHAR, HEAD, 0);
	COMM_WORLD.Recv(&m->endRow, 1, MPI_CHAR, HEAD, 0);
	COMM_WORLD.Recv(&m->endCol, 1, MPI_CHAR, HEAD, 0);
	COMM_WORLD.Recv(&m->boardScore, 1, MPI_INT, HEAD, 0);
	return m;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl $0xc, %edi
callq 0x1140
movq %rax, %rbx
movq 0x363f(%rip), %r15      # 0xbfd0
movq 0x8(%r15), %r9
xorl %r12d, %r12d
movq %r12, (%rsp)
movq 0x360d(%rip), %r14      # 0xbfb0
movq %rax, %rdi
movl $0x1, %esi
movq %r14, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x10a0
leaq 0x1(%rbx), %rdi
movq 0x8(%r15), %r9
movq %r12, (%rsp)
movl $0x1, %esi
movq %r14, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x10a0
leaq 0x2(%rbx), %rdi
movq 0x8(%r15), %r9
movq %r12, (%rsp)
movl $0x1, %esi
movq %r14, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x10a0
leaq 0x3(%rbx), %rdi
movq 0x8(%r15), %r9
movq %r12, (%rsp)
movl $0x1, %esi
movq %r14, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x10a0
leaq 0x4(%rbx), %rdi
movq 0x8(%r15), %r9
movq %r12, (%rsp)
movl $0x1, %esi
movq %r14, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x10a0
leaq 0x8(%rbx), %rdi
movq 0x8(%r15), %r9
movq %r12, (%rsp)
movq 0x3595(%rip), %rdx      # 0xbfd8
movl $0x1, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x10a0
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/upcrob[P]garry/strutil.c
// Function: streq(char*, char*)
int streq(char* s1, char* s2)
{
	int i = 0;
	while (s1[i] == s2[i] && s1[i] != '\0')
		i++;
	
	if (s1[i] == s2[i] && s1[i] == '\0')
		return TRUE;
	else
		return FALSE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
movb (%rdi,%rax), %cl
movb (%rsi,%rax), %dl
testb %cl, %cl
je 0x8a7b
incq %rax
cmpb %dl, %cl
je 0x8a6a
xorl %eax, %eax
orb %cl, %dl
sete %al
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/devkot[P]SearchEngine/Crawler/functions.c
// Function: readFolder
void readFolder(char *path, TrieNode *trie, int *nWords, int *nChars, int *nLines){
    DIR *dp;
    struct dirent *dir;
    char *newName;
    if((dp = opendir(path)) == NULL){                       // Open directory
        perror("readfolder");
        return;
    }
    while((dir = readdir(dp)) != NULL){                     // Read contents till the end
        if(dir->d_ino == 0)                                 // Ignore removed entries
            continue;
        newName = malloc(strlen(path)+strlen(dir->d_name)+2);
        strcpy(newName, path);                              // Compose pathname

        if (!strcmp(dir->d_name, ".") || !strcmp(dir->d_name, "..") ) { //Filter out
            //do nothing
        }
        else{
            strcat(newName, dir->d_name);
            readFile(newName, trie, nWords, nChars, nLines);
        }

        free(newName);
    }
    closedir(dp);                                           // Close directory
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, -0x48(%rbp)
movq %rcx, -0x40(%rbp)
movq %rdx, -0x38(%rbp)
movq %rsi, -0x30(%rbp)
movq %rdi, %r13
callq 0x1080
testq %rax, %rax
je 0x15cb
movq %rax, %rbx
movq %rax, %rdi
callq 0x10f0
testq %rax, %rax
je 0x15b5
movq %rax, %r15
leaq 0x1b62(%rip), %r14      # 0x307e
cmpq $0x0, (%r15)
je 0x15a1
movq %r13, %rdi
callq 0x1090
movq %rax, %r12
addq $0x13, %r15
movq %r15, %rdi
callq 0x1090
leaq (%r12,%rax), %rdi
addq $0x2, %rdi
callq 0x1100
movq %rax, %r12
movq %rax, %rdi
movq %r13, %rsi
callq 0x1040
movq %r15, %rdi
movq %r14, %rsi
callq 0x10e0
testl %eax, %eax
je 0x1599
movq %r15, %rdi
leaq 0x1b10(%rip), %rsi      # 0x307d
callq 0x10e0
testl %eax, %eax
je 0x1599
movq %r12, %rdi
movq %r15, %rsi
callq 0x1160
movq %r12, %rdi
movq -0x30(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq -0x40(%rbp), %rcx
movq -0x48(%rbp), %r8
callq 0x15e5
movq %r12, %rdi
callq 0x1030
movq %rbx, %rdi
callq 0x10f0
movq %rax, %r15
testq %rax, %rax
jne 0x151c
movq %rbx, %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x10b0
leaq 0x1aa0(%rip), %rdi      # 0x3072
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1130
// File: /workspace/github_c_makefile_star2_O1/devkot[P]SearchEngine/Crawler/trie.c
// Function: createTrieNode
TrieNode * createTrieNode(){
    TrieNode *newNode = (TrieNode*) malloc(sizeof(TrieNode)); // allocate space for new node

    newNode->frequency   = 0;    // default frequency of a node is 0, since it's not a word (leaf)
    newNode->postingList = NULL; // no posting list for a non leaf node
    newNode->charList    = NULL; // no child (letter) nodes yet
    newNode->nDocs       = 0;    // no documents include this substring yet (unknown at the time if this is a leaf node)
    return newNode;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl $0x18, %edi
callq 0x1100
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/devkot[P]SearchEngine/Crawler/trie.c
// Function: insertWord
TrieNode * insertWord(TrieNode *root, char* word, int lineNumber, char *fileName){
    TrieNode *current = root;
    int newDoc;

    while (*word){                                     // while not all the string has been consumed
        current = findNextTrieNode(current, *word, 0); // go to the trie node that contains the current letter
        word++;                                        // point to next letter
    }

    current->frequency++;                              // increase the frequency of this word (current is pointing to the leaf node (aka where the word is)
    if (current->postingList == NULL){                 // if there is no posting list yet for this word
        current->postingList = createPostingList(lineNumber, fileName); // create it
        newDoc = 1;
    }
    else
        current->postingList = addToPostingList(current->postingList, lineNumber, &newDoc, fileName); // insert the doc id to the beginning of the inverted index of the word

    current->nDocs += newDoc;                           // will be incremented by one, if this was the first appearance of the word in the lineNumber

    return current;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %r14
movl %edx, %r15d
movq %rdi, %rbx
movb (%rsi), %al
testb %al, %al
je 0x1a2d
movq %rsi, %r12
incq %r12
movsbl %al, %esi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x1a79
movq %rax, %rbx
movb (%r12), %al
incq %r12
testb %al, %al
jne 0x1a12
incl (%rbx)
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x1a4d
leaq -0x24(%rbp), %rdx
movl %r15d, %esi
movq %r14, %rcx
callq 0x1bc3
movq %rax, 0x10(%rbx)
jmp 0x1a63
movl %r15d, %edi
movq %r14, %rsi
callq 0x1b65
movq %rax, 0x10(%rbx)
movl $0x1, -0x24(%rbp)
movl -0x24(%rbp), %eax
addl %eax, 0x4(%rbx)
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/devkot[P]SearchEngine/Crawler/trie.c
// Function: createPostingList
PostingListNode * createPostingList(int lineNumber, char *fileName){

    PostingListNode *newNode = (PostingListNode*) malloc(sizeof(PostingListNode));
    newNode->fileName = (char *) malloc(strlen(fileName) + 1);

    newNode->lineNumber = lineNumber;
    newNode->n          = 1;
    //    newNode->fileName   = fileName;
    strcpy(newNode->fileName, fileName);
    newNode->next       = NULL;

    return newNode;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %r14d
movl $0x18, %edi
callq 0x1100
movq %rax, %r15
movq %rbx, %rdi
callq 0x1090
leaq 0x1(%rax), %rdi
callq 0x1100
movq %rax, (%r15)
movl %r14d, 0x8(%r15)
movl $0x1, 0xc(%r15)
movq %rax, %rdi
movq %rbx, %rsi
callq 0x1040
movq $0x0, 0x10(%r15)
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/devkot[P]SearchEngine/Crawler/trie.c
// Function: addToPostingList
PostingListNode * addToPostingList(PostingListNode *head, int lineNumber, int *newDoc, char *fileName){
    PostingListNode *newNode, *lineNode;

    if(!strcmp(head->fileName, fileName) && (head->lineNumber == lineNumber)) {
        (head->n)++;            // simply increase frequency

        *newDoc = 0;            // do not count this doc as new doc the word has appeared into

        return head;
    }
    else if (!strcmp(head->fileName, fileName) && (head->lineNumber != lineNumber)){  // if this is not the first time the word is found in the document /head->fileName == fileName
        lineNode = (PostingListNode *) malloc(sizeof(PostingListNode));
        lineNode->fileName = (char *) malloc(strlen(fileName) + 2);

        lineNode->lineNumber = lineNumber;
        lineNode->n = head->n + 1;
        strcpy(lineNode->fileName, fileName);
        lineNode->next       = head;

        *newDoc = 0;            // do not count this doc as new doc the word has appeared into

        return lineNode;            // head remains as is
    }
    else{                       // if this is the first time the word is found in the document
        newNode = (PostingListNode *) malloc(sizeof(PostingListNode));
        newNode->fileName = (char *) malloc(strlen(fileName) + 2);

        newNode->lineNumber = lineNumber;   // node points to the document the word is in
        newNode->n          = 1;            // frequency of the word inside the document is 1, since it is its first appearance
//        newNode->fileName   = fileName;     // set the fileName
        strcpy(newNode->fileName, fileName);
        newNode->next       = head;         // next node of the new node is the old head

        *newDoc = 1;            // make sure we count this doc in the unique docs the word has appeared

        return newNode;         // new node becomes the new head of the list
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r15
movq %rdx, %rbx
movl %esi, %r12d
movq %rdi, %r14
movq (%rdi), %rdi
movq %rcx, %rsi
callq 0x10e0
testl %eax, %eax
je 0x1c45
movl $0x18, %edi
callq 0x1100
movq %rax, %r13
movq %r15, %rdi
callq 0x1090
leaq 0x2(%rax), %rdi
callq 0x1100
movq %rax, (%r13)
movl %r12d, 0x8(%r13)
movl $0x1, 0xc(%r13)
movq %rax, %rdi
movq %r15, %rsi
callq 0x1040
movq %r14, 0x10(%r13)
movl $0x1, %eax
movq %r13, %r14
movl %eax, (%rbx)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl %r12d, 0x8(%r14)
jne 0x1c53
incl 0xc(%r14)
xorl %eax, %eax
jmp 0x1c31
testl %eax, %eax
jne 0x1bec
cmpl %r12d, 0x8(%r14)
je 0x1bec
movl $0x18, %edi
callq 0x1100
movq %rax, %r13
movq %r15, %rdi
callq 0x1090
leaq 0x2(%rax), %rdi
callq 0x1100
movq %rax, (%r13)
movl %r12d, 0x8(%r13)
movl 0xc(%r14), %ecx
incl %ecx
movl %ecx, 0xc(%r13)
movq %rax, %rdi
movq %r15, %rsi
callq 0x1040
movq %r14, 0x10(%r13)
xorl %eax, %eax
jmp 0x1c2e
// File: /workspace/github_c_makefile_star2_O1/devkot[P]SearchEngine/Crawler/trie.c
// Function: searchTrie
TrieNode * searchTrie(TrieNode *root, char *word){
    TrieNode *curNode = root;

    if (!word)
        return NULL;

    while (*word && curNode){                          // while not all the string has been consumed
        curNode = findNextTrieNode(curNode, *word, 1); // go to the trie node that contains the current letter
        word++;                                        // go to next letter
    }

    return curNode;
}

// Assembly:
testq %rsi, %rsi
je 0x1cfd
movq %rdi, %rax
movb (%rsi), %cl
testb %cl, %cl
sete %dl
testq %rdi, %rdi
sete %dil
orb %dl, %dil
jne 0x1cff
pushq %rbp
movq %rsp, %rbp
movq 0x8(%rax), %rax
testq %rax, %rax
je 0x1cea
xorl %edx, %edx
testq %rax, %rax
je 0x1cea
cmpb %cl, (%rax)
jg 0x1cea
jne 0x1cdc
movl $0x1, %edx
jmp 0x1ce0
movq 0x10(%rax), %rax
testl %edx, %edx
je 0x1cca
movq 0x8(%rax), %rax
jmp 0x1cec
xorl %eax, %eax
movb 0x1(%rsi), %cl
testb %cl, %cl
je 0x1cfb
incq %rsi
testq %rax, %rax
jne 0x1cbf
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/devkot[P]SearchEngine/Crawler/trie.c
// Function: getPostingList
PostingListNode * getPostingList(TrieNode *root, char *word){
    TrieNode *node = searchTrie(root, word);

    if (node)
        return node->postingList;
    else
        return NULL;
 }

// Assembly:
pushq %rbp
movq %rsp, %rbp
callq 0x1ca0
testq %rax, %rax
je 0x1d14
movq 0x10(%rax), %rax
jmp 0x1d16
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/devkot[P]SearchEngine/Crawler/trie.c
// Function: destroyTrie
void destroyTrie(TrieNode *trieNode){
    TrieNodeList *cur, *prev;

    if (!trieNode)
        return;

    cur = prev = trieNode->charList;

    while (cur){
        destroyTrie(cur->node);
        cur = cur->next;
        free(prev);
        prev = cur;
    }

    destroyPostingList(trieNode->postingList);
    free(trieNode);
}

// Assembly:
testq %rdi, %rdi
je 0x1d6b
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %r14
testq %r14, %r14
je 0x1d50
movq 0x8(%r14), %rdi
callq 0x1d18
movq 0x10(%r14), %r15
movq %r14, %rdi
callq 0x1030
movq %r15, %r14
testq %r15, %r15
jne 0x1d33
movq 0x10(%rbx), %rdi
callq 0x1d6c
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1030
retq
// File: /workspace/github_c_makefile_star2_O1/devkot[P]SearchEngine/Crawler/trie.c
// Function: destroyPostingList
void destroyPostingList(PostingListNode *postingListNode){
    if (!postingListNode)
        return;

    destroyPostingList(postingListNode->next);
    free(postingListNode->fileName);
    free(postingListNode);
}

// Assembly:
testq %rdi, %rdi
je 0x1d99
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
callq 0x1d6c
movq (%rbx), %rdi
callq 0x1030
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x1030
retq
// File: /workspace/github_c_makefile_star2_O1/devkot[P]SearchEngine/Crawler/trie.c
// Function: getDocFrequency
int getDocFrequency(PostingListNode *head, char *fileName){
    PostingListNode *curNode = head;

    while (curNode){                     // while there are nodes to search

        if (!strcmp(fileName,curNode->fileName))    // if doc node is found
            return curNode->n;           // return frequency
        else if (strcmp(fileName,curNode->fileName) != 0) // if there are more nodes to search
            curNode = curNode->next;     // go to next
        else                             // else (there are more nodes actually, but since the list is in DESCENDING ORDER, there is no point to look further)
            return 0;                    // return zero (no such word found in specific doc id)
    }

    return 0;                            // default zero return value
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
xorl %ebx, %ebx
testq %rdi, %rdi
je 0x1dcf
movq %rsi, %r15
movq %rdi, %r14
movq (%r14), %rsi
movq %r15, %rdi
callq 0x10e0
testl %eax, %eax
je 0x1dcb
movq 0x10(%r14), %r14
testq %r14, %r14
jne 0x1db1
jmp 0x1dcf
movl 0xc(%r14), %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/devkot[P]SearchEngine/Crawler/helpers.c
// Function: isDuplicate
int isDuplicate(WordSearchNode *head, char *word){
    WordSearchNode *cur = head;
    int found = 0;

    while (cur && !found) {
        if (!strcmp(cur->word, word))
            found = 1;
        cur = cur->next;
    }

    return found;
}

// Assembly:
testq %rdi, %rdi
je 0x1e29
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
xorl %r15d, %r15d
movq 0x18(%r14), %rdi
movq %rbx, %rsi
callq 0x10e0
movl %eax, %ecx
movl $0x1, %eax
testl %ecx, %ecx
je 0x1e0e
movl %r15d, %eax
movq 0x20(%r14), %r14
testq %r14, %r14
je 0x1e1e
movl %eax, %r15d
testl %eax, %eax
je 0x1df4
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/devkot[P]SearchEngine/Crawler/helpers.c
// Function: destroyWordSearchNodes
void destroyWordSearchNodes(WordSearchNode *head){
    WordSearchNode *curNode = head, *prevNode = head;

    while (curNode){
        curNode = curNode->next;
        free(prevNode->word);
        free(prevNode->fileName);
        free(prevNode->contents);
        free(prevNode);
        prevNode = curNode;
    }
}

// Assembly:
testq %rdi, %rdi
je 0x2043
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x18(%rbx), %rdi
movq 0x20(%rbx), %r14
callq 0x1030
movq (%rbx), %rdi
callq 0x1030
movq 0x10(%rbx), %rdi
callq 0x1030
movq %rbx, %rdi
callq 0x1030
movq %r14, %rbx
testq %r14, %r14
jne 0x2011
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/devkot[P]SearchEngine/Crawler/helpers.c
// Function: readLine
char *readLine(char *fileName, int lineNumber){
    FILE *file;
    char lineBuffer[100000], *line = NULL;
    int curLine = 0;

    file = fopen(fileName, "r");                        // Open file

    if (file == NULL){
        perror("fopen");
        exit(EXIT_FAILURE);
    }

    while(fgets(lineBuffer, 99999, file)) {
        if(curLine == lineNumber) {                     // read the line we need
            line = (char *) malloc(strlen(lineBuffer) + 1);
            strcpy(line, lineBuffer);                   // copy our desired line from buffer
            break;
        }
        curLine++;
    }

    fclose(file);
    return line;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x186a0, %rsp          # imm = 0x186A0
movl %esi, %r14d
leaq 0x101b(%rip), %rsi      # 0x307b
callq 0x1120
testq %rax, %rax
je 0x20f9
movq %rax, %rbx
leaq -0x186c0(%rbp), %rdi
movl $0x1869f, %esi          # imm = 0x1869F
movq %rax, %rdx
callq 0x10d0
testq %rax, %rax
je 0x20b3
incl %r14d
leaq -0x186c0(%rbp), %r12
xorl %r15d, %r15d
decl %r14d
je 0x20b8
movq %r12, %rdi
movl $0x1869f, %esi          # imm = 0x1869F
movq %rbx, %rdx
callq 0x10d0
testq %rax, %rax
jne 0x2097
jmp 0x20de
xorl %r15d, %r15d
jmp 0x20de
leaq -0x186c0(%rbp), %r14
movq %r14, %rdi
callq 0x1090
leaq 0x1(%rax), %rdi
callq 0x1100
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
callq 0x1040
movq %rbx, %rdi
callq 0x1070
movq %r15, %rax
addq $0x186a0, %rsp          # imm = 0x186A0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x11c8
// File: /workspace/github_c_makefile_star2_O1/LuaJIT[P]LuaJIT/src/host/minilua.c
// Function: luaH_get
static const TValue*luaH_get(Table*t,const TValue*key){
switch(ttype(key)){
case 0:return(&luaO_nilobject_);
case 4:return luaH_getstr(t,rawtsvalue(key));
case 3:{
int k;
lua_Number n=nvalue(key);
lua_number2int(k,n);
if(luai_numeq(cast_num(k),nvalue(key)))
return luaH_getnum(t,k);
}
/*fallthrough*/
default:{
Node*n=mainposition(t,key);
do{
if(luaO_rawequalObj(key2tval(n),key))
return gval(n);
else n=gnext(n);
}while(n);
return(&luaO_nilobject_);
}
}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl 0x8(%rsi), %eax
leaq 0xce66(%rip), %r12      # 0x14420
testl %eax, %eax
je 0x7677
movq %rsi, %rbx
movq %rdi, %r15
cmpl $0x3, %eax
je 0x760f
cmpl $0x4, %eax
jne 0x7650
movq (%rbx), %rax
movb 0xb(%r15), %cl
movq $-0x1, %rdx
shlq %cl, %rdx
notl %edx
andl 0xc(%rax), %edx
movslq %edx, %rcx
leaq (%rcx,%rcx,4), %r14
shlq $0x3, %r14
addq 0x20(%r15), %r14
cmpl $0x4, 0x18(%r14)
jne 0x7604
cmpq %rax, 0x10(%r14)
je 0x767a
movq 0x20(%r14), %r14
testq %r14, %r14
jne 0x75f7
jmp 0x7677
movsd (%rbx), %xmm1
cvttpd2dq %xmm1, %xmm0
cvtdq2pd %xmm0, %xmm0
ucomisd %xmm0, %xmm1
jne 0x7648
jp 0x7648
cvttsd2si %xmm1, %esi
movq %r15, %rdi
movapd %xmm1, 0x10(%rsp)
movapd %xmm0, (%rsp)
callq 0x76de
movapd (%rsp), %xmm0
movapd 0x10(%rsp), %xmm1
movq %rax, %r14
ucomisd %xmm0, %xmm1
jne 0x7650
jnp 0x767a
movq %r15, %rdi
movq %rbx, %rsi
callq 0x7759
movq %rax, %r14
leaq 0x10(%r14), %rdi
movq %rbx, %rsi
callq 0x780c
testl %eax, %eax
jne 0x767a
movq 0x20(%r14), %r14
testq %r14, %r14
jne 0x765e
movq %r12, %r14
movq %r14, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/GregorR[P]lstg/ImageBuilder/imageBuilder.c
// Function: gcalloc
struct object  *gcalloc(int size)
{
  struct object  *result;

  result = malloc(sizeof(struct object) + size * sizeof(struct object *));
  if(result == 0)
  {
    sysError("out of memory", "gcalloc");
  }
  SETSIZE(result, size);
  while(size > 0)
  {
    result->data[--size] = nilObject;
  }
  return result;
}

// Assembly:
pushq %rbx
movl %edi, %ebx
movslq %edi, %rax
leaq 0x10(,%rax,8), %rdi
callq 0x1100
testq %rax, %rax
je 0x1387
leal (,%rbx,4), %ecx
movl %ecx, (%rax)
testl %ebx, %ebx
jle 0x1385
movq 0x6e51(%rip), %rcx      # 0x8140
movl %ebx, %edx
incl %ebx
andl $-0x2, %ebx
leaq -0x1(%rdx), %rsi
movq %rsi, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
leaq (%rax,%rdx,8), %rdx
addq $0x8, %rdx
xorl %esi, %esi
movdqa 0x3cfa(%rip), %xmm1     # 0x5010
movdqa 0x3d02(%rip), %xmm2     # 0x5020
pxor %xmm2, %xmm0
pcmpeqd %xmm3, %xmm3
movq %rsi, %xmm4
pshufd $0x44, %xmm4, %xmm4     # xmm4 = xmm4[0,1,0,1]
por %xmm1, %xmm4
pxor %xmm2, %xmm4
movdqa %xmm4, %xmm5
pcmpgtd %xmm0, %xmm5
pcmpeqd %xmm0, %xmm4
pshufd $0xf5, %xmm4, %xmm6     # xmm6 = xmm4[1,1,3,3]
pand %xmm5, %xmm6
pshufd $0xf5, %xmm5, %xmm4     # xmm4 = xmm5[1,1,3,3]
por %xmm6, %xmm4
movd %xmm4, %edi
notl %edi
testb $0x1, %dil
je 0x1365
movq %rcx, (%rdx)
pxor %xmm3, %xmm4
pextrw $0x4, %xmm4, %edi
testb $0x1, %dil
je 0x1378
movq %rcx, -0x8(%rdx)
addq $0x2, %rsi
addq $-0x10, %rdx
cmpq %rsi, %rbx
jne 0x1326
popq %rbx
retq
leaq 0x3cb2(%rip), %rdi      # 0x5040
leaq 0x3cbe(%rip), %rsi      # 0x5053
leaq 0x3cc5(%rip), %rdx      # 0x5061
xorl %eax, %eax
callq 0x10a0
movl $0x1, %edi
callq 0x1140