// File: /workspace/github_c_makefile_star2_O0/Orycterope[P]corewar/src/vm/instruction_param.c
// Function: params_value
void		params_value(t_process *process, t_parameters *param, int j)
{
	int	i;

	i = 0;
	while (i < g_op_tab[j].param_nbr && i < 4)
	{
		if (param->type[i] == REG_CODE)
		{
			param->value[i] = rm(mem(PC + param->jump, 1, PA, process), 1, PP);
			param->jump += 1;
		}
		else if (param->type[i] == DIR_CODE && param->o != 11 && param->o != 10
				&& param->o != 14)
		{
			param->value[i] = rm(mem(PC + PJ, 1, PA, process), DIR_SIZE, PP);
			param->jump += DIR_SIZE;
		}
		else if (param->type[i] == 0)
			;
		else
		{
			param->value[i] = rm(mem(PC + PJ, 1, PA, process), IND_SIZE, PP);
			param->jump += IND_SIZE;
		}
		i++;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %ecx
movslq -0x14(%rbp), %rax
leaq 0x99e8(%rip), %rdx      # 0xd120
imulq $0x28, %rax, %rax
addq %rax, %rdx
xorl %eax, %eax
cmpl 0x8(%rdx), %ecx
movb %al, -0x19(%rbp)
jge 0x3753
cmpl $0x4, -0x18(%rbp)
setl %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
testb $0x1, %al
jne 0x375f
jmp 0x38dd
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x1, %eax
jne 0x37cc
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rdi
movq -0x10(%rbp), %rax
movslq 0x28(%rax), %rax
addq %rax, %rdi
movq -0x8(%rbp), %rax
movq 0x68(%rax), %rdx
movq -0x8(%rbp), %rcx
movl $0x1, %esi
callq 0x2310
movq %rax, %rdi
movq -0x8(%rbp), %rdx
movl $0x1, %esi
callq 0x5c10
movq %rax, %rdx
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
movq %rdx, 0x8(%rax,%rcx,8)
movq -0x10(%rbp), %rax
movl 0x28(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x28(%rax)
jmp 0x38cf
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x2, %eax
jne 0x3861
movq -0x10(%rbp), %rax
movsbl 0x2c(%rax), %eax
cmpl $0xb, %eax
je 0x3861
movq -0x10(%rbp), %rax
movsbl 0x2c(%rax), %eax
cmpl $0xa, %eax
je 0x3861
movq -0x10(%rbp), %rax
movsbl 0x2c(%rax), %eax
cmpl $0xe, %eax
je 0x3861
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rdi
movq -0x10(%rbp), %rax
movslq 0x28(%rax), %rax
addq %rax, %rdi
movq -0x8(%rbp), %rax
movq 0x68(%rax), %rdx
movq -0x8(%rbp), %rcx
movl $0x1, %esi
callq 0x2310
movq %rax, %rdi
movq -0x8(%rbp), %rdx
movl $0x4, %esi
callq 0x5c10
movq %rax, %rdx
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
movq %rdx, 0x8(%rax,%rcx,8)
movq -0x10(%rbp), %rax
movl 0x28(%rax), %ecx
addl $0x4, %ecx
movl %ecx, 0x28(%rax)
jmp 0x38cd
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
jne 0x3874
jmp 0x38cb
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rdi
movq -0x10(%rbp), %rax
movslq 0x28(%rax), %rax
addq %rax, %rdi
movq -0x8(%rbp), %rax
movq 0x68(%rax), %rdx
movq -0x8(%rbp), %rcx
movl $0x1, %esi
callq 0x2310
movq %rax, %rdi
movq -0x8(%rbp), %rdx
movl $0x2, %esi
callq 0x5c10
movq %rax, %rdx
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
movq %rdx, 0x8(%rax,%rcx,8)
movq -0x10(%rbp), %rax
movl 0x28(%rax), %ecx
addl $0x2, %ecx
movl %ecx, 0x28(%rax)
jmp 0x38cd
jmp 0x38cf
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x372a
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)