// File: /workspace/github_c_makefile_star2_O2/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 0x12e0e
cmpl $0x0, (%rbx)
jne 0x271c9
movq %r15, %rdi
callq 0x12a25
cmpl $0x2, (%r15)
jne 0x27163
movb (%rax), %bpl
cmpb $0x7e, %bpl
jne 0x2718c
cmpb $0x0, 0x1(%rax)
jne 0x27199
movq (%r14), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x12e0e
cmpl $0x0, (%rbx)
jne 0x271c9
movq %r15, %rdi
callq 0x12a25
movb (%rax), %cl
jmp 0x2718e
movq (%r14), %rcx
movq 0x30(%rcx), %r8
movl 0x38(%rcx), %r9d
leaq 0x4690d(%rip), %r10     # 0x6da82
leaq 0x4691f(%rip), %rdx     # 0x6da9b
pushq $0x1d
popq %rsi
movq %rbx, %rdi
movq %rax, %rcx
pushq $0x11b                  # imm = 0x11B
jmp 0x271c0
movl %ebp, %ecx
cmpb $0x28, %cl
jne 0x27199
cmpb $0x0, 0x1(%rax)
je 0x271d4
movq (%r14), %rcx
movq 0x30(%rcx), %r8
movl 0x38(%rcx), %r9d
leaq 0x468d7(%rip), %r10     # 0x6da82
leaq 0x47030(%rip), %rdx     # 0x6e1e2
pushq $0x1d
popq %rsi
movq %rbx, %rdi
movq %rax, %rcx
pushq $0x129                  # imm = 0x129
pushq %r10
callq 0x140cd
popq %rax
popq %rcx
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x1e2a1
cmpl $0x0, (%rbx)
jne 0x271c9
movq %rax, %r12
movq (%r14), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x12e0e
cmpl $0x0, (%rbx)
je 0x27207
movq %r12, %rdi
callq 0x29d88
jmp 0x271c9
cmpb $0x7e, %bpl
jne 0x27245
movq %r12, %rdi
callq 0x353e4
testb %al, %al
jne 0x2722f
movq %r14, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x347d5
cmpl $0x0, (%rbx)
jne 0x271c9
movq %rax, %r12
movq %r14, %rdi
movq %r12, %rsi
movq %rbx, %rdx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x34a63
movq %r14, %rdi
movq %r12, %rsi
movq %rbx, %rdx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x349ca