LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/janthonyo[P]Redes-Practicas/./domino.cc
// Function: domino::newHand()
std::vector <ficha> newHand()
	{
		std::vector<ficha> playerHand;
		int x;

		for(int i = 0; i < 7; i++)
		{
			x = rand() % (int) forStole.size();

			playerHand.push_back(forStole[x]);

			forStole.erase(forStole.begin() + x);
		}

		return playerHand;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movl $0x7, %r15d
callq 0x2090
movq 0x18(%r14), %rcx
movq 0x20(%r14), %rsi
subq %rcx, %rsi
shrq $0x3, %rsi
cltd
idivl %esi
movslq %edx, %r12
leaq (%rcx,%r12,8), %rdx
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x48d8
movq (%rdx), %rax
movq %rax, (%rsi)
addq $0x8, 0x8(%rbx)
jmp 0x48e0
movq %rbx, %rdi
callq 0x5066
movq 0x18(%r14), %rax
movq 0x20(%r14), %rdx
leaq (%rax,%r12,8), %rsi
addq $0x8, %rsi
cmpq %rdx, %rsi
je 0x4905
leaq (%rax,%r12,8), %rdi
subq %rsi, %rdx
callq 0x22f0
movq 0x20(%r14), %rdx
addq $-0x8, %rdx
movq %rdx, 0x20(%r14)
decl %r15d
jne 0x48a3
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x4935
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x21f0
movq %r14, %rdi
callq 0x2330
nop
// File: /workspace/github_cpp_makefile_star2_O3/janthonyo[P]Redes-Practicas/./domino.cc
// Function: domino::emptyBoard()
void emptyBoard()
	{
		board.clear();
		forStole.clear();
		first = -1;
		last = -1;
		player1.socket = -1;
		player2.socket = -1;


		//"Amontonamos" las fichas para repartir y robar.
		ficha aux;

		for (int i = 0; i < 7; i++)
		{
			for (int j = i; j < 7; j++)
			{
				aux.left = i;
				aux.right = j;
				forStole.push_back(aux);
			}
		}
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rax
cmpq %rax, 0x8(%rdi)
je 0x4b72
movq %rax, 0x8(%rbx)
movq 0x18(%rbx), %rax
cmpq %rax, 0x20(%rbx)
je 0x4b80
movq %rax, 0x20(%rbx)
leaq 0x18(%rbx), %r14
movq $-0x1, 0x130(%rbx)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, 0x94(%rbx)
movl %eax, 0x114(%rbx)
xorl %r12d, %r12d
leaq -0x30(%rbp), %r15
movl %r12d, %r13d
movl %r12d, -0x30(%rbp)
movl %r13d, -0x2c(%rbp)
movq 0x20(%rbx), %rsi
cmpq 0x28(%rbx), %rsi
je 0x4bca
movq -0x30(%rbp), %rax
movq %rax, (%rsi)
addq $0x8, 0x20(%rbx)
jmp 0x4bd5
movq %r14, %rdi
movq %r15, %rdx
callq 0x5066
incl %r13d
cmpl $0x7, %r13d
jne 0x4baa
incl %r12d
cmpl $0x7, %r12d
jne 0x4ba7
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/janthonyo[P]Redes-Practicas/./domino.cc
// Function: domino::hasFicha(ficha, std::vector<ficha, std::allocator<ficha>>)
bool hasFicha(ficha f, std::vector<ficha> hand)
	{
		bool result = false;

		for (int i = 0; i < (int) hand.size(); ++i)
		{
			if(( hand[i].left == f.left ) and ( hand[i].right == f.right ))
				result = true;

			else if (( hand[i].left == f.right ) and ( hand[i].right == f.left ))
				result = true;
		}

		return result;
	}

// Assembly:
movq (%rdx), %rcx
movq 0x8(%rdx), %rdx
subq %rcx, %rdx
shrq $0x3, %rdx
testl %edx, %edx
jle 0x4c54
pushq %rbp
movq %rsp, %rbp
movq %rsi, %rdi
shrq $0x20, %rdi
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
xorl %r8d, %r8d
xorl %r9d, %r9d
movl (%rcx,%r8,8), %r10d
cmpl %esi, %r10d
jne 0x4c31
movb $0x1, %al
cmpl %edi, 0x4(%rcx,%r8,8)
je 0x4c46
cmpl %edi, %r10d
jne 0x4c43
cmpl %esi, 0x4(%rcx,%r8,8)
sete %al
orb %r9b, %al
jmp 0x4c46
movl %r9d, %eax
incq %r8
movl %eax, %r9d
cmpq %r8, %rdx
jne 0x4c1f
popq %rbp
jmp 0x4c56
xorl %eax, %eax
andb $0x1, %al
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/janthonyo[P]Redes-Practicas/./domino.cc
// Function: domino::stealPiece()
ficha stealPiece()
	{
		int x = rand() % (int) forStole.size();
		ficha stolenPiece = forStole[x];

		forStole.erase(forStole.begin() + x);

		return stolenPiece;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x2090
movq 0x18(%rbx), %rdi
movq 0x20(%rbx), %rcx
movq %rcx, %rsi
subq %rdi, %rsi
shrq $0x3, %rsi
cltd
idivl %esi
movslq %edx, %rax
leaq (%rdi,%rax,8), %rsi
addq $0x8, %rsi
movq -0x8(%rsi), %r14
cmpq %rcx, %rsi
je 0x4ca5
leaq (%rdi,%rax,8), %rdi
subq %rsi, %rcx
movq %rcx, %rdx
callq 0x22f0
movq 0x20(%rbx), %rcx
addq $-0x8, %rcx
movq %rcx, 0x20(%rbx)
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/janthonyo[P]Redes-Practicas/./domino.cc
// Function: domino::addToHand(int, ficha)
bool addToHand(int i, ficha pieceToAdd)
	{
		if(i==getSocketP1())
		{
			player1.hand.push_back(pieceToAdd);
		}
		else if(i==getSocketP2())
		{
			player2.hand.push_back(pieceToAdd);
		}
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdx, -0x8(%rbp)
cmpl %esi, 0x94(%rdi)
jne 0x4cda
addq $0x98, %rdi
leaq -0x8(%rbp), %rsi
callq 0x5042
addq $0x118, %rdi            # imm = 0x118
leaq -0x8(%rbp), %rsi
callq 0x5042
// File: /workspace/github_cpp_makefile_star2_O3/janthonyo[P]Redes-Practicas/./domino.cc
// Function: domino::putInBoard(ficha)
bool putInBoard(ficha f)
	{
		//Estructura ficha auxiliar para "girar" la ficha
		ficha aux;
		bool inserted = false;

		if(isBoardEmpty())
		{
			setFirst(f.left);
			setLast(f.right);
			board.push_back(f);

			inserted = true;
		}

		//Se comprueba si la ficha se puede colocar en el extremo inicial.
		else if((first == f.left) or (first == f.right))
		{
			if( f.left == first )
			{
				setFirst(f.right);
				aux.left = f.right;
				aux.right = f.left;
				board.insert(board.begin(), aux);
			}

			else
			{
				setFirst(f.left);
				board.insert(board.begin(), f);
			}

			inserted = true;
		}

		//Si no, se comprueba si la ficha se puede colocar en el extremo final.
		else if((last == f.left) or (last == f.right))
		{
			if( f.left == last )
			{
				setLast(f.right);
				board.push_back(f);
			}

			else
			{
				setLast(f.left);
				aux.left = f.right;
				aux.right = f.left;
				board.push_back(aux);
			}

			inserted = true;
		}

		//Si no, se devuelve false (valor inicial de inserted)
		return inserted;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rsi, %rax
movq %rsi, -0x10(%rbp)
movq (%rdi), %rcx
movq 0x8(%rdi), %rsi
movq %rax, %r8
shrq $0x20, %r8
cmpq %rsi, %rcx
je 0x5247
movl 0x130(%rdi), %edx
cmpl %eax, %edx
jne 0x5264
movl %r8d, 0x130(%rdi)
leaq -0x8(%rbp), %rdx
movl %r8d, (%rdx)
movl %eax, 0x4(%rdx)
jmp 0x5273
movl %eax, 0x130(%rdi)
movl %r8d, 0x134(%rdi)
cmpq 0x10(%rdi), %rcx
je 0x52a5
movq %rax, (%rsi)
addq $0x8, 0x8(%rdi)
jmp 0x52ae
cmpl %r8d, %edx
jne 0x527d
movl %eax, 0x130(%rdi)
leaq -0x10(%rbp), %rdx
movq %rcx, %rsi
callq 0x546a
jmp 0x52ae
movl 0x134(%rdi), %ecx
cmpl %eax, %ecx
setne %dl
cmpl %r8d, %ecx
setne %r9b
testb %r9b, %dl
jne 0x52b6
cmpl %eax, %ecx
jne 0x52ba
movl %r8d, 0x134(%rdi)
cmpq 0x10(%rdi), %rsi
jne 0x525a
leaq -0x10(%rbp), %rdx
callq 0x5066
movb $0x1, %al
addq $0x10, %rsp
popq %rbp
retq
xorl %eax, %eax
jmp 0x52b0
movl %eax, 0x134(%rdi)
movl %r8d, -0x8(%rbp)
movl %eax, -0x4(%rbp)
cmpq 0x10(%rdi), %rsi
je 0x52d3
movq -0x8(%rbp), %rax
jmp 0x525a
leaq -0x8(%rbp), %rdx
jmp 0x52a9
nop
// File: /workspace/github_cpp_makefile_star2_O3/janthonyo[P]Redes-Practicas/./domino.cc
// Function: domino::quitPieceJ1(ficha)
void quitPieceJ1(ficha f)
	{
		bool erase = false;

		for (int i = 0; i < (int) player1.hand.size(); i++)
		{
			if (erase == false)
			{
				if(( player1.hand[i].left == f.left ) and ( player1.hand[i].right == f.right ))
				{
					player1.hand.erase(player1.hand.begin() + i);
					erase = true;
				}

				else if(( player1.hand[i].left == f.right ) and ( player1.hand[i].right == f.left ))
				{
					player1.hand.erase(player1.hand.begin() + i);
					erase = true;
				}
			}
		}
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq 0x98(%rdi), %rsi
movq 0xa0(%rdi), %rdx
movq %rdx, %rax
subq %rsi, %rax
shrq $0x3, %rax
testl %eax, %eax
jle 0x5393
movq %rdi, %r14
movq %rbx, %r15
shrq $0x20, %r15
movl $0x8, %r12d
xorl %r13d, %r13d
xorl %eax, %eax
testb $0x1, %al
jne 0x5373
leaq (%rsi,%r13,8), %rdi
movl (%rdi), %ecx
cmpl %ebx, %ecx
jne 0x5343
cmpl %r15d, 0x4(%rsi,%r13,8)
jne 0x5343
addq %r12, %rsi
cmpq %rdx, %rsi
je 0x5366
leaq 0x8(%rdi), %rsi
jmp 0x5357
cmpl %r15d, %ecx
jne 0x5373
cmpl %ebx, 0x4(%rsi,%r13,8)
jne 0x5373
addq %r12, %rsi
cmpq %rdx, %rsi
je 0x5366
subq %rsi, %rdx
callq 0x22f0
movq 0xa0(%r14), %rdx
addq $-0x8, %rdx
movq %rdx, 0xa0(%r14)
movb $0x1, %al
incq %r13
movq 0x98(%r14), %rsi
movq %rdx, %rcx
subq %rsi, %rcx
shrq $0x3, %rcx
movslq %ecx, %rcx
addq $0x8, %r12
cmpq %rcx, %r13
jl 0x5320
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/janthonyo[P]Redes-Practicas/./domino.cc
// Function: domino::quitPieceJ2(ficha)
void quitPieceJ2(ficha f)
	{
		bool erase = false;

		for (int i = 0; i < (int) player2.hand.size(); i++)
		{
			if (erase == false)
			{
				if(( player2.hand[i].left == f.left ) and ( player2.hand[i].right == f.right ))
				{
					player2.hand.erase(player2.hand.begin() + i);
					erase = true;
				}

				else if(( player2.hand[i].left == f.right ) and ( player2.hand[i].right == f.left ))
				{
					player2.hand.erase(player2.hand.begin() + i);
					erase = true;
				}
			}
		}
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq 0x118(%rdi), %rsi
movq 0x120(%rdi), %rdx
movq %rdx, %rax
subq %rsi, %rax
shrq $0x3, %rax
testl %eax, %eax
jle 0x545b
movq %rdi, %r14
movq %rbx, %r15
shrq $0x20, %r15
movl $0x8, %r12d
xorl %r13d, %r13d
xorl %eax, %eax
testb $0x1, %al
jne 0x543b
leaq (%rsi,%r13,8), %rdi
movl (%rdi), %ecx
cmpl %ebx, %ecx
jne 0x540b
cmpl %r15d, 0x4(%rsi,%r13,8)
jne 0x540b
addq %r12, %rsi
cmpq %rdx, %rsi
je 0x542e
leaq 0x8(%rdi), %rsi
jmp 0x541f
cmpl %r15d, %ecx
jne 0x543b
cmpl %ebx, 0x4(%rsi,%r13,8)
jne 0x543b
addq %r12, %rsi
cmpq %rdx, %rsi
je 0x542e
subq %rsi, %rdx
callq 0x22f0
movq 0x120(%r14), %rdx
addq $-0x8, %rdx
movq %rdx, 0x120(%r14)
movb $0x1, %al
incq %r13
movq 0x118(%r14), %rsi
movq %rdx, %rcx
subq %rsi, %rcx
shrq $0x3, %rcx
movslq %ecx, %rcx
addq $0x8, %r12
cmpq %rcx, %r13
jl 0x53e8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/janthonyo[P]Redes-Practicas/./domino.cc
// Function: domino::domino()
domino()
	{
		//Inicializador de numeros aleatorios.
		srand(time(NULL));

		first = -1;
		last = -1;
		board.clear();
		forStole.clear();
		player1.socket = -1;
		player2.socket = -1;

		//"Amontonamos" las fichas para repartir y robar.
		ficha aux;

		for (int i = 0; i < 7; i++)
		{
			for (int j = i; j < 7; j++)
			{
				aux.left = i;
				aux.right = j;

				forStole.push_back(aux);
			}
		}

	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x98(%rdi)
xorl %eax, %eax
movq %rax, 0xa8(%rdi)
movups %xmm0, 0x118(%rdi)
movq %rax, 0x128(%rdi)
movups %xmm0, (%rdi)
movups %xmm0, 0x10(%rdi)
movups %xmm0, 0x20(%rdi)
xorl %edi, %edi
callq 0x21a0
movl %eax, %edi
callq 0x21d0
movq $-0x1, 0x130(%rbx)
movq (%rbx), %rax
cmpq %rax, 0x8(%rbx)
je 0x5b08
movq %rax, 0x8(%rbx)
movq 0x18(%rbx), %rax
cmpq %rax, 0x20(%rbx)
je 0x5b16
movq %rax, 0x20(%rbx)
leaq 0x18(%rbx), %r14
leaq 0x98(%rbx), %rax
movq %rax, -0x48(%rbp)
leaq 0x118(%rbx), %rax
movq %rax, -0x38(%rbp)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, 0x94(%rbx)
movl %eax, 0x114(%rbx)
leaq 0x28(%rbx), %rax
movq %rax, -0x40(%rbp)
xorl %r15d, %r15d
leaq -0x30(%rbp), %r13
movl %r15d, %r12d
movl %r15d, -0x30(%rbp)
movl %r12d, -0x2c(%rbp)
movq 0x20(%rbx), %rsi
cmpq 0x28(%rbx), %rsi
je 0x5b73
movq -0x30(%rbp), %rax
movq %rax, (%rsi)
addq $0x8, 0x20(%rbx)
jmp 0x5b7e
movq %r14, %rdi
movq %r13, %rdx
callq 0x5066
incl %r12d
cmpl $0x7, %r12d
jne 0x5b53
incl %r15d
cmpl $0x7, %r15d
jne 0x5b50
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r13
movq -0x38(%rbp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x5bbd
movq 0x128(%rbx), %rsi
subq %rdi, %rsi
callq 0x21f0
movq -0x48(%rbp), %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq -0x40(%rbp), %rcx
callq 0x23d1
movq %r13, %rdi
callq 0x2330
// File: /workspace/github_cpp_makefile_star2_O3/janthonyo[P]Redes-Practicas/message.cc
// Function: sendBoardAndHands(domino&)
void sendBoardAndHands(domino& game)
{
    char mensaje[MSG_SIZE];

    // Enviamos el tablero
    strcpy(mensaje, game.showBoard().c_str());
    sendBoth(game, mensaje);

    // Send hands
    strcpy(mensaje, game.messageHandP1().c_str());
    send(game.getSocketP1(), mensaje, strlen(mensaje), 0);

    strcpy(mensaje, game.messageHandP2().c_str());
    send(game.getSocketP2(), mensaje, strlen(mensaje), 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x120, %rsp            # imm = 0x120
movq %rdi, %rbx
leaq -0x40(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6658
movq (%r14), %r14
leaq -0x140(%rbp), %rdi
movq %r14, %rsi
callq 0x21b0
leaq -0x30(%rbp), %r12
cmpq %r12, %r14
je 0x6106
movq -0x30(%rbp), %rsi
incq %rsi
movq %r14, %rdi
callq 0x21f0
leaq -0x140(%rbp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x6060
leaq -0x40(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6d6e
movq (%r14), %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0x21b0
cmpq %r12, %r14
je 0x6149
movq -0x30(%rbp), %rsi
incq %rsi
movq %r14, %rdi
callq 0x21f0
movl 0x94(%rbx), %r14d
movq %r15, %rdi
callq 0x2100
movl %r14d, %edi
movq %r15, %rsi
movq %rax, %rdx
xorl %ecx, %ecx
callq 0x2110
leaq -0x40(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x7442
movq (%r14), %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0x21b0
cmpq %r12, %r14
je 0x6199
movq -0x30(%rbp), %rsi
incq %rsi
movq %r14, %rdi
callq 0x21f0
movl 0x114(%rbx), %ebx
leaq -0x140(%rbp), %r14
movq %r14, %rdi
callq 0x2100
movl %ebx, %edi
movq %r14, %rsi
movq %rax, %rdx
xorl %ecx, %ecx
callq 0x2110
addq $0x120, %rsp            # imm = 0x120
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/janthonyo[P]Redes-Practicas/message.cc
// Function: nextTurnMessage(int*, domino&)
void nextTurnMessage(int *i, domino& game)
{
    char mensaje[MSG_SIZE];

    //Se informa de paso de turno
    if(*i == game.getSocketP1()){
        strcpy(mensaje, "+Ok. Turno de partida.\n\n");
        send(game.getSocketP2(), mensaje, strlen(mensaje), 0);

        strcpy(mensaje, "+Ok. Turno del otro jugador.\n\n");
        send(game.getSocketP1(), mensaje, strlen(mensaje), 0);
    }
    else if (*i == game.getSocketP2()) {
        strcpy(mensaje, "+Ok. Turno de partida.\n\n");
        send(game.getSocketP1(), mensaje, strlen(mensaje), 0);

        strcpy(mensaje, "+Ok. Turno del otro jugador.\n\n");
        send(game.getSocketP2(), mensaje, strlen(mensaje), 0);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rsi, %rbx
movl (%rdi), %eax
movl 0x94(%rsi), %r14d
cmpl %r14d, %eax
jne 0x621a
movups 0x360d(%rip), %xmm0     # 0x9802
movups %xmm0, -0x117(%rbp)
movups 0x35f6(%rip), %xmm0     # 0x97f9
movaps %xmm0, -0x120(%rbp)
movl 0x114(%rbx), %r14d
addq $0x94, %rbx
jmp 0x6245
cmpl 0x114(%rbx), %eax
jne 0x6294
addq $0x114, %rbx            # imm = 0x114
movups 0x35d2(%rip), %xmm0     # 0x9802
movups %xmm0, -0x117(%rbp)
movups 0x35bb(%rip), %xmm0     # 0x97f9
movaps %xmm0, -0x120(%rbp)
leaq -0x120(%rbp), %r15
movq %r15, %rdi
callq 0x2100
movl %r14d, %edi
movq %r15, %rsi
movq %rax, %rdx
xorl %ecx, %ecx
callq 0x2110
movups 0x35a7(%rip), %xmm0     # 0x9812
movaps %xmm0, (%r15)
movups 0x35ab(%rip), %xmm0     # 0x9821
movups %xmm0, 0xf(%r15)
movl (%rbx), %ebx
movq %r15, %rdi
callq 0x2100
movl %ebx, %edi
movq %r15, %rsi
movq %rax, %rdx
xorl %ecx, %ecx
callq 0x2110
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/janthonyo[P]Redes-Practicas/funcionesServer.cc
// Function: salirCliente(int, fd_set*, int*, std::vector<cliente, std::allocator<cliente>>&)
void salirCliente(int socket, fd_set * readfds, int * numClientes, std::vector<cliente> &arrayClientes){

    char buffer[250];
    int j;

    close(socket);
    FD_CLR(socket,readfds);

    //Re-estructurar el array de clientes
    for (j = 0; j < (*numClientes) - 1; j++)
        if (arrayClientes[j].sd == socket)
            break;
    for (; j < (*numClientes) - 1; j++)
        (arrayClientes[j] = arrayClientes[j+1]);

    (*numClientes)--;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %rbx
movq %rsi, %r12
movl %edi, %r15d
callq 0x2380
movq $-0x2, %rax
movl %r15d, %ecx
rolq %cl, %rax
leal 0x3f(%r15), %ecx
testl %r15d, %r15d
cmovnsl %r15d, %ecx
sarl $0x6, %ecx
movslq %ecx, %rcx
andq %rax, (%r12,%rcx,8)
movl (%rbx), %ecx
leal -0x1(%rcx), %eax
xorl %r12d, %r12d
cmpl $0x2, %ecx
jl 0x7c20
movq (%r14), %rcx
movl %eax, %edx
xorl %r12d, %r12d
cmpl %r15d, (%rcx)
je 0x7c20
incq %r12
addq $0xd4, %rcx
cmpq %r12, %rdx
jne 0x7c0a
jmp 0x7c58
cmpl %eax, %r12d
jge 0x7c58
movl %r12d, %eax
imulq $0xd4, %rax, %r15
movl $0xd4, %r13d
movq (%r14), %rdi
addq %r15, %rdi
leaq (%rdi,%r13), %rsi
movl $0xd4, %edx
callq 0x2160
movl (%rbx), %eax
decl %eax
addq %r13, %r15
incl %r12d
cmpl %r12d, %eax
jg 0x7c35
movl %eax, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/janthonyo[P]Redes-Practicas/funcionesServer.cc
// Function: checkUser(char*)
bool checkUser(char buffer[])
{
	char user[100];
	char passwd[100];
	std::fstream dataFile;
	bool isUser = false;

	dataFile.open("Data-Clients.txt", std::fstream::in);

	// A la fuerza, cualquier cliente tendra que tener
	// un usuario y una contraseña para acceder al domino y,
	// por lo tanto en el fichero de datos deben aparecer ambos reflejados,
	// por lo que recorreremos el fichero guardando el valor
	// del nombre de usuario (user) y su password (passwd)

	while(!dataFile.eof())
	{
		dataFile >> user;
		dataFile >> passwd;

		if( strcmp(buffer, user) == 0 )
			isUser = true;
	}

	dataFile.close();

	return isUser;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2f8, %rsp            # imm = 0x2F8
movq %rdi, -0x30(%rbp)
leaq -0x240(%rbp), %r14
movq %r14, %rdi
callq 0x2240
leaq 0x1c63(%rip), %rsi      # 0x991c
movq %r14, %rdi
movl $0x8, %edx
callq 0x2190
movq -0x240(%rbp), %rax
movq -0x18(%rax), %rax
testb $0x2, -0x220(%rbp,%rax)
jne 0x7e26
xorl %r14d, %r14d
leaq -0x240(%rbp), %r15
leaq -0x320(%rbp), %r12
movq -0x230(%rbp,%rax), %r13
movl $0x64, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x2320
movq -0x240(%rbp), %rcx
movq -0x18(%rcx), %rax
cmpl $0x0, -0x220(%rbp,%rax)
jne 0x7d39
addq $-0x65, %r13
cmpq $-0x65, %r13
ja 0x7d39
movq -0x158(%rbp,%rax), %rdi
movq 0x10(%rdi), %rax
cmpq 0x18(%rdi), %rax
jae 0x7db2
movq -0x18(%rcx), %rax
movq -0x230(%rbp,%rax), %rbx
movl $0x64, %edx
movq %r15, %rdi
leaq -0x2b0(%rbp), %rsi
callq 0x2320
movq -0x240(%rbp), %r13
movq -0x18(%r13), %rax
cmpl $0x0, -0x220(%rbp,%rax)
jne 0x7d8a
addq $-0x65, %rbx
cmpq $-0x65, %rbx
ja 0x7d8a
movq -0x158(%rbp,%rax), %rdi
movq 0x10(%rdi), %rax
cmpq 0x18(%rdi), %rax
jae 0x7dee
movq -0x30(%rbp), %rdi
movq %r12, %rsi
callq 0x2280
testl %eax, %eax
sete %al
orb %al, %r14b
movq -0x18(%r13), %rax
testb $0x2, -0x220(%rbp,%rax)
je 0x7cf0
jmp 0x7e29
movq (%rdi), %rax
callq *0x48(%rax)
movq -0x240(%rbp), %rcx
cmpl $-0x1, %eax
jne 0x7d39
movq -0x18(%rcx), %rax
leaq (%rax,%rbp), %rdi
addq $-0x240, %rdi           # imm = 0xFDC0
movl 0x20(%rdi), %esi
orl $0x2, %esi
callq 0x2310
movq -0x240(%rbp), %rcx
jmp 0x7d39
movq (%rdi), %rax
callq *0x48(%rax)
movq -0x240(%rbp), %r13
cmpl $-0x1, %eax
jne 0x7d8a
movq -0x18(%r13), %rax
leaq (%rax,%rbp), %rdi
addq $-0x240, %rdi           # imm = 0xFDC0
movl 0x20(%rdi), %esi
orl $0x2, %esi
callq 0x2310
movq -0x240(%rbp), %r13
jmp 0x7d8a
xorl %r14d, %r14d
leaq -0x240(%rbp), %rdi
callq 0x2040
leaq -0x240(%rbp), %rdi
callq 0x2070
andb $0x1, %r14b
movl %r14d, %eax
addq $0x2f8, %rsp            # imm = 0x2F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x7e5c
movq %rax, %rbx
leaq -0x240(%rbp), %rdi
callq 0x2070
movq %rbx, %rdi
callq 0x2330
// File: /workspace/github_cpp_makefile_star2_O3/janthonyo[P]Redes-Practicas/funcionesServer.cc
// Function: registerUser(char*, char*)
bool registerUser(char rUser[], char rPasswd[])
{
	bool registerCompleted = false;
	std::fstream dataFile;

	if(!checkUser(rUser))
	{
		dataFile.open("Data-Clients.txt", std::fstream::out | std::fstream::app);
		dataFile << rUser << " " << rPasswd << "\n";
		dataFile.close();
		registerCompleted = true;
	}

	return registerCompleted;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x210, %rsp            # imm = 0x210
movq %rsi, %r14
movq %rdi, %r12
leaq -0x230(%rbp), %rdi
callq 0x2240
movq %r12, %rdi
callq 0x7c8b
movl %eax, %ebx
testb %al, %al
jne 0x7f72
leaq 0x1a6c(%rip), %rsi      # 0x991c
leaq -0x230(%rbp), %rdi
movl $0x11, %edx
callq 0x2190
leaq -0x220(%rbp), %r15
testq %r12, %r12
je 0x7ee5
movq %r12, %rdi
callq 0x2100
movq %r15, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x2220
jmp 0x7f03
movq -0x220(%rbp), %rax
movq -0x18(%rax), %rax
leaq (%r15,%rax), %rdi
movl -0x200(%rbp,%rax), %esi
orl $0x1, %esi
callq 0x2310
leaq 0x155c(%rip), %rsi      # 0x9466
movl $0x1, %edx
movq %r15, %rdi
callq 0x2220
testq %r14, %r14
je 0x7f34
movq %r14, %rdi
callq 0x2100
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x2220
jmp 0x7f52
movq -0x220(%rbp), %rax
movq -0x18(%rax), %rax
leaq (%r15,%rax), %rdi
movl -0x200(%rbp,%rax), %esi
orl $0x1, %esi
callq 0x2310
leaq 0x16ca(%rip), %rsi      # 0x9623
movl $0x1, %edx
movq %r15, %rdi
callq 0x2220
leaq -0x230(%rbp), %rdi
callq 0x2040
xorb $0x1, %bl
leaq -0x230(%rbp), %rdi
callq 0x2070
movl %ebx, %eax
addq $0x210, %rsp            # imm = 0x210
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x230(%rbp), %rdi
callq 0x2070
movq %rbx, %rdi
callq 0x2330
// File: /workspace/github_cpp_makefile_star2_O3/janthonyo[P]Redes-Practicas/funcionesServer.cc
// Function: verifyPassword(char*, char*)
bool verifyPassword(char cUser[], char cPasswd[])
{
	char user[100];
	char passwd[100];
	bool foundClient = false;
	bool correctPasswd = false;

	std::fstream dataFile;
	dataFile.open("Data-Clients.txt", std::fstream::in);

	while ((!dataFile.eof()) and (!foundClient))
	{
		dataFile >> user;
		dataFile >> passwd;

		if(strcmp(cUser, user) == 0)
		{
			foundClient = true;

			if(strcmp(cPasswd, passwd) == 0)
			{
				correctPasswd = true;
			}
		}
	}

	dataFile.close();

	return correctPasswd;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2f8, %rsp            # imm = 0x2F8
movq %rsi, %r15
movq %rdi, %r14
leaq -0x240(%rbp), %rbx
movq %rbx, %rdi
callq 0x2240
leaq 0x1942(%rip), %rsi      # 0x991c
movq %rbx, %rdi
movl $0x8, %edx
callq 0x2190
movq -0x240(%rbp), %rax
movq -0x18(%rax), %rcx
testb $0x2, -0x220(%rbp,%rcx)
jne 0x815f
movq %r15, -0x30(%rbp)
leaq -0x240(%rbp), %r15
leaq -0x320(%rbp), %r12
leaq -0x2b0(%rbp), %r13
movq -0x230(%rbp,%rcx), %rbx
movl $0x64, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x2320
movq -0x240(%rbp), %rcx
movq -0x18(%rcx), %rax
cmpl $0x0, -0x220(%rbp,%rax)
jne 0x8066
addq $-0x65, %rbx
cmpq $-0x65, %rbx
ja 0x8066
movq -0x158(%rbp,%rax), %rdi
movq 0x10(%rdi), %rax
cmpq 0x18(%rdi), %rax
jae 0x80ee
movq -0x18(%rcx), %rax
movq -0x230(%rbp,%rax), %rbx
movl $0x64, %edx
movq %r15, %rdi
movq %r13, %rsi
callq 0x2320
movq -0x240(%rbp), %rax
movq -0x18(%rax), %rax
cmpl $0x0, -0x220(%rbp,%rax)
jne 0x80b3
addq $-0x65, %rbx
cmpq $-0x65, %rbx
ja 0x80b3
movq -0x158(%rbp,%rax), %rdi
movq 0x10(%rdi), %rax
cmpq 0x18(%rdi), %rax
jae 0x812a
movq %r14, %rdi
movq %r12, %rsi
callq 0x2280
testl %eax, %eax
je 0x8163
movq -0x240(%rbp), %rcx
movq -0x18(%rcx), %rcx
xorl %ebx, %ebx
testb $0x2, -0x220(%rbp,%rcx)
jne 0x8178
testl %eax, %eax
jne 0x8019
jmp 0x8178
movq (%rdi), %rax
callq *0x48(%rax)
movq -0x240(%rbp), %rcx
cmpl $-0x1, %eax
jne 0x8066
movq -0x18(%rcx), %rax
leaq (%rax,%rbp), %rdi
addq $-0x240, %rdi           # imm = 0xFDC0
movl 0x20(%rdi), %esi
orl $0x2, %esi
callq 0x2310
movq -0x240(%rbp), %rcx
jmp 0x8066
movq (%rdi), %rax
callq *0x48(%rax)
cmpl $-0x1, %eax
jne 0x80b3
movq -0x240(%rbp), %rax
movq -0x18(%rax), %rax
leaq (%rax,%rbp), %rdi
addq $-0x240, %rdi           # imm = 0xFDC0
movl 0x20(%rdi), %esi
orl $0x2, %esi
callq 0x2310
jmp 0x80b3
xorl %ebx, %ebx
jmp 0x8178
leaq -0x2b0(%rbp), %rsi
movq -0x30(%rbp), %rdi
callq 0x2280
testl %eax, %eax
sete %bl
leaq -0x240(%rbp), %rdi
callq 0x2040
leaq -0x240(%rbp), %rdi
callq 0x2070
movl %ebx, %eax
addq $0x2f8, %rsp            # imm = 0x2F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x81a6
movq %rax, %rbx
leaq -0x240(%rbp), %rdi
callq 0x2070
movq %rbx, %rdi
callq 0x2330
// File: /workspace/github_cpp_makefile_star2_O3/janthonyo[P]Redes-Practicas/funcionesServer.cc
// Function: matchmaking(std::vector<domino, std::allocator<domino>>)
int matchmaking(std::vector<domino> games)
{
	int gameAssigned = -1;

	for(int i = 0; i < (int) games.size(); i++)
	{
		if(gameAssigned == -1)
		{
			if(!games[i].has2players())
			{
				gameAssigned = i;
			}
		}
	}

	return gameAssigned;
}

// Assembly:
movq (%rdi), %rcx
movq 0x8(%rdi), %rax
subq %rcx, %rax
sarq $0x3, %rax
movabsq $0x6f96f96f96f96f97, %rdx # imm = 0x6F96F96F96F96F97
imulq %rax, %rdx
testl %edx, %edx
jle 0x821e
pushq %rbp
movq %rsp, %rbp
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
addq $0x114, %rcx            # imm = 0x114
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
xorl %esi, %esi
cmpl $-0x1, %eax
jne 0x820d
cmpl $-0x1, (%rcx)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jne 0x8206
movl %esi, %eax
cmpl $-0x1, -0x80(%rcx)
cmovel %esi, %eax
incq %rsi
addq $0x138, %rcx            # imm = 0x138
cmpq %rsi, %rdx
jne 0x81f5
popq %rbp
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
// File: /workspace/github_cpp_makefile_star2_O3/janthonyo[P]Redes-Practicas/funcionesServer.cc
// Function: alternatePlayerStatus(domino&, std::vector<cliente, std::allocator<cliente>>&)
void alternatePlayerStatus(domino& game, std::vector<cliente>& arrayClientes)
{
	int sdplayer1 = game.getSocketP1();
	int sdplayer2 = game.getSocketP2();

	for (int i = 0; i < (int) arrayClientes.size(); i++)
	{
		if (arrayClientes[i].sd == sdplayer1)
        {
        	if (arrayClientes[i].status == 3)
        		arrayClientes[i].status = 4;

        	else
        		arrayClientes[i].status = 3;
        }

        else if (arrayClientes[i].sd == sdplayer2)
        {
        	if (arrayClientes[i].status == 3)
        		arrayClientes[i].status = 4;

        	else
        		arrayClientes[i].status = 3;
        }
	}

}

// Assembly:
movq (%rsi), %rax
movq 0x8(%rsi), %rdx
subq %rax, %rdx
sarq $0x2, %rdx
movabsq $0x21cfb2b78c13521d, %rcx # imm = 0x21CFB2B78C13521D
imulq %rdx, %rcx
testl %ecx, %ecx
jle 0x8288
pushq %rbp
movq %rsp, %rbp
movl 0x94(%rdi), %edx
movl 0x114(%rdi), %esi
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
addq $0x4, %rax
movl -0x4(%rax), %edi
cmpl %edx, %edi
je 0x8269
cmpl %esi, %edi
jne 0x827c
cmpl $0x3, (%rax)
jne 0x8276
movl $0x4, (%rax)
jmp 0x827c
movl $0x3, (%rax)
addq $0xd4, %rax
decq %rcx
jne 0x825e
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/janthonyo[P]Redes-Practicas/funcionesServer.cc
// Function: userInWaitList(int, std::vector<int, std::allocator<int>>)
bool userInWaitList(int sd, std::vector <int> waitList)
{
	bool result = false;

	for(int i = 0; i < (int) waitList.size(); i++)
	{
		if(waitList[i] == sd)
			result = true;

	}

	return result;
}

// Assembly:
movq (%rsi), %rcx
movq 0x8(%rsi), %rdx
subq %rcx, %rdx
shrq $0x2, %rdx
testl %edx, %edx
jle 0x8549
pushq %rbp
movq %rsp, %rbp
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
xorl %esi, %esi
xorl %eax, %eax
cmpl %edi, (%rcx,%rsi,4)
sete %r8b
orb %r8b, %al
incq %rsi
cmpq %rsi, %rdx
jne 0x8534
popq %rbp
jmp 0x854b
xorl %eax, %eax
andb $0x1, %al
retq
// File: /workspace/github_cpp_makefile_star2_O3/janthonyo[P]Redes-Practicas/funcionesServer.cc
// Function: managePostGame(std::vector<domino, std::allocator<domino>>&, int, std::vector<cliente, std::allocator<cliente>>&, int, int*)
void managePostGame(std::vector<domino> &partida, int pos, std::vector<cliente> &arrayClientes, int numClientes, int *numPartidas)
{
	for (int j = 0; j < numClientes; j++)
	{
	    if (arrayClientes[j].sd == partida[pos].getSocketP1())
	    {
	        // Cambiamos el estado para que puedan iniciar nueva partida
	        arrayClientes[j].status = 2;
	        arrayClientes[j].inGame = -1;
	    }

	    else if (arrayClientes[j].sd == partida[pos].getSocketP2())
	    {
	        // Cambiamos el estado para que puedan iniciar nueva partida
	        arrayClientes[j].status = 2;
	        arrayClientes[j].inGame = -1;
	    }
    }

    // Limpiamos la partida y la habilitamos para otros usuarios
    partida[pos].emptyBoard();
    (*numPartidas)--;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %r8, %rbx
movq (%rdi), %rdi
testl %ecx, %ecx
jle 0x85b8
movq (%rdx), %rdx
movslq %esi, %rax
imulq $0x138, %rax, %r8       # imm = 0x138
leaq (%rdi,%r8), %rsi
movl 0x94(%rdi,%r8), %r8d
movl %ecx, %ecx
imulq $0xd4, %rcx, %rcx
xorl %r9d, %r9d
movl (%rdx,%r9), %r10d
cmpl %r8d, %r10d
je 0x8595
cmpl 0x114(%rsi), %r10d
jne 0x85aa
movl $0x2, 0x4(%rdx,%r9)
movl $0xffffffff, 0xd0(%rdx,%r9) # imm = 0xFFFFFFFF
addq $0xd4, %r9
cmpq %r9, %rcx
jne 0x8583
jmp 0x85bb
movslq %esi, %rax
imulq $0x138, %rax, %rax      # imm = 0x138
addq %rax, %rdi
callq 0x4b54
decl (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/janthonyo[P]Redes-Practicas/funcionesServer.cc
// Function: checkPiece(int, char*, ficha&, char*&)
bool checkPiece(int i, char* buffer, ficha &auxFicha, char* &extremo)
{
    //Variables auxiliares
    int contNum = 0;
    char valorFicha[2];
    char* aux;

    //Sacamos "COLOCAR-FICHA" del buffer
    aux = strtok(buffer, " ,");

    // Sacamos la ficha y la posicion donde colocarla (izquierda/derecha)
    aux = strtok(NULL, " ,");   //La ficha entra en aux
    contNum = 0;                //Evaluamos si es un comando de colocar ficha válido

    //Hallamos los valores de la ficha
    for (int l = 0; l < strlen(aux); l++) {
        if (isdigit(aux[l])) {
            if(contNum < 2){
                // "- '0'" sirve para pasar de char a int el contenido de aux
                valorFicha[contNum] = (aux[l]) - '0';
            }
            contNum++;
        }
    }
    if(contNum != 2){   //Si el comando no lleva exactamente 2 valores numéricos
        return false;
    }

    extremo = strtok(NULL, " ,");   //El extremo entra en aux

    //Si el valor del extremo no es válido
    if ((strcmp( extremo, "derecha\n") != 0 ) && (strcmp( extremo, "izquierda\n") != 0 ))
    {
        return false;
    }

    auxFicha.left = valorFicha[0];
    auxFicha.right = valorFicha[1];

    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %r14
movq %rdx, %rbx
movq %rsi, %rdi
leaq 0xf93(%rip), %r12       # 0x9985
movq %r12, %rsi
callq 0x22d0
xorl %r15d, %r15d
xorl %edi, %edi
movq %r12, %rsi
callq 0x22d0
movq %rax, %r12
movq %rax, %rdi
callq 0x2100
testq %rax, %rax
je 0x8a96
xorl %ecx, %ecx
movsbl (%r12,%rcx), %edx
leal -0x30(%rdx), %esi
cmpl $0x9, %esi
ja 0x8a39
cmpl $0x1, %r15d
jg 0x8a36
addb $-0x30, %dl
movslq %r15d, %rsi
movb %dl, -0x22(%rbp,%rsi)
incl %r15d
incq %rcx
cmpq %rcx, %rax
jne 0x8a19
cmpl $0x2, %r15d
jne 0x8a81
leaq 0xf37(%rip), %rsi       # 0x9985
xorl %edi, %edi
callq 0x22d0
movq %rax, %r15
movq %rax, (%r14)
leaq 0xf26(%rip), %rsi       # 0x9988
movq %rax, %rdi
callq 0x2280
testl %eax, %eax
je 0x8a86
leaq 0xf1c(%rip), %rsi       # 0x9991
movq %r15, %rdi
callq 0x2280
testl %eax, %eax
je 0x8a86
xorl %r15d, %r15d
jmp 0x8a96
movsbl -0x22(%rbp), %eax
movl %eax, (%rbx)
movsbl -0x21(%rbp), %eax
movl %eax, 0x4(%rbx)
movb $0x1, %r15b
movl %r15d, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/janthonyo[P]Redes-Practicas/funcionesServer.cc
// Function: puttingpieceP1(domino&, ficha&, char*)
bool puttingpieceP1(domino& game, ficha &auxFicha, char* extremo)
{
    if (strcmp( extremo, "izquierda\n") == 0)
    {
        //Si la ficha se puede coloca, se coloca y se le quita de la mano
        if (game.putInBoardLeft(auxFicha)) {
            game.quitPieceJ1(auxFicha);
        }
        else{
            return false;
        }
    }

    else if (strcmp( extremo, "derecha\n") == 0)
    {
        //Si la ficha se puede coloca, se coloca y se le quita de la mano
        if (game.putInBoardRight(auxFicha)) {
            game.quitPieceJ1(auxFicha);
        }
        else{
            return false;
        }
    }

    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
leaq 0xed1(%rip), %rsi       # 0x9991
movq %rdx, %rdi
callq 0x2280
testl %eax, %eax
je 0x8af0
leaq 0xeb5(%rip), %rsi       # 0x9988
movq %r15, %rdi
callq 0x2280
movl %eax, %ecx
movb $0x1, %al
testl %ecx, %ecx
jne 0x8b10
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x8bec
jmp 0x8afb
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x8b90
testb %al, %al
je 0x8b0e
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x52da
movb $0x1, %al
jmp 0x8b10
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/janthonyo[P]Redes-Practicas/./domino.cc
// Function: domino::putInBoardLeft(ficha)
bool putInBoardLeft(ficha f)
	{
		//Estructura ficha auxiliar para "girar" la ficha
		ficha aux;
		bool inserted = false;

		/*No hace falta considerar el caso con tablero vacio, ya que nunca se
		  va a llamar a esta funcion en esa situacion.*/

		//Se comprueba si la ficha se puede colocar en el extremo inicial.
		if((first == f.left) or (first == f.right))
		{
			if( f.left == first )
			{
				setFirst(f.right);
				aux.left = f.right;
				aux.right = f.left;
				board.insert(board.begin(), aux);
			}

			else
			{
				setFirst(f.left);
				board.insert(board.begin(), f);
			}

			inserted = true;
		}

		//Si no, se devuelve false (valor inicial de inserted)
		return inserted;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x18, %rsp
movq %rsi, -0x10(%rbp)
movl 0x130(%rdi), %eax
cmpl %esi, %eax
sete %dl
movq %rsi, %rcx
shrq $0x20, %rcx
cmpl %ecx, %eax
sete %bl
orb %dl, %bl
cmpb $0x1, %bl
jne 0x8be2
cmpl %esi, %eax
jne 0x8bd0
movl %ecx, 0x130(%rdi)
leaq -0x18(%rbp), %rdx
movl %ecx, (%rdx)
movl %eax, 0x4(%rdx)
jmp 0x8bda
movl %esi, 0x130(%rdi)
leaq -0x10(%rbp), %rdx
movq (%rdi), %rsi
callq 0x546a
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/janthonyo[P]Redes-Practicas/./domino.cc
// Function: domino::putInBoardRight(ficha)
bool putInBoardRight(ficha f)
	{
		//Estructura ficha auxiliar para "girar" la ficha
		ficha aux;
		bool inserted = false;

		/*No hace falta considerar el caso con tablero vacio, ya que nunca se
		  va a llamar a esta funcion en esa situacion.*/

		  //Se comprueba si la ficha se puede colocar en el extremo final.
  		if((last == f.left) or (last == f.right))
  		{
  			if( f.left == last )
  			{
  				setLast(f.right);
  				board.push_back(f);
  			}

  			else
  			{
  				setLast(f.left);
  				aux.left = f.right;
  				aux.right = f.left;
  				board.push_back(aux);
  			}

  			inserted = true;
  		}

		//Si no, se devuelve false (valor inicial de inserted)
		return inserted;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x18, %rsp
movq %rsi, -0x18(%rbp)
movl 0x134(%rdi), %ecx
cmpl %esi, %ecx
sete %dl
movq %rsi, %rax
shrq $0x20, %rax
cmpl %eax, %ecx
sete %bl
orb %dl, %bl
cmpb $0x1, %bl
jne 0x8c66
cmpl %esi, %ecx
jne 0x8c30
movl %eax, 0x134(%rdi)
movq 0x8(%rdi), %rax
cmpq 0x10(%rdi), %rax
je 0x8c54
movq %rsi, (%rax)
jmp 0x8c4d
movl %esi, 0x134(%rdi)
movl %eax, -0x10(%rbp)
movl %esi, -0xc(%rbp)
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x8c5d
movq -0x10(%rbp), %rax
movq %rax, (%rsi)
addq $0x8, 0x8(%rdi)
jmp 0x8c66
leaq -0x18(%rbp), %rdx
movq %rax, %rsi
jmp 0x8c61
leaq -0x10(%rbp), %rdx
callq 0x5066
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Stygain[P]bandwidth-monitor/src/main.cpp
// Function: updateInterfaceUI()
void updateInterfaceUI()
{
	interfaceHeader->Print();
	for (size_t i = 0; i < interfaces.size(); ++i)
	{
		interfaces[i]->Print();
	}
	footer->Print();
	refresh();
}

// Assembly:
pushq %rbx
movq 0xc3c5(%rip), %rdi      # 0x10308
callq 0x945a
movq 0xc3d9(%rip), %rax      # 0x10328
cmpq %rax, 0xc3da(%rip)      # 0x10330
je 0x3f80
xorl %ebx, %ebx
movq (%rax,%rbx,8), %rdi
callq 0x9d00
incq %rbx
movq 0xc3c3(%rip), %rcx      # 0x10330
movq 0xc3b4(%rip), %rax      # 0x10328
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rcx, %rbx
jb 0x3f5a
movq 0xc3b9(%rip), %rdi      # 0x10340
callq 0xad70
popq %rbx
jmp 0x3530
// File: /workspace/github_cpp_makefile_star2_O3/Stygain[P]bandwidth-monitor/src/main.cpp
// Function: updateGraphs()
void updateGraphs()
{
	switch (gm)
	{
		case GM_ONE:
		{
			graphs[0]->Update();
			break;
		}
		case GM_TWO_WIDE:
		case GM_TWO_TALL:
		{
			graphs[0]->Update();
			graphs[1]->Update();
			break;
		}
		case GM_FOUR_WIDE:
		case GM_FOUR_TALL:
		case GM_TWO_WIDE_TWO_TALL:
		{
			graphs[0]->Update();
			graphs[1]->Update();
			graphs[2]->Update();
			graphs[3]->Update();
			break;
		}
	}
}

// Assembly:
pushq %rax
movl 0xabbc(%rip), %eax      # 0x10378
leal -0x3(%rax), %ecx
cmpl $0x3, %ecx
jb 0x57e8
leal -0x1(%rax), %ecx
cmpl $0x2, %ecx
jae 0x5824
movq 0xab8d(%rip), %rax      # 0x10360
movq (%rax), %rdi
callq 0x8c8a
movq 0xab7e(%rip), %rax      # 0x10360
addq $0x8, %rax
jmp 0x582f
movq 0xab71(%rip), %rax      # 0x10360
movq (%rax), %rdi
callq 0x8c8a
movq 0xab62(%rip), %rax      # 0x10360
movq 0x8(%rax), %rdi
callq 0x8c8a
movq 0xab52(%rip), %rax      # 0x10360
movq 0x10(%rax), %rdi
callq 0x8c8a
movq 0xab42(%rip), %rax      # 0x10360
addq $0x18, %rax
jmp 0x582f
testl %eax, %eax
jne 0x5838
movq 0xab31(%rip), %rax      # 0x10360
movq (%rax), %rdi
popq %rax
jmp 0x8c8a
popq %rax
retq
// File: /workspace/github_cpp_makefile_star2_O3/Stygain[P]bandwidth-monitor/src/main.cpp
// Function: deactivateGraphs()
void deactivateGraphs()
{
	switch (gm)
	{
		case GM_ONE:
		{
			graphs[0]->setActive(false);
			break;
		}
		case GM_TWO_WIDE:
		case GM_TWO_TALL:
		{
			graphs[0]->setActive(false);
			graphs[1]->setActive(false);
			break;
		}
		case GM_FOUR_WIDE:
		case GM_FOUR_TALL:
		case GM_TWO_WIDE_TWO_TALL:
		{
			graphs[0]->setActive(false);
			graphs[1]->setActive(false);
			graphs[2]->setActive(false);
			graphs[3]->setActive(false);
			break;
		}
	}
}

// Assembly:
pushq %rax
movl 0xab37(%rip), %eax      # 0x10378
leal -0x3(%rax), %ecx
cmpl $0x3, %ecx
jb 0x586f
leal -0x1(%rax), %ecx
cmpl $0x2, %ecx
jae 0x58b1
movq 0xab08(%rip), %rax      # 0x10360
movq (%rax), %rdi
xorl %esi, %esi
callq 0x8e8a
movq 0xaaf7(%rip), %rax      # 0x10360
addq $0x8, %rax
jmp 0x58bc
movq 0xaaea(%rip), %rax      # 0x10360
movq (%rax), %rdi
xorl %esi, %esi
callq 0x8e8a
movq 0xaad9(%rip), %rax      # 0x10360
movq 0x8(%rax), %rdi
xorl %esi, %esi
callq 0x8e8a
movq 0xaac7(%rip), %rax      # 0x10360
movq 0x10(%rax), %rdi
xorl %esi, %esi
callq 0x8e8a
movq 0xaab5(%rip), %rax      # 0x10360
addq $0x18, %rax
jmp 0x58bc
testl %eax, %eax
jne 0x58c7
movq 0xaaa4(%rip), %rax      # 0x10360
movq (%rax), %rdi
xorl %esi, %esi
popq %rax
jmp 0x8e8a
popq %rax
retq
// File: /workspace/github_cpp_makefile_star2_O3/Stygain[P]bandwidth-monitor/src/main.cpp
// Function: printGraphs()
void printGraphs()
{
	switch (gm)
	{
		case GM_ONE:
		{
			graphs[0]->Print();
			break;
		}
		case GM_TWO_WIDE:
		case GM_TWO_TALL:
		{
			graphs[0]->Print();
			graphs[1]->Print();
			break;
		}
		case GM_FOUR_WIDE:
		case GM_FOUR_TALL:
		case GM_TWO_WIDE_TWO_TALL:
		{
			graphs[0]->Print();
			graphs[1]->Print();
			graphs[2]->Print();
			graphs[3]->Print();
			break;
		}
	}
}

// Assembly:
pushq %rax
movl 0xaaa8(%rip), %eax      # 0x10378
leal -0x3(%rax), %ecx
cmpl $0x3, %ecx
jb 0x58fc
leal -0x1(%rax), %ecx
cmpl $0x2, %ecx
jae 0x5938
movq 0xaa79(%rip), %rax      # 0x10360
movq (%rax), %rdi
callq 0x8cce
movq 0xaa6a(%rip), %rax      # 0x10360
addq $0x8, %rax
jmp 0x5943
movq 0xaa5d(%rip), %rax      # 0x10360
movq (%rax), %rdi
callq 0x8cce
movq 0xaa4e(%rip), %rax      # 0x10360
movq 0x8(%rax), %rdi
callq 0x8cce
movq 0xaa3e(%rip), %rax      # 0x10360
movq 0x10(%rax), %rdi
callq 0x8cce
movq 0xaa2e(%rip), %rax      # 0x10360
addq $0x18, %rax
jmp 0x5943
testl %eax, %eax
jne 0x594c
movq 0xaa1d(%rip), %rax      # 0x10360
movq (%rax), %rdi
popq %rax
jmp 0x8cce
popq %rax
retq
// File: /workspace/github_cpp_makefile_star2_O3/Stygain[P]bandwidth-monitor/src/main.cpp
// Function: updateAllGraphInterfaces(Interface*)
void updateAllGraphInterfaces(Interface * interface)
{
	switch (gm)
	{
		case GM_ONE:
		{
			graphs[0]->UpdateGraphInterface(interface);
			break;
		}
		case GM_TWO_WIDE:
		case GM_TWO_TALL:
		{
			graphs[0]->UpdateGraphInterface(interface);
			graphs[1]->UpdateGraphInterface(interface);
			break;
		}
		case GM_FOUR_WIDE:
		case GM_FOUR_TALL:
		case GM_TWO_WIDE_TWO_TALL:
		{
			graphs[0]->UpdateGraphInterface(interface);
			graphs[1]->UpdateGraphInterface(interface);
			graphs[2]->UpdateGraphInterface(interface);
			graphs[3]->UpdateGraphInterface(interface);
			break;
		}
	}
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0xaa0a(%rip), %eax      # 0x10378
leal -0x3(%rax), %ecx
cmpl $0x3, %ecx
jb 0x599d
leal -0x1(%rax), %ecx
cmpl $0x2, %ecx
jae 0x59e2
movq 0xa9db(%rip), %rax      # 0x10360
movq (%rax), %rdi
movq %rbx, %rsi
callq 0x8e28
movq 0xa9c9(%rip), %rax      # 0x10360
addq $0x8, %rax
jmp 0x59ed
movq 0xa9bc(%rip), %rax      # 0x10360
movq (%rax), %rdi
movq %rbx, %rsi
callq 0x8e28
movq 0xa9aa(%rip), %rax      # 0x10360
movq 0x8(%rax), %rdi
movq %rbx, %rsi
callq 0x8e28
movq 0xa997(%rip), %rax      # 0x10360
movq 0x10(%rax), %rdi
movq %rbx, %rsi
callq 0x8e28
movq 0xa984(%rip), %rax      # 0x10360
addq $0x18, %rax
jmp 0x59ed
testl %eax, %eax
jne 0x59f9
movq 0xa973(%rip), %rax      # 0x10360
movq (%rax), %rdi
movq %rbx, %rsi
popq %rbx
jmp 0x8e28
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/Stygain[P]bandwidth-monitor/src/main.cpp
// Function: clearGraphs()
void clearGraphs()
{
	switch (gm)
	{
		case GM_ONE:
		{
			graphs[0]->Clear();
			break;
		}
		case GM_TWO_WIDE:
		case GM_TWO_TALL:
		{
			graphs[0]->Clear();
			graphs[1]->Clear();
			break;
		}
		case GM_FOUR_WIDE:
		case GM_FOUR_TALL:
		case GM_TWO_WIDE_TWO_TALL:
		{
			graphs[0]->Clear();
			graphs[1]->Clear();
			graphs[2]->Clear();
			graphs[3]->Clear();
			break;
		}
	}
}

// Assembly:
pushq %rax
movl 0xa976(%rip), %eax      # 0x10378
leal -0x3(%rax), %ecx
cmpl $0x3, %ecx
jb 0x5a2e
leal -0x1(%rax), %ecx
cmpl $0x2, %ecx
jae 0x5a6a
movq 0xa947(%rip), %rax      # 0x10360
movq (%rax), %rdi
callq 0x8d9c
movq 0xa938(%rip), %rax      # 0x10360
addq $0x8, %rax
jmp 0x5a75
movq 0xa92b(%rip), %rax      # 0x10360
movq (%rax), %rdi
callq 0x8d9c
movq 0xa91c(%rip), %rax      # 0x10360
movq 0x8(%rax), %rdi
callq 0x8d9c
movq 0xa90c(%rip), %rax      # 0x10360
movq 0x10(%rax), %rdi
callq 0x8d9c
movq 0xa8fc(%rip), %rax      # 0x10360
addq $0x18, %rax
jmp 0x5a75
testl %eax, %eax
jne 0x5a7e
movq 0xa8eb(%rip), %rax      # 0x10360
movq (%rax), %rdi
popq %rax
jmp 0x8d9c
popq %rax
retq
// File: /workspace/github_cpp_makefile_star2_O3/Stygain[P]bandwidth-monitor/src/graph.cpp
// Function: GraphRow::Update(std::vector<GraphDataColumn*, std::allocator<GraphDataColumn*>>*, int)
void GraphRow::Update(std::vector<GraphDataColumn *> *gDataCols, int max)
{
	werase(this->win);
	float currPos = (float)this->value / (float)this->max;
	for (size_t i = 0; i < gDataCols->size(); i++)
	{
		float valuePercent = (float)gDataCols->at(i)->GetValue() / (float)max;
		float split = (float)1 / (float)this->max;
		if (valuePercent > currPos && valuePercent <= (currPos + split))
		{
			mvwprintw(this->win, 0, i, ".");
		}
		else if (valuePercent > currPos)
		{
			mvwprintw(this->win, 0, i, "|");
		}
		else if (valuePercent == 0 && currPos == 0)
		{
			mvwprintw(this->win, 0, i, "_");
		}
	}

	wrefresh(this->win);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x3050
movq (%r14), %rax
cmpq %rax, 0x8(%r14)
je 0x84fa
cvtsi2ssl 0x8(%rbx), %xmm3
cvtsi2ssl 0xc(%rbx), %xmm0
cvtsi2ss %ebp, %xmm1
movss %xmm1, 0x4(%rsp)
divss %xmm0, %xmm3
leaq 0x40cf(%rip), %r15      # 0xc526
leaq 0x40c6(%rip), %r12      # 0xc524
leaq 0x40c3(%rip), %r13      # 0xc528
xorl %ebp, %ebp
movss %xmm3, (%rsp)
movq (%rax,%rbp,8), %rax
xorps %xmm0, %xmm0
cvtsi2ssl (%rax), %xmm0
divss 0x4(%rsp), %xmm0
ucomiss %xmm3, %xmm0
jbe 0x84ab
xorps %xmm1, %xmm1
cvtsi2ssl 0xc(%rbx), %xmm1
movss 0x408a(%rip), %xmm2     # 0xc51c
divss %xmm1, %xmm2
addss %xmm3, %xmm2
ucomiss %xmm0, %xmm2
movq (%rbx), %rdi
jae 0x84cd
xorl %esi, %esi
movl %ebp, %edx
movq %r15, %rcx
jmp 0x84d4
ucomiss 0x406e(%rip), %xmm0     # 0xc520
jne 0x84e0
jp 0x84e0
ucomiss 0x4063(%rip), %xmm3     # 0xc520
jne 0x84e0
jp 0x84e0
movq (%rbx), %rdi
xorl %esi, %esi
movl %ebp, %edx
movq %r13, %rcx
jmp 0x84d4
xorl %esi, %esi
movl %ebp, %edx
movq %r12, %rcx
xorl %eax, %eax
callq 0x30b0
movss (%rsp), %xmm3
incq %rbp
movq (%r14), %rax
movq 0x8(%r14), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rcx, %rbp
jb 0x846c
movq (%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3310
// File: /workspace/github_cpp_makefile_star2_O3/Stygain[P]bandwidth-monitor/src/graph.cpp
// Function: GraphTitle::Update()
void GraphTitle::Update()
{
	werase(this->win);

	char graphTypeString[graphTypeStringSize];
	getGraphTypeString(this->graphType, graphTypeString);

	if (this->active)
	{
		wattron(this->win, COLOR_PAIR(HEADER_ACTIVE_COLOR));
	}
	if (this->interface == NULL)
	{
		wprintw(this->win, "%s", graphTypeString);
	}
	else
	{
		wprintw(this->win, "%s through %s", graphTypeString, interface->name);
	}
	if (this->active)
	{
		wattroff(this->win, COLOR_PAIR(HEADER_ACTIVE_COLOR));
	}

	wrefresh(this->win);
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x3050
movl 0x18(%rbx), %edi
movq %rsp, %rsi
callq 0xa41b
cmpb $0x1, 0x28(%rbx)
jne 0x8578
movq (%rbx), %rdi
movl $0x400, %esi            # imm = 0x400
xorl %edx, %edx
callq 0x3180
movq (%rbx), %rdi
movq 0x20(%rbx), %rax
testq %rax, %rax
je 0x859a
movq (%rax), %rcx
leaq 0x3f9c(%rip), %rsi      # 0xc52a
movq %rsp, %rdx
xorl %eax, %eax
callq 0x3060
jmp 0x85ab
leaq 0x417d(%rip), %rsi      # 0xc71e
movq %rsp, %rdx
xorl %eax, %eax
callq 0x3060
cmpb $0x1, 0x28(%rbx)
jne 0x85c0
movq (%rbx), %rdi
movl $0x400, %esi            # imm = 0x400
xorl %edx, %edx
callq 0x33b0
movq (%rbx), %rdi
callq 0x3310
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/Stygain[P]bandwidth-monitor/src/graph.cpp
// Function: Graph::Graph(GraphType, std::vector<Interface*, std::allocator<Interface*>>*)
Graph::Graph(GraphType graphType, std::vector<Interface *> *interfaces)
{
	this->graphType = graphType;
	this->interfaces = interfaces;

	this->graphTitle = new GraphTitle(this->graphType, NULL);
	this->graphMaxItem = new GraphMaxItem();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
xorl %r15d, %r15d
movq %r15, 0x28(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x48(%rdi)
movups %xmm0, 0x58(%rdi)
movups %xmm0, 0x68(%rdi)
movl %esi, 0x30(%rdi)
movq %rdx, 0x20(%rdi)
movl $0x30, %edi
callq 0x32c0
movb $0x0, 0x28(%rax)
movq %r15, 0x20(%rax)
movl %ebx, 0x18(%rax)
movq %rax, 0x38(%r14)
movl $0x20, %edi
callq 0x32c0
movl $0x0, 0x18(%rax)
movq %rax, 0x40(%r14)
popq %rbx
popq %r14
popq %r15
retq
nop