// File: /workspace/github_c_makefile_star2_O0/markdryan[P]subtilis/arch/arm32/assembler.c
// Function: prv_parse_stran_post
static void prv_parse_stran_post(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)
{
	const char *tbuf;
	subtilis_arm_exp_val_t *val;
	subtilis_arm_op2_t offset;
	subtilis_arm_instr_t *instr;
	subtilis_arm_stran_instr_t *stran;
	bool subtract = false;

	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 (itype == SUBTILIS_ARM_STRAN_MISC_LDR ||
		    itype == SUBTILIS_ARM_STRAN_MISC_STR) {
			prv_stran_misc_zero(c, itype, ccode, dest, modifiers,
					    base, err);
		} else {
			offset.type = SUBTILIS_ARM_OP2_I32;
			offset.op.integer = 0;
			prv_parse_stran_pre_off(c, itype, ccode, dest, base,
						modifiers->byte, offset, false,
						err);
		}
		return;
	}

	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_post(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;
	} else if (val->type == SUBTILIS_ARM_EXP_TYPE_REG) {
		if ((c->t->type == SUBTILIS_TOKEN_OPERATOR) &&
		    !strcmp(tbuf, ",")) {
			prv_parse_shift_offset(c, val, &offset, err);
			if (err->type != SUBTILIS_ERROR_OK)
				goto cleanup;
		} else {
			offset.op.reg = val->val.reg;
			offset.type = SUBTILIS_ARM_OP2_REG;
		}
	} else {
		subtilis_error_set_expected(err, "integer or register",
					    subtilis_arm_exp_type_name(val),
					    c->l->stream->name, c->l->line);
		goto cleanup;
	}

	instr = subtilis_arm_section_add_instr(c->arm_s, itype, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;
	stran = &instr->operands.stran;
	stran->ccode = ccode;
	stran->dest = dest;
	stran->base = base;
	stran->offset = offset;
	stran->pre_indexed = false;
	stran->write_back = true;
	stran->byte = modifiers->byte;
	stran->subtract = subtract;

cleanup:

	subtilis_arm_exp_val_free(val);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movq %r8, -0x20(%rbp)
movq %r9, -0x28(%rbp)
movb $0x0, -0x71(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rsi
movq 0x10(%rbp), %rdx
callq 0x133f0
movq 0x10(%rbp), %rax
cmpl $0x0, (%rax)
je 0x98bd0
jmp 0x98ed5
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 0x98c07
movq -0x30(%rbp), %rdi
leaq 0x119b0(%rip), %rsi     # 0xaa5a9
callq 0x12140
cmpl $0x0, %eax
je 0x98ca6
cmpl $0x83, -0xc(%rbp)
je 0x98c19
cmpl $0x84, -0xc(%rbp)
jne 0x98c3e
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
movq -0x18(%rbp), %rcx
movq -0x28(%rbp), %r8
movq -0x20(%rbp), %r9
movq 0x10(%rbp), %rax
movq %rax, (%rsp)
callq 0x992c0
jmp 0x98ca1
movl $0x1, -0x60(%rbp)
movl $0x0, -0x58(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %r8
movq -0x28(%rbp), %rax
movb 0x1(%rax), %al
movq 0x10(%rbp), %r10
xorl %r9d, %r9d
movq -0x40(%rbp), %r11
movq %rsp, %r9
movq %r11, 0x20(%r9)
movups -0x60(%rbp), %xmm0
movups -0x50(%rbp), %xmm1
movups %xmm1, 0x10(%r9)
movups %xmm0, (%r9)
movq %r10, 0x30(%r9)
movl $0x0, 0x28(%r9)
movzbl %al, %r9d
andl $0x1, %r9d
callq 0x993f0
jmp 0x98ed5
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rsi
movq 0x10(%rbp), %rdx
callq 0x133f0
movq 0x10(%rbp), %rax
cmpl $0x0, (%rax)
je 0x98ccd
jmp 0x98ed5
movq -0x8(%rbp), %rdi
movq 0x10(%rbp), %rdx
leaq -0x71(%rbp), %rsi
callq 0x99550
movq %rax, -0x38(%rbp)
movq 0x10(%rbp), %rax
cmpl $0x0, (%rax)
je 0x98cf0
jmp 0x98ed5
cmpl $0x83, -0xc(%rbp)
je 0x98d02
cmpl $0x84, -0xc(%rbp)
jne 0x98d33
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %r8
movq -0x28(%rbp), %r9
movq -0x38(%rbp), %r10
movq 0x10(%rbp), %rax
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x99620
jmp 0x98ed5
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x12d70
movq %rax, -0x30(%rbp)
movq -0x38(%rbp), %rax
cmpl $0x6, (%rax)
jne 0x98d79
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq 0x10(%rbp), %r8
leaq -0x60(%rbp), %rdx
leaq -0x71(%rbp), %rcx
callq 0x997c0
movq 0x10(%rbp), %rax
cmpl $0x0, (%rax)
je 0x98d74
jmp 0x98ecc
jmp 0x98e39
movq -0x38(%rbp), %rax
cmpl $0x1, (%rax)
jne 0x98dde
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
cmpl $0x2, (%rax)
jne 0x98dc9
movq -0x30(%rbp), %rdi
leaq 0x1180f(%rip), %rsi     # 0xaa5a9
callq 0x12140
cmpl $0x0, %eax
jne 0x98dc9
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq 0x10(%rbp), %rcx
leaq -0x60(%rbp), %rdx
callq 0x99870
movq 0x10(%rbp), %rax
cmpl $0x0, (%rax)
je 0x98dc7
jmp 0x98ecc
jmp 0x98ddc
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x58(%rbp)
movl $0x0, -0x60(%rbp)
jmp 0x98e37
movq 0x10(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x38(%rbp), %rdi
callq 0x9b550
movq -0x80(%rbp), %rdi
movq %rax, %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 0x153fd(%rip), %rdx     # 0xae217
leaq 0x152ff(%rip), %rax     # 0xae120
movq %rax, (%rsp)
movl $0x5ee, 0x8(%rsp)       # imm = 0x5EE
callq 0x156d0
jmp 0x98ecc
jmp 0x98e39
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movl -0xc(%rbp), %esi
movq 0x10(%rbp), %rdx
callq 0x70b50
movq %rax, -0x68(%rbp)
movq 0x10(%rbp), %rax
cmpl $0x0, (%rax)
je 0x98e5b
jmp 0x98ecc
movq -0x68(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x70(%rbp)
movl -0x10(%rbp), %ecx
movq -0x70(%rbp), %rax
movl %ecx, (%rax)
movq -0x18(%rbp), %rcx
movq -0x70(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rcx
movq -0x70(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x70(%rbp), %rdi
addq $0x18, %rdi
leaq -0x60(%rbp), %rsi
movl $0x28, %edx
callq 0x12190
movq -0x70(%rbp), %rax
movb $0x0, 0x40(%rax)
movq -0x70(%rbp), %rax
movb $0x1, 0x41(%rax)
movq -0x28(%rbp), %rax
movb 0x1(%rax), %cl
movq -0x70(%rbp), %rax
andb $0x1, %cl
movb %cl, 0x43(%rax)
movb -0x71(%rbp), %cl
movq -0x70(%rbp), %rax
andb $0x1, %cl
movb %cl, 0x42(%rax)
movq -0x38(%rbp), %rdi
callq 0x9a4c0
addq $0xc0, %rsp
popq %rbp
retq
nop