	.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	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movl	8(%rdi), %edi
	movq	_INVALID_HANDLE_VALUE@GOTPCREL(%rip), %r14
	cmpl	(%r14), %edi
	jne	LBB0_5
## %bb.1:
	movl	12(%rbx), %edi
	leaq	-24(%rbp), %rsi
	callq	_FindFirstFile
	movl	%eax, 8(%rbx)
	cmpl	(%r14), %eax
	jne	LBB0_8
## %bb.2:
	xorl	%eax, %eax
	callq	_GetLastError
	movq	_ERROR_FILE_NOT_FOUND@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
LBB0_4:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	xorl	%ebx, %ebx
	jmp	LBB0_9
LBB0_5:
	leaq	-24(%rbp), %rsi
	callq	_FindNextFile
	testl	%eax, %eax
	je	LBB0_6
LBB0_8:
	movl	(%rbx), %edi
	movl	-24(%rbp), %esi
	callq	_strcpy
	movl	(%rbx), %edi
	callq	_strlen
	movl	%eax, 4(%rbx)
	jmp	LBB0_9
LBB0_6:
	xorl	%eax, %eax
	callq	_GetLastError
	movq	_ERROR_NO_MORE_FILES@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_4
LBB0_7:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_GetLastError
	movq	%rax, %rdi
	callq	__dosmaperr
LBB0_9:
	movq	%rbx, %rax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_INVALID_HANDLE_VALUE,4,2       ## @INVALID_HANDLE_VALUE
	.comm	_ERROR_FILE_NOT_FOUND,8,3       ## @ERROR_FILE_NOT_FOUND
	.comm	_errno,8,3                      ## @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
	ldr	w0, [x0, #8]
Lloh0:
	adrp	x20, _INVALID_HANDLE_VALUE@GOTPAGE
Lloh1:
	ldr	x20, [x20, _INVALID_HANDLE_VALUE@GOTPAGEOFF]
	ldr	w8, [x20]
	cmp	w0, w8
	b.ne	LBB0_3
; %bb.1:
	ldr	w0, [x19, #12]
	add	x1, sp, #8
	bl	_FindFirstFile
	str	w0, [x19, #8]
	ldr	w8, [x20]
	cmp	w0, w8
	b.ne	LBB0_4
; %bb.2:
	bl	_GetLastError
Lloh2:
	adrp	x8, _ERROR_FILE_NOT_FOUND@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ERROR_FILE_NOT_FOUND@GOTPAGEOFF]
	b	LBB0_6
LBB0_3:
	add	x1, sp, #8
	bl	_FindNextFile
	cbz	w0, LBB0_5
LBB0_4:
	ldr	w0, [x19]
	ldr	w1, [sp, #8]
	bl	_strcpy
	ldr	w0, [x19]
	bl	_strlen
	str	w0, [x19, #4]
	b	LBB0_9
LBB0_5:
	bl	_GetLastError
Lloh4:
	adrp	x8, _ERROR_NO_MORE_FILES@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ERROR_NO_MORE_FILES@GOTPAGEOFF]
LBB0_6:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_8
; %bb.7:
	mov	x19, #0
Lloh6:
	adrp	x8, _errno@GOTPAGE
Lloh7:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh8:
	str	xzr, [x8]
	b	LBB0_9
LBB0_8:
	bl	_GetLastError
	bl	__dosmaperr
	mov	x19, #0
LBB0_9:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotStr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_INVALID_HANDLE_VALUE,4,2       ; @INVALID_HANDLE_VALUE
	.comm	_ERROR_FILE_NOT_FOUND,8,3       ; @ERROR_FILE_NOT_FOUND
	.comm	_errno,8,3                      ; @errno
	.comm	_ERROR_NO_MORE_FILES,8,3        ; @ERROR_NO_MORE_FILES
.subsections_via_symbols
