LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/common/error.c
// Function: subtilis_error_set_int
void subtilis_error_set_int(subtilis_error_t *e, subtilis_error_type_t type,
			    int data1, int data2, const char *file,
			    unsigned int line, const char *subtilis_file,
			    unsigned int subtilis_line)
{
	char num1[32];
	char num2[32];

	snprintf(num1, sizeof(num1), "%d", data1);
	snprintf(num2, sizeof(num2), "%d", data2);

	subtilis_error_set_full(e, type, num1, num2, file, line, subtilis_file,
				subtilis_line);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %r9d, 0x4(%rsp)
movq %r8, 0x8(%rsp)
movl %ecx, %ebp
movl %edx, %ecx
movl %esi, %r15d
movq %rdi, %r12
leaq 0x59497(%rip), %r13     # 0x6d639
leaq 0x10(%rsp), %rdi
pushq $0x20
popq %rbx
movq %rbx, %rsi
movq %r13, %rdx
xorl %eax, %eax
callq 0x12120
leaq 0x30(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
movq %r13, %rdx
movl %ebp, %ecx
xorl %eax, %eax
callq 0x12120
movq %r12, %rdi
movl %r15d, %esi
leaq 0x10(%rsp), %rdx
movq %r14, %rcx
movq 0x8(%rsp), %r8
movl 0x4(%rsp), %r9d
movl 0x98(%rsp), %eax
pushq %rax
pushq 0x98(%rsp)
callq 0x140cd
addq $0x68, %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/error.c
// Function: subtilis_error_set_dbl
void subtilis_error_set_dbl(subtilis_error_t *e, subtilis_error_type_t type,
			    double data1, double data2, const char *file,
			    unsigned int line, const char *subtilis_file,
			    unsigned int subtilis_line)
{
	char num1[32];
	char num2[32];

	snprintf(num1, sizeof(num1), "%f", data1);
	snprintf(num2, sizeof(num2), "%f", data2);

	subtilis_error_set_full(e, type, num1, num2, file, line, subtilis_file,
				subtilis_line);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %r9, 0x10(%rsp)
movq %r8, 0x18(%rsp)
movl %ecx, 0x4(%rsp)
movq %rdx, %r15
movsd %xmm1, 0x8(%rsp)
movl %esi, %r12d
movq %rdi, %r13
leaq 0x5c47b(%rip), %rbx     # 0x706b6
leaq 0x20(%rsp), %rdi
pushq $0x20
popq %r14
movq %r14, %rsi
movq %rbx, %rdx
movb $0x1, %al
callq 0x12120
leaq 0x40(%rsp), %rbp
movq %rbp, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movsd 0x8(%rsp), %xmm0
movb $0x1, %al
callq 0x12120
movq %r13, %rdi
movl %r12d, %esi
leaq 0x20(%rsp), %rdx
movq %rbp, %rcx
movq %r15, %r8
movl 0x4(%rsp), %r9d
pushq 0x10(%rsp)
pushq 0x20(%rsp)
callq 0x140cd
addq $0x78, %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/error.c
// Function: subtilis_error_fprintf
void subtilis_error_fprintf(FILE *f, subtilis_error_t *e, bool verbose)
{
	int args;

	if (e->type == SUBTILIS_ERROR_OK)
		return;
	if (strlen(e->file) > 0)
		fprintf(f, "%s: %d: ", e->file, e->line);

	args = prv_errors[e->type].args;
	if (args == 0)
		fprintf(f, "%s", prv_errors[e->type].msg);
	else if (args == 1)
		fprintf(f, prv_errors[e->type].msg, e->data1);
	else if (args == 2)
		fprintf(f, prv_errors[e->type].msg, e->data1, e->data2);
	if (verbose)
		fprintf(f, "  generated by %s:%d\n", e->subtilis_file,
			e->subtilis_line);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl (%rsi), %eax
testl %eax, %eax
je 0x1440a
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
cmpb $0x0, 0x804(%rsi)
je 0x14385
leaq 0x804(%rbx), %rdx
movl 0xa04(%rbx), %ecx
leaq 0x57d69(%rip), %rsi     # 0x6c0e2
movq %r14, %rdi
xorl %eax, %eax
callq 0x12170
movl (%rbx), %eax
movl %eax, %ecx
shlq $0x4, %rcx
leaq 0x86a8e(%rip), %rdx     # 0x9ae20
leaq (%rdx,%rcx), %rax
movl 0x8(%rcx,%rdx), %ecx
cmpl $0x2, %ecx
je 0x143c8
cmpl $0x1, %ecx
je 0x143b5
testl %ecx, %ecx
jne 0x143e0
movq (%rax), %rdi
movq %r14, %rsi
callq 0x12130
jmp 0x143e0
movq (%rax), %rsi
leaq 0x4(%rbx), %rdx
movq %r14, %rdi
xorl %eax, %eax
callq 0x12170
jmp 0x143e0
movq (%rax), %rsi
leaq 0x4(%rbx), %rdx
leaq 0x404(%rbx), %rcx
movq %r14, %rdi
xorl %eax, %eax
callq 0x12170
testb %bpl, %bpl
je 0x1440a
movl 0xc08(%rbx), %ecx
addq $0xa08, %rbx            # imm = 0xA08
leaq 0x57cf2(%rip), %rsi     # 0x6c0eb
movq %r14, %rdi
movq %rbx, %rdx
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x12170
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/common/error.c
// Function: subtilis_error_set_bad_arg_type
void subtilis_error_set_bad_arg_type(subtilis_error_t *e, size_t arg,
				     const char *expected, const char *got,
				     const char *file, unsigned int line,
				     const char *subtilis_file,
				     unsigned int subtilis_line)
{
	char arg_num[32];
	char msg[SUBTILIS_CONFIG_ERROR_LEN];

	snprintf(arg_num, sizeof(arg_num), "%zu", arg);
	snprintf(msg, sizeof(msg), "expected %s got %s", expected, got);

	subtilis_error_set_full(e, SUBTILIS_ERROR_BAD_ARG_TYPE, arg_num, msg,
				file, line, subtilis_file, subtilis_line);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x428, %rsp            # imm = 0x428
movl %r9d, %ebx
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %rcx
movq %rdi, %r13
leaq 0x59d68(%rip), %rdx     # 0x6e200
movq %rsp, %rdi
pushq $0x20
popq %rsi
xorl %eax, %eax
callq 0x12120
leaq 0x57c69(%rip), %rdx     # 0x6c115
leaq 0x20(%rsp), %rbp
movl $0x400, %esi            # imm = 0x400
movq %rbp, %rdi
movq %r12, %rcx
movq %r15, %r8
xorl %eax, %eax
callq 0x12120
pushq $0x2a
popq %rsi
movq %r13, %rdi
movq %rsp, %rdx
movq %rbp, %rcx
movq %r14, %r8
movl %ebx, %r9d
movl 0x468(%rsp), %eax
pushq %rax
pushq 0x468(%rsp)
callq 0x140cd
addq $0x438, %rsp            # imm = 0x438
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/common/utils.c
// Function: subtilis_utils_basename
const char *subtilis_utils_basename(const char *path)
{
	size_t len = strlen(path);
	int i;

	if (len == 0)
		return path;
	i = ((int)len) - 1;
	if (path[i] == SUBTILIS_CONFIG_PATH_SEPARATOR)
		i--;
	for (; i >= 0 && path[i] != SUBTILIS_CONFIG_PATH_SEPARATOR; i--)
		;
	if (i >= 0)
		return &path[i + 1];
	else
		return path;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x120f0
testq %rax, %rax
je 0x14534
movslq %eax, %rcx
leaq -0x1(%rcx), %rdx
leal -0x2(%rcx), %eax
cmpb $0x2e, -0x1(%rbx,%rcx)
cmovnel %edx, %eax
testl %eax, %eax
js 0x14534
movl %eax, %ecx
decl %eax
cmpb $0x2e, (%rbx,%rcx)
jne 0x14520
addq %rcx, %rbx
incq %rbx
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/common/utils.c
// Function: subtilis_get_i32_time
int32_t subtilis_get_i32_time(void)
{
	struct tm ts;
	time_t t = time(NULL);

	memset(&ts, 0, sizeof(ts));
	ts.tm_year = 2018 - 1900;
	ts.tm_mon = 11;
	ts.tm_mday = 22;

	t = t - mktime(&ts);

	return (int32_t)(t * 100);
}

// Assembly:
pushq %rbx
subq $0x40, %rsp
xorl %edi, %edi
callq 0x121c0
movq %rax, %rbx
xorps %xmm0, %xmm0
movq %rsp, %rdi
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, (%rdi)
andq $0x0, 0x30(%rdi)
movaps %xmm0, 0x20(%rdi)
movabsq $0x760000000b, %rax     # imm = 0x760000000B
movq %rax, 0x10(%rdi)
movl $0x16, 0xc(%rdi)
callq 0x121f0
subl %eax, %ebx
imull $0x64, %ebx, %eax
addq $0x40, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/common/utils.c
// Function: subtils_get_file_size
bool subtils_get_file_size(FILE *f, int32_t *size)
{
	long cur_pos = ftell(f);
	long fsize;

	if (cur_pos == -1)
		return false;

	if (fseek(f, 0L, SEEK_END))
		return false;

	fsize = (int32_t)ftell(f);
	if (fsize == -1)
		return false;

	if (fseek(f, 0L, cur_pos))
		return false;

	*size = fsize;

	return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
callq 0x12180
cmpq $-0x1, %rax
je 0x145c5
movq %rax, %r12
xorl %r15d, %r15d
pushq $0x2
popq %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x12200
testl %eax, %eax
jne 0x145c8
movq %r14, %rdi
callq 0x12180
movq %rax, %r13
cmpl $-0x1, %r13d
jne 0x145d5
xorl %r15d, %r15d
movl %r15d, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
xorl %r15d, %r15d
movq %r14, %rdi
xorl %esi, %esi
movl %r12d, %edx
callq 0x12200
testl %eax, %eax
jne 0x145c8
movl %r13d, (%rbx)
movb $0x1, %r15b
jmp 0x145c8
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/common/utils.c
// Function: subtilis_make_cmdline
char *subtilis_make_cmdline(int argc, char **argv, subtilis_error_t *err)
{
	size_t size = 0;
	size_t i;
	char *ret_val;

	for (i = 1; i < argc; i++)
		size += strlen(argv[i]) + 1;

	if (size < 2) {
		subtilis_error_set_assertion_failed(err);
		return NULL;
	}

	ret_val = malloc(size);
	if (!ret_val) {
		subtilis_error_set_oom(err);
		return NULL;
	}
	ret_val[0] = 0;

	for (i = 1; i < argc - 1; i++) {
		strcat(ret_val, argv[i]);
		strcat(ret_val, " ");
	}
	strcat(ret_val, argv[i]);

	return ret_val;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %rbx
movl %edi, %ebp
movslq %edi, %r12
pushq $0x1
popq %r13
xorl %r15d, %r15d
cmpq %r12, %r13
jae 0x14627
movq (%rbx,%r13,8), %rdi
callq 0x120f0
addq %rax, %r15
incq %r15
incq %r13
jmp 0x1460e
cmpq $0x1, %r15
ja 0x1463b
leaq 0x588f5(%rip), %rdx     # 0x6cf29
pushq $0xf
popq %rsi
pushq $0x59
jmp 0x14688
movq %r15, %rdi
callq 0x121d0
testq %rax, %rax
je 0x1467c
movq %rax, %r15
movb $0x0, (%rax)
decl %ebp
movslq %ebp, %r14
pushq $0x1
popq %r12
movq (%rbx,%r12,8), %rsi
movq %r15, %rdi
callq 0x12270
cmpq %r14, %r12
jae 0x14694
movq %r15, %rdi
callq 0x120f0
movw $0x20, (%r15,%rax)
incq %r12
jmp 0x14657
leaq 0x588a6(%rip), %rdx     # 0x6cf29
pushq $0x1
popq %rsi
pushq $0x5f
popq %rcx
movq %r14, %rdi
callq 0x1429e
xorl %r15d, %r15d
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/common/buffer.c
// Function: subtilis_buffer_reserve
void subtilis_buffer_reserve(subtilis_buffer_t *buffer, size_t length,
			     subtilis_error_t *err)
{
	size_t rem = 0;
	size_t new_max_size = 0;
	size_t extra_space = sizeof(subtilis_fixed_buffer_t);
	subtilis_fixed_buffer_t *b = buffer->buffer;

	if (b) {
		length += b->start;
		if (length <= b->max_size)
			return;
	}
	rem = length % buffer->granularity;
	new_max_size =
	    (rem == 0) ? length : (length - rem) + buffer->granularity;

	b = (subtilis_fixed_buffer_t *)realloc(buffer->buffer,
					       new_max_size + extra_space);
	if (!b) {
		subtilis_error_set_oom(err);
		return;
	}

	if (!buffer->buffer) {
		b->start = 0;
		b->end = 0;
	}
	b->max_size = new_max_size;
	buffer->buffer = b;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0x146ce
addq 0x8(%rdi), %rsi
cmpq (%rdi), %rsi
jbe 0x14709
movq (%rbx), %r15
movq %rsi, %rax
xorl %edx, %edx
divq %r15
addq %rsi, %r15
subq %rdx, %r15
testq %rdx, %rdx
cmoveq %rsi, %r15
leaq 0x20(%r15), %rsi
callq 0x12210
testq %rax, %rax
je 0x1470f
cmpq $0x0, 0x8(%rbx)
jne 0x14702
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
movq %r15, (%rax)
movq %rax, 0x8(%rbx)
popq %rbx
popq %r14
popq %r15
retq
leaq 0x58d63(%rip), %rdx     # 0x6d479
pushq $0x1
popq %rsi
pushq $0x30
popq %rcx
movq %r14, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x1429e
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/common/buffer.c
// Function: subtilis_buffer_expand_if_full
void subtilis_buffer_expand_if_full(subtilis_buffer_t *buffer,
				    subtilis_error_t *err)
{
	subtilis_fixed_buffer_t *b = buffer->buffer;

	if (!b)
		subtilis_buffer_reserve(buffer, buffer->granularity, err);
	else if ((b->max_size - b->end) == 0)
		subtilis_buffer_reserve(buffer,
					buffer->granularity + b->max_size, err);
}

// Assembly:
movq %rsi, %rdx
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0x14746
movq (%rax), %rsi
cmpq 0x10(%rax), %rsi
jne 0x1474e
addq (%rdi), %rsi
jmp 0x146b1
movq (%rdi), %rsi
jmp 0x146b1
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x14773
addq 0x10(%rax), %rbx
movq %rbx, %rsi
subq 0x8(%rax), %rsi
jmp 0x14776
movq %rbx, %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x146b1
cmpl $0x0, (%r15)
jne 0x1478f
movq 0x8(%r14), %rax
movq %rbx, 0x10(%rax)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x147da
movq %rcx, %r12
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0x147c2
movq 0x10(%rax), %r13
subq 0x8(%rax), %r13
jmp 0x147c5
xorl %r13d, %r13d
movq %r15, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x1474f
cmpl $0x0, (%r12)
je 0x147e4
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_O2/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 0x14890
movq 0x10(%rax), %r15
subq 0x8(%rax), %r15
jmp 0x14893
xorl %r15d, %r15d
cmpq %r12, %r15
jae 0x148bd
leaq 0x58bda(%rip), %rdx     # 0x6d479
pushq $0xf
popq %rsi
movq %r13, %rdi
movl $0x8c, %ecx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1429e
leaq (%r15,%rbx), %rsi
movq %rbp, %rdi
movq %r13, %rdx
callq 0x146b1
cmpl $0x0, (%r13)
jne 0x1490d
movq 0x8(%rbp), %rbp
leaq (%r12,%rbp), %rax
movq 0x8(%rbp), %rcx
leaq (%rcx,%rax), %r13
addq $0x18, %r13
subq %r12, %r15
jbe 0x148fb
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_O2/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 0x14954
movq %rdx, %rbx
leaq (%rdx,%rsi), %rdi
movq 0x8(%r14), %rax
movq 0x10(%r14), %rdx
subq %rax, %rdx
subq %rdi, %rdx
jae 0x14972
leaq 0x58b32(%rip), %rdx     # 0x6d479
pushq $0xf
popq %rsi
movq %rcx, %rdi
movl $0xb1, %ecx
jmp 0x14966
leaq 0x58b1e(%rip), %rdx     # 0x6d479
pushq $0xf
popq %rsi
movq %rcx, %rdi
movl $0xaa, %ecx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1429e
jne 0x14979
addq %rsi, %rax
jmp 0x1499c
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_O2/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 0x149cb
movq 0x10(%rax), %rdx
cmpq %rdx, 0x8(%rax)
je 0x149cb
cmpb $0x0, 0x17(%rax,%rdx)
je 0x149d8
leaq 0x7(%rsp), %rsi
pushq $0x1
popq %rdx
callq 0x14795
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x14a00
movq 0x8(%rax), %rcx
movq 0x10(%rax), %rdx
cmpq %rcx, %rdx
jbe 0x14a00
cmpb $0x0, 0x17(%rax,%rdx)
jne 0x14a00
decq %rdx
movq %rdx, 0x10(%rax)
jmp 0x149eb
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x14aa6
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)
andq $0x0, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O2/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 0x14d02
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
movq 0x90(%rbx), %rdi
cmpq 0x80(%rbx), %r14
jae 0x14cad
movq (%rdi,%r14,8), %rdi
callq 0x33af2
incq %r14
jmp 0x14c8f
callq 0x122c0
xorl %r14d, %r14d
movq 0xa8(%rbx), %rdi
cmpq 0x98(%rbx), %r14
jae 0x14cd3
movq (%rdi,%r14,8), %rdi
callq 0x33bc1
incq %r14
jmp 0x14cb5
callq 0x122c0
movq 0x58(%rbx), %rdi
callq 0x2aca2
movq 0x70(%rbx), %rdi
callq 0x2cac8
movq 0x60(%rbx), %rdi
callq 0x2cac8
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x122c0
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq 0x48(%rdi), %rax
cmpb $0x1, 0x88(%rax)
jne 0x14d2b
cmpl $0x1, (%r15)
jne 0x14d5c
cmpl $0x1d, 0x8(%r15)
jne 0x14d5c
movq %r15, %rdi
callq 0x12a25
movl (%r15), %ecx
cmpl $0x1, %ecx
je 0x14dce
cmpl $0x2, %ecx
je 0x14d83
cmpl $0x6, %ecx
jne 0x14d98
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x17e60
movq (%r14), %rax
movq 0x30(%rax), %rdx
movl 0x38(%rax), %ecx
leaq 0x5871c(%rip), %r8      # 0x6d489
pushq $0x2e
popq %rsi
movq %rbx, %rdi
movl $0xbd, %r9d
popq %rbx
popq %r14
popq %r15
jmp 0x142c0
cmpb $0x3c, (%rax)
jne 0x14d98
cmpb $0x2d, 0x1(%rax)
jne 0x14d98
cmpb $0x0, 0x2(%rax)
je 0x14e23
movq (%r14), %rcx
movq 0x30(%rcx), %r8
movl 0x38(%rcx), %r9d
leaq 0x586df(%rip), %r10     # 0x6d489
leaq 0x59014(%rip), %rcx     # 0x6ddc5
pushq $0x10
popq %rsi
movq %rbx, %rdi
movq %rax, %rdx
pushq $0xcb
pushq %r10
callq 0x140cd
popq %rax
popq %rcx
popq %rbx
popq %r14
popq %r15
retq
movslq 0x8(%r15), %rax
leaq 0x87987(%rip), %rcx     # 0x9c760
movq (%rcx,%rax,8), %rax
testq %rax, %rax
je 0x14df2
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %r15
jmpq *%rax
movq %r15, %rdi
callq 0x12a25
movq (%r14), %rcx
movq 0x30(%rcx), %r8
movl 0x38(%rcx), %r9d
leaq 0x5867d(%rip), %r10     # 0x6d489
leaq 0x58fb2(%rip), %rcx     # 0x6ddc5
pushq $0x13
popq %rsi
movq %rbx, %rdi
movq %rax, %rdx
pushq $0xd4
jmp 0x14dbf
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x1c41a
// File: /workspace/github_c_makefile_star2_O2/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 0x15489
pushq $0x74
popq %rsi
movq %r14, %rdx
callq 0x2a9af
jmp 0x1549b
movq 0xa0(%rdi), %rdx
pushq $0x45
popq %rsi
movq %r14, %rcx
callq 0x2a997
cmpl $0x0, (%r14)
jne 0x154c0
movq (%rbx), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x12e0e
cmpl $0x0, (%r14)
jne 0x154c0
movq 0x48(%rbx), %rax
movb $0x1, 0x88(%rax)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x12e0e
cmpl $0x0, (%rbx)
je 0x154f9
addq $0x150, %rsp            # imm = 0x150
jmp 0x1555f
movq %r15, %rdi
callq 0x12a25
cmpl $0x1, (%r15)
jne 0x1552a
movl 0x8(%r15), %ecx
cmpl $0x3, %ecx
jae 0x1552a
leaq 0x8(%rsp), %rdx
movq %r14, %rdi
movq %r15, %rsi
cmpl $0x2, %ecx
jne 0x15565
movq %rbx, %rcx
callq 0x27dc0
jmp 0x1556d
movq (%r14), %rcx
movq 0x30(%rcx), %r8
movl 0x38(%rcx), %r9d
leaq 0x57f4d(%rip), %r10     # 0x6d489
leaq 0x57f75(%rip), %rdx     # 0x6d4b8
pushq $0x1d
popq %rsi
movq %rbx, %rdi
movq %rax, %rcx
pushq $0x1b6                  # imm = 0x1B6
pushq %r10
callq 0x140cd
addq $0x160, %rsp            # imm = 0x160
popq %rbx
popq %r14
popq %r15
retq
movq %rbx, %rcx
callq 0x1bdc7
movq %rax, %r15
cmpl $0x0, (%rbx)
jne 0x155b5
movq 0x48(%r14), %rax
cmpq 0x50(%r14), %rax
jne 0x15586
cmpq $0x0, 0x78(%r14)
je 0x155cc
movq (%r14), %rax
movq 0x30(%rax), %r8
movl 0x38(%rax), %r9d
leaq 0x57ef1(%rip), %rax     # 0x6d489
leaq 0x58826(%rip), %rcx     # 0x6ddc5
pushq $0x57
popq %rsi
movq %rbx, %rdi
movq %r15, %rdx
pushq $0x1c3                  # imm = 0x1C3
pushq %rax
callq 0x140cd
popq %rax
popq %rcx
leaq 0x8(%rsp), %rdi
callq 0x2dc7c
movq %r15, %rdi
callq 0x122c0
jmp 0x154f0
movq 0x60(%r14), %rdi
leaq 0x8(%rsp), %rdx
movq %r15, %rsi
movq %rbx, %rcx
callq 0x2cf9d
cmpl $0x68, (%rbx)
jne 0x155b5
movq (%r14), %rax
movq 0x30(%rax), %r8
movl 0x38(%rax), %r9d
leaq 0x57e92(%rip), %rax     # 0x6d489
leaq 0x587c7(%rip), %rcx     # 0x6ddc5
pushq $0x20
popq %rsi
movq %rbx, %rdi
movq %r15, %rdx
pushq $0x1ca                  # imm = 0x1CA
jmp 0x155ad
nop
// File: /workspace/github_c_makefile_star2_O2/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 0x1dc51
cmpl $0x0, (%r14)
jne 0x1569b
movq %rax, %rbp
leaq 0x8(%rax), %r13
movq %r13, %rdi
callq 0x357cc
testb %al, %al
je 0x1566e
movq (%rsp), %rcx
movq (%rbp), %r8
subq $0x8, %rsp
movq %r12, %rdi
movq %r15, %rsi
movq %r13, %rdx
movq %rbx, %r9
pushq %r14
callq 0x156ac
popq %rcx
popq %rdx
jmp 0x1569d
movq (%r12), %rax
movq 0x30(%rax), %r8
movl 0x38(%rax), %r9d
leaq 0x57e67(%rip), %rax     # 0x6d4e8
leaq 0x5873d(%rip), %rcx     # 0x6ddc5
pushq $0x3b
popq %rsi
movq %r14, %rdi
movq %rbx, %rdx
pushq $0x2b
pushq %rax
callq 0x140cd
popq %rax
popq %rcx
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_O2/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 0x4108f
addq $0x10, %rsp
cmpl $0x0, (%rbx)
jne 0x15954
movq %rax, %r12
leaq 0x8(%rsp), %rdx
movl $0x8, (%rdx)
movq %r15, %rdi
movq %r13, %rsi
movq %rbx, %rcx
callq 0x34108
cmpl $0x0, (%rbx)
je 0x1596a
movq %r12, %rdi
callq 0x29d88
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 0x285db
movq %rax, %rbx
movq %r12, %rdi
callq 0x29d88
movq %r13, %rdi
callq 0x2dc7c
jmp 0x15956
// File: /workspace/github_c_makefile_star2_O2/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 0x1dc51
cmpl $0x0, (%r14)
jne 0x15c11
movq %rax, %rbp
leaq 0x8(%rax), %r13
movq %r13, %rdi
callq 0x357ea
testb %al, %al
je 0x15be1
movq (%rsp), %rcx
movq (%rbp), %r8
subq $0x8, %rsp
movq %r12, %rdi
movq %r15, %rsi
movq %r13, %rdx
movq %rbx, %r9
pushq %r14
callq 0x15c22
popq %rcx
popq %rdx
jmp 0x15c13
movq (%r12), %rax
movq 0x30(%rax), %r8
movl 0x38(%rax), %r9d
leaq 0x578f4(%rip), %rax     # 0x6d4e8
leaq 0x581ca(%rip), %rcx     # 0x6ddc5
pushq $0x3c
popq %rsi
movq %r14, %rdi
movq %rbx, %rdx
pushq $0xf3
pushq %rax
callq 0x140cd
popq %rax
popq %rcx
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_O2/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
pushq $0xa
popq %rcx
movq %r9, %r8
callq 0x1e437
cmpl $0x0, (%r14)
je 0x16052
xorl %r14d, %r14d
movq %r14, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %r13, 0x8(%rsp)
movq (%rbp), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x12e0e
cmpl $0x0, (%r14)
je 0x16074
xorl %r14d, %r14d
jmp 0x160a2
testq %rbx, %rbx
je 0x160b9
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 0x346ae
popq %rcx
popq %rdx
movq %rax, %r14
xorl %r15d, %r15d
cmpq %r15, %rbx
je 0x16040
movq 0x10(%rsp,%r15,8), %rdi
callq 0x29d88
incq %r15
jmp 0x160a5
movq (%rbp), %rax
movq 0x30(%rax), %r8
movl 0x38(%rax), %r9d
leaq 0x5741c(%rip), %rax     # 0x6d4e8
leaq 0x57cf2(%rip), %rcx     # 0x6ddc5
pushq $0x3a
popq %rsi
movq %r14, %rdi
movq (%rsp), %rdx
pushq $0x1a0                  # imm = 0x1A0
pushq %rax
callq 0x140cd
popq %rax
popq %rcx
jmp 0x1606f
// File: /workspace/github_c_makefile_star2_O2/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 0x12e0e
cmpl $0x0, (%rbx)
jne 0x16198
movq %r12, %rdi
callq 0x12a25
cmpl $0x2, (%r12)
jne 0x16167
movzbl (%rax), %ecx
cmpl $0x7b, %ecx
je 0x16161
cmpl $0x28, %ecx
jne 0x16167
cmpb $0x0, 0x1(%rax)
jne 0x16167
movb $0x0, (%r14)
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 0x1e437
cmpb $0x0, 0x1(%rax)
je 0x161a9
movq (%r13), %rcx
movq 0x30(%rcx), %r8
movl 0x38(%rcx), %r9d
leaq 0x5736e(%rip), %r10     # 0x6d4e8
leaq 0x573ef(%rip), %rdx     # 0x6d570
pushq $0x1d
popq %rsi
movq %rbx, %rdi
movq %rax, %rcx
pushq $0x1d0                  # imm = 0x1D0
pushq %r10
callq 0x140cd
popq %rax
popq %rcx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r13, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x1e894
movq %rax, (%r15)
cmpl $0x0, (%rbx)
jne 0x16198
movq %rax, %rcx
movb $0x1, (%r14)
xorl %eax, %eax
testq %rcx, %rcx
setne %al
jmp 0x1619a
// File: /workspace/github_c_makefile_star2_O2/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 0x16d2b
movq %r14, %rdi
movq %rdx, %rsi
movq %rax, %rdx
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1cc3c
movq %rax, %rdi
movq %rdx, %rsi
callq 0x2d844
testb %al, %al
je 0x16d42
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq (%r14), %rax
movq 0x30(%rax), %rdx
movl 0x38(%rax), %ecx
leaq 0x56795(%rip), %r8      # 0x6d4e8
pushq $0x42
popq %rsi
movq %rbx, %rdi
movl $0x3fe, %r9d            # imm = 0x3FE
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x142c0
// File: /workspace/github_c_makefile_star2_O2/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 0x58(%rsp), %rbp
movq 0x50(%rsp), %r15
cmpq %r9, (%r15)
movq %rcx, 0x8(%rsp)
jne 0x17504
leaq 0x100(%r12), %rbp
movq %rbp, %rsi
imulq %rcx, %rsi
movq %rbx, %rdi
callq 0x12210
testq %rax, %rax
je 0x17571
movq %rbp, (%r15)
movq %rax, %rbx
movq 0x58(%rsp), %rbp
movq %r14, %rdi
callq 0x348f9
testb %al, %al
je 0x1754c
movq %r13, %rdi
movq %r14, %rsi
movq 0x10(%rsp), %rdx
movq %rbp, %rcx
callq 0x35977
movq %rax, %r14
cmpl $0x0, (%rbp)
jne 0x1758a
movq 0x8(%rsp), %rdx
imulq %rdx, %r12
addq %rbx, %r12
movq %r14, %rsi
addq $0x148, %rsi            # imm = 0x148
movq %r12, %rdi
callq 0x121b0
jmp 0x1758a
movq (%r13), %rax
movq 0x30(%rax), %rdx
movl 0x38(%rax), %ecx
leaq 0x55f8a(%rip), %r8      # 0x6d4e8
pushq $0x48
popq %rsi
movq %rbp, %rdi
movl $0x1eb, %r9d            # imm = 0x1EB
callq 0x142c0
jmp 0x1758a
leaq 0x55f70(%rip), %rdx     # 0x6d4e8
pushq $0x1
popq %rsi
movq 0x58(%rsp), %rdi
movl $0x1e2, %ecx            # imm = 0x1E2
callq 0x1429e
movq %r14, %rdi
callq 0x29d88
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_O2/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 0x3feb4
movq %rax, %rbp
movq 0x48(%r15), %rdi
callq 0x2b774
movq %rax, %r13
movl %r14d, %edi
movq %rbx, %rsi
callq 0x2a369
movq %rax, %r14
cmpl $0x0, (%rbx)
jne 0x17629
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x35195
movq %rax, %r14
movq 0x48(%r15), %rdi
movq 0x148(%rax), %rdx
pushq $0x43
popq %rsi
movq %r13, %rcx
movq %rbp, %r8
movq %rbx, %r9
callq 0x2a8c1
cmpl $0x0, (%rbx)
jne 0x17626
movq 0x48(%r15), %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x2b781
xorl %r12d, %r12d
movq %r12, %rdi
callq 0x29d88
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x29d88
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x1
popq %rax
xorl %edx, %edx
movslq 0xc(%rcx,%rdx,4), %rdi
cmpq $-0x1, %rdi
je 0x1787a
incq %rdi
imulq %rdi, %rax
incq %rdx
movslq 0x8(%rcx), %rdi
cmpq %rdi, %rdx
jb 0x17830
cmpq %r12, %rax
jae 0x17875
movq (%r14), %rax
movq 0x30(%rax), %rdx
movl 0x38(%rax), %ecx
leaq 0x55c84(%rip), %r8      # 0x6d4e8
pushq $0x47
popq %rsi
movq %rbx, %rdi
movl $0x3b1, %r9d            # imm = 0x3B1
callq 0x142c0
xorl %r13d, %r13d
jmp 0x178bd
movq 0x10(%rsi), %rax
movq 0x18(%rsi), %rdx
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rcx
callq 0x41b42
movq %rax, %r13
cmpl $0x0, (%rbx)
jne 0x178bd
movq %r13, %rdi
movq %rbx, %rsi
callq 0x341c4
cmpl $0x0, (%rbx)
jne 0x178bd
imulq %r12, %r15
movq %r14, %rdi
movq %r15, %rsi
movq %rax, %rdx
movq %rbx, %rcx
callq 0x175a4
movq %r13, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x29d88
nop
// File: /workspace/github_c_makefile_star2_O2/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 0x1793f
movl %r8d, %ebp
movq %rsi, %r15
leaq 0x10(%rsp), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x2db73
cmpl $0x0, (%r14)
jne 0x17960
testb %bpl, %bpl
je 0x1797a
movq 0x158(%rbx), %rdx
leaq 0x68(%r12), %rax
testq %rdx, %rdx
je 0x1797f
movq (%rax), %rdi
movq %rbx, %rsi
movq %r15, %rcx
movq %r14, %r8
callq 0x2d01c
leaq 0x10(%rsp), %rdi
callq 0x2dc7c
jmp 0x17960
movq (%r12), %rax
movq 0x30(%rax), %rdx
movl 0x38(%rax), %ecx
leaq 0x55c53(%rip), %r8      # 0x6d5a4
pushq $0x41
popq %rsi
pushq $0x58
popq %r9
movq %r14, %rdi
callq 0x142c0
movq %rbx, %rdi
callq 0x29d88
addq $0x158, %rsp            # imm = 0x158
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x60(%r12), %rax
movq (%rax), %rdi
leaq 0x10(%rsp), %r13
movq %r15, %rsi
movq %r13, %rdx
movq %r14, %rcx
callq 0x2cbb7
movq %rax, 0x8(%rsp)
movq %r13, %rdi
callq 0x2dc7c
cmpl $0x0, (%r14)
jne 0x17960
movzbl %bpl, %ecx
incq %rcx
movq %r12, %rdi
movq %r15, %rsi
movq 0x8(%rsp), %rdx
movq %rbx, %r8
movq %r14, %r9
callq 0x40812
jmp 0x17968
// File: /workspace/github_c_makefile_star2_O2/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 0x1dfd5
cmpl $0x0, (%rbx)
jne 0x17a7d
movq %rax, %r12
movq %rax, %rdi
callq 0x35655
testb %al, %al
je 0x17a3d
movq %r14, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x341ab
cmpl $0x0, (%rbx)
jne 0x17a7d
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x3415f
cmpl $0x0, (%rbx)
jne 0x17a7d
movq %r14, %rdi
movq %rax, %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x35977
movq %rax, %rcx
xorl %eax, %eax
cmpl $0x0, (%rbx)
cmoveq %rcx, %rax
jmp 0x17a7f
movq %r12, %rdi
callq 0x2dcbb
movq (%r14), %rcx
movq 0x30(%rcx), %r8
movl 0x38(%rcx), %r9d
leaq 0x55b4d(%rip), %r10     # 0x6d5a4
leaq 0x55b63(%rip), %rdx     # 0x6d5c1
pushq $0x1d
popq %rsi
movq %rbx, %rdi
movq %rax, %rcx
pushq $0x1e3                  # imm = 0x1E3
pushq %r10
callq 0x140cd
popq %rax
popq %rcx
movq %r12, %rdi
callq 0x29d88
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq