	.file	"extr_blame.c_find_best_line_matches.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	find_best_line_matches, @function
find_best_line_matches:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movsx	rax, ecx
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, r8
	lea	r8, 0[0+rax*4]
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rax
	sub	rsp, 88
	.cfi_def_cfa_offset 144
	mov	QWORD PTR 48[rsp], rax
	mov	rax, QWORD PTR 152[rsp]
	mov	DWORD PTR 36[rsp], edi
	mov	edi, DWORD PTR CERTAINTY_NOT_CALCULATED[rip]
	add	rax, r8
	mov	QWORD PTR 40[rsp], rax
	cmp	DWORD PTR [rax], edi
	je	.L15
	add	rsp, 88
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L15:
	.cfi_restore_state
	mov	ebp, esi
	mov	rsi, QWORD PTR 184[rsp]
	lea	edi, [rbx+rdx]
	mov	QWORD PTR 16[rsp], r9
	mov	QWORD PTR 8[rsp], r8
	call	map_line_number@PLT
	mov	edi, DWORD PTR 176[rsp]
	sub	eax, DWORD PTR 36[rsp]
	mov	edx, 0
	mov	r15d, eax
	mov	r8, QWORD PTR 8[rsp]
	mov	r9, QWORD PTR 16[rsp]
	sub	eax, DWORD PTR 176[rsp]
	lea	esi, 1[r15+rdi]
	mov	rcx, QWORD PTR 168[rsp]
	cmovs	eax, edx
	cmp	esi, ebp
	cmovg	esi, ebp
	add	rcx, r8
	mov	QWORD PTR 72[rsp], rcx
	cmp	esi, eax
	jle	.L7
	mov	r14d, eax
	cdqe
	sub	esi, r15d
	mov	DWORD PTR 32[rsp], 0
	sub	r14d, r15d
	lea	r12, [r12+rax*4]
	lea	rax, [r9+r8]
	mov	DWORD PTR 28[rsp], esi
	mov	r13d, r14d
	mov	QWORD PTR 64[rsp], rax
	xor	ebp, ebp
	mov	r14d, r15d
	mov	DWORD PTR 16[rsp], 0
	mov	DWORD PTR 8[rsp], 0
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L18:
	cmp	eax, DWORD PTR 8[rsp]
	jle	.L5
	mov	DWORD PTR 32[rsp], r15d
	mov	DWORD PTR 8[rsp], eax
.L5:
	add	r13d, 1
	add	r12, 4
	cmp	r13d, DWORD PTR 28[rsp]
	je	.L16
.L6:
	mov	r8d, DWORD PTR 176[rsp]
	mov	rdi, QWORD PTR 144[rsp]
	mov	edx, ebx
	mov	ecx, r14d
	lea	r15d, 0[r13+r14]
	mov	esi, r15d
	call	get_similarity@PLT
	mov	rdx, rax
	mov	eax, DWORD PTR [rax]
	cmp	eax, -1
	je	.L17
.L4:
	cmp	eax, ebp
	jle	.L18
	mov	ecx, DWORD PTR 16[rsp]
	mov	DWORD PTR 8[rsp], ebp
	add	r13d, 1
	mov	ebp, eax
	mov	DWORD PTR 16[rsp], r15d
	add	r12, 4
	mov	DWORD PTR 32[rsp], ecx
	cmp	r13d, DWORD PTR 28[rsp]
	jne	.L6
.L16:
	test	ebp, ebp
	je	.L7
	mov	rax, QWORD PTR 40[rsp]
	add	ebp, ebp
	sub	ebp, DWORD PTR 8[rsp]
	mov	ebx, DWORD PTR 36[rsp]
	mov	rcx, QWORD PTR 72[rsp]
	mov	DWORD PTR [rax], ebp
	mov	eax, DWORD PTR 16[rsp]
	mov	edi, DWORD PTR 32[rsp]
	add	eax, ebx
	mov	DWORD PTR [rcx], eax
	add	edi, ebx
	mov	rax, QWORD PTR 160[rsp]
	mov	rbx, QWORD PTR 48[rsp]
	mov	DWORD PTR [rax+rbx*4], edi
	add	rsp, 88
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L17:
	.cfi_restore_state
	lea	eax, 999[r13]
	xor	edi, edi
	mov	QWORD PTR 56[rsp], rdx
	cmp	eax, 1998
	setbe	dil
	call	assert@PLT
	mov	rdi, QWORD PTR 64[rsp]
	mov	rsi, r12
	call	fingerprint_similarity@PLT
	mov	esi, r13d
	mov	rdx, QWORD PTR 56[rsp]
	sar	esi, 31
	mov	r8d, eax
	mov	eax, esi
	xor	eax, r13d
	sub	esi, eax
	lea	eax, 1000[rsi]
	imul	eax, r8d
	mov	DWORD PTR [rdx], eax
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L7:
	mov	eax, DWORD PTR CERTAIN_NOTHING_MATCHES[rip]
	mov	rbx, QWORD PTR 40[rsp]
	mov	DWORD PTR [rbx], eax
	mov	rax, QWORD PTR 72[rsp]
	mov	DWORD PTR [rax], -1
	add	rsp, 88
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	find_best_line_matches, .-find_best_line_matches
	.comm	CERTAIN_NOTHING_MATCHES,4,4
	.comm	CERTAINTY_NOT_CALCULATED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_blame.c_find_best_line_matches.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	find_best_line_matches, %function
