// File: /workspace/github_c_makefile_star2_O0/markdryan[P]subtilis/arch/arm32/arm2_div.c
// Function: prv_add_rsa_group
static void prv_add_rsa_group(subtilis_ir_section_t *s,
			      subtilis_arm_section_t *arm_s, size_t i,
			      subtilis_error_t *err)
{
	subtilis_arm_instr_t *instr;
	subtilis_arm_data_instr_t *rsb;
	subtilis_arm_data_instr_t *sub;
	subtilis_arm_data_instr_t *adc;
	subtilis_arm_reg_t dest;
	subtilis_arm_reg_t op1;
	subtilis_arm_op2_t op2_reg;
	subtilis_arm_op2_t op2_reg_shift;

	op2_reg.type = SUBTILIS_ARM_OP2_REG;
	op2_reg_shift.type = SUBTILIS_ARM_OP2_SHIFTED;
	op2_reg_shift.op.shift.shift_reg = false;

	instr =
	    subtilis_arm_section_add_instr(arm_s, SUBTILIS_ARM_INSTR_RSB, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;
	dest = t;
	op1 = d;
	op2_reg_shift.op.shift.type = SUBTILIS_ARM_SHIFT_LSR;
	op2_reg_shift.op.shift.reg = r;
	op2_reg_shift.op.shift.shift.integer = i;
	rsb = &instr->operands.data;
	rsb->status = true;
	rsb->ccode = SUBTILIS_ARM_CCODE_AL;
	rsb->dest = dest;
	rsb->op1 = op1;
	rsb->op2 = op2_reg_shift;

	instr =
	    subtilis_arm_section_add_instr(arm_s, SUBTILIS_ARM_INSTR_SUB, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	dest = r;
	op2_reg_shift.op.shift.reg = d;
	op2_reg_shift.op.shift.type = SUBTILIS_ARM_SHIFT_LSL;
	op2_reg_shift.op.shift.shift.integer = i;

	sub = &instr->operands.data;
	sub->status = false;
	sub->ccode = SUBTILIS_ARM_CCODE_CS;
	sub->dest = dest;
	sub->op1 = dest;
	sub->op2 = op2_reg_shift;

	instr =
	    subtilis_arm_section_add_instr(arm_s, SUBTILIS_ARM_INSTR_ADC, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	dest = q;
	op2_reg.op.reg = dest;
	adc = &instr->operands.data;
	adc->status = false;
	adc->ccode = SUBTILIS_ARM_CCODE_AL;
	adc->dest = dest;
	adc->op1 = dest;
	adc->op2 = op2_reg;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl $0x0, -0x78(%rbp)
movl $0x2, -0xa0(%rbp)
movb $0x0, -0x80(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rdx
movl $0x3, %esi
callq 0x70b50
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpl $0x0, (%rax)
je 0x84154
jmp 0x842ef
movq $0x4, -0x48(%rbp)
movq $0x1, -0x50(%rbp)
movl $0x2, -0x90(%rbp)
movq 0x28ceb(%rip), %rax     # 0xace60
movq %rax, -0x98(%rbp)
movq -0x18(%rbp), %rax
movl %eax, -0x88(%rbp)
movq -0x28(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movb $0x1, 0x4(%rax)
movq -0x30(%rbp), %rax
movl $0xe, (%rax)
movq -0x48(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x50(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x30(%rbp), %rdi
addq $0x18, %rdi
leaq -0xa0(%rbp), %rsi
movl $0x28, %edx
callq 0x12190
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rdx
movl $0x2, %esi
callq 0x70b50
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpl $0x0, (%rax)
je 0x841f9
jmp 0x842ef
movq 0x28c60(%rip), %rax     # 0xace60
movq %rax, -0x48(%rbp)
movq $0x1, -0x98(%rbp)
movl $0x0, -0x90(%rbp)
movq -0x18(%rbp), %rax
movl %eax, -0x88(%rbp)
movq -0x28(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movb $0x0, 0x4(%rax)
movq -0x38(%rbp), %rax
movl $0x2, (%rax)
movq -0x48(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x48(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x38(%rbp), %rdi
addq $0x18, %rdi
leaq -0xa0(%rbp), %rsi
movl $0x28, %edx
callq 0x12190
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rdx
movl $0x5, %esi
callq 0x70b50
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpl $0x0, (%rax)
je 0x84293
jmp 0x842ef
movq $0x5, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x28(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movb $0x0, 0x4(%rax)
movq -0x40(%rbp), %rax
movl $0xe, (%rax)
movq -0x48(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x48(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x40(%rbp), %rdi
addq $0x18, %rdi
leaq -0x78(%rbp), %rsi
movl $0x28, %edx
callq 0x12190
addq $0xa0, %rsp
popq %rbp
retq
nopl (%rax,%rax)