	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function spl_filesystem_dir_open
_spl_filesystem_dir_open:               ## @spl_filesystem_dir_open
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movl	44(%rdi), %edi
	movq	_SPL_FILE_DIR_SKIPDOTS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_SPL_HAS_FLAG
	movl	%eax, %r15d
	movq	_SPL_FS_DIR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%rbx)
	movq	%r14, %rdi
	callq	_strlen
	movl	%eax, (%rbx)
	movq	_REPORT_ERRORS@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	_default_context@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_FG
	movq	%r14, %rdi
	movl	%r12d, %esi
	movl	%eax, %edx
	callq	_php_stream_opendir
	movq	%rax, 16(%rbx)
	movl	(%rbx), %esi
	cmpl	$2, %esi
	jl	LBB0_3
## %bb.1:
	decl	%esi
	movq	%r14, %rdi
	callq	_IS_SLASH_AT
	movl	(%rbx), %esi
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	decl	%esi
	movl	%esi, (%rbx)
LBB0_3:
	movq	%r14, %rdi
	callq	_estrndup
	movq	%rax, 32(%rbx)
	movq	$0, 24(%rbx)
	movq	_exception@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_EG
	testq	%rax, %rax
	je	LBB0_4
LBB0_5:
	movq	8(%rbx), %rax
	movb	$0, (%rax)
	movl	(%r12), %edi
	callq	_EG
	testq	%rax, %rax
	jne	LBB0_9
## %bb.6:
	movq	_spl_ce_UnexpectedValueException@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rdx
	xorl	%esi, %esi
	movq	%r14, %rcx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_zend_throw_exception_ex        ## TAILCALL
LBB0_4:
	cmpq	$0, 16(%rbx)
	je	LBB0_5
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_spl_filesystem_dir_read
	testl	%r15d, %r15d
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	8(%rbx), %rdi
	callq	_spl_filesystem_is_dot
	testq	%rax, %rax
	jne	LBB0_7
LBB0_9:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SPL_FILE_DIR_SKIPDOTS,4,2      ## @SPL_FILE_DIR_SKIPDOTS
	.comm	_SPL_FS_DIR,4,2                 ## @SPL_FS_DIR
	.comm	_REPORT_ERRORS,4,2              ## @REPORT_ERRORS
	.comm	_default_context,4,2            ## @default_context
	.comm	_exception,4,2                  ## @exception
	.comm	_spl_ce_UnexpectedValueException,4,2 ## @spl_ce_UnexpectedValueException
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to open directory \"%s\""

	.no_dead_strip	_spl_filesystem_dir_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function spl_filesystem_dir_open
_spl_filesystem_dir_open:               ; @spl_filesystem_dir_open
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x1
	mov	x20, x0
	ldr	w0, [x0, #44]
Lloh0:
	adrp	x8, _SPL_FILE_DIR_SKIPDOTS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SPL_FILE_DIR_SKIPDOTS@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_SPL_HAS_FLAG
	mov	x21, x0
Lloh3:
	adrp	x8, _SPL_FS_DIR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SPL_FS_DIR@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x20, #40]
	mov	x0, x19
	bl	_strlen
	str	w0, [x20]
Lloh6:
	adrp	x8, _REPORT_ERRORS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _REPORT_ERRORS@GOTPAGEOFF]
Lloh8:
	ldr	w22, [x8]
Lloh9:
	adrp	x8, _default_context@GOTPAGE
Lloh10:
	ldr	x8, [x8, _default_context@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	bl	_FG
	mov	x2, x0
	mov	x0, x19
	mov	x1, x22
	bl	_php_stream_opendir
	str	x0, [x20, #16]
	ldr	w1, [x20]
	cmp	w1, #2
	b.lt	LBB0_3
; %bb.1:
	sub	w1, w1, #1
	mov	x0, x19
	bl	_IS_SLASH_AT
	ldr	w1, [x20]
	cbz	x0, LBB0_3
; %bb.2:
	sub	w1, w1, #1
	str	w1, [x20]
LBB0_3:
	mov	x0, x19
	bl	_estrndup
	stp	xzr, x0, [x20, #24]
Lloh12:
	adrp	x22, _exception@GOTPAGE
Lloh13:
	ldr	x22, [x22, _exception@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_EG
	cbz	x0, LBB0_6
LBB0_4:
	ldr	x8, [x20, #8]
	strb	wzr, [x8]
	ldr	w0, [x22]
	bl	_EG
	cbnz	x0, LBB0_9
; %bb.5:
Lloh14:
	adrp	x8, _spl_ce_UnexpectedValueException@GOTPAGE
Lloh15:
	ldr	x8, [x8, _spl_ce_UnexpectedValueException@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
Lloh17:
	adrp	x2, l_.str@PAGE
Lloh18:
	add	x2, x2, l_.str@PAGEOFF
	mov	w1, #0
	mov	x3, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_zend_throw_exception_ex
LBB0_6:
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_4
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_spl_filesystem_dir_read
	cbz	w21, LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x0, [x20, #8]
	bl	_spl_filesystem_is_dot
	cbnz	x0, LBB0_7
LBB0_9:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_SPL_FILE_DIR_SKIPDOTS,4,2      ; @SPL_FILE_DIR_SKIPDOTS
	.comm	_SPL_FS_DIR,4,2                 ; @SPL_FS_DIR
	.comm	_REPORT_ERRORS,4,2              ; @REPORT_ERRORS
	.comm	_default_context,4,2            ; @default_context
	.comm	_exception,4,2                  ; @exception
	.comm	_spl_ce_UnexpectedValueException,4,2 ; @spl_ce_UnexpectedValueException
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to open directory \"%s\""

	.no_dead_strip	_spl_filesystem_dir_open
.subsections_via_symbols
