	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_use_pack                       ## -- Begin function use_pack
	.p2align	4, 0x90
_use_pack:                              ## @use_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r15
	movq	%rdx, %r13
	movq	%rsi, %r14
	movq	%rdi, %r12
	movq	(%rsi), %rbx
	cmpq	$0, (%rdi)
	jne	LBB0_4
## %bb.1:
	cmpl	$-1, 8(%r12)
	jne	LBB0_4
## %bb.2:
	movq	%r12, %rdi
	callq	_open_packed_git
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movl	28(%r12), %esi
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_die
LBB0_4:
	movq	(%r12), %rax
	movq	_the_hash_algo@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	subq	(%rcx), %rax
	cmpq	%r13, %rax
	jl	LBB0_5
## %bb.6:
	testq	%r13, %r13
	js	LBB0_7
LBB0_8:
	testq	%rbx, %rbx
	jne	LBB0_9
	jmp	LBB0_11
LBB0_5:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_die
	testq	%r13, %r13
	jns	LBB0_8
LBB0_7:
	leaq	L_.str.2(%rip), %rdi
	callq	__
	movslq	%eax, %rdi
	xorl	%eax, %eax
	callq	_die
	testq	%rbx, %rbx
	je	LBB0_11
LBB0_9:
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_in_window
	testq	%rax, %rax
	jne	LBB0_35
## %bb.10:
	decl	24(%rbx)
LBB0_11:
	movq	16(%r12), %rbx
	testq	%rbx, %rbx
	je	LBB0_15
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_in_window
	testq	%rax, %rax
	jne	LBB0_35
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	40(%rbx), %rbx
	testq	%rbx, %rbx
	jne	LBB0_13
LBB0_15:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	_packed_git_window_size@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %r14d
	shrl	$31, %r14d
	addl	%eax, %r14d
	sarl	%r14d
	movslq	%r14d, %r15
	cmpl	$-1, 8(%r12)
	jne	LBB0_18
## %bb.16:
	movq	%r12, %rdi
	callq	_open_packed_git
	testq	%rax, %rax
	je	LBB0_18
## %bb.17:
	movl	28(%r12), %esi
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_die
LBB0_18:
	movl	$1, %edi
	movl	$48, %esi
	callq	_xcalloc
	movq	%rax, %rbx
	movq	%r13, %rax
	orq	%r15, %rax
	shrq	$32, %rax
	je	LBB0_19
## %bb.20:
	movq	%r13, %rax
	xorl	%edx, %edx
	divq	%r15
	jmp	LBB0_21
LBB0_19:
	movl	%r13d, %eax
	xorl	%edx, %edx
	divl	%r14d
                                        ## kill: def $edx killed $edx def $rdx
LBB0_21:
	movq	%r13, %rax
	subq	%rdx, %rax
	movq	%rax, (%rbx)
	movq	(%r12), %rcx
	subq	%rax, %rcx
	movq	_packed_git_window_size@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpq	%rax, %rcx
	cmovgeq	%rax, %rcx
	movq	%rcx, 8(%rbx)
	movq	_pack_mapped@GOTPCREL(%rip), %r14
	addq	(%r14), %rcx
	movq	%rcx, (%r14)
	movq	_packed_git_limit@GOTPCREL(%rip), %r15
	cmpq	%rcx, (%r15)
	jge	LBB0_24
	.p2align	4, 0x90
LBB0_22:                                ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	callq	_unuse_one_window
	testq	%rax, %rax
	je	LBB0_24
## %bb.23:                              ##   in Loop: Header=BB0_22 Depth=1
	movq	(%r15), %rax
	cmpq	(%r14), %rax
	jl	LBB0_22
LBB0_24:
	movq	(%rbx), %r9
	movq	8(%rbx), %rsi
	movq	_PROT_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_MAP_PRIVATE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	8(%r12), %r8d
	xorl	%edi, %edi
	callq	_xmmap_gently
	movq	%rax, 16(%rbx)
	movq	_MAP_FAILED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_26
