	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function loose_fill_ref_dir
_loose_fill_ref_dir:                    ## @loose_fill_ref_dir
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r12
	movq	%rsi, %r14
	movq	_REF_STORE_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	callq	_files_downcast
	movq	%rax, %rbx
	movq	%r12, %rdi
	callq	_strlen
	movl	%eax, %r15d
	movq	_STRBUF_INIT@GOTPCREL(%rip), %rax
	movups	(%rax), %xmm0
	movaps	%xmm0, -96(%rbp)
	leaq	-96(%rbp), %rsi
	movq	%rbx, -112(%rbp)                ## 8-byte Spill
	movq	%rbx, %rdi
	movq	%r12, %rdx
	callq	_files_ref_path
	movq	-96(%rbp), %rax
	movq	%rax, -128(%rbp)                ## 8-byte Spill
	movl	-88(%rbp), %edi
	callq	_opendir
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	leal	257(%r15), %esi
	leaq	-72(%rbp), %r14
	movq	%r14, %rdi
	callq	_strbuf_init
	movq	%r14, %rdi
	movq	%r12, %rsi
	movl	%r15d, %edx
	callq	_strbuf_add
	movq	%rbx, %rdi
	callq	_readdir
	testq	%rax, %rax
	je	LBB0_22
## %bb.3:
	movq	%rax, %r14
	movslq	%r15d, %rax
	movq	%rax, -120(%rbp)                ## 8-byte Spill
	leaq	L_.str.1(%rip), %r15
	leaq	-72(%rbp), %r13
	jmp	LBB0_4
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	%r13, %rdi
	movl	$47, %esi
	callq	_strbuf_addch
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movl	(%r14), %edi
	movl	-64(%rbp), %esi
	movq	-72(%rbp), %rdx
	movl	$1, %ecx
	callq	_create_dir_entry
	movl	%eax, %esi
LBB0_19:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	%r14, %rdi
	callq	_add_entry_to_dir
LBB0_20:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	%r13, %rdi
	movq	-120(%rbp), %rsi                ## 8-byte Reload
	callq	_strbuf_setlen
	leaq	-96(%rbp), %rdi
	movq	-128(%rbp), %rsi                ## 8-byte Reload
	callq	_strbuf_setlen
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	%rbx, %rdi
	callq	_readdir
	movq	%rax, %r14
	testq	%rax, %rax
	je	LBB0_22
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rdi
	cmpb	$46, (%rdi)
	je	LBB0_21
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%r15, %rsi
	callq	_ends_with
	testq	%rax, %rax
	jne	LBB0_21
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	(%r14), %rsi
	movq	%r13, %rdi
	callq	_strbuf_addstr
	movq	(%r14), %rsi
	leaq	-96(%rbp), %rdi
	callq	_strbuf_addstr
	movl	-88(%rbp), %edi
	leaq	-104(%rbp), %rsi
	callq	_stat
	testq	%rax, %rax
	js	LBB0_20
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	-104(%rbp), %edi
	callq	_S_ISDIR
	testq	%rax, %rax
	jne	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	-64(%rbp), %esi
	movq	_RESOLVE_REF_READING@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	-112(%rbp), %rdi                ## 8-byte Reload
	leaq	-48(%rbp), %r14
	movq	%r14, %rcx
	leaq	-44(%rbp), %r8
	callq	_refs_resolve_ref_unsafe
	movq	%r14, %rdi
	testl	%eax, %eax
	je	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_4 Depth=1
	callq	_is_null_oid
	testq	%rax, %rax
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	_REF_ISBROKEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, -44(%rbp)
	jmp	LBB0_13
LBB0_10:                                ##   in Loop: Header=BB0_4 Depth=1
	callq	_oidclr
	movq	_REF_ISBROKEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, -44(%rbp)
	movq	-56(%rbp), %r14                 ## 8-byte Reload
LBB0_13:                                ##   in Loop: Header=BB0_4 Depth=1
	movl	-64(%rbp), %edi
	movq	_REFNAME_ALLOW_ONELEVEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_check_refname_format
	movq	%r12, %r15
	movq	%r13, %r12
	testq	%rax, %rax
	je	LBB0_14
## %bb.15:                              ##   in Loop: Header=BB0_4 Depth=1
	movl	-64(%rbp), %edi
	callq	_refname_is_safe
	testl	%eax, %eax
	jne	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_4 Depth=1
	movl	-64(%rbp), %esi
	leaq	L_.str.2(%rip), %rdi
	callq	_die
