// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq $0x0, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movl $0x34, -0x3c(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x9c570
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, (%rax)
je 0x9c1c6
jmp 0x9c39e
jmp 0x9c1c8
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
movb $0x1, %al
cmpl $0x2, (%rcx)
movb %al, -0x3d(%rbp)
je 0x9c1eb
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
cmpl $0x1, (%rax)
sete %al
movb %al, -0x3d(%rbp)
movb -0x3d(%rbp), %al
testb $0x1, %al
jne 0x9c1f7
jmp 0x9c394
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x12d70
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl (%rax), %eax
movl %eax, -0x34(%rbp)
cmpl $0x2, -0x34(%rbp)
jne 0x9c259
movq -0x20(%rbp), %rdi
leaq 0x13f38(%rip), %rsi     # 0xb015e
callq 0x12140
cmpl $0x0, %eax
je 0x9c24a
movq -0x20(%rbp), %rdi
leaq 0xe6dc(%rip), %rsi      # 0xaa917
callq 0x12140
cmpl $0x0, %eax
je 0x9c24a
jmp 0x9c394
leaq -0x38(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x12060
jmp 0x9c27a
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl 0x8(%rax), %eax
movl %eax, -0x3c(%rbp)
cmpl $0xd, -0x3c(%rbp)
je 0x9c278
cmpl $0x18, -0x3c(%rbp)
je 0x9c278
jmp 0x9c394
jmp 0x9c27a
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x18(%rbp), %rdx
callq 0x133f0
movq -0x18(%rbp), %rax
cmpl $0x0, (%rax)
je 0x9c2a1
jmp 0x9c39e
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x9c570
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, (%rax)
je 0x9c2c0
jmp 0x9c39e
cmpl $0x1, -0x34(%rbp)
jne 0x9c31c
cmpl $0xd, -0x3c(%rbp)
jne 0x9c2ee
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x30(%rbp), %rdx
movq -0x18(%rbp), %r8
leaq 0x3ed(%rip), %rcx       # 0x9c6d0
callq 0x9b990
movq %rax, -0x28(%rbp)
jmp 0x9c31a
cmpl $0x18, -0x3c(%rbp)
jne 0x9c316
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x30(%rbp), %rdx
movq -0x18(%rbp), %r8
leaq 0x435(%rip), %rcx       # 0x9c740
callq 0x9b990
movq %rax, -0x28(%rbp)
jmp 0x9c318
jmp 0x9c394
jmp 0x9c31a
jmp 0x9c37c
leaq -0x38(%rbp), %rdi
leaq 0x13e37(%rip), %rsi     # 0xb015e
callq 0x12140
cmpl $0x0, %eax
jne 0x9c35a
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x30(%rbp), %rdx
movq -0x18(%rbp), %r9
leaq 0x468(%rip), %rcx       # 0x9c7b0
leaq 0x481(%rip), %r8        # 0x9c7d0
callq 0x9c4f0
movq %rax, -0x28(%rbp)
jmp 0x9c37a
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x30(%rbp), %rdx
movq -0x18(%rbp), %r8
leaq 0x55f(%rip), %rcx       # 0x9c8d0
callq 0x9c800
movq %rax, -0x28(%rbp)
jmp 0x9c37c
movq $0x0, -0x30(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, (%rax)
je 0x9c38f
jmp 0x9c39e
jmp 0x9c1c8
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x9c3b8
movq -0x30(%rbp), %rdi
callq 0x9a4c0
movq -0x28(%rbp), %rdi
callq 0x9a4c0
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)