	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dir_iter
_dir_iter:                              ## @dir_iter
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movl	$1, %r14d
	movl	$1, %edi
	callq	_lua_upvalueindex
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_lua_touserdata
	movq	%rax, %rbx
	xorl	%esi, %esi
	cmpl	$0, (%rax)
	sete	%sil
	leaq	L_.str(%rip), %rcx
	movq	%r15, %rdi
	movl	$1, %edx
	callq	_luaL_argcheck
	movl	16(%rbx), %edi
	callq	_readdir
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_lua_pushstring
	jmp	LBB0_3
LBB0_2:
	movl	16(%rbx), %edi
	callq	_closedir
	movl	$1, (%rbx)
	xorl	%r14d, %r14d
LBB0_3:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"closed directory"

	.comm	_errno,4,2                      ## @errno
	.no_dead_strip	_dir_iter
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dir_iter
_dir_iter:                              ; @dir_iter
	.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, x0
	mov	w21, #1
	mov	w0, #1
	bl	_lua_upvalueindex
	mov	x1, x0
	mov	x0, x19
	bl	_lua_touserdata
	mov	x20, x0
	ldr	w8, [x0]
	cmp	w8, #0
	cset	w1, eq
Lloh0:
	adrp	x3, l_.str@PAGE
Lloh1:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x19
	mov	w2, #1
	bl	_luaL_argcheck
	ldr	w0, [x20, #16]
	bl	_readdir
	cbz	x0, LBB0_2
; %bb.1:
	ldr	w1, [x0]
	mov	x0, x19
	bl	_lua_pushstring
	mov	w0, #1
	b	LBB0_3
LBB0_2:
	ldr	w0, [x20, #16]
	bl	_closedir
	mov	w0, #0
	str	w21, [x20]
LBB0_3:
	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 AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"closed directory"

	.comm	_errno,4,2                      ; @errno
	.no_dead_strip	_dir_iter
.subsections_via_symbols
