	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_readdir                        ## -- Begin function readdir
	.p2align	4, 0x90
_readdir:                               ## @readdir
	.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
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.1:
	movq	%rdi, %rbx
	cmpq	$0, 8(%rdi)
	je	LBB0_5
## %bb.2:
	movl	16(%rbx), %edi
	leaq	-12(%rbp), %rsi
	callq	_FindNextFileW
	testq	%rax, %rax
	je	LBB0_7
## %bb.3:
	leaq	-12(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_finddata2dirent
	movq	8(%rbx), %rax
	incq	%rax
	jmp	LBB0_6
LBB0_4:
	movq	_EBADF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_9:
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
LBB0_10:
	xorl	%ebx, %ebx
	jmp	LBB0_11
LBB0_5:
	movl	$1, %eax
LBB0_6:
	movq	%rax, 8(%rbx)
LBB0_11:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_7:
	xorl	%eax, %eax
	callq	_GetLastError
	movq	_ERROR_NO_MORE_FILES@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_10
## %bb.8:
	movq	%rax, %rdi
	callq	_err_win_to_posix
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_EBADF,4,2                      ## @EBADF
	.comm	_errno,4,2                      ## @errno
	.comm	_ERROR_NO_MORE_FILES,8,3        ## @ERROR_NO_MORE_FILES
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_readdir                        ; -- Begin function readdir
	.p2align	2
_readdir:                               ; @readdir
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
	cbz	x0, LBB0_4
; %bb.1:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_5
; %bb.2:
	ldr	w0, [x19, #16]
	add	x1, sp, #12
	bl	_FindNextFileW
	cbz	x0, LBB0_7
; %bb.3:
	add	x1, sp, #12
	mov	x0, x19
	bl	_finddata2dirent
	ldr	x8, [x19, #8]
	add	x8, x8, #1
	b	LBB0_6
LBB0_4:
Lloh0:
	adrp	x8, _EBADF@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EBADF@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _errno@GOTPAGE
Lloh4:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh5:
	str	w8, [x9]
	b	LBB0_10
LBB0_5:
	mov	w8, #1
LBB0_6:
	str	x8, [x19, #8]
	b	LBB0_10
LBB0_7:
	bl	_GetLastError
Lloh6:
	adrp	x8, _ERROR_NO_MORE_FILES@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ERROR_NO_MORE_FILES@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_9
; %bb.8:
	bl	_err_win_to_posix
Lloh9:
	adrp	x8, _errno@GOTPAGE
Lloh10:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh11:
	str	w0, [x8]
LBB0_9:
	mov	x19, #0
LBB0_10:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotStr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotStr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_EBADF,4,2                      ; @EBADF
	.comm	_errno,4,2                      ; @errno
	.comm	_ERROR_NO_MORE_FILES,8,3        ; @ERROR_NO_MORE_FILES
.subsections_via_symbols
