LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/excess-c64[P]lib1541img/src/lib/1541img/cbmdosinode.c
// Function: CbmdosInode_blocks
SOEXPORT uint16_t CbmdosInode_blocks(const CbmdosInode *self)
{
    if (!self->data)
    {
	return 0;
    }
    size_t size = FileData_size(self->data);
    uint16_t blocks = size / 254;
    if (size % 254) ++blocks;
    return blocks;
}

// Assembly:
movq (%rdi), %rdi
testq %rdi, %rdi
je 0xa868
pushq %rax
callq 0x4500
movabsq $0x7efdfbf7efdfbf7f, %rcx # imm = 0x7EFDFBF7EFDFBF7F
imulq %rax, %rcx
shrq %rax
movabsq $0x4081020408102041, %rdx # imm = 0x4081020408102041
mulq %rdx
shrl $0x5, %edx
rorq %rcx
movabsq $0x102040810204081, %rsi # imm = 0x102040810204081
xorl %eax, %eax
cmpq %rsi, %rcx
seta %al
addl %edx, %eax
addq $0x8, %rsp
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/excess-c64[P]lib1541img/src/lib/1541img/cbmdosinode.c
// Function: CbmdosInode_setOptOverrides
SOEXPORT void CbmdosInode_setOptOverrides(
        CbmdosInode *self, CbmdosFsOptOverrides overrides)
{
    if (overrides.mask != self->overrides.mask
	    || overrides.flags != self->overrides.flags)
    {
	self->overrides = overrides;
	CbmdosInodeEventArgs args = { CIE_OPTOVERRIDESCHANGED };
	Event_raise(self->changedEvent, &args);
    }
}

