LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/ww9210[P]xnuca_final_ssp/main.c
// Function: remove_pipeline
int remove_pipeline(){
    struct executor_queue *eq = NULL;
    struct ppl_list_node * cur; 
    unsigned int idx;
    read(0, &idx, 4);
    cur = &head;
    for(cur=cur->fd; cur!=&head; cur=cur->fd){
        eq = (struct executor_queue *)((unsigned long)cur - (unsigned long)&((struct executor_queue*)0)->list);
#ifdef DEBUG
        printf("found executor at: %p\n", eq);
#endif
        if (eq->executor_idx == idx){
            break;
        }
        eq = NULL;
    }
    if(eq != NULL){
#ifdef DEBUG
        printf("goint to remove pipeline %d\n",idx);
#endif  
        eq->ops->executor_free(eq);
        ppl_node_unlink(&eq->list);
        total_ppl-=1;
    }
    else{
        return -1;
    }
    return 0; 
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq $0x0, -0x10(%rbp)
xorl %edi, %edi
leaq -0x1c(%rbp), %rsi
movl $0x4, %edx
callq 0x1120
leaq 0x7df1(%rip), %rax      # 0xa2c8
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
leaq 0x7ddb(%rip), %rax      # 0xa2c8
cmpq %rax, -0x18(%rbp)
je 0x2527
movq -0x18(%rbp), %rax
xorl %ecx, %ecx
addq $0x28, %rcx
subq %rcx, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl 0xc(%rax), %eax
cmpl -0x1c(%rbp), %eax
jne 0x2512
jmp 0x2527
movq $0x0, -0x10(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x24e6
cmpq $0x0, -0x10(%rbp)
je 0x255c
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rdi
callq *%rax
movq -0x10(%rbp), %rdi
addq $0x28, %rdi
callq 0x1330
movl 0x7cbf(%rip), %eax      # 0xa210
subl $0x1, %eax
movl %eax, 0x7cb6(%rip)      # 0xa210
jmp 0x2565
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x256c
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/ww9210[P]xnuca_final_ssp/main.c
// Function: upload_patches
int upload_patches(){
    struct patch_attr attr;
    unsigned int value_size, queue_type;
    struct executor_queue * eq;
    int found_queue = 0;
    unsigned char *value;
    struct ppl_list_node * cur;
    int ret=0;
    if(!total_ppl){
        return -1;
    }
    read(0, &attr, sizeof(struct patch_attr));
    queue_type = attr.queue_type; 

    // iterate over the linked list
    cur = &head;
    for(cur=cur->fd; cur!=&head; cur=cur->fd)
    {
        eq = (struct executor_queue *)((unsigned long)cur - (unsigned long)&((struct executor_queue*)0)->list);
#ifdef DEBUG
        printf("found executor at: %p\n", eq);
#endif
        if(eq->queue_type == queue_type){
            found_queue=1;
            break;
        }
    }

    if(!found_queue){
#ifdef DEBUG
        printf("executor not found for type %d\n", queue_type);
#endif
        return -1;
    }
    value_size = eq->value_size;
    value = malloc(value_size);
#ifdef DEBUG
    puts("p:");
#endif
    //read(0, value, value_size);
    safe_read(0, value, value_size);

    // invoke push_elem
    ret = eq->ops->push_elem(eq, value);

    free(value);
    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movl $0x0, -0x34(%rbp)
movl $0x0, -0x4c(%rbp)
cmpl $0x0, 0x7b03(%rip)      # 0xa210
jne 0x271b
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x27e5
xorl %edi, %edi
leaq -0x1c(%rbp), %rsi
movl $0x18, %edx
callq 0x1120
movl -0x1c(%rbp), %eax
movl %eax, -0x24(%rbp)
leaq 0x7b90(%rip), %rax      # 0xa2c8
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x48(%rbp)
leaq 0x7b7a(%rip), %rax      # 0xa2c8
cmpq %rax, -0x48(%rbp)
je 0x2789
movq -0x48(%rbp), %rax
xorl %ecx, %ecx
addq $0x28, %rcx
subq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movl 0x8(%rax), %eax
cmpl -0x24(%rbp), %eax
jne 0x277a
movl $0x1, -0x34(%rbp)
jmp 0x2789
jmp 0x277c
movq -0x48(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x48(%rbp)
jmp 0x2747
cmpl $0x0, -0x34(%rbp)
jne 0x2798
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x27e5
movq -0x30(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
movl %eax, %edi
callq 0x1170
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rsi
movl -0x20(%rbp), %edx
xorl %edi, %edi
callq 0x18f0
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
movq -0x30(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq *%rax
movl %eax, -0x4c(%rbp)
movq -0x40(%rbp), %rdi
callq 0x1030
movl -0x4c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/ww9210[P]xnuca_final_ssp/sha3.c
// Function: rhash_keccak_init
static void rhash_keccak_init(sha3_ctx *ctx, unsigned bits)
{
	/* NB: The Keccak capacity parameter = bits * 2 */
	unsigned rate = 1600 - bits * 2;

	memset(ctx, 0, sizeof(sha3_ctx));
	ctx->block_size = rate / 8;
	assert(rate <= 1600 && (rate % 64) == 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0xc(%rbp), %ecx
shll %ecx
movl $0x640, %eax            # imm = 0x640
subl %ecx, %eax
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
xorl %esi, %esi
movl $0x190, %edx            # imm = 0x190
callq 0x1100
movl -0x10(%rbp), %ecx
shrl $0x3, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x18c(%rax)
cmpl $0x640, -0x10(%rbp)     # imm = 0x640
ja 0x2ad4
movl -0x10(%rbp), %eax
andl $0x3f, %eax
cmpl $0x0, %eax
jne 0x2ad4
jmp 0x2af3
leaq 0x3f56(%rip), %rdi      # 0x6a31
leaq 0x3f15(%rip), %rsi      # 0x69f7
movl $0x2e, %edx
leaq 0x3f64(%rip), %rcx      # 0x6a52
callq 0x10f0
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/ww9210[P]xnuca_final_ssp/sha3.c
// Function: rhash_sha3_final
void rhash_sha3_final(sha3_ctx *ctx, unsigned char* result)
{
	size_t digest_length = 100 - ctx->block_size / 2;
	const size_t block_size = ctx->block_size;

	if (!(ctx->rest & SHA3_FINALIZED))
	{
		/* clear the rest of the data queue */
		memset((char*)ctx->message + ctx->rest, 0, block_size - ctx->rest);
		((char*)ctx->message)[ctx->rest] |= 0x06;
		((char*)ctx->message)[block_size - 1] |= 0x80;

		/* process final block */
		rhash_sha3_process_block(ctx->hash, ctx->message, block_size);
		ctx->rest = SHA3_FINALIZED; /* mark context as finalized */
	}

	assert(block_size > digest_length);
	if (result) me64_to_le_str(result, ctx->hash, digest_length);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl 0x18c(%rax), %ecx
shrl %ecx
movl $0x64, %eax
subl %ecx, %eax
movl %eax, %eax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl 0x18c(%rax), %eax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movl 0x188(%rax), %eax
andl $0x80000000, %eax       # imm = 0x80000000
cmpl $0x0, %eax
jne 0x2fb6
movq -0x8(%rbp), %rdi
addq $0xc8, %rdi
movq -0x8(%rbp), %rax
movl 0x188(%rax), %eax
addq %rax, %rdi
movq -0x20(%rbp), %rdx
movq -0x8(%rbp), %rax
movl 0x188(%rax), %eax
subq %rax, %rdx
xorl %esi, %esi
callq 0x1100
movq -0x8(%rbp), %rax
movq -0x8(%rbp), %rcx
movl 0x188(%rcx), %ecx
movsbl 0xc8(%rax,%rcx), %edx
orl $0x6, %edx
movb %dl, 0xc8(%rax,%rcx)
movq -0x8(%rbp), %rax
movq -0x20(%rbp), %rcx
subq $0x1, %rcx
movsbl 0xc8(%rax,%rcx), %edx
orl $0x80, %edx
movb %dl, 0xc8(%rax,%rcx)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0xc8, %rsi
movq -0x20(%rbp), %rdx
callq 0x2d10
movq -0x8(%rbp), %rax
movl $0x80000000, 0x188(%rax) # imm = 0x80000000
movq -0x20(%rbp), %rax
cmpq -0x18(%rbp), %rax
jbe 0x2fc2
jmp 0x2fe1
leaq 0x3a13(%rip), %rdi      # 0x69dc
leaq 0x3a27(%rip), %rsi      # 0x69f7
movl $0x145, %edx            # imm = 0x145
leaq 0x3a22(%rip), %rcx      # 0x69fe
callq 0x10f0
cmpq $0x0, -0x10(%rbp)
je 0x2ff9
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x1160
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/ww9210[P]xnuca_final_ssp/sha3.c
// Function: keccak_theta
static void keccak_theta(uint64_t *A)
{
	unsigned int x;
	uint64_t C[5], D[5];

	for (x = 0; x < 5; x++) {
		C[x] = A[x] ^ A[x + 5] ^ A[x + 10] ^ A[x + 15] ^ A[x + 20];
	}
	D[0] = ROTL64(C[1], 1) ^ C[4];
	D[1] = ROTL64(C[2], 1) ^ C[0];
	D[2] = ROTL64(C[3], 1) ^ C[1];
	D[3] = ROTL64(C[4], 1) ^ C[2];
	D[4] = ROTL64(C[0], 1) ^ C[3];

	for (x = 0; x < 5; x++) {
		A[x]      ^= D[x];
		A[x + 5]  ^= D[x];
		A[x + 10] ^= D[x];
		A[x + 15] ^= D[x];
		A[x + 20] ^= D[x];
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
cmpl $0x5, -0xc(%rbp)
jae 0x3473
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
movq (%rax,%rcx,8), %rcx
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %edx
addl $0x5, %edx
movl %edx, %edx
xorq (%rax,%rdx,8), %rcx
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %edx
addl $0xa, %edx
movl %edx, %edx
xorq (%rax,%rdx,8), %rcx
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %edx
addl $0xf, %edx
movl %edx, %edx
xorq (%rax,%rdx,8), %rcx
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %edx
addl $0x14, %edx
movl %edx, %edx
xorq (%rax,%rdx,8), %rcx
movl -0xc(%rbp), %eax
movq %rcx, -0x40(%rbp,%rax,8)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x340f
movq -0x38(%rbp), %rax
shlq %rax
movq -0x38(%rbp), %rcx
shrq $0x3f, %rcx
xorq %rcx, %rax
xorq -0x20(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x30(%rbp), %rax
shlq %rax
movq -0x30(%rbp), %rcx
shrq $0x3f, %rcx
xorq %rcx, %rax
xorq -0x40(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x28(%rbp), %rax
shlq %rax
movq -0x28(%rbp), %rcx
shrq $0x3f, %rcx
xorq %rcx, %rax
xorq -0x38(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x20(%rbp), %rax
shlq %rax
movq -0x20(%rbp), %rcx
shrq $0x3f, %rcx
xorq %rcx, %rax
xorq -0x30(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x40(%rbp), %rax
shlq %rax
movq -0x40(%rbp), %rcx
shrq $0x3f, %rcx
xorq %rcx, %rax
xorq -0x28(%rbp), %rax
movq %rax, -0x50(%rbp)
movl $0x0, -0xc(%rbp)
cmpl $0x5, -0xc(%rbp)
jae 0x359b
movl -0xc(%rbp), %eax
movq -0x70(%rbp,%rax,8), %rdx
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
xorq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movl -0xc(%rbp), %eax
movq -0x70(%rbp,%rax,8), %rdx
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
addl $0x5, %ecx
movl %ecx, %ecx
xorq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movl -0xc(%rbp), %eax
movq -0x70(%rbp,%rax,8), %rdx
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
addl $0xa, %ecx
movl %ecx, %ecx
xorq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movl -0xc(%rbp), %eax
movq -0x70(%rbp,%rax,8), %rdx
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
addl $0xf, %ecx
movl %ecx, %ecx
xorq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movl -0xc(%rbp), %eax
movq -0x70(%rbp,%rax,8), %rdx
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
addl $0x14, %ecx
movl %ecx, %ecx
xorq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x34fc
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/ww9210[P]xnuca_final_ssp/sha3.c
// Function: keccak_pi
static void keccak_pi(uint64_t *A)
{
	uint64_t A1;
	A1 = A[1];
	A[ 1] = A[ 6];
	A[ 6] = A[ 9];
	A[ 9] = A[22];
	A[22] = A[14];
	A[14] = A[20];
	A[20] = A[ 2];
	A[ 2] = A[12];
	A[12] = A[13];
	A[13] = A[19];
	A[19] = A[23];
	A[23] = A[15];
	A[15] = A[ 4];
	A[ 4] = A[24];
	A[24] = A[21];
	A[21] = A[ 8];
	A[ 8] = A[16];
	A[16] = A[ 5];
	A[ 5] = A[ 3];
	A[ 3] = A[18];
	A[18] = A[17];
	A[17] = A[11];
	A[11] = A[ 7];
	A[ 7] = A[10];
	A[10] = A1;
	/* note: A[ 0] is left as is */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x8(%rbp), %rax
movq 0xb0(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x48(%rax)
movq -0x8(%rbp), %rax
movq 0x70(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0xb0(%rax)
movq -0x8(%rbp), %rax
movq 0xa0(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x70(%rax)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0xa0(%rax)
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rax
movq 0x68(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x60(%rax)
movq -0x8(%rbp), %rax
movq 0x98(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x68(%rax)
movq -0x8(%rbp), %rax
movq 0xb8(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x98(%rax)
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0xb8(%rax)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x78(%rax)
movq -0x8(%rbp), %rax
movq 0xc0(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x8(%rbp), %rax
movq 0xa8(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0xc0(%rax)
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0xa8(%rax)
movq -0x8(%rbp), %rax
movq 0x80(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x80(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x8(%rbp), %rax
movq 0x90(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x8(%rbp), %rax
movq 0x88(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x90(%rax)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x88(%rax)
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x58(%rax)
movq -0x8(%rbp), %rax
movq 0x50(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x50(%rax)
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ww9210[P]xnuca_final_ssp/sha3.c
// Function: keccak_chi
static void keccak_chi(uint64_t *A)
{
	int i;
	for (i = 0; i < 25; i += 5) {
		uint64_t A0 = A[0 + i], A1 = A[1 + i];
		A[0 + i] ^= ~A1 & A[2 + i];
		A[1 + i] ^= ~A[2 + i] & A[3 + i];
		A[2 + i] ^= ~A[3 + i] & A[4 + i];
		A[3 + i] ^= ~A[4 + i] & A0;
		A[4 + i] ^= ~A0 & A1;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
cmpl $0x19, -0xc(%rbp)
jge 0x38b4
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
addl $0x0, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdx
xorq $-0x1, %rdx
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
andq (%rax,%rcx,8), %rdx
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
addl $0x0, %ecx
movslq %ecx, %rcx
xorq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdx
xorq $-0x1, %rdx
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
addl $0x3, %ecx
movslq %ecx, %rcx
andq (%rax,%rcx,8), %rdx
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
xorq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
addl $0x3, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdx
xorq $-0x1, %rdx
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
addl $0x4, %ecx
movslq %ecx, %rcx
andq (%rax,%rcx,8), %rdx
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
xorq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
addl $0x4, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdx
xorq $-0x1, %rdx
andq -0x18(%rbp), %rdx
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
addl $0x3, %ecx
movslq %ecx, %rcx
xorq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movq -0x18(%rbp), %rdx
xorq $-0x1, %rdx
andq -0x20(%rbp), %rdx
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
addl $0x4, %ecx
movslq %ecx, %rcx
xorq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movl -0xc(%rbp), %eax
addl $0x5, %eax
movl %eax, -0xc(%rbp)
jmp 0x377f
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ww9210[P]xnuca_final_ssp/elf.c
// Function: ELF64_FileIsValid
bool ELF64_FileIsValid( ELF64_FileRef file )
{
    if( file == NULL )
    {
        return false;
    }
    
    if
    (
           file->header.e_ident[ 0 ] == 0x7F
        && file->header.e_ident[ 1 ] == 0x45    /* E */
        && file->header.e_ident[ 2 ] == 0x4C    /* L */
        && file->header.e_ident[ 3 ] == 0x46    /* F */
    )
    {
        return true;
    }
    
    return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x38e5
movb $0x0, -0x1(%rbp)
jmp 0x3922
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x7f, %eax
jne 0x391e
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x45, %eax
jne 0x391e
movq -0x10(%rbp), %rax
movzbl 0x2(%rax), %eax
cmpl $0x4c, %eax
jne 0x391e
movq -0x10(%rbp), %rax
movzbl 0x3(%rax), %eax
cmpl $0x46, %eax
jne 0x391e
movb $0x1, -0x1(%rbp)
jmp 0x3922
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/ww9210[P]xnuca_final_ssp/elf.c
// Function: ELF64_FileGetProgramHeaderEntry
ELF64_ProgramHeaderEntryRef ELF64_FileGetProgramHeaderEntry( ELF64_FileRef file, unsigned int index )
{
    ELF64_HeaderRef header;
    ELF64_Off       offset;
    ELF64_Half      entrySize;
    
    if( file == NULL )
    {
        return NULL;
    }
    
    header = ELF64_FileGetHeader( file );
    
    if( header == NULL || index >= ELF64_HeaderGetProgramHeaderEntryCount( header ) )
    {
        return NULL;
    }
    
    offset      = ELF64_HeaderGetProgramHeaderOffset( header );
    entrySize   = ELF64_HeaderGetProgramHeaderEntrySize( header );
    
    return ( ELF64_ProgramHeaderEntryRef )( ( void * )( ( char * )file + offset + ( entrySize * index ) ) );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x3980
movq $0x0, -0x8(%rbp)
jmp 0x39ed
movq -0x10(%rbp), %rdi
callq 0x3930
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x39b0
movl -0x14(%rbp), %eax
movl %eax, -0x30(%rbp)
movq -0x20(%rbp), %rdi
callq 0x3a00
movw %ax, %cx
movl -0x30(%rbp), %eax
movzwl %cx, %ecx
cmpl %ecx, %eax
jb 0x39ba
movq $0x0, -0x8(%rbp)
jmp 0x39ed
movq -0x20(%rbp), %rdi
callq 0x3a30
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
callq 0x3a60
movw %ax, -0x2a(%rbp)
movq -0x10(%rbp), %rax
addq -0x28(%rbp), %rax
movzwl -0x2a(%rbp), %ecx
imull -0x14(%rbp), %ecx
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ww9210[P]xnuca_final_ssp/elf.c
// Function: ELF64_FileGetSectionHeaderEntry
ELF64_SectionHeaderEntryRef ELF64_FileGetSectionHeaderEntry( ELF64_FileRef file, unsigned int index )
{
    ELF64_HeaderRef header;
    ELF64_Off       offset;
    ELF64_Half      entrySize;
    
    if( file == NULL )
    {
        return NULL;
    }
    
    header = ELF64_FileGetHeader( file );
    
    if( header == NULL || index >= ELF64_HeaderGetSectionHeaderEntryCount( header ) )
    {
        return NULL;
    }
    
    offset      = ELF64_HeaderGetSectionHeaderOffset( header );
    entrySize   = ELF64_HeaderGetSectionHeaderEntrySize( header );
    
    return ( ELF64_SectionHeaderEntryRef )( ( void * )( ( char * )file + offset + ( entrySize * index ) ) );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x3ab0
movq $0x0, -0x8(%rbp)
jmp 0x3b1d
movq -0x10(%rbp), %rdi
callq 0x3930
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x3ae0
movl -0x14(%rbp), %eax
movl %eax, -0x30(%rbp)
movq -0x20(%rbp), %rdi
callq 0x3b30
movw %ax, %cx
movl -0x30(%rbp), %eax
movzwl %cx, %ecx
cmpl %ecx, %eax
jb 0x3aea
movq $0x0, -0x8(%rbp)
jmp 0x3b1d
movq -0x20(%rbp), %rdi
callq 0x3b60
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
callq 0x3b90
movw %ax, -0x2a(%rbp)
movq -0x10(%rbp), %rax
addq -0x28(%rbp), %rax
movzwl -0x2a(%rbp), %ecx
imull -0x14(%rbp), %ecx
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ww9210[P]xnuca_final_ssp/elf.c
// Function: ELF64_FileGetNameOfSection
const char * ELF64_FileGetNameOfSection( ELF64_FileRef file, ELF64_SectionHeaderEntryRef section )
{
    ELF64_HeaderRef             header;
    ELF64_SectionHeaderEntryRef stringTable;
    ELF64_Word                  nameOffset;
    
    if( file == NULL || section == NULL )
    {
        return NULL;
    }
    
    header = ELF64_FileGetHeader( file );
    
    if( header == NULL )
    {
        return NULL;
    }
    
    stringTable = ELF64_FileGetStringTableHeaderEntry( file );
    nameOffset  = ELF64_SectionHeaderEntryGetNameOffset( section );
    
    return ( const char * )( ELF64_FileGetDataForSection( file, stringTable ) + nameOffset );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x3bde
cmpq $0x0, -0x18(%rbp)
jne 0x3be8
movq $0x0, -0x8(%rbp)
jmp 0x3c36
movq -0x10(%rbp), %rdi
callq 0x3930
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x3c06
movq $0x0, -0x8(%rbp)
jmp 0x3c36
movq -0x10(%rbp), %rdi
callq 0x3c40
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
callq 0x3cb0
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x3ce0
movl -0x2c(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/ww9210[P]xnuca_final_ssp/elf.c
// Function: ELF64_FileGetStringTableHeaderEntry
ELF64_SectionHeaderEntryRef ELF64_FileGetStringTableHeaderEntry( ELF64_FileRef file )
{
    ELF64_HeaderRef header;
    ELF64_Half      stringTableIndex;
    
    if( file == NULL )
    {
        return NULL;
    }
    
    header = ELF64_FileGetHeader( file );
    
    if( header == NULL )
    {
        return NULL;
    }
    
    stringTableIndex = ELF64_HeaderGetSectionNameStringTableIndex( header );
    
    return ELF64_FileGetSectionHeaderEntry( file, stringTableIndex );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x3c5d
movq $0x0, -0x8(%rbp)
jmp 0x3c99
movq -0x10(%rbp), %rdi
callq 0x3930
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x3c7b
movq $0x0, -0x8(%rbp)
jmp 0x3c99
movq -0x18(%rbp), %rdi
callq 0x40e0
movw %ax, -0x1a(%rbp)
movq -0x10(%rbp), %rdi
movzwl -0x1a(%rbp), %esi
callq 0x3a90
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ww9210[P]xnuca_final_ssp/elf.c
// Function: ELF64_FileGetDataForSection
ELF64_UChar * ELF64_FileGetDataForSection( ELF64_FileRef file, ELF64_SectionHeaderEntryRef section )
{
    ELF64_Off fileOffset;
    
    if( section == NULL )
    {
        return NULL;
    }
    
    fileOffset = ELF64_SectionHeaderEntryGetFileOffset( section );
    
    return ( ELF64_UChar * )file + fileOffset;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x3d01
movq $0x0, -0x8(%rbp)
jmp 0x3d1a
movq -0x18(%rbp), %rdi
callq 0x3d70
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ww9210[P]xnuca_final_ssp/elf.c
// Function: ELF64_FileGetSymbolTableEntryForSection
ELF64_SymbolTableEntryRef ELF64_FileGetSymbolTableEntryForSection( ELF64_FileRef file, ELF64_SectionHeaderEntryRef section, unsigned int index )
{
    ELF64_XWord entrySize;
    
    if( ELF64_SectionHeaderEntryGetType( section ) != ELF64_SectionTypeLinkerSymbolTable )
    {
        return NULL;
    }
    
    if( index >= ELF64_SectionHeaderEntryGetSymbolTableEntryCount( section ) )
    {
        return NULL;
    }
    
    entrySize = ELF64_SectionHeaderEntryGetEntrySize( section );
    
    return ( ELF64_SymbolTableEntryRef )( ( void * )( ELF64_FileGetDataForSection( file, section ) + ( index * entrySize ) ) );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x18(%rbp), %rdi
callq 0x3e60
cmpl $0x2, %eax
je 0x3e0b
movq $0x0, -0x8(%rbp)
jmp 0x3e56
movl -0x1c(%rbp), %eax
movl %eax, -0x2c(%rbp)
movq -0x18(%rbp), %rdi
callq 0x3f20
movl %eax, %ecx
movl -0x2c(%rbp), %eax
cmpl %ecx, %eax
jb 0x3e2d
movq $0x0, -0x8(%rbp)
jmp 0x3e56
movq -0x18(%rbp), %rdi
callq 0x3f90
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x3ce0
movl -0x1c(%rbp), %ecx
imulq -0x28(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/ww9210[P]xnuca_final_ssp/elf.c
// Function: ELF64_SectionHeaderEntryGetType
ELF64_SectionType ELF64_SectionHeaderEntryGetType( ELF64_SectionHeaderEntryRef entry )
{
    if( entry == NULL )
    {
        return ELF64_SectionTypeUnused;
    }
    
    switch( entry->sh_type )
    {
        case 0:     return ELF64_SectionTypeUnused;
        case 1:     return ELF64_SectionTypeProgBits;
        case 2:     return ELF64_SectionTypeLinkerSymbolTable;
        case 3:     return ELF64_SectionTypeStringTable;
        case 4:     return ELF64_SectionTypeRelaRelocationEntries;
        case 5:     return ELF64_SectionTypeSymbolHashTable;
        case 6:     return ELF64_SectionTypeDynamicLinkingTables;
        case 7:     return ELF64_SectionTypeNoteInformation;
        case 8:     return ELF64_SectionTypeUninitializedSpace;
        case 9:     return ELF64_SectionTypeRelRelocationEntries;
        case 11:    return ELF64_SectionTypeDynamicLoaderSymbolTable;
        default:    break;
    }
    
    return ELF64_SectionTypeUnused;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x3e7b
movl $0x0, -0x4(%rbp)
jmp 0x3f0c
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
movq %rax, -0x18(%rbp)
subq $0xb, %rax
ja 0x3f03
movq -0x18(%rbp), %rax
leaq 0x2bed(%rip), %rcx      # 0x6a84
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x0, -0x4(%rbp)
jmp 0x3f0c
movl $0x1, -0x4(%rbp)
jmp 0x3f0c
movl $0x2, -0x4(%rbp)
jmp 0x3f0c
movl $0x3, -0x4(%rbp)
jmp 0x3f0c
movl $0x4, -0x4(%rbp)
jmp 0x3f0c
movl $0x5, -0x4(%rbp)
jmp 0x3f0c
movl $0x6, -0x4(%rbp)
jmp 0x3f0c
movl $0x7, -0x4(%rbp)
jmp 0x3f0c
movl $0x8, -0x4(%rbp)
jmp 0x3f0c
movl $0x9, -0x4(%rbp)
jmp 0x3f0c
movl $0xb, -0x4(%rbp)
jmp 0x3f0c
jmp 0x3f05
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ww9210[P]xnuca_final_ssp/elf.c
// Function: ELF64_SectionHeaderEntryGetSymbolTableEntryCount
unsigned int ELF64_SectionHeaderEntryGetSymbolTableEntryCount( ELF64_SectionHeaderEntryRef section )
{
    ELF64_XWord entrySize;
    ELF64_XWord sectionSize;
    
    if( ELF64_SectionHeaderEntryGetType( section ) != ELF64_SectionTypeLinkerSymbolTable )
    {
        return 0;
    }
    
    entrySize   = ELF64_SectionHeaderEntryGetEntrySize( section );
    sectionSize = ELF64_SectionHeaderEntryGetSectionSize( section );
    
    if( entrySize == 0 )
    {
        return 0;
    }
    
    return ( unsigned int )( sectionSize / entrySize );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3e60
cmpl $0x2, %eax
je 0x3f43
movl $0x0, -0x4(%rbp)
jmp 0x3f7c
movq -0x10(%rbp), %rdi
callq 0x3f90
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x55c0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x3f6d
movl $0x0, -0x4(%rbp)
jmp 0x3f7c
movq -0x20(%rbp), %rax
xorl %ecx, %ecx
movl %ecx, %edx
divq -0x18(%rbp)
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ww9210[P]xnuca_final_ssp/elf.c
// Function: ELF64_FileGetSymbolTableEntryNameForSection
const char * ELF64_FileGetSymbolTableEntryNameForSection( ELF64_FileRef file, ELF64_SymbolTableEntryRef sym, ELF64_SectionHeaderEntryRef section )
{
    ELF64_Word                  stringTableIndex;
    ELF64_SectionHeaderEntryRef stringTable;
    ELF64_Word                  nameOffset;
    const char                * name;
    
    if( file == NULL || sym == NULL || section == NULL )
    {
        return NULL;
    }
    
    stringTableIndex = ELF64_SectionHeaderEntryGetLinkedSectionIndex( section );
    stringTable      = ELF64_FileGetSectionHeaderEntry( file, stringTableIndex );
    
    if( stringTable == NULL )
    {
        return NULL;
    }
    
    nameOffset = ELF64_SymbolTableEntryGetNameOffset( sym );
    name       = ( const char * )( ELF64_FileGetDataForSection( file, stringTable ) + nameOffset );
    
    if( strlen( name ) == 0 )
    {
        return "<unnamed-symbol>";
    }
    
    return name;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x3fe9
cmpq $0x0, -0x18(%rbp)
je 0x3fe9
cmpq $0x0, -0x20(%rbp)
jne 0x3ff3
movq $0x0, -0x8(%rbp)
jmp 0x4067
movq -0x20(%rbp), %rdi
callq 0x4080
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rdi
movl -0x24(%rbp), %esi
callq 0x3a90
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x4020
movq $0x0, -0x8(%rbp)
jmp 0x4067
movq -0x18(%rbp), %rdi
callq 0x40b0
movl %eax, -0x34(%rbp)
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x3ce0
movl -0x34(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
callq 0x10c0
cmpq $0x0, %rax
jne 0x405f
leaq 0x2dab(%rip), %rax      # 0x6e04
movq %rax, -0x8(%rbp)
jmp 0x4067
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ww9210[P]xnuca_final_ssp/elf.c
// Function: ELF64_FileGetSectionHeaderEntryWithName
ELF64_SectionHeaderEntryRef ELF64_FileGetSectionHeaderEntryWithName( ELF64_FileRef file, const char * name )
{
    ELF64_Half                  i;
    ELF64_HeaderRef             header;
    ELF64_SectionHeaderEntryRef section;
    const char                * sName;
    
    if( file == NULL )
    {
        return NULL;
    }
    
    header = ELF64_FileGetHeader( file );
    
    if( header == NULL )
    {
        return NULL;
    }
    
    for( i = 0; i < ELF64_HeaderGetSectionHeaderEntryCount( header ); i++ )
    {
        section = ELF64_FileGetSectionHeaderEntry( file, i );
        sName   = ELF64_FileGetNameOfSection( file, section );
        
        if( strcmp( name, sName ) == 0 )
        {
            return section;
        }
    }
    
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x4134
movq $0x0, -0x8(%rbp)
jmp 0x41cb
movq -0x10(%rbp), %rdi
callq 0x3930
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x4152
movq $0x0, -0x8(%rbp)
jmp 0x41cb
movw $0x0, -0x1a(%rbp)
movzwl -0x1a(%rbp), %eax
movl %eax, -0x3c(%rbp)
movq -0x28(%rbp), %rdi
callq 0x3b30
movw %ax, %cx
movl -0x3c(%rbp), %eax
movzwl %cx, %ecx
cmpl %ecx, %eax
jge 0x41c3
movq -0x10(%rbp), %rdi
movzwl -0x1a(%rbp), %esi
callq 0x3a90
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x3bc0
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x1140
cmpl $0x0, %eax
jne 0x41b3
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x41cb
jmp 0x41b5
movw -0x1a(%rbp), %ax
addw $0x1, %ax
movw %ax, -0x1a(%rbp)
jmp 0x4158
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ww9210[P]xnuca_final_ssp/elf.c
// Function: ELF64_FileGetSymbolTableEntryWithName
ELF64_SymbolTableEntryRef ELF64_FileGetSymbolTableEntryWithName( ELF64_FileRef file, const char * name )
{
    ELF64_HeaderRef             header;
    ELF64_SectionHeaderEntryRef sHeader;
    ELF64_Half                  i;
    unsigned int                symCount;
    unsigned int                j;
    ELF64_SymbolTableEntryRef   sym;
    const char                * symName;
    
    if( file == NULL )
    {
        return NULL;
    }
    
    header = ELF64_FileGetHeader( file );
    
    if( header == NULL )
    {
        return NULL;
    }
    
    for( i = 0; i < ELF64_HeaderGetSectionHeaderEntryCount( header ); i++ )
    {
        sHeader = ELF64_FileGetSectionHeaderEntry( file, i );
        
        if( ELF64_SectionHeaderEntryGetType( sHeader ) != ELF64_SectionTypeLinkerSymbolTable )
        {
            continue;
        }
        
        symCount = ELF64_SectionHeaderEntryGetSymbolTableEntryCount( sHeader );
            
        for( j = 0; j < symCount; j++ )
        {
            sym     = ELF64_FileGetSymbolTableEntryForSection( file, sHeader, j );
            symName = ELF64_FileGetSymbolTableEntryNameForSection( file, sym, sHeader );
            
            if( strcmp( name, symName ) == 0 )
            {
                return sym;
            }
        }
    }
    
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x4204
movq $0x0, -0x8(%rbp)
jmp 0x42f5
movq -0x10(%rbp), %rdi
callq 0x3930
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x4225
movq $0x0, -0x8(%rbp)
jmp 0x42f5
movw $0x0, -0x2a(%rbp)
movzwl -0x2a(%rbp), %eax
movl %eax, -0x4c(%rbp)
movq -0x20(%rbp), %rdi
callq 0x3b30
movw %ax, %cx
movl -0x4c(%rbp), %eax
movzwl %cx, %ecx
cmpl %ecx, %eax
jge 0x42ed
movq -0x10(%rbp), %rdi
movzwl -0x2a(%rbp), %esi
callq 0x3a90
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x3e60
cmpl $0x2, %eax
je 0x426d
jmp 0x42dc
movq -0x28(%rbp), %rdi
callq 0x3f20
movl %eax, -0x30(%rbp)
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x30(%rbp), %eax
jae 0x42da
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
movl -0x34(%rbp), %edx
callq 0x3de0
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x3fc0
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0x1140
cmpl $0x0, %eax
jne 0x42cd
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x42f5
jmp 0x42cf
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x4280
jmp 0x42dc
movw -0x2a(%rbp), %ax
addw $0x1, %ax
movw %ax, -0x2a(%rbp)
jmp 0x422b
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/ww9210[P]xnuca_final_ssp/elf.c
// Function: ELF64_FileGetSymbolTableEntryWithAddress
ELF64_SymbolTableEntryRef ELF64_FileGetSymbolTableEntryWithAddress( ELF64_FileRef file, ELF64_Addr address )
{
    ELF64_HeaderRef             header;
    ELF64_SectionHeaderEntryRef sHeader;
    ELF64_Half                  i;
    unsigned int                symCount;
    unsigned int                j;
    ELF64_SymbolTableEntryRef   sym;
    ELF64_Addr                  symAddress;
    
    if( file == NULL )
    {
        return NULL;
    }
    
    header = ELF64_FileGetHeader( file );
    
    if( header == NULL )
    {
        return NULL;
    }
    
    for( i = 0; i < ELF64_HeaderGetSectionHeaderEntryCount( header ); i++ )
    {
        sHeader = ELF64_FileGetSectionHeaderEntry( file, i );
        
        if( ELF64_SectionHeaderEntryGetType( sHeader ) != ELF64_SectionTypeLinkerSymbolTable )
        {
            continue;
        }
        
        symCount = ELF64_SectionHeaderEntryGetSymbolTableEntryCount( sHeader );
            
        for( j = 0; j < symCount; j++ )
        {
            sym         = ELF64_FileGetSymbolTableEntryForSection( file, sHeader, j );
            symAddress  = ELF64_SymbolTableEntryGetSymbolValue( sym );
            
            if( address == symAddress )
            {
                return sym;
            }
        }
    }
    
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x4324
movq $0x0, -0x8(%rbp)
jmp 0x4405
movq -0x10(%rbp), %rdi
callq 0x3930
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x4345
movq $0x0, -0x8(%rbp)
jmp 0x4405
movw $0x0, -0x2a(%rbp)
movzwl -0x2a(%rbp), %eax
movl %eax, -0x4c(%rbp)
movq -0x20(%rbp), %rdi
callq 0x3b30
movw %ax, %cx
movl -0x4c(%rbp), %eax
movzwl %cx, %ecx
cmpl %ecx, %eax
jge 0x43fd
movq -0x10(%rbp), %rdi
movzwl -0x2a(%rbp), %esi
callq 0x3a90
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x3e60
cmpl $0x2, %eax
je 0x438d
jmp 0x43ec
movq -0x28(%rbp), %rdi
callq 0x3f20
movl %eax, -0x30(%rbp)
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x30(%rbp), %eax
jae 0x43ea
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
movl -0x34(%rbp), %edx
callq 0x3de0
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
callq 0x4410
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x48(%rbp), %rax
jne 0x43dd
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x4405
jmp 0x43df
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x43a0
jmp 0x43ec
movw -0x2a(%rbp), %ax
addw $0x1, %ax
movw %ax, -0x2a(%rbp)
jmp 0x434b
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/ww9210[P]xnuca_final_ssp/elf.c
// Function: ELF64_HeaderGetObjectFileClass
ELF64_ObjectFileClass ELF64_HeaderGetObjectFileClass( ELF64_HeaderRef header )
{
    if( header == NULL )
    {
        return ELF64_ObjectFileClassUnknown;
    }
    
    switch( header->e_ident[ 4 ] )
    {
        case 1:     return ELF64_ObjectFileClass32;
        case 2:     return ELF64_ObjectFileClass64;
        default:    break;
    }
    
    return ELF64_ObjectFileClassUnknown;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x4458
movl $0x0, -0x4(%rbp)
jmp 0x448f
movq -0x10(%rbp), %rax
movzbl 0x4(%rax), %eax
movl %eax, -0x14(%rbp)
subl $0x1, %eax
je 0x4474
jmp 0x446a
movl -0x14(%rbp), %eax
subl $0x2, %eax
je 0x447d
jmp 0x4486
movl $0x1, -0x4(%rbp)
jmp 0x448f
movl $0x2, -0x4(%rbp)
jmp 0x448f
jmp 0x4488
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ww9210[P]xnuca_final_ssp/elf.c
// Function: ELF64_HeaderGetObjectFileClassString
const char * ELF64_HeaderGetObjectFileClassString( ELF64_HeaderRef header )
{
    switch( ELF64_HeaderGetObjectFileClass( header ) )
    {
        case ELF64_ObjectFileClassUnknown:  return "Unknown";
        case ELF64_ObjectFileClass32:       return "32 bits";
        case ELF64_ObjectFileClass64:       return "64 bits";
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x4440
movl %eax, %ecx
movl %ecx, -0x14(%rbp)
testl %eax, %eax
je 0x44d4
jmp 0x44c0
movl -0x14(%rbp), %eax
subl $0x1, %eax
je 0x44e1
jmp 0x44ca
movl -0x14(%rbp), %eax
subl $0x2, %eax
je 0x44ee
jmp 0x44f9
leaq 0x293a(%rip), %rax      # 0x6e15
movq %rax, -0x8(%rbp)
jmp 0x44f9
leaq 0x2935(%rip), %rax      # 0x6e1d
movq %rax, -0x8(%rbp)
jmp 0x44f9
leaq 0x2930(%rip), %rax      # 0x6e25
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ww9210[P]xnuca_final_ssp/elf.c
// Function: ELF64_HeaderGetDataEncoding
ELF64_DataEncoding ELF64_HeaderGetDataEncoding( ELF64_HeaderRef header )
{
    if( header == NULL )
    {
        return ELF64_DataEncodingUnknown;
    }
    
    switch( header->e_ident[ 5 ] )
    {
        case 1:     return ELF64_DataEncodingLSB;
        case 2:     return ELF64_DataEncodingMSB;
        default:    break;
    }
    
    return ELF64_DataEncodingUnknown;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x4528
movl $0x0, -0x4(%rbp)
jmp 0x455f
movq -0x10(%rbp), %rax
movzbl 0x5(%rax), %eax
movl %eax, -0x14(%rbp)
subl $0x1, %eax
je 0x4544
jmp 0x453a
movl -0x14(%rbp), %eax
subl $0x2, %eax
je 0x454d
jmp 0x4556
movl $0x1, -0x4(%rbp)
jmp 0x455f
movl $0x2, -0x4(%rbp)
jmp 0x455f
jmp 0x4558
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ww9210[P]xnuca_final_ssp/elf.c
// Function: ELF64_HeaderGetDataEncodingString
const char * ELF64_HeaderGetDataEncodingString( ELF64_HeaderRef header )
{
    switch( ELF64_HeaderGetDataEncoding( header ) )
    {
        case ELF64_DataEncodingUnknown: return "LSB";
        case ELF64_DataEncodingLSB:     return "LSB";
        case ELF64_DataEncodingMSB:     return "MSB";
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x4510
movl %eax, %ecx
movl %ecx, -0x14(%rbp)
testl %eax, %eax
je 0x45a4
jmp 0x4590
movl -0x14(%rbp), %eax
subl $0x1, %eax
je 0x45b1
jmp 0x459a
movl -0x14(%rbp), %eax
subl $0x2, %eax
je 0x45be
jmp 0x45c9
leaq 0x2882(%rip), %rax      # 0x6e2d
movq %rax, -0x8(%rbp)
jmp 0x45c9
leaq 0x2875(%rip), %rax      # 0x6e2d
movq %rax, -0x8(%rbp)
jmp 0x45c9
leaq 0x286c(%rip), %rax      # 0x6e31
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ww9210[P]xnuca_final_ssp/elf.c
// Function: ELF64_HeaderGetOSABI
ELF64_OSABI ELF64_HeaderGetOSABI( ELF64_HeaderRef header )
{
    if( header == NULL )
    {
        return ELF64_OSABIUnknown;
    }
    
    switch( header->e_ident[ 8 ] )
    {
        case 0:     return ELF64_OSABISysV;
        case 1:     return ELF64_OSABIHPUX;
        case 255:   return ELF64_OSABIStandalone;
        default:    break;
    }
    
    return ELF64_OSABIUnknown;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x4628
movl $0x0, -0x4(%rbp)
jmp 0x4673
movq -0x10(%rbp), %rax
movzbl 0x8(%rax), %eax
movl %eax, -0x14(%rbp)
testl %eax, %eax
je 0x464f
jmp 0x4639
movl -0x14(%rbp), %eax
subl $0x1, %eax
je 0x4658
jmp 0x4643
movl -0x14(%rbp), %eax
subl $0xff, %eax
je 0x4661
jmp 0x466a
movl $0x1, -0x4(%rbp)
jmp 0x4673
movl $0x2, -0x4(%rbp)
jmp 0x4673
movl $0xff, -0x4(%rbp)
jmp 0x4673
jmp 0x466c
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ww9210[P]xnuca_final_ssp/elf.c
// Function: ELF64_HeaderGetOSABIString
const char * ELF64_HeaderGetOSABIString( ELF64_HeaderRef header )
{
    switch( ELF64_HeaderGetOSABI( header ) )
    {
        case ELF64_OSABIUnknown:    return "Unknown";
        case ELF64_OSABISysV:       return "System V";
        case ELF64_OSABIHPUX:       return "HP/UX";
        case ELF64_OSABIStandalone: return "Standalone";
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x4610
movl %eax, %ecx
movl %ecx, -0x14(%rbp)
testl %eax, %eax
je 0x46c0
jmp 0x46a0
movl -0x14(%rbp), %eax
subl $0x1, %eax
je 0x46cd
jmp 0x46aa
movl -0x14(%rbp), %eax
subl $0x2, %eax
je 0x46da
jmp 0x46b4
movl -0x14(%rbp), %eax
subl $0xff, %eax
je 0x46e7
jmp 0x46f2
leaq 0x274e(%rip), %rax      # 0x6e15
movq %rax, -0x8(%rbp)
jmp 0x46f2
leaq 0x2761(%rip), %rax      # 0x6e35
movq %rax, -0x8(%rbp)
jmp 0x46f2
leaq 0x275d(%rip), %rax      # 0x6e3e
movq %rax, -0x8(%rbp)
jmp 0x46f2
leaq 0x2756(%rip), %rax      # 0x6e44
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/ww9210[P]xnuca_final_ssp/elf.c
// Function: ELF64_HeaderGetObjectFileType
ELF64_ObjectFileType ELF64_HeaderGetObjectFileType( ELF64_HeaderRef header )
{
    if( header == NULL )
    {
        return ELF64_ObjectFileTypeNone;
    }
    
    switch( header->e_type )
    {
        case 0:     return ELF64_ObjectFileTypeNone;
        case 1:     return ELF64_ObjectFileTypeRelocatableObjectFile;
        case 2:     return ELF64_ObjectFileTypeExecutableFile;
        case 3:     return ELF64_ObjectFileTypeSharedObjectFile;
        case 4:     return ELF64_ObjectFileTypeCoreFile;
        default:    break;
    }
    
    return ELF64_ObjectFileTypeNone;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x4718
movl $0x0, -0x4(%rbp)
jmp 0x4774
movq -0x10(%rbp), %rax
movzwl 0x10(%rax), %eax
movq %rax, -0x18(%rbp)
subq $0x4, %rax
ja 0x476b
movq -0x18(%rbp), %rax
leaq 0x237f(%rip), %rcx      # 0x6ab4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x0, -0x4(%rbp)
jmp 0x4774
movl $0x1, -0x4(%rbp)
jmp 0x4774
movl $0x2, -0x4(%rbp)
jmp 0x4774
movl $0x3, -0x4(%rbp)
jmp 0x4774
movl $0x4, -0x4(%rbp)
jmp 0x4774
jmp 0x476d
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/ww9210[P]xnuca_final_ssp/elf.c
// Function: ELF64_HeaderGetObjectFileTypeString
const char * ELF64_HeaderGetObjectFileTypeString( ELF64_HeaderRef header )
{
    switch( ELF64_HeaderGetObjectFileType( header ) )
    {
        case ELF64_ObjectFileTypeNone:                  return "None";
        case ELF64_ObjectFileTypeRelocatableObjectFile: return "Relocatable object file";
        case ELF64_ObjectFileTypeExecutableFile:        return "Executable file";
        case ELF64_ObjectFileTypeSharedObjectFile:      return "Shared object file";
        case ELF64_ObjectFileTypeCoreFile:              return "Core file";
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x4700
movl %eax, %ecx
movq %rcx, -0x18(%rbp)
subl $0x4, %eax
ja 0x47f3
movq -0x18(%rbp), %rax
leaq 0x231d(%rip), %rcx      # 0x6ac8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x2694(%rip), %rax      # 0x6e4f
movq %rax, -0x8(%rbp)
jmp 0x47f3
leaq 0x268c(%rip), %rax      # 0x6e54
movq %rax, -0x8(%rbp)
jmp 0x47f3
leaq 0x2697(%rip), %rax      # 0x6e6c
movq %rax, -0x8(%rbp)
jmp 0x47f3
leaq 0x269a(%rip), %rax      # 0x6e7c
movq %rax, -0x8(%rbp)
jmp 0x47f3
leaq 0x26a0(%rip), %rax      # 0x6e8f
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/ww9210[P]xnuca_final_ssp/elf.c
// Function: ELF64_ProgramHeaderEntryGetType
ELF64_SegmentType ELF64_ProgramHeaderEntryGetType( ELF64_ProgramHeaderEntryRef entry )
{
    if( entry == NULL )
    {
        return ELF64_SegmentTypeUnused;
    }
    
    switch( entry->p_type )
    {
        case 0:     return ELF64_SegmentTypeUnused;
        case 1:     return ELF64_SegmentTypeLoadable;
        case 2:     return ELF64_SegmentTypeDynamicLinkingTables;
        case 3:     return ELF64_SegmentTypeProgramInterpreterPathName;
        case 4:     return ELF64_SegmentTypeNoteSections;
        case 6:     return ELF64_SegmentTypeProgramHeaderTable;
        default:    break;
    }
    
    return ELF64_SegmentTypeUnused;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x4fe8
movl $0x0, -0x4(%rbp)
jmp 0x504b
movq -0x10(%rbp), %rax
movl (%rax), %eax
movq %rax, -0x18(%rbp)
subq $0x6, %rax
ja 0x5042
movq -0x18(%rbp), %rax
leaq 0x1d71(%rip), %rcx      # 0x6d74
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x0, -0x4(%rbp)
jmp 0x504b
movl $0x1, -0x4(%rbp)
jmp 0x504b
movl $0x2, -0x4(%rbp)
jmp 0x504b
movl $0x3, -0x4(%rbp)
jmp 0x504b
movl $0x4, -0x4(%rbp)
jmp 0x504b
movl $0x6, -0x4(%rbp)
jmp 0x504b
jmp 0x5044
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq