// File: /workspace/github_c_makefile_star2_O0/lh3[P]minigraph/miniwfa.c
// Function: wf_stripe_shrink
static void wf_stripe_shrink(wf_stripe_t *wf, int32_t tl, int32_t ql)
{
	int32_t j, d;
	for (d = wf->lo; d <= wf->hi; ++d) {
		for (j = 0; j < wf->n; ++j) {
			wf_slice_t *p = &wf->a[(wf->top + 1 + j) % wf->n];
			if (d < p->lo || d > p->hi) continue;
			if (good_diag(d, p->H[d], tl, ql)) break;
			if (good_diag(d, p->E1[d], tl, ql) || good_diag(d, p->F1[d], tl, ql)) break;
			if (good_diag(d, p->E2[d], tl, ql) || good_diag(d, p->F2[d], tl, ql)) break;
		}
		if (j < wf->n) break; // stop when we see a "good diagonal" in the stripe
	}
	assert(d <= wf->hi); // should never happen
	wf->lo = d;
	for (d = wf->hi; d >= wf->lo; --d) {
		for (j = 0; j < wf->n; ++j) {
			wf_slice_t *p = &wf->a[(wf->top + 1 + j) % wf->n];
			if (d < p->lo || d > p->hi) continue;
			if (good_diag(d, p->H[d], tl, ql)) break;
			if (good_diag(d, p->E1[d], tl, ql) || good_diag(d, p->F1[d], tl, ql)) break;
			if (good_diag(d, p->E2[d], tl, ql) || good_diag(d, p->F2[d], tl, ql)) break;
		}
		if (j < wf->n) break;
	}
	assert(d >= wf->lo);
	wf->hi = d;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x14(%rcx), %eax
jg 0x1cde3
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jge 0x1cdc5
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
addl $0x1, %eax
addl -0x14(%rbp), %eax
movq -0x8(%rbp), %rcx
cltd
idivl 0x8(%rcx)
movq -0x30(%rbp), %rax
movslq %edx, %rcx
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movl -0x18(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl (%rcx), %eax
jl 0x1ccfd
movl -0x18(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jle 0x1cd02
jmp 0x1cdb7
movl -0x18(%rbp), %edi
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x18(%rbp), %rcx
movl (%rax,%rcx,4), %esi
movl -0xc(%rbp), %edx
movl -0x10(%rbp), %ecx
callq 0x1f520
cmpl $0x0, %eax
je 0x1cd29
jmp 0x1cdc5
movl -0x18(%rbp), %edi
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x18(%rbp), %rcx
movl (%rax,%rcx,4), %esi
movl -0xc(%rbp), %edx
movl -0x10(%rbp), %ecx
callq 0x1f520
cmpl $0x0, %eax
jne 0x1cd6d
movl -0x18(%rbp), %edi
movq -0x20(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x18(%rbp), %rcx
movl (%rax,%rcx,4), %esi
movl -0xc(%rbp), %edx
movl -0x10(%rbp), %ecx
callq 0x1f520
cmpl $0x0, %eax
je 0x1cd6f
jmp 0x1cdc5
movl -0x18(%rbp), %edi
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x18(%rbp), %rcx
movl (%rax,%rcx,4), %esi
movl -0xc(%rbp), %edx
movl -0x10(%rbp), %ecx
callq 0x1f520
cmpl $0x0, %eax
jne 0x1cdb3
movl -0x18(%rbp), %edi
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rax
movslq -0x18(%rbp), %rcx
movl (%rax,%rcx,4), %esi
movl -0xc(%rbp), %edx
movl -0x10(%rbp), %ecx
callq 0x1f520
cmpl $0x0, %eax
je 0x1cdb5
jmp 0x1cdc5
jmp 0x1cdb7
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x1cca3
movl -0x14(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jge 0x1cdd3
jmp 0x1cde3
jmp 0x1cdd5
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x1cc8c
movl -0x18(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x14(%rcx), %eax
jg 0x1cdf1
jmp 0x1ce10
leaq 0x20092(%rip), %rdi     # 0x3ce8a
leaq 0x1fe95(%rip), %rsi     # 0x3cc94
movl $0x9d, %edx
leaq 0x1ff3e(%rip), %rcx     # 0x3cd49
callq 0x2170
movl -0x18(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jl 0x1cf7b
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jge 0x1cf5d
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
addl $0x1, %eax
addl -0x14(%rbp), %eax
movq -0x8(%rbp), %rcx
cltd
idivl 0x8(%rcx)
movq -0x38(%rbp), %rax
movslq %edx, %rcx
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movl -0x18(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpl (%rcx), %eax
jl 0x1ce95
movl -0x18(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jle 0x1ce9a
jmp 0x1cf4f
movl -0x18(%rbp), %edi
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x18(%rbp), %rcx
movl (%rax,%rcx,4), %esi
movl -0xc(%rbp), %edx
movl -0x10(%rbp), %ecx
callq 0x1f520
cmpl $0x0, %eax
je 0x1cec1
jmp 0x1cf5d
movl -0x18(%rbp), %edi
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x18(%rbp), %rcx
movl (%rax,%rcx,4), %esi
movl -0xc(%rbp), %edx
movl -0x10(%rbp), %ecx
callq 0x1f520
cmpl $0x0, %eax
jne 0x1cf05
movl -0x18(%rbp), %edi
movq -0x28(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x18(%rbp), %rcx
movl (%rax,%rcx,4), %esi
movl -0xc(%rbp), %edx
movl -0x10(%rbp), %ecx
callq 0x1f520
cmpl $0x0, %eax
je 0x1cf07
jmp 0x1cf5d
movl -0x18(%rbp), %edi
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x18(%rbp), %rcx
movl (%rax,%rcx,4), %esi
movl -0xc(%rbp), %edx
movl -0x10(%rbp), %ecx
callq 0x1f520
cmpl $0x0, %eax
jne 0x1cf4b
movl -0x18(%rbp), %edi
movq -0x28(%rbp), %rax
movq 0x30(%rax), %rax
movslq -0x18(%rbp), %rcx
movl (%rax,%rcx,4), %esi
movl -0xc(%rbp), %edx
movl -0x10(%rbp), %ecx
callq 0x1f520
cmpl $0x0, %eax
je 0x1cf4d
jmp 0x1cf5d
jmp 0x1cf4f
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x1ce3b
movl -0x14(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jge 0x1cf6b
jmp 0x1cf7b
jmp 0x1cf6d
movl -0x18(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x1ce24
movl -0x18(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jl 0x1cf89
jmp 0x1cfa8
leaq 0x1fdf0(%rip), %rdi     # 0x3cd80
leaq 0x1fcfd(%rip), %rsi     # 0x3cc94
movl $0xa9, %edx
leaq 0x1fda6(%rip), %rcx     # 0x3cd49
callq 0x2170
movl -0x18(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x14(%rax)
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)