	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rewinddir                      ## -- Begin function rewinddir
	.p2align	4, 0x90
_rewinddir:                             ## @rewinddir
	.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_3
## %bb.1:
	movq	%rdi, %rbx
	movl	(%rdi), %edi
	cmpl	$-1, %edi
	je	LBB0_3
## %bb.2:
	callq	__findclose
	movl	20(%rbx), %edi
	leaq	16(%rbx), %rsi
	callq	__findfirst
	movl	%eax, (%rbx)
	movq	$0, 8(%rbx)
	jmp	LBB0_4
LBB0_3:
	movq	_EBADF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.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	_rewinddir                      ; -- Begin function rewinddir
	.p2align	2
_rewinddir:                             ; @rewinddir
	.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_3
; %bb.1:
	mov	x19, x0
	ldr	w0, [x0]
	cmn	w0, #1
	b.eq	LBB0_3
; %bb.2:
	bl	__findclose
	ldr	w0, [x19, #20]
	add	x1, x19, #16
	bl	__findfirst
	str	w0, [x19]
	str	xzr, [x19, #8]
	b	LBB0_4
LBB0_3:
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]
LBB0_4:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotStr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EBADF,4,2                      ; @EBADF
	.comm	_errno,4,2                      ; @errno
.subsections_via_symbols
