LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/parser_os.c
// Function: prv_get_args
static subtilis_exp_t **prv_get_args(subtilis_parser_t *p, subtilis_token_t *t,
				     size_t *no_args, subtilis_error_t *err)
{
	subtilis_exp_t **tmp;
	const char *tbuf;
	size_t i;
	subtilis_exp_t **args = NULL;
	size_t count = 0;
	size_t max_count = 0;
	subtilis_exp_t *e;

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

		tbuf = subtilis_token_get_text(t);
		if ((t->type == SUBTILIS_TOKEN_OPERATOR) &&
		    (!strcmp(tbuf, ","))) {
			e = NULL;
		} else {
			e = subtilis_parser_priority7(p, t, err);
			if (err->type != SUBTILIS_ERROR_OK)
				goto cleanup;
			tbuf = subtilis_token_get_text(t);
		}

		if (count == max_count) {
			if (args) {
				subtilis_error_set_sys_max_too_many_args(
				    err, p->l->stream->name, p->l->line);
				goto cleanup;
			}
			max_count += 16;
			tmp = realloc(args, sizeof(*args) * max_count);
			if (!tmp) {
				subtilis_error_set_oom(err);
				goto cleanup;
			}
			args = tmp;
		}
		args[count++] = e;
	} while ((t->type == SUBTILIS_TOKEN_OPERATOR) && (!strcmp(tbuf, ",")));

	*no_args = count;
	return args;

cleanup:

	for (i = 0; i < count; i++)
		subtilis_exp_delete(args[i]);
	free(args);
	*no_args = 0;

	return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r15
