// File: /workspace/github_c_makefile_star2_O1/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 $0x28, %rsp
movq %r8, %r13
movq %rsi, %r12
cmpq %rcx, %rsi
movq %rcx, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movq %rdi, 0x18(%rsp)
jne 0x44ff
movq %rdx, %rsi
movq %r12, %rdx
callq 0x10f0
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rdx
movq 0x8(%rsp), %rcx
testl %eax, %eax
je 0x4664
xorl %ebp, %ebp
testb $0x1c, %r13b
je 0x479c
testb $0x4, %r13b
jne 0x456c
testb $0x8, %r13b
jne 0x467a
testb $0x10, %r13b
sete %al
testq %r12, %r12
setle %sil
orb %al, %sil
jne 0x4725
xorl %r15d, %r15d
testq %rcx, %rcx
movl $0x0, %r13d
cmovgq %rcx, %r13
cmpq %r15, %r13
je 0x47ad
movb (%rdi,%r15), %al
cmpb (%rdx,%r15), %al
jne 0x47b5
incq %r15
cmpq %r15, %r12
jne 0x4542
movl %r12d, %r13d
movl %r12d, %r15d
jmp 0x472b
xorl %r13d, %r13d
xorl %r15d, %r15d
movq %r12, 0x20(%rsp)
movslq %r13d, %rbx
cmpq %r12, %rbx
setl %r14b
jge 0x45dc
callq 0x1140
movq 0x18(%rsp), %rdi
movq (%rax), %rax
movzbl (%rdi,%rbx), %ecx
testb $0x20, 0x1(%rax,%rcx,2)
jne 0x45a7
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %rdx
jmp 0x45dc
incq %rbx
movq %rbx, %rsi
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %rdx
movq %rsi, %rbx
cmpq %r12, %rsi
setl %r14b
jge 0x45d9
movzbl (%rdi,%rbx), %r8d
leaq 0x1(%rbx), %rsi
incl %r13d
testb $0x20, 0x1(%rax,%r8,2)
jne 0x45b7
jmp 0x45dc
incl %r13d
movslq %r15d, %rbp
cmpq %rcx, %rbp
setl %r12b
jge 0x4641
callq 0x1140
movq 0x10(%rsp), %rdx
movq (%rax), %rax
movzbl (%rdx,%rbp), %ecx
testb $0x20, 0x1(%rax,%rcx,2)
jne 0x460c
movq 0x8(%rsp), %rcx
movq 0x18(%rsp), %rdi
jmp 0x4641
incq %rbp
movq %rbp, %rsi
movq 0x8(%rsp), %rcx
movq 0x18(%rsp), %rdi
movq %rsi, %rbp
cmpq %rcx, %rsi
setl %r12b
jge 0x463e
movzbl (%rdx,%rbp), %r8d
leaq 0x1(%rbp), %rsi
incl %r15d
testb $0x20, 0x1(%rax,%r8,2)
jne 0x461c
jmp 0x4641
incl %r15d
testb %r12b, %r14b
je 0x466e
incl %r13d
movb (%rdi,%rbx), %al
incl %r15d
cmpb (%rdx,%rbp), %al
movq 0x20(%rsp), %r12
je 0x4577
xorl %ebp, %ebp
jmp 0x479c
movl $0x1, %ebp
jmp 0x479c
xorl %ebp, %ebp
movq 0x20(%rsp), %r12
jmp 0x472b
testq %r12, %r12
setle %al
testq %rcx, %rcx
setle %dl
orb %al, %dl
jne 0x4725
callq 0x1140
movq 0x18(%rsp), %r9
movq 0x10(%rsp), %r8
movq 0x8(%rsp), %rcx
movq (%rax), %rax
xorl %edi, %edi
xorl %edx, %edx
xorl %r15d, %r15d
xorl %r13d, %r13d
movzbl (%r9,%rdx), %edx
testb $0x20, 0x1(%rax,%rdx,2)
je 0x46c7
movzbl (%r8,%rdi), %esi
testb $0x20, 0x1(%rax,%rsi,2)
jne 0x46e5
cmpb (%r8,%rdi), %dl
jne 0x465d
incl %r13d
incl %r15d
movslq %r13d, %rdx
cmpq %r12, %rdx
jge 0x472b
movslq %r15d, %rdi
cmpq %rcx, %rdi
jl 0x46af
jmp 0x472b
movslq %r13d, %rsi
cmpq %r12, %rsi
jge 0x4704
movzbl (%r9,%rsi), %edx
testb $0x20, 0x1(%rax,%rdx,2)
je 0x4701
incq %rsi
cmpq %r12, %rsi
jl 0x46ed
movl %esi, %r13d
movslq %r15d, %rsi
cmpq %rcx, %rsi
jge 0x46d3
movzbl (%r8,%rsi), %edx
testb $0x20, 0x1(%rax,%rdx,2)
je 0x4720
incq %rsi
cmpq %rcx, %rsi
jl 0x470c
movl %esi, %r15d
jmp 0x46d3
xorl %r13d, %r13d
xorl %r15d, %r15d
movslq %r13d, %rbx
cmpq %r12, %rbx
jge 0x475f
jge 0x475a
callq 0x1140
movq 0x18(%rsp), %rsi
movq 0x8(%rsp), %rcx
movq (%rax), %rax
movzbl (%rsi,%rbx), %edx
testb $0x20, 0x1(%rax,%rdx,2)
je 0x475a
incq %rbx
cmpq %r12, %rbx
jl 0x4747
cmpq %r12, %rbx
jne 0x479c
movslq %r15d, %rbx
movl $0x1, %ebp
cmpq %rcx, %rbx
jge 0x479c
jge 0x4793
callq 0x1140
movq 0x10(%rsp), %rsi
movq 0x8(%rsp), %rcx
movq (%rax), %rax
movzbl (%rsi,%rbx), %edx
testb $0x20, 0x1(%rax,%rdx,2)
je 0x4793
incq %rbx
cmpq %rcx, %rbx
jl 0x4780
xorl %ebp, %ebp
cmpq %rcx, %rbx
sete %bpl
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %r13d, %r15d
jmp 0x472b
movl %r15d, %r13d
jmp 0x472b