// File: /workspace/github_c_makefile_star2_O1/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 0x12eda
cmpl $0x0, (%rbx)
jne 0x285b8
movq %r15, %rdi
callq 0x12ad0
movq %rax, %r12
cmpl $0x2, (%r15)
jne 0x28585
leaq 0x4b599(%rip), %rsi     # 0x73aca
movq %r12, %rdi
callq 0x12160
movl %eax, %ebp
testl %eax, %eax
je 0x285c3
leaq 0x4bcc8(%rip), %rsi     # 0x74212
movq %r12, %rdi
callq 0x12160
testl %eax, %eax
je 0x285e6
movq (%r14), %rax
movq 0x30(%rax), %r8
movl 0x38(%rax), %r9d
leaq 0x4b540(%rip), %rax     # 0x73aac
leaq 0x4bc9f(%rip), %rdx     # 0x74212
movq %rbx, %rdi
movl $0x1d, %esi
movq %r12, %rcx
pushq $0x129                  # imm = 0x129
jmp 0x285ae
movq (%r14), %rax
movq 0x30(%rax), %r8
movl 0x38(%rax), %r9d
leaq 0x4b515(%rip), %rax     # 0x73aac
leaq 0x4b527(%rip), %rdx     # 0x73ac5
movq %rbx, %rdi
movl $0x1d, %esi
movq %r12, %rcx
pushq $0x11b                  # imm = 0x11B
pushq %rax
callq 0x1442a
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 0x12eda
cmpl $0x0, (%rbx)
jne 0x285b8
movq %r15, %rdi
callq 0x12ad0
movq %rax, %r12
jmp 0x28543
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x1ee69
cmpl $0x0, (%rbx)
jne 0x285b8
movq %rax, %r12
movq (%r14), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x12eda
cmpl $0x0, (%rbx)
je 0x28619
movq %r12, %rdi
callq 0x2b4c3
jmp 0x285b8
testl %ebp, %ebp
je 0x28633
movq %r14, %rdi
movq %r12, %rsi
movq %rbx, %rdx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x36b2f
movq %r12, %rdi
callq 0x373fd
testb %al, %al
jne 0x28659
movq %r14, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x3691f
cmpl $0x0, (%rbx)
jne 0x285b8
movq %rax, %r12
movq %r14, %rdi
movq %r12, %rsi
movq %rbx, %rdx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x36bcc