// File: /workspace/github_c_makefile_star2_O1/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 $0x68, %rsp
movl %ecx, %r15d
movq %rdi, %r14
movl 0x4(%rsi), %eax
movl 0xc(%rsi), %r13d
leal 0x1(%r13), %ecx
movl %ecx, 0x10(%rsp)
incl (%rsi)
incl %eax
xorl %ecx, %ecx
cmpl 0x8(%rsi), %eax
leal 0x2(%r13,%r13), %edi
movl %edi, 0x8(%rsp)
cmovnel %eax, %ecx
movl %ecx, 0x4(%rsi)
movq 0x18(%rsi), %r12
movslq %ecx, %rax
imulq $0x38, %rax, %rbx
movl %edx, (%r12,%rbx)
movl %r15d, 0x4(%r12,%rbx)
movl %edx, 0x1c(%rsp)
subl %edx, %r15d
leal 0x1(%r15), %ebp
movq 0x8(%r12,%rbx), %rsi
movq %r14, %rdi
callq 0x30f6
leal (%r15,%r13,2), %eax
addl $0x3, %eax
leal (%rax,%rax,4), %eax
movslq %eax, %rsi
shlq $0x2, %rsi
movq %r14, %rdi
callq 0x31c1
movq %rax, 0x8(%r12,%rbx)
movslq 0x10(%rsp), %rcx
movq %rcx, 0x20(%rsp)
leaq (%rax,%rcx,4), %rcx
movq %rcx, 0x10(%r12,%rbx)
movslq %ebp, %r9
movq %rcx, 0x50(%rsp)
leaq (%rcx,%r9,4), %rcx
movslq 0x8(%rsp), %rdx
movq %rcx, 0x30(%rsp)
leaq (%rcx,%rdx,4), %rcx
movq %rcx, 0x18(%r12,%rbx)
movq %rcx, 0x48(%rsp)
leaq (%rcx,%r9,4), %r11
leaq (%r11,%rdx,4), %rcx
movq %rcx, 0x28(%r12,%rbx)
movq %rcx, 0x58(%rsp)
leaq (%rcx,%r9,4), %r14
leaq (%r14,%rdx,4), %rcx
movq %rcx, 0x20(%r12,%rbx)
movq %rcx, 0x38(%rsp)
leaq (%rcx,%r9,4), %r15
movq %rdx, 0x8(%rsp)
leaq (%r15,%rdx,4), %rcx
movq %r12, 0x60(%rsp)
movq %rcx, 0x40(%rsp)
movq %rbx, 0x28(%rsp)
movq %rcx, 0x30(%r12,%rbx)
movq %r13, 0x10(%rsp)
testl %r13d, %r13d
js 0x1230c
movq 0x10(%rsp), %rcx
notl %ecx
movslq %ecx, %rbx
movq 0x8(%rsp), %r13
leaq (%r9,%r13), %rcx
leaq (%rcx,%rcx,2), %rdi
shlq $0x4, %rcx
leaq (,%rbx,4), %r12
movq 0x20(%rsp), %r10
leaq (,%r10,4), %rdx
leaq (%rdx,%rbx,4), %rdx
addq %rdx, %rcx
addq %rax, %rcx
leaq (,%r13,8), %rsi
leaq (%rsi,%r9,8), %rsi
addq %rdx, %rsi
addq %rax, %rsi
leaq (%rdx,%rdi,4), %r8
addq %rax, %r8
leaq (%r12,%r9,4), %rdi
leaq (%rdi,%r13,4), %rdi
leaq (%rdi,%r10,4), %r13
addq %rax, %r13
addq %rax, %rdx
incq %rbx
xorl %edi, %edi
movl $0xc0000000, %ebp       # imm = 0xC0000000
xorl %r12d, %r12d
movl %ebp, (%rcx,%rdi,4)
movl %ebp, (%rsi,%rdi,4)
movl %ebp, (%r8,%rdi,4)
movl %ebp, (%r13,%rdi,4)
movl %ebp, (%rdx,%rdi,4)
incq %r12
movl %ebx, %r10d
addl %edi, %r10d
movq %r12, %rdi
jne 0x122ec
movq 0x60(%rsp), %r8
addq 0x28(%rsp), %r8
cmpl $0x0, 0x10(%rsp)
movq 0x30(%rsp), %r10
js 0x1236f
movq 0x20(%rsp), %rsi
leal (%r9,%rsi), %ecx
movslq %ecx, %rcx
leaq (%r9,%r9,4), %rdx
movq 0x8(%rsp), %rdi
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, (%r10,%rdx,4)
leaq (%r9,%rdx), %rdi
incq %rdi
incq %rdx
cmpq %rcx, %rdi
jl 0x1234d
movslq 0x1c(%rsp), %rax
shlq $0x2, %rax
movq 0x50(%rsp), %rcx
subq %rax, %rcx
movq %rcx, 0x10(%r8)
movq 0x48(%rsp), %rcx
subq %rax, %rcx
movq %rcx, 0x18(%r8)
movq 0x38(%rsp), %rcx
subq %rax, %rcx
movq %rcx, 0x20(%r8)
movq 0x58(%rsp), %rcx
subq %rax, %rcx
movq %rcx, 0x28(%r8)
movq 0x40(%rsp), %rcx
subq %rax, %rcx
movq %rcx, 0x30(%r8)
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq