// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/arch/arm32/arm_expression.c
// Function: prv_priority3
static subtilis_arm_exp_val_t *prv_priority3(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_token_type_t tt;
	char op[4];
	int keyword = SUBTILIS_ARM_KEYWORD_MAX;

	e1 = prv_priority2(c, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;
	while ((c->t->type == SUBTILIS_TOKEN_OPERATOR) ||
	       (c->t->type == SUBTILIS_TOKEN_KEYWORD)) {
		tbuf = subtilis_token_get_text(c->t);
		tt = c->t->type;
		if (tt == SUBTILIS_TOKEN_OPERATOR) {
			if (strcmp(tbuf, "*") && strcmp(tbuf, "/"))
				break;
			strcpy(op, tbuf);
		} else {
			keyword = c->t->tok.keyword.type;
			if ((keyword != SUBTILIS_ARM_KEYWORD_DIV) &&
			    (keyword != SUBTILIS_ARM_KEYWORD_MOD))
				break;
		}

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

		if (tt == SUBTILIS_TOKEN_KEYWORD) {
			if (keyword == SUBTILIS_ARM_KEYWORD_DIV)
				e1 = prv_binary_int(c, e1, e2, prv_div_int32_fn,
						    err);
			else if (keyword == SUBTILIS_ARM_KEYWORD_MOD)
				e1 = prv_binary_int(c, e1, e2, prv_mod_int32_fn,
						    err);
			else
				break;
		} else if (!strcmp(op, "*")) {
			e1 = prv_binary_numeric(c, e1, e2, prv_mul_int32_fn,
						prv_mul_real_fn, err);
		} else {
			e1 = prv_binary_real(c, e1, e2, prv_div_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
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
callq 0x65085
movq %rax, %rbx
cmpl $0x0, (%r14)
je 0x64f3c
xorl %eax, %eax
movq %rax, %rdi
callq 0x63ee7
movq %rbx, %rdi
callq 0x63ee7
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x34
popq %r13
movq 0x10(%r15), %rdi
movl (%rdi), %eax
decl %eax
cmpl $0x1, %eax
ja 0x64f2a
callq 0x12a25
movq 0x10(%r15), %rbp
movl (%rbp), %r12d
cmpl $0x2, %r12d
jne 0x64f82
movzbl (%rax), %ecx
cmpl $0x2f, %ecx
je 0x64f6d
cmpl $0x2a, %ecx
jne 0x64f2a
cmpb $0x0, 0x1(%rax)
jne 0x64f2a
leaq 0x4(%rsp), %rdi
movq %rax, %rsi
callq 0x12070
jmp 0x64f92
movl 0x8(%rbp), %r13d
cmpl $0x18, %r13d
je 0x64f92
cmpl $0xd, %r13d
jne 0x64f2a
movq 0x8(%r15), %rdi
movq %rbp, %rsi
movq %r14, %rdx
callq 0x12e0e
cmpl $0x0, (%r14)
jne 0x64f16
movq %r15, %rdi
movq %r14, %rsi
callq 0x65085
cmpl $0x0, (%r14)
jne 0x64f18
cmpl $0x1, %r12d
jne 0x64fe8
cmpl $0x18, %r13d
je 0x6500a
cmpl $0xd, %r13d
jne 0x64f2a
movq %r15, %rdi
movq %rbx, %rsi
movq %rax, %rdx
leaq 0x16b(%rip), %rcx       # 0x65151
jmp 0x6501a
cmpw $0x2a, 0x4(%rsp)
je 0x65024
movq %r15, %rdi
movq %rbx, %rsi
movq %rax, %rdx
leaq 0x261(%rip), %rcx       # 0x65261
movq %r14, %r8
callq 0x651d4
jmp 0x65043
movq %r15, %rdi
movq %rbx, %rsi
movq %rax, %rdx
leaq 0x172(%rip), %rcx       # 0x6518c
movq %r14, %r8
callq 0x64bb4
jmp 0x65043
movq %r15, %rdi
movq %rbx, %rsi
movq %rax, %rdx
leaq 0x195(%rip), %rcx       # 0x651c9
leaq 0x194(%rip), %r8        # 0x651cf
movq %r14, %r9
callq 0x65068
movq %rax, %rbx
cmpl $0x0, (%r14)
je 0x64f40
jmp 0x64f16