// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq $0x0, -0x30(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x133f0
movq -0x20(%rbp), %rax
cmpl $0x0, (%rax)
je 0x32bbe
movq $0x0, -0x8(%rbp)
jmp 0x32d49
movq -0x18(%rbp), %rdi
callq 0x12d70
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
leaq 0x786c6(%rip), %rsi     # 0xab29c
callq 0x12140
cmpl $0x0, %eax
je 0x32c32
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x30(%rax), %r8
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl 0x38(%rax), %r9d
movl $0x15, %esi
leaq 0x77cfc(%rip), %rdx     # 0xaa902
leaq 0x78669(%rip), %rcx     # 0xab276
leaq 0x77efc(%rip), %rax     # 0xaab10
movq %rax, (%rsp)
movl $0xe9, 0x8(%rsp)
callq 0x156d0
movq $0x0, -0x8(%rbp)
jmp 0x32d49
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
leaq -0x30(%rbp), %rdx
movq -0x20(%rbp), %r8
movl $0x2, %ecx
callq 0x255b0
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rax
cmpl $0x0, (%rax)
je 0x32c66
movq $0x0, -0x8(%rbp)
jmp 0x32d49
cmpq $0x2, -0x40(%rbp)
jne 0x32c7f
movq -0x28(%rbp), %rax
cmpl $0x3, (%rax)
je 0x32cb1
movq -0x28(%rbp), %rax
cmpl $0x7, (%rax)
je 0x32cb1
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x30(%rax), %rdx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl 0x38(%rax), %ecx
movl $0x49, %esi
leaq 0x77e6c(%rip), %r8      # 0xaab10
movl $0xf4, %r9d
callq 0x15930
jmp 0x32d13
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x488b0
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
cmpl $0x0, (%rax)
je 0x32cd1
jmp 0x32d13
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0x6a310
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x133f0
movq -0x20(%rbp), %rax
cmpl $0x0, (%rax)
je 0x32d09
jmp 0x32d13
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x32d49
movq $0x0, -0x48(%rbp)
movq -0x48(%rbp), %rax
cmpq -0x40(%rbp), %rax
jae 0x32d41
movq -0x48(%rbp), %rax
movq -0x30(%rbp,%rax,8), %rdi
callq 0x36ee0
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x32d1b
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)