// File: /workspace/github_c_makefile_star2_O3/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 $0x88, %rsp
movq %r9, 0x30(%rsp)
movl %r8d, 0x28(%rsp)
movl %ecx, %r15d
movq %rsi, 0x60(%rsp)
leal (%r15,%rdx), %eax
decl %eax
movq %rdx, 0x38(%rsp)
movl %eax, 0x24(%rsp)
cmpl %edx, %eax
movq %rdi, 0x18(%rsp)
jb 0x6253
addl 0x38(%rsp), %r15d
leaq 0x10(%rdi), %rax
movq %rax, 0x40(%rsp)
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
incq %rax
movq %rax, 0x10(%rsp)
movl 0x24(%rsp), %eax
movl %r15d, %r14d
movq 0x70(%rdi), %rcx
movq 0x60(%rcx), %rcx
addl $-0x2, %r14d
movq (%rcx,%r14,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 0x10(%rsp), %r12
andq %rsi, %r12
movq (%rbx,%r12,8), %r13
xorl %ebp, %ebp
testq %r13, %r13
je 0x61cf
movq 0x18(%rsp), %rcx
movq 0x70(%rcx), %rax
movq 0x78(%rcx), %rdi
movq 0x60(%rax), %rax
movl (%r13), %ecx
decl %ecx
movq (%rax,%rcx,8), %rsi
movq (%rax,%r14,8), %rdx
callq 0x65f5
testl %eax, %eax
jne 0x6211
incl %ebp
movq 0x8(%r13), %r13
jmp 0x619a
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
movq 0x18(%rsp), %rax
cmpl 0x5c(%rax), %ebp
je 0x65e0
movq 0x40(%rsp), %rdi
callq 0x4202
testq %rax, %rax
je 0x65e0
movq %rax, %r13
movl %r15d, (%rax)
movl $0x1, 0x4(%rax)
movq (%rbx,%r12,8), %rax
movq %rax, 0x8(%r13)
movq %r13, (%rbx,%r12,8)
jmp 0x622f
movl (%r13), %eax
movq 0x18(%rsp), %rsi
movq 0x48(%rsi), %rcx
movl %r15d, %edx
subl 0x64(%rsi), %edx
movl %eax, (%rcx,%rdx,4)
movl %r15d, (%r13)
incl 0x4(%r13)
movl %r15d, %eax
movq 0x18(%rsp), %rdx
subl 0x64(%rdx), %eax
movq 0x8(%rdx), %rcx
movq %r13, (%rcx,%rax,8)
movq %rdx, %rdi
leal -0x1(%r15), %eax
cmpl 0x38(%rsp), %eax
jae 0x6157
movl 0x5c(%rdi), %eax
incl %eax
movl %eax, 0x68(%rdi)
cmpl $0x0, 0x30(%rsp)
jle 0x65c8
movq 0x30(%rsp), %rax
movl 0x28(%rsp), %ecx
addl %ecx, %eax
movq %rax, 0x30(%rsp)
decl %eax
movq %rax, 0x40(%rsp)
movl 0x24(%rsp), %eax
movq %rax, 0x80(%rsp)
movl %ecx, %r12d
movq 0x70(%rdi), %rax
movq 0xe8(%rax), %rax
movslq %r12d, %rbx
movq -0x8(%rax,%rbx,8), %rax
movq 0x18(%rax), %rax
movb 0x50(%rdi), %cl
movq %rax, %rdx
shrq %cl, %rdx
leal 0x1(%r12), %ebp
movq (%rdi), %rsi
addq %rax, %rdx
movq $-0x1, %rax
shlq %cl, %rax
notq %rax
andq %rdx, %rax
movq (%rsi,%rax,8), %r15
testq %r15, %r15
je 0x65b3
leaq -0x1(%rbx), %rax
movq %rax, 0x50(%rsp)
movl %ebx, %ecx
decl %ebx
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
movq %rcx, 0x70(%rsp)
addq %rcx, %rax
movq %rax, 0x68(%rsp)
movl %ebp, 0xc(%rsp)
movq %r12, 0x48(%rsp)
movq %rbx, 0x78(%rsp)
movl %ebp, 0x2c(%rsp)
movl 0x4(%r15), %eax
cmpl 0x68(%rdi), %eax
jbe 0x6351
cmpl $0x0, 0x6c(%rdi)
jne 0x659d
movq 0x70(%rdi), %rax
movq %rdi, %r14
movq 0x78(%rdi), %rdi
movl (%r15), %ecx
decl %ecx
movq 0x60(%rax), %rdx
movq 0xe8(%rax), %rax
movq (%rdx,%rcx,8), %rsi
movq 0x50(%rsp), %rcx
movq (%rax,%rcx,8), %rdx
callq 0x65f5
movq %r14, %rdi
movl %eax, 0x6c(%r14)
jmp 0x659d
movl (%r15), %r14d
movq 0x70(%rdi), %rax
movq %rdi, %r13
movq 0x78(%rdi), %rdi
leal -0x1(%r14), %ecx
movq 0x60(%rax), %rdx
movq 0xe8(%rax), %rax
movq (%rdx,%rcx,8), %rsi
movq 0x50(%rsp), %rcx
movq (%rax,%rcx,8), %rdx
callq 0x65f5
testl %eax, %eax
je 0x659a
movl $0x1, 0x6c(%r13)
movq %r15, 0x58(%rsp)
movq %r13, %rdi
movl %r14d, %eax
subl 0x64(%rdi), %eax
movq 0x48(%rdi), %rcx
movl (%rcx,%rax,4), %ebp
movl 0x4(%r15), %r13d
cmpl 0x28(%rsp), %r12d
jbe 0x6466
cmpl 0x38(%rsp), %r14d
jbe 0x6466
movl %r13d, 0x10(%rsp)
movl %r14d, %r15d
leal -0x1(%r14), %ebx
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
addq %rax, %r15
xorl %r13d, %r13d
movq 0x68(%rsp), %r12
movq 0x18(%rsp), %rcx
movq 0x70(%rcx), %rax
movq 0x78(%rcx), %rdi
movl %r15d, %ecx
movq 0x60(%rax), %rdx
movq 0xe8(%rax), %rax
movq (%rdx,%rcx,8), %rsi
movl %r12d, %ecx
movq (%rax,%rcx,8), %rdx
callq 0x65f5
testl %eax, %eax
je 0x6470
leal (%rbx,%r13), %eax
movl 0x10(%rsp), %edi
cmpl $0x2, %edi
jb 0x6435
movq 0x18(%rsp), %rsi
movq 0x8(%rsi), %rcx
movl %eax, %edx
subl 0x64(%rsi), %edx
movq (%rcx,%rdx,8), %rcx
movl 0x4(%rcx), %ecx
cmpl %ecx, %edi
cmovael %ecx, %edi
movl %edi, 0x10(%rsp)
leal -0x1(%r13), %ecx
cmpl 0x38(%rsp), %eax
jbe 0x6454
addl 0x78(%rsp), %r13d
decq %r15
decq %r12
cmpl 0x28(%rsp), %r13d
movl %ecx, %r13d
ja 0x63db
leal (%r14,%rcx), %eax
movl %eax, 0x8(%rsp)
movq 0x48(%rsp), %r12
addl %r12d, %ecx
jmp 0x6483
movl %r14d, 0x8(%rsp)
movl %r12d, %ecx
jmp 0x648d
leal (%r14,%r13), %eax
movl %eax, 0x8(%rsp)
movq 0x48(%rsp), %r12
addl %r12d, %r13d
movl %r13d, %ecx
movq 0x18(%rsp), %rdi
movl 0x10(%rsp), %r13d
cmpl %r12d, 0x40(%rsp)
movq %rcx, 0x10(%rsp)
jbe 0x6517
cmpl 0x24(%rsp), %r14d
jae 0x6517
movl %r14d, %r12d
incq %r12
movq 0x70(%rsp), %r15
movq 0x70(%rdi), %rax
movq %rdi, %rbx
movq 0x78(%rdi), %rdi
movq 0x60(%rax), %rcx
movq 0xe8(%rax), %rax
movq -0x8(%rcx,%r12,8), %rsi
movq (%rax,%r15,8), %rdx
callq 0x65f5
testl %eax, %eax
je 0x6520
cmpl $0x2, %r13d
jb 0x64f8
movq %rbx, %rdi
movq 0x8(%rbx), %rax
movl %r14d, %ecx
subl 0x64(%rbx), %ecx
incl %ecx
movq (%rax,%rcx,8), %rax
movl 0x4(%rax), %eax
cmpl %eax, %r13d
cmovael %eax, %r13d
jmp 0x64fb
movq %rbx, %rdi
incq %r15
incl %r14d
cmpq 0x80(%rsp), %r12
jae 0x6523
incq %r12
cmpq 0x40(%rsp), %r15
jb 0x64ab
jmp 0x6523
movl 0x2c(%rsp), %eax
movl %r12d, %r15d
jmp 0x652c
movq %rbx, %rdi
leal 0x1(%r15), %eax
movq 0x48(%rsp), %r12
movl 0xc(%rsp), %ecx
cmpl %r15d, %ecx
cmovbel %eax, %ecx
movl %ecx, 0xc(%rsp)
movq 0x60(%rsp), %rcx
movl 0x4(%rcx), %eax
subl (%rcx), %eax
movl %r14d, %ecx
subl 0x8(%rsp), %ecx
cmpl %ecx, %eax
jb 0x6555
cmpl 0x68(%rdi), %r13d
jae 0x6574
movq 0x60(%rsp), %rax
movl 0x8(%rsp), %ecx
movl %ecx, (%rax)
movq 0x10(%rsp), %rcx
movl %ecx, 0x8(%rax)
movl %r14d, 0x4(%rax)
movl %r15d, 0xc(%rax)
movl %r13d, 0x68(%rdi)
testl %ebp, %ebp
je 0x65ac
movq 0x58(%rsp), %r15
cmpl %r14d, %ebp
ja 0x6592
movq 0x48(%rdi), %rax
subl 0x64(%rdi), %ebp
movl (%rax,%rbp,4), %ebp
testl %ebp, %ebp
jne 0x657d
jmp 0x659d
movl %ebp, %r14d
jmp 0x6398
movq %r13, %rdi
movq 0x8(%r15), %r15
testq %r15, %r15
jne 0x6305
jmp 0x65b7
movq 0x58(%rsp), %r15
jmp 0x659d
movl %ebp, 0xc(%rsp)
movl 0xc(%rsp), %eax
movl %eax, %r12d
cmpl 0x30(%rsp), %eax
jl 0x628c
cmpl $0x0, 0x6c(%rdi)
je 0x65dd
movl 0x5c(%rdi), %eax
xorl %r14d, %r14d
cmpl 0x68(%rdi), %eax
setb %r14b
jmp 0x65e0
xorl %r14d, %r14d
movl %r14d, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq