	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___readdir_r                    ## -- Begin function __readdir_r
	.p2align	4, 0x90
___readdir_r:                           ## @__readdir_r
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r15
	movq	%rdi, %r12
	movq	_errno@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	$0, (%r13)
	movq	___isthreaded@GOTPCREL(%rip), %r14
	cmpq	$0, (%r14)
	je	LBB0_2
## %bb.1:
	movq	%r12, %rdi
	callq	__pthread_mutex_lock
LBB0_2:
	movq	_RDU_SKIP@GOTPCREL(%rip), %rax
	movq	_RDU_SHORT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	%r12, %rdi
	callq	__readdir_unlocked
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	callq	__GENERIC_DIRSIZ
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_memcpy
LBB0_4:
	cmpq	$0, (%r14)
	je	LBB0_6
## %bb.5:
	movq	%r12, %rdi
	callq	__pthread_mutex_unlock
LBB0_6:
	movl	(%r13), %eax
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	testq	%rbx, %rbx
	jne	LBB0_9
	jmp	LBB0_10
LBB0_8:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%r13)
LBB0_9:
	testq	%rbx, %rbx
	cmoveq	%rbx, %r15
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%r15, (%rax)
	xorl	%eax, %eax
LBB0_10:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_errno,4,2                      ## @errno
	.comm	___isthreaded,8,3               ## @__isthreaded
	.comm	_RDU_SKIP,4,2                   ## @RDU_SKIP
	.comm	_RDU_SHORT,4,2                  ## @RDU_SHORT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___readdir_r                    ; -- Begin function __readdir_r
	.p2align	2
___readdir_r:                           ; @__readdir_r
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x23, _errno@GOTPAGE
Lloh1:
	ldr	x23, [x23, _errno@GOTPAGEOFF]
	ldr	w24, [x23]
	str	wzr, [x23]
Lloh2:
	adrp	x25, ___isthreaded@GOTPAGE
Lloh3:
	ldr	x25, [x25, ___isthreaded@GOTPAGEOFF]
	ldr	x8, [x25]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x21
	bl	__pthread_mutex_lock
LBB0_2:
Lloh4:
	adrp	x8, _RDU_SKIP@GOTPAGE
Lloh5:
	ldr	x8, [x8, _RDU_SKIP@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
Lloh7:
	adrp	x9, _RDU_SHORT@GOTPAGE
Lloh8:
	ldr	x9, [x9, _RDU_SHORT@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	orr	w1, w9, w8
	mov	x0, x21
	bl	__readdir_unlocked
	mov	x22, x0
	cbz	x0, LBB0_4
; %bb.3:
	mov	x0, x22
	bl	__GENERIC_DIRSIZ
	mov	x2, x0
	mov	x0, x20
	mov	x1, x22
	bl	_memcpy
LBB0_4:
	ldr	x8, [x25]
	cbz	x8, LBB0_6
; %bb.5:
	mov	x0, x21
	bl	__pthread_mutex_unlock
LBB0_6:
	ldr	w0, [x23]
	cbz	w0, LBB0_8
; %bb.7:
	cbnz	x22, LBB0_9
	b	LBB0_10
LBB0_8:
	str	w24, [x23]
LBB0_9:
	mov	w0, #0
	cmp	x22, #0
	csel	x8, xzr, x20, eq
	str	x8, [x19]
LBB0_10:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_errno,4,2                      ; @errno
	.comm	___isthreaded,8,3               ; @__isthreaded
	.comm	_RDU_SKIP,4,2                   ; @RDU_SKIP
	.comm	_RDU_SHORT,4,2                  ; @RDU_SHORT
.subsections_via_symbols