movq %rdx, 0x10(%rsp)
movq %rsi, %r13
movq %rdi, (%rsp)
xorl %r14d, %r14d
xorl %r12d, %r12d
movq $0x0, 0x8(%rsp)
movq (%rsp), %rax
movq (%rax), %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x12edc
cmpl $0x0, (%r15)
jne 0x27730
movq %r13, %rdi
callq 0x12ad0
cmpl $0x2, (%r13)
jne 0x27677
movq %rax, %rbp
cmpb $0x2c, (%rax)
jne 0x27677
cmpb $0x0, 0x1(%rbp)
je 0x276e9
movq (%rsp), %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x1e938
cmpl $0x0, (%r15)
jne 0x27730
movq %rax, %rbx
movq %r13, %rdi
callq 0x12ad0
movq %rax, %rbp
cmpq 0x8(%rsp), %r12
jne 0x276c9
testq %r14, %r14
jne 0x276ed
leaq 0x80(,%r12,8), %rdi
callq 0x121d0
testq %rax, %rax
je 0x27717
leaq 0x10(%r12), %rcx
movq %rcx, 0x8(%rsp)
movq %rax, %r14
movq %rbx, (%r14,%r12,8)
incq %r12
cmpl $0x2, (%r13)
jne 0x27756
cmpb $0x2c, (%rbp)
jne 0x27756
cmpb $0x0, 0x1(%rbp)
je 0x2763e
jmp 0x27756
xorl %ebx, %ebx
jmp 0x2769e
movq (%rsp), %rax
movq (%rax), %rax
movq 0x30(%rax), %rdx
movl 0x38(%rax), %ecx
leaq 0x4c38f(%rip), %r8      # 0x73a91
movq %r15, %rdi
movl $0x4e, %esi
movl $0x39, %r9d
callq 0x145c8
jmp 0x27730
leaq 0x4c373(%rip), %rdx     # 0x73a91
movq %r15, %rdi
movl $0x1, %esi
movl $0x3f, %ecx
callq 0x145a4
testq %r12, %r12
je 0x27748
xorl %ebx, %ebx
movq (%r14,%rbx,8), %rdi
callq 0x2b166
incq %rbx
cmpq %rbx, %r12
jne 0x27737
movq %r14, %rdi
callq 0x122c0
xorl %r12d, %r12d
xorl %r14d, %r14d
movq 0x10(%rsp), %rax
movq %r12, (%rax)
movq %r14, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/parser_os.c
// Function: prv_handle_flags
static size_t prv_handle_flags(subtilis_parser_t *p, subtilis_token_t *t,
			       bool *is_local, subtilis_error_t *err)
{
	subtilis_exp_t *e;
	bool local;
	size_t ret_val = SIZE_MAX;

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

	e = subtilis_var_lookup_ref(p, t, &local, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return SIZE_MAX;

	if (e->type.type != SUBTILIS_TYPE_INTEGER) {
		subtilis_error_set_sys_bad_args(err, p->l->stream->name,
						p->l->line);
		goto cleanup;
	}

	*is_local = local;
	ret_val = e->exp.ir_op.reg;

cleanup:

	subtilis_exp_delete(e);
	return ret_val;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %r13
movq (%rdi), %rdi
movq %rcx, %rdx
callq 0x12edc
movq $-0x1, %r12
cmpl $0x0, (%rbx)
jne 0x27c3f
leaq 0xf(%rsp), %rdx
movq %r13, %rdi
movq %r14, %rsi
movq %rbx, %rcx
callq 0x1f62c
cmpl $0x0, (%rbx)
jne 0x27c3f
movq %rax, %r14
cmpl $0x5, (%rax)
jne 0x27c0b
movb 0xf(%rsp), %al
movb %al, (%r15)
movq 0x148(%r14), %r12
jmp 0x27c37
movq (%r13), %rax
movq 0x30(%rax), %rdx
movl 0x38(%rax), %ecx
leaq 0x4be74(%rip), %r8      # 0x73a91
movq %rbx, %rdi
movl $0x4d, %esi
movl $0xf6, %r9d
callq 0x145c8
movq $-0x1, %r12
movq %r14, %rdi
callq 0x2b166
movq %r12, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/parser_os.c
// Function: subtilis_parser_oscli
void subtilis_parser_oscli(subtilis_parser_t *p, subtilis_token_t *t,
			   subtilis_error_t *err)
{
	subtilis_exp_t *command;

	command = subtilis_parser_expression(p, t, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	if (command->type.type == SUBTILIS_TYPE_STRING) {
		command = subtilis_string_zt_non_const(p, command, err);
	} else if (command->type.type == SUBTILIS_TYPE_CONST_STRING) {
		command = subtilis_string_lca_const_zt(p, command, err);
	} else {
		subtilis_error_set_string_expected(err, p->l->stream->name,
						   p->l->line);
		goto cleanup;
	}

	subtilis_ir_section_add_instr_no_reg(
	    p->current, SUBTILIS_OP_INSTR_OSCLI, command->exp.ir_op, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	subtilis_exp_handle_errors(p, err);

cleanup:

	subtilis_exp_delete(command);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rdi, %r15
callq 0x1ec4c
cmpl $0x0, (%r14)
je 0x27c6c
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movl (%rax), %eax
cmpl $0x3, %eax
je 0x27c8b
cmpl $0x7, %eax
jne 0x27cc7
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x48a82
jmp 0x27c99
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x4869c
movq %rax, %rbx
movq 0x48(%r15), %rdi
movq 0x148(%rax), %rdx
movl $0x9a, %esi
movq %r14, %rcx
callq 0x2be1f
cmpl $0x0, (%r14)
jne 0x27ceb
movq %r15, %rdi
movq %r14, %rsi
callq 0x2b01f
jmp 0x27ceb
movq (%r15), %rax
movq 0x30(%rax), %rdx
movl 0x38(%rax), %ecx
leaq 0x4bdb9(%rip), %r8      # 0x73a91
movq %r14, %rdi
movl $0x49, %esi
movl $0x1ab, %r9d            # imm = 0x1AB
callq 0x145c8
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2b166
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/parser_os.c
// Function: subtilis_parser_osargs
subtilis_exp_t *subtilis_parser_osargs(subtilis_parser_t *p,
				       subtilis_token_t *t,
				       subtilis_error_t *err)
{
	size_t reg;
	subtilis_exp_t *e;

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

	e = subtilis_string_new_str_from_zt(p, reg, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return NULL;

	subtilis_lexer_get(p->l, t, err);
	if (err->type != SUBTILIS_ERROR_OK) {
		subtilis_exp_delete(e);
		return NULL;
	}

	return e;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r12
movq 0x48(%rdi), %rdi
movl $0x9c, %esi
callq 0x2be13
cmpl $0x0, (%rbx)
jne 0x27d4e
movq %r12, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x48717
cmpl $0x0, (%rbx)
jne 0x27d4e
movq %rax, %r14
movq (%r12), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x12edc
cmpl $0x0, (%rbx)
je 0x27d51
movq %r14, %rdi
callq 0x2b166
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/parser_string.c
// Function: subtilis_parser_chrstr
subtilis_exp_t *subtilis_parser_chrstr(subtilis_parser_t *p,
				       subtilis_token_t *t,
				       subtilis_error_t *err)
{
	subtilis_exp_t *e;
	subtilis_exp_t *retval;
	subtilis_buffer_t buf;
	char c_str[2];

	subtilis_buffer_init(&buf, 2);

	e = subtilis_parser_integer_bracketed_exp(p, t, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return NULL;

	if (subtilis_type_if_is_const(&e->type)) {
		c_str[0] = e->exp.ir_op.integer & 255;
		c_str[1] = 0;
		subtilis_buffer_append(&buf, c_str, 2, err);
		if (err->type != SUBTILIS_ERROR_OK)
			goto cleanup;
		retval = subtilis_exp_new_str(&buf, err);
		subtilis_buffer_free(&buf);
		subtilis_exp_delete(e);
		return retval;
	}

	return subtilis_string_type_new_tmp_from_char(p, e, err);

cleanup:
	subtilis_buffer_free(&buf);
	subtilis_exp_delete(e);

	return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x10(%rsp), %rdi
movl $0x2, %esi
callq 0x149f4
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x1f06b
cmpl $0x0, (%r14)
je 0x27d9d
xorl %r14d, %r14d
jmp 0x27e1f
movq %rax, %rbx
movq %rax, %rdi
callq 0x368fd
testb %al, %al
je 0x27de9
movb 0x148(%rbx), %al
leaq 0xe(%rsp), %rsi
movb %al, (%rsi)
movb $0x0, 0x1(%rsi)
leaq 0x10(%rsp), %rdi
movl $0x2, %edx
movq %r14, %rcx
callq 0x14ae8
cmpl $0x0, (%r14)
je 0x27dfc
leaq 0x10(%rsp), %rdi
callq 0x14d5c
movq %rbx, %rdi
callq 0x2b166
jmp 0x27d95
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x484f8
movq %rax, %r14
jmp 0x27e1f
leaq 0x10(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x2b854
movq %rax, %r14
movq %r15, %rdi
callq 0x14d5c
movq %rbx, %rdi
callq 0x2b166
movq %r14, %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/parser_string.c
// Function: subtilis_parser_left_str_exp
subtilis_exp_t *subtilis_parser_left_str_exp(subtilis_parser_t *p,
					     subtilis_token_t *t,
					     subtilis_error_t *err)
{
	subtilis_exp_t *e[2];

	prv_left_right_args(p, t, e, 1, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return NULL;

	return subtilis_string_type_left_exp(p, e[0], e[1], err);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rdi, %r14
movq %rsp, %rdx
movl $0x1, %ecx
movq %rbx, %r8
callq 0x27ed4
cmpl $0x0, (%rbx)
je 0x27eb8
xorl %eax, %eax
jmp 0x27ecc
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %r14, %rdi
movq %rbx, %rcx
callq 0x49654
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/parser_string.c
// Function: prv_left_right_args
static void prv_left_right_args(subtilis_parser_t *p, subtilis_token_t *t,
				subtilis_exp_t **e, int32_t default_val,
				subtilis_error_t *err)
{
	size_t args;
	size_t i;
	const char *tbuf;

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

	tbuf = subtilis_token_get_text(t);
	if (strcmp(tbuf, "(")) {
		subtilis_error_set_exp_expected(err, "( ", p->l->stream->name,
						p->l->line);
		return;
	}

	args = subtilis_var_bracketed_args_have_b(p, t, e, 2, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

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

	if (args == 0) {
		subtilis_error_set_string_expected(err, p->l->stream->name,
						   p->l->line);
		goto cleanup;
	}

	if (args == 1) {
		e[1] = subtilis_exp_new_int32(default_val, err);
		if (err->type != SUBTILIS_ERROR_OK)
			goto cleanup;
	}

	return;

cleanup:

	for (i = 0; i < args; i++)
		subtilis_exp_delete(e[i]);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movl %ecx, %ebp
movq %rdx, %rbx
movq %rsi, %r13
movq %rdi, %r15
movq (%rdi), %rdi
movq %r8, %rdx
callq 0x12edc
cmpl $0x0, (%r14)
je 0x27f04
addq $0x8, %rsp
jmp 0x27f4b
movq %r13, %rdi
callq 0x12ad0
cmpb $0x28, (%rax)
jne 0x27f17
cmpb $0x0, 0x1(%rax)
je 0x27f56
movq (%r15), %rax
movq 0x30(%rax), %r8
movl 0x38(%rax), %r9d
leaq 0x4bba1(%rip), %rax     # 0x73aca
leaq 0x4b9c6(%rip), %rdx     # 0x738f6
leaq 0x4bede(%rip), %rcx     # 0x73e15
movq %r14, %rdi
movl $0x15, %esi
pushq $0x6a
pushq %rax
callq 0x143da
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x2, %ecx
movq %r15, %rdi
movq %r13, %rsi
movq %rbx, %rdx
movq %r14, %r8
callq 0x1f31a
cmpl $0x0, (%r14)
jne 0x27efe
movq %rax, %r12
movq (%r15), %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x12edc
cmpl $0x0, (%r14)
je 0x27fab
testq %r12, %r12
je 0x27efe
xorl %r14d, %r14d
movq (%rbx,%r14,8), %rdi
callq 0x2b166
incq %r14
cmpq %r14, %r12
jne 0x27f95
jmp 0x27efe
cmpq $0x1, %r12
je 0x27fec
testq %r12, %r12
jne 0x27efe
movq (%r15), %rax
movq 0x30(%rax), %rdx
movl 0x38(%rax), %ecx
leaq 0x4baff(%rip), %r8      # 0x73aca
movq %r14, %rdi
movl $0x49, %esi
movl $0x78, %r9d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x145c8
movl %ebp, %edi
movq %r14, %rsi
callq 0x2b7af
movq %rax, 0x8(%rbx)
cmpl $0x0, (%r14)
jne 0x27f92
jmp 0x27efe
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/parser_string.c
// Function: subtilis_parser_right_str_exp
subtilis_exp_t *subtilis_parser_right_str_exp(subtilis_parser_t *p,
					      subtilis_token_t *t,
					      subtilis_error_t *err)
{
	subtilis_exp_t *e[2];

	prv_left_right_args(p, t, e, 1, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return NULL;

	return subtilis_string_type_right_exp(p, e[0], e[1], err);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rdi, %r14
movq %rsp, %rdx
movl $0x1, %ecx
movq %rbx, %r8
callq 0x27ed4
cmpl $0x0, (%rbx)
je 0x2802b
xorl %eax, %eax
jmp 0x2803f
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %r14, %rdi
movq %rbx, %rcx
callq 0x49bb1
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/parser_string.c
// Function: subtilis_parser_mid_str_exp
subtilis_exp_t *subtilis_parser_mid_str_exp(subtilis_parser_t *p,
					    subtilis_token_t *t,
					    subtilis_error_t *err)
{
	subtilis_exp_t *e[3];
	size_t args;
	size_t i;
	const char *tbuf;

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

	tbuf = subtilis_token_get_text(t);
	if (strcmp(tbuf, "(")) {
		subtilis_error_set_exp_expected(err, "( ", p->l->stream->name,
						p->l->line);
		return NULL;
	}

	args = subtilis_var_bracketed_args_have_b(p, t, e, 3, 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 (args == 0) {
		subtilis_error_set_string_expected(err, p->l->stream->name,
						   p->l->line);
		return NULL;
	}

	if (args == 1) {
		subtilis_error_set_expected(err, ",", ")", p->l->stream->name,
					    p->l->line);
		goto cleanup;
	}

	return subtilis_string_type_mid_exp(p, e[0], e[1], e[2], err);

cleanup:

	for (i = 0; i < args; i++)
		subtilis_exp_delete(e[i]);

	return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %r14
movq (%rdi), %rdi
callq 0x12edc
cmpl $0x0, (%rbx)
jne 0x280b2
movq %r12, %rdi
callq 0x12ad0
cmpb $0x28, (%rax)
jne 0x2807b
cmpb $0x0, 0x1(%rax)
je 0x280c3
movq (%r14), %rax
movq 0x30(%rax), %r8
movl 0x38(%rax), %r9d
leaq 0x4ba3d(%rip), %rax     # 0x73aca
leaq 0x4b862(%rip), %rdx     # 0x738f6
leaq 0x4bd7a(%rip), %rcx     # 0x73e15
movq %rbx, %rdi
movl $0x15, %esi
pushq $0xb4
pushq %rax
callq 0x143da
addq $0x10, %rsp
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rsp, %rdx
movl $0x3, %ecx
movq %r14, %rdi
movq %r12, %rsi
movq %rbx, %r8
callq 0x1f31a
cmpl $0x0, (%rbx)
jne 0x280b2
movq %rax, %r15
movq (%r14), %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x12edc
cmpl $0x0, (%rbx)
je 0x280fb
testq %r15, %r15
jne 0x28163
jmp 0x280b2
cmpq $0x1, %r15
je 0x2812c
testq %r15, %r15
jne 0x2817e
movq (%r14), %rax
movq 0x30(%rax), %rdx
movl 0x38(%rax), %ecx
leaq 0x4b9b3(%rip), %r8      # 0x73aca
movq %rbx, %rdi
movl $0x49, %esi
movl $0xc2, %r9d
callq 0x145c8
jmp 0x280b2
movq (%r14), %rax
movq 0x30(%rax), %r8
movl 0x38(%rax), %r9d
leaq 0x4b98c(%rip), %rax     # 0x73aca
leaq 0x4b44d(%rip), %rdx     # 0x73592
leaq 0x4b9b9(%rip), %rcx     # 0x73b05
movq %rbx, %rdi
movl $0x1d, %esi
pushq $0xc8
pushq %rax
callq 0x143da
addq $0x10, %rsp
xorl %ebx, %ebx
xorl %r14d, %r14d
movq (%rsp,%r14,8), %rdi
callq 0x2b166
incq %r14
cmpq %r14, %r15
jne 0x28168
jmp 0x280b4
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq 0x10(%rsp), %rcx
movq %r14, %rdi
movq %rbx, %r8
callq 0x4a179
movq %rax, %rbx
jmp 0x280b4
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/parser_string.c
// Function: subtilis_parser_string_str
subtilis_exp_t *subtilis_parser_string_str(subtilis_parser_t *p,
					   subtilis_token_t *t,
					   subtilis_error_t *err)
{
	subtilis_exp_t *e[2];
	const char *tbuf;
	size_t args;
	size_t i;

	e[0] = NULL;
	e[1] = NULL;

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

	tbuf = subtilis_token_get_text(t);
	if (strcmp(tbuf, "(")) {
		subtilis_error_set_exp_expected(err, "( ", p->l->stream->name,
						p->l->line);
		return NULL;
	}

	args = subtilis_var_bracketed_args_have_b(p, t, e, 2, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return NULL;

	if (args != 2 || ((e[1]->type.type != SUBTILIS_TYPE_CONST_STRING) &&
			  (e[1]->type.type != SUBTILIS_TYPE_STRING))) {
		subtilis_error_set_string_expected(err, p->l->stream->name,
						   p->l->line);
		goto cleanup;
	}

	e[0] = subtilis_type_if_to_int(p, e[0], err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	e[0] = subtilis_string_type_string(p, e[0], e[1], err);

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

	return e[0];

cleanup:

	for (i = 0; i < args; i++)
		subtilis_exp_delete(e[i]);

	return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r12
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq (%rdi), %rdi
callq 0x12edc
cmpl $0x0, (%rbx)
jne 0x28212
movq %r15, %rdi
callq 0x12ad0
cmpb $0x28, (%rax)
jne 0x281da
cmpb $0x0, 0x1(%rax)
je 0x28223
movq (%r12), %rax
movq 0x30(%rax), %r8
movl 0x38(%rax), %r9d
leaq 0x4b8dd(%rip), %rax     # 0x73aca
leaq 0x4b702(%rip), %rdx     # 0x738f6
leaq 0x4bc1a(%rip), %rcx     # 0x73e15
movq %rbx, %rdi
movl $0x15, %esi
pushq $0xe9
pushq %rax
callq 0x143da
addq $0x10, %rsp
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rsp, %rdx
movl $0x2, %ecx
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %r8
callq 0x1f31a
cmpl $0x0, (%rbx)
jne 0x28212
movq %rax, %r14
cmpq $0x2, %rax
jne 0x282a2
movq 0x8(%rsp), %rax
movl (%rax), %eax
orl $0x4, %eax
cmpl $0x7, %eax
jne 0x282a2
movq (%rsp), %rsi
movq %r12, %rdi
movq %rbx, %rdx
callq 0x367cf
movq %rax, (%rsp)
cmpl $0x0, (%rbx)
jne 0x282d0
movq 0x8(%rsp), %rdx
movq %r12, %rdi
movq %rax, %rsi
movq %rbx, %rcx
callq 0x4b3db
movq %rax, (%rsp)
movq (%r12), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x12edc
cmpl $0x0, (%rbx)
jne 0x282d0
movq (%rsp), %rbx
jmp 0x28214
movq (%r12), %rax
movq 0x30(%rax), %rdx
movl 0x38(%rax), %ecx
leaq 0x4b816(%rip), %r8      # 0x73aca
movq %rbx, %rdi
movl $0x49, %esi
movl $0xf4, %r9d
callq 0x145c8
testq %r14, %r14
je 0x28212
xorl %ebx, %ebx
xorl %r15d, %r15d
movq (%rsp,%r15,8), %rdi
callq 0x2b166
incq %r15
cmpq %r15, %r14
jne 0x282d5
jmp 0x28214
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/parser_string.c
// Function: subtilis_parser_str_str
subtilis_exp_t *subtilis_parser_str_str(subtilis_parser_t *p,
					subtilis_token_t *t,
					subtilis_error_t *err)
{
	subtilis_exp_t *val;
	const char *tbuf;
	bool hex = false;

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

	tbuf = subtilis_token_get_text(t);
	if (t->type != SUBTILIS_TOKEN_OPERATOR) {
		subtilis_error_set_expected(err, "( or ~", tbuf,
					    p->l->stream->name, p->l->line);
		return NULL;
	}

	if (!strcmp(tbuf, "~")) {
		hex = true;
		subtilis_lexer_get(p->l, t, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return NULL;
		tbuf = subtilis_token_get_text(t);
	}

	if (strcmp(tbuf, "(")) {
		subtilis_error_set_expected(err, "(", tbuf, p->l->stream->name,
					    p->l->line);
		return NULL;
	}

	val = subtilis_parser_bracketed_exp_internal(p, t, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return NULL;

	subtilis_lexer_get(p->l, t, err);
	if (err->type != SUBTILIS_ERROR_OK) {
		subtilis_exp_delete(val);
		return NULL;
	}

	if (hex) {
		if (!subtilis_type_if_is_integer(&val->type)) {
			val = subtilis_type_if_to_int(p, val, err);
			if (err->type != SUBTILIS_ERROR_OK)
				return NULL;
		}
		return subtilis_type_if_to_hex_string(p, val, err);
	}

	return subtilis_type_if_to_string(p, val, err);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq (%rdi), %rdi
callq 0x12edc
cmpl $0x0, (%rbx)
jne 0x283b5
movq %r15, %rdi
callq 0x12ad0
cmpl $0x2, (%r15)
jne 0x28349
movb (%rax), %bpl
cmpb $0x7e, %bpl
jne 0x28374
cmpb $0x0, 0x1(%rax)
jne 0x28381
movq (%r14), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x12edc
cmpl $0x0, (%rbx)
jne 0x283b5
movq %r15, %rdi
callq 0x12ad0
movb (%rax), %cl
jmp 0x28376
movq (%r14), %rcx
movq 0x30(%rcx), %r8
movl 0x38(%rcx), %r9d
leaq 0x4b76f(%rip), %r10     # 0x73aca
leaq 0x4b781(%rip), %rdx     # 0x73ae3
movq %rbx, %rdi
movl $0x1d, %esi
movq %rax, %rcx
pushq $0x11b                  # imm = 0x11B
jmp 0x283aa
movl %ebp, %ecx
cmpb $0x28, %cl
jne 0x28381
cmpb $0x0, 0x1(%rax)
je 0x283c0
movq (%r14), %rcx
movq 0x30(%rcx), %r8
movl 0x38(%rcx), %r9d
leaq 0x4b737(%rip), %r10     # 0x73aca
leaq 0x4be98(%rip), %rdx     # 0x74232
movq %rbx, %rdi
movl $0x1d, %esi
movq %rax, %rcx
pushq $0x129                  # imm = 0x129
pushq %r10
callq 0x143da
addq $0x10, %rsp
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x1ef33
cmpl $0x0, (%rbx)
jne 0x283b5
movq %rax, %r12
movq (%r14), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x12edc
cmpl $0x0, (%rbx)
je 0x283f3
movq %r12, %rdi
callq 0x2b166
jmp 0x283b5
cmpb $0x7e, %bpl
jne 0x28431
movq %r12, %rdi
callq 0x372bf
testb %al, %al
jne 0x2841b
movq %r14, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x367cf
cmpl $0x0, (%rbx)
jne 0x283b5
movq %rax, %r12
movq %r14, %rdi
movq %r12, %rsi
movq %rbx, %rdx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x36a6f
movq %r14, %rdi
movq %r12, %rsi
movq %rbx, %rdx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x369d2
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/parser_string.c
// Function: subtilis_parser_left_str
void subtilis_parser_left_str(subtilis_parser_t *p, subtilis_token_t *t,
			      subtilis_error_t *err)
{
	const char *tbuf;
	subtilis_exp_t *e[2];
	subtilis_exp_t *value;

	prv_left_right_args(p, t, e, -1, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	tbuf = subtilis_token_get_text(t);
	if ((t->type != SUBTILIS_TOKEN_OPERATOR) || strcmp(tbuf, "=")) {
		subtilis_error_set_assignment_op_expected(
		    err, tbuf, p->l->stream->name, p->l->line);
		goto cleanup;
	}

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

	subtilis_string_type_left(p, e[0], e[1], value, err);
	return;

cleanup:
	subtilis_exp_delete(e[0]);
	subtilis_exp_delete(e[1]);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq %rsp, %rdx
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movq %rbx, %r8
callq 0x27ed4
cmpl $0x0, (%rbx)
jne 0x284ce
movq %r15, %rdi
callq 0x12ad0
cmpl $0x2, (%r15)
jne 0x28487
cmpb $0x3d, (%rax)
jne 0x28487
cmpb $0x0, 0x1(%rax)
je 0x284d8
movq (%r14), %rcx
movq 0x30(%rcx), %r8
movl 0x38(%rcx), %r9d
leaq 0x4b631(%rip), %r10     # 0x73aca
leaq 0x4b975(%rip), %rcx     # 0x73e15
movq %rbx, %rdi
movl $0x14, %esi
movq %rax, %rdx
pushq $0x151                  # imm = 0x151
pushq %r10
callq 0x143da
addq $0x10, %rsp
movq (%rsp), %rdi
callq 0x2b166
movq 0x8(%rsp), %rdi
callq 0x2b166
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x1ec4c
cmpl $0x0, (%rbx)
jne 0x284bb
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %r14, %rdi
movq %rax, %rcx
movq %rbx, %r8
callq 0x4aae0
jmp 0x284ce
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/parser_string.c
// Function: subtilis_parser_val
subtilis_exp_t *subtilis_parser_val(subtilis_parser_t *p, subtilis_token_t *t,
				    subtilis_error_t *err)
{
	size_t args;
	const char *tbuf;
	subtilis_exp_t *e[2];
	size_t i;

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

	tbuf = subtilis_token_get_text(t);
	if (strcmp(tbuf, "(")) {
		subtilis_error_set_exp_expected(err, "( ", p->l->stream->name,
						p->l->line);
		return NULL;
	}

	args = subtilis_var_bracketed_args_have_b(p, t, e, 2, 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 (args == 0) {
		subtilis_error_set_string_expected(err, p->l->stream->name,
						   p->l->line);
		goto cleanup;
	}

	if (args == 1)
		return prv_val_real(p, t, e[0], err);

	if (args == 2)
		return prv_val_int(p, t, e, err);

	subtilis_error_set_bad_arg_count(err, 2, args, p->l->stream->name,
					 p->l->line);
cleanup:

	for (i = 0; i < args; i++)
		subtilis_exp_delete(e[i]);

	return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %r14
movq (%rdi), %rdi
callq 0x12edc
cmpl $0x0, (%rbx)
jne 0x28821
movq %r12, %rdi
callq 0x12ad0
cmpb $0x28, (%rax)
jne 0x287ea
cmpb $0x0, 0x1(%rax)
je 0x28832
movq (%r14), %rax
movq 0x30(%rax), %r8
movl 0x38(%rax), %r9d
leaq 0x4b2ce(%rip), %rax     # 0x73aca
leaq 0x4b0f3(%rip), %rdx     # 0x738f6
leaq 0x4b60b(%rip), %rcx     # 0x73e15
movq %rbx, %rdi
movl $0x15, %esi
pushq $0x2df                  # imm = 0x2DF
pushq %rax
callq 0x143da
addq $0x10, %rsp
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rsp, %rdx
movl $0x2, %ecx
movq %r14, %rdi
movq %r12, %rsi
movq %rbx, %r8
callq 0x1f31a
cmpl $0x0, (%rbx)
jne 0x28821
movq %rax, %r15
movq (%r14), %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x12edc
cmpl $0x0, (%rbx)
je 0x28880
testq %r15, %r15
je 0x28821
xorl %ebx, %ebx
xorl %r14d, %r14d
movq (%rsp,%r14,8), %rdi
callq 0x2b166
incq %r14
cmpq %r14, %r15
jne 0x2886d
jmp 0x28823
cmpq $0x2, %r15
je 0x288cb
cmpq $0x1, %r15
je 0x288ba
testq %r15, %r15
jne 0x288e1
movq (%r14), %rax
movq 0x30(%rax), %rdx
movl 0x38(%rax), %ecx
leaq 0x4b228(%rip), %r8      # 0x73aca
movq %rbx, %rdi
movl $0x49, %esi
movl $0x2ed, %r9d            # imm = 0x2ED
callq 0x145c8
jmp 0x28821
movq (%rsp), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x28917
jmp 0x288d9
movq %rsp, %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x28af8
movq %rax, %rbx
jmp 0x28823
movq (%r14), %rax
movq 0x30(%rax), %r8
movl 0x38(%rax), %r9d
leaq 0x4b1d7(%rip), %rax     # 0x73aca
movq %rbx, %rdi
movl $0x28, %esi
movl $0x2, %edx
movl %r15d, %ecx
pushq $0x2f8                  # imm = 0x2F8
pushq %rax
callq 0x14486
addq $0x10, %rsp
jmp 0x28868
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/parser_rec.c
// Function: subtilis_parser_parse_rec_type
char *subtilis_parser_parse_rec_type(subtilis_parser_t *p, subtilis_token_t *t,
				     subtilis_type_t *type,
				     subtilis_error_t *err)
{
	const char *tbuf;
	char *name = NULL;

	tbuf = subtilis_token_get_text(t);
	subtilis_type_init_rec(type, tbuf, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return NULL;

	name = malloc(strlen(tbuf) + 1);
	if (!name) {
		subtilis_error_set_oom(err);
		return NULL;
	}
	strcpy(name, tbuf);

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

	tbuf = subtilis_token_get_text(t);
	if ((t->type != SUBTILIS_TOKEN_OPERATOR) || strcmp(tbuf, "(")) {
		subtilis_error_set_expected(err, "(", tbuf, p->l->stream->name,
					    p->l->line);
		goto cleanup;
	}

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

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

	if (type->params.rec.num_fields == 0) {
		subtilis_error_set_empty_rec(err, name, p->l->stream->name,
					     p->l->line);
		goto cleanup;
	}

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

	return name;

cleanup:

	free(name);

	return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %r13
movq %rsi, %r15
movq %rdi, %r12
movq %rsi, %rdi
callq 0x12ad0
movq %rax, %rbp
movq %r13, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x2fba9
cmpl $0x0, (%r14)
jne 0x29174
movq %rbp, %rdi
callq 0x120f0
leaq 0x1(%rax), %rdi
callq 0x121d0
testq %rax, %rax
je 0x2915b
movq %rax, %rbx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x12070
movq (%r12), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x12edc
cmpl $0x0, (%r14)
jne 0x29151
movq %r15, %rdi
callq 0x12ad0
cmpl $0x2, (%r15)
jne 0x2911c
cmpb $0x28, (%rax)
jne 0x2911c
cmpb $0x0, 0x1(%rax)
je 0x29188
movq (%r12), %rcx
movq 0x30(%rcx), %r8
movl 0x38(%rcx), %r9d
leaq 0x4a9bb(%rip), %r10     # 0x73aea
leaq 0x4b0fc(%rip), %rdx     # 0x74232
movq %r14, %rdi
movl $0x1d, %esi
movq %rax, %rcx
pushq $0xeb
pushq %r10
callq 0x143da
addq $0x10, %rsp
movq %rbx, %rdi
callq 0x122c0
jmp 0x29174
leaq 0x4a988(%rip), %rdx     # 0x73aea
movq %r14, %rdi
movl $0x1, %esi
movl $0xdf, %ecx
callq 0x145a4
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%r12), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x12edc
cmpl $0x0, (%r14)
jne 0x29151
movq %r12, %rdi
movq %r15, %rsi
movq %r13, %rdx
movq %r14, %rcx
callq 0x291fe
cmpl $0x0, (%r14)
jne 0x29151
cmpq $0x0, 0x28(%r13)
movq (%r12), %rdi
je 0x291d2
movq %r15, %rsi
movq %r14, %rdx
callq 0x12edc
cmpl $0x0, (%r14)
jne 0x29151
jmp 0x29176
movq 0x30(%rdi), %r8
movl 0x38(%rdi), %r9d
leaq 0x4a909(%rip), %rax     # 0x73aea
leaq 0x4ac2d(%rip), %rcx     # 0x73e15
movq %r14, %rdi
movl $0x6b, %esi
movq %rbx, %rdx
pushq $0xf9
pushq %rax
jmp 0x29148
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/parser_rec.c
// Function: subtilis_parser_rec_init
void subtilis_parser_rec_init(subtilis_parser_t *p, subtilis_token_t *t,
			      const subtilis_type_t *type, const char *var_name,
			      bool local, bool push, subtilis_error_t *err)
{
	const subtilis_symbol_t *s;
	const char *tbuf;

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

	/*
	 * Special case here.  If we're creating a new local variable from a
	 * temporary REC returned from a function we can just promote the
	 * temporary and avoid the copy.
	 */

	tbuf = subtilis_token_get_text(t);
	if (local &&
	    !((t->type == SUBTILIS_TOKEN_OPERATOR) && !strcmp(tbuf, "("))) {
		prv_rec_init_check_tmp(p, t, type, var_name, push, err);
		return;
	}
	s = subtilis_symbol_table_insert(local ? p->local_st : p->st, var_name,
					 type, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;
	prv_rec_init(p, t, type,
		     local ? SUBTILIS_IR_REG_LOCAL : SUBTILIS_IR_REG_GLOBAL,
		     s->loc, push, err);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, 0x14(%rsp)
movl %r8d, %ebp
movq %rcx, %r12
movq %rdx, %rbx
movq %rsi, %r13
movq %rdi, %r15
movq 0x50(%rsp), %r14
movq (%rdi), %rdi
movq %r14, %rdx
callq 0x12edc
cmpl $0x0, (%r14)
je 0x29c46
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r13, %rdi
callq 0x12ad0
movl $0x60, %ecx
testb %bpl, %bpl
je 0x29cc4
cmpl $0x2, (%r13)
jne 0x29c6a
cmpb $0x28, (%rax)
jne 0x29c6a
cmpb $0x0, 0x1(%rax)
je 0x29cbf
movq %r15, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x1e938
cmpl $0x0, (%r14)
jne 0x29c37
movq %r15, %rdi
movq %rax, %rsi
movq %rbx, %rdx
movq %r14, %rcx
callq 0x37860
movq %rax, %r13
cmpl $0x0, (%r14)
jne 0x29d77
movq 0x158(%r13), %rdx
movq 0x68(%r15), %rdi
testq %rdx, %rdx
je 0x29d07
movq %rbx, %rsi
movq %r12, %rcx
movq %r14, %r8
callq 0x2e83a
jmp 0x29d77
movl $0x68, %ecx
movq (%r15,%rcx), %rdi
movq %r12, %rsi
movq %rbx, %rdx
movq %r14, %rcx
callq 0x2e3cd
cmpl $0x0, (%r14)
jne 0x29c37
movzbl %bpl, %ecx
incq %rcx
movq (%rax), %r8
movq %r14, (%rsp)
movzbl 0x14(%rsp), %r9d
movq %r15, %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x29d8d
jmp 0x29c37
movq %r12, %rsi
movq %rbx, %rdx
movq %r14, %rcx
callq 0x2e3cd
cmpl $0x0, (%r14)
jne 0x29d77
movq %rax, %r12
movq (%rax), %rcx
movq 0x148(%r13), %r8
movq %r14, (%rsp)
movl $0x2, %edx
movq %r15, %rdi
movq %rbx, %rsi
movl $0x1, %r9d
callq 0x45fae
cmpl $0x0, (%r14)
setne %al
movl 0x14(%rsp), %ecx
xorb $0x1, %cl
orb %al, %cl
jne 0x29d77
movq %rbx, %rdi
callq 0x30171
testb %al, %al
je 0x29d77
movq (%r12), %rcx
movl $0x2, %edx
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %r8
callq 0x4d4a6
movq %r13, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2b166
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/parser_rec.c
// Function: prv_check_id
static void prv_check_id(subtilis_parser_t *p, subtilis_token_t *t,
			 subtilis_type_t *field_type, subtilis_error_t *err)
{
	const char *tbuf;

	tbuf = subtilis_token_get_text(t);
	if (t->type != SUBTILIS_TOKEN_IDENTIFIER) {
		subtilis_error_set_id_expected(err, tbuf, p->l->stream->name,
					       p->l->line);
		return;
	}

	subtilis_type_init_copy(field_type, &t->tok.id_type, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	if ((field_type->type == SUBTILIS_TYPE_FN) ||
	    (field_type->type == SUBTILIS_TYPE_REC)) {
		subtilis_complete_custom_type(p, tbuf, field_type, err);
		if (err->type != SUBTILIS_ERROR_OK)
			subtilis_type_free(field_type);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r13
movq %rdi, %r12
movq %rsi, %rdi
callq 0x12ad0
movq %rax, %r15
cmpl $0x6, (%r13)
jne 0x2aaab
addq $0x8, %r13
movq %r14, %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x2f457
cmpl $0x0, (%rbx)
jne 0x2aadc
movl (%r14), %eax
cmpl $0x16, %eax
je 0x2aa84
cmpl $0x9, %eax
jne 0x2aadc
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x1f81b
cmpl $0x0, (%rbx)
je 0x2aadc
movq %r14, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x2f56e
movq (%r12), %rax
movq 0x30(%rax), %r8
movl 0x38(%rax), %r9d
leaq 0x4902c(%rip), %rax     # 0x73aea
leaq 0x49350(%rip), %rcx     # 0x73e15
movq %rbx, %rdi
movl $0x12, %esi
movq %r15, %rdx
pushq $0x27
pushq %rax
callq 0x143da
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/parser_rnd.c
// Function: subtilis_parser_rnd
subtilis_exp_t *subtilis_parser_rnd(subtilis_parser_t *p, subtilis_token_t *t,
				    subtilis_error_t *err)
{
	const char *tbuf;
	subtilis_exp_t *e = NULL;
	subtilis_exp_t *e_dup = NULL;

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

	if (t->type == SUBTILIS_TOKEN_OPERATOR) {
		tbuf = subtilis_token_get_text(t);
		if (!strcmp(tbuf, "(")) {
			e = subtilis_parser_bracketed_exp_internal(p, t, err);
			if (err->type != SUBTILIS_ERROR_OK)
				goto cleanup;

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

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

			if (e->type.type == SUBTILIS_TYPE_CONST_INTEGER)
				return prv_rnd_const(p, e, err);
			return prv_rnd_var(p, e, err);
		}
	}

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

	e_dup = subtilis_type_if_dup(e, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	subtilis_var_assign_hidden(p, subtilis_rnd_hidden_var,
				   &subtilis_type_integer, e_dup, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	return e;

cleanup:

	subtilis_exp_delete(e);
	subtilis_exp_delete(e_dup);

	return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %r15
movq (%rdi), %rdi
callq 0x12edc
cmpl $0x0, (%rbx)
je 0x2ab0b
xorl %r14d, %r14d
jmp 0x2ab38
cmpl $0x2, (%r12)
jne 0x2ab25
movq %r12, %rdi
callq 0x12ad0
cmpb $0x28, (%rax)
jne 0x2ab25
cmpb $0x0, 0x1(%rax)
je 0x2ab96
movq %r15, %rdi
movq %rbx, %rsi
callq 0x30ccb
movq %rax, %r14
cmpl $0x0, (%rbx)
je 0x2ab5d
xorl %r12d, %r12d
movq %r14, %rdi
callq 0x2b166
movq %r12, %rdi
callq 0x2b166
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %r14, %rdi
movq %rbx, %rsi
callq 0x36182
movq %rax, %r12
cmpl $0x0, (%rbx)
jne 0x2ab3b
leaq 0x7b5f9(%rip), %rax     # 0xa6170
movq (%rax), %rsi
leaq 0x49d97(%rip), %rdx     # 0x74918
movq %r15, %rdi
movq %r12, %rcx
movq %rbx, %r8
callq 0x35b78
cmpl $0x0, (%rbx)
jne 0x2ab3b
jmp 0x2ab4e
movq %r15, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x1ef33
movq %rax, %r14
cmpl $0x0, (%rbx)
jne 0x2ab38
movq (%r15), %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x12edc
cmpl $0x0, (%rbx)
jne 0x2ab38
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x367cf
movq %rax, %r14
cmpl $0x0, (%rbx)
jne 0x2ab38
cmpl $0x1, (%r14)
jne 0x2abf9
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2ac0f
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2ac64
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/parser_rnd.c
// Function: prv_rnd_const
static subtilis_exp_t *prv_rnd_const(subtilis_parser_t *p, subtilis_exp_t *e,
				     subtilis_error_t *err)
{
	int32_t val = e->exp.ir_op.integer;

	subtilis_exp_delete(e);
	if (val == 0)
		return subtilis_builtins_ir_rnd_0(p, err);
	else if (val == 1)
		return subtilis_builtins_ir_rnd_1(p, err);
	else if (val < 0)
		return subtilis_builtins_ir_rnd_neg(p, val, err);
	else
		return subtilis_builtins_ir_rnd_pos(p, val, err);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rdi, %r14
movl 0x148(%rsi), %ebp
movq %rsi, %rdi
callq 0x2b166
movq %r14, %rdi
cmpl $0x1, %ebp
je 0x2ac3f
testl %ebp, %ebp
jne 0x2ac4b
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x30d7d
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x30e54
movl %ebp, %esi
movq %rbx, %rdx
js 0x2ac5b
popq %rbx
popq %r14
popq %rbp
jmp 0x30f5a
popq %rbx
popq %r14
popq %rbp
jmp 0x3106c
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/expression.c
// Function: subtilis_exp_add_call_addrs
void subtilis_exp_add_call_addrs(subtilis_parser_t *p,
				 subtilis_parser_call_addr_t *call_addr,
				 subtilis_error_t *err)
{
	subtilis_parser_call_addr_t **new_call_addrs;
	size_t new_max;

	if (p->num_call_addrs == p->max_call_addrs) {
		new_max = p->max_call_addrs + SUBTILIS_CONFIG_PROC_GRAN;
		new_call_addrs =
		    realloc(p->call_addrs, new_max * sizeof(*new_call_addrs));
		if (!new_call_addrs) {
			subtilis_error_set_oom(err);
			return;
		}
		p->call_addrs = new_call_addrs;
		p->max_call_addrs = new_max;
	}
	p->call_addrs[p->num_call_addrs++] = call_addr;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x98(%rdi), %r12
cmpq 0xa0(%rdi), %r12
jne 0x2af79
movq %rdx, %r15
movq 0xa8(%r14), %rdi
leaq 0x200(,%r12,8), %rsi
callq 0x12210
testq %rax, %rax
je 0x2af9c
addq $0x40, %r12
movq %rax, 0xa8(%r14)
movq %r12, 0xa0(%r14)
movq 0x98(%r14), %r12
jmp 0x2af80
movq 0xa8(%r14), %rax
leaq 0x1(%r12), %rcx
movq %rcx, 0x98(%r14)
movq %rbx, (%rax,%r12,8)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x48b77(%rip), %rdx     # 0x73b1a
movq %r15, %rdi
movl $0x1, %esi
movl $0x3b, %ecx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x145a4
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/expression.c
// Function: subtilis_exp_return_default_value
void subtilis_exp_return_default_value(subtilis_parser_t *p,
				       subtilis_error_t *err)
{
	subtilis_ir_operand_t end_label;

	end_label.label = p->current->end_label;
	if ((p->current == p->main) ||
	    (p->current->type->type.params.fn.ret_val->type ==
	     SUBTILIS_TYPE_VOID)) {
		subtilis_ir_section_add_instr_no_reg(
		    p->current, SUBTILIS_OP_INSTR_JMP, end_label, err);
		return;
	}

	subtilis_type_if_zero_reg(p, p->current->type->type.params.fn.ret_val,
				  p->current->ret_reg, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;
	subtilis_ir_section_add_instr_no_reg(p->current, SUBTILIS_OP_INSTR_JMP,
					     end_label, err);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r15
movq 0x48(%rdi), %rdi
movq 0x98(%rdi), %r14
cmpq 0x50(%r15), %rdi
je 0x2b00a
movq 0x8(%rdi), %rax
movq 0x8(%rax), %rsi
cmpl $0x8, (%rsi)
je 0x2b00a
movq 0xa8(%rdi), %rdx
movq %r15, %rdi
movq %rbx, %rcx
callq 0x35f8e
cmpl $0x0, (%rbx)
je 0x2b006
popq %rbx
popq %r14
popq %r15
retq
movq 0x48(%r15), %rdi
movl $0x45, %esi
movq %r14, %rdx
movq %rbx, %rcx
popq %rbx
popq %r14
popq %r15
jmp 0x2be1f
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/expression.c
// Function: subtilis_exp_delete
void subtilis_exp_delete(subtilis_exp_t *e)
{
	if (!e)
		return;
	if (e->type.type == SUBTILIS_TYPE_CONST_STRING)
		subtilis_buffer_free(&e->exp.str);
	subtilis_type_free(&e->type);
	free(e->partial_name);
	free(e->temporary);
	free(e);
}

// Assembly:
testq %rdi, %rdi
je 0x2b1a9
pushq %rbx
movq %rdi, %rbx
cmpl $0x3, (%rdi)
jne 0x2b180
leaq 0x148(%rbx), %rdi
callq 0x14d5c
movq %rbx, %rdi
callq 0x2f56e
movq 0x160(%rbx), %rdi
callq 0x122c0
movq 0x158(%rbx), %rdi
callq 0x122c0
movq %rbx, %rdi
popq %rbx
jmp 0x122c0
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/expression.c
// Function: prv_tmp_ref_return
static void prv_tmp_ref_return(subtilis_parser_t *p,
			       const subtilis_type_t *fn_type,
			       subtilis_exp_t *e, subtilis_error_t *err)
{
	size_t reg;
	char *tmp_name = NULL;

	if (fn_type->type != SUBTILIS_TYPE_VOID &&
	    fn_type->type != SUBTILIS_TYPE_FN &&
	    !subtilis_type_if_is_numeric(fn_type)) {
		reg = prv_create_tmp_ref(p, e->exp.ir_op.reg, fn_type,
					 &tmp_name, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return;
		e->exp.ir_op.reg = reg;
		e->temporary = tmp_name;
	}
}

// Assembly:
movl (%rsi), %eax
andl $-0x2, %eax
cmpl $0x8, %eax
je 0x2b4f7
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 %rsi, %rdi
callq 0x37534
testb %al, %al
jne 0x2b4e9
movq 0x148(%rbx), %r13
movq 0x68(%r12), %rdi
movq %rsp, %rdx
movq %r15, %rsi
movq %r14, %rcx
callq 0x2e6f1
cmpl $0x0, (%r14)
jne 0x2b4e9
movq (%rax), %rax
testq %rax, %rax
je 0x2b4a3
movq 0x48(%r12), %rdi
movl %eax, %ecx
movl $0x2, %edx
movl $0x9, %esi
movq %r14, %r8
callq 0x2bc8f
cmpl $0x0, (%r14)
jne 0x2b4c2
movq %rax, %rbp
jmp 0x2b4a8
movl $0x2, %ebp
movq %r12, %rdi
movq %r15, %rsi
movq %rbp, %rdx
movq %r13, %rcx
movq %r14, %r8
callq 0x35e8e
cmpl $0x0, (%r14)
je 0x2b4d7
movq (%rsp), %rdi
callq 0x122c0
cmpl $0x0, (%r14)
jne 0x2b4e9
xorl %ebp, %ebp
xorl %eax, %eax
jmp 0x2b4db
movq (%rsp), %rax
movq %rbp, 0x148(%rbx)
movq %rax, 0x158(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/expression.c
// Function: subtilis_exp_add_call_ptr
subtilis_exp_t *subtilis_exp_add_call_ptr(subtilis_parser_t *p,
					  subtilis_ir_arg_t *args,
					  const subtilis_type_t *fn_type,
					  size_t ptr, size_t num_params,
					  subtilis_error_t *err)
{
	size_t call_site;
	subtilis_exp_t *e = NULL;

	if (fn_type->type == SUBTILIS_TYPE_VOID)
		subtilis_ir_section_add_call_ptr(p->current, num_params, args,
						 ptr, err);
	else
		e = subtilis_type_if_call_ptr(p, fn_type, args, num_params, ptr,
					      err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto on_error;
	args = NULL;

	/* For calls made inside handlers we will add the offset from the start
	 * of the handler section and fix it up later on when checking the
	 * calls.
	 */

	call_site = p->current->in_error_handler ? p->current->error_len
						 : p->current->len;
	call_site--;

	subtilis_exp_handle_errors(p, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto on_error;

	prv_tmp_ref_return(p, fn_type, e, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto on_error;

	return e;

on_error:

	subtilis_exp_delete(e);
	free(args);

	return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r9, %rbx
movq %rcx, %rax
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %r13
cmpl $0x8, (%rdx)
jne 0x2b52f
movq 0x48(%r13), %rdi
movq %r8, %rsi
movq %r14, %rdx
movq %rax, %rcx
movq %rbx, %r8
callq 0x2d037
xorl %r15d, %r15d
jmp 0x2b549
movq %r13, %rdi
movq %r12, %rsi
movq %r14, %rdx
movq %r8, %rcx
movq %rax, %r8
movq %rbx, %r9
callq 0x3758b
movq %rax, %r15
cmpl $0x0, (%rbx)
jne 0x2b577
movq %r13, %rdi
movq %rbx, %rsi
callq 0x2b01f
cmpl $0x0, (%rbx)
jne 0x2b574
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x2b422
cmpl $0x0, (%rbx)
je 0x2b58a
xorl %r14d, %r14d
movq %r15, %rdi
callq 0x2b166
movq %r14, %rdi
callq 0x122c0
xorl %r15d, %r15d
movq %r15, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/expression.c
// Function: subtilis_exp_new_empty
subtilis_exp_t *subtilis_exp_new_empty(const subtilis_type_t *type,
				       subtilis_error_t *err)
{
	subtilis_exp_t *e = calloc(1, sizeof(*e));

	if (!e) {
		subtilis_error_set_oom(err);
		return NULL;
	}

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

	return e;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
movl $0x1, %edi
movl $0x170, %esi            # imm = 0x170
callq 0x12150
testq %rax, %rax
je 0x2b5d7
movq %rax, %rbx
movq %rax, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x2f457
cmpl $0x0, (%r14)
je 0x2b5f2
movq %rbx, %rdi
callq 0x122c0
jmp 0x2b5f0
leaq 0x4853c(%rip), %rdx     # 0x73b1a
movq %r14, %rdi
movl $0x1, %esi
movl $0x18c, %ecx            # imm = 0x18C
callq 0x145a4
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/expression.c
// Function: subtilis_exp_new_var
subtilis_exp_t *subtilis_exp_new_var(const subtilis_type_t *type,
				     unsigned int reg, subtilis_error_t *err)
{
	subtilis_exp_t *e = subtilis_exp_new_empty(type, err);

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

	e->exp.ir_op.reg = reg;
	return e;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movl %esi, %ebx
movq %rdx, %rsi
callq 0x2b597
cmpl $0x0, (%r14)
je 0x2b616
xorl %eax, %eax
jmp 0x2b61f
movl %ebx, %ecx
movq %rcx, 0x148(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/expression.c
// Function: subtilis_exp_new_tmp_var
subtilis_exp_t *subtilis_exp_new_tmp_var(const subtilis_type_t *type,
					 unsigned int reg, char *tmp_name,
					 subtilis_error_t *err)
{
	subtilis_exp_t *e = subtilis_exp_new_var(type, reg, err);

	if (err->type != SUBTILIS_ERROR_OK) {
		free(tmp_name);
		return NULL;
	}

	e->temporary = tmp_name;
	return e;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rcx, %r14
movq %rdx, %rbx
movl %esi, %ebp
movq %rcx, %rsi
callq 0x2b597
cmpl $0x0, (%r14)
jne 0x2b650
movl %ebp, %ecx
movq %rcx, 0x148(%rax)
cmpl $0x0, (%r14)
je 0x2b65f
movq %rbx, %rdi
callq 0x122c0
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
movq %rbx, 0x158(%rax)
jmp 0x2b65a