// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-user.c
// Function: de_print_module_list
void de_print_module_list(deark *c)
{
	int i, k;
	struct sort_data_struct *sort_data = NULL;

	de_register_modules(c);

	// An index to the modules. Will be sorted by name.
	sort_data = de_mallocarray(c, c->num_modules, sizeof(struct sort_data_struct));

	for(k=0; k<c->num_modules; k++) {
		sort_data[k].c = c;
		sort_data[k].module_index = k;
	}

	qsort((void*)sort_data, (size_t)c->num_modules, sizeof(struct sort_data_struct),
		module_compare_fn);

	for(k=0; k<c->num_modules; k++) {
		const char *desc;
		i = sort_data[k].module_index;
		if(!c->module_info[i].id) continue;
		if(c->extract_level<2) {
			if(c->module_info[i].flags & (DE_MODFLAG_HIDDEN |
				DE_MODFLAG_NONWORKING | DE_MODFLAG_WARNPARSEONLY))
			{
				continue;
			}
		}
		desc = c->module_info[i].desc ? c->module_info[i].desc : "-";
		de_printf(c, DE_MSGTYPE_MESSAGE, "%-14s %s\n", c->module_info[i].id, desc);
	}

	de_free(c, sort_data);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rdi
callq 0x18d880
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movslq 0x1a8(%rax), %rsi
movl $0x10, %edx
callq 0x15c450
movq %rax, -0x18(%rbp)
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x1a8(%rcx), %eax
jge 0x18d736
movq -0x8(%rbp), %rcx
movq -0x18(%rbp), %rax
movslq -0x10(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, (%rax)
movl -0x10(%rbp), %ecx
movq -0x18(%rbp), %rax
movslq -0x10(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movl %ecx, 0x8(%rax)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x18d6f1
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rax
movslq 0x1a8(%rax), %rsi
movl $0x10, %edx
leaq 0x17f(%rip), %rcx       # 0x18d8d0
callq 0x19070
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x1a8(%rcx), %eax
jge 0x18d86c
movq -0x18(%rbp), %rax
movslq -0x10(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq 0x1b0(%rax), %rax
movslq -0xc(%rbp), %rcx
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, (%rax)
jne 0x18d7a6
jmp 0x18d85e
movq -0x8(%rbp), %rax
cmpl $0x2, 0x90(%rax)
jge 0x18d7db
movq -0x8(%rbp), %rax
movq 0x1b0(%rax), %rax
movslq -0xc(%rbp), %rcx
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movl 0x30(%rax), %eax
andl $0x23, %eax
cmpl $0x0, %eax
je 0x18d7d9
jmp 0x18d85e
jmp 0x18d7db
movq -0x8(%rbp), %rax
movq 0x1b0(%rax), %rax
movslq -0xc(%rbp), %rcx
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, 0x8(%rax)
je 0x18d818
movq -0x8(%rbp), %rax
movq 0x1b0(%rax), %rax
movslq -0xc(%rbp), %rcx
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x18d825
leaq 0x2a90c(%rip), %rax     # 0x1b812b
movq %rax, -0x28(%rbp)
jmp 0x18d825
movq -0x28(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x1b0(%rax), %rax
movslq -0xc(%rbp), %rcx
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rcx
movq -0x20(%rbp), %r8
xorl %esi, %esi
leaq 0x4a57d(%rip), %rdx     # 0x1d7dd4
movb $0x0, %al
callq 0x15afe0
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x18d75d
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x15b820
addq $0x30, %rsp
popq %rbp
retq
nop