	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function write_reused_pack
_write_reused_pack:                     ## @write_reused_pack
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	movl	$8216, %eax                     ## imm = 0x2018
	callq	____chkstk_darwin
	subq	%rax, %rsp
	popq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, -8256(%rbp)               ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_reuse_packfile@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	callq	_is_pack_valid
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	__
	movq	(%rbx), %rcx
	movl	8(%rcx), %esi
	movl	%eax, %edi
	callq	_die
LBB0_2:
	movq	(%rbx), %rax
	movl	8(%rax), %edi
	callq	_git_open
	movl	%eax, %r15d
	testl	%eax, %eax
	jns	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rdi
	callq	__
	movq	(%rbx), %rcx
	movl	8(%rcx), %esi
	movl	%eax, %edi
	xorl	%eax, %eax
	callq	_die_errno
LBB0_4:
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r15d, %edi
	movl	$4, %esi
	callq	_lseek
	cmpl	$-1, %eax
	jne	LBB0_6
## %bb.5:
	leaq	L_.str.2(%rip), %rdi
	callq	__
	movl	%eax, %edi
	xorl	%eax, %eax
	callq	_die_errno
LBB0_6:
	movq	_reuse_packfile_offset@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r12
	testq	%r12, %r12
	jns	LBB0_8
## %bb.7:
	movq	(%rbx), %rax
	movq	(%rax), %r12
	movq	_the_hash_algo@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	subq	(%rax), %r12
	movq	%r12, (%rcx)
LBB0_8:
	addl	$-4, %r12d
	je	LBB0_13
## %bb.9:
	cvtsi2sd	%r12d, %xmm0
	movsd	%xmm0, -8248(%rbp)              ## 8-byte Spill
	leaq	-8240(%rbp), %r13
	movl	%r12d, %r14d
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_10 Depth=1
	cmpl	%r14d, %ebx
	cmovgel	%r14d, %ebx
	movq	-8256(%rbp), %rdi               ## 8-byte Reload
	movq	%r13, %rsi
	movl	%ebx, %edx
	callq	_hashwrite
	subl	%ebx, %r14d
	movl	%r12d, %eax
	subl	%r14d, %eax
	xorps	%xmm0, %xmm0
	cvtsi2sd	%eax, %xmm0
	divsd	-8248(%rbp), %xmm0              ## 8-byte Folded Reload
	movq	_reuse_packfile_objects@GOTPCREL(%rip), %rax
	mulsd	(%rax), %xmm0
	movq	_written@GOTPCREL(%rip), %rax
	movsd	%xmm0, (%rax)
	movq	_progress_state@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_display_progress
	testl	%r14d, %r14d
	je	LBB0_13
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movl	%r15d, %edi
	movq	%r13, %rsi
	movl	$8192, %edx                     ## imm = 0x2000
	callq	_xread
	movl	%eax, %ebx
	testl	%eax, %eax
	jg	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	leaq	L_.str.3(%rip), %rdi
	callq	__
	movl	%eax, %edi
	xorl	%eax, %eax
	callq	_die_errno
	jmp	LBB0_12
LBB0_13:
	movl	%r15d, %edi
	callq	_close
	movq	_reuse_packfile_objects@GOTPCREL(%rip), %rax
	movsd	(%rax), %xmm0                   ## xmm0 = mem[0],zero
	movq	_written@GOTPCREL(%rip), %rax
	movsd	%xmm0, (%rax)
	movq	_progress_state@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_display_progress
	movq	_reuse_packfile_offset@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_15
## %bb.14:
	addl	$-4, %eax
	addq	$8216, %rsp                     ## imm = 0x2018
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_reuse_packfile,8,3             ## @reuse_packfile
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"packfile is invalid: %s"

L_.str.1:                               ## @.str.1
	.asciz	"unable to open packfile for reuse: %s"

	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
L_.str.2:                               ## @.str.2
	.asciz	"unable to seek in reused packfile"

	.comm	_reuse_packfile_offset,8,3      ## @reuse_packfile_offset
	.comm	_the_hash_algo,8,3              ## @the_hash_algo
L_.str.3:                               ## @.str.3
	.asciz	"unable to read from reused packfile"

	.comm	_reuse_packfile_objects,8,3     ## @reuse_packfile_objects
	.comm	_written,8,3                    ## @written
	.comm	_progress_state,4,2             ## @progress_state
	.no_dead_strip	_write_reused_pack
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function write_reused_pack
_write_reused_pack:                     ; @write_reused_pack
	.cfi_startproc
