// File: /workspace/github_c_makefile_star2_O2/LemonBoy[P]autobahn/xdiff/xutils.c
// Function: xdl_recmatch
int xdl_recmatch(const char *l1, long s1, const char *l2, long s2, long flags)
{
	int i1, i2;

	if (s1 == s2 && !memcmp(l1, l2, s1))
		return 1;
	if (!(flags & XDF_WHITESPACE_FLAGS))
		return 0;

	i1 = 0;
	i2 = 0;

	/*
	 * -w matches everything that matches with -b, and -b in turn
	 * matches everything that matches with --ignore-space-at-eol.
	 *
	 * Each flavor of ignoring needs different logic to skip whitespaces
	 * while we have both sides to compare.
	 */
	if (flags & XDF_IGNORE_WHITESPACE) {
		goto skip_ws;
		while (i1 < s1 && i2 < s2) {
			if (l1[i1++] != l2[i2++])
				return 0;
		skip_ws:
			while (i1 < s1 && XDL_ISSPACE(l1[i1]))
				i1++;
			while (i2 < s2 && XDL_ISSPACE(l2[i2]))
				i2++;
		}
	} else if (flags & XDF_IGNORE_WHITESPACE_CHANGE) {
		while (i1 < s1 && i2 < s2) {
			if (XDL_ISSPACE(l1[i1]) && XDL_ISSPACE(l2[i2])) {
				/* Skip matching spaces and try again */
				while (i1 < s1 && XDL_ISSPACE(l1[i1]))
					i1++;
				while (i2 < s2 && XDL_ISSPACE(l2[i2]))
					i2++;
				continue;
			}
			if (l1[i1++] != l2[i2++])
				return 0;
		}
	} else if (flags & XDF_IGNORE_WHITESPACE_AT_EOL) {
		while (i1 < s1 && i2 < s2 && l1[i1] == l2[i2]) {
			i1++;
			i2++;
		}
	}

	/*
	 * After running out of one side, the remaining side must have
	 * nothing but whitespace for the lines to match.  Note that
	 * ignore-whitespace-at-eol case may break out of the loop
	 * while there still are characters remaining on both lines.
	 */
	if (i1 < s1) {
		while (i1 < s1 && XDL_ISSPACE(l1[i1]))
			i1++;
		if (s1 != i1)
			return 0;
	}
	if (i2 < s2) {
		while (i2 < s2 && XDL_ISSPACE(l2[i2]))
			i2++;
		return (s2 == i2);
	}
	return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %r13
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
pushq $0x1
popq %rbx
movq %rcx, 0x8(%rsp)
cmpq %rcx, %rsi
jne 0x3d3e
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x1100
testl %eax, %eax
je 0x3e49
xorl %eax, %eax
testb $0x1c, %r13b
je 0x3f76
testb $0x4, %r13b
movq %r15, 0x10(%rsp)
jne 0x3dbb
xorl %r15d, %r15d
testb $0x8, %r13b
jne 0x3e50
movl $0x0, %ebx
testb $0x10, %r13b
je 0x3ef1
xorl %eax, %eax
movq 0x8(%rsp), %rdx
testq %rdx, %rdx
movl $0x0, %ecx
cmovgq %rdx, %rcx
movq 0x10(%rsp), %rdx
testq %rdx, %rdx
movl $0x0, %r15d
cmovgq %rdx, %r15
cmpq %rax, %r15
je 0x3eee
cmpq %rax, %rcx
je 0x3ee6
movb (%r12,%rax), %dl
cmpb (%r14,%rax), %dl
jne 0x3eeb
incq %rax
jmp 0x3d96
xorl %ecx, %ecx
xorl %r13d, %r13d
movslq %ecx, %rbp
movq 0x10(%rsp), %rax
cmpq %rbp, %rax
movq %rbp, %r15
cmovgq %rax, %r15
cmpq %rbp, %r15
je 0x3df3
callq 0x1150
movq (%rax), %rax
movzbl (%r12,%rbp), %ecx
testb $0x20, 0x1(%rax,%rcx,2)
je 0x3df0
incq %rbp
jmp 0x3dd2
movq %rbp, %r15
movslq %r13d, %rbx
movq %rbx, %r13
cmpq 0x8(%rsp), %r13
jge 0x3e38
callq 0x1150
movq (%rax), %rax
movzbl (%r14,%r13), %edx
testb $0x20, 0x1(%rax,%rdx,2)
je 0x3e19
incq %r13
jmp 0x3df9
cmpq 0x10(%rsp), %rbp
jge 0x3f85
leaq 0x1(%r15), %rcx
incq %r13
xorl %eax, %eax
cmpb %dl, (%r12,%r15)
je 0x3dc0
jmp 0x3f76
movq 0x8(%rsp), %rax
cmpq %rbx, %rax
cmovgq %rax, %rbx
jmp 0x3ef1
movl %ebx, %eax
jmp 0x3f76
xorl %ebx, %ebx
movslq %r15d, %rbp
cmpq 0x10(%rsp), %rbp
jge 0x3ef1
movslq %ebx, %r13
cmpq 0x8(%rsp), %r13
jge 0x3ef1
callq 0x1150
movq (%rax), %rax
movzbl (%r12,%rbp), %ecx
testb $0x20, 0x1(%rax,%rcx,2)
movzbl (%r14,%r13), %edx
je 0x3e8e
testb $0x20, 0x1(%rax,%rdx,2)
jne 0x3e99
incl %r15d
incl %ebx
cmpb %dl, %cl
je 0x3e52
jmp 0x3edf
movq 0x10(%rsp), %rdx
cmpq %rbp, %rdx
je 0x3eb4
movzbl (%r12,%rbp), %ecx
testb $0x20, 0x1(%rax,%rcx,2)
je 0x3eb7
incq %rbp
jmp 0x3e9e
movq %rdx, %rbp
movl %ebp, %r15d
cmpq 0x8(%rsp), %r13
jge 0x3ed2
movzbl (%r14,%r13), %ecx
testb $0x20, 0x1(%rax,%rcx,2)
je 0x3ed7
incq %r13
jmp 0x3eba
movq 0x8(%rsp), %r13
movl %r13d, %ebx
jmp 0x3e52
xorl %eax, %eax
jmp 0x3f76
movq %rcx, %r15
jmp 0x3eee
movq %rax, %r15
movl %r15d, %ebx
movslq %r15d, %r15
cmpq 0x10(%rsp), %r15
jge 0x3f2b
cmpq %r15, 0x10(%rsp)
je 0x3f2b
callq 0x1150
movq (%rax), %rax
movzbl (%r12,%r15), %ecx
incq %r15
testb $0x20, 0x1(%rax,%rcx,2)
jne 0x3efb
movq 0x10(%rsp), %rcx
incq %rcx
movl $0x0, %eax
cmpq %r15, %rcx
jne 0x3f76
movslq %ebx, %rbx
pushq $0x1
popq %rax
cmpq 0x8(%rsp), %rbx
jge 0x3f76
movq 0x8(%rsp), %r15
negq %r15
decq %rbx
leaq (%r15,%rbx), %rax
cmpq $-0x1, %rax
je 0x3f67
callq 0x1150
movq (%rax), %rax
movzbl 0x1(%r14,%rbx), %ecx
incq %rbx
testb $0x20, 0x1(%rax,%rcx,2)
jne 0x3f43
jmp 0x3f6c
movq 0x8(%rsp), %rbx
xorl %eax, %eax
cmpq 0x8(%rsp), %rbx
sete %al
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %r13d, %ebx
jmp 0x3ef1