	.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	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movl	16(%rdi), %edi
	callq	_FindClose
	movq	$0, 24(%r14)
	movl	$0, (%r14)
	movq	8(%r14), %rbx
	movq	%rbx, %rdi
	callq	_wcslen
	movq	%rax, %r15
	cmpq	$3, %rax
	jb	LBB0_6
## %bb.1:
	movl	(%rbx), %edi
	callq	_PHP_WIN32_IOUTIL_IS_LETTERW
	testq	%rax, %rax
	je	LBB0_6
## %bb.2:
	movq	8(%r14), %rax
	cmpl	$58, 4(%rax)
	jne	LBB0_6
## %bb.3:
	movl	8(%rax), %edi
	callq	_PHP_WIN32_IOUTIL_IS_SLASHW
	testq	%rax, %rax
	setne	%r13b
	jmp	LBB0_7
LBB0_6:
	xorl	%r13d, %r13d
LBB0_7:
	leaq	2(%r15), %rax
	movq	__MAX_PATH@GOTPCREL(%rip), %rdi
	movq	_PHP_WIN32_IOUTIL_LONG_PATH_PREFIX_LENW@GOTPCREL(%rip), %rsi
	xorl	%ecx, %ecx
	movl	$0, %edx
	testb	%r13b, %r13b
	je	LBB0_9
## %bb.8:
	movq	(%rsi), %rdx
LBB0_9:
	cmpq	(%rdi), %rax
	cmovaeq	%rdx, %rcx
	leaq	(%rcx,%r15), %r12
	addq	$2, %r12
	leaq	4(,%r12,4), %rdi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_12
## %bb.10:
	movq	%rax, %rbx
	movq	__MAX_PATH@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r12
	setae	%al
	andb	%r13b, %al
	cmpb	$1, %al
	jne	LBB0_13
## %bb.11:
	movq	_PHP_WIN32_IOUTIL_LONG_PATH_PREFIXW@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%rbx, %rdi
	callq	_wcscpy
	movq	_PHP_WIN32_IOUTIL_LONG_PATH_PREFIX_LENW@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	leaq	(%rbx,%rax,4), %rdi
	movq	8(%r14), %rsi
	callq	_wcscpy
	addq	(%r12), %r15
	jmp	LBB0_14
LBB0_12:
	movl	$-1, %r15d
	jmp	LBB0_21
LBB0_13:
	movq	8(%r14), %rsi
	movq	%rbx, %rdi
	callq	_wcscpy
LBB0_14:
	movl	-4(%rbx,%r15,4), %eax
	cmpl	$47, %eax
	je	LBB0_17
## %bb.15:
	cmpl	$92, %eax
	jne	LBB0_18
## %bb.16:
	movq	%r15, %rax
	decq	%rax
	jne	LBB0_18
LBB0_17:
	movl	$0, -4(%rbx,%r15,4)
LBB0_18:
	leaq	l_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_wcscat
	movq	_FindExInfoBasic@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	20(%r14), %rdx
	movq	_FindExSearchNameMatch@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_FIND_FIRST_EX_LARGE_FETCH@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	xorl	%r15d, %r15d
	movq	%rbx, %rdi
	xorl	%r8d, %r8d
	callq	_FindFirstFileExW
	movl	%eax, %r12d
	movq	_INVALID_HANDLE_VALUE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	jne	LBB0_20
## %bb.19:
	movl	$1, (%r14)
LBB0_20:
	movq	%rbx, %rdi
	callq	_free
	movl	%r12d, 16(%r14)
LBB0_21:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	__MAX_PATH,8,3                  ## @_MAX_PATH
	.comm	_PHP_WIN32_IOUTIL_LONG_PATH_PREFIX_LENW,8,3 ## @PHP_WIN32_IOUTIL_LONG_PATH_PREFIX_LENW
	.comm	_PHP_WIN32_IOUTIL_LONG_PATH_PREFIXW,8,3 ## @PHP_WIN32_IOUTIL_LONG_PATH_PREFIXW
	.section	__TEXT,__const
	.p2align	2                               ## @.str
l_.str:
	.long	92                              ## 0x5c
	.long	42                              ## 0x2a
	.long	0                               ## 0x0

	.comm	_FindExInfoBasic,4,2            ## @FindExInfoBasic
	.comm	_FindExSearchNameMatch,4,2      ## @FindExSearchNameMatch
	.comm	_FIND_FIRST_EX_LARGE_FETCH,4,2  ## @FIND_FIRST_EX_LARGE_FETCH
	.comm	_INVALID_HANDLE_VALUE,4,2       ## @INVALID_HANDLE_VALUE
