// File: /workspace/github_c_makefile_star2_O3/Orycterope[P]corewar/src/vm/instructions_p4.c
// Function: store_index
int			store_index(t_process *process, int i)
{
	t_parameters	param;

	param.o = 11;
	decode_ocp(process, &param, i);
	param.jump = 1 + g_op_tab[i].has_ocp;
	if (g_op_tab[i].has_ocp == 0)
		return (1);
	params_value(process, &param, i);
	if (check_registers(&param, process, i) == 1 || g_op_tab[i].param_nbr < 3
	|| check_param_error(param, i) == 1 || g_op_tab[i].param_nbr > 4)
		return (param.jump);
	if (param.type[0] == REG_CODE)
		PV[0] = ft_read_big_endian(PR[PV[0] - 1], REG_SIZE);
	else if (param.type[0] == IND_CODE)
		PV[0] = rm(mem(process->pc + PV[0], 1, PA, process), REG_SIZE, PP);
	if (param.type[1] == REG_CODE)
		PV[1] = ft_read_big_endian(PR[PV[1] - 1], REG_SIZE);
	else if (param.type[1] == IND_CODE)
		PV[1] = rm(mem(process->pc + PV[1], 1, PA, process), REG_SIZE, PP);
	if (param.type[2] == REG_CODE)
		PV[2] = ft_read_big_endian(PR[PV[2] - 1], REG_SIZE);
	else if (param.type[2] == IND_CODE)
		PV[2] = rm(mem(process->pc + PV[2], 1, PA, process), REG_SIZE, PP);
	wm(PV[0], mem(process->pc + PV[1] + PV[2], 1, PA, process), REG_SIZE, PP);
	return (param.jump);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x60, %rsp
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x30(%rsp), %r14
movb $0xb, 0x2c(%r14)
movq %r14, %rsi
movl %ebp, %edx
callq 0x2d28
movslq %ebp, %rax
leaq (%rax,%rax,4), %r15
leaq 0x6ec1(%rip), %r12      # 0xb120
movl 0x20(%r12,%r15,8), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x28(%r14)
testl %eax, %eax
je 0x4306
leaq 0x30(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x2db1
movq %r14, %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0x2e9d
cmpl $0x1, %eax
je 0x4421
leaq (%r12,%r15,8), %r14
cmpl $0x3, 0x8(%r14)
jl 0x4421
movups 0x30(%rsp), %xmm0
movups 0x40(%rsp), %xmm1
movups 0x50(%rsp), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movl %ebp, %edi
callq 0x2f38
cmpl $0x1, %eax
je 0x4421
cmpl $0x5, 0x8(%r14)
jge 0x4421
movzbl 0x30(%rsp), %eax
cmpl $0x3, %eax
je 0x4310
cmpl $0x1, %eax
jne 0x433f
movq 0x38(%rsp), %rax
leaq (%rbx,%rax,4), %rdi
movl $0x4, %esi
callq 0x5439
jmp 0x433a
movl $0x1, %eax
jmp 0x4425
movq 0x48(%rbx), %rdi
movq 0x68(%rbx), %rdx
addq 0x38(%rsp), %rdi
movl $0x1, %esi
movq %rbx, %rcx
callq 0x231c
movl $0x4, %esi
movq %rax, %rdi
movq %rbx, %rdx
callq 0x4668
movq %rax, 0x38(%rsp)
movzbl 0x31(%rsp), %eax
cmpl $0x3, %eax
je 0x4363
cmpl $0x1, %eax
jne 0x4392
movq 0x40(%rsp), %rax
leaq (%rbx,%rax,4), %rdi
movl $0x4, %esi
callq 0x5439
jmp 0x438d
movq 0x48(%rbx), %rdi
movq 0x68(%rbx), %rdx
addq 0x40(%rsp), %rdi
movl $0x1, %esi
movq %rbx, %rcx
callq 0x231c
movl $0x4, %esi
movq %rax, %rdi
movq %rbx, %rdx
callq 0x4668
movq %rax, 0x40(%rsp)
movzbl 0x32(%rsp), %eax
cmpl $0x1, %eax
je 0x43cd
cmpl $0x3, %eax
jne 0x43e7
movq 0x48(%rbx), %rdi
movq 0x68(%rbx), %rdx
addq 0x48(%rsp), %rdi
movl $0x1, %esi
movq %rbx, %rcx
callq 0x231c
movl $0x4, %esi
movq %rax, %rdi
movq %rbx, %rdx
callq 0x4668
jmp 0x43e0
movq 0x48(%rsp), %rax
leaq (%rbx,%rax,4), %rdi
movl $0x4, %esi
callq 0x5439
movq %rax, 0x48(%rsp)
jmp 0x43ec
movq 0x48(%rsp), %rax
movq 0x38(%rsp), %r14
movq 0x48(%rbx), %rdi
movq 0x68(%rbx), %rdx
addq 0x40(%rsp), %rdi
addq %rax, %rdi
movl $0x1, %esi
movq %rbx, %rcx
callq 0x231c
movl $0x4, %edx
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rcx
callq 0x45ac
movl 0x58(%rsp), %eax
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq