	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_isc_dir_open                   ## -- Begin function isc_dir_open
	.p2align	4, 0x90
_isc_dir_open:                          ## @isc_dir_open
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %r15
	movq	_ISC_R_SUCCESS@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	callq	_VALID_DIR
	movl	%eax, %edi
	callq	_REQUIRE
	xorl	%edi, %edi
	testq	%r12, %r12
	setne	%dil
	callq	_REQUIRE
	movq	%r12, %rdi
	callq	_strlen
	leaq	-6(%rax), %rcx
	cmpq	$-10, %rcx
	ja	LBB0_2
## %bb.1:
	movq	_ISC_R_NOSPACE@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_6
LBB0_2:
	incq	%rax
	movq	(%r15), %rdi
	movq	%r12, %rsi
	movq	%rax, %rdx
	callq	_strlcpy
	movq	(%r15), %rbx
	movq	%rbx, %rdi
	callq	_strlen
	addq	%rax, %rbx
	testq	%rax, %rax
	jle	LBB0_5
## %bb.3:
	cmpb	$47, -1(%rbx)
	je	LBB0_5
## %bb.4:
	movb	$47, (%rbx)
	incq	%rbx
LBB0_5:
	movw	$42, (%rbx)
	movq	%r12, %rdi
	callq	_opendir
	movq	%rax, 8(%r15)
	testq	%rax, %rax
	je	LBB0_7
LBB0_6:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_isc__errno2result              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ISC_R_SUCCESS,4,2              ## @ISC_R_SUCCESS
	.comm	_ISC_R_NOSPACE,4,2              ## @ISC_R_NOSPACE
	.comm	_errno,4,2                      ## @errno
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_isc_dir_open                   ; -- Begin function isc_dir_open
	.p2align	2
_isc_dir_open:                          ; @isc_dir_open
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _ISC_R_SUCCESS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ISC_R_SUCCESS@GOTPAGEOFF]
Lloh2:
	ldr	w19, [x8]
	bl	_VALID_DIR
	bl	_REQUIRE
	cmp	x21, #0
	cset	w0, ne
	bl	_REQUIRE
	mov	x0, x21
	bl	_strlen
	sub	x8, x0, #6
	cmn	x8, #10
	b.hi	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _ISC_R_NOSPACE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ISC_R_NOSPACE@GOTPAGEOFF]
Lloh5:
	ldr	w19, [x8]
	b	LBB0_6
LBB0_2:
	add	x2, x0, #1
	ldr	x0, [x20]
	mov	x1, x21
	bl	_strlcpy
	ldr	x22, [x20]
	mov	x0, x22
	bl	_strlen
	add	x8, x22, x0
	cmp	x0, #1
	b.lt	LBB0_5
; %bb.3:
	ldurb	w9, [x8, #-1]
	cmp	w9, #47
	b.eq	LBB0_5
; %bb.4:
	mov	w9, #47
	strb	w9, [x8], #1
LBB0_5:
	mov	w9, #42
	strh	w9, [x8]
	mov	x0, x21
	bl	_opendir
	str	x0, [x20, #8]
	cbz	x0, LBB0_7
LBB0_6:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_7:
Lloh6:
	adrp	x8, _errno@GOTPAGE
Lloh7:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_isc__errno2result
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_ISC_R_SUCCESS,4,2              ; @ISC_R_SUCCESS
	.comm	_ISC_R_NOSPACE,4,2              ; @ISC_R_NOSPACE
	.comm	_errno,4,2                      ; @errno
.subsections_via_symbols
