// File: /workspace/github_c_makefile_star2_O3/LemonBoy[P]autobahn/xdiff/xdiffi.c
// Function: xdl_recs_cmp
int xdl_recs_cmp(diffdata_t *dd1, long off1, long lim1,
		 diffdata_t *dd2, long off2, long lim2,
		 long *kvdf, long *kvdb, int need_min, xdalgoenv_t *xenv) {
	unsigned long const *ha1 = dd1->ha, *ha2 = dd2->ha;

	/*
	 * Shrink the box by walking through each diagonal snake (SW and NE).
	 */
	for (; off1 < lim1 && off2 < lim2 && ha1[off1] == ha2[off2]; off1++, off2++);
	for (; off1 < lim1 && off2 < lim2 && ha1[lim1 - 1] == ha2[lim2 - 1]; lim1--, lim2--);

	/*
	 * If one dimension is empty, then all records on the other one must
	 * be obviously changed.
	 */
	if (off1 == lim1) {
		char *rchg2 = dd2->rchg;
		long *rindex2 = dd2->rindex;

		for (; off2 < lim2; off2++)
			rchg2[rindex2[off2]] = 1;
	} else if (off2 == lim2) {
		char *rchg1 = dd1->rchg;
		long *rindex1 = dd1->rindex;

		for (; off1 < lim1; off1++)
			rchg1[rindex1[off1]] = 1;
	} else {
		xdpsplit_t spl;
		spl.i1 = spl.i2 = 0;

		/*
		 * Divide ...
		 */
		if (xdl_split(ha1, off1, lim1, ha2, off2, lim2, kvdf, kvdb,
			      need_min, &spl, xenv) < 0) {

			return -1;
		}

		/*
		 * ... et Impera.
		 */
		if (xdl_recs_cmp(dd1, off1, spl.i1, dd2, off2, spl.i2,
				 kvdf, kvdb, spl.min_lo, xenv) < 0 ||
		    xdl_recs_cmp(dd1, spl.i1, lim1, dd2, spl.i2, lim2,
				 kvdf, kvdb, spl.min_hi, xenv) < 0) {

			return -1;
		}
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rdi, 0x28(%rsp)
movq 0x8(%rdi), %r14
movq %rcx, 0x18(%rsp)
movq 0x8(%rcx), %rdi
cmpq %rdx, %rsi
setge %al
cmpq %r9, %r8
setge %cl
orb %al, %cl
jne 0x13e9
movq (%r14,%rsi,8), %rax
cmpq (%rdi,%r8,8), %rax
jne 0x13e9
incq %rsi
incq %r8
cmpq %rdx, %rsi
jge 0x13e9
cmpq %r9, %r8
jl 0x13cf
cmpq %rdx, %rsi
setl %al
cmpq %r9, %r8
setl %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x1418
movq -0x8(%r14,%rdx,8), %rax
cmpq -0x8(%rdi,%r9,8), %rax
jne 0x1418
decq %rdx
decq %r9
cmpq %rdx, %rsi
jge 0x1418
cmpq %r9, %r8
jl 0x13fc
cmpq %rdx, %rsi
jne 0x144a
xorl %eax, %eax
cmpq %r9, %r8
jge 0x1bd4
movq 0x18(%rsp), %rdx
movq 0x10(%rdx), %rcx
movq 0x18(%rdx), %rdx
movq (%rcx,%r8,8), %rsi
movb $0x1, (%rdx,%rsi)
incq %r8
cmpq %r8, %r9
jne 0x1435
jmp 0x1bd4
cmpq %r9, %r8
jne 0x147d
xorl %eax, %eax
cmpq %rdx, %rsi
jge 0x1bd4
movq 0x28(%rsp), %rdi
movq 0x10(%rdi), %rcx
movq 0x18(%rdi), %r8
movq (%rcx,%rsi,8), %rdi
movb $0x1, (%r8,%rdi)
incq %rsi
cmpq %rsi, %rdx
jne 0x1467
jmp 0x1bd4
movq 0x118(%rsp), %r13
movq 0x108(%rsp), %r15
movq 0x100(%rsp), %rax
movq %rsi, %rcx
subq %r9, %rcx
movq %rcx, 0x88(%rsp)
movq %rdx, %rcx
subq %r8, %rcx
movq %rcx, 0x80(%rsp)
movq %rsi, %rbp
subq %r8, %rbp
movq %rdx, %r11
subq %r9, %r11
movq %rbp, %rcx
subq %r11, %rcx
movq %rcx, 0x90(%rsp)
movq %rsi, (%rax,%rbp,8)
movq %rdx, (%r15,%r11,8)
leaq (%rsi,%r8), %rax
movq %rax, 0x78(%rsp)
leaq (%rdx,%r9), %rax
movq %rax, 0x70(%rsp)
leaq -0x8(%rdi), %rax
movq %rax, 0xa8(%rsp)
movq %rdi, 0x68(%rsp)
leaq -0x10(%rdi), %rax
movq %rax, 0x98(%rsp)
leaq -0x10(%r14), %rax
movq %rax, 0xa0(%rsp)
movl $0x1, %eax
movq $0x0, 0x58(%rsp)
movq $0x0, 0x50(%rsp)
movq %rbp, %rcx
movq %rbp, 0xc0(%rsp)
movq %r11, %rbx
movq %r11, 0xb8(%rsp)
movq %r9, 0x48(%rsp)
movq %rdx, 0x40(%rsp)
movq %rax, 0x38(%rsp)
cmpq 0x88(%rsp), %rcx
jle 0x156a
movq 0x100(%rsp), %rax
movq $-0x1, -0x10(%rax,%rcx,8)
decq %rcx
jmp 0x156d
incq %rcx
movq %rbx, 0x8(%rsp)
cmpq 0x80(%rsp), %rbp
jge 0x1592
movq 0x100(%rsp), %rax
movq $-0x1, 0x10(%rax,%rbp,8)
incq %rbp
jmp 0x1595
decq %rbp
xorl %eax, %eax
movq %rcx, (%rsp)
movq %rbp, 0x30(%rsp)
cmpq %rcx, %rbp
jl 0x1692
movq 0x30(%rsp), %r12
movq %r12, %rdi
negq %rdi
leaq (,%r12,8), %rax
movq 0x68(%rsp), %rcx
subq %rax, %rcx
xorl %eax, %eax
movq 0x100(%rsp), %rbx
movq -0x8(%rbx,%r12,8), %r10
movq 0x8(%rbx,%r12,8), %rbx
leaq 0x1(%r10), %r15
cmpq %rbx, %r10
cmovlq %rbx, %r15
movq %r15, %rbx
subq %r12, %rbx
movq %r15, %rbp
cmpq %rdx, %r15
jge 0x1630
cmpq %r9, %rbx
jge 0x1630
movq %r15, %r13
movq (%r14,%r13,8), %r10
cmpq (%rcx,%r13,8), %r10
jne 0x1621
leaq 0x1(%r13), %rbp
cmpq %rdx, %rbp
jge 0x161b
leaq (%rdi,%r13), %r10
incq %r10
movq %rbp, %r13
cmpq %r9, %r10
jl 0x15f9
leaq (%rdi,%rbp), %rbx
jmp 0x1628
leaq (%rdi,%r13), %rbx
movq %r13, %rbp
movq 0x118(%rsp), %r13
movq %rbp, %r10
subq %r15, %r10
cmpq 0x8(%r13), %r10
movl $0x1, %r10d
cmovgl %r10d, %eax
movq 0x100(%rsp), %r10
movq %rbp, (%r10,%r12,8)
cmpq %r11, %r12
movq 0x108(%rsp), %r15
jg 0x167c
movq 0x90(%rsp), %r10
andl $0x1, %r10d
je 0x167c
cmpq %r12, 0x8(%rsp)
jg 0x167c
cmpq %rbp, (%r15,%r12,8)
jle 0x1b31
addq $-0x2, %r12
addq $0x2, %rdi
addq $0x10, %rcx
cmpq (%rsp), %r12
jge 0x15c6
movq 0x8(%rsp), %rbx
cmpq 0x88(%rsp), %rbx
jle 0x16b5
movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF
movq %rcx, -0x10(%r15,%rbx,8)
decq %rbx
jmp 0x16b8
incq %rbx
cmpq 0x80(%rsp), %r11
jge 0x16d6
movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF
movq %rcx, 0x10(%r15,%r11,8)
incq %r11
jmp 0x16d9
decq %r11
cmpq %rbx, %r11
movq %rbx, 0x8(%rsp)
movq %r11, 0x20(%rsp)
jge 0x16f5
movq 0x100(%rsp), %r11
jmp 0x17db
movq %r11, %rdi
negq %rdi
leaq (,%r11,8), %r10
movq 0xa8(%rsp), %rcx
subq %r10, %rcx
movq %r11, %r12
movq 0x100(%rsp), %r11
movq -0x8(%r15,%r12,8), %r10
movq 0x8(%r15,%r12,8), %rbx
leaq -0x1(%rbx), %r13
cmpq %rbx, %r10
cmovlq %r10, %r13
movq %r13, %rbx
subq %r12, %rbx
movq %r13, %rbp
cmpq %rsi, %r13
jle 0x177c
cmpq %r8, %rbx
jle 0x177c
movq %r13, %r15
movq -0x8(%r14,%r15,8), %r10
cmpq (%rcx,%r15,8), %r10
jne 0x176d
leaq -0x1(%r15), %rbp
cmpq %rsi, %rbp
jle 0x1767
leaq (%r15,%rdi), %r10
decq %r10
movq %rbp, %r15
cmpq %r8, %r10
jg 0x1744
leaq (%rdi,%rbp), %rbx
jmp 0x1774
leaq (%rdi,%r15), %rbx
movq %r15, %rbp
movq 0x108(%rsp), %r15
subq %rbp, %r13
movq 0x118(%rsp), %r10
cmpq 0x8(%r10), %r13
movq %r10, %r13
movl $0x1, %r10d
cmovgl %r10d, %eax
movq %rbp, (%r15,%r12,8)
cmpq 0x30(%rsp), %r12
jg 0x17c1
movq 0x90(%rsp), %r10
andl $0x1, %r10d
jne 0x17c1
cmpq %r12, (%rsp)
jg 0x17c1
cmpq (%r11,%r12,8), %rbp
jle 0x1b54
addq $-0x2, %r12
addq $0x2, %rdi
addq $0x10, %rcx
movq 0x8(%rsp), %rbx
cmpq %rbx, %r12
jge 0x1719
cmpl $0x0, 0x110(%rsp)
je 0x17fd
movq 0x20(%rsp), %r11
movq (%rsp), %rcx
movq 0x30(%rsp), %rbp
movq 0x38(%rsp), %rax
jmp 0x1b29
testl %eax, %eax
movq (%rsp), %rcx
movq 0x30(%rsp), %rbp
je 0x1824
movq 0x38(%rsp), %rax
cmpq 0x10(%r13), %rax
jle 0x182e
cmpq %rcx, %rbp
jge 0x1838
movq 0x20(%rsp), %r11
jmp 0x199a
movq 0x20(%rsp), %r11
jmp 0x1b1a
movq 0x20(%rsp), %r11
jmp 0x1b1f
leaq (,%rax,4), %rax
movq %rax, 0xb0(%rsp)
leaq (,%rbp,8), %rax
movq 0x98(%rsp), %rcx
subq %rax, %rcx
movq %rcx, 0x60(%rsp)
movq $0x0, 0x10(%rsp)
movq %rbp, %rax
movq 0xc0(%rsp), %rcx
subq %rcx, %rax
negq %rax
movq %rbp, %r10
subq %rcx, %r10
cmovgq %rax, %r10
movq (%r11,%rbp,8), %rcx
movq %rcx, %rdi
subq %rbp, %rdi
movq %rcx, %r12
subq 0x78(%rsp), %r12
addq %r10, %r12
addq %rdi, %r12
cmpq 0xb0(%rsp), %r12
setg %al
cmpq 0x10(%rsp), %r12
setg %r10b
andb %al, %r10b
cmpb $0x1, %r10b
jne 0x1968
cmpq %r9, %rdi
jge 0x1968
cmpq %rdx, %rcx
jge 0x1968
movq 0x8(%r13), %rax
leaq (%rax,%rsi), %r10
cmpq %rcx, %r10
jg 0x1968
leaq (%rax,%r8), %r10
cmpq %rdi, %r10
jg 0x1968
movq -0x8(%r14,%rcx,8), %r10
movq 0x68(%rsp), %rbx
cmpq -0x8(%rbx,%rdi,8), %r10
jne 0x1963
movq 0x60(%rsp), %r10
leaq (%r10,%rcx,8), %rbx
movq 0xa0(%rsp), %r10
leaq (%r10,%rcx,8), %r15
movl $0x1, %r10d
subq %rax, %r10
xorl %eax, %eax
cmpq %rax, %r10
je 0x194c
movq (%r15,%rax,8), %r11
leaq -0x1(%rax), %r13
cmpq (%rbx,%rax,8), %r11
movq 0x100(%rsp), %r11
movq 0x40(%rsp), %rdx
movq 0x48(%rsp), %r9
movq %r13, %rax
movq 0x118(%rsp), %r13
je 0x191a
jmp 0x195b
movq %rdi, 0x58(%rsp)
movq %rcx, 0x50(%rsp)
movq %r12, 0x10(%rsp)
movq 0x108(%rsp), %r15
movq 0x8(%rsp), %rbx
addq $-0x2, %rbp
addq $0x10, 0x60(%rsp)
movq (%rsp), %rcx
cmpq %rcx, %rbp
jge 0x1869
cmpq $0x0, 0x10(%rsp)
movq 0x20(%rsp), %r11
jg 0x1cf5
movq 0x30(%rsp), %rbp
movq 0x38(%rsp), %rax
cmpq %rbx, %r11
jl 0x1b1f
leaq (,%rax,4), %rax
movq %rax, 0x60(%rsp)
leaq (,%r11,8), %rax
movq 0x68(%rsp), %r13
subq %rax, %r13
movq $0x0, 0x10(%rsp)
movq %r11, %rbp
movq 0x100(%rsp), %r11
movq %rbp, %rax
movq 0xb8(%rsp), %rdi
subq %rdi, %rax
negq %rax
movq %rbp, %rcx
subq %rdi, %rcx
cmovgq %rax, %rcx
movq (%r15,%rbp,8), %rdi
cmpq %rsi, %rdi
jle 0x1ae7
movq %rdi, %rax
subq %rbp, %rax
addq 0x70(%rsp), %rcx
subq %rdi, %rcx
subq %rax, %rcx
cmpq 0x60(%rsp), %rcx
jle 0x1ae7
cmpq 0x10(%rsp), %rcx
jle 0x1ae7
movq 0x118(%rsp), %r10
movq 0x8(%r10), %r12
movq %rdx, %r10
subq %r12, %r10
cmpq %r10, %rdi
setg %bl
cmpq %r8, %rax
setle %r10b
movq %r9, %r11
subq %r12, %r11
cmpq %r11, %rax
setg %r11b
orb %bl, %r11b
orb %r10b, %r11b
je 0x1a6b
movq 0x48(%rsp), %r9
movq 0x40(%rsp), %rdx
movq 0x100(%rsp), %r11
jmp 0x1ae2
movq (%r14,%rdi,8), %r9
movq 0x68(%rsp), %rdx
cmpq (%rdx,%rax,8), %r9
movq 0x48(%rsp), %r9
movq 0x40(%rsp), %rdx
movq 0x100(%rsp), %r11
jne 0x1ae2
leaq (%r14,%rdi,8), %r10
leaq (,%rdi,8), %rbx
addq %r13, %rbx
movl $0x1, %r15d
cmpq %r15, %r12
je 0x1acb
movq (%r10,%r15,8), %r9
leaq 0x1(%r15), %r11
cmpq (%rbx,%r15,8), %r9
movq %r11, %r15
movq 0x100(%rsp), %r11
movq 0x40(%rsp), %rdx
movq 0x48(%rsp), %r9
je 0x1aa1
jmp 0x1ada
movq %rax, 0x58(%rsp)
movq %rdi, 0x50(%rsp)
movq %rcx, 0x10(%rsp)
movq 0x108(%rsp), %r15
movq 0x8(%rsp), %rbx
addq $-0x2, %rbp
addq $0x10, %r13
cmpq %rbx, %rbp
jge 0x19d4
cmpq $0x0, 0x10(%rsp)
movq 0x118(%rsp), %r13
movq 0x30(%rsp), %rbp
jg 0x1d12
movq 0x20(%rsp), %r11
movq (%rsp), %rcx
movq 0x38(%rsp), %rax
cmpq (%r13), %rax
jge 0x1be6
incq %rax
jmp 0x1545
movl $0x1, %eax
movq %rax, (%rsp)
movl $0x1, %r10d
movq 0x18(%rsp), %rcx
movq 0x28(%rsp), %rdi
movq 0x100(%rsp), %r11
jmp 0x1b6d
movl $0x1, %eax
movq %rax, (%rsp)
movl $0x1, %r10d
movq 0x18(%rsp), %rcx
movq 0x28(%rsp), %rdi
movq %rbp, %rdx
movq %rcx, %r15
movq %rbx, %r9
pushq %r13
pushq %r10
movq %rdi, %r14
movq 0x118(%rsp), %r12
pushq %r12
pushq %r11
movq %r11, %r12
callq 0x139c
addq $0x20, %rsp
testl %eax, %eax
js 0x1bcf
movq %r14, %rdi
movq %rbp, %rsi
movq 0x40(%rsp), %rdx
movq %r15, %rcx
movq %rbx, %r8
movq 0x48(%rsp), %r9
pushq %r13
pushq 0x8(%rsp)
pushq 0x118(%rsp)
pushq %r12
callq 0x139c
addq $0x20, %rsp
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
jns 0x1bd4
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq $-0x1, %rbx
movq %rbp, %r14
movq $-0x1, %rbp
cmpq %rcx, %r14
movq 0x100(%rsp), %r10
jl 0x1c49
movq %r14, %rax
negq %rax
movq $-0x1, %rcx
movq (%r10,%r14,8), %rdi
cmpq %rdx, %rdi
cmovgeq %rdx, %rdi
addq %rax, %rdi
cmpq %rdi, %r9
cmovlq %r9, %rdi
leaq (%r14,%rdi,2), %rbx
addq %r14, %rdi
cmpq %rbx, %rcx
cmovgq %rcx, %rbx
cmovlq %rdi, %rbp
addq $-0x2, %r14
addq $0x2, %rax
movq %rbx, %rcx
cmpq (%rsp), %r14
jge 0x1c11
cmpq 0x8(%rsp), %r11
movq 0x28(%rsp), %rdi
movabsq $0x7fffffffffffffff, %r14 # imm = 0x7FFFFFFFFFFFFFFF
jge 0x1c69
movq %r14, %rax
movq 0x18(%rsp), %rcx
jmp 0x1cb0
movq %r11, %r9
negq %r9
movq %r14, %rax
movq 0x18(%rsp), %rcx
movq 0x8(%rsp), %r10
movq (%r15,%r11,8), %rdx
cmpq %rsi, %rdx
cmovleq %rsi, %rdx
addq %r9, %rdx
cmpq %rdx, %r8
cmovgq %r8, %rdx
leaq (%r11,%rdx,2), %r12
addq %r11, %rdx
cmpq %rax, %r12
cmovlq %r12, %rax
cmovlq %rdx, %r14
addq $-0x2, %r11
addq $0x2, %r9
cmpq %r10, %r11
jge 0x1c7c
movq 0x70(%rsp), %r9
subq %rax, %r9
movq %rbx, %rdx
subq 0x78(%rsp), %rdx
cmpq %rdx, %r9
jge 0x1cdb
subq %rbp, %rbx
movl $0x1, %r10d
movq $0x0, (%rsp)
jmp 0x1b4a
subq %r14, %rax
xorl %r10d, %r10d
movl $0x1, %edx
movq %rdx, (%rsp)
movq %rax, %rbx
movq %r14, %rbp
jmp 0x1b4a
movl $0x1, %r10d
movq $0x0, (%rsp)
movq 0x58(%rsp), %rbx
movq 0x50(%rsp), %rbp
jmp 0x1b40
xorl %r10d, %r10d
movl $0x1, %eax
movq %rax, (%rsp)
movq 0x58(%rsp), %rbx
movq 0x50(%rsp), %rbp
jmp 0x1b63