// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
pushq %rbx
subq $0xa8, %rsp
movq 0x10(%rbp), %rax
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movb $0x0, -0x69(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
movq 0x10(%rbp), %rdx
callq 0x133f0
movq 0x10(%rbp), %rax
cmpl $0x0, (%rax)
je 0x98f31
jmp 0x992b4
movq -0x10(%rbp), %rdi
movq 0x10(%rbp), %rdx
leaq -0x69(%rbp), %rsi
callq 0x99550
movq %rax, -0x38(%rbp)
movq 0x10(%rbp), %rax
cmpl $0x0, (%rax)
je 0x98f54
jmp 0x992b4
cmpl $0x83, -0x14(%rbp)
je 0x98f66
cmpl $0x84, -0x14(%rbp)
jne 0x98f97
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movl -0x18(%rbp), %edx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
movq -0x30(%rbp), %r9
movq -0x38(%rbp), %r10
movq 0x10(%rbp), %rax
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x99c40
jmp 0x992b4
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x12d70
movq %rax, -0x68(%rbp)
movq -0x38(%rbp), %rax
cmpl $0x6, (%rax)
jne 0x9904c
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq 0x10(%rbp), %r8
leaq -0x60(%rbp), %rdx
leaq -0x69(%rbp), %rcx
callq 0x997c0
movq 0x10(%rbp), %rax
cmpl $0x0, (%rax)
je 0x98fdc
jmp 0x992ab
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
cmpl $0x2, (%rax)
jne 0x98ffe
movq -0x68(%rbp), %rdi
leaq 0x15257(%rip), %rsi     # 0xae24b
callq 0x12140
cmpl $0x0, %eax
je 0x99047
movq 0x10(%rbp), %rdi
movq -0x68(%rbp), %rcx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x30(%rax), %r8
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movl 0x38(%rax), %r9d
movl $0x1d, %esi
leaq 0x15221(%rip), %rdx     # 0xae24b
leaq 0x150ef(%rip), %rax     # 0xae120
movq %rax, (%rsp)
movl $0x53b, 0x8(%rsp)       # imm = 0x53B
callq 0x156d0
jmp 0x992ab
jmp 0x9922d
movq -0x38(%rbp), %rax
cmpl $0x1, (%rax)
jne 0x991d2
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
cmpl $0x2, (%rax)
je 0x990af
movq 0x10(%rbp), %rdi
movq -0x68(%rbp), %rcx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x30(%rax), %r8
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movl 0x38(%rax), %r9d
movl $0x1d, %esi
leaq 0x151b4(%rip), %rdx     # 0xae246
leaq 0x15087(%rip), %rax     # 0xae120
movq %rax, (%rsp)
movl $0x542, 0x8(%rsp)       # imm = 0x542
callq 0x156d0
jmp 0x992ab
movq -0x68(%rbp), %rdi
leaq 0x15191(%rip), %rsi     # 0xae24b
callq 0x12140
cmpl $0x0, %eax
jne 0x990dc
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x58(%rbp)
movl $0x0, -0x60(%rbp)
jmp 0x991d0
movq -0x68(%rbp), %rdi
leaq 0x114c2(%rip), %rsi     # 0xaa5a9
callq 0x12140
cmpl $0x0, %eax
jne 0x99185
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq 0x10(%rbp), %rcx
leaq -0x60(%rbp), %rdx
callq 0x99870
movq 0x10(%rbp), %rax
cmpl $0x0, (%rax)
je 0x99118
jmp 0x992ab
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
cmpl $0x2, (%rax)
jne 0x9913a
movq -0x68(%rbp), %rdi
leaq 0x1511b(%rip), %rsi     # 0xae24b
callq 0x12140
cmpl $0x0, %eax
je 0x99183
movq 0x10(%rbp), %rdi
movq -0x68(%rbp), %rcx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x30(%rax), %r8
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movl 0x38(%rax), %r9d
movl $0x1d, %esi
leaq 0x150e5(%rip), %rdx     # 0xae24b
leaq 0x14fb3(%rip), %rax     # 0xae120
movq %rax, (%rsp)
movl $0x551, 0x8(%rsp)       # imm = 0x551
callq 0x156d0
jmp 0x992ab
jmp 0x991ce
movq 0x10(%rbp), %rdi
movq -0x68(%rbp), %rcx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x30(%rax), %r8
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movl 0x38(%rax), %r9d
movl $0x1d, %esi
leaq 0x15095(%rip), %rdx     # 0xae246
leaq 0x14f68(%rip), %rax     # 0xae120
movq %rax, (%rsp)
movl $0x557, 0x8(%rsp)       # imm = 0x557
callq 0x156d0
jmp 0x992ab
jmp 0x991d0
jmp 0x9922b
movq 0x10(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x38(%rbp), %rdi
callq 0x9b550
movq -0x78(%rbp), %rdi
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x30(%rax), %r8
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movl 0x38(%rax), %r9d
movl $0x1d, %esi
leaq 0x15009(%rip), %rdx     # 0xae217
leaq 0x14f0b(%rip), %rax     # 0xae120
movq %rax, (%rsp)
movl $0x55d, 0x8(%rsp)       # imm = 0x55D
callq 0x156d0
jmp 0x992ab
jmp 0x9922d
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
movq 0x10(%rbp), %rdx
callq 0x133f0
movq 0x10(%rbp), %rax
cmpl $0x0, (%rax)
je 0x99251
jmp 0x992b4
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movl -0x18(%rbp), %edx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
movq -0x30(%rbp), %rax
movb 0x1(%rax), %al
movb -0x69(%rbp), %r10b
movq 0x10(%rbp), %r11
movq -0x40(%rbp), %rbx
movq %rsp, %r9
movq %rbx, 0x20(%r9)
movups -0x60(%rbp), %xmm0
movups -0x50(%rbp), %xmm1
movups %xmm1, 0x10(%r9)
movups %xmm0, (%r9)
movq %r11, 0x30(%r9)
movzbl %r10b, %r10d
andl $0x1, %r10d
movl %r10d, 0x28(%r9)
movzbl %al, %r9d
andl $0x1, %r9d
callq 0x993f0
movq -0x38(%rbp), %rdi
callq 0x9a4c0
addq $0xa8, %rsp
popq %rbx
popq %rbp
retq
nop