	.file	"extr_pack.c_pack_entry_find_offset.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"found multiple offsets for pack entry"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"packfile index is corrupt"
	.section	.rodata.str1.8
	.align 8
.LC2:
	.string	"failed to find offset for pack entry"
	.text
	.p2align 4
	.type	pack_entry_find_offset, @function
pack_entry_find_offset:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, r8
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rcx
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdx
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdi
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	DWORD PTR [rdi], 0
	mov	eax, DWORD PTR [rdx]
	mov	QWORD PTR [rsp], rsi
	cmp	eax, -1
	je	.L20
.L2:
	mov	r15, QWORD PTR 16[rbp]
	mov	r12, r15
	cmp	eax, 1
	jle	.L4
	lea	r12, 8[r15]
	add	r15, 2
.L4:
	mov	rax, QWORD PTR 0[r13]
	movsx	rax, DWORD PTR [rax]
	movzx	edi, BYTE PTR [r15+rax]
	call	ntohl@PLT
	mov	r8, QWORD PTR 0[r13]
	xor	edx, edx
	mov	ecx, eax
	movsx	rax, DWORD PTR [r8]
	test	eax, eax
	jne	.L21
.L5:
	cmp	DWORD PTR 0[rbp], 1
	jle	.L6
	add	r12, 1024
	mov	r15d, 20
.L7:
	mov	esi, r15d
	mov	rdi, r12
	call	sha1_position@PLT
	mov	r8d, eax
	test	eax, eax
	js	.L8
	imul	eax, r15d
	add	r12, rax
.L9:
	cmp	QWORD PTR GIT_OID_HEXSZ[rip], r14
	je	.L11
	lea	eax, 1[r8]
	cmp	eax, DWORD PTR 8[rbp]
	jl	.L22
.L11:
	mov	esi, r8d
	mov	rdi, rbp
	call	nth_packed_object_offset@PLT
	test	eax, eax
	js	.L23
	mov	DWORD PTR [rbx], eax
	mov	rdi, QWORD PTR [rsp]
	mov	rsi, r12
	call	git_oid_fromraw@PLT
	xor	eax, eax
.L1:
	add	rsp, 24
	.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
.L8:
	.cfi_restore_state
	not	r8d
	cmp	r8d, DWORD PTR 8[rbp]
	jl	.L24
.L10:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rdx, r14
	mov	rsi, r13
	pop	rbx
	.cfi_def_cfa_offset 48
	lea	rdi, .LC2[rip]
	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
	jmp	git_odb__error_notfound@PLT
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	add	r12, 1028
	mov	r15d, 24
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L21:
	movzx	edi, BYTE PTR -1[r15+rax]
	mov	DWORD PTR 12[rsp], ecx
	call	ntohl@PLT
	mov	r8, QWORD PTR 0[r13]
	mov	ecx, DWORD PTR 12[rsp]
	mov	edx, eax
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L20:
	mov	rdi, rdx
	call	pack_index_open@PLT
	test	eax, eax
	js	.L1
	mov	rdi, QWORD PTR 16[rbp]
	call	assert@PLT
	mov	eax, DWORD PTR 0[rbp]
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L22:
	mov	esi, r15d
	mov	rdx, r14
	mov	rdi, r13
	mov	DWORD PTR 12[rsp], r8d
	add	rsi, r12
	call	git_oid_ncmp@PLT
	mov	r8d, DWORD PTR 12[rsp]
	test	eax, eax
	jne	.L11
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	lea	rdi, .LC0[rip]
	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
	jmp	git_odb__error_ambiguous@PLT
	.p2align 4,,10
	.p2align 3
.L24:
	.cfi_restore_state
	mov	eax, r8d
	mov	rdx, r14
	mov	rdi, r13
	mov	DWORD PTR 12[rsp], r8d
	imul	eax, r15d
	add	r12, rax
	mov	rsi, r12
	call	git_oid_ncmp@PLT
	mov	r8d, DWORD PTR 12[rsp]
	test	eax, eax
	jne	.L10
	jmp	.L9
