LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/frontend/symbol_table.c
// Function: subtilis_symbol_table_new
subtilis_symbol_table_t *subtilis_symbol_table_new(subtilis_error_t *err)
{
	subtilis_hashtable_t *h;
	subtilis_symbol_table_t *st;

	h = subtilis_hashtable_new(
	    SUBTILIS_CONFIG_ST_SIZE, subtilis_hashtable_djb2,
	    subtilis_hashtable_string_equal, free, prv_symbol_delete, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto on_error;

	st = calloc(sizeof(*st), 1);
	if (!st) {
		subtilis_error_set_oom(err);
		goto on_error;
	}
	st->h = h;
	st->allocated = 0;
	st->max_allocated = 0;
	st->level = 0;

	return st;

on_error:
	subtilis_hashtable_delete(h);

	return NULL;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq -0x41(%rip), %rsi       # 0x2c9f1
leaq -0x24(%rip), %rdx       # 0x2ca15
movq 0x79530(%rip), %rcx     # 0xa5f70
leaq 0x59(%rip), %r8         # 0x2caa0
movl $0x400, %edi            # imm = 0x400
movq %rbx, %r9
callq 0x2c62c
movq %rax, %r14
cmpl $0x0, (%rbx)
je 0x2ca68
movq %r14, %rdi
callq 0x2c6bd
xorl %eax, %eax
jmp 0x2ca81
pushq $0x1
popq %rsi
movl $0x328, %edi            # imm = 0x328
callq 0x12150
testq %rax, %rax
je 0x2ca89
movq %r14, 0x300(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x417f2(%rip), %rdx     # 0x6e282
pushq $0x1
popq %rsi
pushq $0x31
popq %rcx
movq %rbx, %rdi
callq 0x1429e
jmp 0x2ca5c
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/frontend/symbol_table.c
// Function: prv_symbol_delete
static void prv_symbol_delete(void *s)
{
	subtilis_symbol_t *sym = s;

	if (!sym)
		return;

	subtilis_type_free(&sym->sub_t);
	subtilis_type_free(&sym->t);
	free(sym);
}

// Assembly:
testq %rdi, %rdi
je 0x2cac7
pushq %rbx
movq %rdi, %rbx
addq $0x150, %rdi            # imm = 0x150
callq 0x2dc7c
leaq 0x8(%rbx), %rdi
callq 0x2dc7c
movq %rbx, %rdi
popq %rbx
jmp 0x122c0
retq
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/frontend/symbol_table.c
// Function: subtilis_symbol_table_delete
void subtilis_symbol_table_delete(subtilis_symbol_table_t *st)
{
	size_t i;

	if (!st)
		return;
	for (i = 0; i < SUBTILIS_SYMBOL_MAX_LEVELS; i++)
		free(st->levels[i].symbols);
	subtilis_hashtable_delete(st->h);
	free(st);
}

// Assembly:
testq %rdi, %rdi
je 0x2cb0b
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x10
popq %r14
cmpq $0x310, %r14            # imm = 0x310
je 0x2caf0
movq (%rbx,%r14), %rdi
callq 0x122c0
addq $0x18, %r14
jmp 0x2cad8
movq 0x300(%rbx), %rdi
callq 0x2c6bd
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x122c0
retq
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/frontend/symbol_table.c
// Function: subtilis_symbol_table_level_up
void subtilis_symbol_table_level_up(subtilis_symbol_table_t *st,
				    subtilis_lexer_t *l, subtilis_error_t *err)
{
	if (st->level >= SUBTILIS_SYMBOL_MAX_LEVELS) {
		subtilis_error_set_too_many_blocks(err, l->stream->name,
						   l->line);
		return;
	}

	st->level++;
}

// Assembly:
movq 0x318(%rdi), %rax
cmpq $0x20, %rax
jb 0x2cb39
movq 0x30(%rsi), %rax
movl 0x38(%rsi), %ecx
leaq 0x4175b(%rip), %r8      # 0x6e282
pushq $0x40
popq %rsi
pushq $0x66
popq %r9
movq %rdx, %rdi
movq %rax, %rdx
jmp 0x142c0
incq %rax
movq %rax, 0x318(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/frontend/symbol_table.c
// Function: subtilis_symbol_table_level_down
void subtilis_symbol_table_level_down(subtilis_symbol_table_t *st,
				      subtilis_error_t *err)
{
	size_t i;
	subtilis_symbol_level_t *level;

	if (st->level == 0) {
		subtilis_error_set_assertion_failed(err);
		return;
	}

	level = &st->levels[st->level];
	for (i = 0; i < level->size; i++)
		subtilis_symbol_table_remove(st, level->symbols[i]->key);
	level->size = 0;
	st->level--;
}

// Assembly:
movq 0x318(%rdi), %rax
testq %rax, %rax
je 0x2cb94
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
imulq $0x18, %rax, %r14
addq %rdi, %r14
xorl %r15d, %r15d
cmpq (%r14), %r15
jae 0x2cb83
movq 0x10(%r14), %rax
movq (%rax,%r15,8), %rax
movq 0x298(%rax), %rsi
movq %rbx, %rdi
callq 0x2cbab
incq %r15
jmp 0x2cb62
andq $0x0, (%r14)
decq 0x318(%rbx)
popq %rbx
popq %r14
popq %r15
retq
leaq 0x416e7(%rip), %rdx     # 0x6e282
pushq $0xf
popq %rax
pushq $0x74
popq %rcx
movq %rsi, %rdi
movl %eax, %esi
jmp 0x1429e
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/frontend/symbol_table.c
// Function: subtilis_symbol_table_create_local_buf
const subtilis_symbol_t *
subtilis_symbol_table_create_local_buf(subtilis_symbol_table_t *st, size_t size,
				       subtilis_error_t *err)
{
	char buf[64];

	/*
	 * Everything on the stack needs to be 32 bit word aligned.
	 */

	if (size & 3) {
		subtilis_error_set_assertion_failed(err);
		return NULL;
	}

	/*
	 * Subtilis identifiers cannot start with a number so there'll be no
	 * clash here.
	 */

	sprintf(buf, "%zu", st->tmp_count++);
	return prv_symbol_table_insert(st, buf, &subtilis_type_local_buffer,
				       NULL, size, 0, false, err);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %rbx
movq %rsi, %r14
testb $0x3, %r14b
je 0x2ce45
leaq 0x41451(%rip), %rdx     # 0x6e282
pushq $0xf
popq %rsi
movq %rbx, %rdi
movl $0x10e, %ecx            # imm = 0x10E
callq 0x1429e
xorl %eax, %eax
jmp 0x2ce8d
movq %rdi, %r15
movq 0x320(%rdi), %rdx
leaq 0x1(%rdx), %rax
movq %rax, 0x320(%rdi)
leaq 0x4139f(%rip), %rsi     # 0x6e200
movq %rsp, %r12
movq %r12, %rdi
xorl %eax, %eax
callq 0x12280
leaq 0x41f73(%rip), %rdx     # 0x6ede8
movq %r15, %rdi
movq %r12, %rsi
xorl %ecx, %ecx
movq %r14, %r8
xorl %r9d, %r9d
pushq %rbx
pushq $0x0
callq 0x2cc13
popq %rcx
popq %rdx
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/frontend/symbol_table.c
// Function: subtilis_symbol_table_insert_tmp
const subtilis_symbol_t *
subtilis_symbol_table_insert_tmp(subtilis_symbol_table_t *st,
				 const subtilis_type_t *id_type,
				 char **tmp_name, subtilis_error_t *err)
{
	const subtilis_symbol_t *s;
	char *name = NULL;
	char buf[64];

	/*
	 * Subtilis identifiers cannot start with a number so there'll be no
	 * clash here.
	 */

	sprintf(buf, "%zu", st->tmp_count++);
	if (tmp_name) {
		name = malloc(strlen(buf) + 1);
		if (!name) {
			subtilis_error_set_oom(err);
			return NULL;
		}
		strcpy(name, buf);
	}

	s = subtilis_symbol_table_insert(st, buf, id_type, err);
	if (err->type != SUBTILIS_ERROR_OK) {
		free(name);
		return NULL;
	}

	if (tmp_name)
		*tmp_name = name;

	return s;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rcx, %r14
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r12
movq 0x320(%rdi), %rdx
leaq 0x1(%rdx), %rax
movq %rax, 0x320(%rdi)
leaq 0x412eb(%rip), %rsi     # 0x6e200
xorl %r13d, %r13d
movq %rsp, %rdi
xorl %eax, %eax
callq 0x12280
testq %rbx, %rbx
je 0x2cf4b
movq %rsp, %rdi
callq 0x120f0
leaq 0x1(%rax), %rdi
callq 0x121d0
testq %rax, %rax
je 0x2cf76
movq %rax, %r13
movq %rsp, %rsi
movq %rax, %rdi
callq 0x12070
movq %rsp, %rsi
movq %r12, %rdi
movq %r15, %rdx
movq %r14, %rcx
callq 0x2cbb7
cmpl $0x0, (%r14)
je 0x2cf6c
movq %r13, %rdi
callq 0x122c0
jmp 0x2cf8d
testq %rbx, %rbx
je 0x2cf8f
movq %r13, (%rbx)
jmp 0x2cf8f
leaq 0x41305(%rip), %rdx     # 0x6e282
pushq $0x1
popq %rsi
movq %r14, %rdi
movl $0x140, %ecx            # imm = 0x140
callq 0x1429e
xorl %eax, %eax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/frontend/symbol_table.c
// Function: subtilis_symbol_table_insert_type
void subtilis_symbol_table_insert_type(subtilis_symbol_table_t *st,
				       const char *name,
				       const subtilis_type_t *type,
				       subtilis_error_t *err)
{
	if (subtilis_hashtable_find(st->h, name)) {
		subtilis_error_set_type_already_defined(err);
		return;
	}
	(void)prv_symbol_table_insert(st, name, &subtilis_type_typedef, type, 0,
				      st->level, false, err);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r14
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r12
movq 0x300(%rdi), %rdi
callq 0x2c748
testq %rax, %rax
je 0x2cfe7
leaq 0x412b6(%rip), %rdx     # 0x6e282
pushq $0x68
popq %rsi
movq %r14, %rdi
movl $0x158, %ecx            # imm = 0x158
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x1429e
movq 0x318(%r12), %r9
andl $0x0, (%rsp)
movq %r14, 0x8(%rsp)
leaq 0x41f31(%rip), %rdx     # 0x6ef30
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rcx
xorl %r8d, %r8d
callq 0x2cc13
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/frontend/symbol_table.c
// Function: subtilis_symbol_table_promote_tmp
const subtilis_symbol_t *subtilis_symbol_table_promote_tmp(
	subtilis_symbol_table_t *st, const subtilis_type_t *id_type,
	const char *tmp_name, const char *new_name, subtilis_error_t *err)
/* clang-format on */

{
	subtilis_symbol_t *s;
	char *name = NULL;

	s = subtilis_hashtable_extract(st->h, tmp_name);
	if (!s) {
		subtilis_error_set_assertion_failed(err);
		return NULL;
	}

	if (!subtilis_type_eq(id_type, &s->t)) {
		subtilis_error_set_assertion_failed(err);
		return NULL;
	}

	name = malloc(strlen(new_name) + 1);
	if (!name) {
		subtilis_error_set_oom(err);
		return NULL;
	}
	strcpy(name, new_name);
	s->key = name;

	(void)subtilis_hashtable_insert(st->h, name, s, err);
	if (err->type != SUBTILIS_ERROR_OK) {
		free(s);
		free(name);
		return NULL;
	}

	return s;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r8, %r14
movq %rcx, %r12
movq %rsi, %r13
movq %rdi, %r15
movq 0x300(%rdi), %rdi
movq %rdx, %rsi
callq 0x2c8b4
testq %rax, %rax
je 0x2d0b0
movq %rax, %rbx
leaq 0x8(%rax), %rsi
movq %r13, %rdi
callq 0x2d844
testb %al, %al
je 0x2d0c4
movq %r12, %rdi
callq 0x120f0
leaq 0x1(%rax), %rdi
callq 0x121d0
testq %rax, %rax
je 0x2d0d8
movq %rax, %r13
movq %rax, %rdi
movq %r12, %rsi
callq 0x12070
movq %r13, 0x298(%rbx)
movq 0x300(%r15), %rdi
movq %r13, %rsi
movq %rbx, %rdx
movq %r14, %rcx
callq 0x2c7ad
cmpl $0x0, (%r14)
je 0x2d0f1
movq %rbx, %rdi
callq 0x122c0
movq %r13, %rdi
callq 0x122c0
jmp 0x2d0ef
leaq 0x411cb(%rip), %rdx     # 0x6e282
pushq $0xf
popq %rsi
movq %r14, %rdi
movl $0x16b, %ecx            # imm = 0x16B
jmp 0x2d0ea
leaq 0x411b7(%rip), %rdx     # 0x6e282
pushq $0xf
popq %rsi
movq %r14, %rdi
movl $0x170, %ecx            # imm = 0x170
jmp 0x2d0ea
leaq 0x411a3(%rip), %rdx     # 0x6e282
pushq $0x1
popq %rsi
movq %r14, %rdi
movl $0x176, %ecx            # imm = 0x176
callq 0x1429e
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/frontend/symbol_table.c
// Function: subtilis_symbol_table_insert_reg
const subtilis_symbol_t *
subtilis_symbol_table_insert_reg(subtilis_symbol_table_t *st, const char *key,
				 const subtilis_type_t *id_type, size_t reg_num,
				 subtilis_error_t *err)
{
	subtilis_symbol_t *sym;
	size_t size;
	char *key_dup = NULL;

	sym = subtilis_hashtable_find(st->h, key);
	if (sym)
		return sym;

	key_dup = malloc(strlen(key) + 1);
	if (!key_dup) {
		subtilis_error_set_oom(err);
		goto on_error;
	}
	(void)strcpy(key_dup, key);

	size = subtilis_type_if_size(id_type, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto on_error;
	sym = prv_symbol_new(key_dup, reg_num, id_type, NULL, size, true, false,
			     err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto on_error;

	prv_ensure_symbol_level(st, st->level, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto on_error;
	st->levels[st->level].symbols[st->levels[st->level].size++] = sym;

	(void)subtilis_hashtable_insert(st->h, key_dup, sym, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto on_error;

	return sym;

on_error:
	free(key_dup);
	prv_symbol_delete(sym);
	return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %r14
movq %rcx, %rbp
movq %rdx, %r13
movq %rsi, %rbx
movq %rdi, %r15
movq 0x300(%rdi), %rdi
callq 0x2c748
movq %rax, %r12
testq %rax, %rax
jne 0x2d199
movq %rbx, %rdi
callq 0x120f0
leaq 0x1(%rax), %rdi
callq 0x121d0
movq %rax, %r12
testq %rax, %rax
je 0x2d169
movq %r12, %rdi
movq %rbx, %rsi
callq 0x12070
movq %r13, %rdi
movq %r14, %rsi
callq 0x33df0
cmpl $0x0, (%r14)
je 0x2d1ab
movq %r12, %rbx
jmp 0x2d183
movq %r12, %rbx
leaq 0x4110f(%rip), %rdx     # 0x6e282
pushq $0x1
popq %rsi
movq %r14, %rdi
movl $0x195, %ecx            # imm = 0x195
callq 0x1429e
xorl %r12d, %r12d
movq %rbx, %rdi
callq 0x122c0
movq %r12, %rdi
callq 0x2caa0
xorl %r12d, %r12d
movq %r12, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
andl $0x0, (%rsp)
movq %r14, 0x8(%rsp)
pushq $0x1
popq %r9
movq %r12, %rbx
movq %r12, %rdi
movq %rbp, %rsi
movq %r13, %rdx
xorl %ecx, %ecx
movq %rax, %r8
callq 0x2d230
movq %rax, %r12
cmpl $0x0, (%r14)
jne 0x2d186
movq 0x318(%r15), %rsi
movq %r15, %rdi
movq %r14, %rdx
callq 0x2d317
cmpl $0x0, (%r14)
jne 0x2d186
imulq $0x18, 0x318(%r15), %rax
movq (%r15,%rax), %rcx
movq 0x10(%r15,%rax), %rdx
leaq 0x1(%rcx), %rsi
movq %rsi, (%r15,%rax)
movq %r12, (%rdx,%rcx,8)
movq 0x300(%r15), %rdi
movq %rbx, %rsi
movq %r12, %rdx
movq %r14, %rcx
callq 0x2c7ad
cmpl $0x0, (%r14)
jne 0x2d186
jmp 0x2d199
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/frontend/symbol_table.c
// Function: prv_symbol_new
static subtilis_symbol_t *prv_symbol_new(const char *key, size_t loc,
					 const subtilis_type_t *id_type,
					 const subtilis_type_t *sub_type,
					 size_t size, bool is_reg, bool no_rc,
					 subtilis_error_t *err)
{
	subtilis_symbol_t *sym;

	sym = malloc(sizeof(*sym));
	if (!sym) {
		subtilis_error_set_oom(err);
		return NULL;
	}

	subtilis_type_init_copy(&sym->t, id_type, err);
	if (err->type != SUBTILIS_ERROR_OK) {
		free(sym);
		return NULL;
	}

	sym->sub_t.type = SUBTILIS_TYPE_VOID;
	if (sub_type) {
		subtilis_type_init_copy(&sym->sub_t, sub_type, err);
		if (err->type != SUBTILIS_ERROR_OK) {
			prv_symbol_delete(sym);
			return NULL;
		}
	}

	sym->size = size;
	sym->key = key;
	sym->loc = loc;
	sym->is_reg = is_reg;
	sym->no_rc = no_rc;

	return sym;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, 0xc(%rsp)
movq %r8, 0x10(%rsp)
movq %rcx, %rbp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movq 0x58(%rsp), %r13
movl $0x2b0, %edi            # imm = 0x2B0
callq 0x121d0
testq %rax, %rax
je 0x2d28b
movq %rax, %rbx
leaq 0x8(%rax), %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x2db73
cmpl $0x0, (%r13)
je 0x2d2b6
movq %rbx, %rdi
callq 0x122c0
jmp 0x2d2a2
leaq 0x40ff0(%rip), %rdx     # 0x6e282
pushq $0x1
popq %rsi
movq %r13, %rdi
movl $0x89, %ecx
callq 0x1429e
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x8, 0x150(%rbx)
testq %rbp, %rbp
je 0x2d2eb
movq %rbx, %rdi
addq $0x150, %rdi            # imm = 0x150
movq %rbp, %rsi
movq %r13, %rdx
callq 0x2db73
cmpl $0x0, (%r13)
je 0x2d2eb
movq %rbx, %rdi
callq 0x2caa0
jmp 0x2d2a2
movb 0x50(%rsp), %al
movq 0x10(%rsp), %rcx
movq %rcx, 0x2a0(%rbx)
movq %r12, 0x298(%rbx)
movq %r15, (%rbx)
movl 0xc(%rsp), %ecx
movb %cl, 0x2a8(%rbx)
movb %al, 0x2a9(%rbx)
jmp 0x2d2a4
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/frontend/symbol_table.c
// Function: prv_ensure_symbol_level
static void prv_ensure_symbol_level(subtilis_symbol_table_t *st,
				    size_t level_idx, subtilis_error_t *err)
{
	size_t new_size;
	subtilis_symbol_level_t *level = &st->levels[level_idx];
	const subtilis_symbol_t **new_symbols;

	if (level->size < level->max_size)
		return;

	new_size = level->size + SUBTILIS_SYMBOL_MAX_LEVELS;
	new_symbols = realloc(level->symbols, new_size * sizeof(*new_symbols));
	if (!new_symbols) {
		subtilis_error_set_oom(err);
		return;
	}
	level->symbols = new_symbols;
	level->max_size = new_size;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
imulq $0x18, %rsi, %rax
movq (%rdi,%rax), %r15
cmpq 0x8(%rdi,%rax), %r15
jb 0x2d356
movq %rdx, %rbx
movq %rdi, %r14
addq %rax, %r14
movq 0x10(%r14), %rdi
leaq 0x100(,%r15,8), %rsi
callq 0x12210
testq %rax, %rax
je 0x2d35c
addq $0x20, %r15
movq %rax, 0x10(%r14)
movq %r15, 0x8(%r14)
popq %rbx
popq %r14
popq %r15
retq
leaq 0x40f1f(%rip), %rdx     # 0x6e282
pushq $0x1
popq %rsi
pushq $0x5a
popq %rcx
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x1429e
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/common/constant_pool.c
// Function: subtilis_constant_pool_new
subtilis_constant_pool_t *subtilis_constant_pool_new(subtilis_error_t *err)
{
	subtilis_constant_pool_t *pool;

	pool = calloc(1, sizeof(*pool));
	if (!pool) {
		subtilis_error_set_oom(err);
		return NULL;
	}
	pool->ref = 1;
	return pool;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
pushq $0x1
popq %rdi
pushq $0x20
popq %rsi
callq 0x12150
movq %rax, %rbx
testq %rax, %rax
je 0x2d3d0
movq $0x1, 0x18(%rbx)
jmp 0x2d3e5
leaq 0x40ec3(%rip), %rdx     # 0x6e29a
pushq $0x1
popq %rsi
pushq $0x1c
popq %rcx
movq %r14, %rdi
callq 0x1429e
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/common/constant_pool.c
// Function: subtilis_constant_pool_delete
void subtilis_constant_pool_delete(subtilis_constant_pool_t *pool)
{
	size_t i;

	if (!pool)
		return;

	if (pool->ref > 1) {
		pool->ref--;
		return;
	}

	for (i = 0; i < pool->size; i++)
		free(pool->data[i].data);
	free(pool->data);
	free(pool);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x2d416
movq %rdi, %rbx
movq 0x18(%rdi), %rax
cmpq $0x1, %rax
jbe 0x2d41c
decq %rax
movq %rax, 0x18(%rbx)
popq %rbx
popq %r14
popq %r15
retq
pushq $0x8
popq %r14
xorl %r15d, %r15d
movq 0x10(%rbx), %rdi
cmpq (%rbx), %r15
jae 0x2d43e
movq (%rdi,%r14), %rdi
callq 0x122c0
incq %r15
addq $0x18, %r14
jmp 0x2d423
callq 0x122c0
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x122c0
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/common/constant_pool.c
// Function: subtilis_constant_pool_dump
void subtilis_constant_pool_dump(subtilis_constant_pool_t *pool)
{
	size_t i;
	size_t j;
	size_t count;

	for (i = 0; i < pool->size; i++) {
		printf("[%zu]:\n", i);
		count = 0;
		for (;;) {
			for (j = 0; j < 16; j++) {
				if (count == pool->data[i].data_size)
					goto next;
				printf("%x ", pool->data[i].data[count++]);
			}
			printf("\n");
		}
	/* clang-format off */
next:
	/* clang-format off */

		printf("\n");
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x40e54(%rip), %r15     # 0x6e2b9
xorl %r14d, %r14d
cmpq (%rbx), %r14
jae 0x2d4d9
leaq 0x40e3d(%rip), %rdi     # 0x6e2b1
movq %r14, %rsi
xorl %eax, %eax
callq 0x12110
movq %r14, (%rsp)
imulq $0x18, %r14, %r14
xorl %ebp, %ebp
movq %rbp, %r13
addq $0x10, %rbp
pushq $0x10
popq %r12
subq $0x1, %r12
jb 0x2d4be
movq 0x10(%rbx), %rax
cmpq (%rax,%r14), %r13
je 0x2d4c8
addq %r14, %rax
movq 0x8(%rax), %rax
movzbl (%rax,%r13), %esi
incq %r13
movq %r15, %rdi
xorl %eax, %eax
callq 0x12110
jmp 0x2d493
pushq $0xa
popq %rdi
callq 0x12030
jmp 0x2d488
pushq $0xa
popq %rdi
callq 0x12030
movq (%rsp), %r14
incq %r14
jmp 0x2d468
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/common/constant_pool.c
// Function: subtilis_constant_pool_add
size_t subtilis_constant_pool_add(subtilis_constant_pool_t *pool, uint8_t *data,
				  size_t data_size, bool dbl,
				  subtilis_error_t *err)
{
	size_t i;
	size_t new_max_size;
	subtilis_constant_data_t *new_data;

	for (i = 0; i < pool->size; i++) {
		if (dbl != pool->data[i].dbl)
			continue;
		if (data_size != pool->data[i].data_size)
			continue;
		if (!memcmp(data, pool->data[i].data, data_size)) {
			free(data);
			return i;
		}
	}

	if (pool->size == pool->max_size) {
		new_max_size = pool->size + SUBTILIS_CONFIG_CONSTANT_POOL_GRAN;
		new_data =
		    realloc(pool->data, sizeof(*new_data) * new_max_size);
		if (!new_data) {
			subtilis_error_set_oom(err);
			return SIZE_MAX;
		}
		pool->max_size = new_max_size;
		pool->data = new_data;
	}

	pool->data[pool->size].data = data;
	pool->data[pool->size].dbl = dbl;
	pool->data[pool->size++].data_size = data_size;

	return i;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, 0x10(%rsp)
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, 0x8(%rsp)
movq %rdi, %r15
movq (%rdi), %r13
pushq $0x10
popq %r12
xorl %ebx, %ebx
cmpq %rbx, %r13
je 0x2d546
movq 0x10(%r15), %rax
cmpb %bpl, (%rax,%r12)
jne 0x2d53d
cmpq %r14, -0x10(%rax,%r12)
jne 0x2d53d
movq -0x8(%rax,%r12), %rsi
movq 0x8(%rsp), %rdi
movq %r14, %rdx
callq 0x121e0
testl %eax, %eax
je 0x2d594
incq %rbx
addq $0x18, %r12
jmp 0x2d511
movq 0x10(%r15), %rax
cmpq 0x8(%r15), %r13
jne 0x2d572
leaq 0x20(%r13), %rbx
imulq $0x18, %rbx, %rsi
movq %rax, %rdi
callq 0x12210
testq %rax, %rax
je 0x2d5a3
movq %rbx, 0x8(%r15)
movq %rax, 0x10(%r15)
movq (%r15), %rcx
jmp 0x2d575
movq %r13, %rcx
imulq $0x18, %rcx, %rdx
movq 0x8(%rsp), %rsi
movq %rsi, 0x8(%rax,%rdx)
movb %bpl, 0x10(%rax,%rdx)
incq %rcx
movq %rcx, (%r15)
movq %r14, (%rax,%rdx)
jmp 0x2d5be
movq 0x8(%rsp), %rdi
callq 0x122c0
movq %rbx, %r13
jmp 0x2d5be
leaq 0x40cf0(%rip), %rdx     # 0x6e29a
pushq $0x1
popq %rsi
pushq $0x6d
popq %rcx
movq 0x10(%rsp), %rdi
callq 0x1429e
pushq $-0x1
popq %r13
movq %r13, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/common/constant_pool.c
// Function: subtilis_constant_pool_mem_size
size_t subtilis_constant_pool_mem_size(subtilis_constant_pool_t *pool,
				       size_t **ptrs, subtilis_error_t *err)
{
	size_t i;
	size_t mem_size = 0;
	size_t *constants;

	constants = malloc(sizeof(*constants) * pool->size);
	if (!constants) {
		subtilis_error_set_oom(err);
		return 0;
	}

	for (i = 0; i < pool->size; i++) {
		constants[i] = mem_size;
		mem_size += pool->data[i].data_size;
	}

	*ptrs = constants;

	return mem_size;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %r12
leaq (,%r12,8), %rdi
callq 0x121d0
testq %rax, %rax
je 0x2d61b
xorl %edx, %edx
xorl %esi, %esi
xorl %ecx, %ecx
cmpq %rsi, %r12
je 0x2d616
movq %rcx, (%rax,%rsi,8)
movq 0x10(%r14), %rdi
addq (%rdi,%rdx), %rcx
incq %rsi
addq $0x18, %rdx
jmp 0x2d5fc
movq %rax, (%rbx)
jmp 0x2d634
leaq 0x40c78(%rip), %rdx     # 0x6e29a
pushq $0x1
popq %rsi
movq %r15, %rdi
movl $0x84, %ecx
callq 0x1429e
xorl %ecx, %ecx
movq %rcx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/common/string_pool.c
// Function: subtilis_string_pool_new
subtilis_string_pool_t *subtilis_string_pool_new(subtilis_error_t *err)
{
	subtilis_string_pool_t *pool;

	pool = calloc(1, sizeof(*pool));
	if (!pool)
		subtilis_error_set_oom(err);
	pool->ref = 1;
	return pool;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
pushq $0x1
popq %rdi
pushq $0x20
popq %rsi
callq 0x12150
movq %rax, %rbx
testq %rax, %rax
jne 0x2d673
leaq 0x40c58(%rip), %rdx     # 0x6e2bd
pushq $0x1
popq %rsi
pushq $0x1c
popq %rcx
movq %r14, %rdi
callq 0x1429e
movq $0x1, 0x18(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/common/string_pool.c
// Function: subtilis_string_pool_find
bool subtilis_string_pool_find(subtilis_string_pool_t *pool, const char *str,
			       size_t *index)
{
	size_t i;

	for (i = 0; i < pool->length; i++) {
		if (!strcmp(pool->strings[i], str))
			break;
	}

	if (i == pool->length)
		return false;

	*index = i;
	return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x8(%rdi), %r13
xorl %r12d, %r12d
cmpq %r12, %r13
je 0x2d6c9
movq (%r15), %rax
movq (%rax,%r12,8), %rdi
movq %r14, %rsi
callq 0x12160
testl %eax, %eax
je 0x2d6c4
incq %r12
jmp 0x2d6a7
cmpq %r12, %r13
jne 0x2d6cd
xorl %eax, %eax
jmp 0x2d6d2
movq %r12, (%rbx)
movb $0x1, %al
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/common/string_pool.c
// Function: subtilis_string_pool_register
size_t subtilis_string_pool_register(subtilis_string_pool_t *pool,
				     const char *str, subtilis_error_t *err)
{
	size_t i;
	char **new_pool;
	size_t new_max;
	char *str_dup = NULL;

	if (subtilis_string_pool_find(pool, str, &i))
		return i;

	i = pool->length;
	str_dup = malloc(strlen(str) + 1);
	if (!str_dup) {
		subtilis_error_set_oom(err);
		return 0;
	}
	(void)strcpy(str_dup, str);

	if (pool->length == pool->max_length) {
		new_max = pool->max_length + SUBTILIS_CONFIG_PROC_GRAN;
		new_pool =
		    realloc(pool->strings, new_max * sizeof(*pool->strings));
		if (!new_pool) {
			subtilis_error_set_oom(err);
			goto cleanup;
		}
		pool->max_length = new_max;
		pool->strings = new_pool;
	}

	pool->strings[i] = str_dup;
	pool->length++;

	return i;

cleanup:

	free(str_dup);

	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r15
movq %rsi, %r13
movq %rdi, %r14
leaq 0x8(%rsp), %rdx
callq 0x2d68e
testb %al, %al
je 0x2d70a
movq 0x8(%rsp), %rbx
jmp 0x2d7a7
movq 0x8(%r14), %rbx
movq %r13, %rdi
callq 0x120f0
leaq 0x1(%rax), %rdi
callq 0x121d0
testq %rax, %rax
je 0x2d761
movq %rax, %r12
movq %rax, %rdi
movq %r13, %rsi
callq 0x12070
movq (%r14), %rax
cmpq 0x10(%r14), %rbx
jne 0x2d778
leaq 0x200(,%rbx,8), %rsi
movq %rax, %rdi
callq 0x12210
testq %rax, %rax
je 0x2d788
leaq 0x40(%rbx), %rcx
movq %rcx, 0x10(%r14)
movq %rax, (%r14)
movq 0x8(%r14), %rcx
jmp 0x2d77b
leaq 0x40b55(%rip), %rdx     # 0x6e2bd
pushq $0x1
popq %rsi
pushq $0x46
popq %rcx
movq %r15, %rdi
callq 0x1429e
jmp 0x2d7a5
movq %rbx, %rcx
movq %r12, (%rax,%rbx,8)
incq %rcx
movq %rcx, 0x8(%r14)
jmp 0x2d7a7
leaq 0x40b2e(%rip), %rdx     # 0x6e2bd
pushq $0x1
popq %rsi
pushq $0x50
popq %rcx
movq %r15, %rdi
callq 0x1429e
movq %r12, %rdi
callq 0x122c0
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/common/string_pool.c
// Function: subtilis_string_pool_delete
void subtilis_string_pool_delete(subtilis_string_pool_t *pool)
{
	size_t i;

	if (!pool)
		return;

	if (pool->ref > 1) {
		pool->ref--;
		return;
	}

	for (i = 0; i < pool->length; i++)
		free(pool->strings[i]);
	free(pool->strings);
	free(pool);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x2d7d5
movq %rdi, %rbx
movq 0x18(%rdi), %rax
cmpq $0x1, %rax
jbe 0x2d7dd
decq %rax
movq %rax, 0x18(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
xorl %r14d, %r14d
movq (%rbx), %rdi
cmpq 0x8(%rbx), %r14
jae 0x2d7f7
movq (%rdi,%r14,8), %rdi
callq 0x122c0
incq %r14
jmp 0x2d7e0
callq 0x122c0
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x122c0
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/common/type.c
// Function: subtilis_type_eq
bool subtilis_type_eq(const subtilis_type_t *a, const subtilis_type_t *b)
{
	if (a->type != b->type)
		return false;
	switch (a->type) {
	case SUBTILIS_TYPE_ARRAY_REAL:
	case SUBTILIS_TYPE_ARRAY_INTEGER:
	case SUBTILIS_TYPE_ARRAY_STRING:
	case SUBTILIS_TYPE_ARRAY_BYTE:
	case SUBTILIS_TYPE_ARRAY_FN:
	case SUBTILIS_TYPE_VECTOR_FN: /* fn vectors need extra checks */
	case SUBTILIS_TYPE_ARRAY_REC:
	case SUBTILIS_TYPE_VECTOR_REC: /* rec vectors need extra checks */
		return prv_array_type_match(a, b);
	case SUBTILIS_TYPE_FN:
		return prv_fn_type_match(&a->params.fn, &b->params.fn);
	case SUBTILIS_TYPE_REC:
		return prv_rec_type_match(&a->params.rec, &b->params.rec);
	default:
		return true;
	}
}

// Assembly:
movl (%rdi), %ecx
cmpl (%rsi), %ecx
jne 0x2d883
movb $0x1, %al
cmpl $0x16, %ecx
ja 0x2d885
movl $0x30fc00, %edx         # imm = 0x30FC00
btl %ecx, %edx
jae 0x2d886
movslq 0x8(%rdi), %rdx
cmpl 0x8(%rsi), %edx
jne 0x2d883
xorl %r8d, %r8d
cmpq %r8, %rdx
je 0x2d89d
movl 0xc(%rdi,%r8,4), %r9d
cmpl $-0x1, %r9d
je 0x2d87e
cmpl 0xc(%rsi,%r8,4), %r9d
jne 0x2d883
incq %r8
jmp 0x2d867
xorl %eax, %eax
retq
cmpl $0x9, %ecx
je 0x2d8bf
cmpl $0x16, %ecx
jne 0x2d885
addq $0x8, %rdi
addq $0x8, %rsi
jmp 0x2d92b
addl $-0xe, %ecx
cmpl $0x7, %ecx
ja 0x2d885
leaq 0x40a34(%rip), %rdx     # 0x6e2e0
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
addq $0x38, %rdi
addq $0x38, %rsi
jmp 0x2d8d3
addq $0x8, %rdi
addq $0x8, %rsi
jmp 0x2d8d3
addq $0x38, %rdi
addq $0x38, %rsi
jmp 0x2d92b
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/common/type.c
// Function: prv_fn_type_match
static bool prv_fn_type_match(const subtilis_type_fn_t *t1,
			      const subtilis_type_fn_t *t2)
{
	size_t i;

	if (!subtilis_type_eq(t1->ret_val, t2->ret_val))
		return false;

	if (t1->num_params != t2->num_params)
		return false;

	for (i = 0; i < t1->num_params; i++)
		if (!subtilis_type_eq(t1->params[i], t2->params[i]))
			return false;

	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rdi
movq (%rsi), %rsi
callq 0x2d844
testb %al, %al
je 0x2d91e
movq 0x8(%r14), %r15
cmpq 0x8(%rbx), %r15
jne 0x2d91e
xorl %r12d, %r12d
cmpq %r12, %r15
sete %bpl
je 0x2d920
movq 0x10(%r14,%r12,8), %rdi
movq 0x10(%rbx,%r12,8), %rsi
callq 0x2d844
incq %r12
testb %al, %al
jne 0x2d8fd
jmp 0x2d920
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/common/type.c
// Function: prv_rec_type_match
static bool prv_rec_type_match(const subtilis_type_rec_t *t1,
			       const subtilis_type_rec_t *t2)
{
	size_t i;

	if (strcmp(t1->name, t2->name))
		return false;

	if (t1->num_fields != t2->num_fields)
		return false;

	for (i = 0; i < t1->num_fields; i++) {
		if (strcmp(t1->fields[i].name, t2->fields[i].name))
			return false;
		if (!subtilis_type_eq(&t1->field_types[i], &t2->field_types[i]))
			return false;
	}

	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %rdi
movq 0x8(%rsi), %rsi
callq 0x12160
testl %eax, %eax
jne 0x2d9b1
movq 0x20(%r14), %r12
cmpq 0x20(%rbx), %r12
jne 0x2d9b1
incq %r12
xorl %r15d, %r15d
xorl %r13d, %r13d
decq %r12
sete %bpl
je 0x2d9b3
movq 0x18(%r14), %rax
movq (%rax,%r13), %rdi
movq 0x18(%rbx), %rax
movq (%rax,%r13), %rsi
callq 0x12160
testl %eax, %eax
jne 0x2d9b3
addq $0x18, %r13
movl %ebp, 0x4(%rsp)
leaq 0x148(%r15), %rbp
movq 0x10(%r14), %rdi
addq %r15, %rdi
addq 0x10(%rbx), %r15
movq %r15, %rsi
callq 0x2d844
movq %rbp, %r15
movl 0x4(%rsp), %ebp
testb %al, %al
jne 0x2d960
jmp 0x2d9b3
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/common/type.c
// Function: subtilis_type_init_copy
void subtilis_type_init_copy(subtilis_type_t *dst, const subtilis_type_t *src,
			     subtilis_error_t *err)
{
	if (src->type == SUBTILIS_TYPE_FN) {
		dst->type = src->type;
		prv_init_copy_fn(&dst->params.fn, &src->params.fn, err);
	} else if (src->type == SUBTILIS_TYPE_REC) {
		dst->type = src->type;
		prv_init_copy_rec(&dst->params.rec, &src->params.rec, err);
	} else if ((src->type == SUBTILIS_TYPE_ARRAY_FN) ||
		   (src->type == SUBTILIS_TYPE_VECTOR_FN)) {
		dst->type = src->type;
		dst->params.array.num_dims = src->params.array.num_dims;
		memcpy(dst->params.array.dims, src->params.array.dims,
		       sizeof(src->params.array.dims));
		prv_init_copy_fn(&dst->params.array.params.fn,
				 &src->params.array.params.fn, err);
	} else if ((src->type == SUBTILIS_TYPE_ARRAY_REC) ||
		   (src->type == SUBTILIS_TYPE_VECTOR_REC)) {
		dst->type = src->type;
		dst->params.array.num_dims = src->params.array.num_dims;
		memcpy(dst->params.array.dims, src->params.array.dims,
		       sizeof(src->params.array.dims));
		prv_init_copy_rec(&dst->params.array.params.rec,
				  &src->params.array.params.rec, err);
	} else {
		*dst = *src;
	}
}

// Assembly:
movl (%rsi), %eax
leal -0x9(%rax), %ecx
cmpl $0xd, %ecx
ja 0x2dbe7
leaq 0x4077c(%rip), %r8      # 0x6e300
movslq (%r8,%rcx,4), %rcx
addq %r8, %rcx
jmpq *%rcx
movl %eax, (%rdi)
movl 0x8(%rsi), %eax
movl %eax, 0x8(%rdi)
movups 0xc(%rsi), %xmm0
movups 0x1c(%rsi), %xmm1
movups %xmm0, 0xc(%rdi)
movups %xmm1, 0x1c(%rdi)
movq 0x2c(%rsi), %rax
movq %rax, 0x2c(%rdi)
addq $0x38, %rdi
addq $0x38, %rsi
jmp 0x2deb7
movl %eax, (%rdi)
movl 0x8(%rsi), %eax
movl %eax, 0x8(%rdi)
movups 0xc(%rsi), %xmm0
movups 0x1c(%rsi), %xmm1
movups %xmm0, 0xc(%rdi)
movups %xmm1, 0x1c(%rdi)
movq 0x2c(%rsi), %rax
movq %rax, 0x2c(%rdi)
addq $0x38, %rdi
addq $0x38, %rsi
jmp 0x2df91
movl $0x148, %edx            # imm = 0x148
jmp 0x121b0
movl $0x9, (%rdi)
addq $0x8, %rdi
addq $0x8, %rsi
jmp 0x2deb7
movl $0x16, (%rdi)
addq $0x8, %rdi
addq $0x8, %rsi
jmp 0x2df91
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/common/type.c
// Function: subtilis_type_section_delete
void subtilis_type_section_delete(subtilis_type_section_t *stype)
{
	size_t i;

	if (!stype)
		return;

	stype->ref_count--;
	if (stype->ref_count != 0)
		return;
	subtilis_type_free(&stype->type);
	if (stype->check_args) {
		for (i = 0; i < stype->type.params.fn.num_params; i++)
			free(stype->check_args[i].arg_name);
		free(stype->check_args);
	}
	free(stype);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x2dc2d
movq %rdi, %rbx
decq 0x150(%rdi)
je 0x2dc33
popq %rbx
popq %r14
popq %r15
retq
movq %rbx, %rdi
callq 0x2dc7c
cmpq $0x0, 0x148(%rbx)
je 0x2dc6f
xorl %r14d, %r14d
xorl %r15d, %r15d
movq 0x148(%rbx), %rdi
cmpq 0x10(%rbx), %r15
jae 0x2dc6a
movq (%rdi,%r14), %rdi
callq 0x122c0
incq %r15
addq $0x10, %r14
jmp 0x2dc4b
callq 0x122c0
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x122c0
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/common/type.c
// Function: subtilis_type_free
void subtilis_type_free(subtilis_type_t *typ)
{
	if (typ->type == SUBTILIS_TYPE_FN)
		prv_fn_type_free(&typ->params.fn);
	else if (typ->type == SUBTILIS_TYPE_REC)
		prv_rec_type_free(&typ->params.rec);
	else if ((typ->type == SUBTILIS_TYPE_ARRAY_FN) ||
		 (typ->type == SUBTILIS_TYPE_VECTOR_FN))
		prv_fn_type_free(&typ->params.array.params.fn);
	else if ((typ->type == SUBTILIS_TYPE_ARRAY_REC) ||
		 (typ->type == SUBTILIS_TYPE_VECTOR_REC))
		prv_rec_type_free(&typ->params.array.params.rec);
}

// Assembly:
movl (%rdi), %eax
addl $-0x9, %eax
cmpl $0xd, %eax
ja 0x2dca8
leaq 0x406ab(%rip), %rcx     # 0x6e338
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
addq $0x38, %rdi
jmp 0x2dde4
addq $0x38, %rdi
jmp 0x2de25
retq
addq $0x8, %rdi
jmp 0x2dde4
addq $0x8, %rdi
jmp 0x2de25
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/common/type.c
// Function: subtilis_type_name
const char *subtilis_type_name(const subtilis_type_t *typ)
{
	size_t index;

	if (typ->type == SUBTILIS_TYPE_REC)
		return typ->params.rec.name;

	index = (size_t)typ->type;

	if (index < SUBTILIS_TYPE_MAX)
		return prv_fixed_type_names[index];

	return "unknown";
}

// Assembly:
movl (%rdi), %eax
cmpq $0x16, %rax
jne 0x2dcc9
addq $0x10, %rdi
jmp 0x2dcd9
cmpl $0x18, %eax
ja 0x2dcdd
leaq 0x6f90b(%rip), %rcx     # 0x9d5e0
leaq (%rcx,%rax,8), %rdi
movq (%rdi), %rax
retq
leaq 0x413a2(%rip), %rax     # 0x6f086
retq
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/common/type.c
// Function: prv_full_type_name
static void prv_full_type_name(const subtilis_type_t *typ,
			       subtilis_buffer_t *buf, subtilis_error_t *err)
{
	const char *vec_of = "vector of ";
	const char *array_of = "array of ";

	switch (typ->type) {
	case SUBTILIS_TYPE_FN:
		prv_fn_type_name(&typ->params.fn, buf, err);
		return;
	case SUBTILIS_TYPE_REC:
		prv_rec_type_name(&typ->params.rec, buf, err);
		return;
	case SUBTILIS_TYPE_ARRAY_FN:
		subtilis_buffer_append_string(buf, array_of, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return;
		prv_fn_type_name(&typ->params.array.params.fn, buf, err);
		return;
	case SUBTILIS_TYPE_VECTOR_FN:
		subtilis_buffer_append_string(buf, vec_of, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return;
		prv_fn_type_name(&typ->params.array.params.fn, buf, err);
		return;
	case SUBTILIS_TYPE_ARRAY_REC:
		subtilis_buffer_append_string(buf, array_of, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return;
		prv_rec_type_name(&typ->params.array.params.rec, buf, err);
		return;
	case SUBTILIS_TYPE_VECTOR_REC:
		subtilis_buffer_append_string(buf, vec_of, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return;
		prv_rec_type_name(&typ->params.array.params.rec, buf, err);
		return;
	default:
		break;
	}

	subtilis_buffer_append_string(buf, subtilis_type_name(typ), err);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movl (%rdi), %eax
leal -0x9(%rax), %ecx
cmpl $0xd, %ecx
ja 0x2dd50
movq %rdi, %r15
leaq 0x4063e(%rip), %rdx     # 0x6e370
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
addq $0x8, %r15
jmp 0x2dd86
leaq 0x4143c(%rip), %rsi     # 0x6f184
jmp 0x2dda0
addq $0x8, %r15
jmp 0x2ddba
cmpl $0x18, %eax
ja 0x2ddcd
leaq 0x6f884(%rip), %rcx     # 0x9d5e0
movq (%rcx,%rax,8), %rsi
jmp 0x2ddd4
leaq 0x4141b(%rip), %rsi     # 0x6f184
jmp 0x2dd72
leaq 0x41407(%rip), %rsi     # 0x6f179
movq %r14, %rdi
movq %rbx, %rdx
callq 0x14837
cmpl $0x0, (%rbx)
jne 0x2ddb0
addq $0x38, %r15
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x2e89b
leaq 0x413d9(%rip), %rsi     # 0x6f179
movq %r14, %rdi
movq %rbx, %rdx
callq 0x14837
cmpl $0x0, (%rbx)
je 0x2ddb6
popq %rbx
popq %r14
popq %r15
retq
addq $0x38, %r15
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x2e965
leaq 0x412b2(%rip), %rsi     # 0x6f086
movq %r14, %rdi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x14837
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/common/type.c
// Function: prv_fn_type_free
static void prv_fn_type_free(subtilis_type_fn_t *typ)
{
	size_t i;

	subtilis_type_free(typ->ret_val);
	free(typ->ret_val);
	for (i = 0; i < typ->num_params; i++) {
		subtilis_type_free(typ->params[i]);
		free(typ->params[i]);
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x2dc7c
movq (%rbx), %rdi
callq 0x122c0
xorl %r14d, %r14d
cmpq 0x8(%rbx), %r14
jae 0x2de1d
movq 0x10(%rbx,%r14,8), %rdi
callq 0x2dc7c
movq 0x10(%rbx,%r14,8), %rdi
callq 0x122c0
incq %r14
jmp 0x2ddfe
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/common/type.c
// Function: prv_rec_type_free
static void prv_rec_type_free(subtilis_type_rec_t *typ)
{
	size_t i;

	free(typ->name);
	for (i = 0; i < typ->num_fields; i++) {
		free(typ->fields[i].name);
		subtilis_type_free(&typ->field_types[i]);
	}
	free(typ->fields);
	free(typ->field_types);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0x122c0
xorl %r14d, %r14d
xorl %r15d, %r15d
xorl %r12d, %r12d
movq 0x18(%rbx), %rdi
cmpq 0x20(%rbx), %r12
jae 0x2de71
movq (%rdi,%r15), %rdi
callq 0x122c0
movq 0x10(%rbx), %rdi
addq %r14, %rdi
callq 0x2dc7c
incq %r12
addq $0x18, %r15
addq $0x148, %r14            # imm = 0x148
jmp 0x2de42
callq 0x122c0
movq 0x10(%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x122c0
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/common/type.c
// Function: prv_init_copy_fn
static void prv_init_copy_fn(subtilis_type_fn_t *dst,
			     const subtilis_type_fn_t *src,
			     subtilis_error_t *err)
{
	size_t i;

	dst->ret_val = calloc(1, sizeof(*dst->ret_val));
	if (!dst->ret_val) {
		subtilis_error_set_oom(err);
		return;
	}
	dst->num_params = 0;
	subtilis_type_init_copy(dst->ret_val, src->ret_val, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;
	for (i = 0; i < src->num_params; i++) {
		dst->params[i] = calloc(1, sizeof(*dst->params[i]));
		if (!dst->params[i]) {
			subtilis_error_set_oom(err);
			goto cleanup;
		}
		subtilis_type_init_copy(dst->params[i], src->params[i], err);
		dst->num_params++;
		if (err->type != SUBTILIS_ERROR_OK)
			goto cleanup;
	}
	return;

cleanup:
	prv_fn_type_free(dst);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
pushq $0x1
popq %rdi
movl $0x148, %esi            # imm = 0x148
callq 0x12150
movq %rax, (%rbx)
testq %rax, %rax
je 0x2df08
andq $0x0, 0x8(%rbx)
movq (%r15), %rsi
movq %rax, %rdi
movq %r14, %rdx
callq 0x2db73
cmpl $0x0, (%r14)
je 0x2df28
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x2dde4
leaq 0x41169(%rip), %rdx     # 0x6f078
pushq $0x1
popq %rsi
movq %r14, %rdi
movl $0x1ca, %ecx            # imm = 0x1CA
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x1429e
xorl %r13d, %r13d
pushq $0x1
popq %r12
cmpq 0x8(%r15), %r13
jae 0x2df6b
movl $0x148, %esi            # imm = 0x148
movq %r12, %rdi
callq 0x12150
movq %rax, 0x10(%rbx,%r13,8)
testq %rax, %rax
je 0x2df75
movq 0x10(%r15,%r13,8), %rsi
movq %rax, %rdi
movq %r14, %rdx
callq 0x2db73
incq 0x8(%rbx)
incq %r13
cmpl $0x0, (%r14)
je 0x2df2f
jmp 0x2def7
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x410fc(%rip), %rdx     # 0x6f078
pushq $0x1
popq %rsi
movq %r14, %rdi
movl $0x1d4, %ecx            # imm = 0x1D4
callq 0x1429e
jmp 0x2def7
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/common/type.c
// Function: subtilis_type_init_rec
void subtilis_type_init_rec(subtilis_type_t *dst, const char *name,
			    subtilis_error_t *err)
{
	dst->type = SUBTILIS_TYPE_REC;
	dst->params.rec.alignment = 1;
	dst->params.rec.num_fields = 0;
	dst->params.rec.max_fields = 0;
	dst->params.rec.field_types = NULL;
	dst->params.rec.fields = NULL;
	dst->params.rec.name = malloc(strlen(name) + 1);
	if (!dst->params.rec.name) {
		subtilis_error_set_oom(err);
		return;
	}
	strcpy(dst->params.rec.name, name);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movl $0x16, (%rdi)
movl $0x1, 0x8(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rdi)
movups %xmm0, 0x28(%rdi)
movq %rsi, %rdi
callq 0x120f0
leaq 0x1(%rax), %rdi
callq 0x121d0
movq %rax, 0x10(%r15)
testq %rax, %rax
je 0x2e2bb
movq %rax, %rdi
movq %r14, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x12070
leaq 0x40db6(%rip), %rdx     # 0x6f078
pushq $0x1
popq %rsi
movq %rbx, %rdi
movl $0x28a, %ecx            # imm = 0x28A
popq %rbx
popq %r14
popq %r15
jmp 0x1429e
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/common/type.c
// Function: subtilis_type_rec_field_offset_id
uint32_t subtilis_type_rec_field_offset_id(const subtilis_type_rec_t *rec,
					   size_t id)
{
	size_t i;
	uint32_t align;
	uint32_t adjust;
	uint32_t offset = 0;

	for (i = 0; i < id; i++) {
		align = rec->fields[i].alignment;
		adjust = offset & (align - 1);
		if (adjust != 0)
			offset += align - adjust;
		offset += rec->fields[i].size;
	}
	align = rec->fields[i].alignment;
	adjust = offset & (align - 1);
	if (adjust != 0)
		offset += align - adjust;

	return offset;
}

// Assembly:
movq 0x18(%rdi), %rax
leaq 0xc(%rax), %rdx
xorl %ecx, %ecx
movq %rsi, %rdi
subq $0x1, %rdi
jb 0x2e548
movl -0x4(%rdx), %r8d
leal -0x1(%r8), %r9d
andl %ecx, %r9d
subl %r9d, %r8d
testl %r9d, %r9d
cmovel %r9d, %r8d
addl (%rdx), %ecx
addl %r8d, %ecx
addq $0x18, %rdx
jmp 0x2e522
imulq $0x18, %rsi, %rdx
movl 0x8(%rax,%rdx), %eax
leal -0x1(%rax), %edx
andl %ecx, %edx
subl %edx, %eax
testl %edx, %edx
cmovel %edx, %eax
addl %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/common/type.c
// Function: subtilis_type_rec_field_offset
uint32_t subtilis_type_rec_field_offset(subtilis_type_t *typ, const char *name)
{
	subtilis_type_rec_t *rec = &typ->params.rec;
	size_t id = subtilis_type_rec_find_field(rec, name);

	if (id == SIZE_MAX)
		return UINT32_MAX;

	return subtilis_type_rec_field_offset_id(rec, id);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
addq $0x8, %rbx
movq %rbx, %rdi
callq 0x2e2d7
cmpq $-0x1, %rax
je 0x2e581
movq %rbx, %rdi
movq %rax, %rsi
popq %rbx
jmp 0x2e515
pushq $-0x1
popq %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/common/type.c
// Function: subtilis_type_rec_size
size_t subtilis_type_rec_size(const subtilis_type_t *typ)
{
	size_t id;
	const subtilis_type_rec_t *rec = &typ->params.rec;

	if (rec->num_fields == 0)
		return 0;

	id = rec->num_fields - 1;
	return subtilis_type_rec_field_offset_id(rec, id) +
	       rec->fields[id].size;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x28(%rdi), %r14
testq %r14, %r14
je 0x2e5b1
movq %rdi, %rbx
addq $0x8, %rdi
leaq -0x1(%r14), %rsi
callq 0x2e515
movq 0x20(%rbx), %rcx
imulq $0x18, %r14, %rdx
addl -0xc(%rdx,%rcx), %eax
jmp 0x2e5b3
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/common/type.c
// Function: subtilis_type_rec_is_scalar
bool subtilis_type_rec_is_scalar(const subtilis_type_t *typ)
{
	subtilis_type_t *field;
	size_t i;
	const subtilis_type_rec_t *rec = &typ->params.rec;

	for (i = 0; i < rec->num_fields; i++) {
		field = &rec->field_types[i];
		switch (field->type) {
		case SUBTILIS_TYPE_REAL:
		case SUBTILIS_TYPE_INTEGER:
		case SUBTILIS_TYPE_BYTE:
		case SUBTILIS_TYPE_FN:
		case SUBTILIS_TYPE_LOCAL_BUFFER:
			continue;
		case SUBTILIS_TYPE_REC:
			if (subtilis_type_rec_is_scalar(field))
				continue;
			break;
		default:
			break;
		}
		return false;
	}

	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x28(%rdi), %r14
xorl %r15d, %r15d
movl $0x800270, %ebp         # imm = 0x800270
xorl %r12d, %r12d
cmpq %r12, %r14
je 0x2e60d
movq 0x18(%rbx), %rdi
movl (%rdi,%r15), %eax
cmpl $0x17, %eax
ja 0x2e60d
btl %eax, %ebp
jae 0x2e5fc
incq %r12
addq $0x148, %r15            # imm = 0x148
jmp 0x2e5d9
cmpl $0x16, %eax
jne 0x2e60d
addq %r15, %rdi
callq 0x2e5bf
testb %al, %al
jne 0x2e5f0
cmpq %r14, %r12
setae %al
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/common/type.c
// Function: subtilis_type_rec_serializable
bool subtilis_type_rec_serializable(const subtilis_type_t *typ)
{
	subtilis_type_t *field;
	size_t i;
	const subtilis_type_rec_t *rec = &typ->params.rec;

	for (i = 0; i < rec->num_fields; i++) {
		field = &rec->field_types[i];
		switch (field->type) {
		case SUBTILIS_TYPE_REAL:
		case SUBTILIS_TYPE_INTEGER:
		case SUBTILIS_TYPE_BYTE:
		case SUBTILIS_TYPE_LOCAL_BUFFER:
			continue;
		case SUBTILIS_TYPE_REC:
			if (subtilis_type_rec_serializable(field))
				continue;
			break;
		default:
			break;
		}
		return false;
	}

	return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x28(%rdi), %r14
xorl %r15d, %r15d
xorl %r12d, %r12d
cmpq %r12, %r14
je 0x2e668
movq 0x18(%rbx), %rdi
movl (%rdi,%r15), %eax
leal -0x4(%rax), %ecx
cmpl $0x3, %ecx
jb 0x2e65c
cmpl $0x17, %eax
je 0x2e65c
cmpl $0x16, %eax
jne 0x2e668
addq %r15, %rdi
callq 0x2e61c
testb %al, %al
je 0x2e668
incq %r12
addq $0x148, %r15            # imm = 0x148
jmp 0x2e631
cmpq %r14, %r12
setae %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq