// File: /workspace/github_c_makefile_star2_O0/hughbarney[P]pEmacs/search.c
// Function: forwsrch
int
forwsrch(void)
{
	LINE	*clp, *tlp;
	int	 cbo, tbo, c, i, xcase = 0;
	char	*pp;
	int	 nline;

	clp = curwp->w_dotp;
	cbo = curwp->w_doto;
	for (i = 0; pat[i]; i++)
		if (ISUPPER(CHARMASK(pat[i])))
			xcase = 1;
	for (;;) {
		if (cbo == llength(clp)) {
			if ((clp = lforw(clp)) == curbp->b_linep)
				break;
			nline++;
			cbo = 0;
			c = CCHR('J');
		} else
			c = lgetc(clp, cbo++);
		if (eq(c, pat[0], xcase) != FALSE) {
			tlp = clp;
			tbo = cbo;
			pp = &pat[1];
			while (*pp != 0) {
				if (tbo == llength(tlp)) {
					tlp = lforw(tlp);
					if (tlp == curbp->b_linep)
						goto fail;
					tbo = 0;
					c = CCHR('J');
					if (eq(c, *pp++, xcase) == FALSE)
						goto fail;
					nline++;
				} else {
					c = lgetc(tlp, tbo++);
					if (eq(c, *pp++, xcase) == FALSE)
						goto fail;
				}
			}
			curwp->w_dotp = tlp;
			curwp->w_doto = tbo;
			curwp->w_flag |= WFMOVE;
			return (TRUE);
		}
fail:		;
	}
	return (FALSE);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl $0x0, -0x2c(%rbp)
leaq 0x69e2(%rip), %rax      # 0x10a58
movq (%rax), %rax
movq 0x18(%rax), %rax
movq %rax, -0x10(%rbp)
leaq 0x69d0(%rip), %rax      # 0x10a58
movq (%rax), %rax
movq 0x20(%rax), %rax
movl %eax, -0x1c(%rbp)
movl $0x0, -0x28(%rbp)
movslq -0x28(%rbp), %rcx
leaq 0x69ec(%rip), %rax      # 0x10a90
cmpb $0x0, (%rax,%rcx)
je 0xa0ee
movslq -0x28(%rbp), %rcx
leaq 0x69db(%rip), %rax      # 0x10a90
movzbl (%rax,%rcx), %ecx
movl $0x41, %eax
cmpl %ecx, %eax
jg 0xa0e1
movslq -0x28(%rbp), %rcx
leaq 0x69c3(%rip), %rax      # 0x10a90
movzbl (%rax,%rcx), %ecx
movl $0x5a, %eax
cmpl %ecx, %eax
jl 0xa0e1
movl $0x1, -0x2c(%rbp)
jmp 0xa0e3
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0xa099
jmp 0xa0f0
movl -0x1c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x14(%rcx), %eax
jne 0xa135
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
leaq 0x693a(%rip), %rcx      # 0x10a48
movq (%rcx), %rcx
cmpq 0x28(%rcx), %rax
jne 0xa11c
jmp 0xa2a1
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
movl $0x0, -0x1c(%rbp)
movl $0xa, -0x24(%rbp)
jmp 0xa154
movq -0x10(%rbp), %rax
movl -0x1c(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x1c(%rbp)
movslq %ecx, %rcx
movsbl 0x18(%rax,%rcx), %eax
andl $0xff, %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %edi
leaq 0x6932(%rip), %rax      # 0x10a90
movsbl (%rax), %esi
movl -0x2c(%rbp), %edx
callq 0xa2c0
cmpl $0x0, %eax
je 0xa29a
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x20(%rbp)
leaq 0x6909(%rip), %rax      # 0x10a90
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0xa259
movl -0x20(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0x14(%rcx), %eax
jne 0xa20f
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
leaq 0x6887(%rip), %rcx      # 0x10a48
movq (%rcx), %rcx
cmpq 0x28(%rcx), %rax
jne 0xa1cf
jmp 0xa29c
movl $0x0, -0x20(%rbp)
movl $0xa, -0x24(%rbp)
movl -0x24(%rbp), %edi
movq -0x38(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x38(%rbp)
movsbl (%rax), %esi
movl -0x2c(%rbp), %edx
callq 0xa2c0
cmpl $0x0, %eax
jne 0xa204
jmp 0xa29c
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0xa254
movq -0x18(%rbp), %rax
movl -0x20(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x20(%rbp)
movslq %ecx, %rcx
movsbl 0x18(%rax,%rcx), %eax
andl $0xff, %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %edi
movq -0x38(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x38(%rbp)
movsbl (%rax), %esi
movl -0x2c(%rbp), %edx
callq 0xa2c0
cmpl $0x0, %eax
jne 0xa252
jmp 0xa29c
jmp 0xa254
jmp 0xa18f
movq -0x18(%rbp), %rcx
leaq 0x67f4(%rip), %rax      # 0x10a58
movq (%rax), %rax
movq %rcx, 0x18(%rax)
movslq -0x20(%rbp), %rcx
leaq 0x67e2(%rip), %rax      # 0x10a58
movq (%rax), %rax
movq %rcx, 0x20(%rax)
leaq 0x67d4(%rip), %rax      # 0x10a58
movq (%rax), %rax
movsbl 0x3b(%rax), %ecx
orl $0x2, %ecx
movb %cl, 0x3b(%rax)
movl $0x1, -0x4(%rbp)
jmp 0xa2a8
jmp 0xa29c
jmp 0xa0f0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)