// File: /workspace/github_c_makefile_star2_O0/markdryan[P]subtilis/arch/arm32/arm_reg_alloc.c
// Function: prv_init_two_links
static void prv_init_two_links(subtilis_arm_reg_ud_t *ud, subtilis_arm_ss_t *ss,
			       subtilis_arm_prespilt_offsets_t *offsets,
			       size_t ss_index, subtilis_error_t *err)
{
	subtilis_arm_ss_link_t *link1;
	subtilis_arm_ss_link_t *link2;
	subtilis_arm_op_t *op1;
	subtilis_arm_op_t *op2;
	subtilis_arm_ccode_type_t ccode;
	subtilis_bitset_t common_save;
	subtilis_bitset_t link1_save;
	subtilis_bitset_t link2_save;

	subtilis_bitset_init(&common_save);
	subtilis_bitset_init(&link1_save);
	subtilis_bitset_init(&link2_save);

	link1 = &ss->links[0];
	link2 = &ss->links[1];
	op1 = &ud->arm_s->op_pool->ops[link1->op];
	op2 = &ud->arm_s->op_pool->ops[link2->op];
	ud->ss_terminators[ss_index] = op2;
	if ((op1->type != SUBTILIS_ARM_OP_INSTR) ||
	    (op1->op.instr.type != SUBTILIS_ARM_INSTR_B) ||
	    (op2->type != SUBTILIS_ARM_OP_LABEL)) {
		subtilis_error_set_assertion_failed(err);
		goto cleanup;
	}
	ccode = op1->op.instr.operands.br.ccode;

	prv_compute_save_sets(&link1->int_save, &link2->int_save, &common_save,
			      &link1_save, &link2_save, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	/*
	 * Need to be a bit careful here.  Adding ops can invalidate our
	 * pointers to op1 and op2 so we need to refresh them before using
	 * them.
	 */

	op1 = &ud->arm_s->op_pool->ops[link1->op];
	prv_sub_section_int_links(ud, &common_save, SUBTILIS_ARM_CCODE_AL,
				  offsets, op1, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	op1 = &ud->arm_s->op_pool->ops[link1->op];
	prv_sub_section_int_links(ud, &link1_save, ccode, offsets, op1, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	op2 = &ud->arm_s->op_pool->ops[link2->op];
	prv_sub_section_int_links(ud, &link2_save, SUBTILIS_ARM_CCODE_AL,
				  offsets, op2, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	subtilis_bitset_reset(&common_save);
	subtilis_bitset_reset(&link1_save);
	subtilis_bitset_reset(&link2_save);

	prv_compute_save_sets(&link1->real_save, &link2->real_save,
			      &common_save, &link1_save, &link2_save, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	op1 = &ud->arm_s->op_pool->ops[link1->op];
	prv_sub_section_real_links(ud, &common_save, SUBTILIS_ARM_CCODE_AL,
				   offsets, op1, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	op1 = &ud->arm_s->op_pool->ops[link1->op];
	prv_sub_section_real_links(ud, &link1_save, ccode, offsets, op1, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	op2 = &ud->arm_s->op_pool->ops[link2->op];
	prv_sub_section_real_links(ud, &link2_save, SUBTILIS_ARM_CCODE_AL,
				   offsets, op2, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

cleanup:

	subtilis_bitset_free(&link2_save);
	subtilis_bitset_free(&link1_save);
	subtilis_bitset_free(&common_save);
}

// 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)
movq %r8, -0x28(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x88790
leaq -0x80(%rbp), %rdi
callq 0x88790
leaq -0x98(%rbp), %rdi
callq 0x88790
movq -0x10(%rbp), %rax
addq $0x48, %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
addq $0x48, %rax
addq $0x70, %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x38(%rax), %rax
movq (%rax), %rax
movq -0x30(%rbp), %rcx
imulq $0x68, 0x68(%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x38(%rax), %rax
movq (%rax), %rax
movq -0x38(%rbp), %rcx
imulq $0x68, 0x68(%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rdx
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movq -0x20(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x40(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x7b337
movq -0x40(%rbp), %rax
cmpl $0x16, 0x8(%rax)
jne 0x7b337
movq -0x48(%rbp), %rax
cmpl $0x1, (%rax)
je 0x7b356
movq -0x28(%rbp), %rdi
movl $0xf, %esi
leaq 0x3184c(%rip), %rdx     # 0xacb93
movl $0x690, %ecx            # imm = 0x690
callq 0x158e0
jmp 0x7b5aa
movq -0x40(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, -0x4c(%rbp)
movq -0x30(%rbp), %rdi
addq $0x30, %rdi
movq -0x38(%rbp), %rsi
addq $0x30, %rsi
movq -0x28(%rbp), %r9
leaq -0x68(%rbp), %rdx
leaq -0x80(%rbp), %rcx
leaq -0x98(%rbp), %r8
callq 0x7b720
movq -0x28(%rbp), %rax
cmpl $0x0, (%rax)
je 0x7b396
jmp 0x7b5aa
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x38(%rax), %rax
movq (%rax), %rax
movq -0x30(%rbp), %rcx
imulq $0x68, 0x68(%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rcx
movq -0x40(%rbp), %r8
movq -0x28(%rbp), %r9
leaq -0x68(%rbp), %rsi
movl $0xe, %edx
callq 0x7af90
movq -0x28(%rbp), %rax
cmpl $0x0, (%rax)
je 0x7b3e1
jmp 0x7b5aa
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x38(%rax), %rax
movq (%rax), %rax
movq -0x30(%rbp), %rcx
imulq $0x68, 0x68(%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rdi
movl -0x4c(%rbp), %edx
movq -0x18(%rbp), %rcx
movq -0x40(%rbp), %r8
movq -0x28(%rbp), %r9
leaq -0x80(%rbp), %rsi
callq 0x7af90
movq -0x28(%rbp), %rax
cmpl $0x0, (%rax)
je 0x7b42a
jmp 0x7b5aa
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x38(%rax), %rax
movq (%rax), %rax
movq -0x38(%rbp), %rcx
imulq $0x68, 0x68(%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rcx
movq -0x48(%rbp), %r8
movq -0x28(%rbp), %r9
leaq -0x98(%rbp), %rsi
movl $0xe, %edx
callq 0x7af90
movq -0x28(%rbp), %rax
cmpl $0x0, (%rax)
je 0x7b478
jmp 0x7b5aa
leaq -0x68(%rbp), %rdi
callq 0x887c0
leaq -0x80(%rbp), %rdi
callq 0x887c0
leaq -0x98(%rbp), %rdi
callq 0x887c0
movq -0x30(%rbp), %rdi
addq $0x48, %rdi
movq -0x38(%rbp), %rsi
addq $0x48, %rsi
movq -0x28(%rbp), %r9
leaq -0x68(%rbp), %rdx
leaq -0x80(%rbp), %rcx
leaq -0x98(%rbp), %r8
callq 0x7b720
movq -0x28(%rbp), %rax
cmpl $0x0, (%rax)
je 0x7b4cc
jmp 0x7b5aa
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x38(%rax), %rax
movq (%rax), %rax
movq -0x30(%rbp), %rcx
imulq $0x68, 0x68(%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rcx
movq -0x40(%rbp), %r8
movq -0x28(%rbp), %r9
leaq -0x68(%rbp), %rsi
movl $0xe, %edx
callq 0x7b0d0
movq -0x28(%rbp), %rax
cmpl $0x0, (%rax)
je 0x7b517
jmp 0x7b5aa
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x38(%rax), %rax
movq (%rax), %rax
movq -0x30(%rbp), %rcx
imulq $0x68, 0x68(%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rdi
movl -0x4c(%rbp), %edx
movq -0x18(%rbp), %rcx
movq -0x40(%rbp), %r8
movq -0x28(%rbp), %r9
leaq -0x80(%rbp), %rsi
callq 0x7b0d0
movq -0x28(%rbp), %rax
cmpl $0x0, (%rax)
je 0x7b55d
jmp 0x7b5aa
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x38(%rax), %rax
movq (%rax), %rax
movq -0x38(%rbp), %rcx
imulq $0x68, 0x68(%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rcx
movq -0x48(%rbp), %r8
movq -0x28(%rbp), %r9
leaq -0x98(%rbp), %rsi
movl $0xe, %edx
callq 0x7b0d0
movq -0x28(%rbp), %rax
cmpl $0x0, (%rax)
je 0x7b5a8
jmp 0x7b5aa
jmp 0x7b5aa
leaq -0x98(%rbp), %rdi
callq 0x89020
leaq -0x80(%rbp), %rdi
callq 0x89020
leaq -0x68(%rbp), %rdi
callq 0x89020
addq $0xa0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)