// File: /workspace/github_c_makefile_star2_O0/lh3[P]fermi2/profk.c
// Function: fm_kprof
fm_icnt_t *fm_kprof(const rld_t *e, const char *s, int min_ext, int sat_occ, int *n_)
{
	int i, x, len, k = 0;
	fm_icnt_t *a;
	len = strlen(s);
	MALLOC(a, len);
	for (x = len - 1; x >= min_ext - 1;) {
		int y, occ;
		y = fm_extend_to(e, s, x, min_ext, sat_occ, &occ);
		a[k].st = x + 1 - (y >= min_ext? y : min_ext);
		a[k].en = x + 1;
		a[k++].occ = occ;
		x -= (y >= min_ext? y - min_ext : 0) + 1;
	}
	*n_ = k;
	for (i = 0; i < k>>1; ++i) {
		fm_icnt_t t = a[i];
		a[i] = a[k - i - 1]; a[k - i - 1] = t;
	}
	return a;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movq %r8, -0x20(%rbp)
movl $0x0, -0x30(%rbp)
movq -0x10(%rbp), %rdi
callq 0x20f0
movl %eax, -0x2c(%rbp)
movslq -0x2c(%rbp), %rax
imulq $0xc, %rax, %rdi
callq 0x2230
movq %rax, -0x38(%rbp)
movl -0x2c(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jl 0x29ba2
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x28(%rbp), %edx
movl -0x14(%rbp), %ecx
movl -0x18(%rbp), %r8d
leaq -0x40(%rbp), %r9
callq 0x298c0
movl %eax, -0x3c(%rbp)
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x50(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x14(%rbp), %eax
jl 0x29b1f
movl -0x3c(%rbp), %eax
movl %eax, -0x54(%rbp)
jmp 0x29b25
movl -0x14(%rbp), %eax
movl %eax, -0x54(%rbp)
movl -0x50(%rbp), %ecx
movl -0x54(%rbp), %eax
subl %eax, %ecx
movq -0x38(%rbp), %rax
movslq -0x30(%rbp), %rdx
imulq $0xc, %rdx, %rdx
addq %rdx, %rax
movl %ecx, (%rax)
movl -0x28(%rbp), %ecx
addl $0x1, %ecx
movq -0x38(%rbp), %rax
movslq -0x30(%rbp), %rdx
imulq $0xc, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x4(%rax)
movl -0x40(%rbp), %ecx
movq -0x38(%rbp), %rax
movl -0x30(%rbp), %edx
movl %edx, %esi
addl $0x1, %esi
movl %esi, -0x30(%rbp)
movslq %edx, %rdx
imulq $0xc, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x8(%rax)
movl -0x3c(%rbp), %eax
cmpl -0x14(%rbp), %eax
jl 0x29b88
movl -0x3c(%rbp), %eax
subl -0x14(%rbp), %eax
movl %eax, -0x58(%rbp)
jmp 0x29b8f
xorl %eax, %eax
movl %eax, -0x58(%rbp)
jmp 0x29b8f
movl -0x58(%rbp), %ecx
addl $0x1, %ecx
movl -0x28(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x28(%rbp)
jmp 0x29ad7
movl -0x30(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movl -0x30(%rbp), %ecx
sarl %ecx
cmpl %ecx, %eax
jge 0x29c42
movq -0x38(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rcx
movq %rcx, -0x4c(%rbp)
movl 0x8(%rax), %eax
movl %eax, -0x44(%rbp)
movq -0x38(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movq -0x38(%rbp), %rcx
movl -0x30(%rbp), %edx
subl -0x24(%rbp), %edx
subl $0x1, %edx
movslq %edx, %rdx
imulq $0xc, %rdx, %rdx
addq %rdx, %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movl 0x8(%rcx), %ecx
movl %ecx, 0x8(%rax)
movq -0x38(%rbp), %rax
movl -0x30(%rbp), %ecx
subl -0x24(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movq -0x4c(%rbp), %rcx
movq %rcx, (%rax)
movl -0x44(%rbp), %ecx
movl %ecx, 0x8(%rax)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x29bb2
movq -0x38(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)