find_best_line_matches:
	@ args = 32, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r5, r3
	sub	sp, sp, #36
	ldr	r3, .L19
	ldr	ip, [sp, #84]
	ldr	r3, [r3]
	ldr	ip, [ip, r5, lsl #2]
	ldr	r10, [sp, #80]
	cmp	ip, r3
	str	r0, [sp, #16]
	beq	.L15
	add	sp, sp, #36
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L15:
	mov	r4, r1
	add	r0, r5, r2
	ldr	r1, [sp, #100]
	bl	map_line_number
	ldr	r3, [sp, #16]
	sub	fp, r0, r3
	ldr	r3, [sp, #96]
	add	r1, fp, r3
	add	r1, r1, #1
	cmp	r1, r4
	movge	r1, r4
	sub	r4, fp, r3
	bic	r4, r4, r4, asr #31
	cmp	r1, r4
	ble	.L7
	mov	r9, #0
	sub	r3, r1, fp
	str	r3, [sp, #12]
	ldr	r3, [sp, #76]
	lsl	r6, r5, #2
	add	r3, r3, r6
	str	r3, [sp, #28]
	ldr	r3, [sp, #72]
	mov	r7, r9
	add	r3, r3, fp, lsl #2
	mov	r8, r9
	str	r9, [sp, #8]
	sub	r4, r4, fp
	str	r3, [sp, #24]
	b	.L6
.L18:
	ldr	r3, [sp, #12]
	cmp	r0, r7
	add	r4, r4, #1
	movgt	r9, r6
	movgt	r7, r0
	cmp	r3, r4
	beq	.L16
.L6:
	ldr	r3, [sp, #96]
	add	r6, r4, fp
	mov	r2, r5
	str	r3, [sp]
	mov	r1, r6
	mov	r3, fp
	mov	r0, r10
	bl	get_similarity
	mov	r2, r0
	ldr	r0, [r0]
	cmn	r0, #1
	beq	.L17
.L4:
	cmp	r0, r8
	ble	.L18
	ldr	r3, [sp, #12]
	add	r4, r4, #1
	cmp	r3, r4
	mov	r7, r8
	ldr	r9, [sp, #8]
	mov	r8, r0
	str	r6, [sp, #8]
	bne	.L6
.L16:
	cmp	r8, #0
	beq	.L7
	ldr	r3, [sp, #16]
	ldr	r2, [sp, #8]
	add	r9, r9, r3
	add	fp, r2, r3
	ldr	r3, [sp, #84]
	rsb	r7, r7, r8, lsl #1
	str	r7, [r3, r5, lsl #2]
	ldr	r3, [sp, #92]
	str	fp, [r3, r5, lsl #2]
	ldr	r3, [sp, #88]
	str	r9, [r3, r5, lsl #2]
	add	sp, sp, #36
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L17:
	ldr	r3, .L19+4
	add	r0, r4, #996
	add	r0, r0, #3
	cmp	r0, r3
	movhi	r0, #0
	movls	r0, #1
	str	r2, [sp, #20]
	bl	assert
	ldr	r3, [sp, #24]
	ldr	r0, [sp, #28]
	add	r1, r3, r4, lsl #2
	bl	fingerprint_similarity
	eor	r1, r4, r4, asr #31
	sub	r1, r1, r4, asr #31
	rsb	r1, r1, #1000
	mul	r0, r1, r0
	ldr	r2, [sp, #20]
	str	r0, [r2]
	b	.L4
.L7:
	mvn	r3, #0
	ldr	r2, .L19+8
	ldr	r1, [sp, #84]
	ldr	r2, [r2]
	str	r2, [r1, r5, lsl #2]
	ldr	r2, [sp, #92]
	str	r3, [r2, r5, lsl #2]
	add	sp, sp, #36
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L20:
	.align	2
.L19:
	.word	CERTAINTY_NOT_CALCULATED
	.word	1998
	.word	CERTAIN_NOTHING_MATCHES
	.size	find_best_line_matches, .-find_best_line_matches
	.comm	CERTAIN_NOTHING_MATCHES,4,4
	.comm	CERTAINTY_NOT_CALCULATED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
