	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function check_getdents
_check_getdents:                        ## @check_getdents
	.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
	movl	$8232, %eax                     ## imm = 0x2028
	callq	____chkstk_darwin
	subq	%rax, %rsp
	popq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, -8264(%rbp)               ## 8-byte Spill
	movl	%edx, -8244(%rbp)               ## 4-byte Spill
	movq	%rsi, -8256(%rbp)               ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	testl	%r8d, %r8d
	jle	LBB0_19
## %bb.1:
	movq	%rdi, %rbx
	movl	%r8d, %r15d
	xorl	%r12d, %r12d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edx
	callq	_notok_mode
LBB0_18:                                ##   in Loop: Header=BB0_2 Depth=1
	incq	%r12
	cmpq	%r12, %r15
	je	LBB0_19
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	-8264(%rbp), %rax               ## 8-byte Reload
	movl	(%rax,%r12,4), %r14d
	movq	-8256(%rbp), %rdi               ## 8-byte Reload
	movl	%r14d, %esi
	callq	_open
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%eax, %r13d
	movl	%eax, %edi
	leaq	-8240(%rbp), %rsi
	movl	$8192, %edx                     ## imm = 0x2000
	callq	_getdents
	testq	%rax, %rax
	js	LBB0_11
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$0, -8244(%rbp)                 ## 4-byte Folded Reload
	je	LBB0_10
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_O_ACCMODE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%r14d, %eax
	movq	_O_RDONLY@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$0, -8244(%rbp)                 ## 4-byte Folded Reload
	je	LBB0_15
## %bb.12:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	_O_ACCMODE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%r14d, %eax
	movq	_O_RDONLY@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_9
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_9
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	leaq	L_.str.1(%rip), %rsi
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	%r14d, %edx
	callq	_notok_mode
	jmp	LBB0_17
LBB0_15:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_16
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	leaq	L_.str.3(%rip), %rsi
LBB0_16:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	%r14d, %edx
	callq	_ok_mode
LBB0_17:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	%r13d, %edi
	callq	_close
	jmp	LBB0_18
LBB0_19:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_21
## %bb.20:
	addq	$8232, %rsp                     ## imm = 0x2028
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_21:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"open"

	.comm	_O_ACCMODE,4,2                  ## @O_ACCMODE
	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
L_.str.1:                               ## @.str.1
	.asciz	"directory succeeded"

L_.str.2:                               ## @.str.2
	.asciz	"file succeeded"

L_.str.3:                               ## @.str.3
	.asciz	"directory failed"

L_.str.4:                               ## @.str.4
	.asciz	"file failed"

	.no_dead_strip	_check_getdents
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function check_getdents
_check_getdents:                        ; @check_getdents
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	w9, #8208
Lloh0:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh1:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	sub	sp, sp, #2, lsl #12             ; =8192
	sub	sp, sp, #16
Lloh2:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh3:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	stur	x8, [x29, #-96]
	cmp	w4, #1
	b.lt	LBB0_15
; %bb.1:
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	mov	w24, w4
Lloh5:
	adrp	x23, l_.str@PAGE
Lloh6:
	add	x23, x23, l_.str@PAGEOFF
Lloh7:
	adrp	x27, _O_ACCMODE@GOTPAGE
Lloh8:
	ldr	x27, [x27, _O_ACCMODE@GOTPAGEOFF]
Lloh9:
	adrp	x25, _O_RDONLY@GOTPAGE
Lloh10:
	ldr	x25, [x25, _O_RDONLY@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x22
	mov	x1, x23
	mov	x2, x26
	bl	_notok_mode
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x19, x19, #4
	subs	x24, x24, #1
	b.eq	LBB0_15
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w26, [x19]
	mov	x0, x21
	mov	x1, x26
	bl	_open
	tbnz	w0, #31, LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x28, x0
	mov	x1, sp
	mov	w2, #8192
	bl	_getdents
	tbnz	x0, #63, LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	cbz	w20, LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x27]
	and	w8, w8, w26
	ldr	w9, [x25]
	mov	x0, x22
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	cmp	w8, w9
	b.ne	LBB0_11
	b	LBB0_13
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
	cbz	w20, LBB0_12
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x27]
	and	w8, w8, w26
	ldr	w9, [x25]
	mov	x0, x22
Lloh13:
	adrp	x1, l_.str.3@PAGE
Lloh14:
	add	x1, x1, l_.str.3@PAGEOFF
	cmp	w8, w9
	b.eq	LBB0_11
	b	LBB0_13
LBB0_10:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x22
Lloh15:
	adrp	x1, l_.str.2@PAGE
Lloh16:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_11:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x2, x26
	bl	_notok_mode
	b	LBB0_14
LBB0_12:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x22
Lloh17:
	adrp	x1, l_.str.4@PAGE
Lloh18:
	add	x1, x1, l_.str.4@PAGEOFF
LBB0_13:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x2, x26
	bl	_ok_mode
LBB0_14:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x28
	bl	_close
	b	LBB0_3
LBB0_15:
	ldur	x8, [x29, #-96]
Lloh19:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh20:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_17
; %bb.16:
	add	sp, sp, #2, lsl #12             ; =8192
	add	sp, sp, #16
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_17:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"open"

	.comm	_O_ACCMODE,4,2                  ; @O_ACCMODE
	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
l_.str.1:                               ; @.str.1
	.asciz	"directory succeeded"

l_.str.2:                               ; @.str.2
	.asciz	"file succeeded"

l_.str.3:                               ; @.str.3
	.asciz	"directory failed"

l_.str.4:                               ; @.str.4
	.asciz	"file failed"

	.no_dead_strip	_check_getdents
.subsections_via_symbols
