// File: /workspace/github_c_makefile_star2_O3/lh3[P]minigraph/miniwfa.c
// Function: wf_stripe_add
void wf_stripe_add(void *km, wf_stripe_t *wf, int32_t lo, int32_t hi)
{
	int32_t i, n, m1 = wf->max_pen + 1, m2 = m1 * 2;
	wf_slice_t *f;
	++wf->s;
	++wf->top;
	if (wf->top == wf->n) wf->top = 0;
	f = &wf->a[wf->top];
	f->lo = lo, f->hi = hi;
	n = hi - lo + 1;
	kfree(km, f->mem);
	f->mem = Kmalloc(km, int32_t, 5 * (n + m2));
	f->H = f->mem + m1;
	f->E1 = f->H  + n + m2;
	f->F1 = f->E1 + n + m2;
	f->E2 = f->F1 + n + m2;
	f->F2 = f->E2 + n + m2;
	for (i = -m1; i < 0; ++i)
		f->H[i] = f->E1[i] = f->E2[i] = f->F1[i] = f->F2[i] = WF_NEG_INF;
	for (i = n; i < n + m1; ++i)
		f->H[i] = f->E1[i] = f->E2[i] = f->F1[i] = f->F2[i] = WF_NEG_INF;
	f->H -= lo, f->E1 -= lo, f->E2 -= lo, f->F1 -= lo, f->F2 -= lo; // such that f->H[lo] points to 0
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %ecx, %r15d
movq %rdi, %r14
movl 0x4(%rsi), %eax
movl 0xc(%rsi), %ebp
leal 0x1(%rbp), %ecx
movl %ecx, (%rsp)
leal 0x2(,%rbp,2), %ecx
movl %ecx, 0x8(%rsp)
incl (%rsi)
incl %eax
xorl %ecx, %ecx
cmpl 0x8(%rsi), %eax
cmovnel %eax, %ecx
movl %ecx, 0x4(%rsi)
movq 0x18(%rsi), %r12
movslq %ecx, %rax
imulq $0x38, %rax, %r13
leaq (%r12,%r13), %rax
movq %rax, 0x50(%rsp)
movl %edx, (%r12,%r13)
movl %r15d, 0x4(%r12,%r13)
movl %edx, 0x14(%rsp)
subl %edx, %r15d
leal 0x1(%r15), %ebx
movq 0x8(%r12,%r13), %rsi
callq 0x301f
leal (%r15,%rbp,2), %eax
addl $0x3, %eax
leal (%rax,%rax,4), %eax
movslq %eax, %rsi
shlq $0x2, %rsi
movq %r14, %rdi
callq 0x30e5
movq %rax, 0x8(%r12,%r13)
movslq (%rsp), %rsi
leaq (%rax,%rsi,4), %r12
movslq %ebx, %r9
leaq (%r12,%r9,4), %rcx
movslq 0x8(%rsp), %rdi
leaq (%rcx,%rdi,4), %rbx
leaq (%rbx,%r9,4), %r11
leaq (%r11,%rdi,4), %r8
leaq (%r8,%r9,4), %r14
leaq (%r14,%rdi,4), %r13
leaq (,%r9,4), %r15
addq %r13, %r15
leaq (%r15,%rdi,4), %r10
testl %ebp, %ebp
js 0x1268b
movq %rcx, 0x28(%rsp)
movq %r13, 0x30(%rsp)
movq %rbx, 0x38(%rsp)
movq %r12, 0x40(%rsp)
movq %r10, 0x48(%rsp)
movq %r8, 0x8(%rsp)
movq %rbp, (%rsp)
movl %ebp, %ecx
notl %ecx
movslq %ecx, %rdx
leaq (%r9,%rdi), %r12
movq %rdi, %rbx
leaq (%r12,%r12,2), %rdi
shlq $0x4, %r12
leaq (,%rdx,4), %r8
leaq (,%rsi,4), %rcx
leaq (%rcx,%rdx,4), %rcx
addq %rcx, %r12
addq %rax, %r12
movq %rsi, %r10
leaq (,%rbx,8), %rsi
leaq (%rsi,%r9,8), %rsi
addq %rcx, %rsi
addq %rax, %rsi
leaq (%rcx,%rdi,4), %rbp
addq %rax, %rbp
leaq (%r8,%r9,4), %rdi
movq %rbx, 0x18(%rsp)
leaq (%rdi,%rbx,4), %rdi
movq %r10, 0x20(%rsp)
leaq (%rdi,%r10,4), %rdi
addq %rax, %rdi
addq %rax, %rcx
incq %rdx
xorl %r8d, %r8d
movl $0xc0000000, %r13d      # imm = 0xC0000000
xorl %ebx, %ebx
movl %r13d, (%r12,%r8,4)
movl %r13d, (%rsi,%r8,4)
movl %r13d, (%rbp,%r8,4)
movl %r13d, (%rdi,%r8,4)
movl %r13d, (%rcx,%r8,4)
incq %rbx
movl %edx, %r10d
addl %r8d, %r10d
movq %rbx, %r8
jne 0x125f7
cmpl $0x0, (%rsp)
movq 0x8(%rsp), %r8
movq 0x48(%rsp), %r10
movq 0x40(%rsp), %r12
movq 0x38(%rsp), %rbx
movq 0x30(%rsp), %r13
movq 0x28(%rsp), %rbp
movq 0x20(%rsp), %rsi
movq 0x18(%rsp), %rdi
js 0x1268b
leal (%r9,%rsi), %ecx
movslq %ecx, %rcx
leaq (%r9,%r9,4), %rdx
shlq $0x4, %rdi
leaq (%rdi,%rdx,4), %rdx
leaq (%rdx,%rsi,4), %rdx
addq %rdx, %rax
xorl %edx, %edx
movl $0xc0000000, %esi       # imm = 0xC0000000
movl %esi, (%rax,%rdx,4)
movl %esi, (%r14,%rdx,4)
movl %esi, (%r15,%rdx,4)
movl %esi, (%r11,%rdx,4)
movl %esi, (%rbp,%rdx,4)
leaq (%r9,%rdx), %rdi
incq %rdi
incq %rdx
cmpq %rcx, %rdi
jl 0x12669
movslq 0x14(%rsp), %rax
shlq $0x2, %rax
subq %rax, %r12
movq 0x50(%rsp), %rcx
movq %r12, 0x10(%rcx)
subq %rax, %rbx
movq %rbx, 0x18(%rcx)
subq %rax, %r13
movq %r13, 0x20(%rcx)
subq %rax, %r8
movq %r8, 0x28(%rcx)
subq %rax, %r10
movq %r10, 0x30(%rcx)
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq