// File: /workspace/github_c_makefile_star2_O3/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 $0x58, %rsp
movq %r9, %rbx
movq %r8, 0x28(%rsp)
movq %rcx, %r12
movl %edx, %ebp
movl %esi, %r15d
movq %rdi, %r13
movq 0x90(%rsp), %r14
movb $0x0, 0x6(%rsp)
movq 0x8(%rdi), %rdi
movq 0x10(%r13), %rsi
movq %r14, %rdx
callq 0x12edc
cmpl $0x0, (%r14)
jne 0x683da
leaq 0x6(%rsp), %rsi
movq %r13, %rdi
movq %r14, %rdx
callq 0x6869e
cmpl $0x0, (%r14)
jne 0x683da
movq %rax, %rsi
leal -0x83(%r15), %eax
cmpl $0x1, %eax
ja 0x6815b
xorl %eax, %eax
movb %al, 0x30(%rsp)
movb %al, 0x7(%rsp)
movl (%rsi), %eax
cmpl $0x6, %eax
je 0x6820a
cmpl $0x1, %eax
jne 0x68392
movl %eax, 0x18(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x8(%rsi), %rax
movq %rax, 0x20(%rsp)
jmp 0x68240
movq 0x10(%r13), %rdi
movq %rsi, 0x8(%rsp)
callq 0x12ad0
movq 0x8(%rsp), %r8
movq %rax, %rcx
movl (%r8), %eax
cmpl $0x1, %eax
je 0x682a0
cmpl $0x6, %eax
jne 0x68356
movq %rcx, 0x18(%rsp)
leaq 0x30(%rsp), %rdx
leaq 0x6(%rsp), %rcx
movq %r13, %rdi
movq %r8, %rsi
movq %r14, %r8
callq 0x68870
movq 0x8(%rsp), %rdi
cmpl $0x0, (%r14)
jne 0x68456
movq 0x10(%r13), %rsi
cmpl $0x2, (%rsi)
movq 0x18(%rsp), %rcx
jne 0x681cf
cmpb $0x5d, (%rcx)
jne 0x681cf
cmpb $0x0, 0x1(%rcx)
je 0x682dd
movq 0x8(%r13), %rax
movq 0x30(%rax), %r8
movl 0x38(%rax), %r9d
leaq 0xeb8e(%rip), %rax      # 0x76d70
leaq 0xecad(%rip), %rdx      # 0x76e96
movq %r14, %rdi
movl $0x1d, %esi
pushq $0x53b                  # imm = 0x53B
pushq %rax
callq 0x143da
addq $0x10, %rsp
movq 0x8(%rsp), %rdi
jmp 0x68456
movl %eax, 0x18(%rsp)
leaq 0x30(%rsp), %rdx
leaq 0x7(%rsp), %rcx
movq %r13, %rdi
movq %rsi, 0x8(%rsp)
movq %r14, %r8
callq 0x68a7e
movq 0x8(%rsp), %rdi
cmpl $0x0, (%r14)
jne 0x683d5
movq $-0x1, 0x20(%rsp)
movq 0x10(%r13), %rdi
callq 0x12ad0
movq 0x10(%r13), %rsi
cmpl $0x2, (%rsi)
jne 0x68261
cmpb $0x5d, (%rax)
jne 0x68261
cmpb $0x0, 0x1(%rax)
je 0x68469
movq 0x8(%r13), %rcx
movq 0x30(%rcx), %r8
movl 0x38(%rcx), %r9d
leaq 0xeafc(%rip), %r10      # 0x76d70
leaq 0xec1b(%rip), %rdx      # 0x76e96
movq %r14, %rdi
movl $0x1d, %esi
movq %rax, %rcx
pushq $0x4eb                  # imm = 0x4EB
pushq %r10
callq 0x143da
addq $0x10, %rsp
movq 0x8(%rsp), %rdi
jmp 0x683d5
movq 0x10(%r13), %rsi
cmpl $0x2, (%rsi)
jne 0x683e9
movzbl (%rcx), %eax
cmpl $0x2c, %eax
je 0x68415
cmpl $0x5d, %eax
jne 0x6841f
cmpb $0x0, 0x1(%rcx)
jne 0x6841f
movq 0x8(%r8), %rax
movq %rax, 0x38(%rsp)
movl $0x0, 0x30(%rsp)
movq 0x8(%r13), %rdi
movq %r14, %rdx
callq 0x12edc
cmpl $0x0, (%r14)
movq 0x8(%rsp), %r8
jne 0x683da
movzbl 0x1(%rbx), %r9d
movzbl 0x6(%rsp), %eax
subq $0x40, %rsp
movq 0x90(%rsp), %rcx
movq %rcx, 0x20(%rsp)
movups 0x70(%rsp), %xmm0
movups 0x80(%rsp), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %r14, 0x30(%rsp)
movl %eax, 0x28(%rsp)
movq %r13, %rdi
movl %r15d, %esi
movl %ebp, %edx
movq %r12, %rcx
movq %r8, %rbx
movq 0x68(%rsp), %r8
callq 0x685d5
movq %rbx, %rdi
addq $0x40, %rsp
jmp 0x68456
movq %r8, %rdi
movq %r8, %rbx
callq 0x6966d
movq 0x8(%r13), %rcx
movq 0x30(%rcx), %r8
movl 0x38(%rcx), %r9d
leaq 0xe9fc(%rip), %r10      # 0x76d70
leaq 0xeae7(%rip), %rdx      # 0x76e62
movq %r14, %rdi
movl $0x1d, %esi
movq %rax, %rcx
pushq $0x55d                  # imm = 0x55D
pushq %r10
jmp 0x6844a
movq %rsi, %rdi
movq %rsi, %rbx
callq 0x6966d
movq 0x8(%r13), %rcx
movq 0x30(%rcx), %r8
movl 0x38(%rcx), %r9d
leaq 0xe9c0(%rip), %r10      # 0x76d70
leaq 0xeaab(%rip), %rdx      # 0x76e62
movq %r14, %rdi
movl $0x1d, %esi
movq %rax, %rcx
pushq $0x4e4                  # imm = 0x4E4
pushq %r10
callq 0x143da
movq %rbx, %rdi
addq $0x10, %rsp
callq 0x68d41
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%r13), %rax
movq %r8, %rbx
movq 0x30(%rax), %r8
movl 0x38(%rax), %r9d
leaq 0xe971(%rip), %rax      # 0x76d70
leaq 0xea8b(%rip), %rdx      # 0x76e91
movq %r14, %rdi
movl $0x1d, %esi
pushq $0x542                  # imm = 0x542
jmp 0x68449
cmpb $0x0, 0x1(%rcx)
je 0x6851c
movq 0x8(%r13), %rax
movq %r8, %rbx
movq 0x30(%rax), %r8
movl 0x38(%rax), %r9d
leaq 0xe93b(%rip), %rax      # 0x76d70
leaq 0xea55(%rip), %rdx      # 0x76e91
movq %r14, %rdi
movl $0x1d, %esi
pushq $0x557                  # imm = 0x557
pushq %rax
callq 0x143da
movq %rbx, %rdi
addq $0x10, %rsp
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x68d41
movq 0x8(%r13), %rdi
movq %r14, %rdx
callq 0x12edc
cmpl $0x0, (%r14)
movq 0x8(%rsp), %rdi
jne 0x683d5
movq 0x10(%r13), %rdi
callq 0x12ad0
movq 0x10(%r13), %rsi
cmpl $0x2, (%rsi)
jne 0x684a5
cmpb $0x21, (%rax)
jne 0x684a5
cmpb $0x0, 0x1(%rax)
je 0x6858d
movl $0x0, 0x14(%rsp)
movq (%r13), %rdi
movl %r15d, %esi
movq %r14, %rdx
callq 0x4f6e2
cmpl $0x0, (%r14)
movq 0x8(%rsp), %rdi
jne 0x683d5
movq %rax, %r15
movq %rdi, %r13
leaq 0x8(%rax), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x68a2a
movq %r13, %rdi
cmpl $0x0, (%r14)
jne 0x683d5
movl %ebp, 0xc(%r15)
movq %r12, 0x10(%r15)
movq 0x28(%rsp), %rax
movq %rax, 0x18(%r15)
cmpl $0x6, 0x18(%rsp)
setne 0x20(%r15)
je 0x685b3
movq 0x20(%rsp), %rax
movq %rax, 0x28(%r15)
jmp 0x685bb
movq %rcx, 0x18(%rsp)
movq 0x8(%r8), %rsi
leaq 0x30(%rsp), %rdx
movq %r13, %rdi
movq %r14, %rcx
callq 0x688c5
movq 0x8(%rsp), %rdi
cmpl $0x0, (%r14)
jne 0x68456
movq 0x10(%r13), %rsi
cmpl $0x2, (%rsi)
movq 0x18(%rsp), %rcx
jne 0x68561
cmpb $0x5d, (%rcx)
jne 0x68561
cmpb $0x0, 0x1(%rcx)
je 0x682dd
movq 0x8(%r13), %rax
movq 0x30(%rax), %r8
movl 0x38(%rax), %r9d
leaq 0xe7fc(%rip), %rax      # 0x76d70
leaq 0xe91b(%rip), %rdx      # 0x76e96
movq %r14, %rdi
movl $0x1d, %esi
pushq $0x551                  # imm = 0x551
jmp 0x681f6
movq 0x8(%r13), %rdi
movq %r14, %rdx
callq 0x12edc
cmpl $0x0, (%r14)
movq 0x8(%rsp), %rdi
jne 0x683d5
movb $0x1, %al
movl %eax, 0x14(%rsp)
jmp 0x684ad
movb 0x30(%rsp), %al
movb %al, 0x28(%r15)
movb $0x1, 0x30(%r15)
movl 0x14(%rsp), %eax
movb %al, 0x31(%r15)
movb 0x7(%rsp), %al
movb %al, 0x32(%r15)
jmp 0x68296