// File: /workspace/github_c_makefile_star2_O0/markdryan[P]subtilis/arch/arm32/arm_sub_section.c
// Function: subtilis_arm_subsections_dump
void subtilis_arm_subsections_dump(subtilis_arm_subsections_t *sss,
				   subtilis_arm_section_t *arm_s)
{
	size_t i;
	size_t j;
	size_t ptr;
	subtilis_arm_ss_t *ss;
	subtilis_arm_op_t *op;
	subtilis_error_t err;

	subtilis_error_init(&err);

	printf("Combined must Save Int: ");
	subtilis_bitset_dump(&sss->int_save);
	printf("Combined Must Save Real: ");
	subtilis_bitset_dump(&sss->real_save);
	printf("\n");

	for (i = 0; i < sss->count; i++) {
		ss = &sss->sub_sections[i];
		printf("\nSubsection %zu:\n", i);
		printf("------------------------------\n");
		printf("Size %zu\n", ss->size);
		printf("Int Inputs: ");
		subtilis_bitset_dump(&ss->int_inputs);
		printf("\n");
		printf("Real Inputs: ");
		subtilis_bitset_dump(&ss->real_inputs);
		printf("\n");
		printf("Links: ");
		for (j = 0; j < ss->num_links; j++) {
			printf("\t%zu\n", ss->links[j].link);
			printf("\tInt Outputs: ");
			subtilis_bitset_dump(&ss->links[j].int_outputs);
			printf("\tReal Outputs: ");
			subtilis_bitset_dump(&ss->links[j].real_outputs);
			printf("\tMust Save Int: ");
			subtilis_bitset_dump(&ss->links[j].int_save);
			printf("\tMust Save Real: ");
			subtilis_bitset_dump(&ss->links[j].real_save);
			op = &arm_s->op_pool->ops[ss->links[j].op];
			printf("\tOP ptr %zu: ", ss->links[j].op);
			if (op->type == SUBTILIS_ARM_OP_LABEL)
				printf("label_%zu\n", op->op.label);
			else
				subtilis_arm_instr_dump(&op->op.instr);
			printf("\n");
		}
		printf("\n");
		printf("------------------------------\n");
		printf("\n");
		ptr = ss->start;
		while (ptr != SIZE_MAX) {
			op = &arm_s->op_pool->ops[ptr];
			if (op->type == SUBTILIS_ARM_OP_LABEL)
				printf("label_%zu\n", op->op.label);
			else
				subtilis_arm_instr_dump(&op->op.instr);
			if (ptr == ss->end)
				break;

			ptr = op->next;
		}
		printf("\n");
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc50, %rsp            # imm = 0xC50
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0xc44(%rbp), %rdi
callq 0x15670
leaq 0x237ae(%rip), %rdi     # 0xad8e4
movb $0x0, %al
callq 0x120f0
movq -0x8(%rbp), %rdi
addq $0x30, %rdi
callq 0x88f40
leaq 0x237ac(%rip), %rdi     # 0xad8fd
movb $0x0, %al
callq 0x120f0
movq -0x8(%rbp), %rdi
addq $0x48, %rdi
callq 0x88f40
leaq 0x20d07(%rip), %rdi     # 0xaae73
movb $0x0, %al
callq 0x120f0
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jae 0x8a464
movq -0x8(%rbp), %rax
movq (%rax), %rax
imulq $0x130, -0x18(%rbp), %rcx # imm = 0x130
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rsi
leaq 0x23769(%rip), %rdi     # 0xad917
movb $0x0, %al
callq 0x120f0
leaq 0x2376d(%rip), %rdi     # 0xad929
movb $0x0, %al
callq 0x120f0
movq -0x30(%rbp), %rax
movq (%rax), %rsi
leaq 0x23778(%rip), %rdi     # 0xad949
movb $0x0, %al
callq 0x120f0
leaq 0x23774(%rip), %rdi     # 0xad953
movb $0x0, %al
callq 0x120f0
movq -0x30(%rbp), %rdi
addq $0x18, %rdi
callq 0x88f40
leaq 0x20c79(%rip), %rdi     # 0xaae73
movb $0x0, %al
callq 0x120f0
leaq 0x23758(%rip), %rdi     # 0xad960
movb $0x0, %al
callq 0x120f0
movq -0x30(%rbp), %rdi
addq $0x30, %rdi
callq 0x88f40
leaq 0x20c50(%rip), %rdi     # 0xaae73
movb $0x0, %al
callq 0x120f0
leaq 0x2373d(%rip), %rdi     # 0xad96e
movb $0x0, %al
callq 0x120f0
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x30(%rbp), %rcx
cmpq 0x128(%rcx), %rax
jae 0x8a3a5
movq -0x30(%rbp), %rax
addq $0x48, %rax
imulq $0x70, -0x20(%rbp), %rcx
addq %rcx, %rax
movq 0x60(%rax), %rsi
leaq 0x23706(%rip), %rdi     # 0xad976
movb $0x0, %al
callq 0x120f0
leaq 0x236fe(%rip), %rdi     # 0xad97c
movb $0x0, %al
callq 0x120f0
movq -0x30(%rbp), %rdi
addq $0x48, %rdi
imulq $0x70, -0x20(%rbp), %rax
addq %rax, %rdi
callq 0x88f40
leaq 0x236ea(%rip), %rdi     # 0xad98b
movb $0x0, %al
callq 0x120f0
movq -0x30(%rbp), %rdi
addq $0x48, %rdi
imulq $0x70, -0x20(%rbp), %rax
addq %rax, %rdi
addq $0x18, %rdi
callq 0x88f40
leaq 0x236d3(%rip), %rdi     # 0xad99b
movb $0x0, %al
callq 0x120f0
movq -0x30(%rbp), %rdi
addq $0x48, %rdi
imulq $0x70, -0x20(%rbp), %rax
addq %rax, %rdi
addq $0x30, %rdi
callq 0x88f40
leaq 0x236bd(%rip), %rdi     # 0xad9ac
movb $0x0, %al
callq 0x120f0
movq -0x30(%rbp), %rdi
addq $0x48, %rdi
imulq $0x70, -0x20(%rbp), %rax
addq %rax, %rdi
addq $0x48, %rdi
callq 0x88f40
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq (%rax), %rax
movq -0x30(%rbp), %rcx
addq $0x48, %rcx
imulq $0x70, -0x20(%rbp), %rdx
addq %rdx, %rcx
imulq $0x68, 0x68(%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
addq $0x48, %rax
imulq $0x70, -0x20(%rbp), %rcx
addq %rcx, %rax
movq 0x68(%rax), %rsi
leaq 0x2366d(%rip), %rdi     # 0xad9be
movb $0x0, %al
callq 0x120f0
movq -0x38(%rbp), %rax
cmpl $0x1, (%rax)
jne 0x8a379
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rsi
leaq 0x23372(%rip), %rdi     # 0xad6e2
movb $0x0, %al
callq 0x120f0
jmp 0x8a386
movq -0x38(%rbp), %rdi
addq $0x8, %rdi
callq 0x86860
leaq 0x20ae6(%rip), %rdi     # 0xaae73
movb $0x0, %al
callq 0x120f0
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x8a240
leaq 0x20ac7(%rip), %rdi     # 0xaae73
movb $0x0, %al
callq 0x120f0
leaq 0x2356f(%rip), %rdi     # 0xad929
movb $0x0, %al
callq 0x120f0
leaq 0x20aab(%rip), %rdi     # 0xaae73
movb $0x0, %al
callq 0x120f0
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $-0x1, -0x28(%rbp)
je 0x8a445
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq (%rax), %rax
imulq $0x68, -0x28(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpl $0x1, (%rax)
jne 0x8a41a
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rsi
leaq 0x232d1(%rip), %rdi     # 0xad6e2
movb $0x0, %al
callq 0x120f0
jmp 0x8a427
movq -0x38(%rbp), %rdi
addq $0x8, %rdi
callq 0x86860
movq -0x28(%rbp), %rax
movq -0x30(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jne 0x8a437
jmp 0x8a445
movq -0x38(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x8a3db
leaq 0x20a27(%rip), %rdi     # 0xaae73
movb $0x0, %al
callq 0x120f0
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x8a17b
addq $0xc50, %rsp            # imm = 0xC50
popq %rbp
retq
nopl (%rax)