LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/mmcco[P]sljit/sljit_src/sljitNativeX86_64.c
// Function: call_with_args
static __inline int call_with_args(struct sljit_compiler *compiler, int type)
{
	u_char *inst;

#ifndef _WIN64
	SLJIT_COMPILE_ASSERT(reg_map[SLJIT_R1] == 6 && reg_map[SLJIT_R0] < 8 && reg_map[SLJIT_R2] < 8, args_regs);

	inst = ensure_buf(compiler, 1 + ((type < SLJIT_CALL3) ? 3 : 6));
	FAIL_IF(!inst);
	INC_SIZE((type < SLJIT_CALL3) ? 3 : 6);
	if (type >= SLJIT_CALL3) {
		*inst++ = REX_W;
		*inst++ = MOV_r_rm;
		*inst++ = MOD_REG | (0x2 /* rdx */ << 3) | reg_lmap[SLJIT_R2];
	}
	*inst++ = REX_W;
	*inst++ = MOV_r_rm;
	*inst++ = MOD_REG | (0x7 /* rdi */ << 3) | reg_lmap[SLJIT_R0];
#else
	SLJIT_COMPILE_ASSERT(reg_map[SLJIT_R1] == 2 && reg_map[SLJIT_R0] < 8 && reg_map[SLJIT_R2] < 8, args_regs);

	inst = ensure_buf(compiler, 1 + ((type < SLJIT_CALL3) ? 3 : 6));
	FAIL_IF(!inst);
	INC_SIZE((type < SLJIT_CALL3) ? 3 : 6);
	if (type >= SLJIT_CALL3) {
		*inst++ = REX_W | REX_R;
		*inst++ = MOV_r_rm;
		*inst++ = MOD_REG | (0x0 /* r8 */ << 3) | reg_lmap[SLJIT_R2];
	}
	*inst++ = REX_W;
	*inst++ = MOV_r_rm;
	*inst++ = MOD_REG | (0x1 /* rcx */ << 3) | reg_lmap[SLJIT_R0];
#endif
	return SLJIT_SUCCESS;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
jmp 0x28781
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %edx
movl $0x6, %eax
movl $0x3, %ecx
cmpl $0x1b, %edx
cmovll %ecx, %eax
addl $0x1, %eax
movslq %eax, %rsi
callq 0x1a330
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x287bc
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x28899
jmp 0x287be
movl -0x14(%rbp), %edx
movl $0x6, %eax
movl $0x3, %ecx
cmpl $0x1b, %edx
cmovll %ecx, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
movl -0x14(%rbp), %edx
movl $0x6, %eax
movl $0x3, %ecx
cmpl $0x1b, %edx
cmovll %ecx, %eax
movslq %eax, %rcx
movq -0x10(%rbp), %rax
addq 0x60(%rax), %rcx
movq %rcx, 0x60(%rax)
cmpl $0x1b, -0x14(%rbp)
jl 0x2884f
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x20(%rbp)
movb $0x48, (%rax)
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x20(%rbp)
movb $-0x75, (%rax)
movzbl 0x7f4c(%rip), %eax      # 0x30783
orl $0xd0, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x20(%rbp)
movb $0x48, (%rax)
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x20(%rbp)
movb $-0x75, (%rax)
movzbl 0x7f07(%rip), %eax      # 0x30781
orl $0xf8, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/mmcco[P]sljit/sljit_src/sljitNativeX86_common.c
// Function: sljit_get_local_base
int sljit_get_local_base(struct sljit_compiler *compiler, int dst, long dstw, long offset)
{
	CHECK_ERROR();
	CHECK(check_sljit_get_local_base(compiler, dst, dstw, offset));
	ADJUST_LOCAL_OFFSET(dst, dstw);

	CHECK_EXTRA_REGS(dst, dstw, (void)0);

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

	ADJUST_LOCAL_OFFSET(SLJIT_MEM1(SLJIT_SP), offset);

#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
	if (NOT_HALFWORD(offset)) {
		FAIL_IF(emit_load_imm64(compiler, TMP_REG1, offset));
#if (defined SLJIT_DEBUG && SLJIT_DEBUG)
		SLJIT_ASSERT(emit_lea_binary(compiler, SLJIT_KEEP_FLAGS, dst, dstw, SLJIT_SP, 0, TMP_REG1, 0) != SLJIT_ERR_UNSUPPORTED);
		return compiler->error;
#else
		return emit_lea_binary(compiler, SLJIT_KEEP_FLAGS, dst, dstw, SLJIT_SP, 0, TMP_REG1, 0);
#endif
	}
#endif

	if (offset != 0)
		return emit_lea_binary(compiler, SLJIT_KEEP_FLAGS, dst, dstw, SLJIT_SP, 0, SLJIT_IMM, offset);
	return emit_mov(compiler, dst, dstw, SLJIT_SP, 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, (%rax)
je 0x29f4e
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x2a084
jmp 0x29f50
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq 0x2a090
cmpl $0x8d, -0x14(%rbp)
jne 0x29f79
movq -0x20(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movl $0x0, 0x70(%rax)
movq -0x28(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x28(%rbp)
cmpq $0x7fffffff, -0x28(%rbp) # imm = 0x7FFFFFFF
jg 0x29fa8
cmpq $-0x80000000, -0x28(%rbp) # imm = 0x80000000
jge 0x2a02d
jmp 0x29faa
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rdx
movl $0xe, %esi
callq 0x1cb30
cmpl $0x0, %eax
je 0x29fcf
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x2a084
jmp 0x29fd1
jmp 0x29fd3
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %edx
movq -0x20(%rbp), %rcx
movl $0x4000, %esi           # imm = 0x4000
movl $0xd, %r8d
xorl %eax, %eax
movl %eax, %r9d
movl $0xe, (%rsp)
movq $0x0, 0x8(%rsp)
callq 0x21180
cmpl $0x4, %eax
jne 0x2a020
leaq 0x67df(%rip), %rdi      # 0x307ee
movl $0xb32, %esi            # imm = 0xB32
movb $0x0, %al
callq 0x2070
callq 0x2040
jmp 0x2a022
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x2a084
cmpq $0x0, -0x28(%rbp)
je 0x2a067
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %edx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %rax
movl $0x4000, %esi           # imm = 0x4000
movl $0xd, %r8d
xorl %r9d, %r9d
movl $0x40, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x21180
movl %eax, -0x4(%rbp)
jmp 0x2a084
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movq -0x20(%rbp), %rdx
movl $0xd, %ecx
xorl %eax, %eax
movl %eax, %r8d
callq 0x1d0a0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/mmcco[P]sljit/sljit_src/sljitNativeX86_common.c
// Function: sljit_emit_const
struct sljit_const* sljit_emit_const(struct sljit_compiler *compiler, int dst, long dstw, long init_value)
{
	u_char *inst;
	struct sljit_const *const_;
#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
	int reg;
#endif

	CHECK_ERROR_PTR();
	CHECK_PTR(check_sljit_emit_const(compiler, dst, dstw, init_value));
	ADJUST_LOCAL_OFFSET(dst, dstw);

	CHECK_EXTRA_REGS(dst, dstw, (void)0);

	const_ = ensure_abuf(compiler, sizeof(struct sljit_const));
	if (!const_)
		return NULL;
	set_const(const_, compiler);

#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
	compiler->mode32 = 0;
	reg = SLOW_IS_REG(dst) ? dst : TMP_REG1;

	if (emit_load_imm64(compiler, reg, init_value))
		return NULL;
#else
	if (dst == SLJIT_UNUSED)
		dst = TMP_REG1;

	if (emit_mov(compiler, dst, dstw, SLJIT_IMM, init_value))
		return NULL;
#endif

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

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

#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
	if (dst & SLJIT_MEM)
		if (emit_mov(compiler, dst, dstw, TMP_REG1, 0))
			return NULL;
#endif

	return const_;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, (%rax)
je 0x2a5ad
movq $0x0, -0x8(%rbp)
jmp 0x2a6e3
jmp 0x2a5af
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq 0x2a6f0
cmpl $0x8d, -0x14(%rbp)
jne 0x2a5d8
movq -0x20(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movl $0x10, %esi
callq 0x18f40
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x2a5fe
movq $0x0, -0x8(%rbp)
jmp 0x2a6e3
movq -0x38(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x2abe0
movq -0x10(%rbp), %rax
movl $0x0, 0x70(%rax)
cmpl $0x0, -0x14(%rbp)
jle 0x2a62a
cmpl $0x3f, -0x14(%rbp)
jg 0x2a62a
movl -0x14(%rbp), %eax
movl %eax, -0x40(%rbp)
jmp 0x2a634
movl $0xe, %eax
movl %eax, -0x40(%rbp)
jmp 0x2a634
movl -0x40(%rbp), %eax
movl %eax, -0x3c(%rbp)
movq -0x10(%rbp), %rdi
movl -0x3c(%rbp), %esi
movq -0x28(%rbp), %rdx
callq 0x1cb30
cmpl $0x0, %eax
je 0x2a65c
movq $0x0, -0x8(%rbp)
jmp 0x2a6e3
movq -0x10(%rbp), %rdi
movl $0x2, %esi
callq 0x1a330
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x2a67f
movq $0x0, -0x8(%rbp)
jmp 0x2a6e3
movq -0x30(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x30(%rbp)
movb $0x0, (%rax)
movq -0x30(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x30(%rbp)
movb $0x1, (%rax)
movl -0x14(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x2a6db
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movq -0x20(%rbp), %rdx
movl $0xe, %ecx
xorl %eax, %eax
movl %eax, %r8d
callq 0x1d0a0
cmpl $0x0, %eax
je 0x2a6d9
movq $0x0, -0x8(%rbp)
jmp 0x2a6e3
jmp 0x2a6db
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/mmcco[P]sljit/sljit_src/sljitLir.c
// Function: set_const
static __inline void set_const(struct sljit_const *const_, struct sljit_compiler *compiler)
{
	const_->next = NULL;
	const_->addr = compiler->size;
	if (compiler->last_const)
		compiler->last_const->next = const_;
	else
		compiler->consts = const_;
	compiler->last_const = const_;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq $0x0, (%rax)
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x30(%rax)
je 0x2ac23
movq -0x8(%rbp), %rcx
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movq %rcx, (%rax)
jmp 0x2ac2f
movq -0x8(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x8(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x30(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/mmcco[P]sljit/sljit_src/sljitLir.c
// Function: sljit_emit_fcmp
struct sljit_jump* sljit_emit_fcmp(struct sljit_compiler *compiler, int type,
	int src1, long src1w,
	int src2, long src2w)
{
	int flags, condition;

	CHECK_ERROR_PTR();
	CHECK_PTR(check_sljit_emit_fcmp(compiler, type, src1, src1w, src2, src2w));

	condition = type & 0xff;
	flags = (condition <= SLJIT_D_NOT_EQUAL) ? SLJIT_SET_E : SLJIT_SET_S;
	if (type & SLJIT_SINGLE_OP)
		flags |= SLJIT_SINGLE_OP;

#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) \
		|| (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS)
	compiler->skip_checks = 1;
#endif
	sljit_emit_fop1(compiler, SLJIT_DCMP | flags, src1, src1w, src2, src2w);

#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) \
		|| (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS)
	compiler->skip_checks = 1;
#endif
	return sljit_emit_jump(compiler, condition | (type & SLJIT_REWRITABLE_JUMP));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movq %r9, -0x30(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, (%rax)
je 0x2b8e4
movq $0x0, -0x8(%rbp)
jmp 0x2b991
jmp 0x2b8e6
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movl -0x18(%rbp), %edx
movq -0x20(%rbp), %rcx
movl -0x24(%rbp), %r8d
movq -0x30(%rbp), %r9
callq 0x2b9a0
movl -0x14(%rbp), %eax
andl $0xff, %eax
movl %eax, -0x38(%rbp)
movl -0x38(%rbp), %edx
movl $0x800, %eax            # imm = 0x800
movl $0x200, %ecx            # imm = 0x200
cmpl $0xf, %edx
cmovlel %ecx, %eax
movl %eax, -0x34(%rbp)
movl -0x14(%rbp), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
je 0x2b93a
movl -0x34(%rbp), %eax
orl $0x100, %eax            # imm = 0x100
movl %eax, -0x34(%rbp)
movq -0x10(%rbp), %rax
movl $0x1, 0x84(%rax)
movq -0x10(%rbp), %rdi
movl -0x34(%rbp), %esi
orl $0x86, %esi
movl -0x18(%rbp), %edx
movq -0x20(%rbp), %rcx
movl -0x24(%rbp), %r8d
movq -0x30(%rbp), %r9
callq 0x23a40
movq -0x10(%rbp), %rax
movl $0x1, 0x84(%rax)
movq -0x10(%rbp), %rdi
movl -0x38(%rbp), %esi
movl -0x14(%rbp), %eax
andl $0x1000, %eax           # imm = 0x1000
orl %eax, %esi
callq 0x283d0
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movb %dl, %al
movb %sil, %dl
movq %rdi, -0x10(%rbp)
movb %dl, -0x11(%rbp)
movb %al, -0x12(%rbp)
movq %rcx, -0x20(%rbp)
movzbl -0x11(%rbp), %edx
xorl %eax, %eax
movl $0x1, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
addl $0x1, %eax
cltq
addq $0x4, %rax
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rdi
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rsi
callq 0x1a330
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x2c3f0
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x2c459
jmp 0x2c3f2
movl -0x2c(%rbp), %eax
movb %al, %cl
movq -0x28(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x28(%rbp)
movb %cl, (%rax)
movslq -0x2c(%rbp), %rcx
movq -0x10(%rbp), %rax
addq 0x60(%rax), %rcx
movq %rcx, 0x60(%rax)
cmpb $0x0, -0x11(%rbp)
je 0x2c432
movb -0x11(%rbp), %cl
movq -0x28(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x28(%rbp)
movb %cl, (%rax)
movb -0x12(%rbp), %cl
movq -0x28(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x28(%rbp)
movb %cl, (%rax)
movq -0x20(%rbp), %rax
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movl $0x28, %edi
callq 0x11c0
movq %rax, -0x18(%rbp)
movl -0x4(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movl -0x8(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0x10(%rax)
movq -0x10(%rbp), %rdi
callq 0x1230
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x141e
movl -0xc(%rbp), %esi
movq -0x18(%rbp), %rdx
xorl %edi, %edi
callq 0x1370
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x20(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x20(%rax)
jmp 0x148c
jmp 0x1420
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
cmpq -0x20(%rbp), %rax
je 0x143c
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x1420
movq -0x8(%rbp), %rax
movl (%rax), %edi
addl $0x1, %edi
movl -0xc(%rbp), %esi
movq -0x18(%rbp), %rdx
callq 0x1370
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x20(%rbp), %rcx
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rcx, 0x18(%rax)
movq -0x8(%rbp), %rcx
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rcx, 0x20(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x20(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x10(%rax)
je 0x14d0
leaq -0x15(%rbp), %rdi
leaq 0x1b4f(%rip), %rsi      # 0x3018
callq 0x1060
jmp 0x14e0
leaq -0x15(%rbp), %rdi
leaq 0x1b42(%rip), %rsi      # 0x301d
callq 0x1060
movq -0x8(%rbp), %rax
movl (%rax), %esi
movq -0x8(%rbp), %rax
movl 0x4(%rax), %edx
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rcx
leaq -0x15(%rbp), %r8
leaq 0x1b21(%rip), %rdi      # 0x3021
movb $0x0, %al
callq 0x10c0
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq -0x10(%rbp), %rax
jne 0x14b4
leaq 0x1b7c(%rip), %rdi      # 0x30a0
movb $0x0, %al
callq 0x10c0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpl $-0x1, -0x18(%rbp)
jne 0x1624
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
cmpl -0x14(%rbp), %eax
jne 0x15db
movq -0x10(%rbp), %rdi
callq 0x1540
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1050
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x16e2
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x20(%rbp), %rax
je 0x161f
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
cmpl -0x14(%rbp), %eax
jne 0x1611
movq -0x10(%rbp), %rdi
callq 0x1540
movq -0x10(%rbp), %rdi
callq 0x1050
jmp 0x161f
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0x15e7
jmp 0x16da
movq -0x10(%rbp), %rax
movl (%rax), %eax
cmpl -0x18(%rbp), %eax
jne 0x1676
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rcx
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1050
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x16e2
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x20(%rbp), %rax
je 0x16d8
movq -0x10(%rbp), %rax
movl (%rax), %eax
cmpl -0x18(%rbp), %eax
jne 0x16ca
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rcx
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rdi
callq 0x1050
jmp 0x16d8
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0x1682
jmp 0x16da
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpl $-0x1, -0x18(%rbp)
jne 0x1757
cmpl $0x0, -0x14(%rbp)
jl 0x1757
jmp 0x1718
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
cmpl -0x14(%rbp), %eax
jne 0x172e
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x179d
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x20(%rbp), %rax
jne 0x1718
movl -0x14(%rbp), %esi
leaq 0x18f9(%rip), %rdi      # 0x3047
movb $0x0, %al
callq 0x10c0
jmp 0x1795
jmp 0x1759
movq -0x10(%rbp), %rax
movl (%rax), %eax
cmpl -0x18(%rbp), %eax
jne 0x176e
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x179d
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x20(%rbp), %rax
jne 0x1759
movl -0x18(%rbp), %esi
leaq 0x18e7(%rip), %rdi      # 0x3075
movb $0x0, %al
callq 0x10c0
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/chrispanag[P]operating-systems-scheduler/scheduler-shell.c
// Function: getNextProcess
node* getNextProcess(node* this, int terminated) {
  // if priority == 0 and there are other processes with HIGH
  if (!this->next->priority && proc_list_high != NULL) {
    if (terminated && proc_list_high == this) return this->next;
    else return proc_list_high;
  }
  return this->next;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
cmpl $0x0, 0x10(%rax)
jne 0x1801
cmpq $0x0, 0x3987(%rip)      # 0x5158
je 0x1801
cmpl $0x0, -0x14(%rbp)
je 0x17f4
movq 0x3978(%rip), %rax      # 0x5158
cmpq -0x10(%rbp), %rax
jne 0x17f4
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x180d
movq 0x395d(%rip), %rax      # 0x5158
movq %rax, -0x8(%rbp)
jmp 0x180d
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/chrispanag[P]operating-systems-scheduler/scheduler-shell.c
// Function: sched_create_shell
static pid_t sched_create_shell(char *executable, int *request_fd, int *return_fd) {
	pid_t p;
	int pfds_rq[2], pfds_ret[2];

	if (pipe(pfds_rq) < 0 || pipe(pfds_ret) < 0) {
		perror("pipe");
		exit(1);
	}

	p = fork();
	if (p < 0) {
		perror("scheduler: fork");
		exit(1);
	}

	if (p == 0) {
		/* Child */
		close(pfds_rq[0]);
		close(pfds_ret[1]);
		do_shell(executable, pfds_rq[1], pfds_ret[0]);
		assert(0);
	}
	/* Parent */
	close(pfds_rq[1]);
	close(pfds_ret[0]);
	*request_fd = pfds_rq[0];
	*return_fd = pfds_ret[1];
  return p;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq -0x24(%rbp), %rdi
callq 0x1120
cmpl $0x0, %eax
jl 0x19b0
leaq -0x2c(%rbp), %rdi
callq 0x1120
cmpl $0x0, %eax
jge 0x19c6
leaq 0x17d4(%rip), %rdi      # 0x318b
callq 0x11f0
movl $0x1, %edi
callq 0x1220
callq 0x1260
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jge 0x19ea
leaq 0x170e(%rip), %rdi      # 0x30e9
callq 0x11f0
movl $0x1, %edi
callq 0x1220
cmpl $0x0, -0x1c(%rbp)
jne 0x1a2e
movl -0x24(%rbp), %edi
callq 0x1110
movl -0x28(%rbp), %edi
callq 0x1110
movq -0x8(%rbp), %rdi
movl -0x20(%rbp), %esi
movl -0x2c(%rbp), %edx
callq 0x1cf0
leaq 0x16e3(%rip), %rdi      # 0x30f9
leaq 0x16de(%rip), %rsi      # 0x30fb
movl $0x1c0, %edx            # imm = 0x1C0
leaq 0x16e4(%rip), %rcx      # 0x310d
callq 0x10e0
movl -0x20(%rbp), %edi
callq 0x1110
movl -0x2c(%rbp), %edi
callq 0x1110
movl -0x24(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movl -0x28(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movl -0x1c(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
callq 0x1260
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jge 0x1a8b
leaq 0x1673(%rip), %rdi      # 0x30f4
callq 0x11f0
jmp 0x1b21
cmpl $0x0, -0xc(%rbp)
jne 0x1af6
movq 0x36b8(%rip), %rdi      # 0x5150
callq 0x1050
leaq -0x30(%rbp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x10f0
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
leaq -0x38(%rbp), %rdi
xorl %esi, %esi
movl $0x8, %edx
callq 0x10f0
movl $0x13, %edi
callq 0x1040
movq -0x8(%rbp), %rdi
leaq -0x30(%rbp), %rsi
leaq -0x38(%rbp), %rdx
callq 0x1140
leaq 0x166c(%rip), %rdi      # 0x3153
callq 0x11f0
movl $0x1, %edi
callq 0x1220
movq 0x3653(%rip), %rdi      # 0x5150
movl -0xc(%rbp), %esi
movq -0x8(%rbp), %rdx
callq 0x13d0
movq %rax, 0x3640(%rip)      # 0x5150
movl 0x364a(%rip), %eax      # 0x5160
addl $0x1, %eax
movl %eax, 0x3641(%rip)      # 0x5160
jmp 0x1b21
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/chrispanag[P]operating-systems-scheduler/scheduler-shell.c
// Function: install_signal_handlers
static void install_signal_handlers(void) {
	sigset_t sigset;
	struct sigaction sa;

	sa.sa_handler = sigchld_handler;
	sa.sa_flags = SA_RESTART;
	sigemptyset(&sigset);
	sigaddset(&sigset, SIGCHLD);
	sigaddset(&sigset, SIGALRM);
	sa.sa_mask = sigset;
	if (sigaction(SIGCHLD, &sa, NULL) < 0) {
		perror("sigaction: sigchld");
		exit(1);
	}

	sa.sa_handler = sigalrm_handler;
	if (sigaction(SIGALRM, &sa, NULL) < 0) {
		perror("sigaction: sigalrm");
		exit(1);
	}

	/*
	 * Ignore SIGPIPE, so that write()s to pipes
	 * with no reader do not result in us being killed,
	 * and write() returns EPIPE instead.
	 */
	if (signal(SIGPIPE, SIG_IGN) < 0) {
		perror("signal: sigpipe");
		exit(1);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x120, %rsp            # imm = 0x120
leaq 0x25e(%rip), %rax       # 0x1da0
movq %rax, -0x118(%rbp)
movl $0x10000000, -0x90(%rbp) # imm = 0x10000000
leaq -0x80(%rbp), %rdi
callq 0x1170
leaq -0x80(%rbp), %rdi
movl $0x11, %esi
callq 0x1250
leaq -0x80(%rbp), %rdi
movl $0xe, %esi
callq 0x1250
leaq -0x118(%rbp), %rdi
addq $0x8, %rdi
leaq -0x80(%rbp), %rsi
movl $0x80, %edx
callq 0x1180
movl $0x11, %edi
leaq -0x118(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x1070
cmpl $0x0, %eax
jge 0x1bc1
leaq 0x15a8(%rip), %rdi      # 0x315a
callq 0x11f0
movl $0x1, %edi
callq 0x1220
leaq 0x458(%rip), %rax       # 0x2020
movq %rax, -0x118(%rbp)
movl $0xe, %edi
leaq -0x118(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x1070
cmpl $0x0, %eax
jge 0x1bff
leaq 0x157d(%rip), %rdi      # 0x316d
callq 0x11f0
movl $0x1, %edi
callq 0x1220
movl $0xd, %edi
movl $0x1, %esi
callq 0x1150
cmpq $0x0, %rax
jae 0x1c2a
leaq 0x1565(%rip), %rdi      # 0x3180
callq 0x11f0
movl $0x1, %edi
callq 0x1220
addq $0x120, %rsp            # imm = 0x120
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/chrispanag[P]operating-systems-scheduler/scheduler-shell.c
// Function: shell_request_loop
static void shell_request_loop(int request_fd, int return_fd) {
	int ret;
	struct request_struct rq;

	/*
	 * Keep receiving requests from the shell.
	 */
	for (;;) {
		if (read(request_fd, &rq, sizeof(rq)) != sizeof(rq)) {
			perror("scheduler: read from shell");
			fprintf(stderr, "Scheduler: giving up on shell request processing.\n");
			break;
		}

		signals_disable();
		ret = process_request(&rq);
		signals_enable();

		if (write(return_fd, &ret, sizeof(ret)) != sizeof(ret)) {
			perror("scheduler: write to shell");
			fprintf(stderr, "Scheduler: giving up on shell request processing.\n");
			break;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl -0x4(%rbp), %edi
leaq -0x50(%rbp), %rsi
movl $0x44, %edx
callq 0x1130
cmpq $0x44, %rax
je 0x1c8b
leaq 0x156a(%rip), %rdi      # 0x31d6
callq 0x11f0
movq 0x3380(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
leaq 0x156f(%rip), %rsi      # 0x31f1
movb $0x0, %al
callq 0x1160
jmp 0x1ce3
callq 0x2050
leaq -0x50(%rbp), %rdi
callq 0x20c0
movl %eax, -0xc(%rbp)
callq 0x2160
movl -0x8(%rbp), %edi
leaq -0xc(%rbp), %rsi
movl $0x4, %edx
callq 0x1080
cmpq $0x4, %rax
je 0x1cde
leaq 0x1565(%rip), %rdi      # 0x3224
callq 0x11f0
movq 0x332d(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
leaq 0x151c(%rip), %rsi      # 0x31f1
movb $0x0, %al
callq 0x1160
jmp 0x1ce3
jmp 0x1c4e
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
leaq -0x50(%rbp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x10f0
movq -0x8(%rbp), %rax
movq %rax, -0x50(%rbp)
leaq -0x58(%rbp), %rdi
xorl %esi, %esi
movl $0x8, %edx
callq 0x10f0
leaq -0x1a(%rbp), %rdi
movl -0xc(%rbp), %edx
leaq 0x1404(%rip), %rsi      # 0x313c
movb $0x0, %al
callq 0x1210
leaq -0x24(%rbp), %rdi
movl -0x10(%rbp), %edx
leaq 0x13ef(%rip), %rsi      # 0x313c
movb $0x0, %al
callq 0x1210
leaq -0x1a(%rbp), %rax
movq %rax, -0x48(%rbp)
leaq -0x24(%rbp), %rax
movq %rax, -0x40(%rbp)
movl $0x13, %edi
callq 0x1040
movq -0x8(%rbp), %rdi
leaq -0x50(%rbp), %rsi
leaq -0x58(%rbp), %rdx
callq 0x1140
leaq 0x13bb(%rip), %rdi      # 0x3141
callq 0x11f0
movl $0x1, %edi
callq 0x1220
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/chrispanag[P]operating-systems-scheduler/scheduler-shell.c
// Function: signals_disable
static void signals_disable(void) {
	sigset_t sigset;

	sigemptyset(&sigset);
	sigaddset(&sigset, SIGALRM);
	sigaddset(&sigset, SIGCHLD);
	if (sigprocmask(SIG_BLOCK, &sigset, NULL) < 0) {
		perror("signals_disable: sigprocmask");
		exit(1);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
leaq -0x80(%rbp), %rdi
callq 0x1170
leaq -0x80(%rbp), %rdi
movl $0xe, %esi
callq 0x1250
leaq -0x80(%rbp), %rdi
movl $0x11, %esi
callq 0x1250
xorl %edi, %edi
leaq -0x80(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x1030
cmpl $0x0, %eax
jge 0x20aa
leaq 0x10f5(%rip), %rdi      # 0x3190
callq 0x11f0
movl $0x1, %edi
callq 0x1220
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/chrispanag[P]operating-systems-scheduler/scheduler-shell.c
// Function: process_request
static int process_request(struct request_struct *rq) {
	switch (rq->request_no) {
		case REQ_PRINT_TASKS:
			sched_print_tasks();
			return 0;

		case REQ_KILL_TASK:
			return sched_kill_task_by_id(rq->task_arg);

		case REQ_EXEC_TASK:
			sched_create_task(rq->exec_task_arg);
			return 0;

    case REQ_HIGH_TASK:
      sched_set_priority_high(rq->task_arg);
      return 0;

    case REQ_LOW_TASK:
      sched_set_priority_low(rq->task_arg);
      return 0;

		default:
			return -ENOSYS;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
movq %rax, -0x18(%rbp)
subq $0x4, %rax
ja 0x214f
movq -0x18(%rbp), %rax
leaq 0xf1d(%rip), %rcx       # 0x3004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
callq 0x21d0
movl $0x0, -0x4(%rbp)
jmp 0x2156
movq -0x10(%rbp), %rax
movl 0x4(%rax), %edi
callq 0x21f0
movl %eax, -0x4(%rbp)
jmp 0x2156
movq -0x10(%rbp), %rdi
addq $0x8, %rdi
callq 0x1a60
movl $0x0, -0x4(%rbp)
jmp 0x2156
movq -0x10(%rbp), %rax
movl 0x4(%rax), %edi
callq 0x2250
movl $0x0, -0x4(%rbp)
jmp 0x2156
movq -0x10(%rbp), %rax
movl 0x4(%rax), %edi
callq 0x2340
movl $0x0, -0x4(%rbp)
jmp 0x2156
movl $0xffffffda, -0x4(%rbp) # imm = 0xFFFFFFDA
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/chrispanag[P]operating-systems-scheduler/scheduler-shell.c
// Function: signals_enable
static void signals_enable(void) {
	sigset_t sigset;

	sigemptyset(&sigset);
	sigaddset(&sigset, SIGALRM);
	sigaddset(&sigset, SIGCHLD);
	if (sigprocmask(SIG_UNBLOCK, &sigset, NULL) < 0) {
		perror("signals_enable: sigprocmask");
		exit(1);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
leaq -0x80(%rbp), %rdi
callq 0x1170
leaq -0x80(%rbp), %rdi
movl $0xe, %esi
callq 0x1250
leaq -0x80(%rbp), %rdi
movl $0x11, %esi
callq 0x1250
movl $0x1, %edi
leaq -0x80(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x1030
cmpl $0x0, %eax
jge 0x21bd
leaq 0x100c(%rip), %rdi      # 0x31ba
callq 0x11f0
movl $0x1, %edi
callq 0x1220
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/chrispanag[P]operating-systems-scheduler/scheduler-shell.c
// Function: sched_kill_task_by_id
static int sched_kill_task_by_id(int id) {
  node* stopped = accessNode(proc_list, -1, id);
  if (stopped != NULL) {
    kill(stopped->pid, SIGKILL);
    return id;
  }
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x8(%rbp)
movq 0x2f4e(%rip), %rdi      # 0x5150
movl -0x8(%rbp), %edx
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x16f0
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x2233
movq -0x10(%rbp), %rax
movl 0x4(%rax), %edi
movl $0x9, %esi
callq 0x11a0
movl -0x8(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x223a
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/chrispanag[P]operating-systems-scheduler/scheduler-shell.c
// Function: sched_set_priority_high
static void sched_set_priority_high(int id) {
  node* this = accessNode(proc_list, -1, id);
  if (this != NULL) {
    disconnectNode(this);
    this->priority = 1;
    node* list = proc_list;
    // Search until u find the last zero
    while ((list->prev != proc_list) && (list->prev->priority == 0)) {
      list = list->prev;
    }
    this->prev = list->prev;
    this->next = list;
    list->prev->next = this;
    list->prev = this;
    if (proc_list_high == NULL) proc_list_high = this;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq 0x2eee(%rip), %rdi      # 0x5150
movl -0x4(%rbp), %edx
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x16f0
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x232b
movq -0x10(%rbp), %rdi
callq 0x1540
movq -0x10(%rbp), %rax
movl $0x1, 0x10(%rax)
movq 0x2eb7(%rip), %rax      # 0x5150
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rcx
xorl %eax, %eax
cmpq 0x2ea2(%rip), %rcx      # 0x5150
movb %al, -0x19(%rbp)
je 0x22c5
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
cmpl $0x0, 0x10(%rax)
sete %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
testb $0x1, %al
jne 0x22ce
jmp 0x22dc
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x229d
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x20(%rax)
cmpq $0x0, 0x2e3c(%rip)      # 0x5158
jne 0x2329
movq -0x10(%rbp), %rax
movq %rax, 0x2e2f(%rip)      # 0x5158
jmp 0x232b
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/chrispanag[P]operating-systems-scheduler/scheduler-shell.c
// Function: sched_set_priority_low
static void sched_set_priority_low(int id) {
  node* this = accessNode(proc_list, -1, id);
  if (this != NULL) {
    this->priority = 0;

    node* list = proc_list_high;
    disconnectNode(this);
    this->prev = list->prev;
    this->next = list;
    list->prev->next = this;
    list->prev = this;

    // If we demoted the proc_list_high index we need to change it
    if (proc_list_high == this) {
      if (proc_list_high->next->priority) {
        proc_list_high = proc_list_high->next;
      } else {
        proc_list_high = NULL;
      }
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq 0x2dfe(%rip), %rdi      # 0x5150
movl -0x4(%rbp), %edx
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x16f0
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x2406
movq -0x10(%rbp), %rax
movl $0x0, 0x10(%rax)
movq 0x2dd8(%rip), %rax      # 0x5158
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1540
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x20(%rax)
movq 0x2d8c(%rip), %rax      # 0x5158
cmpq -0x10(%rbp), %rax
jne 0x2404
movq 0x2d7f(%rip), %rax      # 0x5158
movq 0x18(%rax), %rax
cmpl $0x0, 0x10(%rax)
je 0x23f7
movq 0x2d6e(%rip), %rax      # 0x5158
movq 0x18(%rax), %rax
movq %rax, 0x2d63(%rip)      # 0x5158
jmp 0x2402
movq $0x0, 0x2d56(%rip) # 0x5158
jmp 0x2404
jmp 0x2406
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0x10b0
movq %rax, %rdx
movl -0x4(%rbp), %ecx
movq -0x18(%rbp), %r8
movl $0x2, %edi
leaq 0x2dbe(%rip), %rsi      # 0x4004
movb $0x0, %al
callq 0x1080
movq -0x20(%rbp), %rdx
movl $0x2, %edi
leaq 0x2dc0(%rip), %rsi      # 0x401d
movb $0x0, %al
callq 0x1080
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdx
movl $0x2, %edi
leaq 0x2db2(%rip), %rsi      # 0x402a
movb $0x0, %al
callq 0x1080
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rdx
movl $0x2, %edi
leaq 0x2da7(%rip), %rsi      # 0x403a
movb $0x0, %al
callq 0x1080
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rdx
movl $0x2, %edi
leaq 0x2d9d(%rip), %rsi      # 0x404b
movb $0x0, %al
callq 0x1080
movq -0x20(%rbp), %rdx
addq $0x28, %rdx
movl $0x2, %edi
leaq 0x2d93(%rip), %rsi      # 0x405c
movb $0x0, %al
callq 0x1080
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
imulq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
addq $0x30, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x10c0
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x135c
movq -0x28(%rbp), %r9
movl $0x2, %edi
movl $0x1d3, %esi            # imm = 0x1D3
leaq 0x2d36(%rip), %rdx      # 0x4068
leaq 0x2d38(%rip), %rcx      # 0x4071
leaq 0x2d37(%rip), %r8       # 0x4077
leaq 0x2e1e(%rip), %rax      # 0x4165
movq %rax, (%rsp)
movb $0x0, %al
callq 0x13d0
movq $0x0, -0x8(%rbp)
jmp 0x13c0
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rdx
xorl %esi, %esi
callq 0x1070
movq -0x30(%rbp), %rax
movq 0x2d25(%rip), %rcx      # 0x409b
movq %rcx, (%rax)
movq -0x10(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x30(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x30(%rbp), %rax
movq 0x2cfb(%rip), %rcx      # 0x40a3
movq %rcx, 0x28(%rax)
movq -0x30(%rbp), %rax
addq $0x30, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
testb %al, %al
je 0x140e
movaps %xmm0, -0xd0(%rbp)
movaps %xmm1, -0xc0(%rbp)
movaps %xmm2, -0xb0(%rbp)
movaps %xmm3, -0xa0(%rbp)
movaps %xmm4, -0x90(%rbp)
movaps %xmm5, -0x80(%rbp)
movaps %xmm6, -0x70(%rbp)
movaps %xmm7, -0x60(%rbp)
movq %r9, -0xd8(%rbp)
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movq %r8, -0x20(%rbp)
leaq -0x100(%rbp), %rax
movq %rax, -0x30(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movl $0x30, -0x3c(%rbp)
movl $0x28, -0x40(%rbp)
movq $0x0, -0x48(%rbp)
movl -0x4(%rbp), %eax
movl %eax, -0x104(%rbp)
testl %eax, %eax
je 0x1486
jmp 0x145f
movl -0x104(%rbp), %eax
subl $0x1, %eax
je 0x1493
jmp 0x146c
movl -0x104(%rbp), %eax
subl $0x2, %eax
jne 0x149e
jmp 0x1479
leaq 0x30f7(%rip), %rax      # 0x4577
movq %rax, -0x48(%rbp)
jmp 0x149e
leaq 0x30f3(%rip), %rax      # 0x4580
movq %rax, -0x48(%rbp)
jmp 0x149e
leaq 0x30ef(%rip), %rax      # 0x4589
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x110(%rbp)
movq -0x10(%rbp), %rdi
callq 0x10b0
movq -0x110(%rbp), %rdx
movq %rax, %rcx
movl -0x8(%rbp), %r8d
movq -0x18(%rbp), %r9
movl $0x2, %edi
leaq 0x30c2(%rip), %rsi      # 0x4592
movb $0x0, %al
callq 0x1080
movq -0x20(%rbp), %rsi
leaq -0x40(%rbp), %rdx
movl $0x2, %edi
callq 0x10e0
cmpl $0x2, -0x4(%rbp)
jne 0x14f9
movl $0xdead, %edi           # imm = 0xDEAD
callq 0x10f0
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/mgrosvenor[P]evec/./evec.h
// Function: evpush
void* evpush(void* vec, void* obj, size_t obj_size)
{
    void* result = vec;
    if(!vec){
        //Get some memory
        result = evinisz(obj_size);
    }

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

    //Sanity check
    ifp(obj_size > hdr->slt_size,
        EV_FAIL("Object size (%" PRId64 ") is larger than there is space (%" PRId64 ")\n",
                obj_size,
                hdr->slt_size);
                return NULL;
    );

    //Enough space?
    if(hdr->obj_count == hdr->slt_count){
        //Get some more
        result = _evgrow(result);
        hdr = EV_HDR(result);
    }

    void* next_obj = ((char*)result) + hdr->slt_size * hdr->obj_count;
    memcpy(next_obj,obj,obj_size);
    hdr->obj_count++;

    return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x1975
movq -0x20(%rbp), %rdi
movl $0x8, %esi
callq 0x12e0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
addq $-0x30, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
callq 0x1510
cmpl $0x0, %eax
je 0x19c9
movl $0x2, %edi
movl $0x23b, %esi            # imm = 0x23B
leaq 0x26c8(%rip), %rdx      # 0x4068
leaq 0x28a5(%rip), %rcx      # 0x424c
leaq 0x285d(%rip), %r8       # 0x420b
leaq 0x27b0(%rip), %r9       # 0x4165
movb $0x0, %al
callq 0x13d0
movq $0x0, -0x8(%rbp)
jmp 0x1a93
movq -0x20(%rbp), %rax
movq -0x30(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jbe 0x1a23
movq -0x20(%rbp), %r9
movq -0x30(%rbp), %rax
movq 0x8(%rax), %r10
movl $0x2, %edi
movl $0x243, %esi            # imm = 0x243
leaq 0x2674(%rip), %rdx      # 0x4068
leaq 0x2851(%rip), %rcx      # 0x424c
leaq 0x2851(%rip), %r8       # 0x4253
leaq 0x275c(%rip), %rax      # 0x4165
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
movb $0x0, %al
callq 0x13d0
movq $0x0, -0x8(%rbp)
jmp 0x1a93
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x30(%rbp), %rcx
cmpq 0x18(%rcx), %rax
jne 0x1a4e
movq -0x28(%rbp), %rdi
callq 0x1790
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
addq $-0x30, %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
movq -0x30(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq -0x30(%rbp), %rdx
imulq 0x10(%rdx), %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x10a0
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x10(%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/mgrosvenor[P]evec/./evec.h
// Function: evcnt
size_t evcnt(void* vec)
{
    if(!vec){
        return 0;
    };

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

    return hdr->obj_count;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x1abd
movq $0x0, -0x8(%rbp)
jmp 0x1b1a
movq -0x10(%rbp), %rax
addq $-0x30, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x1510
cmpl $0x0, %eax
je 0x1b0e
movl $0x2, %edi
movl $0x25e, %esi            # imm = 0x25E
leaq 0x2580(%rip), %rdx      # 0x4068
leaq 0x279b(%rip), %rcx      # 0x428a
leaq 0x2715(%rip), %r8       # 0x420b
leaq 0x2668(%rip), %r9       # 0x4165
movb $0x0, %al
callq 0x13d0
movq $-0x1, -0x8(%rbp)
jmp 0x1b1a
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)