// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/arm_expression.c
// Function: prv_priority4
static subtilis_arm_exp_val_t *prv_priority4(subtilis_arm_ass_context_t *c,
					     subtilis_error_t *err)
{
	const char *tbuf;
	subtilis_arm_exp_val_t *e1 = NULL;
	subtilis_arm_exp_val_t *e2 = NULL;
	subtilis_ass_int_fn_t int_fn;
	subtilis_ass_real_fn_t real_fn;
	bool plus;

	e1 = prv_priority3(c, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;
	tbuf = subtilis_token_get_text(c->t);

	/*
	 * Special case for number too big.
	 */

	if ((c->t->type == SUBTILIS_TOKEN_INTEGER) &&
	    (c->t->tok.integer == -2147483648)) {
		subtilis_error_set_number_too_long(
		    err, tbuf, c->l->stream->name, c->l->line);
		goto cleanup;
	}

	while (c->t->type == SUBTILIS_TOKEN_OPERATOR) {
		plus = false;
		tbuf = subtilis_token_get_text(c->t);

		if (!strcmp(tbuf, "+")) {
			int_fn = prv_add_int32_fn;
			real_fn = prv_add_real_fn;
			plus = true;
		} else if (!strcmp(tbuf, "-")) {
			int_fn = prv_sub_int32_fn;
			real_fn = prv_sub_real_fn;
		} else {
			break;
		}

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

		e2 = prv_priority3(c, err);
		if (err->type != SUBTILIS_ERROR_OK)
			goto cleanup;

		if (plus && e1->type == SUBTILIS_ARM_EXP_TYPE_STRING &&
		    e2->type == SUBTILIS_ARM_EXP_TYPE_STRING)
			e1 = prv_strcat(e1, e2, err);
		else
			e1 =
			    prv_binary_numeric(c, e1, e2, int_fn, real_fn, err);
		e2 = NULL;
		if (err->type != SUBTILIS_ERROR_OK)
			goto cleanup;
	}

	return e1;

cleanup:

	subtilis_arm_exp_val_free(e2);
	subtilis_arm_exp_val_free(e1);
	return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %r15
callq 0x69d8b
movq %rax, %r13
cmpl $0x0, (%r14)
je 0x69b10
xorl %edi, %edi
callq 0x68d41
movq %r13, %rdi
callq 0x68d41
xorl %r13d, %r13d
movq %r13, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%r15), %rdi
callq 0x12ad0
movq 0x10(%r15), %rcx
cmpl $0x4, (%rcx)
jne 0x69b60
xorl %edx, %edx
cmpl 0x8(%rcx), %edx
jno 0x69b60
movq 0x8(%r15), %rcx
movq 0x30(%rcx), %r8
movl 0x38(%rcx), %r9d
leaq 0xd4b8(%rip), %r10      # 0x76ff4
leaq 0xa2d2(%rip), %rcx      # 0x73e15
movq %r14, %rdi
movl $0x8, %esi
movq %rax, %rdx
pushq $0x70b                  # imm = 0x70B
pushq %r10
callq 0x143da
addq $0x10, %rsp
jmp 0x69aec
leaq 0x8(%r13), %rax
movq %rax, 0x10(%rsp)
movq %r13, 0x8(%rsp)
movq 0x10(%r15), %rdi
cmpl $0x2, (%rdi)
jne 0x69afe
callq 0x12ad0
movzbl (%rax), %ecx
cmpl $0x2d, %ecx
je 0x69ba9
cmpl $0x2b, %ecx
jne 0x69afe
movb $0x1, %r13b
cmpb $0x0, 0x1(%rax)
leaq 0x350(%rip), %rbp       # 0x69eeb
leaq 0x34d(%rip), %r12       # 0x69eef
je 0x69bc4
jmp 0x69c8f
cmpb $0x0, 0x1(%rax)
jne 0x69afe
xorl %r13d, %r13d
leaq 0x337(%rip), %rbp       # 0x69ef4
leaq 0x335(%rip), %r12       # 0x69ef9
movq 0x8(%r15), %rdi
movq 0x10(%r15), %rsi
movq %r14, %rdx
callq 0x12edc
cmpl $0x0, (%r14)
jne 0x69c78
movq %r15, %rdi
movq %r14, %rsi
callq 0x69d8b
movq %rax, %rbx
cmpl $0x0, (%r14)
jne 0x69c82
testb %r13b, %r13b
movq 0x8(%rsp), %r13
je 0x69c4a
cmpl $0x8, (%r13)
jne 0x69c4a
cmpl $0x8, (%rbx)
jne 0x69c4a
movq 0x10(%rsp), %r12
movq %r12, %rdi
callq 0x14d35
movq %rbx, %rsi
addq $0x8, %rsi
movq %r12, %rdi
movq %r14, %rdx
callq 0x14b6c
movq %rbx, %rdi
callq 0x68d41
cmpl $0x0, (%r14)
je 0x69b6e
movq %r13, %rdi
callq 0x68d41
xorl %r13d, %r13d
jmp 0x69c64
movq %r15, %rdi
movq %r13, %rsi
movq %rbx, %rdx
movq %rbp, %rcx
movq %r12, %r8
movq %r14, %r9
callq 0x69efe
movq %rax, %r13
cmpl $0x0, (%r14)
movl $0x0, %edi
je 0x69b60
jmp 0x69aee
movq 0x8(%rsp), %r13
jmp 0x69aec
movq %rbx, %rdi
movq 0x8(%rsp), %r13
jmp 0x69aee
movq 0x8(%rsp), %r13
jmp 0x69afe