// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/frontend/parser_error.c
// Function: subtilis_parser_try_one_exp
subtilis_exp_t *subtilis_parser_try_one_exp(subtilis_parser_t *p,
					    subtilis_token_t *t,
					    subtilis_error_t *err)
{
	subtilis_ir_operand_t handler_label;
	subtilis_ir_operand_t skip_label;
	subtilis_ir_operand_t retval;
	subtilis_ir_operand_t zero;
	subtilis_exp_t *e = NULL;

	retval.reg = p->current->reg_counter++;
	zero.integer = 0;

	handler_label.label = subtilis_ir_section_new_label(p->current);
	skip_label.label = subtilis_ir_section_new_label(p->current);

	p->level++;
	p->current->try_depth++;

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

	p->current->handler_list = subtilis_handler_list_update(
	    p->current->handler_list, p->level, handler_label.label, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

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

	p->current->endproc = false;

	subtilis_ir_section_add_instr_no_reg2(
	    p->current, SUBTILIS_OP_INSTR_MOVI_I32, retval, zero, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	subtilis_ir_section_add_instr_no_reg(p->current, SUBTILIS_OP_INSTR_JMP,
					     skip_label, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	subtilis_ir_section_add_label(p->current, handler_label.label, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

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

	subtilis_ir_section_add_instr_no_reg2(p->current, SUBTILIS_OP_INSTR_MOV,
					      retval, e->exp.ir_op, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	subtilis_var_set_eflag(p, false, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	subtilis_ir_section_add_label(p->current, skip_label.label, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	subtilis_exp_delete(e);

	p->current->try_depth--;

	return subtilis_exp_new_int32_var(retval.reg, err);

cleanup:
	subtilis_exp_delete(e);

	return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r13
movq %rdi, %r15
movq 0x48(%rdi), %rdi
movq 0x18(%rdi), %r14
leaq 0x1(%r14), %rax
movq %rax, 0x18(%rdi)
callq 0x2b774
movq %rax, %rbp
movq 0x48(%r15), %rdi
callq 0x2b774
movq %rax, %r12
incq 0x78(%r15)
movq 0x48(%r15), %rax
incq 0x68(%rax)
movq (%r15), %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x12e0e
cmpl $0x0, (%rbx)
jne 0x23b75
movq 0x48(%r15), %rax
movq 0x78(%r15), %rsi
movq 0x78(%rax), %rdi
movq %rbp, %rdx
movq %rbx, %rcx
callq 0x2a6b8
movq 0x48(%r15), %rcx
movq %rax, 0x78(%rcx)
cmpl $0x0, (%rbx)
jne 0x23b75
movq %r15, %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x1d704
cmpl $0x0, (%rbx)
je 0x23b91
xorl %r13d, %r13d
movq %r13, %rdi
callq 0x29d88
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x48(%r15), %rdi
movb $0x0, 0x88(%rdi)
xorl %r13d, %r13d
pushq $0x1b
popq %rsi
movq %r14, %rdx
xorl %ecx, %ecx
movq %rbx, %r8
callq 0x2a9a4
cmpl $0x0, (%rbx)
jne 0x23b78
movq 0x48(%r15), %rdi
pushq $0x45
popq %rsi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x2a997
cmpl $0x0, (%rbx)
jne 0x23b75
movq 0x48(%r15), %rdi
movq %rbp, %rsi
movq %rbx, %rdx
callq 0x2b781
cmpl $0x0, (%rbx)
jne 0x23b75
leaq 0x8259a(%rip), %rax     # 0xa6180
movq (%rax), %rsi
movq %r15, %rdi
movq %rbx, %rdx
callq 0x33cb3
movq %rax, %r13
cmpl $0x0, (%rbx)
jne 0x23b78
movq 0x48(%r15), %rdi
movq 0x148(%r13), %rcx
pushq $0x1d
popq %rsi
movq %r14, %rdx
movq %rbx, %r8
callq 0x2a9a4
cmpl $0x0, (%rbx)
jne 0x23b78
movq %r15, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x33da7
cmpl $0x0, (%rbx)
jne 0x23b78
movq 0x48(%r15), %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x2b781
cmpl $0x0, (%rbx)
jne 0x23b78
movq %r13, %rdi
callq 0x29d88
movq 0x48(%r15), %rax
decq 0x68(%rax)
movl %r14d, %edi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2a336