// File: /workspace/github_c_makefile_star2_O1/LemonBoy[P]autobahn/xdiff/xhistogram.c
// Function: find_lcs
static int find_lcs(struct histindex *index, struct region *lcs,
	int line1, int count1, int line2, int count2) {
	int b_ptr;

	if (scanA(index, line1, count1))
		return -1;

	index->cnt = index->max_chain_length + 1;

	for (b_ptr = line2; b_ptr <= LINE_END(2); )
		b_ptr = try_lcs(index, lcs, b_ptr, line1, count1, line2, count2);

	return index->has_common && index->max_chain_length < index->cnt;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movl %r9d, 0x10(%rsp)
movq %r8, 0x38(%rsp)
movq %rsi, 0x50(%rsp)
movq %rcx, 0x18(%rsp)
leal (%rcx,%rdx), %eax
decl %eax
movq %rdx, 0x20(%rsp)
cmpl %edx, %eax
movq %rdi, (%rsp)
jb 0x64f9
movq 0x20(%rsp), %rcx
movq 0x18(%rsp), %rdx
leal (%rdx,%rcx), %r15d
leaq 0x10(%rdi), %rcx
movq %rcx, 0x28(%rsp)
movl $0xfffffffe, %ecx       # imm = 0xFFFFFFFE
incq %rcx
movq %rcx, 0x8(%rsp)
movl %r15d, %r13d
movq 0x70(%rdi), %rcx
movq 0x60(%rcx), %rcx
addl $-0x2, %r13d
movq (%rcx,%r13,8), %rcx
movq 0x18(%rcx), %rdx
movb 0x50(%rdi), %cl
movq %rdx, %rsi
shrq %cl, %rsi
movl %eax, %r15d
addq %rdx, %rsi
movq (%rdi), %rbx
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
shrq %cl, %r12
shlq %cl, %r12
xorq 0x8(%rsp), %r12
andq %rsi, %r12
movq (%rbx,%r12,8), %rbp
xorl %r14d, %r14d
testq %rbp, %rbp
je 0x6480
movq 0x70(%rdi), %rax
movq 0x78(%rdi), %rdi
movq 0x60(%rax), %rax
movl (%rbp), %ecx
decl %ecx
movq (%rax,%rcx,8), %rsi
movq (%rax,%r13,8), %rdx
callq 0x68ac
testl %eax, %eax
jne 0x64c2
incl %r14d
movq 0x8(%rbp), %rbp
testq %rbp, %rbp
movq (%rsp), %rdi
jne 0x644e
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
cmpl 0x5c(%rdi), %r14d
je 0x689a
movq 0x28(%rsp), %rdi
callq 0x435a
testq %rax, %rax
je 0x689a
movq %rax, %rbp
movl %r15d, (%rax)
movl $0x1, 0x4(%rax)
movq (%rbx,%r12,8), %rax
movq %rax, 0x8(%rbp)
movq %rbp, (%rbx,%r12,8)
movq (%rsp), %rdi
jmp 0x64dd
movl (%rbp), %eax
movq (%rsp), %rdi
movq 0x48(%rdi), %rcx
movl %r15d, %edx
subl 0x64(%rdi), %edx
movl %eax, (%rcx,%rdx,4)
movl %r15d, (%rbp)
incl 0x4(%rbp)
movl %r15d, %eax
subl 0x64(%rdi), %eax
movq 0x8(%rdi), %rcx
movq %rbp, (%rcx,%rax,8)
leal -0x1(%r15), %eax
cmpl 0x20(%rsp), %eax
jae 0x6405
movl 0x5c(%rdi), %eax
incl %eax
movl %eax, 0x68(%rdi)
cmpl $0x0, 0x10(%rsp)
jle 0x6882
movl 0x10(%rsp), %ecx
movl %ecx, %eax
movq 0x38(%rsp), %rdx
addl %edx, %ecx
movl %ecx, 0x10(%rsp)
addl %edx, %eax
decl %eax
movq %rax, 0x28(%rsp)
movq 0x20(%rsp), %rax
movq 0x18(%rsp), %rcx
addl %ecx, %eax
decl %eax
movq %rax, 0x18(%rsp)
movl %edx, %r12d
movq 0x70(%rdi), %rax
movq 0xe8(%rax), %rax
movslq %r12d, %r8
movq -0x8(%rax,%r8,8), %rax
movq 0x18(%rax), %rax
movb 0x50(%rdi), %cl
movq %rax, %rdx
shrq %cl, %rdx
leal 0x1(%r12), %esi
movl %esi, 0x14(%rsp)
movq (%rdi), %rsi
addq %rax, %rdx
movq $-0x1, %rax
shlq %cl, %rax
notq %rax
andq %rdx, %rax
movq (%rsi,%rax,8), %r14
testq %r14, %r14
je 0x6871
leaq -0x1(%r8), %rax
movq %rax, 0x40(%rsp)
movl %r8d, %ecx
decl %r8d
movq %r8, 0x68(%rsp)
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
movq %rcx, 0x60(%rsp)
addq %rcx, %rax
movq %rax, 0x58(%rsp)
movq %r12, 0x30(%rsp)
movl 0x4(%r14), %eax
cmpl 0x68(%rdi), %eax
jbe 0x6600
cmpl $0x0, 0x6c(%rdi)
jne 0x6864
movq 0x70(%rdi), %rax
movq (%rsp), %rcx
movq 0x78(%rcx), %rdi
movl (%r14), %ecx
decl %ecx
movq 0x60(%rax), %rdx
movq 0xe8(%rax), %rax
movq (%rdx,%rcx,8), %rsi
movq 0x40(%rsp), %rcx
movq (%rax,%rcx,8), %rdx
callq 0x68ac
movq (%rsp), %rdi
movl %eax, 0x6c(%rdi)
jmp 0x6864
movl (%r14), %r13d
movq 0x70(%rdi), %rax
movq %rdi, %rbx
movq 0x78(%rdi), %rdi
leal -0x1(%r13), %ecx
movq 0x60(%rax), %rdx
movq 0xe8(%rax), %rax
movq (%rdx,%rcx,8), %rsi
movq 0x40(%rsp), %rcx
movq (%rax,%rcx,8), %rdx
callq 0x68ac
testl %eax, %eax
je 0x685a
movl $0x1, 0x6c(%rbx)
movq %rbx, %rdi
movq %r14, 0x48(%rsp)
movl %r13d, %eax
subl 0x64(%rdi), %eax
movq 0x48(%rdi), %rcx
movl (%rcx,%rax,4), %r15d
movl 0x4(%r14), %edx
cmpl 0x38(%rsp), %r12d
jbe 0x6719
cmpl 0x20(%rsp), %r13d
jbe 0x6719
movl %edx, 0x8(%rsp)
movl %r13d, %ebx
leal -0x1(%r13), %eax
movq %rax, 0x70(%rsp)
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
addq %rax, %rbx
xorl %r14d, %r14d
movq 0x58(%rsp), %r12
movq 0x70(%rdi), %rax
movq 0x78(%rdi), %rdi
movl %ebx, %ecx
movq 0x60(%rax), %rdx
movq 0xe8(%rax), %rax
movq (%rdx,%rcx,8), %rsi
movl %r12d, %ecx
movq (%rax,%rcx,8), %rdx
callq 0x68ac
testl %eax, %eax
je 0x6721
movq 0x70(%rsp), %rax
addl %r14d, %eax
movl 0x8(%rsp), %esi
cmpl $0x2, %esi
jb 0x66e7
movq (%rsp), %rdi
movq 0x8(%rdi), %rcx
movl %eax, %edx
subl 0x64(%rdi), %edx
movq (%rcx,%rdx,8), %rcx
movl 0x4(%rcx), %ecx
cmpl %ecx, %esi
cmovael %ecx, %esi
movl %esi, 0x8(%rsp)
jmp 0x66eb
movq (%rsp), %rdi
leal -0x1(%r14), %ebp
cmpl 0x20(%rsp), %eax
jbe 0x670a
addl 0x68(%rsp), %r14d
decq %rbx
decq %r12
cmpl 0x38(%rsp), %r14d
movl %ebp, %r14d
ja 0x668e
leal (%r13,%rbp), %r14d
movq 0x30(%rsp), %r12
addl %r12d, %ebp
jmp 0x6731
movl %r13d, %r14d
movl %r12d, %ebp
jmp 0x6735
movq 0x30(%rsp), %r12
leal (%r12,%r14), %ebp
addl %r13d, %r14d
movq (%rsp), %rdi
movl 0x8(%rsp), %edx
cmpl %r12d, 0x28(%rsp)
jbe 0x67cc
cmpl 0x18(%rsp), %r13d
jae 0x67cc
movl %edx, 0x8(%rsp)
movl %r13d, %r12d
incq %r12
movq 0x60(%rsp), %rbx
movq 0x70(%rdi), %rax
movq 0x78(%rdi), %rdi
movq 0x60(%rax), %rcx
movq 0xe8(%rax), %rax
movq -0x8(%rcx,%r12,8), %rsi
movq (%rax,%rbx,8), %rdx
callq 0x68ac
testl %eax, %eax
je 0x67d1
movl 0x8(%rsp), %esi
cmpl $0x2, %esi
jb 0x67aa
movq (%rsp), %rdi
movq 0x8(%rdi), %rax
movl 0x64(%rdi), %ecx
movl %r12d, %edx
subl %ecx, %edx
movq (%rax,%rdx,8), %rax
movl 0x4(%rax), %eax
cmpl %eax, %esi
cmovael %eax, %esi
movl %esi, 0x8(%rsp)
jmp 0x67ae
movq (%rsp), %rdi
incq %rbx
leaq 0x1(%r12), %r13
cmpq 0x18(%rsp), %r12
jae 0x67c7
movq %r13, %r12
cmpq 0x28(%rsp), %rbx
jb 0x675a
decq %r13
jmp 0x67db
movl %r12d, %ebx
jmp 0x67e4
decq %r12
movq %r12, %r13
movq (%rsp), %rdi
movl 0x8(%rsp), %edx
movq 0x30(%rsp), %r12
leal 0x1(%rbx), %eax
movl 0x14(%rsp), %ecx
cmpl %ebx, %ecx
cmovbel %eax, %ecx
movl %ecx, 0x14(%rsp)
movq 0x50(%rsp), %rcx
movl 0x4(%rcx), %eax
subl (%rcx), %eax
movl %r13d, %ecx
subl %r14d, %ecx
cmpl %ecx, %eax
jb 0x680d
cmpl 0x68(%rdi), %edx
jae 0x6822
movq 0x50(%rsp), %rax
movl %r14d, (%rax)
movl %ebp, 0x8(%rax)
movl %r13d, 0x4(%rax)
movl %ebx, 0xc(%rax)
movl %edx, 0x68(%rdi)
testl %r15d, %r15d
je 0x685f
movq 0x48(%rsp), %r14
movl %r15d, %eax
cmpl %r13d, %r15d
ja 0x684a
movq 0x48(%rdi), %rcx
movl %eax, %edx
subl 0x64(%rdi), %edx
movl (%rcx,%rdx,4), %r15d
testl %r15d, %r15d
jne 0x682c
xorl %ecx, %ecx
jmp 0x684c
movl %eax, %ecx
cmpl %r13d, %eax
movl %ecx, %r13d
ja 0x6646
jmp 0x6864
movq %rbx, %rdi
jmp 0x6864
movq 0x48(%rsp), %r14
movq 0x8(%r14), %r14
testq %r14, %r14
jne 0x65b3
movl 0x14(%rsp), %eax
movl %eax, %r12d
cmpl 0x10(%rsp), %eax
jl 0x653c
cmpl $0x0, 0x6c(%rdi)
je 0x6897
movl 0x5c(%rdi), %eax
xorl %r13d, %r13d
cmpl 0x68(%rdi), %eax
setb %r13b
jmp 0x689a
xorl %r13d, %r13d
movl %r13d, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq