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

	subtilis_bitset_init(&int_scratch);
	subtilis_bitset_init(&real_scratch);

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

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

	subtilis_bitset_and(&int_scratch, &ss->int_inputs);
	subtilis_bitset_and(&real_scratch, &ss->real_inputs);
	subtilis_bitset_or(int_save, &int_scratch, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

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

	for (i = 0; i < ss->num_links; i++) {
		link = ss->links[i].link;
		if (link >= sss->link_count) {
			subtilis_error_set_assertion_failed(err);
			goto cleanup;
		}
		if (subtilis_bitset_isset(visited, link))
			continue;
		subtilis_bitset_set(visited, link, err);
		if (err->type != SUBTILIS_ERROR_OK)
			goto cleanup;
		label = sss->ss_link_map[link];
		if (label == SIZE_MAX) {
			subtilis_error_set_assertion_failed(err);
			goto cleanup;
		}
		next = &sss->sub_sections[label];
		prv_visit_subsection(sss, next, start, int_save, real_save,
				     visited, err);
		if (err->type != SUBTILIS_ERROR_OK)
			goto cleanup;
	}

cleanup:

	subtilis_bitset_free(&int_scratch);
	subtilis_bitset_free(&real_scratch);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %r9, 0x8(%rsp)
movq %r8, 0x10(%rsp)
movq %rcx, 0x20(%rsp)
movq %rdx, %r13
movq %rsi, %rbp
movq %rdi, 0x18(%rsp)
movq 0x90(%rsp), %rbx
leaq 0x40(%rsp), %r12
movq %r12, %rdi
callq 0x5db38
leaq 0x28(%rsp), %rdi
callq 0x5db38
movq %r12, %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x5dd9f
cmpl $0x0, (%rbx)
jne 0x5ebc3
leaq 0x18(%r13), %rsi
leaq 0x28(%rsp), %rdi
movq %rbx, %rdx
callq 0x5dd9f
cmpl $0x0, (%rbx)
jne 0x5ebc3
leaq 0x18(%rbp), %rsi
leaq 0x40(%rsp), %r12
movq %r12, %rdi
callq 0x5dd15
leaq 0x30(%rbp), %rsi
leaq 0x28(%rsp), %rdi
callq 0x5dd15
movq 0x20(%rsp), %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x5dd9f
cmpl $0x0, (%rbx)
jne 0x5ebc3
leaq 0x28(%rsp), %rsi
movq 0x10(%rsp), %rdi
movq %rbx, %rdx
callq 0x5dd9f
cmpl $0x0, (%rbx)
je 0x5ebe6
leaq 0x40(%rsp), %rdi
callq 0x5df52
leaq 0x28(%rsp), %rdi
callq 0x5df52
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpq $0x0, 0x128(%rbp)
je 0x5ebc3
leaq 0xa8(%rbp), %r14
xorl %r15d, %r15d
movq (%r14), %r12
movq 0x18(%rsp), %rax
cmpq 0x18(%rax), %r12
jae 0x5ec8c
movq 0x8(%rsp), %rdi
movq %r12, %rsi
callq 0x5dc45
testb %al, %al
jne 0x5ec73
movq 0x8(%rsp), %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x5db68
cmpl $0x0, (%rbx)
jne 0x5ebc3
movq 0x18(%rsp), %rdi
movq 0x28(%rdi), %rax
movq (%rax,%r12,8), %rax
cmpq $-0x1, %rax
je 0x5ec93
imulq $0x130, %rax, %rsi      # imm = 0x130
addq (%rdi), %rsi
movq %rbx, (%rsp)
movq %r13, %rdx
movq 0x20(%rsp), %rcx
movq 0x10(%rsp), %r8
movq 0x8(%rsp), %r9
callq 0x5eb08
cmpl $0x0, (%rbx)
jne 0x5ebc3
incq %r15
addq $0x70, %r14
cmpq 0x128(%rbp), %r15
jb 0x5ebfa
jmp 0x5ebc3
movl $0x108, %ecx            # imm = 0x108
jmp 0x5ec98
movl $0x112, %ecx            # imm = 0x112
leaq 0x17cc8(%rip), %rdx     # 0x76967
movq %rbx, %rdi
movl $0xf, %esi
callq 0x145a4
jmp 0x5ebc3