// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%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 0x3346e
movq $0x0, -0x8(%rbp)
jmp 0x33633
movq -0x18(%rbp), %rdi
callq 0x12d70
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
leaq 0x77e16(%rip), %rsi     # 0xab29c
callq 0x12140
cmpl $0x0, %eax
je 0x334e2
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 0x7744c(%rip), %rdx     # 0xaa902
leaq 0x77db9(%rip), %rcx     # 0xab276
leaq 0x7764c(%rip), %rax     # 0xaab10
movq %rax, (%rsp)
movl $0x2df, 0x8(%rsp)       # imm = 0x2DF
callq 0x156d0
movq $0x0, -0x8(%rbp)
jmp 0x33633
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
leaq -0x40(%rbp), %rdx
movq -0x20(%rbp), %r8
movl $0x2, %ecx
callq 0x255b0
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpl $0x0, (%rax)
je 0x33516
movq $0x0, -0x8(%rbp)
jmp 0x33633
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 0x33538
jmp 0x335fd
cmpq $0x0, -0x28(%rbp)
jne 0x33574
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 0x775ac(%rip), %r8      # 0xaab10
movl $0x2ed, %r9d            # imm = 0x2ED
callq 0x15930
jmp 0x335fd
cmpq $0x1, -0x28(%rbp)
jne 0x33599
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0x33640
movq %rax, -0x8(%rbp)
jmp 0x33633
cmpq $0x2, -0x28(%rbp)
jne 0x335bb
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
leaq -0x40(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0x338d0
movq %rax, -0x8(%rbp)
jmp 0x33633
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x30(%rax), %r8
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl 0x38(%rax), %r9d
movl $0x28, %esi
movl $0x2, %edx
leaq 0x77524(%rip), %rax     # 0xaab10
movq %rax, (%rsp)
movl $0x2f8, 0x8(%rsp)       # imm = 0x2F8
callq 0x157b0
movq $0x0, -0x48(%rbp)
movq -0x48(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x3362b
movq -0x48(%rbp), %rax
movq -0x40(%rbp,%rax,8), %rdi
callq 0x36ee0
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x33605
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)