LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/common/buffer.c
// Function: subtilis_buffer_append_reserve
void subtilis_buffer_append_reserve(subtilis_buffer_t *buffer, size_t length,
				    subtilis_error_t *err)
{
	size_t new_end = length;
	size_t new_length;
	subtilis_fixed_buffer_t *b = buffer->buffer;

	if (b) {
		new_end += b->end;
		new_length = new_end - b->start;
	} else {
		new_length = length;
	}

	subtilis_buffer_reserve(buffer, new_length, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	b = buffer->buffer;
	b->end = new_end;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0x14b10
addq 0x10(%rax), %rbx
movq %rbx, %rsi
subq 0x8(%rax), %rsi
jmp 0x14b13
movq %rbx, %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x14a4a
cmpl $0x0, (%r15)
jne 0x14b2c
movq 0x8(%r14), %rax
movq %rbx, 0x10(%rax)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/common/buffer.c
// Function: subtilis_buffer_append
void subtilis_buffer_append(subtilis_buffer_t *buffer, const void *data,
			    size_t length, subtilis_error_t *err)
{
	size_t old_size;

	if (length == 0)
		return;

	old_size = subtilis_buffer_get_size(buffer);

	subtilis_buffer_append_reserve(buffer, length, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	(void)memcpy(buffer->buffer->data + old_size, data, length);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
testq %rdx, %rdx
je 0x14b77
movq %rcx, %r12
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0x14b5f
movq 0x10(%rax), %r13
subq 0x8(%rax), %r13
jmp 0x14b62
xorl %r13d, %r13d
movq %r15, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x14aec
cmpl $0x0, (%r12)
je 0x14b81
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq 0x8(%r15), %rax
leaq (%rax,%r13), %rdi
addq $0x18, %rdi
movq %r14, %rsi
movq %rbx, %rdx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x121b0
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/common/buffer.c
// Function: subtilis_buffer_insert
void subtilis_buffer_insert(subtilis_buffer_t *buffer, size_t pos,
			    const void *data, size_t length,
			    subtilis_error_t *err)
{
	size_t new_length;
	void *move_from;
	subtilis_fixed_buffer_t *b;
	size_t size = subtilis_buffer_get_size(buffer);

	if (pos > size) {
		subtilis_error_set_assertion_failed(err);
		return;
	}

	new_length = size + length;

	subtilis_buffer_reserve(buffer, new_length, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	b = buffer->buffer;
	move_from = b->data + pos + b->start;
	if (pos < size)
		memmove(((char *)move_from) + length, move_from, size - pos);

	memcpy(move_from, data, length);
	b->end += length;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r13
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbp
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0x14c2d
movq 0x10(%rax), %r15
subq 0x8(%rax), %r15
jmp 0x14c30
xorl %r15d, %r15d
cmpq %r12, %r15
jae 0x14c5c
leaq 0x5e83d(%rip), %rdx     # 0x73479
movq %r13, %rdi
movl $0xf, %esi
movl $0x8c, %ecx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x145f4
leaq (%r15,%rbx), %rsi
movq %rbp, %rdi
movq %r13, %rdx
callq 0x14a4a
cmpl $0x0, (%r13)
jne 0x14cac
movq 0x8(%rbp), %rbp
leaq (%r12,%rbp), %rax
movq 0x8(%rbp), %rcx
leaq (%rcx,%rax), %r13
addq $0x18, %r13
subq %r12, %r15
jbe 0x14c9a
leaq (%rbx,%r13), %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x12230
movq %r13, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x121b0
addq %rbx, 0x10(%rbp)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/common/buffer.c
// Function: subtilis_buffer_delete
void subtilis_buffer_delete(subtilis_buffer_t *buffer, size_t pos,
			    size_t length, subtilis_error_t *err)
{
	size_t last_pos = pos + length;
	void *move_to;
	void *move_from;
	size_t bytes_to_move;
	subtilis_fixed_buffer_t *b = buffer->buffer;
	size_t size;

	if (!b) {
		subtilis_error_set_assertion_failed(err);
		return;
	}

	size = b->end - b->start;

	if (last_pos > size) {
		subtilis_error_set_assertion_failed(err);
		return;
	}

	if (last_pos == size) {
		b->end = pos + b->start;
	} else {
		move_to = ((char *)b->data) + pos + b->start;
		move_from = ((char *)move_to) + length;
		bytes_to_move = size - last_pos;
		memmove(move_to, move_from, bytes_to_move);
		b->end -= length;
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x8(%rdi), %r14
testq %r14, %r14
je 0x14cf5
movq %rdx, %rbx
leaq (%rdx,%rsi), %rdi
movq 0x8(%r14), %rax
movq 0x10(%r14), %rdx
subq %rax, %rdx
subq %rdi, %rdx
jae 0x14d15
leaq 0x5e793(%rip), %rdx     # 0x73479
movq %rcx, %rdi
movl $0xf, %esi
movl $0xb1, %ecx
jmp 0x14d09
leaq 0x5e77d(%rip), %rdx     # 0x73479
movq %rcx, %rdi
movl $0xf, %esi
movl $0xaa, %ecx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x145f4
jne 0x14d1c
addq %rsi, %rax
jmp 0x14d3f
addq %r14, %rsi
leaq (%rsi,%rax), %rcx
leaq (%rax,%rsi), %rdi
addq $0x18, %rdi
leaq (%rbx,%rcx), %rsi
addq $0x18, %rsi
callq 0x12230
movq 0x10(%r14), %rax
subq %rbx, %rax
movq %rax, 0x10(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/common/buffer.c
// Function: subtilis_buffer_zero_terminate
void subtilis_buffer_zero_terminate(subtilis_buffer_t *buffer,
				    subtilis_error_t *err)
{
	uint8_t zero = 0;
	subtilis_fixed_buffer_t *b = buffer->buffer;

	if (!b || (b->start == b->end) || (((char *)b->data)[b->end - 1] != 0))
		subtilis_buffer_append(buffer, &zero, 1, err);
}

// Assembly:
pushq %rax
movq %rsi, %rcx
movb $0x0, 0x7(%rsp)
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0x14d6e
movq 0x10(%rax), %rdx
cmpq %rdx, 0x8(%rax)
je 0x14d6e
cmpb $0x0, 0x17(%rax,%rdx)
je 0x14d7d
leaq 0x7(%rsp), %rsi
movl $0x1, %edx
callq 0x14b32
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/common/buffer.c
// Function: subtilis_buffer_remove_terminator
void subtilis_buffer_remove_terminator(subtilis_buffer_t *buffer)
{
	subtilis_fixed_buffer_t *b = buffer->buffer;

	if (!b)
		return;

	while ((b->end > b->start) && (((char *)b->data)[b->end - 1] == 0))
		b->end--;
}

// Assembly:
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0x14da5
movq 0x8(%rax), %rcx
movq 0x10(%rax), %rdx
cmpq %rcx, %rdx
jbe 0x14da5
cmpb $0x0, 0x17(%rax,%rdx)
jne 0x14da5
decq %rdx
movq %rdx, 0x10(%rax)
jmp 0x14d90
retq
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/common/buffer.c
// Function: subtilis_fixed_buffer_compress
void subtilis_fixed_buffer_compress(subtilis_fixed_buffer_t *fixed_buffer)
{
	if (fixed_buffer->start > 0) {
		(void)memmove(fixed_buffer->data,
			      fixed_buffer->data + fixed_buffer->start,
			      fixed_buffer->end - fixed_buffer->start);
		fixed_buffer->end -= fixed_buffer->start;
		fixed_buffer->start = 0;
	}
}

// Assembly:
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0x14e51
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
addq $0x18, %rdi
leaq (%rbx,%rax), %rsi
addq $0x18, %rsi
movq 0x10(%rbx), %r14
subq %rax, %r14
movq %r14, %rdx
callq 0x12230
movq %r14, 0x10(%rbx)
movq $0x0, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/frontend/parser.c
// Function: subtilis_parser_delete
void subtilis_parser_delete(subtilis_parser_t *p)
{
	size_t i;

	if (!p)
		return;

	for (i = 0; i < p->num_calls; i++)
		subtilis_parser_call_delete(p->calls[i]);
	free(p->calls);

	for (i = 0; i < p->num_call_addrs; i++)
		subtilis_parser_call_addr_delete(p->call_addrs[i]);
	free(p->call_addrs);

	subtilis_ir_prog_delete(p->prog);
	subtilis_symbol_table_delete(p->main_st);
	subtilis_symbol_table_delete(p->st);
	free(p);
}

// Assembly:
testq %rdi, %rdi
je 0x150d4
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq $0x0, 0x80(%rdi)
je 0x15069
xorl %r14d, %r14d
movq 0x90(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x35bcf
incq %r14
cmpq 0x80(%rbx), %r14
jb 0x1504d
movq 0x90(%rbx), %rdi
callq 0x122c0
cmpq $0x0, 0x98(%rbx)
je 0x1509e
xorl %r14d, %r14d
movq 0xa8(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x35ca2
incq %r14
cmpq 0x98(%rbx), %r14
jb 0x15082
movq 0xa8(%rbx), %rdi
callq 0x122c0
movq 0x58(%rbx), %rdi
callq 0x2c4cd
movq 0x70(%rbx), %rdi
callq 0x2e5e7
movq 0x60(%rbx), %rdi
callq 0x2e5e7
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x122c0
retq
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/frontend/parser.c
// Function: subtilis_parser_statement
void subtilis_parser_statement(subtilis_parser_t *p, subtilis_token_t *t,
			       subtilis_error_t *err)
{
	subtilis_keyword_fn fn;
	const char *tbuf;
	int key_type;

	if ((p->current->endproc) &&
	    !((t->type == SUBTILIS_TOKEN_KEYWORD) &&
	      (t->tok.keyword.type == SUBTILIS_KEYWORD_DEF))) {
		subtilis_error_set_useless_statement(err, p->l->stream->name,
						     p->l->line);
		return;
	}

	tbuf = subtilis_token_get_text(t);
	if (t->type == SUBTILIS_TOKEN_IDENTIFIER) {
		subtilis_parser_assignment(p, t, err);
		return;
	} else if ((t->type == SUBTILIS_TOKEN_OPERATOR) &&
		   !strcmp(tbuf, "<-")) {
		subtilis_parser_return(p, t, err);
		return;
	} else if (t->type != SUBTILIS_TOKEN_KEYWORD) {
		subtilis_error_set_keyword_expected(
		    err, tbuf, p->l->stream->name, p->l->line);
		return;
	}

	key_type = t->tok.keyword.type;
	fn = keyword_fns[key_type];
	if (!fn) {
		tbuf = subtilis_token_get_text(t);
		subtilis_error_set_not_supported(err, tbuf, p->l->stream->name,
						 p->l->line);
		return;
	}
	fn(p, t, err);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq 0x48(%rdi), %rax
cmpb $0x1, 0x88(%rax)
jne 0x15100
cmpl $0x1, (%r15)
jne 0x15137
cmpl $0x1d, 0x8(%r15)
jne 0x15137
movq %r15, %rdi
callq 0x12ad0
movl (%r15), %ebp
cmpl $0x1, %ebp
je 0x1517f
movq %rax, %r12
cmpl $0x2, %ebp
je 0x15163
cmpl $0x6, %ebp
jne 0x151a6
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x184e9
movq (%r14), %rax
movq 0x30(%rax), %rdx
movl 0x38(%rax), %ecx
leaq 0x5e341(%rip), %r8      # 0x73489
movq %rbx, %rdi
movl $0x2e, %esi
movl $0xbd, %r9d
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x14618
leaq 0x5e33f(%rip), %rsi     # 0x734a9
movq %r12, %rdi
callq 0x12160
testl %eax, %eax
je 0x15217
cmpl $0x1, %ebp
jne 0x151a6
movslq 0x8(%r15), %rax
leaq 0x875d6(%rip), %rcx     # 0x9c760
movq (%rcx,%rax,8), %rax
testq %rax, %rax
je 0x151d2
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmpq *%rax
movq (%r14), %rax
movq 0x30(%rax), %r8
movl 0x38(%rax), %r9d
leaq 0x5e2d1(%rip), %rax     # 0x73489
leaq 0x5ec36(%rip), %rcx     # 0x73df5
movq %rbx, %rdi
movl $0x10, %esi
movq %r12, %rdx
pushq $0xcb
pushq %rax
jmp 0x15205
movq %r15, %rdi
callq 0x12ad0
movq (%r14), %rcx
movq 0x30(%rcx), %r8
movl 0x38(%rcx), %r9d
leaq 0x5e29d(%rip), %r10     # 0x73489
leaq 0x5ec02(%rip), %rcx     # 0x73df5
movq %rbx, %rdi
movl $0x13, %esi
movq %rax, %rdx
pushq $0xd4
pushq %r10
callq 0x1442a
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1c9e2
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/frontend/parser.c
// Function: subtilis_parse
void subtilis_parse(subtilis_parser_t *p, subtilis_error_t *err)
{
	subtilis_token_t *t = NULL;

	t = subtilis_token_new(err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	prv_root(p, t, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	subtilis_parser_check_calls(p, err);

cleanup:

	subtilis_token_delete(t);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r15
movq %rsi, %rdi
callq 0x12b56
cmpl $0x0, (%rbx)
je 0x154ba
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movl $0x3fffffff, %edi       # imm = 0x3FFFFFFF
movq %rbx, %rsi
callq 0x2bb29
cmpl $0x0, (%rbx)
jne 0x15584
leaq 0x90c96(%rip), %rcx     # 0xa6170
movq (%rcx), %rsi
leaq 0x5f414(%rip), %rdx     # 0x748f8
movq %r15, %rdi
movq %rax, %rcx
movq %rbx, %r8
callq 0x35cc8
cmpl $0x0, (%rbx)
jne 0x15584
xorl %edi, %edi
movq %rbx, %rsi
callq 0x2bb29
cmpl $0x0, (%rbx)
jne 0x15584
leaq 0x90c67(%rip), %rcx     # 0xa6178
movq (%rcx), %rsi
leaq 0x5f3dd(%rip), %rdx     # 0x748f8
movq %r15, %rdi
movq %rax, %rcx
movq %rbx, %r8
callq 0x35cc8
cmpl $0x0, (%rbx)
jne 0x15584
xorl %edi, %edi
movq %rbx, %rsi
callq 0x2bb29
cmpl $0x0, (%rbx)
jne 0x15584
leaq 0x90c3c(%rip), %rcx     # 0xa6180
movq (%rcx), %rsi
leaq 0x5f3aa(%rip), %rdx     # 0x748f8
movq %r15, %rdi
movq %rax, %rcx
movq %rbx, %r8
callq 0x35cc8
cmpl $0x0, (%rbx)
jne 0x15584
movq %r15, %rdi
movq %rbx, %rsi
callq 0x15681
cmpl $0x0, (%rbx)
jne 0x15584
movq (%r15), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x12eda
cmpl $0x0, (%rbx)
je 0x155a1
cmpl $0x0, (%rbx)
jne 0x15594
movq %r15, %rdi
movq %rbx, %rsi
callq 0x1cbcd
movq %r14, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x12a38
movq 0x48(%r15), %rdi
movq %rbx, %rsi
callq 0x2c2f8
movq 0x48(%r15), %rcx
movq %rax, 0xc0(%rcx)
cmpl $0x0, (%rbx)
jne 0x15584
cmpl $0x0, (%r14)
je 0x155d3
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x150d5
jmp 0x155b8
movq 0x50(%r15), %rax
movq 0x70(%r15), %rcx
movq 0x310(%rcx), %rcx
movq %rcx, 0x10(%rax)
movq 0x48(%r15), %rdi
movq 0x98(%rdi), %rsi
movq %rbx, %rdx
callq 0x2d017
cmpl $0x0, (%rbx)
jne 0x15584
movq %r15, %rdi
movq %rbx, %rsi
callq 0x1c8fc
cmpl $0x0, (%rbx)
jne 0x15584
movq 0x48(%r15), %rdi
movq 0xa0(%rdi), %rsi
movq %rbx, %rdx
callq 0x2d017
cmpl $0x0, (%rbx)
jne 0x15584
movq %r15, %rdi
movq %rbx, %rsi
callq 0x156e7
cmpl $0x0, (%rbx)
jne 0x15584
movq 0x48(%r15), %rdi
movl $0x74, %esi
movq %rbx, %rdx
callq 0x2c1b7
cmpl $0x0, (%rbx)
jne 0x15584
movq 0x48(%r15), %rdi
movq %rbx, %rsi
callq 0x2bf31
cmpl $0x0, (%rbx)
jne 0x15584
movq %r15, %rdi
movq %rbx, %rsi
callq 0x4375c
jmp 0x15584
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/frontend/parser.c
// Function: prv_initialise_free_mem
static void prv_initialise_free_mem(subtilis_parser_t *p, subtilis_token_t *t,
				    subtilis_error_t *err)
{
	size_t reg;
	subtilis_exp_t *e;

	if (!p->settings.check_mem_leaks)
		return;

	reg = subtilis_ir_section_add_instr1(p->current,
					     SUBTILIS_OP_INSTR_HEAP_FREE, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	e = subtilis_exp_new_int32_var(reg, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	subtilis_var_assign_hidden(p, subtilis_heap_free_on_startup_var,
				   &subtilis_type_integer, e, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpb $0x1, 0xba(%rdi)
jne 0x156b9
movq %rsi, %rbx
movq %rdi, %r14
movq 0x48(%rdi), %rdi
movl $0x87, %esi
movq %rbx, %rdx
callq 0x2c193
cmpl $0x0, (%rbx)
jne 0x156b9
movl %eax, %edi
movq %rbx, %rsi
callq 0x2ba99
cmpl $0x0, (%rbx)
je 0x156c1
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x90ac0(%rip), %rcx     # 0xa6188
movq (%rcx), %rsi
leaq 0x5f226(%rip), %rdx     # 0x748f8
movq %r14, %rdi
movq %rax, %rcx
movq %rbx, %r8
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x35cc8
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/frontend/parser.c
// Function: prv_end
static void prv_end(subtilis_parser_t *p, subtilis_token_t *t,
		    subtilis_error_t *err)
{
	subtilis_ir_operand_t end_label;

	if (p->current != p->main) {
		subtilis_ir_section_add_instr_no_arg(
		    p->current, SUBTILIS_OP_INSTR_END, err);
	} else {
		end_label.label = p->current->nofree_label;
		subtilis_ir_section_add_instr_no_reg(
		    p->current, SUBTILIS_OP_INSTR_JMP, end_label, err);
	}
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	subtilis_lexer_get(p->l, t, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	p->current->endproc = true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x48(%rdi), %rdi
cmpq 0x50(%rbx), %rdi
je 0x158e3
movl $0x74, %esi
movq %r14, %rdx
callq 0x2c1b7
jmp 0x158f7
movq 0xa0(%rdi), %rdx
movl $0x45, %esi
movq %r14, %rcx
callq 0x2c19f
cmpl $0x0, (%r14)
jne 0x1591c
movq (%rbx), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x12eda
cmpl $0x0, (%r14)
jne 0x1591c
movq 0x48(%rbx), %rax
movb $0x1, 0x88(%rax)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/frontend/parser.c
// Function: prv_parser_type
static void prv_parser_type(subtilis_parser_t *p, subtilis_token_t *t,
			    subtilis_error_t *err)
{
	const char *tbuf;
	char *name;
	subtilis_type_t type;

	type.type = SUBTILIS_TYPE_VOID;

	subtilis_lexer_get(p->l, t, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	tbuf = subtilis_token_get_text(t);
	if ((t->type != SUBTILIS_TOKEN_KEYWORD) ||
	    ((t->tok.keyword.type != SUBTILIS_KEYWORD_PROC) &&
	     (t->tok.keyword.type != SUBTILIS_KEYWORD_FN) &&
	     (t->tok.keyword.type != SUBTILIS_KEYWORD_REC))) {
		subtilis_error_set_expected(err, "REC, PROC or FN", tbuf,
					    p->l->stream->name, p->l->line);
		return;
	}

	if (t->tok.keyword.type == SUBTILIS_KEYWORD_REC)
		name = subtilis_parser_parse_rec_type(p, t, &type, err);
	else
		name = subtilis_parser_parse_call_type(p, t, &type, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto on_error;

	if ((p->current != p->main) || (p->level > 0)) {
		subtilis_error_set_type_not_at_top_level(
		    err, name, p->l->stream->name, p->l->line);
		goto on_error;
	}

	subtilis_symbol_table_insert_type(p->st, name, &type, err);
	if (err->type == SUBTILIS_ERROR_TYPE_ALREADY_DEFINED) {
		subtilis_error_set_already_defined(
		    err, name, p->l->stream->name, p->l->line);
	}

on_error:
	subtilis_type_free(&type);
	free(name);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x150, %rsp            # imm = 0x150
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movl $0x8, 0x8(%rsp)
movq (%rdi), %rdi
callq 0x12eda
cmpl $0x0, (%rbx)
je 0x15955
addq $0x150, %rsp            # imm = 0x150
jmp 0x159bd
movq %r15, %rdi
callq 0x12ad0
cmpl $0x1, (%r15)
jne 0x15986
movl 0x8(%r15), %ecx
cmpl $0x3, %ecx
jae 0x15986
leaq 0x8(%rsp), %rdx
movq %r14, %rdi
movq %r15, %rsi
cmpl $0x2, %ecx
jne 0x159c3
movq %rbx, %rcx
callq 0x292f8
jmp 0x159cb
movq (%r14), %rcx
movq 0x30(%rcx), %r8
movl 0x38(%rcx), %r9d
leaq 0x5daf1(%rip), %r10     # 0x73489
leaq 0x5db1c(%rip), %rdx     # 0x734bb
movq %rbx, %rdi
movl $0x1d, %esi
movq %rax, %rcx
pushq $0x1b6                  # imm = 0x1B6
pushq %r10
callq 0x1442a
addq $0x160, %rsp            # imm = 0x160
popq %rbx
popq %r14
popq %r15
retq
movq %rbx, %rcx
callq 0x1c329
movq %rax, %r15
cmpl $0x0, (%rbx)
jne 0x15a17
movq 0x48(%r14), %rax
cmpq 0x50(%r14), %rax
jne 0x159e4
cmpq $0x0, 0x78(%r14)
je 0x15a2e
movq (%r14), %rax
movq 0x30(%rax), %r8
movl 0x38(%rax), %r9d
leaq 0x5da93(%rip), %rax     # 0x73489
leaq 0x5e3f8(%rip), %rcx     # 0x73df5
movq %rbx, %rdi
movl $0x57, %esi
movq %r15, %rdx
pushq $0x1c3                  # imm = 0x1C3
pushq %rax
callq 0x1442a
addq $0x10, %rsp
leaq 0x8(%rsp), %rdi
callq 0x2f843
movq %r15, %rdi
callq 0x122c0
jmp 0x1594c
movq 0x60(%r14), %rdi
leaq 0x8(%rsp), %rdx
movq %r15, %rsi
movq %rbx, %rcx
callq 0x2eace
cmpl $0x68, (%rbx)
jne 0x15a17
movq (%r14), %rax
movq 0x30(%rax), %r8
movl 0x38(%rax), %r9d
leaq 0x5da30(%rip), %rax     # 0x73489
leaq 0x5e395(%rip), %rcx     # 0x73df5
movq %rbx, %rdi
movl $0x20, %esi
movq %r15, %rdx
pushq $0x1ca                  # imm = 0x1CA
jmp 0x15a0d
nop
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/frontend/parser_array.c
// Function: subtils_parser_read_array
subtilis_exp_t *subtils_parser_read_array(subtilis_parser_t *p,
					  subtilis_token_t *t,
					  const char *var_name,
					  subtilis_error_t *err)
{
	size_t mem_reg;
	const subtilis_symbol_t *s;

	s = subtilis_parser_get_symbol(p, var_name, &mem_reg, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return NULL;

	if (!subtilis_type_if_is_array(&s->t)) {
		subtilis_error_not_array(err, var_name, p->l->stream->name,
					 p->l->line);
		return NULL;
	}

	return subtils_parser_read_array_with_type(p, t, &s->t, mem_reg, s->loc,
						   var_name, err);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r12
movq %rsp, %rdx
movq %rbx, %rsi
callq 0x1e7ed
cmpl $0x0, (%r14)
jne 0x15b05
movq %rax, %rbp
leaq 0x8(%rax), %r13
movq %r13, %rdi
callq 0x377f7
testb %al, %al
je 0x15ad4
movq (%rsp), %rcx
movq (%rbp), %r8
subq $0x8, %rsp
movq %r12, %rdi
movq %r15, %rsi
movq %r13, %rdx
movq %rbx, %r9
pushq %r14
callq 0x15b16
addq $0x10, %rsp
jmp 0x15b07
movq (%r12), %rax
movq 0x30(%rax), %r8
movl 0x38(%rax), %r9d
leaq 0x5da05(%rip), %rax     # 0x734ec
leaq 0x5e307(%rip), %rcx     # 0x73df5
movq %r14, %rdi
movl $0x3b, %esi
movq %rbx, %rdx
pushq $0x2b
pushq %rax
callq 0x1442a
addq $0x10, %rsp
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/frontend/parser_array.c
// Function: prv_read_rec_el
static subtilis_exp_t *
prv_read_rec_el(subtilis_parser_t *p, subtilis_token_t *t,
		const subtilis_type_t *type, subtilis_exp_t **indices,
		size_t dims, size_t mem_reg, size_t loc, const char *var_name,
		subtilis_error_t *err)
{
	subtilis_type_t el_type;
	subtilis_exp_t *offset;
	subtilis_exp_t *e;

	offset = subtilis_array_index_calc(p, var_name, type, mem_reg, loc,
					   indices, dims, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return NULL;

	el_type.type = SUBTILIS_TYPE_VOID;
	subtilis_type_if_element_type(p, type, &el_type, err);
	if (err->type != SUBTILIS_ERROR_OK) {
		subtilis_exp_delete(offset);
		return NULL;
	}

	e = subtilis_parser_rec_exp(p, t, &el_type, offset->exp.ir_op.reg, 0,
				    err);
	subtilis_exp_delete(offset);
	subtilis_type_free(&el_type);

	return e;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x150, %rsp            # imm = 0x150
movq %r8, %rax
movq %rcx, %r10
movq %rdx, %r13
movq %rsi, %r14
movq %rdi, %r15
movq 0x190(%rsp), %rbx
movq 0x188(%rsp), %rsi
movq 0x180(%rsp), %r8
movq %r9, %rcx
movq %r10, %r9
pushq %rbx
pushq %rax
callq 0x437b3
addq $0x10, %rsp
cmpl $0x0, (%rbx)
jne 0x15ddc
movq %rax, %r12
leaq 0x8(%rsp), %rdx
movl $0x8, (%rdx)
movq %r15, %rdi
movq %r13, %rsi
movq %rbx, %rcx
callq 0x3620e
cmpl $0x0, (%rbx)
je 0x15df2
movq %r12, %rdi
callq 0x2b4c3
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x150, %rsp            # imm = 0x150
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq 0x148(%r12), %rcx
leaq 0x8(%rsp), %r13
movq %r15, %rdi
movq %r14, %rsi
movq %r13, %rdx
xorl %r8d, %r8d
movq %rbx, %r9
callq 0x29b7b
movq %rax, %rbx
movq %r12, %rdi
callq 0x2b4c3
movq %r13, %rdi
callq 0x2f843
jmp 0x15dde
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/frontend/parser_array.c
// Function: subtils_parser_read_vector
subtilis_exp_t *subtils_parser_read_vector(subtilis_parser_t *p,
					   subtilis_token_t *t,
					   const char *var_name,
					   subtilis_error_t *err)
{
	size_t mem_reg;
	const subtilis_symbol_t *s;

	s = subtilis_parser_get_symbol(p, var_name, &mem_reg, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return NULL;

	if (!subtilis_type_if_is_vector(&s->t)) {
		subtilis_error_not_vector(err, var_name, p->l->stream->name,
					  p->l->line);
		return NULL;
	}

	return subtils_parser_read_vector_with_type(p, t, &s->t, mem_reg,
						    s->loc, var_name, err);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r12
movq %rsp, %rdx
movq %rbx, %rsi
callq 0x1e7ed
cmpl $0x0, (%r14)
jne 0x160e4
movq %rax, %rbp
leaq 0x8(%rax), %r13
movq %r13, %rdi
callq 0x37815
testb %al, %al
je 0x160b0
movq (%rsp), %rcx
movq (%rbp), %r8
subq $0x8, %rsp
movq %r12, %rdi
movq %r15, %rsi
movq %r13, %rdx
movq %rbx, %r9
pushq %r14
callq 0x160f5
addq $0x10, %rsp
jmp 0x160e6
movq (%r12), %rax
movq 0x30(%rax), %r8
movl 0x38(%rax), %r9d
leaq 0x5d429(%rip), %rax     # 0x734ec
leaq 0x5dd2b(%rip), %rcx     # 0x73df5
movq %r14, %rdi
movl $0x3c, %esi
movq %rbx, %rdx
pushq $0xf3
pushq %rax
callq 0x1442a
addq $0x10, %rsp
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/frontend/parser_array.c
// Function: subtils_parser_element_address
subtilis_exp_t *
subtils_parser_element_address(subtilis_parser_t *p, subtilis_token_t *t,
			       const subtilis_symbol_t *s, size_t mem_reg,
			       const char *var_name, subtilis_error_t *err)
{
	subtilis_exp_t *indices[SUBTILIS_MAX_DIMENSIONS];
	size_t i;
	subtilis_exp_t *e = NULL;
	size_t dims = 0;

	dims = subtilis_var_bracketed_int_args_have_b(
	    p, t, indices, SUBTILIS_MAX_DIMENSIONS, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return NULL;

	subtilis_lexer_get(p->l, t, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	if (dims == 0) {
		subtilis_error_bad_index_count(err, var_name,
					       p->l->stream->name, p->l->line);
		goto cleanup;
	}

	e = subtilis_type_if_indexed_address(p, var_name, &s->t, mem_reg,
					     s->loc, indices, dims, err);

cleanup:

	for (i = 0; i < dims; i++)
		subtilis_exp_delete(indices[i]);

	return e;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %r9, %r14
movq %r8, (%rsp)
movq %rcx, %r13
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %rbp
leaq 0x10(%rsp), %rdx
movl $0xa, %ecx
movq %r9, %r8
callq 0x1f017
cmpl $0x0, (%r14)
je 0x16560
xorl %r14d, %r14d
jmp 0x165cc
movq %rax, %rbx
movq %r13, 0x8(%rsp)
movq (%rbp), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x12eda
cmpl $0x0, (%r14)
je 0x16582
xorl %r14d, %r14d
jmp 0x165b2
testq %rbx, %rbx
je 0x165de
movq (%r12), %r8
addq $0x8, %r12
leaq 0x10(%rsp), %r9
movq %rbp, %rdi
movq (%rsp), %rsi
movq %r12, %rdx
movq 0x8(%rsp), %rcx
pushq %r14
pushq %rbx
callq 0x367f0
addq $0x10, %rsp
movq %rax, %r14
testq %rbx, %rbx
je 0x165cc
xorl %r15d, %r15d
movq 0x10(%rsp,%r15,8), %rdi
callq 0x2b4c3
incq %r15
cmpq %r15, %rbx
jne 0x165ba
movq %r14, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%rbp), %rax
movq 0x30(%rax), %r8
movl 0x38(%rax), %r9d
leaq 0x5cefb(%rip), %rax     # 0x734ec
leaq 0x5d7fd(%rip), %rcx     # 0x73df5
movq %r14, %rdi
movl $0x3a, %esi
movq (%rsp), %rdx
pushq $0x1a0                  # imm = 0x1A0
pushq %rax
callq 0x1442a
addq $0x10, %rsp
jmp 0x1657d
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/frontend/parser_array.c
// Function: parser_array_var_bracketed_int_args
size_t parser_array_var_bracketed_int_args(subtilis_parser_t *p,
					   subtilis_token_t *t,
					   subtilis_exp_t **e, size_t max,
					   bool *vec, subtilis_error_t *err)
{
	const char *tbuf;

	subtilis_lexer_get(p->l, t, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return 0;

	tbuf = subtilis_token_get_text(t);
	if (t->type == SUBTILIS_TOKEN_OPERATOR) {
		if (!strcmp(tbuf, "(")) {
			*vec = false;
			return subtilis_var_bracketed_int_args_have_b(p, t, e,
								      max, err);
		} else if (!strcmp(tbuf, "{")) {
			e[0] = subtilis_curly_bracketed_arg_have_b(p, t, err);
			if (err->type != SUBTILIS_ERROR_OK)
				return 0;

			*vec = true;
			return e[0] ? 1 : 0;
		}
	}

	subtilis_error_set_expected(err, "( or {", tbuf, p->l->stream->name,
				    p->l->line);

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rbx
movq %r8, %r14
movq %rcx, %rbp
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
movq (%rdi), %rdi
movq %r9, %rdx
callq 0x12eda
cmpl $0x0, (%rbx)
jne 0x166b5
movq %r14, (%rsp)
movq %r12, %rdi
callq 0x12ad0
movq %rax, %r14
cmpl $0x2, (%r12)
jne 0x16681
leaq 0x5dbb0(%rip), %rsi     # 0x74212
movq %r14, %rdi
callq 0x12160
testl %eax, %eax
je 0x166c6
leaq 0x5ffdc(%rip), %rsi     # 0x76651
movq %r14, %rdi
callq 0x12160
testl %eax, %eax
je 0x166ef
movq (%r13), %rax
movq 0x30(%rax), %r8
movl 0x38(%rax), %r9d
leaq 0x5ce58(%rip), %rax     # 0x734ec
leaq 0x5cedb(%rip), %rdx     # 0x73576
movq %rbx, %rdi
movl $0x1d, %esi
movq %r14, %rcx
pushq $0x1d0                  # imm = 0x1D0
pushq %rax
callq 0x1442a
addq $0x10, %rsp
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%rsp), %rax
movb $0x0, (%rax)
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %rbp, %rcx
movq %rbx, %r8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1f017
movq %r13, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x1f50f
movq %rax, (%r15)
cmpl $0x0, (%rbx)
jne 0x166b5
movq %rax, %rcx
movq (%rsp), %rax
movb $0x1, (%rax)
xorl %eax, %eax
testq %rcx, %rcx
setne %al
jmp 0x166b7
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/frontend/parser_array.c
// Function: prv_fn_check_type
static void prv_fn_check_type(subtilis_parser_t *p, subtilis_exp_t *e1,
			      const subtilis_type_t *type,
			      subtilis_error_t *err)
{
	if (e1->partial_name)
		subtilis_parser_call_add_addr(p, type, e1, err);
	else if (!subtilis_type_eq(&e1->type, type))
		subtilis_error_set_fn_type_mismatch(err, p->l->stream->name,
						    p->l->line);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rsi, %rax
movq %rdi, %r14
cmpq $0x0, 0x160(%rsi)
je 0x16ed0
movq %r14, %rdi
movq %rdx, %rsi
movq %rax, %rdx
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1d2a6
movq %rax, %rdi
movq %rdx, %rsi
callq 0x2f3e4
testb %al, %al
je 0x16ee7
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq (%r14), %rax
movq 0x30(%rax), %rdx
movl 0x38(%rax), %ecx
leaq 0x5c5f4(%rip), %r8      # 0x734ec
movq %rbx, %rdi
movl $0x42, %esi
movl $0x3fe, %r9d            # imm = 0x3FE
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x14618
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/frontend/parser_array.c
// Function: prv_parse_fn_initialiser
static void prv_parse_fn_initialiser(subtilis_parser_t *p, subtilis_token_t *t,
				     const subtilis_type_t *el_type,
				     subtilis_exp_t *e,
				     const subtilis_array_desc_t *d,
				     subtilis_error_t *err)
{
	subtilis_exp_t **ee;
	size_t element_size;
	size_t data_reg;
	size_t entries = 0;
	size_t i = 0;

	ee = prv_parse_expression_list(p, e, el_type, t, &entries,
				       prv_fn_check_type, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	element_size = subtilis_type_if_size(&e->type, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	prv_check_expression_list_size(p, d, ee, entries, element_size, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	data_reg = subtilis_reference_get_data(p, d->reg, d->loc, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	prv_parse_fn_list(p, data_reg, ee, entries, element_size, err);

cleanup:

	for (i = 0; i < entries; i++)
		subtilis_exp_delete(ee[i]);
	free(ee);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, %r14
movq %r8, %r12
movq %rcx, %r13
movq %rsi, %rcx
movq %rdi, %r15
leaq 0x10(%rsp), %r8
movq $0x0, (%r8)
movq %r9, (%rsp)
leaq -0xa5(%rip), %r9        # 0x16ea1
movq %r13, %rsi
callq 0x1793a
cmpl $0x0, (%r14)
je 0x16f63
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %r13, %rdi
movq %r14, %rsi
callq 0x35ed8
cmpl $0x0, (%r14)
jne 0x16fcb
movq %rax, %r13
movq 0x10(%rsp), %rbp
movq %r15, %rdi
movq %r12, %rsi
movq %rbp, %rdx
movq %rax, %rcx
movq %r14, %r8
callq 0x17b38
cmpl $0x0, (%r14)
jne 0x16fcb
movq 0x10(%r12), %rsi
movq 0x18(%r12), %rdx
movq %r15, %rdi
movq %r14, %rcx
callq 0x4d29c
cmpl $0x0, (%r14)
jne 0x16fcb
movq %r15, %rdi
movq %rax, %rsi
movq %rbx, %rdx
movq %rbp, %rcx
movq %r13, %r8
movq %r14, %r9
callq 0x17e95
movq 0x10(%rsp), %r14
testq %r14, %r14
je 0x16fe9
xorl %r15d, %r15d
movq (%rbx,%r15,8), %rdi
callq 0x2b4c3
incq %r15
cmpq %r15, %r14
jne 0x16fd8
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x122c0
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/frontend/parser_array.c
// Function: prv_append_const_el
static uint8_t *prv_append_const_el(subtilis_parser_t *p, subtilis_exp_t *e,
				    const subtilis_type_t *el_type,
				    size_t element_size, uint8_t *buffer,
				    size_t el, size_t *max_els,
				    subtilis_error_t *err)
{
	uint8_t *new_buf;
	size_t new_max;

	if (el == *max_els) {
		new_max = *max_els + SUBTILIS_CONFIG_CONSTANT_ARRAY_GRAN;
		new_buf = realloc(buffer, new_max * element_size);
		if (!new_buf) {
			subtilis_error_set_oom(err);
			goto cleanup;
		}
		buffer = new_buf;
		*max_els = new_max;
	}

	if (!subtilis_type_if_is_const(&e->type)) {
		subtilis_error_set_const_expression_expected(
		    err, p->l->stream->name, p->l->line);
		goto cleanup;
	}

	e = subtilis_type_if_coerce_type(p, e, el_type, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	memcpy(&buffer[el * element_size], &e->exp.ir_op, element_size);

cleanup:

	subtilis_exp_delete(e);

	return buffer;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, %r12
movq %r8, %rbx
movq %rdx, 0x10(%rsp)
movq %rsi, %r14
movq %rdi, %r13
movq 0x50(%rsp), %rbp
movq (%rbp), %r15
cmpq %r9, %r15
movq %rcx, 0x8(%rsp)
jne 0x177ea
addq $0x100, %r15            # imm = 0x100
movq %r15, %rsi
imulq %rcx, %rsi
movq %rbx, %rdi
callq 0x12210
testq %rax, %rax
je 0x17860
movq %r15, (%rbp)
movq %rax, %rbx
movq %r14, %rdi
callq 0x36a5a
testb %al, %al
je 0x17837
movq %r13, %rdi
movq %r14, %rsi
movq 0x10(%rsp), %rdx
movq 0x58(%rsp), %r15
movq %r15, %rcx
callq 0x379c3
movq %rax, %r14
cmpl $0x0, (%r15)
jne 0x1787b
movq 0x8(%rsp), %rdx
imulq %rdx, %r12
addq %rbx, %r12
movq %r14, %rsi
addq $0x148, %rsi            # imm = 0x148
movq %r12, %rdi
callq 0x121b0
jmp 0x1787b
movq (%r13), %rax
movq 0x30(%rax), %rdx
movl 0x38(%rax), %ecx
leaq 0x5bca3(%rip), %r8      # 0x734ec
movq 0x58(%rsp), %rdi
movl $0x48, %esi
movl $0x1eb, %r9d            # imm = 0x1EB
callq 0x14618
jmp 0x1787b
leaq 0x5bc85(%rip), %rdx     # 0x734ec
movq 0x58(%rsp), %rdi
movl $0x1, %esi
movl $0x1e2, %ecx            # imm = 0x1E2
callq 0x145f4
movq %r14, %rdi
callq 0x2b4c3
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/frontend/parser_array.c
// Function: prv_check_initialiser_count
static void prv_check_initialiser_count(subtilis_parser_t *p, size_t entries,
					size_t mem_reg, subtilis_exp_t *maxe,
					subtilis_error_t *err)
{
	subtilis_exp_t *sizee = NULL;
	subtilis_ir_operand_t error_label;
	subtilis_ir_operand_t ok_label;

	error_label = subtilis_array_type_error_label(p);
	ok_label.label = subtilis_ir_section_new_label(p->current);

	sizee = subtilis_exp_new_int32(entries, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	sizee = subtilis_type_if_lte(p, sizee, maxe, err);
	maxe = NULL;
	subtilis_ir_section_add_instr_reg(p->current, SUBTILIS_OP_INSTR_JMPC,
					  sizee->exp.ir_op, ok_label,
					  error_label, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	subtilis_ir_section_add_label(p->current, ok_label.label, err);

cleanup:
	subtilis_exp_delete(maxe);
	subtilis_exp_delete(sizee);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %r15
callq 0x42577
movq %rax, %rbp
movq 0x48(%r15), %rdi
callq 0x2d00a
movq %rax, %r13
movl %r14d, %edi
movq %rbx, %rsi
callq 0x2bb29
movq %rax, %r14
cmpl $0x0, (%rbx)
jne 0x1791c
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x3720e
movq %rax, %r14
movq 0x48(%r15), %rdi
movq 0x148(%rax), %rdx
movl $0x43, %esi
movq %r13, %rcx
movq %rbp, %r8
movq %rbx, %r9
callq 0x2c0c2
cmpl $0x0, (%rbx)
jne 0x17919
movq 0x48(%r15), %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x2d017
xorl %r12d, %r12d
movq %r12, %rdi
callq 0x2b4c3
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2b4c3
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/frontend/parser_array.c
// Function: prv_check_expression_list_size
static void prv_check_expression_list_size(subtilis_parser_t *p,
					   const subtilis_array_desc_t *d,
					   subtilis_exp_t **ee, size_t entries,
					   size_t element_size,
					   subtilis_error_t *err)
{
	int32_t dim;
	bool dynamic = false;
	size_t max_elements = 1;
	subtilis_exp_t *maxe = NULL;
	subtilis_exp_t *maxe_dup = NULL;
	size_t i = 0;
	const subtilis_type_t *type = d->t;

	do {
		dim = type->params.array.dims[i];
		if (dim == SUBTILIS_DYNAMIC_DIMENSION) {
			max_elements = SIZE_MAX;
			dynamic = true;
			break;
		}
		max_elements *= (dim + 1);
		i++;
	} while (i < type->params.array.num_dims);

	if (!dynamic) {
		if (entries > max_elements)
			subtilis_error_bad_element_count(
			    err, p->l->stream->name, p->l->line);
	} else {
		maxe = subtilis_array_type_dynamic_size(p, d->reg, d->loc, err);
		if (err->type != SUBTILIS_ERROR_OK)
			goto cleanup;
		maxe_dup = subtilis_type_if_dup(maxe, err);
		if (err->type != SUBTILIS_ERROR_OK)
			goto cleanup;
		prv_check_initialiser_count(p, entries * element_size, d->reg,
					    maxe_dup, err);
	}

cleanup:

	subtilis_exp_delete(maxe);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r8, %rbx
movq %rcx, %r15
movq %rdx, %r12
movq %rdi, %r14
movq 0x8(%rsi), %rcx
movl $0x1, %eax
xorl %edi, %edi
movslq 0xc(%rcx,%rdi,4), %rdx
cmpq $-0x1, %rdx
je 0x17b79
leaq 0x1(%rdx), %r8
imulq %r8, %rax
incq %rdi
movslq 0x8(%rcx), %r8
cmpq %r8, %rdi
jb 0x17b58
jmp 0x17b80
movq $-0x1, %rax
cmpl $-0x1, %edx
je 0x17bb3
cmpq %r12, %rax
jae 0x17bae
movq (%r14), %rax
movq 0x30(%rax), %rdx
movl 0x38(%rax), %ecx
leaq 0x5b951(%rip), %r8      # 0x734ec
movq %rbx, %rdi
movl $0x47, %esi
movl $0x3b1, %r9d            # imm = 0x3B1
callq 0x14618
xorl %r13d, %r13d
jmp 0x17bf6
movq 0x10(%rsi), %rax
movq 0x18(%rsi), %rdx
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rcx
callq 0x44326
movq %rax, %r13
cmpl $0x0, (%rbx)
jne 0x17bf6
movq %r13, %rdi
movq %rbx, %rsi
callq 0x362d2
cmpl $0x0, (%rbx)
jne 0x17bf6
imulq %r12, %r15
movq %r14, %rdi
movq %r15, %rsi
movq %rax, %rdx
movq %rbx, %rcx
callq 0x17895
movq %r13, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x2b4c3
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/frontend/parser_array.c
// Function: prv_parse_fn_list
static void prv_parse_fn_list(subtilis_parser_t *p, size_t array_base,
			      subtilis_exp_t **ee, size_t entries,
			      size_t element_size, subtilis_error_t *err)
{
	size_t i;
	subtilis_ir_operand_t op1;
	subtilis_ir_operand_t op2;

	op1.reg = array_base;
	op2.integer = (int32_t)element_size;

	for (i = 0; i < entries - 1; i++) {
		subtilis_type_if_assign_to_mem(p, op1.reg, 0, ee[i], err);
		ee[i] = NULL;
		if (err->type != SUBTILIS_ERROR_OK)
			return;
		op1.reg = subtilis_ir_section_add_instr(
		    p->current, SUBTILIS_OP_INSTR_ADDI_I32, op1, op2, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return;
	}
	subtilis_type_if_assign_to_mem(p, op1.reg, 0, ee[i], err);
	ee[i] = NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r14
movq %rcx, %r13
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %r15
decq %r13
je 0x17f0a
movl %r8d, %eax
movq %rax, (%rsp)
xorl %ebp, %ebp
movq (%rbx,%rbp,8), %rcx
movq %r15, %rdi
movq %r12, %rsi
xorl %edx, %edx
movq %r14, %r8
callq 0x36416
movq $0x0, (%rbx,%rbp,8)
cmpl $0x0, (%r14)
jne 0x17f28
movq 0x48(%r15), %rdi
movl $0x9, %esi
movq %r12, %rdx
movq (%rsp), %rcx
movq %r14, %r8
callq 0x2c00f
cmpl $0x0, (%r14)
jne 0x17f28
movq %rax, %r12
incq %rbp
cmpq %rbp, %r13
jne 0x17ebd
jmp 0x17f0c
xorl %ebp, %ebp
movq (%rbx,%rbp,8), %rcx
movq %r15, %rdi
movq %r12, %rsi
xorl %edx, %edx
movq %r14, %r8
callq 0x36416
movq $0x0, (%rbx,%rbp,8)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/frontend/parser_assignment.c
// Function: subtilis_parser_create_array_ref
void subtilis_parser_create_array_ref(subtilis_parser_t *p,
				      const char *var_name,
				      const subtilis_type_t *array_type,
				      subtilis_exp_t *e, bool local,
				      subtilis_error_t *err)
{
	subtilis_type_t type;
	const subtilis_symbol_t *s;

	if (array_type->type != e->type.type) {
		subtilis_error_set_array_type_mismatch(err, p->l->stream->name,
						       p->l->line);
		goto cleanup;
	}
	subtilis_type_init_copy(&type, &e->type, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	/*
	 * If the expression is a temporary variable and we're assigning to
	 * a local variable, we can simply just promote the temporary to a
	 * full local variable and avoid copying the data.
	 */

	if (local && e->temporary) {
		(void)subtilis_symbol_table_promote_tmp(
		    p->local_st, &e->type, e->temporary, var_name, err);
		subtilis_type_free(&type);
		subtilis_exp_delete(e);
		return;
	}

	s = subtilis_symbol_table_insert(local ? p->local_st : p->st, var_name,
					 &type, err);
	subtilis_type_free(&type);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	subtilis_array_type_create_ref(
	    p, var_name, s,
	    local ? SUBTILIS_IR_REG_LOCAL : SUBTILIS_IR_REG_GLOBAL, e, err);
	return;

cleanup:

	subtilis_exp_delete(e);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x158, %rsp            # imm = 0x158
movq %r9, %r14
movq %rcx, %rbx
movq %rdi, %r12
movl (%rdx), %eax
cmpl (%rcx), %eax
jne 0x17fa4
movl %r8d, %ebp
movq %rsi, %r15
leaq 0x10(%rsp), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x2f72e
cmpl $0x0, (%r14)
jne 0x17fc9
testb %bpl, %bpl
je 0x17fed
movq 0x158(%rbx), %rdx
testq %rdx, %rdx
je 0x17fe3
movq 0x68(%r12), %rdi
movq %rbx, %rsi
movq %r15, %rcx
movq %r14, %r8
callq 0x2eb46
leaq 0x10(%rsp), %rdi
callq 0x2f843
jmp 0x17fc9
movq (%r12), %rax
movq 0x30(%rax), %rdx
movl 0x38(%rax), %ecx
leaq 0x5b5f6(%rip), %r8      # 0x735ac
movq %r14, %rdi
movl $0x41, %esi
movl $0x58, %r9d
callq 0x14618
movq %rbx, %rdi
callq 0x2b4c3
addq $0x158, %rsp            # imm = 0x158
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x68, %eax
testb %bpl, %bpl
jne 0x17ff2
movl $0x60, %eax
movq (%r12,%rax), %rdi
leaq 0x10(%rsp), %r13
movq %r15, %rsi
movq %r13, %rdx
movq %r14, %rcx
callq 0x2e6e8
movq %rax, 0x8(%rsp)
movq %r13, %rdi
callq 0x2f843
cmpl $0x0, (%r14)
jne 0x17fc9
movzbl %bpl, %ecx
incq %rcx
movq %r12, %rdi
movq %r15, %rsi
movq 0x8(%rsp), %rdx
movq %rbx, %r8
movq %r14, %r9
callq 0x42ecb
jmp 0x17fd1
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/frontend/parser_assignment.c
// Function: subtilis_parser_assign_local_num
subtilis_exp_t *subtilis_parser_assign_local_num(subtilis_parser_t *p,
						 subtilis_token_t *t,
						 const char *var_name,
						 const subtilis_type_t *type,
						 subtilis_error_t *err)
{
	subtilis_exp_t *e;

	e = subtilis_parser_expression(p, t, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return NULL;
	if (!subtilis_type_if_is_numeric(&e->type)) {
		subtilis_error_set_expected(err, "Numeric expression",
					    subtilis_type_name(&e->type),
					    p->l->stream->name, p->l->line);
		subtilis_exp_delete(e);
		return NULL;
	}
	e = subtilis_type_if_copy_var(p, e, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return NULL;
	e = subtilis_type_if_exp_to_var(p, e, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return NULL;
	e = subtilis_type_if_coerce_type(p, e, type, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return NULL;

	return e;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r15
movq %rdi, %r14
movq %r8, %rdx
callq 0x1eb88
cmpl $0x0, (%rbx)
jne 0x180f5
movq %rax, %r12
movq %rax, %rdi
callq 0x37676
testb %al, %al
je 0x180b1
movq %r14, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x362b9
cmpl $0x0, (%rbx)
jne 0x180f5
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x36269
cmpl $0x0, (%rbx)
jne 0x180f5
movq %r14, %rdi
movq %rax, %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x379c3
movq %rax, %rcx
xorl %eax, %eax
cmpl $0x0, (%rbx)
cmoveq %rcx, %rax
jmp 0x180f7
movq %r12, %rdi
callq 0x2f882
movq (%r14), %rcx
movq 0x30(%rcx), %r8
movl 0x38(%rcx), %r9d
leaq 0x5b4e1(%rip), %r10     # 0x735ac
leaq 0x5b4f7(%rip), %rdx     # 0x735c9
movq %rbx, %rdi
movl $0x1d, %esi
movq %rax, %rcx
pushq $0x1e3                  # imm = 0x1E3
pushq %r10
callq 0x1442a
addq $0x10, %rsp
movq %r12, %rdi
callq 0x2b4c3
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/frontend/parser_assignment.c
// Function: subtilis_parser_zero_local_fn
void subtilis_parser_zero_local_fn(subtilis_parser_t *p, subtilis_token_t *t,
				   const char *var_name,
				   const subtilis_type_t *id_type,
				   subtilis_error_t *err)
{
	subtilis_type_t type;
	subtilis_exp_t *e = NULL;

	subtilis_type_init_copy(&type, id_type, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;
	subtilis_complete_custom_type(p, var_name, &type, err);
	if (err->type != SUBTILIS_ERROR_OK)

		goto cleanup;
	e = subtilis_type_if_zero(p, &type, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	(void)subtilis_symbol_table_insert_reg(p->local_st, var_name, &type,
					       e->exp.ir_op.reg, err);

cleanup:
	subtilis_exp_delete(e);
	subtilis_type_free(&type);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x148, %rsp            # imm = 0x148
movq %r8, %rbx
movq %rdx, %r14
movq %rdi, %r15
movq %rsp, %rdi
movq %rcx, %rsi
movq %r8, %rdx
callq 0x2f72e
cmpl $0x0, (%rbx)
jne 0x18188
movq %rsp, %rdx
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rcx
callq 0x1f7e6
cmpl $0x0, (%rbx)
je 0x18148
xorl %r12d, %r12d
jmp 0x18178
movq %rsp, %rsi
movq %r15, %rdi
movq %rbx, %rdx
callq 0x35f70
movq %rax, %r12
cmpl $0x0, (%rbx)
jne 0x18178
movq 0x68(%r15), %rdi
movq 0x148(%r12), %rcx
movq %rsp, %rdx
movq %r14, %rsi
movq %rbx, %r8
callq 0x2ec2e
movq %r12, %rdi
callq 0x2b4c3
movq %rsp, %rdi
callq 0x2f843
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r12
popq %r14
popq %r15
retq