	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_readdirfd                      ## -- Begin function readdirfd
	.p2align	4, 0x90
_readdirfd:                             ## @readdirfd
	.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	_SOPEN_MAX@GOTPCREL(%rip), %rax
	cmpl	%edi, (%rax)
	jbe	LBB0_2
## %bb.1:
	movq	_files@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%edi, %rcx
	shlq	$4, %rcx
	leaq	(%rax,%rcx), %rdi
	movl	(%rdi), %edx
	movq	_F_READ@GOTPCREL(%rip), %rsi
	testl	%edx, (%rsi)
	je	LBB0_2
## %bb.4:
	movq	_F_RAW@GOTPCREL(%rip), %rsi
	testl	%edx, (%rsi)
	je	LBB0_6
## %bb.5:
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_2:
	movq	_EBADF@GOTPCREL(%rip), %rax
LBB0_3:
	movq	(%rax), %rax
	movq	_errno@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	xorl	%eax, %eax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_6:
	movq	8(%rax,%rcx), %rax
	leaq	_readdirfd.dir(%rip), %rbx
	movq	%rbx, %rsi
	callq	*(%rax)
	movq	%rax, %rcx
	movq	_errno@GOTPCREL(%rip), %rax
	movq	%rcx, (%rax)
	xorl	%eax, %eax
	testq	%rcx, %rcx
	cmoveq	%rbx, %rax
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_readdirfd.dir,4,2 ## @readdirfd.dir
	.comm	_files,8,3                      ## @files
	.comm	_SOPEN_MAX,4,2                  ## @SOPEN_MAX
	.comm	_F_READ,4,2                     ## @F_READ
	.comm	_EBADF,8,3                      ## @EBADF
	.comm	_errno,8,3                      ## @errno
	.comm	_F_RAW,4,2                      ## @F_RAW
	.comm	_EIO,8,3                        ## @EIO
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_readdirfd                      ; -- Begin function readdirfd
	.p2align	2
_readdirfd:                             ; @readdirfd
	.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
                                        ; kill: def $w0 killed $w0 def $x0
Lloh0:
	adrp	x8, _SOPEN_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SOPEN_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w0
	b.ls	LBB0_4
; %bb.1:
Lloh3:
	adrp	x8, _files@GOTPAGE
Lloh4:
	ldr	x8, [x8, _files@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x8]
	add	x8, x9, w0, sxtw #4
	ldr	w10, [x8]
Lloh6:
	adrp	x11, _F_READ@GOTPAGE
Lloh7:
	ldr	x11, [x11, _F_READ@GOTPAGEOFF]
Lloh8:
	ldr	w11, [x11]
	tst	w11, w10
	b.eq	LBB0_4
; %bb.2:
Lloh9:
	adrp	x11, _F_RAW@GOTPAGE
Lloh10:
	ldr	x11, [x11, _F_RAW@GOTPAGEOFF]
Lloh11:
	ldr	w11, [x11]
	tst	w11, w10
	b.eq	LBB0_7
; %bb.3:
	mov	x0, #0
Lloh12:
	adrp	x8, _EIO@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
	mov	x0, #0
Lloh14:
	adrp	x8, _EBADF@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EBADF@GOTPAGEOFF]
LBB0_5:
	ldr	x8, [x8]
Lloh16:
	adrp	x9, _errno@GOTPAGE
Lloh17:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh18:
	str	x8, [x9]
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_7:
	sxtw	x10, w0
	add	x9, x9, x10, lsl #4
	ldr	x9, [x9, #8]
	ldr	x9, [x9]
Lloh19:
	adrp	x19, _readdirfd.dir@PAGE
Lloh20:
	add	x19, x19, _readdirfd.dir@PAGEOFF
	mov	x0, x8
	mov	x1, x19
	blr	x9
Lloh21:
	adrp	x8, _errno@GOTPAGE
Lloh22:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh23:
	str	x0, [x8]
	cmp	x0, #0
	csel	x0, x19, xzr, eq
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotStr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotStr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_readdirfd.dir,4,2 ; @readdirfd.dir
	.comm	_files,8,3                      ; @files
	.comm	_SOPEN_MAX,4,2                  ; @SOPEN_MAX
	.comm	_F_READ,4,2                     ; @F_READ
	.comm	_EBADF,8,3                      ; @EBADF
	.comm	_errno,8,3                      ; @errno
	.comm	_F_RAW,4,2                      ; @F_RAW
	.comm	_EIO,8,3                        ; @EIO
.subsections_via_symbols
