// File: /workspace/github_c_makefile_star2_O0/markdryan[P]subtilis/arch/arm32/arm_sub_section.c
// Function: prv_link_must_save
static void prv_link_must_save(subtilis_arm_subsections_t *sss,
			       subtilis_arm_ss_t *ss, size_t link,
			       subtilis_error_t *err)
{
	subtilis_bitset_t visited;
	subtilis_arm_ss_link_t *start;
	subtilis_arm_ss_t *next;
	size_t label;

	if (link >= ss->num_links) {
		subtilis_error_set_assertion_failed(err);
		return;
	}

	subtilis_bitset_init(&visited);

	start = &ss->links[link];
	if (start->link >= sss->link_count) {
		subtilis_error_set_assertion_failed(err);
		goto cleanup;
	}

	subtilis_bitset_set(&visited, start->link, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;
	label = sss->ss_link_map[start->link];
	if (label == SIZE_MAX) {
		subtilis_error_set_assertion_failed(err);
		goto cleanup;
	}
	next = &sss->sub_sections[label];
	prv_visit_subsection(sss, next, start, &start->int_save,
			     &start->real_save, &visited, err);

	subtilis_bitset_or(&sss->int_save, &start->int_save, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	subtilis_bitset_or(&sss->real_save, &start->real_save, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

cleanup:

	subtilis_bitset_free(&visited);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x128(%rcx), %rax
jb 0x8a4b8
movq -0x20(%rbp), %rdi
movl $0xf, %esi
leaq 0x2341e(%rip), %rdx     # 0xad8c7
movl $0x12c, %ecx            # imm = 0x12C
callq 0x158e0
jmp 0x8a5fd
leaq -0x38(%rbp), %rdi
callq 0x88790
movq -0x10(%rbp), %rax
addq $0x48, %rax
imulq $0x70, -0x18(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq 0x60(%rax), %rax
movq -0x8(%rbp), %rcx
cmpq 0x18(%rcx), %rax
jb 0x8a506
movq -0x20(%rbp), %rdi
movl $0xf, %esi
leaq 0x233d0(%rip), %rdx     # 0xad8c7
movl $0x134, %ecx            # imm = 0x134
callq 0x158e0
jmp 0x8a5f4
movq -0x40(%rbp), %rax
movq 0x60(%rax), %rsi
movq -0x20(%rbp), %rdx
leaq -0x38(%rbp), %rdi
callq 0x88810
movq -0x20(%rbp), %rax
cmpl $0x0, (%rax)
je 0x8a529
jmp 0x8a5f4
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x40(%rbp), %rcx
movq 0x60(%rcx), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x50(%rbp)
cmpq $-0x1, -0x50(%rbp)
jne 0x8a567
movq -0x20(%rbp), %rdi
movl $0xf, %esi
leaq 0x2336f(%rip), %rdx     # 0xad8c7
movl $0x13d, %ecx            # imm = 0x13D
callq 0x158e0
jmp 0x8a5f4
movq -0x8(%rbp), %rax
movq (%rax), %rax
imulq $0x130, -0x50(%rbp), %rcx # imm = 0x130
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq -0x40(%rbp), %rcx
addq $0x30, %rcx
movq -0x40(%rbp), %r8
addq $0x48, %r8
movq -0x20(%rbp), %rax
leaq -0x38(%rbp), %r9
movq %rax, (%rsp)
callq 0x89ee0
movq -0x8(%rbp), %rdi
addq $0x30, %rdi
movq -0x40(%rbp), %rsi
addq $0x30, %rsi
movq -0x20(%rbp), %rdx
callq 0x88cd0
movq -0x20(%rbp), %rax
cmpl $0x0, (%rax)
je 0x8a5ce
jmp 0x8a5f4
movq -0x8(%rbp), %rdi
addq $0x48, %rdi
movq -0x40(%rbp), %rsi
addq $0x48, %rsi
movq -0x20(%rbp), %rdx
callq 0x88cd0
movq -0x20(%rbp), %rax
cmpl $0x0, (%rax)
je 0x8a5f2
jmp 0x8a5f4
jmp 0x8a5f4
leaq -0x38(%rbp), %rdi
callq 0x89020
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)