LBB0_17:                                ##   in Loop: Header=BB0_4 Depth=1
	leaq	-48(%rbp), %r13
	movq	%r13, %rdi
	callq	_oidclr
	movq	_REF_ISBROKEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_REF_BAD_NAME@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	orl	-44(%rbp), %edx
	movl	%edx, -44(%rbp)
	jmp	LBB0_18
LBB0_14:                                ##   in Loop: Header=BB0_4 Depth=1
	movl	-44(%rbp), %edx
	leaq	-48(%rbp), %r13
LBB0_18:                                ##   in Loop: Header=BB0_4 Depth=1
	movl	-64(%rbp), %edi
	movq	%r13, %rsi
	callq	_create_ref_entry
	movl	%eax, %esi
	movq	%r12, %r13
	movq	%r15, %r12
	leaq	L_.str.1(%rip), %r15
	jmp	LBB0_19
LBB0_22:
	leaq	-72(%rbp), %rdi
	callq	_strbuf_release
	leaq	-96(%rbp), %rdi
	callq	_strbuf_release
	movq	%rbx, %rdi
	callq	_closedir
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	callq	_add_per_worktree_entries_to_dir
	jmp	LBB0_23
LBB0_1:
	leaq	-96(%rbp), %rdi
	callq	_strbuf_release
LBB0_23:
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_REF_STORE_READ,4,2             ## @REF_STORE_READ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"fill_ref_dir"

	.comm	_STRBUF_INIT,16,3               ## @STRBUF_INIT
L_.str.1:                               ## @.str.1
	.asciz	".lock"

	.comm	_RESOLVE_REF_READING,4,2        ## @RESOLVE_REF_READING
	.comm	_REF_ISBROKEN,4,2               ## @REF_ISBROKEN
	.comm	_REFNAME_ALLOW_ONELEVEL,4,2     ## @REFNAME_ALLOW_ONELEVEL
L_.str.2:                               ## @.str.2
	.asciz	"loose refname is dangerous: %s"

	.comm	_REF_BAD_NAME,4,2               ## @REF_BAD_NAME
	.no_dead_strip	_loose_fill_ref_dir
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function loose_fill_ref_dir
_loose_fill_ref_dir:                    ; @loose_fill_ref_dir
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x28, x27, [sp, #64]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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
	mov	x19, x2
	mov	x20, x1
Lloh0:
	adrp	x8, _REF_STORE_READ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _REF_STORE_READ@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	bl	_files_downcast
	mov	x21, x0
	mov	x0, x19
	bl	_strlen
	mov	x24, x0
Lloh5:
	adrp	x8, _STRBUF_INIT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _STRBUF_INIT@GOTPAGEOFF]
