LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/Orycterope[P]corewar/src/vm/instructions_p1.c
// Function: store
int		store(t_process *process, int i)
{
	t_parameters	param;

	param.o = 3;
	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 < 2
	|| check_param_error(param, i) == 1 || g_op_tab[i].param_nbr > 4)
		return (param.jump);
	if (param.type[0] == REG_CODE)
		param.value[0] = RBE(PR[param.value[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)
		WBE(PV[0], PR[PV[1] - 1], REG_SIZE);
	else if (param.type[1] == IND_CODE)
		wm(PV[0], mem(process->pc + PV[1], 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 $0x3, 0x2c(%r14)
movq %r14, %rsi
movl %ebp, %edx
callq 0x2cec
movslq %ebp, %rax
imulq $0x28, %rax, %r12
leaq 0x7fea(%rip), %r15      # 0xb120
movl 0x20(%r15,%r12), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x28(%r14)
testl %eax, %eax
je 0x31da
leaq 0x30(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x2d6d
movq %r14, %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0x2e44
cmpl $0x1, %eax
je 0x3262
addq %r12, %r15
cmpl $0x2, 0x8(%r15)
jl 0x3262
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 0x2ec6
cmpl $0x1, %eax
je 0x3262
cmpl $0x5, 0x8(%r15)
jge 0x3262
movzbl 0x30(%rsp), %eax
cmpl $0x3, %eax
je 0x31e2
cmpl $0x1, %eax
jne 0x320d
movq 0x38(%rsp), %rax
leaq (%rbx,%rax,4), %rdi
pushq $0x4
popq %rsi
callq 0x5232
jmp 0x3208
pushq $0x1
popq %rax
jmp 0x3266
movq 0x48(%rbx), %rdi
movq 0x68(%rbx), %rdx
addq 0x38(%rsp), %rdi
pushq $0x1
popq %rsi
movq %rbx, %rcx
callq 0x230c
pushq $0x4
popq %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0x450f
movq %rax, 0x38(%rsp)
movzbl 0x31(%rsp), %eax
cmpl $0x3, %eax
je 0x3234
cmpl $0x1, %eax
jne 0x3262
movq 0x38(%rsp), %rdi
movq 0x40(%rsp), %rax
leaq (%rbx,%rax,4), %rsi
pushq $0x4
popq %rdx
callq 0x5210
jmp 0x3262
movq 0x38(%rsp), %r14
movq 0x48(%rbx), %rdi
movq 0x68(%rbx), %rdx
addq 0x40(%rsp), %rdi
pushq $0x1
popq %rsi
movq %rbx, %rcx
callq 0x230c
pushq $0x4
popq %rdx
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rcx
callq 0x4450
movl 0x58(%rsp), %eax
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Orycterope[P]corewar/src/vm/instructions_p1.c
// Function: addition
int		addition(t_process *process, int i)
{
	t_parameters	param;

	param.o = 4;
	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
	|| param.type[2] != REG_CODE)
		return (param.jump);
	if (param.type[0] == REG_CODE)
		param.value[0] = RBE(PR[param.value[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)
		param.value[1] = RBE(PR[param.value[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);
	WBE(PV[0] + PV[1], PR[PV[2] - 1], REG_SIZE);
	change_carry(process, (PV[0] + PV[1]));
	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 $0x4, 0x2c(%r14)
movq %r14, %rsi
movl %ebp, %edx
callq 0x2cec
movslq %ebp, %rax
imulq $0x28, %rax, %r12
leaq 0x7e7a(%rip), %r15      # 0xb120
movl 0x20(%r15,%r12), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x28(%r14)
testl %eax, %eax
je 0x3355
leaq 0x30(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x2d6d
movq %r14, %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0x2e44
cmpl $0x1, %eax
je 0x3405
addq %r12, %r15
cmpl $0x3, 0x8(%r15)
jl 0x3405
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 0x2ec6
cmpl $0x1, %eax
je 0x3405
cmpl $0x4, 0x8(%r15)
jg 0x3405
cmpb $0x1, 0x32(%rsp)
jne 0x3405
movzbl 0x30(%rsp), %eax
cmpl $0x3, %eax
je 0x335d
cmpl $0x1, %eax
jne 0x3388
movq 0x38(%rsp), %rax
leaq (%rbx,%rax,4), %rdi
pushq $0x4
popq %rsi
callq 0x5232
jmp 0x3383
pushq $0x1
popq %rax
jmp 0x3409
movq 0x48(%rbx), %rdi
movq 0x68(%rbx), %rdx
addq 0x38(%rsp), %rdi
pushq $0x1
popq %rsi
movq %rbx, %rcx
callq 0x230c
pushq $0x4
popq %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0x450f
movq %rax, 0x38(%rsp)
movzbl 0x31(%rsp), %eax
cmpl $0x1, %eax
je 0x33bf
cmpl $0x3, %eax
jne 0x33da
movq 0x48(%rbx), %rdi
movq 0x68(%rbx), %rdx
addq 0x40(%rsp), %rdi
pushq $0x1
popq %rsi
movq %rbx, %rcx
callq 0x230c
pushq $0x4
popq %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0x450f
jmp 0x33d0
movq 0x40(%rsp), %rax
leaq (%rbx,%rax,4), %rdi
pushq $0x4
popq %rsi
callq 0x5232
movq %rax, %rdi
movq %rax, 0x40(%rsp)
jmp 0x33df
movq 0x40(%rsp), %rdi
addq 0x38(%rsp), %rdi
movq 0x48(%rsp), %rax
leaq (%rbx,%rax,4), %rsi
pushq $0x4
popq %rdx
callq 0x5210
movl 0x40(%rsp), %esi
addl 0x38(%rsp), %esi
movq %rbx, %rdi
callq 0x42e5
movl 0x58(%rsp), %eax
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Orycterope[P]corewar/src/vm/instructions_p2.c
// Function: ft_and
int		ft_and(t_process *process, int i)
{
	t_parameters	param;

	param.o = 6;
	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 || param.type[2] != REG_CODE
	|| check_param_error(param, i) == 1 || g_op_tab[i].param_nbr < 3
	|| g_op_tab[i].param_nbr > 4)
		return (param.jump);
	if (param.type[0] == REG_CODE)
		param.value[0] = RBE(process->registers[param.value[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)
		param.value[1] = RBE(process->registers[param.value[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);
	ft_write_big_endian((PV[0] & PV[1]), PR[PV[2] - 1], REG_SIZE);
	change_carry(process, (PV[0] & PV[1]));
	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 $0x6, 0x2c(%r14)
movq %r14, %rsi
movl %ebp, %edx
callq 0x2cec
movslq %ebp, %rax
imulq $0x28, %rax, %r12
leaq 0x7b31(%rip), %r15      # 0xb120
movl 0x20(%r15,%r12), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x28(%r14)
testl %eax, %eax
je 0x3698
leaq 0x30(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x2d6d
movq %r14, %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0x2e44
cmpl $0x1, %eax
je 0x3748
cmpb $0x1, 0x32(%rsp)
jne 0x3748
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 0x2ec6
cmpl $0x1, %eax
je 0x3748
addq %r12, %r15
movl 0x8(%r15), %eax
addl $-0x5, %eax
cmpl $-0x3, %eax
jbe 0x3748
movzbl 0x30(%rsp), %eax
cmpl $0x3, %eax
je 0x36a0
cmpl $0x1, %eax
jne 0x36cb
movq 0x38(%rsp), %rax
leaq (%rbx,%rax,4), %rdi
pushq $0x4
popq %rsi
callq 0x5232
jmp 0x36c6
pushq $0x1
popq %rax
jmp 0x374c
movq 0x48(%rbx), %rdi
movq 0x68(%rbx), %rdx
addq 0x38(%rsp), %rdi
pushq $0x1
popq %rsi
movq %rbx, %rcx
callq 0x230c
pushq $0x4
popq %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0x450f
movq %rax, 0x38(%rsp)
movzbl 0x31(%rsp), %eax
cmpl $0x1, %eax
je 0x3702
cmpl $0x3, %eax
jne 0x371d
movq 0x48(%rbx), %rdi
movq 0x68(%rbx), %rdx
addq 0x40(%rsp), %rdi
pushq $0x1
popq %rsi
movq %rbx, %rcx
callq 0x230c
pushq $0x4
popq %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0x450f
jmp 0x3713
movq 0x40(%rsp), %rax
leaq (%rbx,%rax,4), %rdi
pushq $0x4
popq %rsi
callq 0x5232
movq %rax, %rdi
movq %rax, 0x40(%rsp)
jmp 0x3722
movq 0x40(%rsp), %rdi
andq 0x38(%rsp), %rdi
movq 0x48(%rsp), %rax
leaq (%rbx,%rax,4), %rsi
pushq $0x4
popq %rdx
callq 0x5210
movl 0x40(%rsp), %esi
andl 0x38(%rsp), %esi
movq %rbx, %rdi
callq 0x42e5
movl 0x58(%rsp), %eax
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Orycterope[P]corewar/src/vm/instructions_p2.c
// Function: zjump
int		zjump(t_process *process, int i)
{
	t_parameters	param;

	i += 1;
	param.o = 9;
	param.type[0] = IND_CODE;
	param.value[0] = rm(mem(process->pc + 1, 1, PA, process), IND_SIZE, PP);
	if (process->carry == 1)
		return ((short)PV[0] % IDX_MOD);
	return (1 + IND_SIZE);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x48(%rdi), %rdi
movq 0x68(%rbx), %rdx
incq %rdi
pushq $0x1
popq %rsi
movq %rbx, %rcx
callq 0x230c
pushq $0x2
popq %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0x450f
cmpb $0x1, 0x50(%rbx)
jne 0x3acf
cwtd
movw $0x200, %cx             # imm = 0x200
idivw %cx
movswl %dx, %eax
jmp 0x3ad2
pushq $0x3
popq %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/Orycterope[P]corewar/src/vm/instructions_p2.c
// Function: load_index
int		load_index(t_process *process, int i)
{
	t_parameters	param;

	param.o = 10;
	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)
		param.value[0] = RBE(process->registers[param.value[0] - 1], REG_SIZE);
	if (param.type[1] == REG_CODE)
		param.value[1] = RBE(process->registers[param.value[1] - 1], REG_SIZE);
	PV[0] = rm(mem(process->pc + PV[0] + PV[1], 1, PA, process), REG_SIZE, PP);
	if (param.type[2] == REG_CODE)
		WBE(PV[0], PR[PV[2] - 1], REG_SIZE);
	else if (param.type[2] == IND_CODE)
		wm(PV[0], mem(process->pc + PV[0], 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 $0xa, 0x2c(%r14)
movq %r14, %rsi
movl %ebp, %edx
callq 0x2cec
movslq %ebp, %rax
imulq $0x28, %rax, %r12
leaq 0x7619(%rip), %r15      # 0xb120
movl 0x20(%r15,%r12), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x28(%r14)
testl %eax, %eax
je 0x3bc5
leaq 0x30(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x2d6d
movq %r14, %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0x2e44
cmpl $0x1, %eax
je 0x3c4f
addq %r12, %r15
cmpl $0x3, 0x8(%r15)
jl 0x3c4f
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 0x2ec6
cmpl $0x1, %eax
je 0x3c4f
cmpl $0x5, 0x8(%r15)
jge 0x3c4f
cmpb $0x1, 0x30(%rsp)
jne 0x3ba6
movq 0x38(%rsp), %rax
leaq (%rbx,%rax,4), %rdi
pushq $0x4
popq %rsi
callq 0x5232
movq %rax, 0x38(%rsp)
cmpb $0x1, 0x31(%rsp)
jne 0x3bcd
movq 0x40(%rsp), %rax
leaq (%rbx,%rax,4), %rdi
pushq $0x4
popq %rsi
callq 0x5232
movq %rax, 0x40(%rsp)
jmp 0x3bd2
pushq $0x1
popq %rax
jmp 0x3c53
movq 0x40(%rsp), %rax
movq 0x48(%rbx), %rdi
movq 0x68(%rbx), %rdx
addq 0x38(%rsp), %rdi
addq %rax, %rdi
pushq $0x1
popq %rsi
movq %rbx, %rcx
callq 0x230c
pushq $0x4
popq %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0x450f
movq %rax, %r14
movq %rax, 0x38(%rsp)
movzbl 0x32(%rsp), %eax
cmpl $0x3, %eax
je 0x3c28
cmpl $0x1, %eax
jne 0x3c4f
movq 0x48(%rsp), %rax
leaq (%rbx,%rax,4), %rsi
pushq $0x4
popq %rdx
movq %r14, %rdi
callq 0x5210
jmp 0x3c4f
movq 0x48(%rbx), %rdi
addq %r14, %rdi
movq 0x68(%rbx), %rdx
pushq $0x1
popq %rsi
movq %rbx, %rcx
callq 0x230c
pushq $0x4
popq %rdx
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rcx
callq 0x4450
movl 0x58(%rsp), %eax
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Orycterope[P]corewar/src/vm/instructions_p3.c
// Function: ft_fork
int		ft_fork(t_process *process, int i)
{
	t_parameters	param;

	i += 1;
	param.o = 12;
	param.type[0] = DIR_CODE;
	param.value[0] = rm(mem(process->pc + 1, 1, PA, process), IND_SIZE, PP);
	fork_process(process, mem(PC + (short)PV[0] % IDX_MOD, 1, PA, process));
	return (1 + IND_SIZE);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x48(%rdi), %rdi
movq 0x68(%rbx), %rdx
incq %rdi
pushq $0x1
popq %rbp
movl %ebp, %esi
movq %rbx, %rcx
callq 0x230c
pushq $0x2
popq %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0x450f
movw $0x200, %cx             # imm = 0x200
cwtd
idivw %cx
movswq %dx, %rdi
addq 0x48(%rbx), %rdi
movq 0x68(%rbx), %rdx
movl %ebp, %esi
movq %rbx, %rcx
callq 0x230c
movq %rbx, %rdi
movq %rax, %rsi
callq 0x27fd
pushq $0x3
popq %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Orycterope[P]corewar/src/vm/instructions_p3.c
// Function: long_load
int		long_load(t_process *process, int i)
{
	t_parameters	param;

	param.o = 2;
	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 || param.type[1] != REG_CODE
	|| check_param_error(param, i) == 1 || g_op_tab[i].param_nbr < 2
	|| g_op_tab[i].param_nbr > 4)
		return (param.jump);
	if (param.type[0] == REG_CODE)
		param.value[0] = ft_read_big_endian(PR[param.value[0] - 1], REG_SIZE);
	else if (param.type[0] == IND_CODE)
		PV[0] = rm(mem(process->pc + PV[0], 0, PA, process), REG_SIZE, PP);
	ft_write_big_endian(param.value[0], PR[param.value[1] - 1], REG_SIZE);
	change_carry(process, PV[0]);
	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 $0x2, 0x2c(%r14)
movq %r14, %rsi
movl %ebp, %edx
callq 0x2cec
movslq %ebp, %rax
imulq $0x28, %rax, %r12
leaq 0x742d(%rip), %r15      # 0xb120
movl 0x20(%r15,%r12), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x28(%r14)
testl %eax, %eax
je 0x3dac
leaq 0x30(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x2d6d
movq %r14, %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0x2e44
cmpl $0x1, %eax
je 0x3dee
cmpb $0x1, 0x31(%rsp)
jne 0x3dee
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 0x2ec6
cmpl $0x1, %eax
je 0x3dee
addq %r12, %r15
movl 0x8(%r15), %eax
addl $-0x5, %eax
cmpl $-0x4, %eax
jbe 0x3dee
movzbl 0x30(%rsp), %eax
cmpl $0x1, %eax
je 0x3db1
cmpl $0x3, %eax
jne 0x3dcc
movq 0x48(%rbx), %rdi
movq 0x68(%rbx), %rdx
addq 0x38(%rsp), %rdi
xorl %esi, %esi
movq %rbx, %rcx
callq 0x230c
pushq $0x4
popq %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0x450f
jmp 0x3dc2
pushq $0x1
popq %rax
jmp 0x3df2
movq 0x38(%rsp), %rax
leaq (%rbx,%rax,4), %rdi
pushq $0x4
popq %rsi
callq 0x5232
movq %rax, %rdi
movq %rax, 0x38(%rsp)
jmp 0x3dd1
movq 0x38(%rsp), %rdi
movq 0x40(%rsp), %rax
leaq (%rbx,%rax,4), %rsi
pushq $0x4
popq %rdx
callq 0x5210
movl 0x38(%rsp), %esi
movq %rbx, %rdi
callq 0x42e5
movl 0x58(%rsp), %eax
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Orycterope[P]corewar/src/vm/instructions_p3.c
// Function: long_load_index
int		long_load_index(t_process *process, int i)
{
	t_parameters	param;

	param.o = 14;
	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)
		param.value[0] = RBE(process->registers[param.value[1] - 1], REG_SIZE);
	if (param.type[1] == REG_CODE)
		param.value[1] = RBE(process->registers[param.value[1] - 1], REG_SIZE);
	PV[0] = rm(mem(process->pc + PV[0] + PV[1], 0, PA, process), REG_SIZE, PP);
	if (param.type[2] == REG_CODE)
		WBE(PV[0], PR[PV[2] - 1], REG_SIZE);
	else if (param.type[2] == IND_CODE)
		wm(PV[0], mem(process->pc + PV[0], 0, 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 $0xe, 0x2c(%r14)
movq %r14, %rsi
movl %ebp, %edx
callq 0x2cec
movslq %ebp, %rax
imulq $0x28, %rax, %r12
leaq 0x72ee(%rip), %r15      # 0xb120
movl 0x20(%r15,%r12), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x28(%r14)
testl %eax, %eax
je 0x3ef0
leaq 0x30(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x2d6d
movq %r14, %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0x2e44
cmpl $0x1, %eax
je 0x3f78
addq %r12, %r15
cmpl $0x3, 0x8(%r15)
jl 0x3f78
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 0x2ec6
cmpl $0x1, %eax
je 0x3f78
cmpl $0x5, 0x8(%r15)
jge 0x3f78
cmpb $0x1, 0x30(%rsp)
jne 0x3ed1
movq 0x40(%rsp), %rax
leaq (%rbx,%rax,4), %rdi
pushq $0x4
popq %rsi
callq 0x5232
movq %rax, 0x38(%rsp)
cmpb $0x1, 0x31(%rsp)
jne 0x3ef8
movq 0x40(%rsp), %rax
leaq (%rbx,%rax,4), %rdi
pushq $0x4
popq %rsi
callq 0x5232
movq %rax, 0x40(%rsp)
jmp 0x3efd
pushq $0x1
popq %rax
jmp 0x3f7c
movq 0x40(%rsp), %rax
movq 0x48(%rbx), %rdi
movq 0x68(%rbx), %rdx
addq 0x38(%rsp), %rdi
addq %rax, %rdi
xorl %esi, %esi
movq %rbx, %rcx
callq 0x230c
pushq $0x4
popq %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0x450f
movq %rax, %r14
movq %rax, 0x38(%rsp)
movzbl 0x32(%rsp), %eax
cmpl $0x3, %eax
je 0x3f52
cmpl $0x1, %eax
jne 0x3f78
movq 0x48(%rsp), %rax
leaq (%rbx,%rax,4), %rsi
pushq $0x4
popq %rdx
movq %r14, %rdi
callq 0x5210
jmp 0x3f78
movq 0x48(%rbx), %rdi
addq %r14, %rdi
movq 0x68(%rbx), %rdx
xorl %esi, %esi
movq %rbx, %rcx
callq 0x230c
pushq $0x4
popq %rdx
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rcx
callq 0x4450
movl 0x58(%rsp), %eax
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Orycterope[P]corewar/src/vm/instructions_p3.c
// Function: long_fork
int		long_fork(t_process *process, int i)
{
	t_parameters	param;

	i += 1;
	param.o = 15;
	param.type[0] = DIR_CODE;
	param.value[0] = rm(mem(process->pc + 1, 0, PA, process), IND_SIZE, PP);
	fork_process(process, mem(process->pc + (short)PV[0], 0, PA, process));
	return (1 + IND_SIZE);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x48(%rdi), %rdi
movq 0x68(%rbx), %rdx
incq %rdi
xorl %esi, %esi
movq %rbx, %rcx
callq 0x230c
pushq $0x2
popq %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0x450f
movswq %ax, %rdi
addq 0x48(%rbx), %rdi
movq 0x68(%rbx), %rdx
xorl %esi, %esi
movq %rbx, %rcx
callq 0x230c
movq %rbx, %rdi
movq %rax, %rsi
callq 0x27fd
pushq $0x3
popq %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/Orycterope[P]corewar/src/vm/instructions_p3.c
// Function: aff
int		aff(t_process *process, int i)
{
	t_parameters	param;

	param.o = 16;
	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 > 4
	|| check_param_error(param, i) == 1 || g_op_tab[i].param_nbr < 1)
		return (param.jump);
	if (param.type[0] == REG_CODE)
		param.value[0] = RBE(process->registers[param.value[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);
	ft_putchar(PV[0] % 256);
	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 $0x10, 0x2c(%r14)
movq %r14, %rsi
movl %ebp, %edx
callq 0x2cec
movslq %ebp, %rax
imulq $0x28, %rax, %r12
leaq 0x7117(%rip), %r15      # 0xb120
movl 0x20(%r15,%r12), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x28(%r14)
testl %eax, %eax
je 0x40ba
leaq 0x30(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x2d6d
movq %r14, %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0x2e44
cmpl $0x1, %eax
je 0x40e4
addq %r12, %r15
cmpl $0x4, 0x8(%r15)
jg 0x40e4
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 0x2ec6
cmpl $0x1, %eax
je 0x40e4
cmpl $0x0, 0x8(%r15)
jle 0x40e4
movzbl 0x30(%rsp), %eax
cmpl $0x1, %eax
je 0x40bf
cmpl $0x3, %eax
jne 0x40d7
movq 0x48(%rbx), %rdi
movq 0x68(%rbx), %rdx
addq 0x38(%rsp), %rdi
pushq $0x1
popq %rsi
movq %rbx, %rcx
callq 0x230c
pushq $0x4
popq %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0x450f
jmp 0x40d0
pushq $0x1
popq %rax
jmp 0x40e8
movq 0x38(%rsp), %rax
leaq (%rbx,%rax,4), %rdi
pushq $0x4
popq %rsi
callq 0x5232
movq %rax, 0x38(%rsp)
jmp 0x40dc
movq 0x38(%rsp), %rax
movsbl %al, %edi
callq 0x51d4
movl 0x58(%rsp), %eax
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/Orycterope[P]corewar/src/vm/execution.c
// Function: get_wait_time
void			get_wait_time(t_process **p)
{
	int	op_code;
	int	i;

	i = 0;
	op_code = (*p)->pc[0];
	(*p)->op_code = op_code;
	while (g_op_tab[i].name != NULL)
	{
		if (g_op_tab[i].op_code == op_code)
		{
			(*p)->cycles_to_wait = g_op_tab[i].cycles - 1;
			(*p)->op_code = op_code;
		}
		i++;
	}
}

// Assembly:
movq (%rdi), %rax
movq 0x48(%rax), %rcx
movsbl (%rcx), %ecx
movl %ecx, 0x64(%rax)
leaq 0x6e20(%rip), %rdx      # 0xb120
addq $0x14, %rdx
cmpq $0x0, -0x14(%rdx)
je 0x4320
cmpb %cl, -0x4(%rdx)
jne 0x431a
movl (%rdx), %esi
decl %esi
movl %esi, 0x54(%rax)
movl %ecx, 0x64(%rax)
addq $0x28, %rdx
jmp 0x4304
retq
// File: /workspace/github_c_makefile_star2_O2/Orycterope[P]corewar/src/vm/execution.c
// Function: start_fight
void			start_fight(t_arena *arena)
{
	int		lives;

	while (arena->processes != NULL && update_display(arena))
	{
		execute_processes(arena);
		if (arena->cycle >= arena->last_check_cycle + arena->cycle_to_die)
		{
			lives = count_lives(arena);
			check_processes(arena);
			arena->last_check_cycle = arena->cycle;
			arena->checks_without_decrement++;
			if (arena->checks_without_decrement >= MAX_CHECKS
					|| lives >= NBR_LIVE)
			{
				arena->cycle_to_die -= CYCLE_DELTA;
				arena->checks_without_decrement = 0;
			}
		}
		if (arena->cycle == arena->dump_cycle)
		{
			dump_memory(arena);
			break ;
		}
		arena->cycle++;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x28(%rdi), %r12
movq %rsp, %r14
cmpq $0x0, (%r12)
je 0x4428
movq %rbx, %rdi
callq 0x4761
testl %eax, %eax
je 0x4428
movq %r12, %r15
movq (%r15), %r15
movq %r15, (%rsp)
testq %r15, %r15
je 0x43ab
movl 0x54(%r15), %eax
testl %eax, %eax
jns 0x4374
movq %r14, %rdi
callq 0x42ec
movl 0x54(%r15), %eax
testl %eax, %eax
jg 0x439f
movq 0x48(%r15), %r13
movq %r15, %rdi
callq 0x2e86
movslq %eax, %rdi
addq %r13, %rdi
xorl %esi, %esi
movq %rbx, %rdx
movq %r15, %rcx
callq 0x230c
movq %rax, 0x48(%r15)
movl 0x54(%r15), %eax
decl %eax
movl %eax, 0x54(%r15)
addq $0x70, %r15
jmp 0x4354
movl 0x10(%rbx), %eax
movl 0x14(%rbx), %ecx
addl 0x18(%rbx), %ecx
cmpl %ecx, %eax
jl 0x4419
xorl %ebp, %ebp
movq %r12, %rax
movq (%rax), %rax
testq %rax, %rax
je 0x43ce
addl 0x60(%rax), %ebp
addq $0x70, %rax
jmp 0x43bd
movq (%r12), %rdi
testq %rdi, %rdi
je 0x43f8
movq 0x70(%rdi), %r15
cmpl $0x0, 0x58(%rdi)
je 0x43ee
andl $0x0, 0x60(%rdi)
andl $0x0, 0x58(%rdi)
movq %r15, %rdi
jmp 0x43d2
callq 0x280b
movq %r15, %rdi
jmp 0x43d2
movl 0x10(%rbx), %eax
movl 0x1c(%rbx), %ecx
movl %eax, 0x18(%rbx)
leal 0x1(%rcx), %edx
movl %edx, 0x1c(%rbx)
cmpl $0x8, %ecx
jg 0x4411
cmpl $0x15, %ebp
jl 0x4419
addl $-0x32, 0x14(%rbx)
andl $0x0, 0x1c(%rbx)
cmpl 0x20(%rbx), %eax
je 0x4437
incl %eax
movl %eax, 0x10(%rbx)
jmp 0x4336
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x23ef
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/Orycterope[P]corewar/src/vm/read_write.c
// Function: wm
int			wm(long long n, void *dst, size_t l, t_process *p)
{
	size_t	i;
	char	*dest;
	t_arena	*a;

	if (l == 0)
		return (0);
	dest = (char *)(dst + l - 1);
	a = p->arena;
	i = 0;
	while (i < l)
	{
		if (dest >= a->memory + MEM_SIZE)
			dest -= MEM_SIZE;
		else if (dest < a->memory)
			dest += MEM_SIZE;
		if (a->display != NULL)
			save_for_display(p, (int)(dest - a->memory));
		*dest-- = (n & 0xFF);
		n >>= 8;
		i++;
	}
	return (i);
}

// Assembly:
testq %rdx, %rdx
je 0x450c
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rsi, %r15
movq %rdi, %r12
addq %rdx, %r15
movq 0x68(%rcx), %rbp
movq %rdx, (%rsp)
movq %rdx, %rbx
subq $0x1, %rbx
jb 0x44f9
leaq -0x1(%r15), %rcx
movq (%rbp), %rax
leaq 0x1000(%rax), %rdx
leaq -0x1001(%r15), %rsi
addq $0xfff, %r15            # imm = 0xFFF
cmpq %rax, %rcx
cmovaeq %rcx, %r15
cmpq %rdx, %rcx
cmovaeq %rsi, %r15
cmpq $0x0, 0x30(%rbp)
je 0x44f0
movq %r15, %r13
subq %rax, %r13
cmpl $0xfff, %r13d           # imm = 0xFFF
ja 0x44f0
movq 0x68(%r14), %rsi
movl %r13d, %edi
callq 0x4c14
testq %rax, %rax
je 0x44f0
movb (%r14), %cl
movb %cl, (%rax)
movb $0x8, 0x1(%rax)
movq 0x68(%r14), %rax
movq 0x30(%rax), %rax
andl $0xfff, %r13d           # imm = 0xFFF
movb %cl, 0x38(%rax,%r13)
movb %r12b, (%r15)
sarq $0x8, %r12
jmp 0x447b
movq (%rsp), %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/Orycterope[P]corewar/src/vm/read_write.c
// Function: rm
long long	rm(char *src, size_t length, t_process *p)
{
	long long		n;
	long long		power;
	unsigned char	*ptr;

	n = 0;
	power = 1;
	ptr = (unsigned char *)src + (length - 1);
	while (length > 0)
	{
		if (ptr >= (unsigned char *)p->arena->memory + MEM_SIZE)
			ptr -= MEM_SIZE;
		else if (ptr < (unsigned char *)p->arena->memory)
			ptr += MEM_SIZE;
		n += ((long long)ptr[0]) * power;
		power <<= 8;
		length--;
		ptr--;
	}
	if ((n & (power >> 1)) != 0)
		while (power != 0x0)
		{
			n |= power;
			power <<= 1;
		}
	return (n);
}

// Assembly:
pushq %r14
pushq %rbx
addq %rsi, %rdi
movabsq $0x1, %rcx
xorl %eax, %eax
movl $0xfff, %r8d            # imm = 0xFFF
movq $-0x1001, %r9           # imm = 0xEFFF
subq $0x1, %rsi
jb 0x4582
leaq -0x1(%rdi), %r10
movq 0x68(%rdx), %r11
movq (%r11), %r11
leaq (%rdi,%r8), %rbx
cmpq %r11, %r10
movl $0x0, %r14d
adcq $-0x1, %r14
cmpq %r11, %r10
cmovaeq %r10, %rbx
addq $0x1000, %r11           # imm = 0x1000
orq %r8, %r14
cmpq %r11, %r10
cmovaeq %r9, %r14
movzbl (%rdi,%r14), %r10d
leaq (%rdi,%r9), %rdi
cmovbq %rbx, %rdi
imulq %rcx, %r10
addq %r10, %rax
shlq $0x8, %rcx
jmp 0x452e
movq %rcx, %rdx
sarq %rdx
testq %rax, %rdx
setne %dl
testq %rcx, %rcx
setne %sil
andb %dl, %sil
cmpb $0x1, %sil
jne 0x45a6
orq %rcx, %rax
addq %rcx, %rcx
jne 0x459e
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O2/Orycterope[P]corewar/src/vm/check_player.c
// Function: check_display_and_n_flags
void	check_display_and_n_flags(char **argv)
{
	while (*++argv)
	{
		if (ft_strcmp("-n", *argv) == 0)
		{
			ft_putendl_fd("Flag -n cannot be used with flag -v", 2);
			exit(0);
		}
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
addq $0x8, %rbx
leaq 0x2aba(%rip), %r14      # 0x70a6
movq (%rbx), %rsi
testq %rsi, %rsi
je 0x461a
movq %r14, %rdi
callq 0x5100
addq $0x8, %rbx
testl %eax, %eax
jne 0x45ec
leaq 0x2ed2(%rip), %rdi      # 0x74dd
pushq $0x2
popq %rsi
callq 0x51fc
xorl %edi, %edi
callq 0x21d0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O2/Orycterope[P]corewar/src/vm/display.c
// Function: init_display
void		init_display(t_arena *arena)
{
	initscr();
	start_color();
	cbreak();
	noecho();
	curs_set(0);
	init_color(COLOR_WHITE, 400, 400, 400);
	init_pair(0, COLOR_WHITE, COLOR_BLACK);
	init_colors(arena->players);
	arena->display = (t_display *)ft_memalloc(sizeof(t_display));
	arena->display->updates = NULL;
	arena->display->running = 0;
	arena->display->quitting = 0;
	arena->display->cps = 50;
	init_mem_display(arena);
	attribute_src_code(arena);
	init_info_display(arena);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x20b0
callq 0x20e0
callq 0x2150
callq 0x20a0
xorl %edi, %edi
callq 0x2060
pushq $0x7
popq %rbp
movl %ebp, %edi
movl $0x190, %esi            # imm = 0x190
movl $0x190, %edx            # imm = 0x190
movl $0x190, %ecx            # imm = 0x190
callq 0x2190
xorl %edi, %edi
movl %ebp, %esi
xorl %edx, %edx
callq 0x2160
leaq 0x8(%rbx), %r15
movq 0x8(%rbx), %rdi
callq 0x4f72
movl $0x1038, %edi           # imm = 0x1038
callq 0x51a0
movq %rax, 0x30(%rbx)
andq $0x0, (%rax)
movabsq $0x3200000000, %rcx     # imm = 0x3200000000
movq %rcx, 0x8(%rax)
andl $0x0, 0x10(%rax)
movq %rbx, %rdi
callq 0x4cad
leaq 0x29ef(%rip), %r14      # 0x70a0
movq (%r15), %r15
testq %r15, %r15
je 0x474b
movq 0x30(%rbx), %rax
movq 0x28(%rax), %rdi
imull $0xa00, (%r15), %eax    # imm = 0xA00
addl $0x600, %eax            # imm = 0x600
movzwl %ax, %esi
xorl %edx, %edx
callq 0x2100
movl 0x28(%r15), %r12d
subl (%rbx), %r12d
xorl %r13d, %r13d
movl 0x20(%r15), %eax
movq 0x30(%rbx), %rcx
movq 0x28(%rcx), %rdi
cmpq %rax, %r13
jae 0x472c
leal (%r12,%r13), %ebp
movl %ebp, %esi
shrl $0x6, %esi
movl %ebp, %eax
andl $0x3f, %eax
leal (%rax,%rax,2), %edx
addl $0x9, %edx
movq (%rbx), %rax
movzbl (%rax,%rbp), %r8d
movq %r14, %rcx
xorl %eax, %eax
callq 0x20d0
movb (%r15), %al
movq 0x30(%rbx), %rcx
incq %r13
movb %al, 0x38(%rcx,%rbp)
jmp 0x46e5
imull $0xa00, (%r15), %eax    # imm = 0xA00
addl $0x600, %eax            # imm = 0x600
movzwl %ax, %esi
xorl %edx, %edx
callq 0x2200
addq $0x38, %r15
jmp 0x46b1
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x482c
// File: /workspace/github_c_makefile_star2_O2/Orycterope[P]corewar/src/vm/display.c
// Function: update_display
int			update_display(t_arena *arena)
{
	if (arena->display == NULL)
		return (1);
	highlight_rw(arena);
	highlight_pcs(arena);
	overwrite(arena->display->w_bkp, arena->display->w_mem);
	overlay(arena->display->w_pcs, arena->display->w_mem);
	wrefresh(arena->display->w_mem);
	regulate_speed(arena);
	return (!arena->display->quitting);
}

// Assembly:
cmpq $0x0, 0x30(%rdi)
je 0x47bf
pushq %rbx
movq %rdi, %rbx
callq 0x4e3d
movq %rbx, %rdi
callq 0x4d87
movq 0x30(%rbx), %rax
movq 0x18(%rax), %rsi
movq 0x28(%rax), %rdi
callq 0x2130
movq 0x30(%rbx), %rax
movq 0x18(%rax), %rsi
movq 0x20(%rax), %rdi
callq 0x2180
movq 0x30(%rbx), %rax
movq 0x18(%rax), %rdi
callq 0x20c0
movq %rbx, %rdi
callq 0x4ade
movq 0x30(%rbx), %rcx
xorl %eax, %eax
cmpl $0x0, 0x10(%rcx)
sete %al
popq %rbx
retq
pushq $0x1
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/Orycterope[P]corewar/src/vm/display.c
// Function: destroy_display
void		destroy_display(t_arena *arena)
{
	delwin(arena->display->w_mem);
	delwin(arena->display->w_info);
	delwin(arena->display->w_bkp);
	while (arena->display->updates != NULL)
		remove_update_struct(arena->display->updates, arena);
	free(arena->display);
	init_color(COLOR_WHITE, 680, 680, 680);
	endwin();
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x30(%rdi), %rax
movq 0x18(%rax), %rdi
callq 0x2140
movq 0x30(%rbx), %rax
movq 0x30(%rax), %rdi
callq 0x2140
movq 0x30(%rbx), %rax
movq 0x28(%rax), %rdi
callq 0x2140
movq 0x30(%rbx), %rdi
movq (%rdi), %rax
testq %rax, %rax
je 0x4807
movq %rax, %rdi
movq %rbx, %rsi
callq 0x4c85
jmp 0x47ee
callq 0x2040
pushq $0x7
popq %rdi
movl $0x2a8, %esi            # imm = 0x2A8
movl $0x2a8, %edx            # imm = 0x2A8
movl $0x2a8, %ecx            # imm = 0x2A8
callq 0x2190
popq %rbx
jmp 0x21f0
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/Orycterope[P]corewar/src/vm/display_infos.c
// Function: init_info_display
void		init_info_display(t_arena *arena)
{
	int			line;
	t_player	*player;

	arena->display->w_info = newwin(30, 50, 10, 64 * 3 + 15);
	wtimeout(arena->display->w_info, 0);
	wprintw(arena->display->w_info,
			"Dumping memory at cycle %-5d (%d processus)"
			"\n\n\nCycles per second : %4d", 0, count_processes(arena), 0);
	player = arena->players;
	line = 5;
	while (player != NULL)
	{
		mvwprintw(arena->display->w_info, line, 0,
				"Player \n\tProcessus : %6d\n\tLast live: %6d", 1, 0);
		wattron(arena->display->w_info, COLOR_PAIR(player->id));
		mvwprintw(arena->display->w_info, line, 8, player->name);
		wattroff(arena->display->w_info, COLOR_PAIR(player->id));
		line += 4;
		player = player->next;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x1e
popq %rdi
pushq $0x32
popq %rsi
pushq $0xa
popq %rdx
movl $0xcf, %ecx
callq 0x2050
movq 0x30(%rbx), %rcx
movq %rax, 0x30(%rcx)
movq %rax, %rdi
xorl %esi, %esi
callq 0x2120
movq 0x30(%rbx), %rax
movq 0x30(%rax), %r14
movq %rbx, %rdi
callq 0x283a
leaq 0x2cb6(%rip), %rsi      # 0x752c
movq %r14, %rdi
xorl %edx, %edx
movl %eax, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x21e0
leaq 0x8(%rbx), %r13
pushq $0x5
popq %rbp
pushq $0x1
popq %r15
movl $0xffff, %r14d          # imm = 0xFFFF
pushq $0x8
popq %r12
movq (%r13), %r13
testq %r13, %r13
je 0x4918
movq 0x30(%rbx), %rax
movq 0x30(%rax), %rdi
movl %ebp, %esi
xorl %edx, %edx
leaq 0x2cba(%rip), %rcx      # 0x7572
movl %r15d, %r8d
xorl %r9d, %r9d
xorl %eax, %eax
callq 0x20d0
movq 0x30(%rbx), %rax
movq 0x30(%rax), %rdi
movl (%r13), %esi
shll $0x8, %esi
andl %r14d, %esi
xorl %edx, %edx
callq 0x2100
movq 0x30(%rbx), %rax
movq 0x30(%rax), %rdi
movq 0x8(%r13), %rcx
movl %ebp, %esi
movl %r12d, %edx
xorl %eax, %eax
callq 0x20d0
movq 0x30(%rbx), %rax
movq 0x30(%rax), %rdi
movl (%r13), %esi
shll $0x8, %esi
andl %r14d, %esi
xorl %edx, %edx
callq 0x2200
addl $0x4, %ebp
addq $0x38, %r13
jmp 0x489c
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Orycterope[P]corewar/src/vm/display_infos.c
// Function: update_infos
void		update_infos(t_arena *a)
{
	t_player	*player;
	t_process	*p;
	int			line;
	int			i;

	mvwprintw(a->display->w_info, 0, 24, "%-5d (%d processus)",
			a->cycle, count_processes(a));
	mvwprintw(a->display->w_info, 3, 20, "%4d", a->display->cps);
	line = 6;
	player = a->players;
	while (player != NULL)
	{
		i = 0;
		p = a->processes;
		while (p != NULL)
		{
			if (p->player == player->id)
				i++;
			p = p->next;
		}
		mvwprintw(a->display->w_info, line, 20, "%6d", i);
		mvwprintw(a->display->w_info, line + 1, 20, "%6d", player->last_live);
		line += 4;
		player = player->next;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x30(%rdi), %rax
movq 0x30(%rax), %r14
movl 0x10(%rdi), %ebp
callq 0x283a
leaq 0x2c4f(%rip), %rcx      # 0x759b
pushq $0x18
popq %rdx
movq %r14, %rdi
xorl %esi, %esi
movl %ebp, %r8d
movl %eax, %r9d
xorl %eax, %eax
callq 0x20d0
movq 0x30(%rbx), %rax
movq 0x30(%rax), %rdi
movl 0xc(%rax), %r8d
leaq 0x2bfa(%rip), %rcx      # 0x756e
pushq $0x3
popq %rsi
pushq $0x14
popq %rbp
movl %ebp, %edx
xorl %eax, %eax
callq 0x20d0
leaq 0x8(%rbx), %r12
leaq 0x28(%rbx), %r13
pushq $0x6
popq %r14
leaq 0x2c01(%rip), %r15      # 0x7597
movq (%r12), %r12
testq %r12, %r12
je 0x4a01
xorl %r8d, %r8d
movq %r13, %rax
movq (%rax), %rax
testq %rax, %rax
je 0x49c1
movl (%rax), %ecx
xorl %edx, %edx
cmpl (%r12), %ecx
sete %dl
addl %edx, %r8d
addq $0x70, %rax
jmp 0x49a5
movq 0x30(%rbx), %rax
movq 0x30(%rax), %rdi
movl %r14d, %esi
movl %ebp, %edx
movq %r15, %rcx
xorl %eax, %eax
callq 0x20d0
movq 0x30(%rbx), %rax
movq 0x30(%rax), %rdi
movl %r14d, %esi
orl $0x1, %esi
movl 0x30(%r12), %r8d
movl %ebp, %edx
movq %r15, %rcx
xorl %eax, %eax
callq 0x20d0
addl $0x4, %r14d
addq $0x38, %r12
jmp 0x4996
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Orycterope[P]corewar/src/vm/display_infos.c
// Function: check_keystroke
int			check_keystroke(t_arena *a)
{
	char	c;
	int		*cps;

	cps = &(a->display->cps);
	c = wgetch(a->display->w_info);
	if (c == 's')
		return (1);
	else if (c == ' ')
		a->display->running = !a->display->running;
	else if (c == 'j')
		*cps += (*cps < 1000) ? 10 : 1000 - *cps;
	else if (c == 'k')
		*cps -= (*cps >= 11) ? 10 : *cps - 1;
	else if (c == 'l')
		*cps += (*cps < 1000) ? 1 : 0;
	else if (c == ';')
		*cps -= (*cps > 1) ? 1 : 0;
	else if (c == 'q')
		a->display->quitting = 1;
	update_infos(a);
	return (0);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x30(%rdi), %r14
movq 0x30(%r14), %rdi
callq 0x2080
movzbl %al, %eax
leal -0x6a(%rax), %ecx
cmpl $0x9, %ecx
ja 0x4a5e
leaq 0x2ace(%rip), %rax      # 0x7504
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movl 0xc(%r14), %eax
leal -0x3e8(%rax), %ecx
negl %ecx
cmpl $0x3e8, %eax            # imm = 0x3E8
pushq $0xa
popq %rdx
cmovgel %ecx, %edx
addl %eax, %edx
movl %edx, 0xc(%r14)
jmp 0x4acc
cmpl $0x3b, %eax
je 0x4aba
cmpl $0x20, %eax
jne 0x4acc
movq 0x30(%rbx), %rax
xorl %ecx, %ecx
cmpl $0x0, 0x8(%rax)
sete %cl
movl %ecx, 0x8(%rax)
jmp 0x4acc
movl 0xc(%r14), %eax
leal -0x1(%rax), %ecx
cmpl $0xb, %eax
pushq $0xa
popq %rdx
cmovll %ecx, %edx
subl %edx, %eax
movl %eax, 0xc(%r14)
jmp 0x4acc
movl 0xc(%r14), %eax
xorl %ecx, %ecx
cmpl $0x3e8, %eax            # imm = 0x3E8
setl %cl
addl %eax, %ecx
movl %ecx, 0xc(%r14)
jmp 0x4acc
movq 0x30(%rbx), %rax
movl $0x1, 0x10(%rax)
jmp 0x4acc
pushq $0x1
popq %rax
jmp 0x4ad6
movl 0xc(%r14), %eax
xorl %ecx, %ecx
cmpl $0x2, %eax
setge %cl
subl %ecx, %eax
movl %eax, 0xc(%r14)
movq %rbx, %rdi
callq 0x4927
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/Orycterope[P]corewar/src/vm/display_infos.c
// Function: regulate_speed
void		regulate_speed(t_arena *a)
{
	static clock_t	last_release = 0;
	clock_t			now;

	while (1)
	{
		if (check_keystroke(a))
			break ;
		now = clock();
		if ((a->display->running == 1
					&& now >= last_release + CLOCKS_PER_SEC / a->display->cps)
				|| a->display->quitting)
			break ;
	}
	last_release = now;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rbx, %rdi
callq 0x4a10
testl %eax, %eax
jne 0x4b21
callq 0x2090
movq %rax, %r14
movq 0x30(%rbx), %rcx
cmpl $0x1, 0x8(%rcx)
jne 0x4b1b
movl $0xf4240, %eax          # imm = 0xF4240
xorl %edx, %edx
idivl 0xc(%rcx)
cltq
addq 0x68ba(%rip), %rax      # 0xb3d0
cmpq %rax, %r14
jge 0x4b21
cmpl $0x0, 0x10(%rcx)
je 0x4ae5
movq %r14, 0x68a8(%rip)      # 0xb3d0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/Orycterope[P]corewar/src/vm/display_infos.c
// Function: print_winner_display
void		print_winner_display(t_arena *a)
{
	t_player	*p;
	t_player	*best;

	best = a->players;
	p = a->players;
	while (p != NULL)
	{
		if (p->last_live >= best->last_live)
			best = p;
		p = p->next;
	}
	a->display->running = 0;
	update_infos(a);
	wtimeout(a->display->w_info, -1);
	wprintw(a->display->w_info, "\n\n\nThe fight as ended.\n\n");
	wprintw(a->display->w_info, "The winner is ");
	wattron(a->display->w_info, COLOR_PAIR(best->id));
	wprintw(a->display->w_info, "%s\n\n", best->name);
	wattroff(a->display->w_info, COLOR_PAIR(best->id));
	wprintw(a->display->w_info, "Press any key to exit");
	wgetch(a->display->w_info);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rax
movq %rax, %r14
testq %rax, %rax
je 0x4b54
movl 0x30(%rax), %ecx
cmpl 0x30(%r14), %ecx
cmovgeq %rax, %r14
movq 0x38(%rax), %rax
jmp 0x4b3e
movq 0x30(%rbx), %rax
andl $0x0, 0x8(%rax)
movq %rbx, %rdi
callq 0x4927
movq 0x30(%rbx), %rax
movq 0x30(%rax), %rdi
pushq $-0x1
popq %rsi
callq 0x2120
movq 0x30(%rbx), %rax
movq 0x30(%rax), %rdi
leaq 0x2a2c(%rip), %rsi      # 0x75af
xorl %eax, %eax
callq 0x21e0
movq 0x30(%rbx), %rax
movq 0x30(%rax), %rdi
leaq 0x2a2f(%rip), %rsi      # 0x75c8
xorl %eax, %eax
callq 0x21e0
movq 0x30(%rbx), %rax
movq 0x30(%rax), %rdi
movl (%r14), %esi
shll $0x8, %esi
movl $0xffff, %ebp           # imm = 0xFFFF
andl %ebp, %esi
xorl %edx, %edx
callq 0x2100
movq 0x30(%rbx), %rax
movq 0x30(%rax), %rdi
movq 0x8(%r14), %rdx
leaq 0x2a08(%rip), %rsi      # 0x75d7
xorl %eax, %eax
callq 0x21e0
movq 0x30(%rbx), %rax
movq 0x30(%rax), %rdi
movl (%r14), %esi
shll $0x8, %esi
andl %ebp, %esi
xorl %edx, %edx
callq 0x2200
movq 0x30(%rbx), %rax
movq 0x30(%rax), %rdi
leaq 0x29e0(%rip), %rsi      # 0x75dc
xorl %eax, %eax
callq 0x21e0
movq 0x30(%rbx), %rax
movq 0x30(%rax), %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x2080
// File: /workspace/github_c_makefile_star2_O2/Orycterope[P]corewar/src/vm/display_mem.c
// Function: get_update_struct_of
t_d_update	*get_update_struct_of(int i, t_arena *arena)
{
	t_d_update	*u;
	t_d_update	*previous;

	u = arena->display->updates;
	previous = NULL;
	while (u != NULL && u->index != i)
	{
		previous = u;
		u = u->next;
	}
	if (u != NULL)
		return (u);
	u = (t_d_update *)malloc(sizeof(t_d_update));
	if (u == NULL)
		return (NULL);
	ft_bzero(u, sizeof(t_d_update));
	if (previous == NULL)
		arena->display->updates = u;
	else
		previous->next = u;
	u->index = i;
	return (u);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movl %edi, %ebx
movq 0x30(%rsi), %rax
xorl %r12d, %r12d
movq (%rax), %r14
testq %r14, %r14
je 0x4c3f
cmpl %ebx, 0x4(%r14)
je 0x4c76
leaq 0x8(%r14), %rax
movq %r14, %r12
jmp 0x4c28
pushq $0x10
popq %rdi
callq 0x2170
testq %rax, %rax
je 0x4c65
movq %rax, %r14
pushq $0x10
popq %rsi
movq %rax, %rdi
callq 0x50bc
testq %r12, %r12
je 0x4c6a
addq $0x8, %r12
jmp 0x4c6e
xorl %r14d, %r14d
jmp 0x4c76
movq 0x30(%r15), %r12
movq %r14, (%r12)
movl %ebx, 0x4(%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/Orycterope[P]corewar/src/vm/display_mem.c
// Function: init_mem_display
void		init_mem_display(t_arena *arena)
{
	int	i;

	arena->display->w_bkp = newwin(MEM_SIZE / 64, 64 * 3 + 10, 0, 0);
	arena->display->w_mem = newwin(MEM_SIZE / 64, 64 * 3 + 10, 0, 0);
	arena->display->w_pcs = newwin(MEM_SIZE / 64, 64 * 3 + 10, 0, 0);
	i = -1;
	while (++i < MEM_SIZE)
	{
		if (i % 64 == 0 && i != MEM_SIZE - 1)
		{
			if (i != 0)
				wprintw(arena->display->w_bkp, "\n");
			wprintw(arena->display->w_bkp, "%0#6x : ", i);
		}
		wprintw(arena->display->w_bkp, "%02x ",
				(unsigned char)arena->memory[i]);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x40
popq %rbp
movl %ebp, %edi
movl $0xca, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x2050
movq 0x30(%rbx), %rcx
movq %rax, 0x28(%rcx)
movl %ebp, %edi
movl $0xca, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x2050
movq 0x30(%rbx), %rcx
movq %rax, 0x18(%rcx)
movl %ebp, %edi
movl $0xca, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x2050
movq 0x30(%rbx), %rcx
movq %rax, 0x20(%rcx)
leaq 0x238a(%rip), %r14      # 0x7097
leaq 0x28b2(%rip), %r15      # 0x75c6
leaq 0x2385(%rip), %r12      # 0x70a0
xorl %r13d, %r13d
cmpq $0x1000, %r13           # imm = 0x1000
je 0x4d78
movq 0x30(%rbx), %rax
testb $0x3f, %r13b
jne 0x4d5d
testq %r13, %r13
je 0x4d48
movq 0x28(%rax), %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x21e0
movq 0x30(%rbx), %rax
movq 0x28(%rax), %rdi
movq %r14, %rsi
movl %r13d, %edx
xorl %eax, %eax
callq 0x21e0
movq 0x30(%rbx), %rax
movq 0x28(%rax), %rdi
movq (%rbx), %rax
movzbl (%rax,%r13), %edx
movq %r12, %rsi
xorl %eax, %eax
callq 0x21e0
incq %r13
jmp 0x4d1e
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Orycterope[P]corewar/src/vm/display_mem.c
// Function: highlight_pcs
int			highlight_pcs(t_arena *arena)
{
	int			p_nbr;
	t_process	*p;

	p_nbr = 0;
	p = arena->processes;
	werase(arena->display->w_pcs);
	while (p != NULL)
	{
		wattron(arena->display->w_pcs, COLOR_PAIR(p->player) | A_BOLD);
		mvwprintw(arena->display->w_pcs,
				(int)(p->pc - arena->memory) / 64,
				((int)(p->pc - arena->memory) % 64) * 3 + 9,
				"%02x", (unsigned char)*(p->pc));
		wattroff(arena->display->w_pcs, COLOR_PAIR(p->player) | A_BOLD);
		p_nbr++;
		p = p->next;
	}
	return (p_nbr);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x28(%rdi), %r15
movq 0x30(%rdi), %rax
movq 0x20(%rax), %rdi
callq 0x2030
movl $0xffff, %r12d          # imm = 0xFFFF
movl $0x200000, %r13d        # imm = 0x200000
leaq 0x2839(%rip), %r14      # 0x75f2
xorl %ebp, %ebp
testq %r15, %r15
je 0x4e2c
movq 0x30(%rbx), %rax
movq 0x20(%rax), %rdi
movl (%r15), %esi
shll $0x8, %esi
andl %r12d, %esi
orl %r13d, %esi
xorl %edx, %edx
callq 0x2100
movq 0x30(%rbx), %rax
movq 0x20(%rax), %rdi
movq 0x48(%r15), %rcx
movl (%rbx), %edx
movl %ecx, %eax
subl %edx, %eax
cltd
pushq $0x40
popq %rsi
idivl %esi
leal (%rdx,%rdx,2), %edx
addl $0x9, %edx
movzbl (%rcx), %r8d
movl %eax, %esi
movq %r14, %rcx
xorl %eax, %eax
callq 0x20d0
movq 0x30(%rbx), %rax
movq 0x20(%rax), %rdi
movl (%r15), %esi
shll $0x8, %esi
andl %r12d, %esi
orl %r13d, %esi
xorl %edx, %edx
callq 0x2200
incl %ebp
movq 0x70(%r15), %r15
jmp 0x4dbb
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Orycterope[P]corewar/src/vm/display_mem.c
// Function: highlight_rw
void		highlight_rw(t_arena *arena)
{
	t_d_update	*u;
	t_d_update	*next;
	int			pair;

	u = arena->display->updates;
	while (u != NULL)
	{
		next = u->next;
		pair = u->owner * 10 + u->w_turns + MAX_PLAYERS + 1;
		wmove(arena->display->w_bkp, u->index / 64, (u->index % 64) * 3 + 9);
		wattron(arena->display->w_bkp, COLOR_PAIR(pair));
		wprintw(arena->display->w_bkp,
				"%02x", (unsigned char)arena->memory[u->index]);
		wattroff(arena->display->w_bkp, COLOR_PAIR(pair));
		u->w_turns--;
		if (u->w_turns == 0)
			remove_update_struct(u, arena);
		u = next;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x30(%rdi), %rax
movq (%rax), %r13
pushq $0x40
popq %r12
leaq 0x2795(%rip), %r14      # 0x75f2
testq %r13, %r13
je 0x4efb
movq %r13, %r15
imull $0xa, (%r13), %ecx
movq 0x8(%r13), %r13
movzbl 0x1(%r15), %ebp
movq 0x30(%rbx), %rax
movq 0x28(%rax), %rdi
movl 0x4(%r15), %eax
cltd
idivl %r12d
addl %ecx, %ebp
leal (%rdx,%rdx,2), %edx
addl $0x9, %edx
movl %eax, %esi
callq 0x21c0
movq 0x30(%rbx), %rax
movq 0x28(%rax), %rdi
shll $0x8, %ebp
addl $0x500, %ebp            # imm = 0x500
movzwl %bp, %ebp
movl %ebp, %esi
xorl %edx, %edx
callq 0x2100
movq (%rbx), %rax
movq 0x30(%rbx), %rcx
movq 0x28(%rcx), %rdi
movslq 0x4(%r15), %rcx
movzbl (%rax,%rcx), %edx
movq %r14, %rsi
xorl %eax, %eax
callq 0x21e0
movq 0x30(%rbx), %rax
movq 0x28(%rax), %rdi
movl %ebp, %esi
xorl %edx, %edx
callq 0x2200
decb 0x1(%r15)
jne 0x4e5d
movq %r15, %rdi
movq %rbx, %rsi
callq 0x4c85
jmp 0x4e5d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/Orycterope[P]corewar/src/vm/display_color.c
// Function: init_pairs
void		init_pairs(int players)
{
	int		o;
	int		oi;

	o = 0;
	while (++o <= players)
	{
		oi = -1;
		while (++oi < D_WRITE_TURNS + 1)
		{
			init_pair(10 * o + oi + MAX_PLAYERS + 1,
						100 + o * 10 + D_WRITE_TURNS - oi,
						0);
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edi, %ebx
xorl %r14d, %r14d
testl %edi, %edi
cmovlel %r14d, %ebx
pushq $0x76
popq %r15
movw $0xf, %r12w
cmpl %ebx, %r14d
je 0x4f63
incl %r14d
xorl %r13d, %r13d
movl %r12d, %ebp
cmpl $-0x9, %r13d
je 0x4f59
leal (%r15,%r13), %eax
movswl %ax, %esi
movswl %bp, %ebp
movl %ebp, %edi
xorl %edx, %edx
callq 0x2160
decl %r13d
incl %ebp
jmp 0x4f39
addl $0xa, %r15d
addl $0xa, %r12d
jmp 0x4f2b
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq