// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/assembler.c
// Function: prv_parse_fpa_stran_pre
static void prv_parse_fpa_stran_pre(subtilis_arm_ass_context_t *c,
				    subtilis_arm_instr_type_t itype,
				    subtilis_arm_ccode_type_t ccode,
				    size_t size, subtilis_arm_reg_t dest,
				    subtilis_arm_reg_t base,
				    subtilis_error_t *err)
{
	const char *tbuf;
	uint8_t offset;
	bool sub = false;
	subtilis_fpa_stran_instr_t *stran;
	subtilis_arm_instr_t *instr;
	bool write_back = false;

	offset = prv_get_fpa_stran_offset(c, &sub, 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, "!")) {
		if (base == 15) {
			subtilis_error_set_ass_bad_reg(
			    err, "R15", c->l->stream->name, c->l->line);
			return;
		}
		write_back = true;
		subtilis_lexer_get(c->l, c->t, 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;

	stran = &instr->operands.fpa_stran;
	stran->ccode = ccode;
	stran->size = size;
	stran->dest = dest;
	stran->base = base;
	stran->offset = offset;
	stran->pre_indexed = true;
	stran->write_back = write_back;
	stran->subtract = sub;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, 0x10(%rsp)
movq %r8, %rbp
movq %rcx, %r13
movl %edx, %ebx
movl %esi, %r14d
movq %rdi, %r15
movq 0x50(%rsp), %r12
leaq 0x7(%rsp), %rsi
movb $0x0, (%rsi)
movq %r12, %rdx
callq 0x66f5a
cmpl $0x0, (%r12)
je 0x66caf
addq $0x18, %rsp
jmp 0x66d0c
movb %al, 0x6(%rsp)
movq 0x10(%rsp), %r12
movq 0x10(%r15), %rdi
callq 0x12ad0
movq 0x10(%r15), %rsi
cmpl $0x2, (%rsi)
jne 0x66cd5
cmpb $0x5d, (%rax)
jne 0x66cd5
cmpb $0x0, 0x1(%rax)
je 0x66d17
movq 0x8(%r15), %rcx
movq 0x30(%rcx), %r8
movl 0x38(%rcx), %r9d
leaq 0x10088(%rip), %r10     # 0x76d70
leaq 0x101a7(%rip), %rdx     # 0x76e96
movq 0x50(%rsp), %rdi
movl $0x1d, %esi
movq %rax, %rcx
pushq $0x938                  # imm = 0x938
pushq %r10
callq 0x143da
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%r15), %rdi
movq %r15, 0x8(%rsp)
movq 0x50(%rsp), %r15
movq %r15, %rdx
callq 0x12edc
cmpl $0x0, (%r15)
jne 0x66ca9
movq 0x8(%rsp), %r15
movq 0x10(%r15), %rdi
callq 0x12ad0
movq 0x10(%r15), %rsi
cmpl $0x2, (%rsi)
movq %r15, %r8
jne 0x66d69
cmpb $0x21, (%rax)
movl %r14d, %ecx
jne 0x66d71
cmpb $0x0, 0x1(%rax)
movq 0x50(%rsp), %r14
je 0x66dba
xorl %r15d, %r15d
jmp 0x66d79
xorl %r15d, %r15d
movl %r14d, %ecx
jmp 0x66d74
xorl %r15d, %r15d
movq 0x50(%rsp), %r14
movq (%r8), %rdi
movl %ecx, %esi
movq %r14, %rdx
callq 0x4f6e2
cmpl $0x0, (%r14)
movb 0x6(%rsp), %cl
jne 0x66ca9
movl %ebx, 0x8(%rax)
movq %r13, 0x10(%rax)
movq %rbp, 0x18(%rax)
movq %r12, 0x20(%rax)
movb %cl, 0x28(%rax)
movb $0x1, 0x29(%rax)
movb %r15b, 0x2a(%rax)
movb 0x7(%rsp), %cl
movb %cl, 0x2b(%rax)
jmp 0x66ca9
movq 0x8(%r8), %rdi
cmpq $0xf, %r12
jne 0x66df4
movq 0x30(%rdi), %r8
movl 0x38(%rdi), %r9d
leaq 0xff9d(%rip), %rax      # 0x76d70
leaq 0x10028(%rip), %rdx     # 0x76e02
leaq 0xd034(%rip), %rcx      # 0x73e15
movq %r14, %rdi
movl $0x58, %esi
pushq $0x944                  # imm = 0x944
pushq %rax
jmp 0x66d03
movq %r14, %rdx
movq %r8, %r15
movl %ecx, %r14d
callq 0x12edc
movq 0x50(%rsp), %rax
cmpl $0x0, (%rax)
jne 0x66ca9
movl %r14d, %ecx
movq %rax, %r14
movq %r15, %r8
movb $0x1, %r15b
jmp 0x66d79