.L23:
	mov	edi, DWORD PTR GIT_ERROR_ODB[rip]
	lea	rsi, .LC1[rip]
	call	git_error_set@PLT
	mov	eax, -1
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	pack_entry_find_offset, .-pack_entry_find_offset
	.comm	GIT_OID_HEXSZ,8,8
	.comm	GIT_ERROR_ODB,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_pack.c_pack_entry_find_offset.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"found multiple offsets for pack entry\000"
	.align	2
.LC1:
	.ascii	"packfile index is corrupt\000"
	.align	2
.LC2:
	.ascii	"failed to find offset for pack entry\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	pack_entry_find_offset, %function
pack_entry_find_offset:
	@ args = 4, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r8, r0
	mov	r0, #0
	str	r0, [r8]
	mov	r4, r2
	ldr	r2, [r2]
	sub	sp, sp, #12
	cmn	r2, #1
	mov	r9, r1
	mov	r7, r3
	ldr	r10, [sp, #48]
	beq	.L19
.L2:
	ldr	r3, [r7]
	ldr	fp, [r4, #8]
	cmp	r2, #1
	ldr	r3, [r3]
	addgt	r6, fp, #8
	addgt	fp, fp, #2
	ldrb	r0, [fp, r3]	@ zero_extendqisi2
	movle	r6, fp
	bl	ntohl
	ldr	r1, [r7]
	mov	r5, r0
	ldr	r2, [r1]
	cmp	r2, #0
	bne	.L20
.L5:
	ldr	r3, [r4]
	str	r1, [sp]
	cmp	r3, #1
	movgt	fp, #20
	movle	fp, #24
	addle	r6, r6, #1024
	addgt	r6, r6, #1024
	addle	r6, r6, #4
	mov	r3, r5
	mov	r1, fp
	mov	r0, r6
	bl	sha1_position
	subs	r5, r0, #0
	blt	.L8
	mla	r6, fp, r5, r6
.L9:
	ldr	r3, .L24
	ldr	r3, [r3]
	cmp	r3, r10
	beq	.L11
	ldr	r3, [r4, #4]
	add	r2, r5, #1
	cmp	r2, r3
	blt	.L21
.L11:
	mov	r1, r5
	mov	r0, r4
	bl	nth_packed_object_offset
	cmp	r0, #0
	blt	.L22
	str	r0, [r8]
	mov	r1, r6
	mov	r0, r9
	bl	git_oid_fromraw
	mov	r0, #0
.L1:
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L8:
	mvn	r5, r5
	ldr	r3, [r4, #4]
	cmp	r3, r5
	bgt	.L23
.L10:
	mov	r2, r10
	mov	r1, r7
	ldr	r0, .L24+4
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	git_odb__error_notfound
.L20:
	add	r2, fp, r2
	ldrb	r0, [r2, #-1]	@ zero_extendqisi2
	bl	ntohl
	ldr	r1, [r7]
	mov	r2, r0
	b	.L5
.L19:
	mov	r0, r4
	bl	pack_index_open
	cmp	r0, #0
	blt	.L1
	ldr	r0, [r4, #8]
	bl	assert
	ldr	r2, [r4]
	b	.L2
.L21:
	mov	r2, r10
	mov	r0, r7
	add	r1, r6, fp
	bl	git_oid_ncmp
	cmp	r0, #0
	bne	.L11
	ldr	r0, .L24+8
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	git_odb__error_ambiguous
.L23:
	mla	r6, fp, r5, r6
	mov	r2, r10
	mov	r1, r6
	mov	r0, r7
	bl	git_oid_ncmp
	cmp	r0, #0
	bne	.L10
	b	.L9
.L22:
	ldr	r3, .L24+12
	ldr	r1, .L24+16
	ldr	r0, [r3]
	bl	git_error_set
	mvn	r0, #0
	b	.L1
.L25:
	.align	2
.L24:
	.word	GIT_OID_HEXSZ
	.word	.LC2
	.word	.LC0
	.word	GIT_ERROR_ODB
	.word	.LC1
	.size	pack_entry_find_offset, .-pack_entry_find_offset
	.comm	GIT_OID_HEXSZ,4,4
	.comm	GIT_ERROR_ODB,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
