	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function remove_dir_recurse
_remove_dir_recurse:                    ## @remove_dir_recurse
	.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	$56, %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	%rdi, %rbx
	movl	(%rdi), %eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movl	$0, -60(%rbp)
	movq	_REMOVE_DIR_EMPTY_ONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -84(%rbp)                 ## 4-byte Spill
	movq	_REMOVE_DIR_KEEP_TOPLEVEL@GOTPCREL(%rip), %r15
	movl	(%r15), %r13d
	movq	_REMOVE_DIR_KEEP_NESTED_GIT@GOTPCREL(%rip), %rax
	movl	%r13d, %r14d
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	testl	%esi, (%rax)
	je	LBB0_3
## %bb.1:
	movl	4(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	leaq	-88(%rbp), %rdx
	callq	_resolve_gitlink_ref
	testl	%eax, %eax
	je	LBB0_6
## %bb.2:
	movl	(%r15), %r14d
LBB0_3:
	movl	%r13d, -52(%rbp)                ## 4-byte Spill
	movl	4(%rbx), %edi
	callq	_opendir
	testq	%rax, %rax
	je	LBB0_4
## %bb.11:
	movq	%rax, %r13
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	movl	$47, %esi
	callq	_strbuf_complete
	movl	(%rbx), %r15d
	movq	%r13, %rdi
	callq	_readdir
	testq	%rax, %rax
	je	LBB0_12
## %bb.13:
	movq	%rax, %r12
	movl	$0, -48(%rbp)                   ## 4-byte Folded Spill
	notl	%r14d
	andl	-44(%rbp), %r14d                ## 4-byte Folded Reload
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_22:                                ##   in Loop: Header=BB0_14 Depth=1
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_ENOENT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_23
LBB0_18:                                ##   in Loop: Header=BB0_14 Depth=1
	movq	%r13, %rdi
	callq	_readdir
	movq	%rax, %r12
	testq	%rax, %rax
	je	LBB0_19
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %edi
	callq	_is_dot_or_dotdot
	testq	%rax, %rax
	jne	LBB0_18
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_strbuf_setlen
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_strbuf_addstr
	movl	4(%rbx), %edi
	leaq	-80(%rbp), %rsi
	callq	_lstat
	testq	%rax, %rax
	jne	LBB0_22
## %bb.16:                              ##   in Loop: Header=BB0_14 Depth=1
	movl	-80(%rbp), %edi
	callq	_S_ISDIR
	testq	%rax, %rax
	je	LBB0_20
## %bb.17:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	%rbx, %rdi
	movl	%r14d, %esi
	leaq	-60(%rbp), %rdx
	callq	_remove_dir_recurse
	testl	%eax, %eax
	je	LBB0_18
	jmp	LBB0_23
LBB0_20:                                ##   in Loop: Header=BB0_14 Depth=1
	movl	-84(%rbp), %eax                 ## 4-byte Reload
	testl	%eax, -44(%rbp)                 ## 4-byte Folded Reload
	jne	LBB0_23
## %bb.21:                              ##   in Loop: Header=BB0_14 Depth=1
	movl	4(%rbx), %edi
	callq	_unlink
	testl	%eax, %eax
	jne	LBB0_22
	jmp	LBB0_18
LBB0_4:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_ENOENT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.5:
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	andl	-44(%rbp), %eax                 ## 4-byte Folded Reload
	xorl	%edx, %edx
	negl	%eax
	sbbl	%edx, %edx
	jmp	LBB0_31
LBB0_6:
	xorl	%edx, %edx
	testq	%r12, %r12
	je	LBB0_31
## %bb.7:
	movl	$1, (%r12)
	jmp	LBB0_31
LBB0_12:
	movl	$0, -48(%rbp)                   ## 4-byte Folded Spill
LBB0_19:
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movl	-56(%rbp), %r15d                ## 4-byte Reload
	movb	$1, %r12b
LBB0_24:
	movq	%r13, %rdi
	callq	_closedir
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_strbuf_setlen
	testb	%r12b, %r12b
	je	LBB0_28
## %bb.25:
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	andl	-44(%rbp), %eax                 ## 4-byte Folded Reload
	jne	LBB0_28
## %bb.26:
	cmpl	$0, -60(%rbp)
	jne	LBB0_28
## %bb.27:
	movl	4(%rbx), %edi
	callq	_rmdir
	testl	%eax, %eax
	setne	%al
	movq	_errno@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	_ENOENT@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	setne	%cl
	andb	%al, %cl
	movzbl	%cl, %edx
	negl	%edx
	jmp	LBB0_31
LBB0_28:
	testq	%r14, %r14
	je	LBB0_30
## %bb.29:
	movzbl	%r12b, %eax
	movl	%eax, (%r14)
LBB0_30:
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	jmp	LBB0_31
LBB0_8:
	movq	_EACCES@GOTPCREL(%rip), %rcx
	movl	$-1, %edx
	cmpq	(%rcx), %rax
	jne	LBB0_31
## %bb.9:
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	andl	-44(%rbp), %eax                 ## 4-byte Folded Reload
	jne	LBB0_31
## %bb.10:
	movl	4(%rbx), %edi
	callq	_rmdir
	movl	%eax, %edx
LBB0_31:
	movl	%edx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_23:
	movl	$-1, -48(%rbp)                  ## 4-byte Folded Spill
	xorl	%r12d, %r12d
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movl	-56(%rbp), %r15d                ## 4-byte Reload
	jmp	LBB0_24
	.cfi_endproc
                                        ## -- End function
	.comm	_REMOVE_DIR_EMPTY_ONLY,4,2      ## @REMOVE_DIR_EMPTY_ONLY
	.comm	_REMOVE_DIR_KEEP_TOPLEVEL,4,2   ## @REMOVE_DIR_KEEP_TOPLEVEL
	.comm	_REMOVE_DIR_KEEP_NESTED_GIT,4,2 ## @REMOVE_DIR_KEEP_NESTED_GIT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"HEAD"

	.comm	_errno,8,3                      ## @errno
	.comm	_ENOENT,8,3                     ## @ENOENT
	.comm	_EACCES,8,3                     ## @EACCES
	.no_dead_strip	_remove_dir_recurse
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function remove_dir_recurse
_remove_dir_recurse:                    ; @remove_dir_recurse
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x20, x2
	mov	x24, x1
	mov	x19, x0
	ldr	w25, [x0]
	str	wzr, [sp, #28]
Lloh0:
	adrp	x8, _REMOVE_DIR_EMPTY_ONLY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _REMOVE_DIR_EMPTY_ONLY@GOTPAGEOFF]
Lloh2:
	adrp	x23, _REMOVE_DIR_KEEP_TOPLEVEL@GOTPAGE
Lloh3:
	ldr	x23, [x23, _REMOVE_DIR_KEEP_TOPLEVEL@GOTPAGEOFF]
Lloh4:
	ldr	w21, [x8]
	ldr	w22, [x23]
Lloh5:
	adrp	x8, _REMOVE_DIR_KEEP_NESTED_GIT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _REMOVE_DIR_KEEP_NESTED_GIT@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	tst	w8, w1
	b.eq	LBB0_3
; %bb.1:
	ldr	w0, [x19, #4]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	add	x2, sp, #24
	bl	_resolve_gitlink_ref
	cbz	w0, LBB0_17
; %bb.2:
	ldr	w27, [x23]
	b	LBB0_4
LBB0_3:
	mov	x27, x22
LBB0_4:
	and	w26, w22, w24
	ldr	w0, [x19, #4]
	bl	_opendir
	cbz	x0, LBB0_15
; %bb.5:
	mov	x22, x0
	str	w25, [sp, #12]                  ; 4-byte Folded Spill
	mov	x0, x19
	mov	w1, #47
	bl	_strbuf_complete
	ldr	w23, [x19]
	mov	x0, x22
	bl	_readdir
Lloh10:
	adrp	x8, _errno@GOTPAGE
Lloh11:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh12:
	adrp	x28, _ENOENT@GOTPAGE
Lloh13:
	ldr	x28, [x28, _ENOENT@GOTPAGEOFF]
	cbz	x0, LBB0_20
; %bb.6:
	mov	x25, x0
	and	w21, w21, w24
	bic	w24, w24, w27
	mov	x27, x8
	b	LBB0_9
LBB0_7:                                 ;   in Loop: Header=BB0_9 Depth=1
	ldr	x8, [x27]
	ldr	x9, [x28]
	cmp	x8, x9
	b.ne	LBB0_23
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	mov	x0, x22
	bl	_readdir
	mov	x25, x0
	cbz	x0, LBB0_19
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x25]
	bl	_is_dot_or_dotdot
	cbnz	x0, LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	x0, x19
	mov	x1, x23
	bl	_strbuf_setlen
	ldr	w1, [x25]
	mov	x0, x19
	bl	_strbuf_addstr
	ldr	w0, [x19, #4]
	add	x1, sp, #16
	bl	_lstat
	cbnz	x0, LBB0_7
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	w0, [sp, #16]
	bl	_S_ISDIR
	cbz	x0, LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_9 Depth=1
	add	x2, sp, #28
	mov	x0, x19
	mov	x1, x24
	bl	_remove_dir_recurse
	cbz	w0, LBB0_8
	b	LBB0_23
LBB0_13:                                ;   in Loop: Header=BB0_9 Depth=1
	cbnz	w21, LBB0_23
; %bb.14:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	w0, [x19, #4]
	bl	_unlink
	cbnz	w0, LBB0_7
	b	LBB0_8
LBB0_15:
Lloh14:
	adrp	x8, _errno@GOTPAGE
Lloh15:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
Lloh17:
	adrp	x9, _ENOENT@GOTPAGE
Lloh18:
	ldr	x9, [x9, _ENOENT@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_21
; %bb.16:
	cmp	w26, #0
	csetm	w23, ne
	b	LBB0_32
LBB0_17:
	mov	w23, #0
	cbz	x20, LBB0_32
; %bb.18:
	mov	w8, #1
	str	w8, [x20]
	b	LBB0_32
LBB0_19:
	mov	w23, #0
	mov	w21, #1
	b	LBB0_24
LBB0_20:
	mov	w23, #0
	mov	w21, #1
	ldr	w24, [sp, #12]                  ; 4-byte Folded Reload
	mov	x27, x8
	b	LBB0_25
LBB0_21:
Lloh20:
	adrp	x9, _EACCES@GOTPAGE
Lloh21:
	ldr	x9, [x9, _EACCES@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	cmp	x8, x9
	ccmp	w26, #0, #0, eq
	b.eq	LBB0_31
; %bb.22:
	mov	w23, #-1
	b	LBB0_32
LBB0_23:
	mov	w21, #0
	mov	w23, #-1
LBB0_24:
	ldr	w24, [sp, #12]                  ; 4-byte Folded Reload
LBB0_25:
	mov	x0, x22
	bl	_closedir
	mov	x0, x19
	mov	x1, x24
	bl	_strbuf_setlen
	cbz	w21, LBB0_29
; %bb.26:
	cbnz	w26, LBB0_29
; %bb.27:
	ldr	w8, [sp, #28]
	cbnz	w8, LBB0_29
; %bb.28:
	ldr	w0, [x19, #4]
	bl	_rmdir
	cmp	w0, #0
	ldr	x8, [x27]
	ldr	x9, [x28]
	ccmp	x8, x9, #4, ne
	cset	w8, ne
	sbfx	w23, w8, #0, #1
	b	LBB0_32
LBB0_29:
	cbz	x20, LBB0_32
; %bb.30:
	str	w21, [x20]
	b	LBB0_32
LBB0_31:
	ldr	w0, [x19, #4]
	bl	_rmdir
	mov	x23, x0
LBB0_32:
	mov	x0, x23
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_REMOVE_DIR_EMPTY_ONLY,4,2      ; @REMOVE_DIR_EMPTY_ONLY
	.comm	_REMOVE_DIR_KEEP_TOPLEVEL,4,2   ; @REMOVE_DIR_KEEP_TOPLEVEL
	.comm	_REMOVE_DIR_KEEP_NESTED_GIT,4,2 ; @REMOVE_DIR_KEEP_NESTED_GIT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"HEAD"

	.comm	_errno,8,3                      ; @errno
	.comm	_ENOENT,8,3                     ; @ENOENT
	.comm	_EACCES,8,3                     ; @EACCES
	.no_dead_strip	_remove_dir_recurse
.subsections_via_symbols
