// File: /workspace/github_c_makefile_star2_O0/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
subq $0x100, %rsp            # imm = 0x100
movq 0x733e(%rip), %rsi      # 0x20fd0
leaq -0x18(%rbp), %rdi
movq %rdi, -0xa0(%rbp)
callq 0x9e80
movq -0xa0(%rbp), %rcx
movq 0x7310(%rip), %rdi      # 0x20fc0
leaq -0x8(%rbp), %rsi
movl $0x1, %edx
xorl %r9d, %r9d
movl %r9d, %r8d
callq 0xa5b0
jmp 0x19cc6
leaq -0x18(%rbp), %rdi
callq 0xa620
movl $0x10, %edi
callq 0x8780
movq %rax, -0x30(%rbp)
movl -0x8(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x4(%rax)
movl -0x8(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, (%rax)
movslq -0x8(%rbp), %rdi
shlq $0x3, %rdi
callq 0x8780
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x8(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0x1a003
movl $0xc, %edi
callq 0x8780
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq 0x7265(%rip), %rsi      # 0x20fa0
leaq -0x48(%rbp), %rdi
movq %rdi, -0xa8(%rbp)
callq 0x9e80
movq -0xb0(%rbp), %rsi
movq -0xa8(%rbp), %rcx
movq 0x7260(%rip), %rdi      # 0x20fc0
movl $0x1, %edx
xorl %r9d, %r9d
movl %r9d, %r8d
callq 0xa5b0
jmp 0x19d72
leaq -0x48(%rbp), %rdi
callq 0xa620
movq -0x38(%rbp), %rax
incq %rax
movq %rax, -0xc0(%rbp)
movq 0x7210(%rip), %rsi      # 0x20fa0
leaq -0x58(%rbp), %rdi
movq %rdi, -0xb8(%rbp)
callq 0x9e80
movq -0xc0(%rbp), %rsi
movq -0xb8(%rbp), %rcx
movq 0x720b(%rip), %rdi      # 0x20fc0
movl $0x1, %edx
xorl %r9d, %r9d
movl %r9d, %r8d
callq 0xa5b0
jmp 0x19dc7
leaq -0x58(%rbp), %rdi
callq 0xa620
movq -0x38(%rbp), %rax
addq $0x2, %rax
movq %rax, -0xd0(%rbp)
movq 0x71ba(%rip), %rsi      # 0x20fa0
leaq -0x68(%rbp), %rdi
movq %rdi, -0xc8(%rbp)
callq 0x9e80
movq -0xd0(%rbp), %rsi
movq -0xc8(%rbp), %rcx
movq 0x71b5(%rip), %rdi      # 0x20fc0
movl $0x1, %edx
xorl %r9d, %r9d
movl %r9d, %r8d
callq 0xa5b0
jmp 0x19e1d
leaq -0x68(%rbp), %rdi
callq 0xa620
movq -0x38(%rbp), %rax
addq $0x3, %rax
movq %rax, -0xe0(%rbp)
movq 0x7164(%rip), %rsi      # 0x20fa0
leaq -0x78(%rbp), %rdi
movq %rdi, -0xd8(%rbp)
callq 0x9e80
movq -0xe0(%rbp), %rsi
movq -0xd8(%rbp), %rcx
movq 0x715f(%rip), %rdi      # 0x20fc0
movl $0x1, %edx
xorl %r9d, %r9d
movl %r9d, %r8d
callq 0xa5b0
jmp 0x19e73
leaq -0x78(%rbp), %rdi
callq 0xa620
movq -0x38(%rbp), %rax
addq $0x4, %rax
movq %rax, -0xf0(%rbp)
movq 0x710e(%rip), %rsi      # 0x20fa0
leaq -0x88(%rbp), %rdi
movq %rdi, -0xe8(%rbp)
callq 0x9e80
movq -0xf0(%rbp), %rsi
movq -0xe8(%rbp), %rcx
movq 0x7106(%rip), %rdi      # 0x20fc0
movl $0x1, %edx
xorl %r9d, %r9d
movl %r9d, %r8d
callq 0xa5b0
jmp 0x19ecc
leaq -0x88(%rbp), %rdi
callq 0xa620
movq -0x38(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x100(%rbp)
movq 0x70e2(%rip), %rsi      # 0x20fd0
leaq -0x98(%rbp), %rdi
movq %rdi, -0xf8(%rbp)
callq 0x9e80
movq -0x100(%rbp), %rsi
movq -0xf8(%rbp), %rcx
movq 0x70aa(%rip), %rdi      # 0x20fc0
movl $0x1, %edx
xorl %r9d, %r9d
movl %r9d, %r8d
callq 0xa5b0
jmp 0x19f28
leaq -0x98(%rbp), %rdi
callq 0xa620
movq -0x38(%rbp), %rdx
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x4(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x19d0f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x18(%rbp), %rdi
callq 0xa620
jmp 0x1a010
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x48(%rbp), %rdi
callq 0xa620
jmp 0x1a010
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x58(%rbp), %rdi
callq 0xa620
jmp 0x1a010
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x68(%rbp), %rdi
callq 0xa620
jmp 0x1a010
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x78(%rbp), %rdi
callq 0xa620
jmp 0x1a010
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x88(%rbp), %rdi
callq 0xa620
jmp 0x1a010
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x98(%rbp), %rdi
callq 0xa620
jmp 0x1a010
movq -0x30(%rbp), %rax
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq
movq -0x20(%rbp), %rdi
callq 0x8a50
nopl (%rax)