; %bb.0:
	stp	d9, d8, [sp, #-112]!            ; 16-byte Folded Spill
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	.cfi_offset b8, -104
	.cfi_offset b9, -112
	mov	w9, #8224
Lloh0:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh1:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	sub	sp, sp, #2, lsl #12             ; =8192
	sub	sp, sp, #32
	mov	x19, x0
Lloh2:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh3:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	stur	x8, [x29, #-112]
Lloh5:
	adrp	x21, _reuse_packfile@GOTPAGE
Lloh6:
	ldr	x21, [x21, _reuse_packfile@GOTPAGEOFF]
	ldr	x0, [x21]
	bl	_is_pack_valid
	cbnz	w0, LBB0_2
; %bb.1:
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	bl	__
	ldr	x8, [x21]
	ldr	w1, [x8, #8]
	bl	_die
LBB0_2:
	ldr	x8, [x21]
	ldr	w0, [x8, #8]
	bl	_git_open
	mov	x20, x0
	tbz	w0, #31, LBB0_4
; %bb.3:
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	__
	ldr	x8, [x21]
	ldr	w8, [x8, #8]
	str	x8, [sp]
	bl	_die_errno
LBB0_4:
Lloh11:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	mov	x0, x20
	mov	w1, #4
	bl	_lseek
	cmn	w0, #1
	b.ne	LBB0_6
; %bb.5:
Lloh14:
	adrp	x0, l_.str.2@PAGE
Lloh15:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	__
	bl	_die_errno
LBB0_6:
Lloh16:
	adrp	x23, _reuse_packfile_offset@GOTPAGE
Lloh17:
	ldr	x23, [x23, _reuse_packfile_offset@GOTPAGEOFF]
	ldr	x8, [x23]
	tbz	x8, #63, LBB0_8
; %bb.7:
	ldr	x8, [x21]
	ldr	x8, [x8]
Lloh18:
	adrp	x9, _the_hash_algo@GOTPAGE
Lloh19:
	ldr	x9, [x9, _the_hash_algo@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	ldr	x9, [x9]
	sub	x8, x8, x9
	str	x8, [x23]
LBB0_8:
Lloh21:
	adrp	x24, _reuse_packfile_objects@GOTPAGE
Lloh22:
	ldr	x24, [x24, _reuse_packfile_objects@GOTPAGEOFF]
Lloh23:
	adrp	x25, _written@GOTPAGE
Lloh24:
	ldr	x25, [x25, _written@GOTPAGEOFF]
Lloh25:
	adrp	x26, _progress_state@GOTPAGE
Lloh26:
	ldr	x26, [x26, _progress_state@GOTPAGEOFF]
	subs	w27, w8, #4
	b.eq	LBB0_13
; %bb.9:
	scvtf	d8, w27
Lloh27:
	adrp	x21, l_.str.3@PAGE
Lloh28:
	add	x21, x21, l_.str.3@PAGEOFF
	mov	x28, x27
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	cmp	w22, w28
	csel	w22, w22, w28, lt
	add	x1, sp, #16
	mov	x0, x19
	mov	x2, x22
	bl	_hashwrite
	ldr	d0, [x24]
	sub	w28, w28, w22
	sub	w8, w27, w28
	scvtf	d1, w8
	fdiv	d1, d1, d8
	fmul	d0, d1, d0
	str	d0, [x25]
	ldr	w0, [x26]
	bl	_display_progress
	cbz	w28, LBB0_13
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	add	x1, sp, #16
	mov	x0, x20
	mov	w2, #8192
	bl	_xread
	mov	x22, x0
	cmp	w0, #0
	b.gt	LBB0_10
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	x0, x21
	bl	__
	bl	_die_errno
	b	LBB0_10
LBB0_13:
	mov	x0, x20
	bl	_close
	ldr	d0, [x24]
	str	d0, [x25]
	ldr	w0, [x26]
	bl	_display_progress
	ldr	w8, [x23]
	ldur	x9, [x29, #-112]
Lloh29:
	adrp	x10, ___stack_chk_guard@GOTPAGE
Lloh30:
	ldr	x10, [x10, ___stack_chk_guard@GOTPAGEOFF]
Lloh31:
	ldr	x10, [x10]
	cmp	x10, x9
	b.ne	LBB0_15
; %bb.14:
	sub	w0, w8, #4
	add	sp, sp, #2, lsl #12             ; =8192
	add	sp, sp, #32
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp], #112              ; 16-byte Folded Reload
	ret
LBB0_15:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_reuse_packfile,8,3             ; @reuse_packfile
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"packfile is invalid: %s"

l_.str.1:                               ; @.str.1
	.asciz	"unable to open packfile for reuse: %s"

	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
l_.str.2:                               ; @.str.2
	.asciz	"unable to seek in reused packfile"

	.comm	_reuse_packfile_offset,8,3      ; @reuse_packfile_offset
	.comm	_the_hash_algo,8,3              ; @the_hash_algo
l_.str.3:                               ; @.str.3
	.asciz	"unable to read from reused packfile"

	.comm	_reuse_packfile_objects,8,3     ; @reuse_packfile_objects
	.comm	_written,8,3                    ; @written
	.comm	_progress_state,4,2             ; @progress_state
	.no_dead_strip	_write_reused_pack
.subsections_via_symbols
