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

	for (epp = &pat[0]; epp[1] != 0; ++epp);
	clp = curwp->w_dotp;
	cbo = curwp->w_doto;
	for (i = 0; pat[i]; i++)
		if (ISUPPER(CHARMASK(pat[i])))
			xcase = 1;
	for (;;) {
		if (cbo == 0) {
			clp = lback(clp);
			if (clp == curbp->b_linep)
				return (FALSE);
			nline--;
			cbo = llength(clp) + 1;
		}
		if (--cbo == llength(clp))
			c = CCHR('J');
		else
			c = lgetc(clp, cbo);
		if (eq(c, *epp, xcase) != FALSE) {
			tlp = clp;
			tbo = cbo;
			pp = epp;
			while (pp != &pat[0]) {
				if (tbo == 0) {
					tlp = lback(tlp);
					if (tlp == curbp->b_linep)
						goto fail;
					nline--;
					tbo = llength(tlp) + 1;
				}
				if (--tbo == llength(tlp))
					c = CCHR('J');
				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:		;
	}
	/* NOTREACHED */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movl $0x0, -0x2c(%rbp)
leaq 0x670a(%rip), %rax      # 0x10a90
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x0, %eax
je 0xa3a7
jmp 0xa399
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0xa38a
leaq 0x66aa(%rip), %rax      # 0x10a58
movq (%rax), %rax
movq 0x18(%rax), %rax
movq %rax, -0x10(%rbp)
leaq 0x6698(%rip), %rax      # 0x10a58
movq (%rax), %rax
movq 0x20(%rax), %rax
movl %eax, -0x1c(%rbp)
movl $0x0, -0x28(%rbp)
movslq -0x28(%rbp), %rcx
leaq 0x66b4(%rip), %rax      # 0x10a90
cmpb $0x0, (%rax,%rcx)
je 0xa426
movslq -0x28(%rbp), %rcx
leaq 0x66a3(%rip), %rax      # 0x10a90
movzbl (%rax,%rcx), %ecx
movl $0x41, %eax
cmpl %ecx, %eax
jg 0xa419
movslq -0x28(%rbp), %rcx
leaq 0x668b(%rip), %rax      # 0x10a90
movzbl (%rax,%rcx), %ecx
movl $0x5a, %eax
cmpl %ecx, %eax
jl 0xa419
movl $0x1, -0x2c(%rbp)
jmp 0xa41b
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0xa3d1
jmp 0xa428
cmpl $0x0, -0x1c(%rbp)
jne 0xa470
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x6603(%rip), %rcx      # 0x10a48
movq (%rcx), %rcx
cmpq 0x28(%rcx), %rax
jne 0xa45a
movl $0x0, -0x4(%rbp)
jmp 0xa5c5
movl -0x44(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x44(%rbp)
movq -0x10(%rbp), %rax
movl 0x14(%rax), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rcx
cmpl 0x14(%rcx), %eax
jne 0xa48b
movl $0xa, -0x24(%rbp)
jmp 0xa4a0
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movsbl 0x18(%rax,%rcx), %eax
andl $0xff, %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %edi
movq -0x38(%rbp), %rax
movsbl (%rax), %esi
movl -0x2c(%rbp), %edx
callq 0xa2c0
cmpl $0x0, %eax
je 0xa5be
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x20(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x40(%rbp)
leaq 0x65b8(%rip), %rax      # 0x10a90
cmpq %rax, -0x40(%rbp)
je 0xa57d
cmpl $0x0, -0x20(%rbp)
jne 0xa523
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
leaq 0x6549(%rip), %rcx      # 0x10a48
movq (%rcx), %rcx
cmpq 0x28(%rcx), %rax
jne 0xa50d
jmp 0xa5c0
movl -0x44(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x44(%rbp)
movq -0x18(%rbp), %rax
movl 0x14(%rax), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x20(%rbp)
movq -0x18(%rbp), %rcx
cmpl 0x14(%rcx), %eax
jne 0xa53e
movl $0xa, -0x24(%rbp)
jmp 0xa553
movq -0x18(%rbp), %rax
movslq -0x20(%rbp), %rcx
movsbl 0x18(%rax,%rcx), %eax
andl $0xff, %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %edi
movq -0x40(%rbp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x40(%rbp)
movsbl -0x1(%rax), %esi
movl -0x2c(%rbp), %edx
callq 0xa2c0
cmpl $0x0, %eax
jne 0xa578
jmp 0xa5c0
jmp 0xa4d1
movq -0x18(%rbp), %rcx
leaq 0x64d0(%rip), %rax      # 0x10a58
movq (%rax), %rax
movq %rcx, 0x18(%rax)
movslq -0x20(%rbp), %rcx
leaq 0x64be(%rip), %rax      # 0x10a58
movq (%rax), %rax
movq %rcx, 0x20(%rax)
leaq 0x64b0(%rip), %rax      # 0x10a58
movq (%rax), %rax
movsbl 0x3b(%rax), %ecx
orl $0x2, %ecx
movb %cl, 0x3b(%rax)
movl $0x1, -0x4(%rbp)
jmp 0xa5c5
jmp 0xa5c0
jmp 0xa428
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nop