.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	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, x0
	ldr	w0, [x0, #16]
	bl	_FindClose
	str	xzr, [x19, #24]
	str	wzr, [x19]
	ldr	x21, [x19, #8]
	mov	x0, x21
	bl	_wcslen
	mov	x20, x0
	mov	w23, #0
	cmp	x0, #3
	b.lo	LBB0_5
; %bb.1:
	ldr	w0, [x21]
	bl	_PHP_WIN32_IOUTIL_IS_LETTERW
	cbz	x0, LBB0_4
; %bb.2:
	ldr	x8, [x19, #8]
	ldr	w9, [x8, #4]
	cmp	w9, #58
	b.ne	LBB0_4
; %bb.3:
	ldr	w0, [x8, #8]
	bl	_PHP_WIN32_IOUTIL_IS_SLASHW
	cmp	x0, #0
	cset	w23, ne
	b	LBB0_5
LBB0_4:
	mov	w23, #0
LBB0_5:
Lloh0:
	adrp	x24, __MAX_PATH@GOTPAGE
Lloh1:
	ldr	x24, [x24, __MAX_PATH@GOTPAGEOFF]
	add	x8, x20, #2
	ldr	x9, [x24]
	cmp	x8, x9
	cset	w9, hs
Lloh2:
	adrp	x22, _PHP_WIN32_IOUTIL_LONG_PATH_PREFIX_LENW@GOTPAGE
Lloh3:
	ldr	x22, [x22, _PHP_WIN32_IOUTIL_LONG_PATH_PREFIX_LENW@GOTPAGEOFF]
	ldr	x10, [x22]
	tst	w9, w23
	csel	x9, x10, xzr, ne
	add	x25, x9, x8
	lsl	x8, x25, #2
	add	x0, x8, #4
	bl	_malloc
	cbz	x0, LBB0_8
; %bb.6:
	mov	x21, x0
	ldr	x8, [x24]
	cmp	x25, x8
	cset	w8, hs
	and	w8, w8, w23
	cmp	w8, #1
	b.ne	LBB0_9
; %bb.7:
Lloh4:
	adrp	x8, _PHP_WIN32_IOUTIL_LONG_PATH_PREFIXW@GOTPAGE
Lloh5:
	ldr	x8, [x8, _PHP_WIN32_IOUTIL_LONG_PATH_PREFIXW@GOTPAGEOFF]
Lloh6:
	ldr	x1, [x8]
	mov	x0, x21
	bl	_wcscpy
	ldr	x8, [x22]
	add	x0, x21, x8, lsl #2
	ldr	x1, [x19, #8]
	bl	_wcscpy
	ldr	x8, [x22]
	add	x20, x8, x20
	b	LBB0_10
LBB0_8:
	mov	w0, #-1
	b	LBB0_16
LBB0_9:
	ldr	x1, [x19, #8]
	mov	x0, x21
	bl	_wcscpy
LBB0_10:
	sub	x8, x20, #1
	ldr	w9, [x21, x8, lsl #2]
	cmp	w9, #47
	b.eq	LBB0_12
; %bb.11:
	cmp	w9, #92
	ccmp	x8, #0, #0, eq
	b.ne	LBB0_13
LBB0_12:
	str	wzr, [x21, x8, lsl #2]
LBB0_13:
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_wcscat
Lloh9:
	adrp	x8, _FindExInfoBasic@GOTPAGE
Lloh10:
	ldr	x8, [x8, _FindExInfoBasic@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	add	x2, x19, #20
Lloh12:
	adrp	x8, _FindExSearchNameMatch@GOTPAGE
Lloh13:
	ldr	x8, [x8, _FindExSearchNameMatch@GOTPAGEOFF]
Lloh14:
	ldr	w3, [x8]
Lloh15:
	adrp	x8, _FIND_FIRST_EX_LARGE_FETCH@GOTPAGE
Lloh16:
	ldr	x8, [x8, _FIND_FIRST_EX_LARGE_FETCH@GOTPAGEOFF]
Lloh17:
	ldr	w5, [x8]
	mov	x0, x21
	mov	x4, #0
	bl	_FindFirstFileExW
	mov	x20, x0
Lloh18:
	adrp	x8, _INVALID_HANDLE_VALUE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _INVALID_HANDLE_VALUE@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_15
; %bb.14:
	mov	w8, #1
	str	w8, [x19]
LBB0_15:
	mov	x0, x21
	bl	_free
	mov	w0, #0
	str	w20, [x19, #16]
LBB0_16:
	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	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	__MAX_PATH,8,3                  ; @_MAX_PATH
	.comm	_PHP_WIN32_IOUTIL_LONG_PATH_PREFIX_LENW,8,3 ; @PHP_WIN32_IOUTIL_LONG_PATH_PREFIX_LENW
	.comm	_PHP_WIN32_IOUTIL_LONG_PATH_PREFIXW,8,3 ; @PHP_WIN32_IOUTIL_LONG_PATH_PREFIXW
	.section	__TEXT,__const
	.p2align	2                               ; @.str
l_.str:
	.long	92                              ; 0x5c
	.long	42                              ; 0x2a
	.long	0                               ; 0x0

	.comm	_FindExInfoBasic,4,2            ; @FindExInfoBasic
	.comm	_FindExSearchNameMatch,4,2      ; @FindExSearchNameMatch
	.comm	_FIND_FIRST_EX_LARGE_FETCH,4,2  ; @FIND_FIRST_EX_LARGE_FETCH
	.comm	_INVALID_HANDLE_VALUE,4,2       ; @INVALID_HANDLE_VALUE
.subsections_via_symbols