## %bb.25:
	movl	28(%r12), %esi
	leaq	L_.str.3(%rip), %rdi
	callq	_die_errno
LBB0_26:
	cmpq	$0, (%rbx)
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	jne	LBB0_30
## %bb.27:
	movq	8(%rbx), %rax
	cmpq	(%r12), %rax
	jne	LBB0_30
## %bb.28:
	cmpl	$0, 24(%r12)
	jne	LBB0_30
## %bb.29:
	movq	%r12, %rdi
	callq	_close_pack_fd
LBB0_30:
	movq	_pack_mmap_calls@GOTPCREL(%rip), %rax
	incl	(%rax)
	movq	_pack_open_windows@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rcx
	leaq	1(%rcx), %rax
	movq	%rax, (%rdx)
	movq	(%r14), %rdx
	movq	_peak_pack_mapped@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rdx
	jle	LBB0_32
## %bb.31:
	movq	%rdx, (%rsi)
LBB0_32:
	movq	_peak_pack_open_windows@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	jl	LBB0_34
## %bb.33:
	movq	%rax, (%rdx)
LBB0_34:
	movq	16(%r12), %rax
	movq	%rax, 40(%rbx)
	movq	%rbx, 16(%r12)
LBB0_35:
	cmpq	(%r14), %rbx
	je	LBB0_37
## %bb.36:
	movq	_pack_used_ctr@GOTPCREL(%rip), %rax
	movslq	(%rax), %rcx
	leal	1(%rcx), %edx
	movl	%edx, (%rax)
	movq	%rcx, 32(%rbx)
	incl	24(%rbx)
	movq	%rbx, (%r14)
LBB0_37:
	subq	(%rbx), %r13
	testq	%r15, %r15
	je	LBB0_39
## %bb.38:
	movq	8(%rbx), %r14
	movq	%r13, %rdi
	callq	_xsize_t
	subq	%rax, %r14
	movq	%r14, (%r15)
LBB0_39:
	addq	16(%rbx), %r13
	movq	%r13, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"packfile %s cannot be accessed"

	.comm	_the_hash_algo,8,3              ## @the_hash_algo
L_.str.1:                               ## @.str.1
	.asciz	"offset beyond end of packfile (truncated pack?)"

L_.str.2:                               ## @.str.2
	.asciz	"offset before end of packfile (broken .idx?)"

	.comm	_packed_git_window_size,4,2     ## @packed_git_window_size
	.comm	_pack_mapped,8,3                ## @pack_mapped
	.comm	_packed_git_limit,8,3           ## @packed_git_limit
	.comm	_PROT_READ,4,2                  ## @PROT_READ
	.comm	_MAP_PRIVATE,4,2                ## @MAP_PRIVATE
	.comm	_MAP_FAILED,8,3                 ## @MAP_FAILED
L_.str.3:                               ## @.str.3
	.asciz	"packfile %s cannot be mapped"

	.comm	_pack_mmap_calls,4,2            ## @pack_mmap_calls
	.comm	_pack_open_windows,8,3          ## @pack_open_windows
	.comm	_peak_pack_mapped,8,3           ## @peak_pack_mapped
	.comm	_peak_pack_open_windows,8,3     ## @peak_pack_open_windows
	.comm	_pack_used_ctr,4,2              ## @pack_used_ctr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_use_pack                       ; -- Begin function use_pack
	.p2align	2
_use_pack:                              ; @use_pack
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
	mov	x23, x0
	ldr	x22, [x1]
	ldr	x8, [x0]
	cbnz	x8, LBB0_4
