// File: /workspace/github_c_makefile_star2_O3/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 %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
cmpq %rcx, %rsi
jne 0x4381
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x1100
testl %eax, %eax
je 0x4473
xorl %eax, %eax
testb $0x1c, %r13b
je 0x457f
testb $0x4, %r13b
jne 0x43e7
testb $0x8, %r13b
jne 0x447d
testb $0x10, %r13b
sete %al
testq %r15, %r15
setle %cl
orb %al, %cl
jne 0x4511
xorl %eax, %eax
testq %rbx, %rbx
movl $0x0, %esi
cmovgq %rbx, %rsi
cmpq %rax, %rsi
je 0x451e
movb (%r12,%rax), %cl
cmpb (%r14,%rax), %cl
jne 0x451b
incq %rax
cmpq %rax, %r15
jne 0x43c0
movq %r15, %rsi
jmp 0x451e
xorl %esi, %esi
xorl %ebp, %ebp
movslq %esi, %r13
cmpq %r15, %r13
jge 0x4413
callq 0x1150
movq (%rax), %rax
movzbl (%r12,%r13), %ecx
testb $0x20, 0x1(%rax,%rcx,2)
je 0x4417
incq %r13
cmpq %r15, %r13
jl 0x43fb
xorl %ecx, %ecx
jmp 0x4419
xorl %ecx, %ecx
jmp 0x441c
movb $0x1, %cl
movl %r13d, %esi
movl %ebp, %eax
movslq %ebp, %rbp
cmpq %rbx, %rbp
jge 0x458e
movl %ecx, 0xc(%rsp)
movq %rsi, 0x10(%rsp)
callq 0x1150
movq 0x10(%rsp), %rsi
movq (%rax), %rax
movzbl (%r14,%rbp), %ecx
testb $0x20, 0x1(%rax,%rcx,2)
je 0x4456
incq %rbp
cmpq %rbx, %rbp
jl 0x4440
jmp 0x446e
cmpb $0x0, 0xc(%rsp)
je 0x446e
incl %esi
incl %ebp
xorl %eax, %eax
cmpb %cl, (%r12,%r13)
je 0x43eb
jmp 0x457f
jmp 0x4520
movl $0x1, %eax
jmp 0x457f
testq %r15, %r15
setle %al
testq %rbx, %rbx
setle %cl
orb %al, %cl
jne 0x4511
callq 0x1150
movq (%rax), %rax
xorl %ecx, %ecx
xorl %edx, %edx
xorl %ebp, %ebp
xorl %esi, %esi
movzbl (%r12,%rdx), %edx
testb $0x20, 0x1(%rax,%rdx,2)
movzbl (%r14,%rcx), %ecx
je 0x44b9
testb $0x20, 0x1(%rax,%rcx,2)
jne 0x44d3
cmpb %cl, %dl
jne 0x4517
incl %esi
incl %ebp
movslq %esi, %rdx
cmpq %r15, %rdx
jge 0x4520
movslq %ebp, %rcx
cmpq %rbx, %rcx
jl 0x44a1
jmp 0x4520
movslq %esi, %rcx
cmpq %r15, %rcx
jge 0x44f1
movzbl (%r12,%rcx), %edx
testb $0x20, 0x1(%rax,%rdx,2)
je 0x44ef
incq %rcx
cmpq %r15, %rcx
jl 0x44db
movl %ecx, %esi
movslq %ebp, %rcx
cmpq %rbx, %rcx
jge 0x44c1
movzbl (%r14,%rcx), %edx
testb $0x20, 0x1(%rax,%rdx,2)
je 0x450d
incq %rcx
cmpq %rbx, %rcx
jl 0x44f9
movl %ecx, %ebp
jmp 0x44c1
xorl %esi, %esi
xorl %ebp, %ebp
jmp 0x4520
xorl %eax, %eax
jmp 0x457f
movq %rax, %rsi
movl %esi, %ebp
movslq %esi, %r13
cmpq %r15, %r13
jge 0x454e
callq 0x1150
movq (%rax), %rax
movzbl (%r12,%r13), %ecx
testb $0x20, 0x1(%rax,%rcx,2)
je 0x4544
incq %r13
cmpq %r15, %r13
jl 0x4530
movl $0x0, %eax
cmpq %r15, %r13
jne 0x457f
movslq %ebp, %r15
movl $0x1, %eax
cmpq %rbx, %r15
jge 0x457f
callq 0x1150
movq (%rax), %rax
movzbl (%r14,%r15), %ecx
testb $0x20, 0x1(%rax,%rcx,2)
je 0x4577
incq %r15
cmpq %rbx, %r15
jl 0x4563
xorl %eax, %eax
cmpq %rbx, %r15
sete %al
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %ebp
jmp 0x4520