	.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
	movq	_errno@GOTPCREL(%rip), %rcx
	movq	_EBADF@GOTPCREL(%rip), %rdx
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.1:
	movq	%rdi, %rbx
	movl	(%rdi), %edi
	cmpl	$-1, %edi
	je	LBB0_6
## %bb.2:
	cmpl	$0, 8(%rbx)
	je	LBB0_4
## %bb.3:
	leaq	4(%rbx), %rsi
	callq	__findnext
	cmpl	$-1, %eax
	je	LBB0_9
LBB0_4:
	leaq	8(%rbx), %rcx
	addq	$4, %rbx
	movq	%rbx, %rdx
	movq	%rcx, %rax
	jmp	LBB0_7
LBB0_6:
	xorl	%eax, %eax
LBB0_7:
	movl	(%rdx), %edx
	movl	%edx, (%rcx)
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_9:
	xorl	%eax, %eax
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_EBADF,4,2                      ## @EBADF
	.comm	_errno,4,2                      ## @errno
.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:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	cbz	x0, LBB0_6
; %bb.1:
	mov	x19, x0
	ldr	w0, [x0]
	cmn	w0, #1
	b.eq	LBB0_5
; %bb.2:
	mov	x20, x19
	ldr	w8, [x20, #8]!
	cbz	w8, LBB0_4
; %bb.3:
	add	x1, x19, #4
	bl	__findnext
	cmn	w0, #1
	b.eq	LBB0_9
LBB0_4:
	add	x8, x19, #4
	mov	x0, x20
	b	LBB0_7
LBB0_5:
	mov	x0, #0
LBB0_6:
Lloh0:
	adrp	x20, _errno@GOTPAGE
Lloh1:
	ldr	x20, [x20, _errno@GOTPAGEOFF]
Lloh2:
	adrp	x8, _EBADF@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EBADF@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	str	w8, [x20]
LBB0_8:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_9:
	mov	x0, #0
	b	LBB0_8
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_EBADF,4,2                      ; @EBADF
	.comm	_errno,4,2                      ; @errno
.subsections_via_symbols
