	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rm_r                           ## -- Begin function rm_r
	.p2align	4, 0x90
_rm_r:                                  ## @rm_r
	.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
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movl	%edi, %ebx
	xorl	%r12d, %r12d
	cmpb	$47, (%rsi)
	sete	%r12b
	addq	%rsi, %r12
	movq	_O_DIRECTORY@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rsi
	callq	_openat
	cmpl	$-1, %eax
	je	LBB0_10
## %bb.1:
	movl	%eax, %r13d
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movl	%eax, %edi
	callq	_fdopendir
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_readdir
	testq	%rax, %rax
	je	LBB0_6
## %bb.2:
	movq	%rax, %r15
	leaq	L_.str(%rip), %r14
	jmp	LBB0_3
LBB0_13:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	(%r15), %rsi
	movl	%r13d, %edi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	callq	_rm_r
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%rbx, %rdi
	callq	_readdir
	movq	%rax, %r15
	testq	%rax, %rax
	je	LBB0_6
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rdi
	movq	%r14, %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	(%r15), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_5
## %bb.11:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	(%r15), %rsi
	movq	_AT_SYMLINK_NOFOLLOW@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%r13d, %edi
	leaq	-72(%rbp), %rdx
	callq	_fstatat
	testq	%rax, %rax
	jne	LBB0_5
## %bb.12:                              ##   in Loop: Header=BB0_3 Depth=1
	movl	-64(%rbp), %edi
	callq	_S_ISDIR
	testq	%rax, %rax
	jne	LBB0_13
## %bb.14:                              ##   in Loop: Header=BB0_3 Depth=1
	movl	-64(%rbp), %edi
	callq	_S_ISLNK
	testq	%rax, %rax
	jne	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	cmpq	%rax, -72(%rbp)
	jne	LBB0_5
LBB0_16:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	(%r15), %rsi
	movl	%r13d, %edi
	xorl	%edx, %edx
	callq	_unlinkat
	jmp	LBB0_5
LBB0_6:
	movq	%rbx, %rdi
	callq	_closedir
	movq	_AT_SYMLINK_NOFOLLOW@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-72(%rbp), %rdx
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %edi
	movq	%r12, %rsi
	callq	_fstatat
	testq	%rax, %rax
	jne	LBB0_10
## %bb.7:
	movl	-64(%rbp), %edi
	callq	_S_ISDIR
	xorl	%edx, %edx
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	_AT_REMOVEDIR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
LBB0_9:
	movl	%ebx, %edi
	movq	%r12, %rsi
	callq	_unlinkat
LBB0_10:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_O_DIRECTORY,4,2                ## @O_DIRECTORY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"."

L_.str.1:                               ## @.str.1
	.asciz	".."

	.comm	_AT_SYMLINK_NOFOLLOW,4,2        ## @AT_SYMLINK_NOFOLLOW
	.comm	_AT_REMOVEDIR,4,2               ## @AT_REMOVEDIR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rm_r                           ; -- Begin function rm_r
	.p2align	2
_rm_r:                                  ; @rm_r
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.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
	mov	x21, x2
	mov	x19, x0
	mov	x8, x1
	ldrb	w9, [x8], #1
	cmp	w9, #47
	csel	x20, x1, x8, ne
Lloh0:
	adrp	x8, _O_DIRECTORY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _O_DIRECTORY@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x1, x20
	bl	_openat
	cmn	w0, #1
	b.eq	LBB0_14
; %bb.1:
	mov	x22, x0
	bl	_fdopendir
	mov	x23, x0
	bl	_readdir
Lloh3:
	adrp	x27, _AT_SYMLINK_NOFOLLOW@GOTPAGE
Lloh4:
	ldr	x27, [x27, _AT_SYMLINK_NOFOLLOW@GOTPAGEOFF]
	cbz	x0, LBB0_12
; %bb.2:
	mov	x26, x0
Lloh5:
	adrp	x24, l_.str@PAGE
Lloh6:
	add	x24, x24, l_.str@PAGEOFF
Lloh7:
	adrp	x25, l_.str.1@PAGE
Lloh8:
	add	x25, x25, l_.str.1@PAGEOFF
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x1, [x26]
	mov	x0, x22
	mov	x2, x21
	bl	_rm_r
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x23
	bl	_readdir
	mov	x26, x0
	cbz	x0, LBB0_12
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x26]
	mov	x1, x24
	bl	_strcmp
	cbz	x0, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x0, [x26]
	mov	x1, x25
	bl	_strcmp
	cbz	x0, LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x1, [x26]
	ldr	w3, [x27]
	mov	x2, sp
	mov	x0, x22
	bl	_fstatat
	cbnz	x0, LBB0_4
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [sp, #8]
	bl	_S_ISDIR
	cbnz	x0, LBB0_3
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [sp, #8]
	bl	_S_ISLNK
	cbnz	x0, LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [sp]
	cmp	x8, x21
	b.ne	LBB0_4
LBB0_11:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x1, [x26]
	mov	x0, x22
	mov	w2, #0
	bl	_unlinkat
	b	LBB0_4
LBB0_12:
	mov	x0, x23
	bl	_closedir
	ldr	w3, [x27]
	mov	x2, sp
	mov	x0, x19
	mov	x1, x20
	bl	_fstatat
	cbnz	x0, LBB0_14
; %bb.13:
	ldr	w0, [sp, #8]
	bl	_S_ISDIR
Lloh9:
	adrp	x8, _AT_REMOVEDIR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AT_REMOVEDIR@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmp	x0, #0
	csel	w2, wzr, w8, eq
	mov	x0, x19
	mov	x1, x20
	bl	_unlinkat
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
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_O_DIRECTORY,4,2                ; @O_DIRECTORY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"."

l_.str.1:                               ; @.str.1
	.asciz	".."

	.comm	_AT_SYMLINK_NOFOLLOW,4,2        ; @AT_SYMLINK_NOFOLLOW
	.comm	_AT_REMOVEDIR,4,2               ; @AT_REMOVEDIR
.subsections_via_symbols
