// File: /workspace/github_c_makefile_star2_O0/markdryan[P]subtilis/arch/arm32/assembler.c
// Function: prv_parse_arm_mul
static void prv_parse_arm_mul(subtilis_arm_ass_context_t *c,
			      subtilis_arm_instr_type_t itype,
			      subtilis_arm_ccode_type_t ccode, bool status,
			      subtilis_error_t *err)
{
	subtilis_arm_reg_t dest;
	subtilis_arm_reg_t op1;
	subtilis_arm_reg_t op2;
	const char *tbuf;
	subtilis_arm_instr_t *instr;
	subtilis_arm_mul_instr_t *mul;
	subtilis_arm_reg_t op3 = 0;
	char buffer[32];

	dest = prv_get_reg(c, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	if (dest == 15) {
		sprintf(buffer, "R%zu", dest);
		subtilis_error_set_ass_bad_reg(err, buffer, c->l->stream->name,
					       c->l->line);
		return;
	}

	tbuf = subtilis_token_get_text(c->t);
	if ((c->t->type != SUBTILIS_TOKEN_OPERATOR) && (strcmp(tbuf, ","))) {
		subtilis_error_set_expected(err, ",", tbuf, c->l->stream->name,
					    c->l->line);
		return;
	}

	op1 = prv_get_reg(c, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	if (dest == op1) {
		sprintf(buffer, "R%zu", dest);
		subtilis_error_set_ass_bad_reg(err, buffer, c->l->stream->name,
					       c->l->line);
		return;
	}

	tbuf = subtilis_token_get_text(c->t);
	if ((c->t->type != SUBTILIS_TOKEN_OPERATOR) && (strcmp(tbuf, ","))) {
		subtilis_error_set_expected(err, ",", tbuf, c->l->stream->name,
					    c->l->line);
		return;
	}

	op2 = prv_get_reg(c, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	if (itype == SUBTILIS_ARM_INSTR_MLA) {
		tbuf = subtilis_token_get_text(c->t);
		if ((c->t->type != SUBTILIS_TOKEN_OPERATOR) &&
		    (strcmp(tbuf, ","))) {
			subtilis_error_set_expected(
			    err, ",", tbuf, c->l->stream->name, c->l->line);
			return;
		}

		op3 = prv_get_reg(c, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return;
	}

	instr = subtilis_arm_section_add_instr(c->arm_s, itype, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	mul = &instr->operands.mul;
	mul->ccode = ccode;
	mul->dest = dest;
	mul->rm = op1;
	mul->rs = op2;
	mul->rn = op3;
	mul->status = status;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movb %cl, %al
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
andb $0x1, %al
movb %al, -0x11(%rbp)
movq %r8, -0x20(%rbp)
movq $0x0, -0x58(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x94690
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpl $0x0, (%rax)
je 0x96fd7
jmp 0x972f4
cmpq $0xf, -0x28(%rbp)
jne 0x9703d
leaq -0x80(%rbp), %rdi
movq -0x28(%rbp), %rdx
leaq 0x167cc(%rip), %rsi     # 0xad7b9
movb $0x0, %al
callq 0x12250
movq -0x20(%rbp), %rdi
leaq -0x80(%rbp), %rdx
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x30(%rax), %r8
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movl 0x38(%rax), %r9d
movl $0x58, %esi
leaq 0x14256(%rip), %rcx     # 0xab276
leaq 0x170f9(%rip), %rax     # 0xae120
movq %rax, (%rsp)
movl $0x33a, 0x8(%rsp)       # imm = 0x33A
callq 0x156d0
jmp 0x972f4
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x12d70
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
cmpl $0x2, (%rax)
je 0x970b9
movq -0x40(%rbp), %rdi
leaq 0x13543(%rip), %rsi     # 0xaa5a9
callq 0x12140
cmpl $0x0, %eax
je 0x970b9
movq -0x20(%rbp), %rdi
movq -0x40(%rbp), %rcx
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x30(%rax), %r8
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movl 0x38(%rax), %r9d
movl $0x1d, %esi
leaq 0x1350d(%rip), %rdx     # 0xaa5a9
leaq 0x1707d(%rip), %rax     # 0xae120
movq %rax, (%rsp)
movl $0x341, 0x8(%rsp)       # imm = 0x341
callq 0x156d0
jmp 0x972f4
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x94690
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
cmpl $0x0, (%rax)
je 0x970d8
jmp 0x972f4
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
jne 0x97141
leaq -0x80(%rbp), %rdi
movq -0x28(%rbp), %rdx
leaq 0x166c8(%rip), %rsi     # 0xad7b9
movb $0x0, %al
callq 0x12250
movq -0x20(%rbp), %rdi
leaq -0x80(%rbp), %rdx
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x30(%rax), %r8
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movl 0x38(%rax), %r9d
movl $0x58, %esi
leaq 0x14152(%rip), %rcx     # 0xab276
leaq 0x16ff5(%rip), %rax     # 0xae120
movq %rax, (%rsp)
movl $0x34c, 0x8(%rsp)       # imm = 0x34C
callq 0x156d0
jmp 0x972f4
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x12d70
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
cmpl $0x2, (%rax)
je 0x971bd
movq -0x40(%rbp), %rdi
leaq 0x1343f(%rip), %rsi     # 0xaa5a9
callq 0x12140
cmpl $0x0, %eax
je 0x971bd
movq -0x20(%rbp), %rdi
movq -0x40(%rbp), %rcx
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x30(%rax), %r8
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movl 0x38(%rax), %r9d
movl $0x1d, %esi
leaq 0x13409(%rip), %rdx     # 0xaa5a9
leaq 0x16f79(%rip), %rax     # 0xae120
movq %rax, (%rsp)
movl $0x353, 0x8(%rsp)       # imm = 0x353
callq 0x156d0
jmp 0x972f4
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x94690
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rax
cmpl $0x0, (%rax)
je 0x971dc
jmp 0x972f4
cmpl $0x11, -0xc(%rbp)
jne 0x97280
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x12d70
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
cmpl $0x2, (%rax)
je 0x97262
movq -0x40(%rbp), %rdi
leaq 0x1339a(%rip), %rsi     # 0xaa5a9
callq 0x12140
cmpl $0x0, %eax
je 0x97262
movq -0x20(%rbp), %rdi
movq -0x40(%rbp), %rcx
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x30(%rax), %r8
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movl 0x38(%rax), %r9d
movl $0x1d, %esi
leaq 0x13364(%rip), %rdx     # 0xaa5a9
leaq 0x16ed4(%rip), %rax     # 0xae120
movq %rax, (%rsp)
movl $0x360, 0x8(%rsp)       # imm = 0x360
callq 0x156d0
jmp 0x972f4
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x94690
movq %rax, -0x58(%rbp)
movq -0x20(%rbp), %rax
cmpl $0x0, (%rax)
je 0x9727e
jmp 0x972f4
jmp 0x97280
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movl -0xc(%rbp), %esi
movq -0x20(%rbp), %rdx
callq 0x70b50
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rax
cmpl $0x0, (%rax)
je 0x972a2
jmp 0x972f4
movq -0x48(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x50(%rbp)
movl -0x10(%rbp), %ecx
movq -0x50(%rbp), %rax
movl %ecx, (%rax)
movq -0x28(%rbp), %rcx
movq -0x50(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x30(%rbp), %rcx
movq -0x50(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x38(%rbp), %rcx
movq -0x50(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x58(%rbp), %rcx
movq -0x50(%rbp), %rax
movq %rcx, 0x20(%rax)
movb -0x11(%rbp), %cl
movq -0x50(%rbp), %rax
andb $0x1, %cl
movb %cl, 0x4(%rax)
addq $0x90, %rsp
popq %rbp
retq
nopl (%rax)