// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/arch/arm32/assembler.c
// Function: prv_parse_stran_pre
static void prv_parse_stran_pre(subtilis_arm_ass_context_t *c,
				subtilis_arm_instr_type_t itype,
				subtilis_arm_ccode_type_t ccode,
				subtilis_arm_reg_t dest,
				subtilis_arm_reg_t base,
				const subtilis_arm_ass_modifiers_t *modifiers,
				subtilis_error_t *err)
{
	subtilis_arm_exp_val_t *val;
	subtilis_arm_op2_t offset;
	const char *tbuf;
	bool subtract = false;

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

	val = prv_get_offset(c, &subtract, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	if (itype == SUBTILIS_ARM_STRAN_MISC_LDR ||
	    itype == SUBTILIS_ARM_STRAN_MISC_STR) {
		prv_stran_misc_pre(c, itype, ccode, dest, base, modifiers, val,
				   err);
		return;
	}

	tbuf = subtilis_token_get_text(c->t);
	if (val->type == SUBTILIS_ARM_EXP_TYPE_INT) {
		prv_parse_int_offset(c, val, &offset, &subtract, err);
		if (err->type != SUBTILIS_ERROR_OK)
			goto cleanup;
		if ((c->t->type != SUBTILIS_TOKEN_OPERATOR) ||
		    (strcmp(tbuf, "]"))) {
			subtilis_error_set_expected(
			    err, "]", tbuf, c->l->stream->name, c->l->line);
			goto cleanup;
		}
	} else if (val->type == SUBTILIS_ARM_EXP_TYPE_REG) {
		if (c->t->type != SUBTILIS_TOKEN_OPERATOR) {
			subtilis_error_set_expected(err, ", or ]", tbuf,
						    c->l->stream->name,
						    c->l->line);
			goto cleanup;
		}
		if (!strcmp(tbuf, "]")) {
			offset.op.reg = val->val.reg;
			offset.type = SUBTILIS_ARM_OP2_REG;
		} else if (!strcmp(tbuf, ",")) {
			prv_parse_shift_offset(c, val, &offset, err);
			if (err->type != SUBTILIS_ERROR_OK)
				goto cleanup;

			if ((c->t->type != SUBTILIS_TOKEN_OPERATOR) ||
			    (strcmp(tbuf, "]"))) {
				subtilis_error_set_expected(err, "]", tbuf,
							    c->l->stream->name,
							    c->l->line);
				goto cleanup;
			}
		} else {
			subtilis_error_set_expected(err, ", or ]", tbuf,
						    c->l->stream->name,
						    c->l->line);
			goto cleanup;
		}
	} else {
		subtilis_error_set_expected(err, "integer or register",
					    subtilis_arm_exp_type_name(val),
					    c->l->stream->name, c->l->line);
		goto cleanup;
	}

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

	prv_parse_stran_pre_off(c, itype, ccode, dest, base, modifiers->byte,
				offset, subtract, err);

cleanup:

	subtilis_arm_exp_val_free(val);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %r9, %rbx
movq %r8, 0x30(%rsp)
movq %rcx, %r12
movl %edx, %ebp
movl %esi, %r15d
movq %rdi, %r13
movq 0xa0(%rsp), %r14
movb $0x0, 0xe(%rsp)
movq 0x8(%rdi), %rdi
movq 0x10(%r13), %rsi
movq %r14, %rdx
callq 0x12eda
cmpl $0x0, (%r14)
jne 0x68761
leaq 0xe(%rsp), %rsi
movq %r13, %rdi
movq %r14, %rdx
callq 0x68aa3
cmpl $0x0, (%r14)
jne 0x68761
leal -0x83(%r15), %ecx
cmpl $0x1, %ecx
ja 0x68505
xorl %ecx, %ecx
movb %cl, 0x40(%rsp)
movb %cl, 0xf(%rsp)
movl (%rax), %ecx
cmpl $0x6, %ecx
je 0x685ab
cmpl $0x1, %ecx
jne 0x68719
movq %r12, 0x28(%rsp)
movl %ecx, 0x18(%rsp)
movq %rax, 0x10(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x20(%rsp)
jmp 0x685ea
movq 0x10(%r13), %rdi
movq %rax, 0x10(%rsp)
callq 0x12ad0
movq 0x10(%rsp), %rsi
movq %rax, %rcx
movl (%rsi), %eax
cmpl $0x1, %eax
je 0x6865e
cmpl $0x6, %eax
jne 0x686d1
movq %rcx, 0x18(%rsp)
leaq 0x40(%rsp), %rdx
leaq 0xe(%rsp), %rcx
movq %r13, %rdi
movq %r14, %r8
callq 0x68c94
movq 0x10(%rsp), %rdi
cmpl $0x0, (%r14)
jne 0x687a6
movq 0x10(%r13), %rax
cmpl $0x2, (%rax)
jne 0x6857a
leaq 0xe8cc(%rip), %rsi      # 0x76e34
movq 0x18(%rsp), %rdi
callq 0x12160
testl %eax, %eax
je 0x6888e
movq 0x8(%r13), %rax
movq 0x30(%rax), %r8
movl 0x38(%rax), %r9d
leaq 0xe783(%rip), %rax      # 0x76d10
leaq 0xe8a0(%rip), %rdx      # 0x76e34
movq %r14, %rdi
movl $0x1d, %esi
movq 0x18(%rsp), %rcx
pushq $0x53b                  # imm = 0x53B
jmp 0x68797
movq %r12, 0x28(%rsp)
movl %ecx, 0x18(%rsp)
leaq 0x40(%rsp), %rdx
leaq 0xf(%rsp), %rcx
movq %r13, %rdi
movq %rax, %r12
movq %rax, %rsi
movq %r14, %r8
callq 0x68ea6
movq %r12, %rdi
cmpl $0x0, (%r14)
jne 0x6875c
movq %rdi, 0x10(%rsp)
movq $-0x1, 0x20(%rsp)
movq 0x10(%r13), %rdi
callq 0x12ad0
movq %rax, %r12
movq 0x10(%r13), %rax
cmpl $0x2, (%rax)
jne 0x68620
movq %rax, 0x38(%rsp)
leaq 0xe829(%rip), %rsi      # 0x76e34
movq %r12, %rdi
callq 0x12160
movq 0x38(%rsp), %rsi
testl %eax, %eax
je 0x687b9
movq 0x8(%r13), %rax
movq 0x30(%rax), %r8
movl 0x38(%rax), %r9d
leaq 0xe6dd(%rip), %rax      # 0x76d10
leaq 0xe7fa(%rip), %rdx      # 0x76e34
movq %r14, %rdi
movl $0x1d, %esi
movq %r12, %rcx
pushq $0x4eb                  # imm = 0x4EB
pushq %rax
callq 0x1442a
addq $0x10, %rsp
movq 0x10(%rsp), %rdi
jmp 0x6875c
movq 0x10(%r13), %rax
cmpl $0x2, (%rax)
jne 0x68770
leaq 0xe7c2(%rip), %rsi      # 0x76e34
movq %rcx, %rdi
movq %rcx, 0x18(%rsp)
callq 0x12160
testl %eax, %eax
je 0x68878
leaq 0xaf0a(%rip), %rsi      # 0x73598
movq 0x18(%rsp), %rdi
callq 0x12160
testl %eax, %eax
je 0x6890e
movq 0x8(%r13), %rax
movq 0x30(%rax), %r8
movl 0x38(%rax), %r9d
leaq 0xe65d(%rip), %rax      # 0x76d10
leaq 0xe775(%rip), %rdx      # 0x76e2f
movq %r14, %rdi
movl $0x1d, %esi
movq 0x18(%rsp), %rcx
pushq $0x557                  # imm = 0x557
jmp 0x68797
movq %rsi, %rdi
movq %rsi, %rbx
callq 0x69abf
movq 0x8(%r13), %rcx
movq 0x30(%rcx), %r8
movl 0x38(%rcx), %r9d
leaq 0xe621(%rip), %r10      # 0x76d10
leaq 0xe70a(%rip), %rdx      # 0x76e00
movq %r14, %rdi
movl $0x1d, %esi
movq %rax, %rcx
pushq $0x55d                  # imm = 0x55D
pushq %r10
callq 0x1442a
movq %rbx, %rdi
addq $0x10, %rsp
jmp 0x687a6
movq %rax, %rdi
movq %rax, %rbx
callq 0x69abf
movq 0x8(%r13), %rcx
movq 0x30(%rcx), %r8
movl 0x38(%rcx), %r9d
leaq 0xe5d9(%rip), %r10      # 0x76d10
leaq 0xe6c2(%rip), %rdx      # 0x76e00
movq %r14, %rdi
movl $0x1d, %esi
movq %rax, %rcx
pushq $0x4e4                  # imm = 0x4E4
pushq %r10
callq 0x1442a
movq %rbx, %rdi
addq $0x10, %rsp
callq 0x69167
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%r13), %rax
movq 0x30(%rax), %r8
movl 0x38(%rax), %r9d
leaq 0xe58d(%rip), %rax      # 0x76d10
leaq 0xe6a5(%rip), %rdx      # 0x76e2f
movq %r14, %rdi
movl $0x1d, %esi
pushq $0x542                  # imm = 0x542
pushq %rax
callq 0x1442a
addq $0x10, %rsp
movq 0x10(%rsp), %rdi
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x69167
movq 0x8(%r13), %rdi
movq %r14, %rdx
callq 0x12eda
cmpl $0x0, (%r14)
movq 0x10(%rsp), %rdi
jne 0x6875c
movq 0x10(%r13), %rdi
callq 0x12ad0
movq 0x10(%r13), %r12
cmpl $0x2, (%r12)
jne 0x687fb
leaq 0xacce(%rip), %rsi      # 0x734b9
movq %rax, %rdi
callq 0x12160
testl %eax, %eax
je 0x68985
xorl %r12d, %r12d
movq (%r13), %rdi
movl %r15d, %esi
movq %r14, %rdx
callq 0x4f73a
cmpl $0x0, (%r14)
movq 0x10(%rsp), %rdi
jne 0x6875c
movq %rax, %r15
movl %r12d, %r13d
movq %rdi, %r12
leaq 0x8(%rax), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x68e52
movq %r12, %rdi
cmpl $0x0, (%r14)
jne 0x6875c
movl %r13d, %ecx
movl %ebp, 0xc(%r15)
movq 0x28(%rsp), %rax
movq %rax, 0x10(%r15)
movq 0x30(%rsp), %rax
movq %rax, 0x18(%r15)
cmpl $0x6, 0x18(%rsp)
setne 0x20(%r15)
je 0x689ab
movq 0x20(%rsp), %rax
movq %rax, 0x28(%r15)
jmp 0x689b3
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x48(%rsp)
movl $0x0, 0x40(%rsp)
movq 0x8(%r13), %rdi
movq 0x10(%r13), %rsi
movq %r14, %rdx
callq 0x12eda
cmpl $0x0, (%r14)
movq 0x10(%rsp), %rdx
jne 0x68761
movzbl 0x1(%rbx), %r9d
movzbl 0xe(%rsp), %eax
subq $0x40, %rsp
movq 0xa0(%rsp), %rcx
movq %rcx, 0x20(%rsp)
movups 0x80(%rsp), %xmm0
movups 0x90(%rsp), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %r14, 0x30(%rsp)
movl %eax, 0x28(%rsp)
movq %r13, %rdi
movq %rdx, %rbx
movl %r15d, %esi
movl %ebp, %edx
movq %r12, %rcx
movq 0x70(%rsp), %r8
callq 0x689c9
movq %rbx, %rdi
addq $0x40, %rsp
jmp 0x687a6
leaq 0x40(%rsp), %rdx
movq %r13, %rdi
movq 0x10(%rsp), %rsi
movq %r14, %rcx
callq 0x68ce9
movq 0x10(%rsp), %rdi
cmpl $0x0, (%r14)
jne 0x687a6
movq 0x10(%r13), %rax
cmpl $0x2, (%rax)
jne 0x68954
leaq 0xe4f2(%rip), %rsi      # 0x76e34
movq 0x18(%rsp), %rdi
callq 0x12160
testl %eax, %eax
je 0x6888e
movq 0x8(%r13), %rax
movq 0x30(%rax), %r8
movl 0x38(%rax), %r9d
leaq 0xe3a9(%rip), %rax      # 0x76d10
leaq 0xe4c6(%rip), %rdx      # 0x76e34
movq %r14, %rdi
movl $0x1d, %esi
movq 0x18(%rsp), %rcx
pushq $0x551                  # imm = 0x551
jmp 0x68797
movq 0x8(%r13), %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x12eda
cmpl $0x0, (%r14)
movq 0x10(%rsp), %rdi
jne 0x6875c
movb $0x1, %r12b
jmp 0x687fe
movb 0x40(%rsp), %al
movb %al, 0x28(%r15)
movb $0x1, 0x30(%r15)
movb %cl, 0x31(%r15)
movb 0xf(%rsp), %al
movb %al, 0x32(%r15)
jmp 0x68654