// File: /workspace/github_c_makefile_star2_O0/markdryan[P]subtilis/arch/arm32/arm_reg_alloc.c
// Function: prv_init_sub_section
static void prv_init_sub_section(subtilis_arm_reg_ud_t *ud,
				 subtilis_arm_ss_t *ss,
				 subtilis_arm_prespilt_offsets_t *offsets,
				 subtilis_error_t *err)
{
	int i;
	int32_t offset;
	subtilis_arm_op_t *op;

	op = &ud->arm_s->op_pool->ops[ss->start];
	if (op->next == ud->arm_s->last_op)
		return;
	op = &ud->arm_s->op_pool->ops[op->next];

	for (i = 0; i <= ss->int_inputs.max_value; i++) {
		if (!subtilis_bitset_isset(&ss->int_inputs, i))
			continue;
		offset = prv_arm_presplit_int_offset(offsets, i, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return;
		offset += ud->arm_s->locals;

		if (offset > 4095 || offset < -4095)
			subtilis_arm_insert_stran_spill_imm(
			    ud->arm_s, op, SUBTILIS_ARM_INSTR_LDR,
			    SUBTILIS_ARM_CCODE_AL, i, 11, i, offset, err);
		else
			subtilis_arm_insert_stran_imm(
			    ud->arm_s, op, SUBTILIS_ARM_INSTR_LDR,
			    SUBTILIS_ARM_CCODE_AL, i, 11, offset, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return;
	}

	for (i = 0; i <= ss->real_inputs.max_value; i++) {
		if (!subtilis_bitset_isset(&ss->real_inputs, i))
			continue;
		offset = prv_arm_presplit_real_offset(offsets, i, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return;
		offset += ud->arm_s->locals;

		if (offset > ud->arm_s->fp_if->max_offset ||
		    offset < -(ud->arm_s->fp_if->max_offset + 1))
			ud->arm_s->fp_if->spill_imm_fn(
			    ud->arm_s, op, ud->arm_s->fp_if->load_type,
			    SUBTILIS_ARM_CCODE_AL, i, 11, i, offset, err);
		else
			ud->arm_s->fp_if->stran_imm_fn(
			    ud->arm_s, op, ud->arm_s->fp_if->load_type,
			    SUBTILIS_ARM_CCODE_AL, i, 11, offset, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x48, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x38(%rax), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
imulq $0x68, 0x8(%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rcx
cmpq 0x28(%rcx), %rax
jne 0x7acb3
jmp 0x7af4e
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x38(%rax), %rax
movq (%rax), %rax
movq -0x38(%rbp), %rcx
imulq $0x68, 0x58(%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0x20(%rcx), %eax
jg 0x7ade2
movq -0x18(%rbp), %rdi
addq $0x18, %rdi
movslq -0x2c(%rbp), %rsi
callq 0x88990
testb $0x1, %al
jne 0x7ad03
jmp 0x7add4
movq -0x20(%rbp), %rdi
movslq -0x2c(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x7b5e0
movl %eax, -0x30(%rbp)
movq -0x28(%rbp), %rax
cmpl $0x0, (%rax)
je 0x7ad25
jmp 0x7af4e
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x30(%rax), %rcx
movslq -0x30(%rbp), %rax
addq %rcx, %rax
movl %eax, -0x30(%rbp)
cmpl $0xfff, -0x30(%rbp)     # imm = 0xFFF
jg 0x7ad4d
cmpl $0xfffff001, -0x30(%rbp) # imm = 0xFFFFF001
jge 0x7ad8e
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x38(%rbp), %rsi
movslq -0x2c(%rbp), %r8
movslq -0x2c(%rbp), %r11
movl -0x30(%rbp), %r10d
movq -0x28(%rbp), %rax
movl $0x12, %edx
movl $0xe, %ecx
movl $0xb, %r9d
movq %r11, (%rsp)
movl %r10d, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0x72420
jmp 0x7adc4
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x38(%rbp), %rsi
movslq -0x2c(%rbp), %r8
movl -0x30(%rbp), %r10d
movq -0x28(%rbp), %rax
movl $0x12, %edx
movl $0xe, %ecx
movl $0xb, %r9d
movl %r10d, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x72510
movq -0x28(%rbp), %rax
cmpl $0x0, (%rax)
je 0x7add2
jmp 0x7af4e
jmp 0x7add4
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x7acd9
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0x38(%rcx), %eax
jg 0x7af4e
movq -0x18(%rbp), %rdi
addq $0x30, %rdi
movslq -0x2c(%rbp), %rsi
callq 0x88990
testb $0x1, %al
jne 0x7ae13
jmp 0x7af40
movq -0x20(%rbp), %rdi
movslq -0x2c(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x7b670
movl %eax, -0x30(%rbp)
movq -0x28(%rbp), %rax
cmpl $0x0, (%rax)
je 0x7ae35
jmp 0x7af4e
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x30(%rax), %rcx
movslq -0x30(%rbp), %rax
addq %rcx, %rax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rcx
movq 0xc0(%rcx), %rcx
cmpl 0x8(%rcx), %eax
jg 0x7ae82
movl -0x30(%rbp), %eax
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rcx
movq 0xc0(%rcx), %rcx
movl 0x8(%rcx), %edx
addl $0x1, %edx
xorl %ecx, %ecx
subl %edx, %ecx
cmpl %ecx, %eax
jge 0x7aee0
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq 0xc0(%rax), %rax
movq 0x58(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rdi
movq -0x38(%rbp), %rsi
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rcx
movq 0xc0(%rcx), %rcx
movl 0x1c(%rcx), %edx
movslq -0x2c(%rbp), %r8
movslq -0x2c(%rbp), %rbx
movl -0x30(%rbp), %r11d
movq -0x28(%rbp), %r10
movl $0xe, %ecx
movl $0xb, %r9d
movq %rbx, (%rsp)
movl %r11d, 0x8(%rsp)
movq %r10, 0x10(%rsp)
callq *%rax
jmp 0x7af33
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq 0xc0(%rax), %rax
movq 0x60(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rdi
movq -0x38(%rbp), %rsi
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rcx
movq 0xc0(%rcx), %rcx
movl 0x1c(%rcx), %edx
movslq -0x2c(%rbp), %r8
movl -0x30(%rbp), %r11d
movq -0x28(%rbp), %r10
movl $0xe, %ecx
movl $0xb, %r9d
movl %r11d, (%rsp)
movq %r10, 0x8(%rsp)
callq *%rax
movq -0x28(%rbp), %rax
cmpl $0x0, (%rax)
je 0x7af3e
jmp 0x7af4e
jmp 0x7af40
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x7ade9
addq $0x48, %rsp
popq %rbx
popq %rbp
retq
nopw %cs:(%rax,%rax)