// File: /workspace/github_c_makefile_star2_O0/lh3[P]minigraph/miniwfa.c
// Function: wf_next_seg
static void wf_next_seg(void *km, const mwf_opt_t *opt, uint8_t *xbuf, wf_stripe_t *wf, wf_stripe_t *sf, int32_t lo, int32_t hi)
{
	int32_t d, *H, *E1, *E2, *F1, *F2;
	const int32_t *pHx, *pHo1, *pHo2, *pE1, *pE2, *pF1, *pF2;
	uint8_t *ax = xbuf - lo;

	wf_next_prep(km, opt, wf, lo, hi, &H, &E1, &F1, &E2, &F2, &pHx, &pHo1, &pHo2, &pE1, &pF1, &pE2, &pF2);
	wf_next_tb(lo, hi, H, E1, F1, E2, F2, ax, pHx, pHo1, pHo2, pE1, pF1, pE2, pF2);
	wf_next_prep(km, opt, sf, lo, hi, &H, &E1, &F1, &E2, &F2, &pHx, &pHo1, &pHo2, &pE1, &pF1, &pE2, &pF2);
	PRAGMA_LOOP_VECTORIZE
	for (d = lo; d <= hi; ++d) { // FIXME: merge this loop into the loop in wf_next_tb(). I tried but couldn't make clang vectorize.
		uint8_t x = ax[d];
		int32_t a, b, e1, f1, e2, f2, h;
		a = pHo1[d-1], b = pE1[d-1];
		e1 = E1[d] = (x&0x08) == 0? a : b;
		a = pHo1[d+1], b = pF1[d+1];
		f1 = F1[d] = (x&0x10) == 0? a : b;
		a = pHo2[d-1], b = pE2[d-1];
		e2 = E2[d] = (x&0x20) == 0? a : b;
		a = pHo2[d+1], b = pF2[d+1];
		f2 = F2[d] = (x&0x40) == 0? a : b;
		x &= 7;
		h = pHx[d];
		h = x == 1? e1 : h;
		h = x == 2? f1 : h;
		h = x == 3? e2 : h;
		h = x == 4? f2 : h;
		H[d] = h;
	}
	if (H[lo] >= -1 || E1[lo] >= -1 || F1[lo] >= -1 || E2[lo] >= -1 || F2[lo] >= -1) wf->lo = lo;
	if (H[hi] >= -1 || E1[hi] >= -1 || F1[hi] >= -1 || E2[hi] >= -1 || F2[hi] >= -1) wf->hi = hi;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x188, %rsp            # imm = 0x188
movl 0x10(%rbp), %eax
movq %rdi, -0x30(%rbp)
movq %rsi, -0x38(%rbp)
movq %rdx, -0x40(%rbp)
movq %rcx, -0x48(%rbp)
movq %r8, -0x50(%rbp)
movl %r9d, -0x54(%rbp)
movq -0x40(%rbp), %rax
movslq -0x54(%rbp), %rdx
xorl %ecx, %ecx
subq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0xc0(%rbp)
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x48(%rbp), %rdx
movl -0x54(%rbp), %ecx
movl 0x10(%rbp), %r8d
leaq -0x60(%rbp), %r9
leaq -0x68(%rbp), %rax
movq %rax, -0x130(%rbp)
leaq -0x78(%rbp), %rax
movq %rax, -0x128(%rbp)
leaq -0x70(%rbp), %rax
movq %rax, -0x120(%rbp)
leaq -0x80(%rbp), %r13
leaq -0x88(%rbp), %r12
leaq -0x90(%rbp), %r15
leaq -0x98(%rbp), %r14
leaq -0xa0(%rbp), %rbx
leaq -0xb0(%rbp), %r11
leaq -0xa8(%rbp), %r10
leaq -0xb8(%rbp), %rax
movq %rax, -0x118(%rbp)
movq -0x130(%rbp), %rax
movq %rax, (%rsp)
movq -0x128(%rbp), %rax
movq %rax, 0x8(%rsp)
movq -0x120(%rbp), %rax
movq %rax, 0x10(%rsp)
movq -0x118(%rbp), %rax
movq %r13, 0x18(%rsp)
movq %r12, 0x20(%rsp)
movq %r15, 0x28(%rsp)
movq %r14, 0x30(%rsp)
movq %rbx, 0x38(%rsp)
movq %r11, 0x40(%rsp)
movq %r10, 0x48(%rsp)
movq %rax, 0x50(%rsp)
callq 0x1ef10
movl -0x54(%rbp), %edi
movl 0x10(%rbp), %esi
movq -0x60(%rbp), %rdx
movq -0x68(%rbp), %rcx
movq -0x78(%rbp), %r8
movq -0x70(%rbp), %r9
movq -0x80(%rbp), %rax
movq %rax, -0x110(%rbp)
movq -0xc0(%rbp), %r13
movq -0x88(%rbp), %r12
movq -0x90(%rbp), %r15
movq -0x98(%rbp), %r14
movq -0xa0(%rbp), %rbx
movq -0xb0(%rbp), %r11
movq -0xa8(%rbp), %r10
movq -0xb8(%rbp), %rax
movq %rax, -0x108(%rbp)
movq -0x110(%rbp), %rax
movq %rax, (%rsp)
movq -0x108(%rbp), %rax
movq %r13, 0x8(%rsp)
movq %r12, 0x10(%rsp)
movq %r15, 0x18(%rsp)
movq %r14, 0x20(%rsp)
movq %rbx, 0x28(%rsp)
movq %r11, 0x30(%rsp)
movq %r10, 0x38(%rsp)
movq %rax, 0x40(%rsp)
callq 0x1f0c0
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x50(%rbp), %rdx
movl -0x54(%rbp), %ecx
movl 0x10(%rbp), %r8d
leaq -0x60(%rbp), %r9
leaq -0x68(%rbp), %rax
movq %rax, -0x100(%rbp)
leaq -0x78(%rbp), %rax
movq %rax, -0xf8(%rbp)
leaq -0x70(%rbp), %rax
movq %rax, -0xf0(%rbp)
leaq -0x80(%rbp), %r13
leaq -0x88(%rbp), %r12
leaq -0x90(%rbp), %r15
leaq -0x98(%rbp), %r14
leaq -0xa0(%rbp), %rbx
leaq -0xb0(%rbp), %r11
leaq -0xa8(%rbp), %r10
leaq -0xb8(%rbp), %rax
movq %rax, -0xe8(%rbp)
movq -0x100(%rbp), %rax
movq %rax, (%rsp)
movq -0xf8(%rbp), %rax
movq %rax, 0x8(%rsp)
movq -0xf0(%rbp), %rax
movq %rax, 0x10(%rsp)
movq -0xe8(%rbp), %rax
movq %r13, 0x18(%rsp)
movq %r12, 0x20(%rsp)
movq %r15, 0x28(%rsp)
movq %r14, 0x30(%rsp)
movq %rbx, 0x38(%rsp)
movq %r11, 0x40(%rsp)
movq %r10, 0x48(%rsp)
movq %rax, 0x50(%rsp)
callq 0x1ef10
movl -0x54(%rbp), %eax
movl %eax, -0x58(%rbp)
movl -0x58(%rbp), %eax
cmpl 0x10(%rbp), %eax
jg 0x1cbb4
movq -0xc0(%rbp), %rax
movslq -0x58(%rbp), %rcx
movb (%rax,%rcx), %al
movb %al, -0xc1(%rbp)
movq -0x90(%rbp), %rax
movl -0x58(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0xc8(%rbp)
movq -0xa0(%rbp), %rax
movl -0x58(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0xcc(%rbp)
movzbl -0xc1(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
jne 0x1c930
movl -0xc8(%rbp), %eax
movl %eax, -0x134(%rbp)
jmp 0x1c93c
movl -0xcc(%rbp), %eax
movl %eax, -0x134(%rbp)
movl -0x134(%rbp), %eax
movq -0x68(%rbp), %rcx
movslq -0x58(%rbp), %rdx
movl %eax, (%rcx,%rdx,4)
movl %eax, -0xd0(%rbp)
movq -0x90(%rbp), %rax
movl -0x58(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0xc8(%rbp)
movq -0xb0(%rbp), %rax
movl -0x58(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0xcc(%rbp)
movzbl -0xc1(%rbp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
jne 0x1c9a2
movl -0xc8(%rbp), %eax
movl %eax, -0x138(%rbp)
jmp 0x1c9ae
movl -0xcc(%rbp), %eax
movl %eax, -0x138(%rbp)
movl -0x138(%rbp), %eax
movq -0x78(%rbp), %rcx
movslq -0x58(%rbp), %rdx
movl %eax, (%rcx,%rdx,4)
movl %eax, -0xd4(%rbp)
movq -0x98(%rbp), %rax
movl -0x58(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0xc8(%rbp)
movq -0xa8(%rbp), %rax
movl -0x58(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0xcc(%rbp)
movzbl -0xc1(%rbp), %eax
andl $0x20, %eax
cmpl $0x0, %eax
jne 0x1ca14
movl -0xc8(%rbp), %eax
movl %eax, -0x13c(%rbp)
jmp 0x1ca20
movl -0xcc(%rbp), %eax
movl %eax, -0x13c(%rbp)
movl -0x13c(%rbp), %eax
movq -0x70(%rbp), %rcx
movslq -0x58(%rbp), %rdx
movl %eax, (%rcx,%rdx,4)
movl %eax, -0xd8(%rbp)
movq -0x98(%rbp), %rax
movl -0x58(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0xc8(%rbp)
movq -0xb8(%rbp), %rax
movl -0x58(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0xcc(%rbp)
movzbl -0xc1(%rbp), %eax
andl $0x40, %eax
cmpl $0x0, %eax
jne 0x1ca86
movl -0xc8(%rbp), %eax
movl %eax, -0x140(%rbp)
jmp 0x1ca92
movl -0xcc(%rbp), %eax
movl %eax, -0x140(%rbp)
movl -0x140(%rbp), %eax
movq -0x80(%rbp), %rcx
movslq -0x58(%rbp), %rdx
movl %eax, (%rcx,%rdx,4)
movl %eax, -0xdc(%rbp)
movzbl -0xc1(%rbp), %eax
andl $0x7, %eax
movb %al, -0xc1(%rbp)
movq -0x88(%rbp), %rax
movslq -0x58(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0xe0(%rbp)
movzbl -0xc1(%rbp), %eax
cmpl $0x1, %eax
jne 0x1cae7
movl -0xd0(%rbp), %eax
movl %eax, -0x144(%rbp)
jmp 0x1caf3
movl -0xe0(%rbp), %eax
movl %eax, -0x144(%rbp)
movl -0x144(%rbp), %eax
movl %eax, -0xe0(%rbp)
movzbl -0xc1(%rbp), %eax
cmpl $0x2, %eax
jne 0x1cb19
movl -0xd4(%rbp), %eax
movl %eax, -0x148(%rbp)
jmp 0x1cb25
movl -0xe0(%rbp), %eax
movl %eax, -0x148(%rbp)
movl -0x148(%rbp), %eax
movl %eax, -0xe0(%rbp)
movzbl -0xc1(%rbp), %eax
cmpl $0x3, %eax
jne 0x1cb4b
movl -0xd8(%rbp), %eax
movl %eax, -0x14c(%rbp)
jmp 0x1cb57
movl -0xe0(%rbp), %eax
movl %eax, -0x14c(%rbp)
movl -0x14c(%rbp), %eax
movl %eax, -0xe0(%rbp)
movzbl -0xc1(%rbp), %eax
cmpl $0x4, %eax
jne 0x1cb7d
movl -0xdc(%rbp), %eax
movl %eax, -0x150(%rbp)
jmp 0x1cb89
movl -0xe0(%rbp), %eax
movl %eax, -0x150(%rbp)
movl -0x150(%rbp), %eax
movl %eax, -0xe0(%rbp)
movl -0xe0(%rbp), %edx
movq -0x60(%rbp), %rax
movslq -0x58(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x58(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x58(%rbp)
jmp 0x1c8c1
movq -0x60(%rbp), %rax
movslq -0x54(%rbp), %rcx
cmpl $-0x1, (%rax,%rcx,4)
jge 0x1cbfa
movq -0x68(%rbp), %rax
movslq -0x54(%rbp), %rcx
cmpl $-0x1, (%rax,%rcx,4)
jge 0x1cbfa
movq -0x78(%rbp), %rax
movslq -0x54(%rbp), %rcx
cmpl $-0x1, (%rax,%rcx,4)
jge 0x1cbfa
movq -0x70(%rbp), %rax
movslq -0x54(%rbp), %rcx
cmpl $-0x1, (%rax,%rcx,4)
jge 0x1cbfa
movq -0x80(%rbp), %rax
movslq -0x54(%rbp), %rcx
cmpl $-0x1, (%rax,%rcx,4)
jl 0x1cc04
movl -0x54(%rbp), %ecx
movq -0x48(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x60(%rbp), %rax
movslq 0x10(%rbp), %rcx
cmpl $-0x1, (%rax,%rcx,4)
jge 0x1cc4a
movq -0x68(%rbp), %rax
movslq 0x10(%rbp), %rcx
cmpl $-0x1, (%rax,%rcx,4)
jge 0x1cc4a
movq -0x78(%rbp), %rax
movslq 0x10(%rbp), %rcx
cmpl $-0x1, (%rax,%rcx,4)
jge 0x1cc4a
movq -0x70(%rbp), %rax
movslq 0x10(%rbp), %rcx
cmpl $-0x1, (%rax,%rcx,4)
jge 0x1cc4a
movq -0x80(%rbp), %rax
movslq 0x10(%rbp), %rcx
cmpl $-0x1, (%rax,%rcx,4)
jl 0x1cc54
movl 0x10(%rbp), %ecx
movq -0x48(%rbp), %rax
movl %ecx, 0x14(%rax)
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopw %cs:(%rax,%rax)