	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function files_pack_refs
_files_pack_refs:                       ## @files_pack_refs
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r13d
	movq	_REF_STORE_WRITE@GOTPCREL(%rip), %rax
	movq	_REF_STORE_ODB@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	callq	_files_downcast
	movq	%rax, %r12
	movq	$0, -64(%rbp)
	movq	_STRBUF_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	movl	(%r12), %edi
	leaq	-48(%rbp), %rsi
	callq	_ref_store_transaction_begin
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	movl	(%r12), %edi
	movq	_LOCK_DIE_ON_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdx
	callq	_packed_refs_lock
	movq	%r12, %rdi
	callq	_get_loose_ref_cache
	movl	%eax, %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_cache_ref_iterator_begin
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_ref_iterator_advance
	movq	_ITER_OK@GOTPCREL(%rip), %r14
	cmpl	(%r14), %eax
	jne	LBB0_7
## %bb.3:
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movq	_PACK_REFS_PRUNE@GOTPCREL(%rip), %r12
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_4 Depth=1
	testl	%r13d, (%r12)
	jne	LBB0_15
LBB0_5:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	%rbx, %rdi
	callq	_ref_iterator_advance
	cmpl	(%r14), %eax
	jne	LBB0_6
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %esi
	movl	4(%rbx), %edi
	movl	8(%rbx), %edx
	movl	%r13d, %ecx
	callq	_should_pack_ref
	testl	%eax, %eax
	je	LBB0_5
## %bb.12:                              ##   in Loop: Header=BB0_4 Depth=1
	movl	(%rbx), %edx
	movl	4(%rbx), %esi
	movq	_REF_NO_DEREF@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	leaq	-48(%rbp), %rax
	movq	%rax, (%rsp)
	movq	%r15, %rdi
	xorl	%ecx, %ecx
	xorl	%r9d, %r9d
	callq	_ref_transaction_update
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_4 Depth=1
	movl	4(%rbx), %esi
	movl	-48(%rbp), %edx
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_die
	jmp	LBB0_14
LBB0_1:
	movl	$-1, %eax
	jmp	LBB0_17
LBB0_6:
	movq	-56(%rbp), %r12                 ## 8-byte Reload
LBB0_7:
	movq	_ITER_DONE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_9
## %bb.8:
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_die
LBB0_9:
	leaq	-48(%rbp), %rsi
	movq	%r15, %rdi
	callq	_ref_transaction_commit
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movl	-48(%rbp), %esi
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_die
LBB0_11:
	movq	%r15, %rdi
	callq	_ref_transaction_free
	movl	(%r12), %edi
	callq	_packed_refs_unlock
	leaq	-64(%rbp), %rsi
	movq	%r12, %rdi
	callq	_prune_refs
	leaq	-48(%rbp), %rdi
	callq	_strbuf_release
LBB0_16:
	xorl	%eax, %eax
LBB0_17:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	movq	%rbx, %rdi
	addq	$4, %rdi
	movq	%rbx, %rsi
	callq	_files_pack_refs.cold.1
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.p2align	4, 0x90                         ## -- Begin function files_pack_refs.cold.1
_files_pack_refs.cold.1:                ## @files_pack_refs.cold.1
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rsi, %rbx
	movq	_name@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%rdi), %edx
	callq	_FLEX_ALLOC_STR
	movl	(%rbx), %esi
	callq	_oidcpy
	ud2
	.cfi_endproc
                                        ## -- End function
	.comm	_REF_STORE_WRITE,4,2            ## @REF_STORE_WRITE
	.comm	_REF_STORE_ODB,4,2              ## @REF_STORE_ODB
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pack_refs"

	.comm	_STRBUF_INIT,4,2                ## @STRBUF_INIT
	.comm	_LOCK_DIE_ON_ERROR,4,2          ## @LOCK_DIE_ON_ERROR
	.comm	_ITER_OK,4,2                    ## @ITER_OK
	.comm	_REF_NO_DEREF,4,2               ## @REF_NO_DEREF
L_.str.1:                               ## @.str.1
	.asciz	"failure preparing to create packed reference %s: %s"

	.comm	_PACK_REFS_PRUNE,4,2            ## @PACK_REFS_PRUNE
	.comm	_name,4,2                       ## @name
	.comm	_ITER_DONE,4,2                  ## @ITER_DONE
L_.str.2:                               ## @.str.2
	.asciz	"error while iterating over references"

L_.str.3:                               ## @.str.3
	.asciz	"unable to write new packed-refs: %s"

	.no_dead_strip	_files_pack_refs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function files_pack_refs
_files_pack_refs:                       ; @files_pack_refs
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	mov	x21, x1
Lloh0:
	adrp	x8, _REF_STORE_WRITE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _REF_STORE_WRITE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _REF_STORE_ODB@GOTPAGE