// Assembly:
movq %rsi, %rax
shrq $0x20, %rax
cmpl %eax, 0x14(%rdi)
jne 0xa881
cmpl %esi, 0x10(%rdi)
je 0xa8a0
pushq %rax
movl %esi, 0x10(%rdi)
movl %eax, 0x14(%rdi)
leaq 0x4(%rsp), %rsi
movl $0x1, (%rsi)
movq 0x8(%rdi), %rdi
callq 0x45e0
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/excess-c64[P]lib1541img/src/lib/1541img/cbmdosinode.c
// Function: CbmdosInode_tryDestroy
SOLOCAL void CbmdosInode_tryDestroy(CbmdosInode *self)
{
    if (!self) return;
    if (self->refcount) return;
    Event_destroy(self->changedEvent);
    FileData_destroy(self->data);
    free(self);
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0xa8d7
movq %rdi, %rbx
cmpl $0x0, 0x18(%rdi)
je 0xa8d9
popq %rbx
retq
movq 0x8(%rbx), %rdi
callq 0x4170
movq (%rbx), %rdi
callq 0x43d0
movq %rbx, %rdi
popq %rbx
jmp 0x4080
nop
// File: /workspace/github_c_makefile_star2_O1/excess-c64[P]lib1541img/src/lib/1541img/lynx.c
// Function: findHeader
static int findHeader(size_t *sigpos, uint8_t *dirblocks, size_t *dirpos,
	const uint8_t *content, size_t size)
{
    size_t pos = 0;
    if (size < 255) return -1;
    size_t base = content[0] | (content[1] << 8);
    size_t next = content[2] | (content[3] << 8);
    if (next <= base) goto lynxhdr;
    pos = next - base + 2;
    if (pos > size - 5)
    {
	pos = 0;
	goto lynxhdr;
    }
    if (content[pos-1])
    {
	pos = 0;
	goto lynxhdr;
    }
    while (content[pos] || content[pos+1])
    {
	size_t nextline = content[pos] | (content[pos+1] << 8);
	if (nextline <= next) return -1;
	next = nextline;
	pos = next - base + 2;
	if (pos > size - 5) return -1;
	if (content[pos-1]) return -1;
    }
    pos += 2;
    if (content[pos++] != 0x0d) return -1;
lynxhdr:
    if (findLynxHeader(&pos, dirblocks, dirpos, content, size) < 0) return -1;
    *sigpos = pos;
    return 0;
}

// Assembly:
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq $0xff, %r8
jb 0xaaaf
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
movzwl (%rcx), %r10d
movzwl 0x2(%rcx), %ebx
movq %rbx, %r14
subq %r10, %r14
jbe 0xa972
leaq 0x2(%r14), %r9
leaq -0x5(%r8), %r11
cmpq %r11, %r9
ja 0xa972
cmpb $0x0, 0x1(%rcx,%r14)
je 0xa9ea
xorl %r9d, %r9d
movq %r9, %r11
cmpq %r8, %r9
jae 0xa992
movq %r9, %r11
cmpb $0x20, (%rcx,%r11)
jne 0xa992
incq %r11
cmpq %r11, %r8
jne 0xa980
movq %r8, %r11
movb $0x1, %r10b
cmpq %r8, %r11
je 0xaa9f
movb (%rcx,%r11), %bl
leal -0x3a(%rbx), %ebp
cmpb $-0x9, %bpl
jb 0xaa9f
leaq 0x1(%r11), %r15
cmpq %r8, %r15
je 0xaa9f
addb $-0x30, %bl
movb (%rcx,%r15), %r14b
leal -0x30(%r14), %ebp
cmpb $0x9, %bpl
ja 0xaa3c
addq $0x2, %r11
cmpq %r8, %r11
je 0xaa9f
movzbl %bl, %ebx
addl %ebx, %ebx
leal (%rbx,%rbx,4), %ebx
addb %r14b, %bl
addb $-0x30, %bl
jmp 0xaa3f
movzbl (%rcx,%r9), %r15d
testq %r15, %r15
jne 0xaa00
cmpb $0x0, 0x1(%rcx,%r9)
je 0xaab0
movzbl 0x1(%rcx,%r9), %r14d
shll $0x8, %r14d
orq %r15, %r14
cmpq %rbx, %r14
jbe 0xaa25
movq %r14, %rbx
subq %r10, %rbx
leaq 0x2(%rbx), %r9
cmpq %r11, %r9
jbe 0xaa29
xorl %ebp, %ebp
jmp 0xaa32
xorl %ebp, %ebp
jmp 0xaa35
cmpb $0x0, 0x1(%rcx,%rbx)
sete %bpl
movq %r14, %rbx
testb %bpl, %bpl
jne 0xa9ea
jmp 0xaaa9
movq %r15, %r11
movb (%rcx,%r11), %bpl
addb $-0x30, %bpl
cmpb $0xa, %bpl
jb 0xaa9f
cmpq %r8, %r11
jae 0xaa64
cmpb $0x20, (%rcx,%r11)
jne 0xaa64
incq %r11
cmpq %r11, %r8
jne 0xaa52
movq %r8, %r11
movq %r11, %r14
cmpq %r8, %r11
jae 0xaa88
movq %r11, %r14
movzbl (%rcx,%r14), %ebp
testl %ebp, %ebp
je 0xaa9f
cmpl $0xd, %ebp
je 0xaa88
incq %r14
cmpq %r14, %r8
jne 0xaa6f
movq %r8, %r14
incq %r14
addq $-0x5, %r8
cmpq %r8, %r14
ja 0xaa9f
movb %bl, (%rsi)
movq %r14, (%rdx)
xorl %r10d, %r10d
movq %r11, %r9
testb %r10b, %r10b
jne 0xaaa9
movq %r9, (%rdi)
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
cmpb $0xd, 0x2(%rcx,%r9)
jne 0xaaa9
addq $0x3, %r9
jmp 0xa975
// File: /workspace/github_c_makefile_star2_O1/excess-c64[P]lib1541img/src/lib/1541img/lynx.c
// Function: parsePetsciiNum
static int parsePetsciiNum(uint16_t *num, size_t *pos,
	const uint8_t *content, size_t size)
{
    size_t p = *pos;
    while (p < size && content[p] == 0x20) ++p;
    if (content[p] < 0x31 || content[p] > 0x39) return -1;
    uint16_t n = content[p++] - 0x30;
    if (p == size) return -1;
    if (content[p] > 0x2f && content[p] < 0x3a)
    {
	n *= 10;
	n += (content[p++] - 0x30);
	if (p == size) return -1;
    }
    if (content[p] > 0x2f && content[p] < 0x3a)
    {
	n *= 10;
	n += (content[p++] - 0x30);
	if (p == size) return -1;
    }
    if (content[p] > 0x2f && content[p] < 0x3a) return -1;
    while (p < size && content[p] == 0x20) ++p;
    if (p == size) return -1;
    if (content[p] != 0x0d) return -1;
    if (++p == size) return -1;
    *pos = p;
    *num = n;
    return 0;
}

// Assembly:
movq (%rsi), %r8
cmpq %rcx, %r8
jae 0xb1a8
cmpb $0x20, (%rdx,%r8)
jne 0xb1a8
incq %r8
cmpq %r8, %rcx
jne 0xb196
movq %rcx, %r8
movzbl (%rdx,%r8), %r9d
leal -0x3a(%r9), %r10d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpb $-0x9, %r10b
jb 0xb278
leaq 0x1(%r8), %r11
cmpq %rcx, %r11
je 0xb278
pushq %rbx
movzwl %r9w, %r9d
addl $-0x30, %r9d
movzbl (%rdx,%r11), %r10d
leal -0x30(%r10), %ebx
cmpb $0x9, %bl
popq %rbx
ja 0xb20a
addq $0x2, %r8
cmpq %rcx, %r8
je 0xb278
movswl %r9w, %r9d
addl %r9d, %r9d
leal (%r9,%r9,4), %r9d
movzwl %r10w, %r10d
addl %r10d, %r9d
addl $-0x30, %r9d
jmp 0xb20d
movq %r11, %r8
movzbl (%rdx,%r8), %r10d
leal -0x30(%r10), %r11d
cmpb $0x9, %r11b
ja 0xb236
incq %r8
cmpq %rcx, %r8
je 0xb278
addl %r9d, %r9d
leal (%r9,%r9,4), %r9d
movzwl %r10w, %r10d
addl %r10d, %r9d
addl $-0x30, %r9d
movb (%rdx,%r8), %r10b
addb $-0x30, %r10b
cmpb $0xa, %r10b
jb 0xb278
cmpq %rcx, %r8
jae 0xb25b
cmpb $0x20, (%rdx,%r8)
jne 0xb25b
incq %r8
cmpq %r8, %rcx
jne 0xb249
movq %rcx, %r8
cmpq %rcx, %r8
je 0xb278
cmpb $0xd, (%rdx,%r8)
jne 0xb278
incq %r8
cmpq %rcx, %r8
je 0xb278
movq %r8, (%rsi)
movw %r9w, (%rdi)
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/excess-c64[P]lib1541img/src/lib/1541img/lynx.c
// Function: archiveLynx
SOEXPORT FileData *archiveLynx(const CbmdosVfs *vfs)
{
    unsigned filecount = CbmdosVfs_fileCount(vfs);
    if (!filecount) return 0;
    const CbmdosFile **files = xmalloc(filecount * sizeof *files);
    unsigned realFilecount = 0;
    for (unsigned i = 0; i < filecount; ++i)
    {
	const CbmdosFile *file = CbmdosVfs_rfile(vfs, i);
	if (CbmdosFile_type(file) != CFT_DEL)
	{
	    files[realFilecount++] = file;
	}
    }
    if (!realFilecount)
    {
	free(files);
	return 0;
    }
    FileData *archive = archiveLynxFiles(files, realFilecount);
    free(files);
    return archive;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r15
callq 0x4240
xorl %ebx, %ebx
testl %eax, %eax
je 0xba25
movl %eax, %ebp
movl %eax, %edi
shlq $0x3, %rdi
callq 0x485c
movq %rax, %r14
xorl %r12d, %r12d
movq %r15, %rdi
movl %ebx, %esi
callq 0x4340
movq %rax, %r13
movq %rax, %rdi
callq 0x4780
testl %eax, %eax
je 0xba00
movl %r12d, %eax
incl %r12d
movq %r13, (%r14,%rax,8)
incl %ebx
cmpl %ebx, %ebp
jne 0xb9dd
testl %r12d, %r12d
je 0xba1b
movq %r14, %rdi
movl %r12d, %esi
callq 0x4450
movq %rax, %rbx
jmp 0xba1d
xorl %ebx, %ebx
movq %r14, %rdi
callq 0x4080
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/excess-c64[P]lib1541img/src/lib/1541img/petscii.c
// Function: appendUtf8
static size_t appendUtf8(
	char *buf, size_t bufsz, size_t *bufpos, const char *chrStr)
{
    size_t chrLen = strlen(chrStr);
    if (bufsz > *bufpos + chrLen + 1)
    {
        strcpy(buf + *bufpos, chrStr);
    }
    *bufpos += chrLen;
    return chrLen;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %r14
movq %rdx, %rbx
movq %rsi, %r13
movq %rdi, %r12
movq %rcx, %rdi
callq 0x4250
movq %rax, %r15
movq (%rbx), %rax
leaq (%r15,%rax), %rcx
incq %rcx
cmpq %r13, %rcx
jae 0xbc7a
addq %rax, %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x4100
addq %r15, (%rbx)
movq %r15, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/Encryptr[P]O-plus-plus/opp/opp.c
// Function: opp_init_file
void opp_init_file(const char* fname, struct Opp_Scan* s)
{
	long size = 0;
	s->io.file = fopen(fname, "r");
	s->io.fname = fname;

	if (!s->io.file)
		printf("\"%s\" Is not a file...\n", fname), exit(1);

	fseek(s->io.file, 0, SEEK_END);
	size = ftell(s->io.file);
	s->io.fsize = size;
	rewind(s->io.file);
	char* content = calloc(1, size + 2);

	if (content == NULL)
		INTERNAL_ERROR("Malloc fail");

	int _ = fread(content, size, 1, s->io.file);
	fclose(s->io.file);

	init_opp_lex(s, content);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0xb4ea(%rip), %rsi      # 0xc828
callq 0x11e0
movq %rax, 0x18(%rbx)
movq %r14, 0x10(%rbx)
testq %rax, %rax
je 0x13d5
movq %rax, %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x1190
movq 0x18(%rbx), %rdi
callq 0x1150
movq %rax, %r14
movq %rax, 0x20(%rbx)
movq 0x18(%rbx), %rdi
callq 0x10f0
movq %r14, %rsi
addq $0x2, %rsi
movl $0x1, %edi
callq 0x1130
movq %rax, %r15
testq %rax, %rax
jne 0x13a8
leaq 0x9c8b(%rip), %rdi      # 0xb027
leaq 0x9c90(%rip), %rsi      # 0xb033
callq 0x98fb
movq 0x18(%rbx), %rcx
movl $0x1, %edx
movq %r15, %rdi
movq %r14, %rsi
callq 0x1070
movq 0x18(%rbx), %rdi
callq 0x10a0
movq %rbx, %rdi
movq %r15, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x9a2e
leaq 0x9c34(%rip), %rdi      # 0xb010
movq %r14, %rsi
xorl %eax, %eax
callq 0x10e0
movl $0x1, %edi
callq 0x1210
// File: /workspace/github_c_makefile_star2_O1/Encryptr[P]O-plus-plus/opp/opp.c
// Function: run_main
void run_main(struct OppIr* ir)
{
	void *mem = mmap(NULL, 4096, PROT_WRITE | PROT_EXEC,
        32 | MAP_PRIVATE, -1, 0);

	memcpy(mem, ir->code.bytes, ir->code.idx);

	long (*run)(int) = mem;
	printf("%ld\n", run(2));
	munmap(mem, 4096);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1000, %esi           # imm = 0x1000
xorl %edi, %edi
movl $0x6, %edx
movl $0x22, %ecx
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
xorl %r9d, %r9d
callq 0x10c0
movq %rax, %r14
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %rax, %rdi
callq 0x1170
movl $0x2, %edi
callq *%r14
leaq 0xb13b(%rip), %rdi      # 0xc572
movq %rax, %rsi
xorl %eax, %eax
callq 0x10e0
movl $0x1000, %esi           # imm = 0x1000
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x11b0
// File: /workspace/github_c_makefile_star2_O1/Encryptr[P]O-plus-plus/opp/opp.c
// Function: opp_add_module
void opp_add_module(struct Opp_Parser* old, char* fname)
{
	struct Opp_Scan* new_scan = (struct Opp_Scan*)malloc(sizeof(struct Opp_Scan));

	if (new_scan == NULL)
		INTERNAL_ERROR("Malloc fail");

	char* path = fname;
	if (access(path, F_OK) == -1) {
		if (stdheader_path == NULL)
			INTERNAL_ERROR("Unknown path to stdlib");
		path = (char*)malloc(strlen(fname) + strlen(stdheader_path) + 1);
		sprintf(path, "%s%s", stdheader_path, fname);
	}

	opp_init_file(path, new_scan);

	struct Opp_Scan* temp = old->lex;
	old->lex = new_scan;

	opp_parser_begin(old);

	old->lex = temp;
	
	opp_free_lex(new_scan, 1);
	free(path);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl $0x50, %edi
callq 0x1180
movq %rax, %r15
testq %rax, %rax
jne 0x176b
leaq 0x98c8(%rip), %rdi      # 0xb027
leaq 0x98fb(%rip), %rsi      # 0xb061
callq 0x98fb
movq %rbx, %rdi
xorl %esi, %esi
callq 0x11d0
cmpl $-0x1, %eax
jne 0x17da
cmpq $0x0, 0xea4e(%rip)      # 0x101d0
jne 0x1797
leaq 0x98e5(%rip), %rdi      # 0xb070
leaq 0x98cf(%rip), %rsi      # 0xb061
callq 0x98fb
movq %rbx, %rdi
callq 0x10b0
movq %rax, %r12
movq 0xea27(%rip), %r13      # 0x101d0
movq %r13, %rdi
callq 0x10b0
leaq (%r12,%rax), %rdi
incq %rdi
callq 0x1180
movq %rax, %r12
leaq 0x98c0(%rip), %rsi      # 0xb087
movq %rax, %rdi
movq %r13, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x1200
movq %r12, %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x132c
movq (%r14), %r12
movq %r15, (%r14)
movq %r14, %rdi
callq 0x8435
movq %r12, (%r14)
movq %r15, %rdi
movl $0x1, %esi
callq 0x9a71
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O1/Encryptr[P]O-plus-plus/opp/analysis/analysis.c
// Function: opp_init_analize
struct Opp_Analize* opp_init_analize(struct Opp_Parser* parser, struct Opp_Options* opts)
{
	struct Opp_Analize* ctx = (struct Opp_Analize*)malloc(sizeof(struct Opp_Analize));

	if (ctx == NULL)
		goto err;

	ctx->opts = opts;

	ctx->parser = parser;
	ctx->debug.scope = NULL;
	ctx->debug.ret = 0;

	// Namespace
	ctx->ns = init_namespace(NULL, (void*)alloc);
	ctx->curr_ns = ctx->ns;
	ctx->parser->scope = ctx->ns;

	return ctx;

err:
	INTERNAL_ERROR("Malloc Fail");
	return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %r14
movl $0x48, %edi
callq 0x1180
testq %rax, %rax
je 0x1c1c
movq %rax, %rbx
movq %r15, (%rax)
movq %r14, 0x8(%rax)
movq $0x0, 0x20(%rax)
movb $0x0, 0x28(%rax)
leaq 0x635c(%rip), %rsi      # 0x7f63
xorl %edi, %edi
callq 0xa36b
movq %rax, 0x10(%rbx)
movq %rax, 0x18(%rbx)
movq %rax, 0x30(%r14)
jmp 0x1c31
leaq 0x996d(%rip), %rdi      # 0xb590
leaq 0x9972(%rip), %rsi      # 0xb59c
callq 0x98fb
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/Encryptr[P]O-plus-plus/opp/analysis/analysis.c
// Function: opp_semantics_error
static void opp_semantics_error(struct Opp_Analize* ctx, 
		struct Opp_Node* node, const char* str, ...)
{
	va_list ap;
	va_start(ap, str);
	
	printf("%s:%u:%u ", ctx->parser->lex->io.fname, 
			node->debug.line, node->debug.colum);
	#ifdef UNX
		printf(CL_RED);
	#endif

	if (ctx->debug.scope != NULL)
		printf("semantics error: in function \"%s(...)\"\n\t", ctx->debug.scope);
	else
		printf("semantics error: in declaration\n\t");

	#ifdef UNX
		printf(CL_RESET);
	#endif
	vfprintf(stdout, str, ap);
	fprintf(stdout, "\n");
	va_end(ap);
	exit(1);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xd8, %rsp
movq %rdx, %rbx
movq %rdi, %r14
leaq 0x20(%rsp), %rdx
movq %rcx, 0x18(%rdx)
movq %r8, 0x20(%rdx)
movq %r9, 0x28(%rdx)
testb %al, %al
je 0x22e1
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rdx, 0x10(%rsp)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%rsp)
movabsq $0x3000000018, %rax     # imm = 0x3000000018
movq %rax, (%rsp)
movq 0x8(%rdi), %rax
movq (%rax), %rax
movq 0x10(%rax), %rax
movl 0x4(%rsi), %edx
movl 0x8(%rsi), %ecx
leaq 0x9333(%rip), %rdi      # 0xb64c
movq %rax, %rsi
xorl %eax, %eax
callq 0x10e0
leaq 0x8eaa(%rip), %rdi      # 0xb1d4
xorl %eax, %eax
callq 0x10e0
movq 0x20(%r14), %rsi
testq %rsi, %rsi
jne 0x234a
leaq 0x933e(%rip), %rdi      # 0xb67f
xorl %eax, %eax
callq 0x10e0
jmp 0x2358
leaq 0x9305(%rip), %rdi      # 0xb656
xorl %eax, %eax
callq 0x10e0
leaq 0x8f34(%rip), %rdi      # 0xb293
xorl %eax, %eax
callq 0x10e0
movq 0xdc73(%rip), %r14      # 0xffe0
movq (%r14), %rdi
movq %rsp, %rdx
movq %rbx, %rsi
callq 0x11f0
movq (%r14), %rsi
movl $0xa, %edi
callq 0x1120
movl $0x1, %edi
callq 0x1210
// File: /workspace/github_c_makefile_star2_O1/Encryptr[P]O-plus-plus/opp/analysis/analysis.c
// Function: opp_warning
static void opp_warning(struct Opp_Analize* ctx, 
		struct Opp_Node* node, const char* str, ...)
{
	if (!ctx->opts->warning)
		return;

	if (ctx->opts->wall) {
		opp_semantics_error(ctx, node, str);
		return;
	}

	va_list ap;
	va_start(ap, str);
	
	printf("%s:%u:%u ", ctx->parser->lex->io.fname, 
			node->debug.line, node->debug.colum);
	#ifdef UNX
		printf(CL_YELLOW);
	#endif

	if (ctx->debug.scope != NULL)
		printf("warning: in function \"%s(...)\"\n\t", ctx->debug.scope);
	else 
		printf("warning: in declaration\n\t");

	#ifdef UNX
		printf(CL_RESET);
	#endif 
	vfprintf(stdout, str, ap);
	fprintf(stdout, "\n");
	va_end(ap);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xd8, %rsp
movq %r9, 0x48(%rsp)
testb %al, %al
je 0x25e8
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %r8, 0x40(%rsp)
movq %rcx, 0x38(%rsp)
movq (%rdi), %rax
cmpb $0x1, 0x4(%rax)
jne 0x26bb
movq %rdx, %rbx
movq %rdi, %r14
cmpb $0x1, 0x6(%rax)
je 0x26c6
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%rsp)
movabsq $0x3000000018, %rax     # imm = 0x3000000018
movq %rax, (%rsp)
movq 0x8(%r14), %rax
movq (%rax), %rax
movq 0x10(%rax), %rax
movl 0x4(%rsi), %edx
movl 0x8(%rsi), %ecx
leaq 0x9000(%rip), %rdi      # 0xb64c
movq %rax, %rsi
xorl %eax, %eax
callq 0x10e0
leaq 0x96cc(%rip), %rdi      # 0xbd29
xorl %eax, %eax
callq 0x10e0
movq 0x20(%r14), %rsi
testq %rsi, %rsi
je 0x267d
leaq 0x96bb(%rip), %rdi      # 0xbd2f
xorl %eax, %eax
callq 0x10e0
jmp 0x268b
leaq 0x96cc(%rip), %rdi      # 0xbd50
xorl %eax, %eax
callq 0x10e0
leaq 0x8c01(%rip), %rdi      # 0xb293
xorl %eax, %eax
callq 0x10e0
movq 0xd940(%rip), %r14      # 0xffe0
movq (%r14), %rdi
movq %rsp, %rdx
movq %rbx, %rsi
callq 0x11f0
movq (%r14), %rsi
movl $0xa, %edi
callq 0x1120
addq $0xd8, %rsp
popq %rbx
popq %r14
retq
movq %r14, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x2285
// File: /workspace/github_c_makefile_star2_O1/Encryptr[P]O-plus-plus/opp/analysis/analysis.c
// Function: opp_analize_assign
static Opp_Obj opp_analize_assign(struct Opp_Analize* ctx, struct Opp_Node* node)
{
	if ((node->assign_expr.ident->type != EUNARY 
		|| node->assign_expr.ident->unary_expr.type != TIDENT)
		&& (node->assign_expr.ident->type != EDEREF) 
		&& (node->assign_expr.ident->type != EELEMENT)
		&& (node->assign_expr.ident->type != EDOT))
		opp_semantics_error(ctx, node, "Unexpected expression on lhs of '='");

	Opp_Obj lhs = opp_analize_expr(ctx, node->assign_expr.ident);

	const char* name = ctx->debug.res_name;

	// Global assign error
	if (ctx->curr_ns == ctx->ns)
		opp_semantics_error(ctx, node, "Global assigments are not permited, assiment of '%s'", name);

	// Cannot assign array error
	if (lhs.size > 0)
		opp_semantics_error(ctx, node, "Attempting to assign a value to array '%s'", ctx->debug.res_name);

	Opp_Obj rhs = opp_analize_expr(ctx, node->assign_expr.val);

	// Cannot assign non pointer to array type
	if (rhs.size > 0 && lhs.depth == 0) 
		opp_semantics_error(ctx, node, "Attempting to assign an array type to var '%s'", name);

	// Different depths warning	
	if (rhs.depth != lhs.depth)
		opp_warning(ctx, node, "Assigning var '%s' to incompatible pointer depth", name);

	// Cannot assign non pointer to obj and vise versa
	if ((rhs.decl->t_type == TYPE_STRUCT && rhs.depth == 0)
		|| 
		(lhs.decl->t_type == TYPE_STRUCT && lhs.depth == 0))
		opp_semantics_error(ctx, node, "Assigning var '%s' to a incompatible struct type", name);

	return lhs;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x20(%rsi), %rdx
movl (%rdx), %eax
leal -0x7(%rax), %ecx
cmpl $0x2, %ecx
jb 0x2714
cmpl $0xd, %eax
je 0x2714
cmpl $0x5, %eax
jne 0x27e8
cmpl $0x1, 0x10(%rdx)
je 0x2714
cmpl $0x2, %ecx
jb 0x2714
cmpl $0xd, %eax
jne 0x27e8
movq 0x20(%rbx), %rsi
movq %r14, %rdi
callq 0x297d
movq %rax, %r13
movq 0x18(%r14), %rax
movq 0x40(%r14), %rcx
movq %rcx, (%rsp)
cmpq 0x10(%r14), %rax
je 0x27b4
movq %rdx, %r12
movq %rdx, %rax
shrq $0x10, %rax
testw %ax, %ax
jne 0x27bd
movq 0x18(%rbx), %rsi
movq %r14, %rdi
callq 0x297d
movq %rax, %rbp
movq %rdx, %rax
shrq $0x10, %rax
testw %ax, %ax
je 0x2764
testl %r12d, %r12d
je 0x27d0
movzwl %dx, %r15d
cmpl %r12d, %r15d
je 0x2785
leaq 0x90ce(%rip), %rdx      # 0xb842
movq %r14, %rdi
movq %rbx, %rsi
movq (%rsp), %rcx
xorl %eax, %eax
callq 0x259e
testl %r15d, %r15d
jne 0x2790
cmpl $0x8, 0x8(%rbp)
je 0x27ab
movl 0x8(%r13), %eax
xorl $0x8, %eax
orl %r12d, %eax
je 0x27ab
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x90c1(%rip), %rdx      # 0xb873
jmp 0x27d7
leaq 0x8ff8(%rip), %rdx      # 0xb7b3
jmp 0x27d7
movq 0x40(%r14), %rcx
leaq 0x9020(%rip), %rdx      # 0xb7e8
movq %r14, %rdi
movq %rbx, %rsi
jmp 0x27e1
leaq 0x903c(%rip), %rdx      # 0xb813
movq %r14, %rdi
movq %rbx, %rsi
movq (%rsp), %rcx
xorl %eax, %eax
callq 0x2285
leaq 0x8fa0(%rip), %rdx      # 0xb78f
movq %r14, %rdi
movq %rbx, %rsi
xorl %eax, %eax
callq 0x2285
// File: /workspace/github_c_makefile_star2_O1/Encryptr[P]O-plus-plus/opp/analysis/analysis.c
// Function: opp_analize_unary
static Opp_Obj opp_analize_unary(struct Opp_Analize* ctx, struct Opp_Node* node)
{
	Opp_Obj type;

	switch (node->unary_expr.type)
	{
		case TINTEGER:
			type.decl = int_type;
			type.depth = 0;
			type.size = 0;
			type.unsign = 0;
			break;

		case TSTR:
			type.decl = char_type;
			type.depth = 1;
			type.size = 0;
			type.unsign = 0;
			break;
		

		case TFLOAT:
			type.decl = float_type;
			type.depth = 0;
			type.size = 0;
			type.unsign = 0;
			break;
		
		case TIDENT: {
			struct Opp_Bucket* bucket = env_get_item(ctx->curr_ns, node->unary_expr.val.strval);

			if (bucket == NULL)
				opp_semantics_error(ctx, node, "Use of undeclared variable '%s'",
					node->unary_expr.val.strval);

			if (bucket->type == TYPE_LABEL)
				opp_semantics_error(ctx, node, "Invalid use of label '%s'",
					bucket->key);
			
			node->unary_expr.bidx = bucket;
			ctx->debug.res_name = bucket->key;

			return bucket->sym_type;
		}
		default: break;
	}
	return type;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl 0x10(%rsi), %eax
xorl %edx, %edx
decl %eax
cmpl $0x4, %eax
ja 0x3707
movq %rsi, %rbx
leaq 0x7e89(%rip), %rcx      # 0xb52c
movslq (%rcx,%rax,4), %rsi
addq %rcx, %rsi
jmpq *%rsi
movq %rdi, %r14
movq 0x18(%rdi), %rdi
movq 0x18(%rbx), %rsi
callq 0xa4d8
testq %rax, %rax
je 0x370f
movq %rax, %rcx
cmpl $0x3, 0x8(%rax)
je 0x371c
movq %rcx, 0x20(%rbx)
movq (%rcx), %rax
movq %rax, 0x40(%r14)
movq 0x10(%rcx), %rax
movq 0x18(%rcx), %rdx
jmp 0x3707
leaq 0xcbba(%rip), %rax      # 0x102a0
jmp 0x36ef
leaq 0xcba1(%rip), %rax      # 0x10290
movq (%rax), %rax
xorl %edx, %edx
jmp 0x3707
leaq 0xcb8b(%rip), %rax      # 0x10288
movq (%rax), %rax
movl $0x1, %edx
jmp 0x3707
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x18(%rbx), %rcx
leaq 0x83c6(%rip), %rdx      # 0xbae0
jmp 0x3726
movq (%rcx), %rcx
leaq 0x83da(%rip), %rdx      # 0xbb00
movq %r14, %rdi
movq %rbx, %rsi
xorl %eax, %eax
callq 0x2285
// File: /workspace/github_c_makefile_star2_O1/Encryptr[P]O-plus-plus/opp/analysis/analysis.c
// Function: opp_get_plain_size
static unsigned int opp_get_plain_size(struct Opp_Type_Decl* type)
{
	if (type->depth > 0 && type->size == 0)
		return 8;
	
	switch (type->decl->t_type)
	{
		case TYPE_VOID:   return 0;
		case TYPE_I8:     return 1;
		case TYPE_I16:    return 2;
		case TYPE_I32:    return 4;
		case TYPE_I64:    return 8;
		case TYPE_FLOAT:  return 4;
		case TYPE_DOUBLE: return 8;
		case TYPE_STRUCT: return type->decl->l_mem;
		default: break;
	}

	return 0;
}

// Assembly:
cmpw $0x0, 0x8(%rdi)
je 0x3782
cmpw $0x0, 0xa(%rdi)
je 0x37a5
movq (%rdi), %rdx
movl 0x8(%rdx), %ecx
xorl %eax, %eax
leal -0x1(%rcx), %esi
cmpl $0x7, %esi
ja 0x37b4
leaq 0x7dc7(%rip), %rdi      # 0xb560
movslq (%rdi,%rsi,4), %rsi
addq %rdi, %rsi
jmpq *%rsi
movl %ecx, %eax
retq
movl $0x8, %eax
retq
movl $0x4, %eax
retq
movl 0x14(%rdx), %eax
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/Encryptr[P]O-plus-plus/opp/compiler/compiler.c
// Function: opp_init_compile
struct Opp_Context* opp_init_compile(struct Opp_Parser* parser, 
									struct Opp_Options* opts)
{
	struct Opp_Context* opp = (struct Opp_Context*)
		malloc(sizeof(struct Opp_Context));

	if (opp == NULL)
		goto err;

	opp->parser = parser;
	opp->opts = opts;
	opp->oppir = NULL;

	// Info
	memset(&opp->info, 0, sizeof(struct Opp_Info));

	// Cond
	memset(&opp->cond_state, 0, sizeof(struct Opp_Cond));

	// Ir
	opp->ir.instr_idx = 0;
	opp->ir.allocated = DEFAULT_OPCODE_SIZE;
	opp->ir.opcodes = (struct OppIr_Opcode*)
		malloc(sizeof(struct OppIr_Opcode)*DEFAULT_OPCODE_SIZE);

	if (opp->ir.opcodes == NULL)
		goto err;

	memset(opp->ir.opcodes, 0, sizeof(struct OppIr_Opcode)*DEFAULT_OPCODE_SIZE);

	// Tables
	// opp->env.global_ns = parser->scope;
	// opp->env.curr_ns = opp->env.global_ns;

	return opp;

err:
	INTERNAL_ERROR("Malloc Fail");
	return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
movl $0x90, %edi
callq 0x1180
testq %rax, %rax
je 0x3827
movq %rax, %rbx
movq %r15, (%rax)
movq %r14, 0x8(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x30(%rax)
movups %xmm0, 0x40(%rax)
movups %xmm0, 0x60(%rax)
movups %xmm0, 0x70(%rax)
movups %xmm0, 0x7c(%rax)
movq $0x40, 0x50(%rax)
movl $0xa00, %edi            # imm = 0xA00
callq 0x1180
movq %rax, 0x58(%rbx)
testq %rax, %rax
je 0x3827
movl $0xa00, %edx            # imm = 0xA00
movq %rax, %rdi
xorl %esi, %esi
callq 0x1110
jmp 0x383c
leaq 0x7d62(%rip), %rdi      # 0xb590
leaq 0x8763(%rip), %rsi      # 0xbf98
callq 0x98fb
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/Encryptr[P]O-plus-plus/opp/compiler/compiler.c
// Function: opp_realloc_instrs
void opp_realloc_instrs(struct Opp_Context* opp)
{
	if (opp->ir.instr_idx >= opp->ir.allocated) {
		opp->ir.allocated += 64;
		opp->ir.opcodes = (struct OppIr_Opcode*)realloc(opp->ir.opcodes, 
			(opp->ir.allocated) * sizeof(struct OppIr_Opcode));

		if (opp->ir.opcodes == NULL)
			INTERNAL_ERROR("Realloc Fail");
	}
}

// Assembly:
movq 0x50(%rdi), %rax
cmpq %rax, 0x48(%rdi)
jb 0x3890
pushq %rbx
movq %rdi, %rbx
leaq 0x40(%rax), %rcx
movq %rcx, 0x50(%rdi)
movq 0x58(%rdi), %rdi
leaq 0x200(,%rax,8), %rax
leaq (%rax,%rax,4), %rsi
callq 0x11a0
movq %rax, 0x58(%rbx)
testq %rax, %rax
popq %rbx
je 0x3891
retq
leaq 0x8711(%rip), %rdi      # 0xbfa9
leaq 0x8717(%rip), %rsi      # 0xbfb6
jmp 0x98fb
// File: /workspace/github_c_makefile_star2_O1/Encryptr[P]O-plus-plus/opp/compiler/compiler.c
// Function: opp_type_cast
void opp_type_cast(struct Opp_Context* opp, Opp_Obj* lhs, Opp_Obj* rhs)
{
	/* Cast rules
		1) Always cast based on lhs
		Ex: 
			double a;
			int b;
			b = a; # Cast a to int

		2) Only create a cast if
			- Lhs and Rhs are different floating points
			- Lhs and Rhs are different types 
				not including integer types.
	*/
	enum OppIr_Const_Type lt = opp_type_to_ir(lhs);
	enum OppIr_Const_Type rt = opp_type_to_ir(rhs);

	if (
		((lt == IMM_F64 || lt == IMM_F32) && (rt != IMM_F32 && rt != IMM_F64))
		||
		((lt != IMM_F64 && lt != IMM_F32) && (rt == IMM_F64 || rt == IMM_F32))
		||
		((lt == IMM_F64 && rt == IMM_F32) || (lt == IMM_F32 && rt == IMM_F64))
		) 
	{
		printf("CASTING\n");
		OPCODE_START();
			OPCODE_TYPE(OPCODE_CAST);
			opp->ir.opcodes[opp->ir.instr_idx].cast.type = lt;
		OPCODE_END();
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r15
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x38a4
movl %eax, %r14d
movq %r15, %rdi
callq 0x38a4
leal -0xb(%r14), %ecx
cmpl $0x2, %ecx
setb %cl
leal -0xd(%rax), %edx
cmpl $-0x2, %edx
setb %dl
testb %dl, %cl
je 0x3990
leaq 0x86e6(%rip), %rdi      # 0xc04b
callq 0x1060
movq %rbx, %rdi
callq 0x385b
movq 0x48(%rbx), %rax
movq 0x58(%rbx), %rcx
leaq (%rax,%rax,4), %rax
movl $0xb, (%rcx,%rax,8)
movl %r14d, 0x8(%rcx,%rax,8)
incq 0x48(%rbx)
jmp 0x39d3
movl %r14d, %edx
xorl $0xb, %edx
movl %r14d, %ecx
xorl $0xc, %ecx
leal -0xd(%r14), %esi
cmpl $-0x2, %esi
setb %sil
leal -0xb(%rax), %edi
cmpl $0x2, %edi
setb %dil
movl %eax, %r8d
xorl $0xb, %r8d
orl %ecx, %r8d
sete %cl
xorl $0xc, %eax
orl %edx, %eax
sete %al
testb %dil, %sil
jne 0x395e
testb %cl, %cl
jne 0x395e
testb %al, %al
jne 0x395e
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/Encryptr[P]O-plus-plus/opp/compiler/compile_stmt.c
// Function: opp_compile_var
void opp_compile_var(struct Opp_Context* opp, struct Opp_Node* node)
{
	struct Opp_Stmt_Var* var = &node->var_stmt;

	bool assign = var->var->type == EASSIGN ? 1 : 0;
	bool global = var->bidx->type == TYPE_GLOBAL || var->bidx->type == TYPE_EXTERN;
	unsigned int size = opp_type_to_size(&var->type);

	OPCODE_START();
		OPCODE_TYPE(OPCODE_VAR);
		opp->ir.opcodes[opp->ir.instr_idx].var.global = global;
		opp->ir.opcodes[opp->ir.instr_idx].var.size = size;
		opp->ir.opcodes[opp->ir.instr_idx].var.name = var->bidx->key;
	OPCODE_END();

	if (!global) {
		opp->info.stack_offset -= size;
		var->bidx->offset = opp->info.stack_offset;
	}

	if (assign)
		opp_compile_assign(opp, var->var);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rsi), %rdi
movq 0x20(%rsi), %rax
movq 0x28(%rsi), %rcx
movl (%rax), %r15d
movl 0x8(%rcx), %r12d
callq 0x38df
movl %eax, %ebp
movq %rbx, %rdi
callq 0x385b
testl $0xfffffffb, %r12d      # imm = 0xFFFFFFFB
movq 0x48(%rbx), %rax
movq 0x58(%rbx), %rcx
leaq (%rax,%rax,4), %rax
movl $0x5, (%rcx,%rax,8)
sete 0x8(%rcx,%rax,8)
movq 0x48(%rbx), %rax
movq 0x58(%rbx), %rcx
leaq (%rax,%rax,4), %rax
movl %ebp, 0x18(%rcx,%rax,8)
movq 0x28(%r14), %rax
movq (%rax), %rax
movq 0x48(%rbx), %rcx
movq 0x58(%rbx), %rdx
leaq (%rcx,%rcx,4), %rcx
movq %rax, 0x10(%rdx,%rcx,8)
incq 0x48(%rbx)
testl $0xfffffffb, %r12d      # imm = 0xFFFFFFFB
je 0x50ae
movl 0x20(%rbx), %eax
subl %ebp, %eax
movl %eax, 0x20(%rbx)
movq 0x28(%r14), %rcx
movl %eax, 0x28(%rcx)
cmpl $0x4, %r15d
jne 0x50c5
movq 0x20(%r14), %rsi
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x50ce
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Encryptr[P]O-plus-plus/opp/compiler/compile_stmt.c
// Function: opp_compile_inifite
static void opp_compile_inifite(struct Opp_Context* opp, struct Opp_Node* node)
{ // might not work with break
	unsigned int start = opp->info.label_loc++;

	OPCODE_START();
		OPCODE_TYPE(OPCODE_LABEL);
		opp->ir.opcodes[opp->ir.instr_idx].constant.val.imm_i32 = start;
	OPCODE_END();

	opp_compile_stmt(opp, node->while_stmt.then);

	OPCODE_START();
		OPCODE_TYPE(OPCODE_JMP);
		opp->ir.opcodes[opp->ir.instr_idx].jmp.type = PURE_JMP;
		opp->ir.opcodes[opp->ir.instr_idx].jmp.loc = start;
	OPCODE_END();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movl 0x24(%rdi), %r15d
leal 0x1(%r15), %eax
movl %eax, 0x24(%rdi)
callq 0x385b
movq 0x48(%rbx), %rax
movq 0x58(%rbx), %rcx
leaq (%rax,%rax,4), %rax
movl $0xa, (%rcx,%rax,8)
movl %r15d, 0x10(%rcx,%rax,8)
incq 0x48(%rbx)
movq 0x18(%r14), %rsi
movq %rbx, %rdi
callq 0x4c64
movq %rbx, %rdi
callq 0x385b
movq 0x48(%rbx), %rax
movq 0x58(%rbx), %rcx
leaq (%rax,%rax,4), %rax
movl $0x8, (%rcx,%rax,8)
movl $0x0, 0x8(%rcx,%rax,8)
movq 0x48(%rbx), %rax
movq 0x58(%rbx), %rcx
leaq (%rax,%rax,4), %rax
movl %r15d, 0xc(%rcx,%rax,8)
incq 0x48(%rbx)
popq %rbx
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/Encryptr[P]O-plus-plus/opp/ir/ir.c
// Function: oppir_free
void oppir_free(struct OppIr* ir)
{
	free(ir->code.bytes);
	free(ir->data_seg.data);
	free(ir->offsets.offset_table);
	free(ir->offsets.jmp_table);
	free(ir->regalloc.spills);
	free(ir->reg_stack.stack);
	free(ir);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x1030
movq 0x90(%rbx), %rdi
callq 0x1030
movq 0x70(%rbx), %rdi
callq 0x1030
movq 0x78(%rbx), %rdi
callq 0x1030
movq 0x28(%rbx), %rdi
callq 0x1030
movq 0x38(%rbx), %rdi
callq 0x1030
movq %rbx, %rdi
popq %rbx
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O1/Encryptr[P]O-plus-plus/opp/ir/ir.c
// Function: dump_bytes
void dump_bytes(struct OppIr* ir, OppIO* io)
{
	if (io == NULL) {
		for (size_t i = 0; i < ir->code.idx; i++) { 
			if ((i+1) % 16 == 0) printf("\n");
			else printf("%X ", ir->code.bytes[i]);
		}
		printf("\n");
	}
	else {
		fwrite(ir->code.bytes, sizeof(unsigned char), ir->code.idx, io->file);
		fclose(io->file);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
testq %rsi, %rsi
je 0x5818
movq %rsi, %r14
movq (%rbx), %rdi
movq 0x8(%rbx), %rdx
movq 0x8(%rsi), %rcx
movl $0x1, %esi
callq 0x1220
movq 0x8(%r14), %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x10a0
cmpq $0x0, 0x8(%rbx)
je 0x5858
leaq 0x6b49(%rip), %r14      # 0xc36f
xorl %eax, %eax
leaq 0x1(%rax), %r15
testb $0xf, %r15b
je 0x5845
movq (%rbx), %rcx
movzbl (%rcx,%rax), %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x10e0
jmp 0x584f
movl $0xa, %edi
callq 0x1040
movq %r15, %rax
cmpq 0x8(%rbx), %r15
jb 0x5828
movl $0xa, %edi
popq %rbx
popq %r14
popq %r15
jmp 0x1040
// File: /workspace/github_c_makefile_star2_O1/Encryptr[P]O-plus-plus/opp/ir/ir.c
// Function: oppir_eval
void oppir_eval(struct OppIr* ir)
{
	#ifdef LINUX64
		init_strtab();
		init_elf_syms();
		init_reloc();
	#endif

	for (size_t index = 0; index < ir->instr->instr_idx; index++)
		oppir_eval_opcode(ir, &ir->instr->opcodes[index]);

	#ifdef LINUX64
		init_elf_header(DEFAULT_SECT);
		init_text_sect(ir);
		init_data_sect(ir);
		init_symtab_sect();
		init_shstrtab_sect();
		init_strtab_sect();
		init_rela_text_sect();
		elf_offsets(ir);
	#endif

	// dump_data(ir);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %eax, %eax
callq 0x7934
xorl %eax, %eax
callq 0x79f1
xorl %eax, %eax
callq 0x799e
movq 0x58(%rbx), %rax
cmpq $0x0, (%rax)
je 0x58bd
xorl %r14d, %r14d
xorl %r15d, %r15d
movq 0x10(%rax), %rsi
addq %r14, %rsi
movq %rbx, %rdi
callq 0x5902
incq %r15
movq 0x58(%rbx), %rax
addq $0x28, %r14
cmpq (%rax), %r15
jb 0x589e
movl $0x7, %edi
xorl %eax, %eax
callq 0x7a78
movq %rbx, %rdi
callq 0x7b11
movq %rbx, %rdi
callq 0x7b80
xorl %eax, %eax
callq 0x7c43
xorl %eax, %eax
callq 0x7bf3
xorl %eax, %eax
callq 0x7cb0
xorl %eax, %eax
callq 0x7d07
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x7d74
// File: /workspace/github_c_makefile_star2_O1/Encryptr[P]O-plus-plus/opp/ir/ir.c
// Function: oppir_check_realloc
void oppir_check_realloc(struct OppIr* ir, unsigned int bytes)
{
	if ((ir->code.idx + bytes) >= ir->code.allocated) {

		ir->code.bytes = (unsigned char*)
				realloc(ir->code.bytes, (64+ir->code.allocated));

		if (ir->code.bytes == NULL)
			INTERNAL_ERROR("Malloc Fail");

		ir->code.allocated += 64;
	}
}

// Assembly:
movl %esi, %eax
addq 0x8(%rdi), %rax
movq 0x10(%rdi), %rsi
cmpq %rsi, %rax
jb 0x68af
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
addq $0x40, %rsi
callq 0x11a0
movq %rax, (%rbx)
testq %rax, %rax
jne 0x68a9
leaq 0x4cf3(%rip), %rdi      # 0xb590
leaq 0x5acf(%rip), %rsi      # 0xc373
callq 0x98fb
addq $0x40, 0x10(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/Encryptr[P]O-plus-plus/opp/ir/ir.c
// Function: oppir_check_data
void oppir_check_data(struct OppIr* ir, unsigned int bytes)
{
	if ((ir->data_seg.idx + bytes) >= ir->data_seg.allocated) {

		ir->data_seg.data = (unsigned char*)
				realloc(ir->data_seg.data, (64+ir->data_seg.allocated));

		if (ir->data_seg.data == NULL)
			INTERNAL_ERROR("Malloc Fail");

		ir->data_seg.allocated += 64;
	}
}

// Assembly:
movl %esi, %eax
addq 0x88(%rdi), %rax
movq 0x80(%rdi), %rsi
cmpq %rsi, %rax
jb 0x6901
pushq %rbx
movq %rdi, %rbx
movq 0x90(%rdi), %rdi
addq $0x40, %rsi
callq 0x11a0
movq %rax, 0x90(%rbx)
testq %rax, %rax
jne 0x68f8
leaq 0x4ca4(%rip), %rdi      # 0xb590
leaq 0x5a94(%rip), %rsi      # 0xc387
callq 0x98fb
addq $0x40, 0x80(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/Encryptr[P]O-plus-plus/opp/ir/ir.c
// Function: oppir_eval_ptr_assign
static void oppir_eval_ptr_assign(struct OppIr* ir, struct OppIr_Cast* cast)
{
	struct Register rhs = oppir_pop_reg(ir);
	struct Register lhs = oppir_pop_reg(ir);

	assert(cast->type != IMM_F32 && cast->type != IMM_F64);

	oppir_check_realloc(ir, 3);

	switch (cast->type)
	{
		case IMM_I8:
		case IMM_U8:
			IR_EMIT(0x88);
			break;

		case IMM_I16:
		case IMM_U16:
			IR_EMIT(0x66);
			IR_EMIT(0x89);
			break;

		case IMM_I32:
		case IMM_U32:
			IR_EMIT(0x89);
			break;

		case IMM_I64:
		case IMM_U64:
			IR_EMIT(0x48);
			IR_EMIT(0x89);
			break;

		default: break;
	}

	switch (lhs.reg)
	{
		case REG_RAX:
			IR_EMIT(0x08 * (rhs.reg));
			break;

		case REG_RCX:
			IR_EMIT(rhs.reg == REG_RAX ? 0x1 : 0x11);
			break;

		case REG_RDX:
			IR_EMIT(rhs.reg == REG_RAX ? 0x2 : 0xa);
			break;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r12
movq %rdi, %rbx
callq 0x7386
movq %rax, %r14
movq %rbx, %rdi
callq 0x7386
movq %rax, %r15
movl (%r12), %eax
addl $-0xb, %eax
cmpl $0x1, %eax
jbe 0x6e14
movq %rbx, %rdi
movl $0x3, %esi
callq 0x686f
movl (%r12), %eax
addl $-0x3, %eax
cmpl $0x7, %eax
ja 0x6dbf
leaq 0x55a6(%rip), %rcx      # 0xc31c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movb $-0x78, %al
jmp 0x6dad
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x8(%rbx)
movb $0x66, (%rax,%rcx)
jmp 0x6dab
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x8(%rbx)
movb $0x48, (%rax,%rcx)
movb $-0x77, %al
movq (%rbx), %rcx
movq 0x8(%rbx), %rdx
leaq 0x1(%rdx), %rsi
movq %rsi, 0x8(%rbx)
movb %al, (%rcx,%rdx)
cmpl $0x2, %r15d
je 0x6de6
cmpl $0x1, %r15d
je 0x6dd6
testl %r15d, %r15d
jne 0x6e08
shlb $0x3, %r14b
jmp 0x6df5
testl %r14d, %r14d
setne %r14b
shlb $0x4, %r14b
incb %r14b
jmp 0x6df5
testl %r14d, %r14d
setne %r14b
shlb $0x3, %r14b
orb $0x2, %r14b
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x8(%rbx)
movb %r14b, (%rax,%rcx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x563f(%rip), %rdi      # 0xc45a
leaq 0x55b6(%rip), %rsi      # 0xc3d8
leaq 0x5660(%rip), %rcx      # 0xc489
movl $0x4ae, %edx            # imm = 0x4AE
callq 0x1100
// File: /workspace/github_c_makefile_star2_O1/Encryptr[P]O-plus-plus/opp/ir/ir.c
// Function: oppir_eval_jmp
static void oppir_eval_jmp(struct OppIr* ir, struct OppIr_Jmp* jmp)
{
	if (jmp->loc >= ir->offsets.allocated) {
		printf("LABEL REALLOC NEEDED\n");
	}

	if (jmp->type == PURE_JMP)
		IR_EMIT(0xe9);
	else
		IR_EMIT(0x0f);

	switch (jmp->type)
	{
		case TEQEQ:  IR_EMIT(0x84); break;
		case TNOTEQ: IR_EMIT(0x85); break;
		case TGT:    IR_EMIT(0x8f); break;
		case TLE:    IR_EMIT(0x8e); break;
		case TLT:    IR_EMIT(0x8c); break;
		case TGE:    IR_EMIT(0x8d); break;
	}
	ir->offsets.jmp_table[ir->offsets.jmp_idx].loc = ir->code.idx;
	ir->offsets.jmp_table[ir->offsets.jmp_idx].table_pos = jmp->loc;
	IR_EMIT(0x00);
	IR_EMIT(0x00);
	IR_EMIT(0x00);
	IR_EMIT(0x00);

	ir->offsets.jmp_idx++;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl 0x4(%rsi), %eax
cmpq %rax, 0x60(%rdi)
ja 0x6e52
leaq 0x56b6(%rip), %rdi      # 0xc503
callq 0x1060
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
leaq 0x1(%rcx), %rdx
cmpl $0x0, (%r14)
movq %rdx, 0x8(%rbx)
movl $0xe9, %edx
movl $0xf, %esi
cmovel %edx, %esi
movb %sil, (%rax,%rcx)
movl (%r14), %ecx
addl $-0x9, %ecx
cmpl $0x5, %ecx
ja 0x6ea3
shll $0x3, %ecx
movabsq $0x85848d8c8e8f, %rax   # imm = 0x85848D8C8E8F
shrq %cl, %rax
movq (%rbx), %rcx
movq 0x8(%rbx), %rdx
leaq 0x1(%rdx), %rsi
movq %rsi, 0x8(%rbx)
movb %al, (%rcx,%rdx)
movq 0x8(%rbx), %rax
movq 0x78(%rbx), %rcx
movl 0x68(%rbx), %edx
shlq $0x4, %rdx
movq %rax, (%rcx,%rdx)
movl 0x4(%r14), %esi
movl %esi, 0x8(%rcx,%rdx)
movq (%rbx), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, 0x8(%rbx)
xorl %edx, %edx
movb %dl, (%rcx,%rax)
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
leaq 0x1(%rcx), %rsi
movq %rsi, 0x8(%rbx)
movb %dl, (%rax,%rcx)
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
leaq 0x1(%rcx), %rsi
movq %rsi, 0x8(%rbx)
movb %dl, (%rax,%rcx)
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
leaq 0x1(%rcx), %rsi
movq %rsi, 0x8(%rbx)
movb %dl, (%rax,%rcx)
incl 0x68(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/Encryptr[P]O-plus-plus/opp/ir/ir.c
// Function: oppir_push_reg
static enum Regs oppir_push_reg(struct OppIr* ir, enum OppIr_Const_Type type)
{
	int i = (type == IMM_F32 || type == IMM_F64) ? 3 : 0;
	const int max = (i == 3) ? 6 : 3;

	for (i; i < max; i++) {
		if (!regs[i].used) {
			regs[i].used = 1;
			oppir_check_regstack(ir);
			ir->reg_stack.top->reg = regs[i].reg;
			ir->reg_stack.top->type = type;
			ir->reg_stack.top->used = 1;
			ir->reg_stack.top->loc = 0; 
			ir->reg_stack.top->spilled = 0;
			ir->reg_stack.top++;
			return regs[i].reg;
		}
	}

	return oppir_reg_alloc(ir);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movl %esi, %r14d
movq %rdi, %rbx
leal -0xb(%r14), %eax
xorl %ecx, %ecx
cmpl $0x2, %eax
setb %cl
leaq (%rcx,%rcx,2), %rax
leaq (%rcx,%rcx,2), %rcx
addq $0x3, %rcx
movl %eax, %edx
shll $0x4, %edx
leaq 0x91eb(%rip), %rsi      # 0x10130
leaq (%rdx,%rsi), %r15
addq $0xc, %r15
cmpb $0x0, (%r15)
je 0x6f85
incq %rax
addq $0x10, %r15
cmpq %rcx, %rax
jb 0x6f4d
movq 0x38(%rbx), %r12
movq 0x40(%rbx), %rax
xorl %r15d, %r15d
cmpq %rax, %r12
jae 0x6fb6
cmpb $0x1, 0xc(%r12)
jne 0x6f7f
cmpb $0x0, 0xd(%r12)
je 0x6ff6
addq $0x10, %r12
jmp 0x6f6a
movb $0x1, (%r15)
movq %rbx, %rdi
callq 0x7181
movl -0xc(%r15), %ebp
movq 0x40(%rbx), %rax
movl %ebp, (%rax)
movl %r14d, 0x4(%rax)
movw $0x1, 0xc(%rax)
movl $0x0, 0x8(%rax)
addq $0x10, %rax
movq %rax, 0x40(%rbx)
jmp 0x6fe7
xorl %r14d, %r14d
xorl %ebp, %ebp
leal -0xd(%r15), %eax
cmpl $-0x2, %eax
movl $0x9, %eax
cmovael %r15d, %eax
leaq 0x8(%rsp), %rdx
movl $0x8, (%rdx)
movl %r14d, 0x8(%rdx)
movl %eax, 0x10(%rdx)
movq %rbx, %rdi
movl %ebp, %esi
callq 0x7255
movl %ebp, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movb $0x1, 0xd(%r12)
movq %rbx, %rdi
callq 0x71c9
movl %eax, %r14d
movl %eax, 0x8(%r12)
movl (%r12), %ebp
movl 0x4(%r12), %r15d
movq %rbx, %rdi
callq 0x7181
movl (%r12), %eax
movq 0x40(%rbx), %rcx
movl %eax, (%rcx)
movw $0x1, 0xc(%rcx)
movl $0x0, 0x8(%rcx)
movl 0x4(%r12), %eax
movl %eax, 0x4(%rcx)
addq $0x10, %rcx
movq %rcx, 0x40(%rbx)
jmp 0x6fbb
// File: /workspace/github_c_makefile_star2_O1/Encryptr[P]O-plus-plus/opp/ir/ir.c
// Function: oppir_write_const
static void oppir_write_const(struct OppIr* ir, struct OppIr_Value* imm)
{
	switch (imm->type)
	{
		case IMM_U64:
		case IMM_I64: 
		{
			oppir_check_realloc(ir, 8); 
			ir->code.bytes[ir->code.idx++] = imm->imm_i64 & 0xFF;
			for (int i = 8; i <= 56; i += 8) 
				ir->code.bytes[ir->code.idx++] = (imm->imm_i64 >> i) & 0xFF;
			break;
		}

		case IMM_I32: {
			oppir_check_realloc(ir, 4); 
			ir->code.bytes[ir->code.idx++] = imm->imm_i32 & 0xFF;
			for (int i = 8; i <= 24; i += 8) 
				ir->code.bytes[ir->code.idx++] = (imm->imm_i32 >> i) & 0xFF;
			break;
		}

		case IMM_I8: {
			oppir_check_realloc(ir, 1);
			ir->code.bytes[ir->code.idx++] = imm->imm_i8;
			break;
		}

		default: break;
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl (%rsi), %eax
leal -0x9(%rax), %ecx
cmpl $0x2, %ecx
jb 0x710c
cmpl $0x4, %eax
je 0x7156
cmpl $0x8, %eax
jne 0x7179
movq %rbx, %rdi
movl $0x4, %esi
callq 0x686f
movb 0x8(%r14), %al
movq (%rbx), %rcx
movq 0x8(%rbx), %rdx
leaq 0x1(%rdx), %rsi
movq %rsi, 0x8(%rbx)
movb %al, (%rcx,%rdx)
xorl %ecx, %ecx
addl $0x8, %ecx
movl 0x8(%r14), %eax
sarl %cl, %eax
movq (%rbx), %rdx
movq 0x8(%rbx), %rsi
leaq 0x1(%rsi), %rdi
movq %rdi, 0x8(%rbx)
movb %al, (%rdx,%rsi)
cmpl $0x11, %ecx
jb 0x70ea
jmp 0x7179
movq %rbx, %rdi
movl $0x8, %esi
callq 0x686f
movb 0x8(%r14), %al
movq (%rbx), %rcx
movq 0x8(%rbx), %rdx
leaq 0x1(%rdx), %rsi
movq %rsi, 0x8(%rbx)
movb %al, (%rcx,%rdx)
xorl %ecx, %ecx
addq $0x8, %rcx
movq 0x8(%r14), %rax
sarq %cl, %rax
movq (%rbx), %rdx
movq 0x8(%rbx), %rsi
leaq 0x1(%rsi), %rdi
movq %rdi, 0x8(%rbx)
movb %al, (%rdx,%rsi)
cmpq $0x31, %rcx
jb 0x7131
jmp 0x7179
movq %rbx, %rdi
movl $0x1, %esi
callq 0x686f
movb 0x8(%r14), %al
movq (%rbx), %rcx
movq 0x8(%rbx), %rdx
leaq 0x1(%rdx), %rsi
movq %rsi, 0x8(%rbx)
movb %al, (%rcx,%rdx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/Encryptr[P]O-plus-plus/opp/ir/ir.c
// Function: oppir_check_regstack
static void oppir_check_regstack(struct OppIr* ir)
{
	if (ir->reg_stack.top >= (ir->reg_stack.stack + ir->reg_stack.allocated)) {
		ir->reg_stack.stack = (struct Register*)
				realloc(ir->reg_stack.stack, (16+ir->reg_stack.allocated));

		if (ir->reg_stack.stack == NULL)
			INTERNAL_ERROR("Malloc fail");

		ir->reg_stack.allocated += 16;
	}
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x30(%rdi), %rsi
movq 0x38(%rdi), %rdi
movq %rsi, %rax
shlq $0x4, %rax
addq %rdi, %rax
cmpq %rax, 0x40(%rbx)
jb 0x71c7
addq $0x10, %rsi
callq 0x11a0
movq %rax, 0x38(%rbx)
testq %rax, %rax
jne 0x71c2
leaq 0x3e71(%rip), %rdi      # 0xb027
leaq 0x51db(%rip), %rsi      # 0xc398
callq 0x98fb
addq $0x10, 0x30(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/Encryptr[P]O-plus-plus/opp/ir/ir.c
// Function: oppir_get_spill
static int32_t oppir_get_spill(struct OppIr* ir)
{
	for (unsigned int i = 0; i < ir->regalloc.allocated; i++) {
		if (!ir->regalloc.spills[i].use && ir->regalloc.spills[i].made) {
			ir->regalloc.spills[i].use = 1;
			return ir->regalloc.spills[i].loc;
		}
	}

	if (ir->regalloc.amount == ir->regalloc.allocated)
		INTERNAL_ERROR("OppIR spill limit met");

	ir->local_stack.size += 8;
	ir->local_stack.pos -= 8;
	
	ir->regalloc.spills[ir->regalloc.amount].loc = ir->local_stack.pos;
	ir->regalloc.spills[ir->regalloc.amount].use = 1;
	ir->regalloc.spills[ir->regalloc.amount].made = 1;
	ir->regalloc.amount++;

	return ir->local_stack.pos;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x20(%rdi), %rcx
testq %rcx, %rcx
setne %dl
je 0x7203
movq 0x28(%rbx), %rsi
movl $0x1, %edi
xorl %r8d, %r8d
cmpb $0x0, (%rsi,%r8,8)
jne 0x71f4
cmpb $0x1, 0x1(%rsi,%r8,8)
je 0x7205
movl %edi, %r8d
incl %edi
cmpq %r8, %rcx
seta %dl
ja 0x71e5
jmp 0x720f
jmp 0x720f
movb $0x1, (%rsi,%r8,8)
movl 0x4(%rsi,%r8,8), %eax
testb $0x1, %dl
jne 0x7253
cmpq %rcx, 0x18(%rbx)
jne 0x722d
leaq 0x518c(%rip), %rdi      # 0xc3ad
leaq 0x519b(%rip), %rsi      # 0xc3c3
callq 0x98fb
addl $0x8, 0x48(%rbx)
movl 0x4c(%rbx), %eax
addl $-0x8, %eax
movl %eax, 0x4c(%rbx)
movq 0x18(%rbx), %rcx
movq 0x28(%rbx), %rdx
movl %eax, 0x4(%rdx,%rcx,8)
movw $0x101, (%rdx,%rcx,8)   # imm = 0x101
incq %rcx
movq %rcx, 0x18(%rbx)
popq %rbx
retq