LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/mmcco[P]sljit/test_src/sljitTest.c
// Function: cmp_test
static int cmp_test(struct sljit_compiler *compiler, int type, int src1, long src1w, int src2, long src2w)
{
	/* 2 = true, 1 = false */
	struct sljit_jump* jump;
	struct sljit_label* label;

	if (sljit_emit_op1(compiler, SLJIT_MOVU_UB, SLJIT_MEM1(SLJIT_S0), 1, SLJIT_IMM, 2))
		return compiler->error;
	jump = sljit_emit_cmp(compiler, type, src1, src1w, src2, src2w);
	if (!jump)
		return compiler->error;
	if (sljit_emit_op1(compiler, SLJIT_MOV_UB, SLJIT_MEM1(SLJIT_S0), 0, SLJIT_IMM, 1))
		return compiler->error;
	label = sljit_emit_label(compiler);
	if (!label)
		return compiler->error;
	sljit_set_label(jump, label);
	return SLJIT_SUCCESS;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r14
movl %r8d, %ebp
movq %rcx, %r15
movl %edx, %r12d
movl %esi, %r13d
movq %rdi, %rbx
movl $0x1, %ecx
movl $0x2, %r9d
movl $0x29, %esi
movl $0x8c, %edx
movl $0x40, %r8d
callq 0x16cab
testl %eax, %eax
je 0x142a8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
movl %r13d, %esi
movl %r12d, %edx
movq %r15, %rcx
movl %ebp, %r8d
movq %r14, %r9
callq 0x1e2f6
testq %rax, %rax
je 0x14299
movq %rax, %r14
movl $0x1, %r9d
movq %rbx, %rdi
movl $0x21, %esi
movl $0x8c, %edx
xorl %ecx, %ecx
movl $0x40, %r8d
callq 0x16cab
testl %eax, %eax
jne 0x14299
movq %rbx, %rdi
callq 0x1cb7d
testq %rax, %rax
je 0x14299
movq %r14, %rdi
movq %rax, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1497e
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/mmcco[P]sljit/sljit_src/sljitExecAllocator.c
// Function: sljit_free_unused_memory_exec
void sljit_free_unused_memory_exec(void)
{
	struct free_block* free_block;
	struct free_block* next_free_block;

	allocator_grab_lock();

	free_block = free_blocks;
	while (free_block) {
		next_free_block = free_block->next;
		if (!free_block->header.prev_size && 
				AS_BLOCK_HEADER(free_block, free_block->size)->size == 1) {
			total_size -= free_block->size;
			sljit_remove_free_block(free_block);
			free_chunk(free_block, free_block->size + sizeof(struct block_header));
		}
		free_block = next_free_block;
	}

	SLJIT_ASSERT((total_size && free_blocks) || (!total_size && !free_blocks));
	allocator_release_lock();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0x139bf(%rip), %rdi     # 0x28138
callq 0x2130
movq 0x1398b(%rip), %rbx     # 0x28110
testq %rbx, %rbx
je 0x147ee
leaq 0x1397f(%rip), %r14     # 0x28110
movq %rbx, %rdi
movq 0x10(%rbx), %rbx
cmpq $0x0, 0x8(%rdi)
jne 0x147e9
movq 0x20(%rdi), %rax
cmpq $0x1, (%rdi,%rax)
jne 0x147e9
subq %rax, 0x1396f(%rip)     # 0x28120
testq %rbx, %rbx
je 0x147be
movq 0x18(%rdi), %rax
movq %rax, 0x18(%rbx)
movq 0x18(%rdi), %rax
testq %rax, %rax
je 0x147cd
addq $0x10, %rax
jmp 0x147d9
movq %r14, %rax
cmpq %rdi, 0x13939(%rip)     # 0x28110
jne 0x1481b
movq %rbx, (%rax)
movq 0x20(%rdi), %rsi
addq $0x10, %rsi
callq 0x20e0
testq %rbx, %rbx
jne 0x14791
cmpq $0x0, 0x1392a(%rip)     # 0x28120
setne %al
cmpq $0x0, 0x1390f(%rip)     # 0x28110
setne %cl
cmpb %cl, %al
jne 0x14829
leaq 0x13929(%rip), %rdi     # 0x28138
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x20c0
leaq 0xe980(%rip), %rdi      # 0x231a2
movl $0xaa, %esi
jmp 0x14835
leaq 0xe972(%rip), %rdi      # 0x231a2
movl $0x136, %esi            # imm = 0x136
xorl %eax, %eax
callq 0x2080
callq 0x2040
// File: /workspace/github_c_makefile_star2_O1/mmcco[P]sljit/sljit_src/sljitLir.c
// Function: sljit_free_compiler
void sljit_free_compiler(struct sljit_compiler *compiler)
{
	struct sljit_memory_fragment *buf;
	struct sljit_memory_fragment *curr;

	buf = compiler->buf;
	while (buf != NULL) {
		curr = buf;
		buf = buf->next;
		free(curr);
	}

	buf = compiler->abuf;
	while (buf != NULL) {
		curr = buf;
		buf = buf->next;
		free(curr);
	}

#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5)
	free(compiler->cpool);
#endif
	free(compiler);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x38(%rdi), %rdi
testq %rdi, %rdi
je 0x14951
movq (%rdi), %r14
callq 0x2030
movq %r14, %rdi
testq %r14, %r14
jne 0x14941
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0x1496a
movq (%rdi), %r14
callq 0x2030
movq %r14, %rdi
testq %r14, %r14
jne 0x1495a
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2030
// File: /workspace/github_c_makefile_star2_O1/mmcco[P]sljit/sljit_src/sljitLir.c
// Function: sljit_set_label
void sljit_set_label(struct sljit_jump *jump, struct sljit_label* label)
{
	if (!!jump && !!label) {
		jump->flags &= ~JUMP_ADDR;
		jump->flags |= JUMP_LABEL;
		jump->u.label = label;
	}
}

// Assembly:
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
jne 0x149a1
movq 0x10(%rdi), %rax
andq $-0x4, %rax
incq %rax
movq %rax, 0x10(%rdi)
movq %rsi, 0x18(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/mmcco[P]sljit/sljit_src/sljitLir.c
// Function: sljit_set_target
void sljit_set_target(struct sljit_jump *jump, unsigned long target)
{
	if (!!jump) {
		jump->flags &= ~JUMP_LABEL;
		jump->flags |= JUMP_ADDR;
		jump->u.target = target;
	}
}

// Assembly:
testq %rdi, %rdi
je 0x149bb
movq 0x10(%rdi), %rax
andq $-0x4, %rax
orq $0x2, %rax
movq %rax, 0x10(%rdi)
movq %rsi, 0x18(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/mmcco[P]sljit/sljit_src/sljitLir.c
// Function: ensure_abuf
static void* ensure_abuf(struct sljit_compiler *compiler, unsigned long size)
{
	u_char *ret;
	struct sljit_memory_fragment *new_frag;

	SLJIT_ASSERT(size <= 256);
	if (compiler->abuf->used_size + size <= (ABUF_SIZE - (unsigned long)SLJIT_OFFSETOF(struct sljit_memory_fragment, memory))) {
		ret = compiler->abuf->memory + compiler->abuf->used_size;
		compiler->abuf->used_size += size;
		return ret;
	}
	new_frag = malloc(ABUF_SIZE);
	PTR_FAIL_IF_NULL(new_frag);
	new_frag->next = compiler->abuf;
	compiler->abuf = new_frag;
	new_frag->used_size = size;
	return new_frag->memory;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq 0x40(%rdi), %r15
movq 0x8(%r15), %rax
leaq (%rax,%rsi), %rcx
cmpq $0xff0, %rcx            # imm = 0xFF0
ja 0x14a01
addq %r15, %rax
addq $0x10, %rax
movq %rcx, 0x8(%r15)
jmp 0x14a30
movq %rsi, %rbx
movq %rdi, %r14
movl $0x1000, %edi           # imm = 0x1000
callq 0x20d0
testq %rax, %rax
je 0x14a27
movq %r15, (%rax)
movq %rax, 0x40(%r14)
movq %rbx, 0x8(%rax)
addq $0x10, %rax
jmp 0x14a30
movl $0x2, (%r14)
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/mmcco[P]sljit/sljit_src/sljitNativeX86_64.c
// Function: generate_far_jump_code
static u_char* generate_far_jump_code(struct sljit_jump *jump, u_char *code_ptr, int type)
{
	if (type < SLJIT_JUMP) {
		/* Invert type. */
		*code_ptr++ = get_jump_code(type ^ 0x1) - 0x10;
		*code_ptr++ = 10 + 3;
	}

	SLJIT_COMPILE_ASSERT(reg_map[TMP_REG3] == 9, tmp3_is_9_first);
	*code_ptr++ = REX_W | REX_B;
	*code_ptr++ = MOV_r_i32 + 1;
	jump->addr = (unsigned long)code_ptr;

	if (jump->flags & JUMP_LABEL)
		jump->flags |= PATCH_MD;
	else
		*(long*)code_ptr = jump->u.target;

	code_ptr += sizeof(long);
	*code_ptr++ = REX_B;
	*code_ptr++ = GROUP_FF;
	*code_ptr++ = (type >= SLJIT_FAST_CALL) ? (MOD_REG | CALL_rm | 1) : (MOD_REG | JMP_rm | 1);

	return code_ptr;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
cmpl $0x15, %edx
jg 0x14eb9
movl %ebp, %edi
xorl $0x1, %edi
callq 0x1db72
addb $-0x10, %al
movb %al, (%rbx)
movb $0xd, 0x1(%rbx)
addq $0x2, %rbx
movw $0xb949, (%rbx)         # imm = 0xB949
leaq 0x2(%rbx), %rax
movq %rax, 0x8(%r14)
movq 0x10(%r14), %rcx
testb $0x1, %cl
jne 0x14ed8
movq 0x18(%r14), %rcx
movq %rcx, (%rax)
jmp 0x14ee0
orq $0x10, %rcx
movq %rcx, 0x10(%r14)
movw $0xff41, 0xa(%rbx)      # imm = 0xFF41
cmpl $0x17, %ebp
setl %al
shlb $0x4, %al
addb $-0x2f, %al
movb %al, 0xc(%rbx)
addq $0xd, %rbx
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/mmcco[P]sljit/sljit_src/sljitLir.c
// Function: ensure_buf
static void* ensure_buf(struct sljit_compiler *compiler, unsigned long size)
{
	u_char *ret;
	struct sljit_memory_fragment *new_frag;

	SLJIT_ASSERT(size <= 256);
	if (compiler->buf->used_size + size <= (BUF_SIZE - (unsigned long)SLJIT_OFFSETOF(struct sljit_memory_fragment, memory))) {
		ret = compiler->buf->memory + compiler->buf->used_size;
		compiler->buf->used_size += size;
		return ret;
	}
	new_frag = malloc(BUF_SIZE);
	PTR_FAIL_IF_NULL(new_frag);
	new_frag->next = compiler->buf;
	compiler->buf = new_frag;
	new_frag->used_size = size;
	return new_frag->memory;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
cmpq $0x101, %rsi            # imm = 0x101
jae 0x15323
movq %rsi, %rbx
movq %rdi, %r14
movq 0x38(%rdi), %r15
movq 0x8(%r15), %rax
leaq (%rax,%rsi), %rcx
cmpq $0xff0, %rcx            # imm = 0xFF0
ja 0x152f4
addq %r15, %rax
addq $0x10, %rax
movq %rcx, 0x8(%r15)
jmp 0x1531d
movl $0x1000, %edi           # imm = 0x1000
callq 0x20d0
testq %rax, %rax
je 0x15314
movq %r15, (%rax)
movq %rax, 0x38(%r14)
movq %rbx, 0x8(%rax)
addq $0x10, %rax
jmp 0x1531d
movl $0x2, (%r14)
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
leaq 0xdf45(%rip), %rdi      # 0x2326f
movl $0x1d7, %esi            # imm = 0x1D7
xorl %eax, %eax
callq 0x2080
callq 0x2040
// File: /workspace/github_c_makefile_star2_O1/mmcco[P]sljit/sljit_src/sljitNativeX86_64.c
// Function: sljit_set_context
int sljit_set_context(struct sljit_compiler *compiler,
	int options, int args, int scratches, int saveds,
	int fscratches, int fsaveds, int local_size)
{
	int saved_reg_size;

	CHECK_ERROR();
	CHECK(check_sljit_set_context(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size));
	set_set_context(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size);

	/* Including the return address saved by the call instruction. */
	saved_reg_size = GET_SAVED_REGS_SIZE(scratches, saveds, 1);
	compiler->local_size = ((local_size + SLJIT_LOCALS_OFFSET + saved_reg_size + 15) & ~15) - saved_reg_size;
	return SLJIT_SUCCESS;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl (%rdi), %eax
testl %eax, %eax
jne 0x15464
movl %r9d, %r12d
movl %r8d, %r14d
movl %ecx, %r15d
movl %esi, %ebp
movq %rdi, %rbx
movl 0x48(%rsp), %r13d
movl 0x40(%rsp), %r10d
cmpl $0x0, 0x84(%rdi)
je 0x15380
movl $0x0, 0x84(%rbx)
jmp 0x15417
cmpl $0x2, %ebp
jae 0x15473
cmpl $0x4, %edx
jae 0x15481
cmpl $0xd, %r15d
jae 0x1548f
cmpl $0xd, %r14d
jae 0x1549d
leal (%r14,%r15), %eax
cmpl $0xd, %eax
jge 0x154ab
cmpl %r14d, %edx
jg 0x154b9
cmpl $0x7, %r12d
jae 0x154c7
cmpl $0x7, %r10d
jae 0x154d5
leal (%r10,%r12), %eax
cmpl $0x7, %eax
jge 0x154e3
cmpl $0x10001, %r13d         # imm = 0x10001
jae 0x154f1
movq 0x78(%rbx), %rdi
testq %rdi, %rdi
je 0x15417
leaq 0xdefe(%rip), %rsi      # 0x232f8
movl %r15d, %ecx
movl %r14d, %r8d
movl %r12d, %r9d
xorl %eax, %eax
pushq %r13
pushq %r10
callq 0x20b0
movl 0x50(%rsp), %r10d
addq $0x10, %rsp
movl %ebp, 0x4(%rbx)
movl %r15d, 0x48(%rbx)
movl %r14d, 0x4c(%rbx)
movl %r12d, 0x50(%rbx)
movl %r10d, 0x54(%rbx)
movl %r13d, 0x80(%rbx)
leal 0x1ffffffa(%r15), %ecx
xorl %eax, %eax
cmpl $0x6, %r15d
cmovll %eax, %ecx
cmpl $0x6, %r14d
movl $0x6, %edx
cmovll %r14d, %edx
addl %ecx, %edx
leal 0x8(,%rdx,8), %ecx
leal 0x1f(%r13,%rdx,8), %edx
andl $-0x10, %edx
subl %ecx, %edx
movl %edx, 0x58(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xddf5(%rip), %rdi      # 0x2326f
movl $0x3ab, %esi            # imm = 0x3AB
jmp 0x154fd
leaq 0xdde7(%rip), %rdi      # 0x2326f
movl $0x3ac, %esi            # imm = 0x3AC
jmp 0x154fd
leaq 0xddd9(%rip), %rdi      # 0x2326f
movl $0x3ad, %esi            # imm = 0x3AD
jmp 0x154fd
leaq 0xddcb(%rip), %rdi      # 0x2326f
movl $0x3ae, %esi            # imm = 0x3AE
jmp 0x154fd
leaq 0xddbd(%rip), %rdi      # 0x2326f
movl $0x3af, %esi            # imm = 0x3AF
jmp 0x154fd
leaq 0xddaf(%rip), %rdi      # 0x2326f
movl $0x3b0, %esi            # imm = 0x3B0
jmp 0x154fd
leaq 0xdda1(%rip), %rdi      # 0x2326f
movl $0x3b1, %esi            # imm = 0x3B1
jmp 0x154fd
leaq 0xdd93(%rip), %rdi      # 0x2326f
movl $0x3b2, %esi            # imm = 0x3B2
jmp 0x154fd
leaq 0xdd85(%rip), %rdi      # 0x2326f
movl $0x3b3, %esi            # imm = 0x3B3
jmp 0x154fd
leaq 0xdd77(%rip), %rdi      # 0x2326f
movl $0x3b4, %esi            # imm = 0x3B4
xorl %eax, %eax
callq 0x2080
callq 0x2040
// File: /workspace/github_c_makefile_star2_O1/mmcco[P]sljit/sljit_src/sljitNativeX86_64.c
// Function: emit_load_imm64
static int emit_load_imm64(struct sljit_compiler *compiler, int reg, long imm)
{
	u_char *inst;

	inst = ensure_buf(compiler, 1 + 2 + sizeof(long));
	FAIL_IF(!inst);
	INC_SIZE(2 + sizeof(long));
	*inst++ = REX_W | ((reg_map[reg] <= 7) ? 0 : REX_B);
	*inst++ = MOV_r_i32 + (reg_map[reg] & 0x7);
	*(long*)inst = imm;
	return SLJIT_SUCCESS;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
movl $0xb, %esi
callq 0x152be
testq %rax, %rax
je 0x16888
movb $0xa, (%rax)
addq $0xa, 0x60(%r14)
movslq %ebp, %rcx
leaq 0xc8a1(%rip), %rdx      # 0x23100
movl $0xf10f, %esi           # imm = 0xF10F
btq %rcx, %rsi
setb %sil
xorb $0x49, %sil
movb %sil, 0x1(%rax)
movb (%rcx,%rdx), %cl
andb $0x7, %cl
orb $-0x48, %cl
movb %cl, 0x2(%rax)
movq %rbx, 0x3(%rax)
xorl %eax, %eax
jmp 0x1688b
movl (%r14), %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/mmcco[P]sljit/sljit_src/sljitNativeX86_common.c
// Function: emit_mov_half
static int emit_mov_half(struct sljit_compiler *compiler, int sign,
	int dst, long dstw,
	int src, long srcw)
{
	u_char* inst;
	int dst_r;

#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
	compiler->mode32 = 0;
#endif

	if (dst == SLJIT_UNUSED && !(src & SLJIT_MEM))
		return SLJIT_SUCCESS; /* Empty instruction. */

	if (src & SLJIT_IMM) {
		if (FAST_IS_REG(dst)) {
#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
			return emit_do_imm(compiler, MOV_r_i32 + reg_map[dst], srcw);
#else
			inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, srcw, dst, 0);
			FAIL_IF(!inst);
			*inst = MOV_rm_i32;
			return SLJIT_SUCCESS;
#endif
		}
		inst = emit_x86_instruction(compiler, 1 | EX86_HALF_ARG | EX86_NO_REXW | EX86_PREF_66, SLJIT_IMM, srcw, dst, dstw);
		FAIL_IF(!inst);
		*inst = MOV_rm_i32;
		return SLJIT_SUCCESS;
	}

	dst_r = FAST_IS_REG(dst) ? dst : TMP_REG1;

	if ((dst & SLJIT_MEM) && FAST_IS_REG(src))
		dst_r = src;
	else {
		inst = emit_x86_instruction(compiler, 2, dst_r, 0, src, srcw);
		FAIL_IF(!inst);
		*inst++ = GROUP_0F;
		*inst = sign ? MOVSX_r_rm16 : MOVZX_r_rm16;
	}

	if (dst & SLJIT_MEM) {
		inst = emit_x86_instruction(compiler, 1 | EX86_NO_REXW | EX86_PREF_66, dst_r, 0, dst, dstw);
		FAIL_IF(!inst);
		*inst = MOV_rm_r;
	}

	return SLJIT_SUCCESS;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl $0x0, 0x70(%rdi)
movl %r8d, %eax
andl $0x80, %eax
xorl %ebx, %ebx
orl %edx, %eax
je 0x17d56
movq %rcx, %r15
movl %edx, %ebp
movq %rdi, %r14
testb $0x40, %r8b
jne 0x17cba
cmpl $0x40, %ebp
movl $0xe, %r12d
cmovll %ebp, %r12d
testb %bpl, %bpl
sets %al
cmpl $0x40, %r8d
setl %cl
testb %cl, %al
je 0x17cd9
movl %r8d, %r12d
jmp 0x17d05
cmpl $0x3f, %ebp
jg 0x17d2e
xorl %ebx, %ebx
movq %r14, %rdi
movl $0x1, %esi
movl $0x40, %edx
movq %r9, %rcx
movl %ebp, %r8d
xorl %r9d, %r9d
jmp 0x17d44
movl %esi, %r13d
movq %r14, %rdi
movl $0x2, %esi
movl %r12d, %edx
xorl %ecx, %ecx
callq 0x15e07
testq %rax, %rax
je 0x17d53
movb $0xf, (%rax)
testl %r13d, %r13d
setne %cl
shlb $0x3, %cl
orb $-0x49, %cl
movb %cl, 0x1(%rax)
testb %bpl, %bpl
jns 0x17d56
xorl %ebx, %ebx
movq %r14, %rdi
movl $0x481, %esi            # imm = 0x481
movl %r12d, %edx
xorl %ecx, %ecx
movl %ebp, %r8d
movq %r15, %r9
callq 0x15e07
testq %rax, %rax
je 0x17d53
movb $-0x77, (%rax)
jmp 0x17d56
movq %r14, %rdi
movl $0x681, %esi            # imm = 0x681
movl $0x40, %edx
movq %r9, %rcx
movl %ebp, %r8d
movq %r15, %r9
callq 0x15e07
testq %rax, %rax
je 0x17d53
movb $-0x39, (%rax)
jmp 0x17d56
movl (%r14), %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/mmcco[P]sljit/sljit_src/sljitNativeX86_64.c
// Function: emit_mov_int
static int emit_mov_int(struct sljit_compiler *compiler, int sign,
	int dst, long dstw,
	int src, long srcw)
{
	u_char* inst;
	int dst_r;

	compiler->mode32 = 0;

	if (dst == SLJIT_UNUSED && !(src & SLJIT_MEM))
		return SLJIT_SUCCESS; /* Empty instruction. */

	if (src & SLJIT_IMM) {
		if (FAST_IS_REG(dst)) {
			if (sign || ((unsigned long)srcw <= 0x7fffffff)) {
				inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, (long)(int)srcw, dst, dstw);
				FAIL_IF(!inst);
				*inst = MOV_rm_i32;
				return SLJIT_SUCCESS;
			}
			return emit_load_imm64(compiler, dst, srcw);
		}
		compiler->mode32 = 1;
		inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, (long)(int)srcw, dst, dstw);
		FAIL_IF(!inst);
		*inst = MOV_rm_i32;
		compiler->mode32 = 0;
		return SLJIT_SUCCESS;
	}

	dst_r = FAST_IS_REG(dst) ? dst : TMP_REG1;

	if ((dst & SLJIT_MEM) && FAST_IS_REG(src))
		dst_r = src;
	else {
		if (sign) {
			inst = emit_x86_instruction(compiler, 1, dst_r, 0, src, srcw);
			FAIL_IF(!inst);
			*inst++ = MOVSXD_r_rm;
		} else {
			compiler->mode32 = 1;
			FAIL_IF(emit_mov(compiler, dst_r, 0, src, srcw));
			compiler->mode32 = 0;
		}
	}

	if (dst & SLJIT_MEM) {
		compiler->mode32 = 1;
		inst = emit_x86_instruction(compiler, 1, dst_r, 0, dst, dstw);
		FAIL_IF(!inst);
		*inst = MOV_rm_r;
		compiler->mode32 = 0;
	}

	return SLJIT_SUCCESS;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl $0x0, 0x70(%rdi)
movl %r8d, %eax
andl $0x80, %eax
xorl %ebx, %ebx
orl %edx, %eax
je 0x17ec9
movq %rcx, %r15
movl %edx, %ebp
movq %rdi, %r14
testb $0x40, %r8b
jne 0x17dbc
cmpl $0x40, %ebp
movl $0xe, %r12d
cmovll %ebp, %r12d
testb %bpl, %bpl
sets %al
cmpl $0x40, %r8d
setl %cl
testb %cl, %al
je 0x17e00
movl %r8d, %r12d
jmp 0x17e8d
cmpl $0x3f, %ebp
jg 0x17e24
testl %esi, %esi
sete %al
cmpq $0x7fffffff, %r9        # imm = 0x7FFFFFFF
seta %cl
testb %cl, %al
jne 0x17e51
movslq %r9d, %rcx
movq %r14, %rdi
movl $0x1, %esi
movl $0x40, %edx
movl %ebp, %r8d
movq %r15, %r9
callq 0x15e07
testq %rax, %rax
je 0x17ec6
movb $-0x39, (%rax)
jmp 0x17ec9
testl %esi, %esi
je 0x17e66
movq %r14, %rdi
movl $0x1, %esi
movl %r12d, %edx
xorl %ecx, %ecx
callq 0x15e07
testq %rax, %rax
je 0x17ec6
movb $0x63, (%rax)
jmp 0x17e8d
movl $0x1, 0x70(%r14)
movslq %r9d, %rcx
movq %r14, %rdi
movl $0x1, %esi
movl $0x40, %edx
movl %ebp, %r8d
movq %r15, %r9
callq 0x15e07
testq %rax, %rax
je 0x17ec6
movb $-0x39, (%rax)
jmp 0x17ebc
movq %r14, %rdi
movl %ebp, %esi
movq %r9, %rdx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x16832
movl $0x1, 0x70(%r14)
movq %r14, %rdi
movl %r12d, %esi
xorl %edx, %edx
movl %r8d, %ecx
movq %r9, %r8
callq 0x16afc
testl %eax, %eax
jne 0x17ec6
movl $0x0, 0x70(%r14)
testb %bpl, %bpl
jns 0x17ec9
movl $0x1, 0x70(%r14)
xorl %ebx, %ebx
movq %r14, %rdi
movl $0x1, %esi
movl %r12d, %edx
xorl %ecx, %ecx
movl %ebp, %r8d
movq %r15, %r9
callq 0x15e07
testq %rax, %rax
je 0x17ec6
movb $-0x77, (%rax)
movl $0x0, 0x70(%r14)
jmp 0x17ec9
movl (%r14), %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/mmcco[P]sljit/sljit_src/sljitNativeX86_common.c
// Function: emit_unary
static int emit_unary(struct sljit_compiler *compiler, u_char opcode,
	int dst, long dstw,
	int src, long srcw)
{
	u_char* inst;

	if (dst == SLJIT_UNUSED) {
		EMIT_MOV(compiler, TMP_REG1, 0, src, srcw);
		inst = emit_x86_instruction(compiler, 1, 0, 0, TMP_REG1, 0);
		FAIL_IF(!inst);
		*inst++ = GROUP_F7;
		*inst |= opcode;
		return SLJIT_SUCCESS;
	}
	if (dst == src && dstw == srcw) {
		/* Same input and output */
		inst = emit_x86_instruction(compiler, 1, 0, 0, dst, dstw);
		FAIL_IF(!inst);
		*inst++ = GROUP_F7;
		*inst |= opcode;
		return SLJIT_SUCCESS;
	}
	if (FAST_IS_REG(dst)) {
		EMIT_MOV(compiler, dst, 0, src, srcw);
		inst = emit_x86_instruction(compiler, 1, 0, 0, dst, dstw);
		FAIL_IF(!inst);
		*inst++ = GROUP_F7;
		*inst |= opcode;
		return SLJIT_SUCCESS;
	}
	EMIT_MOV(compiler, TMP_REG1, 0, src, srcw);
	inst = emit_x86_instruction(compiler, 1, 0, 0, TMP_REG1, 0);
	FAIL_IF(!inst);
	*inst++ = GROUP_F7;
	*inst |= opcode;
	EMIT_MOV(compiler, dst, dstw, TMP_REG1, 0);
	return SLJIT_SUCCESS;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
testl %edx, %edx
je 0x17f12
movq %rcx, %r15
movl %edx, %r12d
cmpl %r8d, %edx
setne %al
cmpq %r9, %rcx
setne %cl
orb %al, %cl
jne 0x17f56
xorl %r14d, %r14d
movq %rbx, %rdi
movl $0x1, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movl %r12d, %r8d
movq %r15, %r9
jmp 0x17f43
movq %rbx, %rdi
movl $0xe, %esi
xorl %edx, %edx
movl %r8d, %ecx
movq %r9, %r8
callq 0x16afc
testl %eax, %eax
jne 0x17f8b
xorl %r14d, %r14d
movq %rbx, %rdi
movl $0x1, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movl $0xe, %r8d
xorl %r9d, %r9d
callq 0x15e07
testq %rax, %rax
je 0x17f8b
movb $-0x9, (%rax)
orb %bpl, 0x1(%rax)
jmp 0x17f8e
movq %rbx, %rdi
cmpl $0x3f, %r12d
jg 0x17f75
movl %r12d, %esi
xorl %edx, %edx
movl %r8d, %ecx
movq %r9, %r8
callq 0x16afc
testl %eax, %eax
jne 0x17f8b
jmp 0x17efb
movl $0xe, %esi
xorl %edx, %edx
movl %r8d, %ecx
movq %r9, %r8
callq 0x16afc
testl %eax, %eax
je 0x17f9a
movl (%rbx), %r14d
movl %r14d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
movl $0x1, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movl $0xe, %r8d
xorl %r9d, %r9d
callq 0x15e07
testq %rax, %rax
je 0x17f8b
movb $-0x9, (%rax)
orb %bpl, 0x1(%rax)
xorl %r14d, %r14d
movq %rbx, %rdi
movl $0x1, %esi
movl $0xe, %edx
xorl %ecx, %ecx
movl %r12d, %r8d
movq %r15, %r9
callq 0x15e07
testq %rax, %rax
je 0x17fe7
movb $-0x77, (%rax)
jmp 0x17f8e
cmpl $0x0, (%rbx)
jne 0x17f8b
jmp 0x17f8e
// File: /workspace/github_c_makefile_star2_O1/mmcco[P]sljit/sljit_src/sljitNativeX86_common.c
// Function: emit_shift_with_flags
static int emit_shift_with_flags(struct sljit_compiler *compiler,
	u_char mode, int set_flags,
	int dst, long dstw,
	int src1, long src1w,
	int src2, long src2w)
{
	/* The CPU does not set flags if the shift count is 0. */
	if (src2 & SLJIT_IMM) {
#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
		if ((src2w & 0x3f) != 0 || (compiler->mode32 && (src2w & 0x1f) != 0))
			return emit_shift(compiler, mode, dst, dstw, src1, src1w, src2, src2w);
#else
		if ((src2w & 0x1f) != 0)
			return emit_shift(compiler, mode, dst, dstw, src1, src1w, src2, src2w);
#endif
		if (!set_flags)
			return emit_mov(compiler, dst, dstw, src1, src1w);
		/* OR dst, src, 0 */
		return emit_cum_binary(compiler, OR_r_rm, OR_rm_r, OR, OR_EAX_i32,
			dst, dstw, src1, src1w, SLJIT_IMM, 0);
	}

	if (!set_flags)
		return emit_shift(compiler, mode, dst, dstw, src1, src1w, src2, src2w);

	if (!FAST_IS_REG(dst))
		FAIL_IF(emit_cmp_binary(compiler, src1, src1w, SLJIT_IMM, 0));

	FAIL_IF(emit_shift(compiler,mode, dst, dstw, src1, src1w, src2, src2w));

	if (FAST_IS_REG(dst))
		return emit_cmp_binary(compiler, dst, dstw, SLJIT_IMM, 0);
	return SLJIT_SUCCESS;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, %r10d
movq %r8, %rax
movl %ecx, %ebp
movl %esi, %r13d
movq %rdi, %r15
movq 0x60(%rsp), %r14
movl 0x58(%rsp), %ebx
movq 0x50(%rsp), %r12
testb $0x40, %bl
jne 0x1a261
testl %edx, %edx
je 0x1a267
cmpl $0x40, %ebp
jl 0x1a233
movq %r15, %rdi
movl %r10d, %esi
movq %r12, %rdx
movl $0x40, %ecx
xorl %r8d, %r8d
movq %rax, 0x10(%rsp)
movq %r10, 0x8(%rsp)
callq 0x19909
movq 0x8(%rsp), %r10
testl %eax, %eax
movq 0x10(%rsp), %rax
jne 0x1a258
movzbl %r13b, %esi
movq %r15, %rdi
movl %ebp, %edx
movq %rax, %rcx
movl %r10d, %r8d
movq %r12, %r9
pushq %r14
pushq %rbx
movq %rax, %rbx
callq 0x1efdd
addq $0x10, %rsp
testl %eax, %eax
je 0x1a2c7
movl (%r15), %eax
addq $0x18, %rsp
jmp 0x1a285
testb $0x3f, %r14b
je 0x1a290
movzbl %r13b, %esi
movq %r15, %rdi
movl %ebp, %edx
movq %rax, %rcx
movl %r10d, %r8d
movq %r12, %r9
pushq %r14
pushq %rbx
callq 0x1efdd
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testl %edx, %edx
je 0x1a2f1
subq $0x8, %rsp
movq %r15, %rdi
movl $0xb, %esi
movl $0x9, %edx
movl $0x8, %ecx
movl $0xd, %r8d
movl %ebp, %r9d
pushq $0x0
pushq $0x40
pushq %r12
pushq %r10
pushq %rax
callq 0x1933c
addq $0x48, %rsp
jmp 0x1a285
xorl %eax, %eax
cmpl $0x3f, %ebp
jg 0x1a25b
movq %rbx, %rdx
movq %r15, %rdi
movl %ebp, %esi
movl $0x40, %ecx
xorl %r8d, %r8d
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x19909
movq %r15, %rdi
movl %ebp, %esi
movq %rax, %rdx
movl %r10d, %ecx
movq %r12, %r8
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x16afc
// File: /workspace/github_c_makefile_star2_O1/mmcco[P]sljit/sljit_src/sljitNativeX86_common.c
// Function: sljit_emit_op_custom
int sljit_emit_op_custom(struct sljit_compiler *compiler,
	void *instruction, int size)
{
	u_char *inst;

	CHECK_ERROR();
	CHECK(check_sljit_emit_op_custom(compiler, instruction, size));

	inst = ensure_buf(compiler, 1 + size);
	FAIL_IF(!inst);
	INC_SIZE(size);
	memmove(inst, instruction, size);
	return SLJIT_SUCCESS;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl (%rdi), %eax
testl %eax, %eax
jne 0x1a421
movq %rsi, %rbx
testq %rsi, %rsi
je 0x1a430
movl %edx, %r15d
leal -0x1(%r15), %eax
cmpl $0xf, %eax
jae 0x1a43e
movq %rdi, %r14
movq 0x78(%rdi), %rcx
movl %r15d, %r12d
testq %rcx, %rcx
je 0x1a3f1
leaq 0x9102(%rip), %rdi      # 0x234ae
movl $0xb, %esi
movl $0x1, %edx
callq 0x2120
testl %r15d, %r15d
jle 0x1a3e3
leaq 0x90f3(%rip), %r13      # 0x234ba
xorl %ebp, %ebp
movq 0x78(%r14), %rdi
movzbl (%rbx,%rbp), %edx
movq %r13, %rsi
xorl %eax, %eax
callq 0x20b0
incq %rbp
cmpq %rbp, %r12
jne 0x1a3c9
movq 0x78(%r14), %rsi
movl $0xa, %edi
callq 0x20a0
leal 0x1(%r15), %esi
movq %r14, %rdi
callq 0x152be
testq %rax, %rax
je 0x1a41e
movq %rax, %rdi
incq %rdi
movb %r15b, (%rax)
addq %r12, 0x60(%r14)
movq %rbx, %rsi
movq %r12, %rdx
callq 0x2100
xorl %eax, %eax
jmp 0x1a421
movl (%r14), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8e38(%rip), %rdi      # 0x2326f
movl $0x45e, %esi            # imm = 0x45E
jmp 0x1a44a
leaq 0x8e2a(%rip), %rdi      # 0x2326f
movl $0x460, %esi            # imm = 0x460
xorl %eax, %eax
callq 0x2080
callq 0x2040
// File: /workspace/github_c_makefile_star2_O1/mmcco[P]sljit/sljit_src/sljitNativeX86_common.c
// Function: sljit_emit_label
struct sljit_label* sljit_emit_label(struct sljit_compiler *compiler)
{
	u_char *inst;
	struct sljit_label *label;

	CHECK_ERROR_PTR();
	CHECK_PTR(check_sljit_emit_label(compiler));

	/* We should restore the flags before the label,
	   since other taken jumps has their own flags as well. */
	if (compiler->flags_saved) {
		if (emit_restore_flags(compiler, 0))
			return NULL;
	}

	if (compiler->last_label && compiler->last_label->size == compiler->size)
		return compiler->last_label;

	label = ensure_abuf(compiler, sizeof(struct sljit_label));
	if (!label)
		return NULL;
	set_label(label, compiler);

	inst = ensure_buf(compiler, 2);
	if (!inst)
		return NULL;

	*inst++ = 0;
	*inst++ = 0;

	return label;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpl $0x0, (%rdi)
je 0x1cb94
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rdi, %rbx
movq 0x78(%rdi), %rcx
testq %rcx, %rcx
je 0x1cbb6
leaq 0x6963(%rip), %rdi      # 0x2350a
movl $0x7, %esi
movl $0x1, %edx
callq 0x2120
cmpl $0x0, 0x74(%rbx)
je 0x1cbee
movl $0x7, %esi
movq %rbx, %rdi
callq 0x152be
testq %rax, %rax
je 0x1cc5f
movb $0x6, (%rax)
addq $0x6, 0x60(%rbx)
movl $0x648d489d, 0x1(%rax)  # imm = 0x648D489D
movw $0xf824, 0x5(%rax)      # imm = 0xF824
movl $0x0, 0x74(%rbx)
movq 0x20(%rbx), %r14
testq %r14, %r14
je 0x1cc01
movq 0x10(%r14), %rax
cmpq 0x60(%rbx), %rax
je 0x1cb89
movl $0x18, %esi
movq %rbx, %rdi
callq 0x149da
testq %rax, %rax
je 0x1cb86
movq %rax, %r14
movq $0x0, (%rax)
movq 0x60(%rbx), %rax
movq %rax, 0x10(%r14)
movq 0x20(%rbx), %rax
leaq 0x8(%rbx), %rcx
testq %rax, %rax
cmovneq %rax, %rcx
movq %r14, (%rcx)
movq %r14, 0x20(%rbx)
movl $0x2, %esi
movq %rbx, %rdi
callq 0x152be
testq %rax, %rax
je 0x1cb86
movw $0x0, (%rax)
jmp 0x1cb89
cmpl $0x0, (%rbx)
jne 0x1cb86
jmp 0x1cbee
// File: /workspace/github_c_makefile_star2_O1/mmcco[P]sljit/sljit_src/sljitNativeX86_64.c
// Function: emit_do_imm32
static int emit_do_imm32(struct sljit_compiler *compiler, u_char rex, u_char opcode, long imm)
{
	u_char *inst;
	int length = 1 + (rex ? 1 : 0) + sizeof(int);

	inst = ensure_buf(compiler, 1 + length);
	FAIL_IF(!inst);
	INC_SIZE(length);
	if (rex)
		*inst++ = rex;
	*inst++ = opcode;
	*(int*)inst = imm;
	return SLJIT_SUCCESS;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %rbx
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %r15
xorl %r12d, %r12d
testl %esi, %esi
sete %r12b
movl %r12d, %esi
xorl $0x7, %esi
callq 0x152be
testq %rax, %rax
je 0x1efc4
movl $0x6, %ecx
subl %r12d, %ecx
movb %cl, (%rax)
movl %ecx, %ecx
addq %rcx, 0x60(%r15)
testb %r14b, %r14b
je 0x1efc9
movb %r14b, 0x1(%rax)
addq $0x2, %rax
jmp 0x1efcc
movl (%r15), %eax
jmp 0x1efd4
incq %rax
movb %bpl, (%rax)
movl %ebx, 0x1(%rax)
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/chrispanag[P]operating-systems-scheduler/scheduler-shell.c
// Function: newNode
node* newNode(int id, pid_t pid, char* name) {
  node* Node = (node*) malloc(sizeof(node));
  Node->id = id;
  Node->pid = pid;
  Node->priority = 0; // All processes are initiated with LOW priority.
  // Copy name to the struct
  Node->name = strdup(name);
  return Node;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %ebp
movl %edi, %r14d
movl $0x28, %edi
callq 0x11a0
movq %rax, %r15
movl %r14d, (%rax)
movl %ebp, 0x4(%rax)
movl $0x0, 0x10(%rax)
movq %rbx, %rdi
callq 0x1220
movq %rax, 0x8(%r15)
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/chrispanag[P]operating-systems-scheduler/scheduler-shell.c
// Function: addNode
node* addNode(node* list, pid_t pid, char* name) {
  node* head = list;
  if (head == NULL) {
    head = newNode(0, pid, name);
    head->next = head;
    head->prev = head;
  } else {
    while (list->next != head) {
      list = list->next;
    }
    list->next = newNode(list->id + 1, pid, name);
    list->next->next = head;
    list->next->prev = list;
    head->prev = list->next;
  }
  return head;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movl %esi, %ebp
testq %rdi, %rdi
je 0x1597
movq %rdi, %rbx
movq %rdi, %rax
movq %rax, %r12
movq 0x18(%rax), %rax
cmpq %rbx, %rax
jne 0x154a
movl (%r12), %r13d
incl %r13d
movl $0x28, %edi
callq 0x11a0
movq %rax, %r15
movl %r13d, (%rax)
movl %ebp, 0x4(%rax)
movl $0x0, 0x10(%rax)
movq %r14, %rdi
callq 0x1220
movq %rax, 0x8(%r15)
movq %r15, 0x18(%r12)
movq %rbx, 0x18(%r15)
movq 0x18(%r12), %rax
movq %r12, 0x20(%rax)
jmp 0x15c1
movl $0x28, %edi
callq 0x11a0
movq %rax, %rbx
xorl %eax, %eax
movl %eax, (%rbx)
movl %ebp, 0x4(%rbx)
movl %eax, 0x10(%rbx)
movq %r14, %rdi
callq 0x1220
movq %rax, 0x8(%rbx)
movq %rbx, 0x18(%rbx)
movq %rbx, %rax
movq %rax, 0x20(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/chrispanag[P]operating-systems-scheduler/scheduler-shell.c
// Function: printList
void printList(node* list) {
  node* head = list;
  char priority[5];
  do {
    if (list->priority) {
      strcpy(priority, "HIGH");
    } else {
      strcpy(priority, "LOW");
    }
    printf("id: %d\tpid: %d\tname: %s\tpriority: %s\n", list->id, list->pid, list->name, priority);
    list = list->next;
  } while (list != head);
  printf("\n");
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x1a34(%rip), %r14      # 0x301d
movq %rsp, %r15
movq %rdi, %r12
cmpl $0x0, 0x10(%r12)
je 0x1605
movb $0x0, 0x4(%rsp)
movl $0x48474948, (%rsp)     # imm = 0x48474948
jmp 0x160c
movl $0x574f4c, (%rsp)       # imm = 0x574F4C
movl (%r12), %esi
movl 0x4(%r12), %edx
movq 0x8(%r12), %rcx
movq %r14, %rdi
movq %r15, %r8
xorl %eax, %eax
callq 0x10d0
movq 0x18(%r12), %r12
cmpq %rbx, %r12
jne 0x15ef
movl $0xa, %edi
callq 0x1060
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/chrispanag[P]operating-systems-scheduler/scheduler-shell.c
// Function: deleteNode
node* deleteNode(node* list, pid_t pid, int id) {
  // Search by pid
  node* head = list;
  if (id == -1) {
    if (list->pid == pid) {
      disconnectNode(list);
      head = list->next;
      free(list);
      return head;
    }
    list = list->next;
    while (list != head) {
      if (list->pid == pid) {
        disconnectNode(list);
        free(list);
        break;
      }
      list = list->next;
    }
  } else {
    // Search by id
    if (list->id == id) {
      list->next->prev = head->prev;
      head->prev->next = list->next;
      head = list->next;
      free(list);
      return head;
    }
    list = list->next;
    while (list != head) {
      if (list->id == id) {
        list->prev->next = list->next;
        list->next->prev = list->prev;
        free(list);
        break;
      }
      list = list->next;
    }
  }
  return head;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpl $-0x1, %edx
je 0x1686
cmpl %edx, (%rbx)
jne 0x16a4
movq 0x18(%rbx), %rax
movq 0x20(%rbx), %rcx
movq %rcx, 0x20(%rax)
movq 0x20(%rbx), %rcx
movq %rax, 0x18(%rcx)
movq %rbx, %rdi
movq 0x18(%rbx), %rbx
jmp 0x16db
cmpl %esi, 0x4(%rbx)
jne 0x16b6
movq 0x18(%rbx), %rax
movq 0x20(%rbx), %rcx
movq %rax, 0x18(%rcx)
movq %rbx, %rdi
movq 0x18(%rbx), %rbx
movq %rcx, 0x20(%rbx)
jmp 0x16db
movq %rbx, %rdi
movq 0x18(%rdi), %rdi
cmpq %rbx, %rdi
je 0x16e0
cmpl %edx, (%rdi)
jne 0x16a7
jmp 0x16c7
movq %rbx, %rdi
movq 0x18(%rdi), %rdi
cmpq %rbx, %rdi
je 0x16e0
cmpl %esi, 0x4(%rdi)
jne 0x16b9
movq 0x18(%rdi), %rax
movq 0x20(%rdi), %rcx
movq %rax, 0x18(%rcx)
movq 0x18(%rdi), %rax
movq %rcx, 0x20(%rax)
callq 0x1050
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/chrispanag[P]operating-systems-scheduler/scheduler-shell.c
// Function: accessNode
node* accessNode(node* list, pid_t pid, int id) {
  node* head = list;
  if (id == -1 && pid >= 0) {
    do {
      if (list->pid == pid) {
        return list;
      }
      list = list->next;
    } while (list != head);
    printf("Error: The node with pid: %d, doesn't exist!\n", pid);
  } else {
    do {
      if (list->id == id) {
        return list;
      }
      list = list->next;
    } while (list != head);
    printf("Error: The node with id: %d, doesn't exist!\n", id);
  }
  return NULL;
}

// Assembly:
pushq %rbx
cmpl $-0x1, %edx
sete %al
testl %esi, %esi
setns %cl
movq %rdi, %rbx
testb %al, %cl
je 0x1711
cmpl %esi, 0x4(%rbx)
je 0x1730
movq 0x18(%rbx), %rbx
cmpq %rdi, %rbx
jne 0x16f8
leaq 0x1936(%rip), %rdi      # 0x3043
xorl %ebx, %ebx
jmp 0x1729
cmpl %edx, (%rbx)
je 0x1730
movq 0x18(%rbx), %rbx
cmpq %rdi, %rbx
jne 0x1711
leaq 0x194c(%rip), %rdi      # 0x3071
xorl %ebx, %ebx
movl %edx, %esi
xorl %eax, %eax
callq 0x10d0
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/chrispanag[P]operating-systems-scheduler/scheduler-shell.c
// Function: sched_create_task
static void sched_create_task(char *executable) {
	pid_t pid = fork();
	if (pid < 0) {
		// Error code
		perror("fork");
	} else if (pid == 0) {
		// Child process code
		free(proc_list);
		char *newargv[] = { executable, NULL, NULL, NULL };
		char *newenviron[] = { NULL };
		raise(SIGSTOP);
		execve(executable, newargv, newenviron);
		// Unreachable point. Execve only returns on error.
		perror("execve");
		exit(1);
	} else {
		// Parent Code
		proc_list = addNode(proc_list, pid, executable);
		nproc++;  /* number of proccesses goes here */
	}
}

// Assembly:
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
callq 0x1250
testl %eax, %eax
js 0x1ca0
movq 0x34c7(%rip), %rdi      # 0x5148
je 0x1cb1
movl %eax, %esi
movq %rbx, %rdx
callq 0x152f
movq %rax, 0x34b4(%rip)      # 0x5148
incl 0x34be(%rip)            # 0x5158
addq $0x30, %rsp
popq %rbx
retq
leaq 0x1428(%rip), %rdi      # 0x30cf
addq $0x30, %rsp
popq %rbx
jmp 0x11d0
leaq 0x10(%rsp), %rsi
leaq 0x8(%rsp), %rcx
movq %rbx, %rdx
callq 0x1270
// File: /workspace/github_c_makefile_star2_O1/chrispanag[P]operating-systems-scheduler/scheduler-shell.c
// Function: do_shell
static void do_shell(char *executable, int wfd, int rfd) {
	char arg1[10], arg2[10];
	char *newargv[] = { executable, NULL, NULL, NULL };
	char *newenviron[] = { NULL };

	sprintf(arg1, "%05d", wfd);
	sprintf(arg2, "%05d", rfd);
	newargv[1] = arg1;
	newargv[2] = arg2;

	raise(SIGSTOP);
	execve(executable, newargv, newenviron);

	/* execve() only returns on error */
	perror("scheduler: child: execve");
	exit(1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %esi, %ebp
movl %edi, %edx
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %rbx
movaps %xmm0, (%rbx)
movaps %xmm0, 0x10(%rbx)
leaq 0x1488(%rip), %rax      # 0x3173
movq %rax, (%rbx)
movq %rsp, %r15
movq $0x0, (%r15)
leaq 0x13d5(%rip), %r12      # 0x30d4
leaq 0x16(%rsp), %r13
movq %r13, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x11f0
leaq 0xc(%rsp), %r14
movq %r14, %rdi
movq %r12, %rsi
movl %ebp, %edx
xorl %eax, %eax
callq 0x11f0
movq %r13, 0x8(%rbx)
movq %r14, 0x10(%rbx)
movl $0x13, %edi
callq 0x1040
leaq 0x1435(%rip), %rdi      # 0x3173
movq %rbx, %rsi
movq %r15, %rdx
callq 0x1130
leaq 0x1389(%rip), %rdi      # 0x30d9
callq 0x11d0
movl $0x1, %edi
callq 0x1200
// File: /workspace/github_c_makefile_star2_O1/mgrosvenor[P]evec/./evec.h
// Function: evdumphdr
void _evdumphdr(int ln, char* fn, const char* fu, evhd_t* hdr)
{
    dprintf(STDERR_FILENO,"[HEADER :   %s:%i:%s()] ", basename(fn), ln, fu);
    dprintf(STDERR_FILENO,"magic1: %s, ", hdr->magic1);
    dprintf(STDERR_FILENO,"slt_size: %" PRId64 ", ", hdr->slt_size);
    dprintf(STDERR_FILENO,"slt_count: %" PRId64 ", ", hdr->slt_count);
    dprintf(STDERR_FILENO,"obj_count: %" PRId64 ", ", hdr->obj_count);
    dprintf(STDERR_FILENO,"magic2: %s\n", hdr->magic2);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
movl %edi, %ebp
movq %rsi, %rdi
callq 0x10c0
leaq 0x1dcd(%rip), %rsi      # 0x3004
movl $0x2, %edi
movq %rax, %rdx
movl %ebp, %ecx
movq %r14, %r8
xorl %eax, %eax
callq 0x1090
leaq 0x1dcb(%rip), %rsi      # 0x301d
movl $0x2, %edi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x1090
movq 0x8(%rbx), %rdx
leaq 0x1dbe(%rip), %rsi      # 0x302a
movl $0x2, %edi
xorl %eax, %eax
callq 0x1090
movq 0x18(%rbx), %rdx
leaq 0x1db7(%rip), %rsi      # 0x303a
movl $0x2, %edi
xorl %eax, %eax
callq 0x1090
movq 0x10(%rbx), %rdx
leaq 0x1db1(%rip), %rsi      # 0x304b
movl $0x2, %edi
xorl %eax, %eax
callq 0x1090
addq $0x28, %rbx
leaq 0x1dab(%rip), %rsi      # 0x305c
movl $0x2, %edi
movq %rbx, %rdx
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x1090
// File: /workspace/github_c_makefile_star2_O1/mgrosvenor[P]evec/./evec.h
// Function: evini
void* evini(size_t slt_size, size_t count)
{
    size_t store_bytes  = count * slt_size;
    size_t full_bytes = EV_HDR_BYTES + store_bytes;

    evhd_t *hdr = (evhd_t*)malloc(full_bytes);
    ifp(!hdr,
        EV_FAIL("No memory to init vector with %" PRId64 "B\n", full_bytes);
                return NULL;
    );


    memset(hdr,0x00,full_bytes);

    memcpy(hdr->magic1,EV_MAGIC1,sizeof(hdr->magic1));
    hdr->slt_size   = slt_size;
    hdr->slt_count  = count;
    hdr->obj_count  = 0;
    memcpy(hdr->magic2,EV_MAGIC2,sizeof(hdr->magic2));

    void *vec_start = (char*)hdr + EV_HDR_BYTES;
    return vec_start;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
movq %rsi, %rbx
imulq %rdi, %rbx
addq $0x30, %rbx
movq %rbx, %rdi
callq 0x10d0
testq %rax, %rax
je 0x133d
movq %rax, %r12
movq %rax, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x1080
movabsq $0x434947414d5645, %rax # imm = 0x434947414D5645
movq %rax, (%r12)
movq %r15, 0x8(%r12)
movq %r14, 0x18(%r12)
movq $0x0, 0x10(%r12)
movabsq $0x5645434947414d, %rax # imm = 0x5645434947414D
movq %rax, 0x28(%r12)
addq $0x30, %r12
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x1e21(%rip), %rax      # 0x3165
movq %rax, (%rsp)
leaq 0x1d22(%rip), %rcx      # 0x3071
leaq 0x1d21(%rip), %r8       # 0x3077
movl $0x1d3, %esi            # imm = 0x1D3
movq %rbx, %r9
xorl %eax, %eax
callq 0x1365
// File: /workspace/github_c_makefile_star2_O1/mgrosvenor[P]evec/./evec.h
// Function: evmsg
static inline void _evmsg(evdbg_e mode, int ln, char* fn, const char* fu, const char* msg, ... )
{
    va_list args;
    va_start(args,msg);
    char* mode_str = NULL;
    switch(mode){
        case EV_MSG_ERR:   mode_str = "Error  :"; break;
        case EV_MSG_DBG:   mode_str = "Debug  :"; break;
        case EV_MSG_WARN:  mode_str = "Warning:"; break;
    }
    dprintf(STDERR_FILENO,"[%s %s:%i:%s()]  ", mode_str, basename(fn), ln, fu);
    vdprintf(STDERR_FILENO,msg,args);

    if(mode == EV_MSG_ERR && EV_HARD_EXIT){
        exit(0xDEAD);
    }
    va_end(args);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xd8, %rsp
movq %r8, %rbx
movq %rcx, %r14
movl %esi, %ebp
leaq 0x20(%rsp), %rcx
movq %r9, 0x28(%rcx)
testb %al, %al
je 0x13be
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsp, %r15
movq %rcx, 0x10(%r15)
leaq 0x100(%rsp), %rax
movq %rax, 0x8(%r15)
movabsq $0x3000000028, %rax     # imm = 0x3000000028
movq %rax, (%r15)
leaq 0x1c83(%rip), %rdi      # 0x3068
callq 0x10c0
leaq 0x211c(%rip), %rsi      # 0x350d
leaq 0x210c(%rip), %rdx      # 0x3504
movl $0x2, %edi
movq %rax, %rcx
movl %ebp, %r8d
movq %r14, %r9
xorl %eax, %eax
callq 0x1090
movl $0x2, %edi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x10f0
movl $0xdead, %edi           # imm = 0xDEAD
callq 0x1100
// File: /workspace/github_c_makefile_star2_O1/mgrosvenor[P]evec/./evec.h
// Function: evhdrcheck
int _evhdrcheck(evhd_t* hdr)
{
    if(strncmp(hdr->magic1, EV_MAGIC1, sizeof(EV_MAGIC1)) != 0){
        EV_FAIL("Header magic 1 should be '%s' but found '%.*s'\n", EV_MAGIC1, sizeof(EV_MAGIC1), hdr->magic1);
        return -1;
    };
    if(strncmp(hdr->magic2, EV_MAGIC2, sizeof(EV_MAGIC2)) != 0){
        EV_FAIL("Header magic 2 should be '%s' but found '%.*s'\n", EV_MAGIC2, sizeof(EV_MAGIC2), hdr->magic2);
        return -1;
    };

    if(hdr->obj_count < 0){
        EV_FAIL("Object count cannot be less than zero!\n");
        return -1;
    }

    if(hdr->index < 0){
        EV_FAIL("Index value cannot be less than zero!\n");
        return -1;
    }

    if(hdr->slt_count < 0){
        EV_FAIL("Slot count cannot be less than zero\n");
        return -1;
    }

    if(hdr->obj_count > hdr->slt_count){
        EV_FAIL("More items in vector (%" PRId64 ") than there is space (%" PRId64 ")\n",
                hdr->obj_count,
                hdr->slt_count);
        return -1;
    }

    if(hdr->slt_size < 0){
        EV_FAIL("Slot size cannot be less than zero\n");
        return -1;
    }

    return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x1c66(%rip), %rsi      # 0x309b
movl $0x8, %edx
callq 0x1040
testl %eax, %eax
jne 0x14a2
leaq 0x28(%rbx), %r14
leaq 0x1c55(%rip), %rsi      # 0x30a3
movl $0x8, %edx
movq %r14, %rdi
callq 0x1040
testl %eax, %eax
jne 0x14cd
movq 0x10(%rbx), %r9
testq %r9, %r9
js 0x14fe
cmpq $0x0, 0x20(%rbx)
js 0x151a
movq 0x18(%rbx), %rdx
testq %rdx, %rdx
js 0x1536
cmpq %rdx, %r9
jg 0x1552
cmpq $0x0, 0x8(%rbx)
js 0x1575
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
subq $0x8, %rsp
leaq 0x1cb8(%rip), %rdx      # 0x3165
leaq 0x1bf7(%rip), %rcx      # 0x30ab
leaq 0x1bfc(%rip), %r8       # 0x30b7
leaq 0x1bd9(%rip), %r9       # 0x309b
movl $0x1e8, %esi            # imm = 0x1E8
xorl %eax, %eax
pushq %rdx
pushq %rbx
jmp 0x14f7
subq $0x8, %rsp
leaq 0x1c8d(%rip), %rdx      # 0x3165
leaq 0x1bcc(%rip), %rcx      # 0x30ab
leaq 0x1c01(%rip), %r8       # 0x30e7
leaq 0x1bb6(%rip), %r9       # 0x30a3
movl $0x1ec, %esi            # imm = 0x1EC
xorl %eax, %eax
pushq %rdx
pushq %r14
pushq $0x8
callq 0x1365
leaq 0x1ba6(%rip), %rcx      # 0x30ab
leaq 0x1c0b(%rip), %r8       # 0x3117
leaq 0x1c52(%rip), %r9       # 0x3165
movl $0x1f1, %esi            # imm = 0x1F1
jmp 0x158f
leaq 0x1b8a(%rip), %rcx      # 0x30ab
leaq 0x1c17(%rip), %r8       # 0x313f
leaq 0x1c36(%rip), %r9       # 0x3165
movl $0x1f6, %esi            # imm = 0x1F6
jmp 0x158f
leaq 0x1b6e(%rip), %rcx      # 0x30ab
leaq 0x1c22(%rip), %r8       # 0x3166
leaq 0x1c1a(%rip), %r9       # 0x3165
movl $0x1fb, %esi            # imm = 0x1FB
jmp 0x158f
leaq 0x1c0c(%rip), %rdi      # 0x3165
leaq 0x1b4b(%rip), %rcx      # 0x30ab
leaq 0x1c24(%rip), %r8       # 0x318b
movl $0x202, %esi            # imm = 0x202
xorl %eax, %eax
pushq %rdi
pushq %rdx
callq 0x1365
leaq 0x1b2f(%rip), %rcx      # 0x30ab
leaq 0x1c3e(%rip), %r8       # 0x31c1
leaq 0x1bdb(%rip), %r9       # 0x3165
movl $0x207, %esi            # imm = 0x207
xorl %eax, %eax
callq 0x1365
// File: /workspace/github_c_makefile_star2_O1/mgrosvenor[P]evec/./evec.h
// Function: evgrow
void* _evgrow(void* vec)
{
    ifp(!vec,
        EV_FAIL("Cannot grow an empty vector!\n");
    );

    evhd_t* hdr = EV_HDR(vec);
    ifp(_evhdrcheck(hdr),
        EV_FAIL("Header sanity check failed\n");
                return NULL;
    );


    const size_t storage_bytes      = hdr->slt_size * hdr->slt_count;
    const size_t new_storage_bytes  = hdr->slt_count ? storage_bytes * EV_GROWTH_FACTOR :
                                      EV_INIT_COUNT * hdr->slt_size;
    const size_t full_bytes         = EV_HDR_BYTES + new_storage_bytes;

    hdr = realloc(hdr, full_bytes);
    if (!hdr){
        EV_FAIL("No memory to grow vector up to %" PRId64 "B\n", full_bytes);
        return NULL;
    }

    memset((char*)hdr + EV_HDR_BYTES + storage_bytes, 0x00, new_storage_bytes - storage_bytes);

    hdr->slt_count  = hdr->slt_count ? hdr->slt_count * EV_GROWTH_FACTOR : EV_INIT_COUNT;

    void *vec_start = (char*)hdr + EV_HDR_BYTES;

    return vec_start;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x1636
movq %rdi, %r15
leaq -0x30(%rdi), %r14
movq %r14, %rdi
callq 0x1427
testl %eax, %eax
jne 0x1652
movq -0x28(%r15), %rbx
movq -0x18(%r15), %rax
movq %rax, %r12
imulq %rbx, %r12
leaq (%r12,%r12), %rcx
shlq $0x3, %rbx
testq %rax, %rax
cmovneq %rcx, %rbx
leaq 0x30(%rbx), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x10e0
testq %rax, %rax
je 0x166e
movq %rax, %r14
leaq (%rax,%r12), %rdi
addq $0x30, %rdi
movq %rax, %r15
addq $0x30, %r15
subq %r12, %rbx
xorl %esi, %esi
movq %rbx, %rdx
callq 0x1080
movq 0x18(%r14), %rax
leaq (%rax,%rax), %rcx
testq %rax, %rax
movl $0x8, %eax
cmovneq %rcx, %rax
movq %rax, 0x18(%r14)
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x1ba8(%rip), %rcx      # 0x31e5
leaq 0x1ba9(%rip), %r8       # 0x31ed
leaq 0x1b1a(%rip), %r9       # 0x3165
movl $0x212, %esi            # imm = 0x212
jmp 0x168f
leaq 0x1b8c(%rip), %rcx      # 0x31e5
leaq 0x1bab(%rip), %r8       # 0x320b
leaq 0x1afe(%rip), %r9       # 0x3165
movl $0x217, %esi            # imm = 0x217
jmp 0x168f
leaq 0x1af0(%rip), %rax      # 0x3165
movq %rax, (%rsp)
leaq 0x1b65(%rip), %rcx      # 0x31e5
leaq 0x1ba0(%rip), %r8       # 0x3227
movl $0x223, %esi            # imm = 0x223
movq %r15, %r9
xorl %eax, %eax
callq 0x1365