Lloh4:
	ldr	x9, [x9, _REF_STORE_ODB@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w1, w9, w8
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	bl	_files_downcast
	mov	x19, x0
	str	xzr, [sp, #24]
Lloh8:
	adrp	x8, _STRBUF_INIT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _STRBUF_INIT@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	str	w8, [sp, #16]
	ldr	w0, [x0]
	add	x1, sp, #16
	bl	_ref_store_transaction_begin
	cbz	x0, LBB0_13
; %bb.1:
	mov	x20, x0
	ldr	w0, [x19]
Lloh11:
	adrp	x8, _LOCK_DIE_ON_ERROR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _LOCK_DIE_ON_ERROR@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	add	x2, sp, #16
	bl	_packed_refs_lock
	mov	x0, x19
	bl	_get_loose_ref_cache
	mov	x1, #0
	mov	w2, #0
	bl	_cache_ref_iterator_begin
	mov	x22, x0
	bl	_ref_iterator_advance
Lloh14:
	adrp	x24, _ITER_OK@GOTPAGE
Lloh15:
	ldr	x24, [x24, _ITER_OK@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	w0, w8
	b.ne	LBB0_8
; %bb.2:
Lloh16:
	adrp	x25, _REF_NO_DEREF@GOTPAGE
Lloh17:
	ldr	x25, [x25, _REF_NO_DEREF@GOTPAGEOFF]
Lloh18:
	adrp	x26, _PACK_REFS_PRUNE@GOTPAGE
Lloh19:
	ldr	x26, [x26, _PACK_REFS_PRUNE@GOTPAGEOFF]
Lloh20:
	adrp	x23, l_.str.1@PAGE
Lloh21:
	add	x23, x23, l_.str.1@PAGEOFF
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x26]
	tst	w8, w21
	b.ne	LBB0_15
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x22
	bl	_ref_iterator_advance
	ldr	w8, [x24]
	cmp	w0, w8
	b.ne	LBB0_8
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldp	w1, w0, [x22]
	ldr	w2, [x22, #8]
	mov	x3, x21
	bl	_should_pack_ref
	cbz	w0, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldp	w2, w1, [x22]
	ldr	w4, [x25]
	add	x6, sp, #16
	mov	x0, x20
	mov	x3, #0
	mov	x5, #0
	bl	_ref_transaction_update
	cbz	x0, LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x22, #4]
	ldr	w9, [sp, #16]
	stp	x8, x9, [sp]
	mov	x0, x23
	bl	_die
	b	LBB0_3
LBB0_8:
Lloh22:
	adrp	x8, _ITER_DONE@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ITER_DONE@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	cmp	w0, w8
	b.eq	LBB0_10
; %bb.9:
Lloh25:
	adrp	x0, l_.str.2@PAGE
Lloh26:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_die
LBB0_10:
	add	x1, sp, #16
	mov	x0, x20
	bl	_ref_transaction_commit
	cbz	x0, LBB0_12
; %bb.11:
	ldr	w8, [sp, #16]
	str	x8, [sp]
Lloh27:
	adrp	x0, l_.str.3@PAGE
Lloh28:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_die
LBB0_12:
	mov	x0, x20
	bl	_ref_transaction_free
	ldr	w0, [x19]
	bl	_packed_refs_unlock
	add	x1, sp, #24
	mov	x0, x19
	bl	_prune_refs
	add	x0, sp, #16
	bl	_strbuf_release
	mov	w0, #0
	b	LBB0_14
LBB0_13:
	mov	w0, #-1
LBB0_14:
	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
	add	sp, sp, #112
	ret
LBB0_15:
	add	x0, x22, #4
	mov	x1, x22
	bl	_files_pack_refs.cold.1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.p2align	2                               ; -- Begin function files_pack_refs.cold.1
_files_pack_refs.cold.1:                ; @files_pack_refs.cold.1
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
Lloh29:
	adrp	x8, _name@GOTPAGE
Lloh30:
	ldr	x8, [x8, _name@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
	ldr	w2, [x0]
	bl	_FLEX_ALLOC_STR
	ldr	w1, [x19]
	bl	_oidcpy
	brk	#0x1
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_REF_STORE_WRITE,4,2            ; @REF_STORE_WRITE
	.comm	_REF_STORE_ODB,4,2              ; @REF_STORE_ODB
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pack_refs"

	.comm	_STRBUF_INIT,4,2                ; @STRBUF_INIT
	.comm	_LOCK_DIE_ON_ERROR,4,2          ; @LOCK_DIE_ON_ERROR
	.comm	_ITER_OK,4,2                    ; @ITER_OK
	.comm	_REF_NO_DEREF,4,2               ; @REF_NO_DEREF
l_.str.1:                               ; @.str.1
	.asciz	"failure preparing to create packed reference %s: %s"

	.comm	_PACK_REFS_PRUNE,4,2            ; @PACK_REFS_PRUNE
	.comm	_name,4,2                       ; @name
	.comm	_ITER_DONE,4,2                  ; @ITER_DONE
l_.str.2:                               ; @.str.2
	.asciz	"error while iterating over references"

l_.str.3:                               ; @.str.3
	.asciz	"unable to write new packed-refs: %s"

	.no_dead_strip	_files_pack_refs
.subsections_via_symbols
