// File: /workspace/github_c_makefile_star2_O0/markdryan[P]subtilis/arch/arm32/assembler.c
// Function: prv_parse_mtran
static void prv_parse_mtran(subtilis_arm_ass_context_t *c,
			    subtilis_arm_instr_type_t itype,
			    subtilis_arm_ccode_type_t ccode,
			    subtilis_arm_mtran_type_t mtran_type,
			    subtilis_error_t *err)
{
	subtilis_arm_reg_t dest;
	const char *tbuf;
	subtilis_arm_reg_t reg1;
	size_t reg_list = 0;
	bool write_back = false;
	bool status = false;

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

	tbuf = subtilis_token_get_text(c->t);
	if ((c->t->type == SUBTILIS_TOKEN_OPERATOR) && !strcmp(tbuf, "!")) {
		write_back = true;
		subtilis_lexer_get(c->l, c->t, err);
		if (err->type != SUBTILIS_ERROR_OK)
			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;
	}

	subtilis_lexer_get(c->l, c->t, err);
	if (err->type != SUBTILIS_ERROR_OK)
		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;
	}

	do {
		reg1 = prv_parse_reg(c, err);
		reg_list |= 1 << reg1;
		if (err->type != SUBTILIS_ERROR_OK)
			return;

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

		if (!strcmp(tbuf, ","))
			continue;
		if (!strcmp(tbuf, "-")) {
			prv_parse_mtran_range(c, reg1, &reg_list, err);
			if (err->type != SUBTILIS_ERROR_OK)
				return;
			tbuf = subtilis_token_get_text(c->t);
			if (c->t->type != SUBTILIS_TOKEN_OPERATOR) {
				subtilis_error_set_expected(err, "} or ,", tbuf,
							    c->l->stream->name,
							    c->l->line);
				return;
			}
			if (!strcmp(tbuf, ","))
				continue;
			if (!strcmp(tbuf, "}"))
				break;

			subtilis_error_set_expected(err, "} or ,", tbuf,
						    c->l->stream->name,
						    c->l->line);
			return;
		} else if (!strcmp(tbuf, "}")) {
			break;
		}

		subtilis_error_set_expected(err, "} or ,", tbuf,
					    c->l->stream->name, c->l->line);
		return;
	} while (true);

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

	tbuf = subtilis_token_get_text(c->t);
	if ((c->t->type == SUBTILIS_TOKEN_OPERATOR) && !strcmp(tbuf, "^")) {
		status = true;
		subtilis_lexer_get(c->l, c->t, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return;
	}
	subtilis_arm_add_mtran(c->arm_s, itype, ccode, dest, reg_list,
			       mtran_type, write_back, status, err);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movq %r8, -0x20(%rbp)
movq $0x0, -0x40(%rbp)
movb $0x0, -0x41(%rbp)
movb $0x0, -0x42(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x94690
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpl $0x0, (%rax)
je 0x978d8
jmp 0x97d68
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x12d70
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
cmpl $0x2, (%rax)
jne 0x97947
movq -0x30(%rbp), %rdi
leaq 0x12bea(%rip), %rsi     # 0xaa4eb
callq 0x12140
cmpl $0x0, %eax
jne 0x97947
movb $0x1, -0x41(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x20(%rbp), %rdx
callq 0x133f0
movq -0x20(%rbp), %rax
cmpl $0x0, (%rax)
je 0x97936
jmp 0x97d68
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x12d70
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
cmpl $0x2, (%rax)
jne 0x97969
movq -0x30(%rbp), %rdi
leaq 0x12c4a(%rip), %rsi     # 0xaa5a9
callq 0x12140
cmpl $0x0, %eax
je 0x979b2
movq -0x20(%rbp), %rdi
movq -0x30(%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 0x12c14(%rip), %rdx     # 0xaa5a9
leaq 0x16784(%rip), %rax     # 0xae120
movq %rax, (%rsp)
movl $0x672, 0x8(%rsp)       # imm = 0x672
callq 0x156d0
jmp 0x97d68
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x20(%rbp), %rdx
callq 0x133f0
movq -0x20(%rbp), %rax
cmpl $0x0, (%rax)
je 0x979d9
jmp 0x97d68
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x12d70
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
cmpl $0x2, (%rax)
jne 0x97a0c
movq -0x30(%rbp), %rdi
leaq 0x15c09(%rip), %rsi     # 0xad60b
callq 0x12140
cmpl $0x0, %eax
je 0x97a55
movq -0x20(%rbp), %rdi
movq -0x30(%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 0x15bd3(%rip), %rdx     # 0xad60b
leaq 0x166e1(%rip), %rax     # 0xae120
movq %rax, (%rsp)
movl $0x67d, 0x8(%rsp)       # imm = 0x67D
callq 0x156d0
jmp 0x97d68
jmp 0x97a57
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x99f00
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movl %eax, %ecx
movl $0x1, %eax
shll %cl, %eax
cltq
orq -0x40(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rax
cmpl $0x0, (%rax)
je 0x97a8d
jmp 0x97d68
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x12d70
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
cmpl $0x2, (%rax)
je 0x97af4
movq -0x20(%rbp), %rdi
movq -0x30(%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 0x1679b(%rip), %rdx     # 0xae272
leaq 0x16642(%rip), %rax     # 0xae120
movq %rax, (%rsp)
movl $0x68b, 0x8(%rsp)       # imm = 0x68B
callq 0x156d0
jmp 0x97d68
movq -0x30(%rbp), %rdi
leaq 0x12aaa(%rip), %rsi     # 0xaa5a9
callq 0x12140
cmpl $0x0, %eax
jne 0x97b0e
jmp 0x97c90
movq -0x30(%rbp), %rdi
leaq 0x129c3(%rip), %rsi     # 0xaa4dc
callq 0x12140
cmpl $0x0, %eax
jne 0x97c2e
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x20(%rbp), %rcx
leaq -0x40(%rbp), %rdx
callq 0x9a010
movq -0x20(%rbp), %rax
cmpl $0x0, (%rax)
je 0x97b4a
jmp 0x97d68
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x12d70
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
cmpl $0x2, (%rax)
je 0x97bb1
movq -0x20(%rbp), %rdi
movq -0x30(%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 0x166e1(%rip), %rdx     # 0xae275
leaq 0x16585(%rip), %rax     # 0xae120
movq %rax, (%rsp)
movl $0x699, 0x8(%rsp)       # imm = 0x699
callq 0x156d0
jmp 0x97d68
movq -0x30(%rbp), %rdi
leaq 0x129ed(%rip), %rsi     # 0xaa5a9
callq 0x12140
cmpl $0x0, %eax
jne 0x97bcb
jmp 0x97c90
movq -0x30(%rbp), %rdi
leaq 0x12a55(%rip), %rsi     # 0xaa62b
callq 0x12140
cmpl $0x0, %eax
jne 0x97be5
jmp 0x97c9c
movq -0x20(%rbp), %rdi
movq -0x30(%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 0x16664(%rip), %rdx     # 0xae275
leaq 0x16508(%rip), %rax     # 0xae120
movq %rax, (%rsp)
movl $0x6a3, 0x8(%rsp)       # imm = 0x6A3
callq 0x156d0
jmp 0x97d68
movq -0x30(%rbp), %rdi
leaq 0x129f2(%rip), %rsi     # 0xaa62b
callq 0x12140
cmpl $0x0, %eax
jne 0x97c45
jmp 0x97c9c
jmp 0x97c47
movq -0x20(%rbp), %rdi
movq -0x30(%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 0x16602(%rip), %rdx     # 0xae275
leaq 0x164a6(%rip), %rax     # 0xae120
movq %rax, (%rsp)
movl $0x6aa, 0x8(%rsp)       # imm = 0x6AA
callq 0x156d0
jmp 0x97d68
movb $0x1, %al
testb $0x1, %al
jne 0x97a57
jmp 0x97c9c
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x20(%rbp), %rdx
callq 0x133f0
movq -0x20(%rbp), %rax
cmpl $0x0, (%rax)
je 0x97cc3
jmp 0x97d68
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x12d70
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
cmpl $0x2, (%rax)
jne 0x97d20
movq -0x30(%rbp), %rdi
leaq 0x12c2d(%rip), %rsi     # 0xaa919
callq 0x12140
cmpl $0x0, %eax
jne 0x97d20
movb $0x1, -0x42(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x20(%rbp), %rdx
callq 0x133f0
movq -0x20(%rbp), %rax
cmpl $0x0, (%rax)
je 0x97d1e
jmp 0x97d68
jmp 0x97d20
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
movq -0x28(%rbp), %rcx
movq -0x40(%rbp), %r8
movl -0x14(%rbp), %r9d
movb -0x41(%rbp), %r11b
movb -0x42(%rbp), %r10b
movq -0x20(%rbp), %rax
andb $0x1, %r11b
andb $0x1, %r10b
movzbl %r11b, %r11d
movl %r11d, (%rsp)
movzbl %r10b, %r10d
movl %r10d, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0x727a0
addq $0x60, %rsp
popq %rbp
retq
nop