; %bb.1:
	ldr	w8, [x23, #8]
	cmn	w8, #1
	b.ne	LBB0_4
; %bb.2:
	mov	x0, x23
	bl	_open_packed_git
	cbz	x0, LBB0_4
; %bb.3:
	ldr	w8, [x23, #28]
	str	x8, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_die
LBB0_4:
	ldr	x8, [x23]
Lloh2:
	adrp	x9, _the_hash_algo@GOTPAGE
Lloh3:
	ldr	x9, [x9, _the_hash_algo@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	ldr	x9, [x9]
	sub	x8, x8, x9
	cmp	x8, x20
	b.lt	LBB0_27
; %bb.5:
	tbnz	x20, #63, LBB0_28
LBB0_6:
	cbnz	x22, LBB0_29
LBB0_7:
	ldr	x22, [x23, #16]
	cbz	x22, LBB0_10
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	mov	x1, x20
	bl	_in_window
	cbnz	x0, LBB0_30
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	x22, [x22, #40]
	cbnz	x22, LBB0_8
LBB0_10:
Lloh5:
	adrp	x24, _packed_git_window_size@GOTPAGE
Lloh6:
	ldr	x24, [x24, _packed_git_window_size@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	w8, #0
	cinc	w8, w8, lt
	sbfx	x25, x8, #1, #31
	ldr	w8, [x23, #8]
	cmn	w8, #1
	b.ne	LBB0_13
; %bb.11:
	mov	x0, x23
	bl	_open_packed_git
	cbz	x0, LBB0_13
; %bb.12:
	ldr	w8, [x23, #28]
	str	x8, [sp]
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	bl	_die
LBB0_13:
	mov	w0, #1
	mov	w1, #48
	bl	_xcalloc
	mov	x22, x0
	udiv	x8, x20, x25
	mul	x8, x8, x25
	ldr	x9, [x23]
	ldrsw	x10, [x24]
	sub	x9, x9, x8
	cmp	x9, x10
	csel	x9, x9, x10, lt
	stp	x8, x9, [x0]
Lloh9:
	adrp	x24, _pack_mapped@GOTPAGE
Lloh10:
	ldr	x24, [x24, _pack_mapped@GOTPAGEOFF]
	ldr	x8, [x24]
Lloh11:
	adrp	x25, _packed_git_limit@GOTPAGE
Lloh12:
	ldr	x25, [x25, _packed_git_limit@GOTPAGEOFF]
	ldr	x10, [x25]
	add	x8, x8, x9
	cmp	x10, x8
	str	x8, [x24]
	b.ge	LBB0_16
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x23
	bl	_unuse_one_window
	cbz	x0, LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	ldr	x8, [x24]
	ldr	x9, [x25]
	cmp	x9, x8
	b.lt	LBB0_14
LBB0_16:
Lloh13:
	adrp	x8, _PROT_READ@GOTPAGE
Lloh14:
	ldr	x8, [x8, _PROT_READ@GOTPAGEOFF]
Lloh15:
	ldr	w2, [x8]
Lloh16:
	adrp	x8, _MAP_PRIVATE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _MAP_PRIVATE@GOTPAGEOFF]
Lloh18:
	ldr	w3, [x8]
	ldr	w4, [x23, #8]
	ldp	x5, x1, [x22]
	mov	x0, #0
	bl	_xmmap_gently
	str	x0, [x22, #16]
Lloh19:
	adrp	x8, _MAP_FAILED@GOTPAGE
Lloh20:
	ldr	x8, [x8, _MAP_FAILED@GOTPAGEOFF]
Lloh21:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_18
; %bb.17:
	ldr	w1, [x23, #28]
Lloh22:
	adrp	x0, l_.str.3@PAGE
Lloh23:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_die_errno
LBB0_18:
	ldr	x8, [x22]
	cbnz	x8, LBB0_22
; %bb.19:
	ldr	x8, [x22, #8]
	ldr	x9, [x23]
	cmp	x8, x9
	b.ne	LBB0_22
; %bb.20:
	ldr	w8, [x23, #24]
	cbnz	w8, LBB0_22
; %bb.21:
	mov	x0, x23
	bl	_close_pack_fd
LBB0_22:
Lloh24:
	adrp	x8, _pack_mmap_calls@GOTPAGE
Lloh25:
	ldr	x8, [x8, _pack_mmap_calls@GOTPAGEOFF]
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
Lloh26:
	adrp	x10, _pack_open_windows@GOTPAGE
Lloh27:
	ldr	x10, [x10, _pack_open_windows@GOTPAGEOFF]
	ldr	x9, [x10]
	add	x8, x9, #1
	str	x8, [x10]
	ldr	x10, [x24]
Lloh28:
	adrp	x11, _peak_pack_mapped@GOTPAGE
Lloh29:
	ldr	x11, [x11, _peak_pack_mapped@GOTPAGEOFF]
	ldr	x12, [x11]
	cmp	x10, x12
	b.le	LBB0_24
; %bb.23:
	str	x10, [x11]
LBB0_24:
Lloh30:
	adrp	x10, _peak_pack_open_windows@GOTPAGE
Lloh31:
	ldr	x10, [x10, _peak_pack_open_windows@GOTPAGEOFF]
	ldr	x11, [x10]
	cmp	x9, x11
	b.lt	LBB0_26
; %bb.25:
	str	x8, [x10]
LBB0_26:
	ldr	x8, [x23, #16]
	str	x8, [x22, #40]
	str	x22, [x23, #16]
	b	LBB0_30
LBB0_27:
Lloh32:
	adrp	x0, l_.str.1@PAGE
Lloh33:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_die
	tbz	x20, #63, LBB0_6
LBB0_28:
Lloh34:
	adrp	x0, l_.str.2@PAGE
Lloh35:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	__
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x0, w0
	bl	_die
	cbz	x22, LBB0_7
LBB0_29:
	mov	x0, x22
	mov	x1, x20
	bl	_in_window
	cbz	x0, LBB0_35
LBB0_30:
	ldr	x8, [x21]
	cmp	x22, x8
	b.eq	LBB0_32
; %bb.31:
Lloh36:
	adrp	x8, _pack_used_ctr@GOTPAGE
Lloh37:
	ldr	x8, [x8, _pack_used_ctr@GOTPAGEOFF]
	ldrsw	x9, [x8]
	add	w10, w9, #1
	str	w10, [x8]
	str	x9, [x22, #32]
	ldr	w8, [x22, #24]
	add	w8, w8, #1
	str	w8, [x22, #24]
	str	x22, [x21]
LBB0_32:
	ldr	x8, [x22]
	sub	x20, x20, x8
	cbz	x19, LBB0_34
; %bb.33:
	ldr	x21, [x22, #8]
	mov	x0, x20
	bl	_xsize_t
	sub	x8, x21, x0
	str	x8, [x19]
LBB0_34:
	ldr	x8, [x22, #16]
	add	x0, x8, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_35:
	ldr	w8, [x22, #24]
	sub	w8, w8, #1
	str	w8, [x22, #24]
	ldr	x22, [x23, #16]
	cbnz	x22, LBB0_8
	b	LBB0_10
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"packfile %s cannot be accessed"

	.comm	_the_hash_algo,8,3              ; @the_hash_algo
l_.str.1:                               ; @.str.1
	.asciz	"offset beyond end of packfile (truncated pack?)"

l_.str.2:                               ; @.str.2
	.asciz	"offset before end of packfile (broken .idx?)"

	.comm	_packed_git_window_size,4,2     ; @packed_git_window_size
	.comm	_pack_mapped,8,3                ; @pack_mapped
	.comm	_packed_git_limit,8,3           ; @packed_git_limit
	.comm	_PROT_READ,4,2                  ; @PROT_READ
	.comm	_MAP_PRIVATE,4,2                ; @MAP_PRIVATE
	.comm	_MAP_FAILED,8,3                 ; @MAP_FAILED
l_.str.3:                               ; @.str.3
	.asciz	"packfile %s cannot be mapped"

	.comm	_pack_mmap_calls,4,2            ; @pack_mmap_calls
	.comm	_pack_open_windows,8,3          ; @pack_open_windows
	.comm	_peak_pack_mapped,8,3           ; @peak_pack_mapped
	.comm	_peak_pack_open_windows,8,3     ; @peak_pack_open_windows
	.comm	_pack_used_ctr,4,2              ; @pack_used_ctr
.subsections_via_symbols
