// File: /workspace/github_c_makefile_star2_O2/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 0x64ef7
movq %rax, %r13
cmpl $0x0, (%r14)
je 0x64c80
xorl %edi, %edi
callq 0x63ee7
movq %r13, %rdi
callq 0x63ee7
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 0x12a25
movq 0x10(%r15), %rcx
cmpl $0x4, (%rcx)
jne 0x64ccc
xorl %edx, %edx
cmpl 0x8(%rcx), %edx
jno 0x64ccc
movq 0x8(%r15), %rcx
movq 0x30(%rcx), %r8
movl 0x38(%rcx), %r9d
leaq 0xc2b8(%rip), %r10      # 0x70f64
leaq 0x9112(%rip), %rcx      # 0x6ddc5
pushq $0x8
popq %rsi
movq %r14, %rdi
movq %rax, %rdx
pushq $0x70b                  # imm = 0x70B
pushq %r10
callq 0x140cd
popq %rax
popq %rcx
jmp 0x64c5c
leaq 0x8(%r13), %rax
movq %rax, 0x10(%rsp)
movq %r13, 0x8(%rsp)
movq 0x10(%r15), %rdi
cmpl $0x2, (%rdi)
jne 0x64c6e
callq 0x12a25
movzbl (%rax), %ecx
cmpl $0x2d, %ecx
je 0x64d15
cmpl $0x2b, %ecx
jne 0x64c6e
movb $0x1, %r13b
cmpb $0x0, 0x1(%rax)
leaq 0x34e(%rip), %rbp       # 0x65055
leaq 0x34b(%rip), %r12       # 0x65059
je 0x64d30
jmp 0x64dfb
cmpb $0x0, 0x1(%rax)
jne 0x64c6e
xorl %r13d, %r13d
leaq 0x335(%rip), %rbp       # 0x6505e
leaq 0x333(%rip), %r12       # 0x65063
movq 0x8(%r15), %rdi
movq 0x10(%r15), %rsi
movq %r14, %rdx
callq 0x12e0e
cmpl $0x0, (%r14)
jne 0x64de4
movq %r15, %rdi
movq %r14, %rsi
callq 0x64ef7
movq %rax, %rbx
cmpl $0x0, (%r14)
jne 0x64dee
testb %r13b, %r13b
movq 0x8(%rsp), %r13
je 0x64db6
cmpl $0x8, (%r13)
jne 0x64db6
cmpl $0x8, (%rbx)
jne 0x64db6
movq 0x10(%rsp), %r12
movq %r12, %rdi
callq 0x149da
movq %rbx, %rsi
addq $0x8, %rsi
movq %r12, %rdi
movq %r14, %rdx
callq 0x14819
movq %rbx, %rdi
callq 0x63ee7
cmpl $0x0, (%r14)
je 0x64cda
movq %r13, %rdi
callq 0x63ee7
xorl %r13d, %r13d
jmp 0x64dd0
movq %r15, %rdi
movq %r13, %rsi
movq %rbx, %rdx
movq %rbp, %rcx
movq %r12, %r8
movq %r14, %r9
callq 0x65068
movq %rax, %r13
cmpl $0x0, (%r14)
movl $0x0, %edi
je 0x64ccc
jmp 0x64c5e
movq 0x8(%rsp), %r13
jmp 0x64c5c
movq %rbx, %rdi
movq 0x8(%rsp), %r13
jmp 0x64c5e
movq 0x8(%rsp), %r13
jmp 0x64c6e