Lloh7:
	ldr	q0, [x8]
	str	q0, [sp, #32]
	add	x1, sp, #32
	mov	x0, x21
	mov	x2, x19
	bl	_files_ref_path
	ldr	x23, [sp, #32]
	ldr	w0, [sp, #40]
	bl	_opendir
	cbz	x0, LBB0_22
; %bb.1:
	mov	x22, x0
	add	w1, w24, #257
	add	x0, sp, #48
	bl	_strbuf_init
	add	x0, sp, #48
	mov	x1, x19
	mov	x2, x24
	bl	_strbuf_add
	mov	x0, x22
	bl	_readdir
	cbz	x0, LBB0_21
; %bb.2:
	mov	x27, x0
	sxtw	x24, w24
Lloh8:
	adrp	x25, l_.str.1@PAGE
Lloh9:
	add	x25, x25, l_.str.1@PAGEOFF
Lloh10:
	adrp	x26, _REF_ISBROKEN@GOTPAGE
Lloh11:
	ldr	x26, [x26, _REF_ISBROKEN@GOTPAGEOFF]
Lloh12:
	adrp	x28, _REFNAME_ALLOW_ONELEVEL@GOTPAGE
Lloh13:
	ldr	x28, [x28, _REFNAME_ALLOW_ONELEVEL@GOTPAGEOFF]
	b	LBB0_7
LBB0_3:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	x0, sp, #48
	mov	w1, #47
	bl	_strbuf_addch
	ldr	w0, [x20]
	ldr	w1, [sp, #56]
	ldr	x2, [sp, #48]
	mov	w3, #1
	bl	_create_dir_entry
LBB0_4:                                 ;   in Loop: Header=BB0_7 Depth=1
	mov	x1, x0
	mov	x0, x20
	bl	_add_entry_to_dir
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	x0, sp, #48
	mov	x1, x24
	bl	_strbuf_setlen
	add	x0, sp, #32
	mov	x1, x23
	bl	_strbuf_setlen
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x22
	bl	_readdir
	mov	x27, x0
	cbz	x0, LBB0_21
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x27]
	ldrb	w8, [x0]
	cmp	w8, #46
	b.eq	LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x1, x25
	bl	_ends_with
	cbnz	x0, LBB0_6
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x1, [x27]
	add	x0, sp, #48
	bl	_strbuf_addstr
	ldr	x1, [x27]
	add	x0, sp, #32
	bl	_strbuf_addstr
	ldr	w0, [sp, #40]
	add	x1, sp, #16
	bl	_stat
	tbnz	x0, #63, LBB0_5
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	w0, [sp, #16]
	bl	_S_ISDIR
	cbnz	x0, LBB0_3
; %bb.11:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	w1, [sp, #56]
Lloh14:
	adrp	x8, _RESOLVE_REF_READING@GOTPAGE
Lloh15:
	ldr	x8, [x8, _RESOLVE_REF_READING@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	add	x3, sp, #24
	add	x4, sp, #12
	mov	x0, x21
	bl	_refs_resolve_ref_unsafe
	cbz	w0, LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_7 Depth=1
	add	x0, sp, #24
	bl	_is_null_oid
	cbnz	x0, LBB0_14
	b	LBB0_15
LBB0_13:                                ;   in Loop: Header=BB0_7 Depth=1
	add	x0, sp, #24
	bl	_oidclr
LBB0_14:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w8, [x26]
	ldr	w9, [sp, #12]
	orr	w8, w9, w8
	str	w8, [sp, #12]
LBB0_15:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w0, [sp, #56]
	ldr	w1, [x28]
	bl	_check_refname_format
	cbz	x0, LBB0_19
; %bb.16:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	w0, [sp, #56]
	bl	_refname_is_safe
	cbnz	w0, LBB0_18
; %bb.17:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	w1, [sp, #56]
Lloh17:
	adrp	x0, l_.str.2@PAGE
Lloh18:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_die
LBB0_18:                                ;   in Loop: Header=BB0_7 Depth=1
	add	x0, sp, #24
	bl	_oidclr
Lloh19:
	adrp	x8, _REF_BAD_NAME@GOTPAGE
Lloh20:
	ldr	x8, [x8, _REF_BAD_NAME@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	ldr	w9, [x26]
	orr	w8, w9, w8
	ldr	w9, [sp, #12]
	orr	w2, w8, w9
	str	w2, [sp, #12]
	b	LBB0_20
LBB0_19:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w2, [sp, #12]
LBB0_20:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w0, [sp, #56]
	add	x1, sp, #24
	bl	_create_ref_entry
	b	LBB0_4
LBB0_21:
	add	x0, sp, #48
	bl	_strbuf_release
	add	x0, sp, #32
	bl	_strbuf_release
	mov	x0, x22
	bl	_closedir
	mov	x0, x20
	mov	x1, x19
	bl	_add_per_worktree_entries_to_dir
	b	LBB0_23
LBB0_22:
	add	x0, sp, #32
	bl	_strbuf_release
LBB0_23:
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_REF_STORE_READ,4,2             ; @REF_STORE_READ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"fill_ref_dir"

	.comm	_STRBUF_INIT,16,3               ; @STRBUF_INIT
l_.str.1:                               ; @.str.1
	.asciz	".lock"

	.comm	_RESOLVE_REF_READING,4,2        ; @RESOLVE_REF_READING
	.comm	_REF_ISBROKEN,4,2               ; @REF_ISBROKEN
	.comm	_REFNAME_ALLOW_ONELEVEL,4,2     ; @REFNAME_ALLOW_ONELEVEL
l_.str.2:                               ; @.str.2
	.asciz	"loose refname is dangerous: %s"

	.comm	_REF_BAD_NAME,4,2               ; @REF_BAD_NAME
	.no_dead_strip	_loose_fill_ref_dir
.subsections_via_symbols
