	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pg_check_dir                   ## -- Begin function pg_check_dir
	.p2align	4, 0x90
_pg_check_dir:                          ## @pg_check_dir
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	callq	_opendir
	testq	%rax, %rax
	je	LBB0_12
## %bb.1:
	movq	%rax, %r13
	movq	_errno@GOTPCREL(%rip), %r12
	movl	$0, (%r12)
	movq	%rax, %rdi
	callq	_readdir
	testq	%rax, %rax
	je	LBB0_13
## %bb.2:
	movq	%rax, %rbx
	movl	$0, -52(%rbp)                   ## 4-byte Folded Spill
	leaq	L_.str(%rip), %r14
	leaq	L_.str.1(%rip), %r15
	movl	$0, -56(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	$0, (%r12)
	movq	%r13, %rdi
	callq	_readdir
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_11
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rbx), %rsi
	movq	%r14, %rdi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_3
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	(%rbx), %rsi
	movq	%r15, %rdi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_3
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	(%rbx), %rsi
	cmpb	$46, (%rsi)
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	$1, -44(%rbp)                   ## 4-byte Folded Spill
	movl	$1, -56(%rbp)                   ## 4-byte Folded Spill
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	jmp	LBB0_10
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=1
	leaq	L_.str.2(%rip), %rdi
	callq	_strcmp
	movl	$1, %ecx
	testq	%rax, %rax
	jne	LBB0_19
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	$1, -44(%rbp)                   ## 4-byte Folded Spill
	movl	$1, -48(%rbp)                   ## 4-byte Folded Spill
	movl	%ecx, -52(%rbp)                 ## 4-byte Spill
LBB0_10:                                ##   in Loop: Header=BB0_4 Depth=1
	movl	$0, (%r12)
	movq	%r13, %rdi
	callq	_readdir
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_4
	jmp	LBB0_15
LBB0_11:
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	jmp	LBB0_14
LBB0_12:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_ENOENT@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	cmpl	(%rdx), %ecx
	setne	%al
	negl	%eax
	jmp	LBB0_18
LBB0_13:
	movl	$0, -56(%rbp)                   ## 4-byte Folded Spill
	movl	$0, -48(%rbp)                   ## 4-byte Folded Spill
LBB0_14:
	movl	$1, -44(%rbp)                   ## 4-byte Folded Spill
LBB0_15:
	movl	(%r12), %ebx
	movq	%r13, %rdi
	callq	_closedir
	movl	$-1, %ecx
	testq	%rax, %rax
	jne	LBB0_17
## %bb.16:
	xorl	%ecx, %ecx
	movl	%ebx, %eax
	negl	%eax
	sbbl	%ecx, %ecx
	orl	-44(%rbp), %ecx                 ## 4-byte Folded Reload
	movl	%ebx, (%r12)
LBB0_17:
	cmpl	$0, -48(%rbp)                   ## 4-byte Folded Reload
	movl	$3, %edx
	cmovel	%ecx, %edx
	cmpl	$1, %ecx
	cmovnel	%ecx, %edx
	cmpl	$0, -56(%rbp)                   ## 4-byte Folded Reload
	movl	$2, %eax
	cmovel	%edx, %eax
	cmpl	$1, %edx
	cmovnel	%edx, %eax
LBB0_18:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	movl	$4, -44(%rbp)                   ## 4-byte Folded Spill
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_errno,4,2                      ## @errno
	.comm	_ENOENT,4,2                     ## @ENOENT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"."

L_.str.1:                               ## @.str.1
	.asciz	".."

L_.str.2:                               ## @.str.2
	.asciz	"lost+found"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pg_check_dir                   ; -- Begin function pg_check_dir
	.p2align	2
_pg_check_dir:                          ; @pg_check_dir
	.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
	bl	_opendir
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x25, _errno@GOTPAGE
Lloh1:
	ldr	x25, [x25, _errno@GOTPAGEOFF]
	str	wzr, [x25]
	bl	_readdir
	cbz	x0, LBB0_4
; %bb.2:
	mov	x23, x0
	mov	w26, #0
	mov	w24, #0
Lloh2:
	adrp	x20, l_.str@PAGE
Lloh3:
	add	x20, x20, l_.str@PAGEOFF
Lloh4:
	adrp	x21, l_.str.1@PAGE
Lloh5:
	add	x21, x21, l_.str.1@PAGEOFF
Lloh6:
	adrp	x22, l_.str.2@PAGE
Lloh7:
	add	x22, x22, l_.str.2@PAGEOFF
	b	LBB0_13
LBB0_3:
Lloh8:
	adrp	x8, _errno@GOTPAGE
Lloh9:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _ENOENT@GOTPAGE
Lloh12:
	ldr	x9, [x9, _ENOENT@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	cmp	w8, w9
	csetm	w0, ne
	b	LBB0_10
LBB0_4:
	mov	w24, #0
	mov	w26, #0
LBB0_5:
	mov	w20, #1
LBB0_6:
	ldr	w21, [x25]
	mov	x0, x19
	bl	_closedir
	cbz	x0, LBB0_8
; %bb.7:
	mov	w8, #-1
	b	LBB0_9
LBB0_8:
	cmp	w21, #0
	csinv	w8, w20, wzr, eq
	str	w21, [x25]
LBB0_9:
	cmp	w26, #0
	ccmp	w8, #1, #0, ne
	mov	w9, #3
	csel	w8, w9, w8, eq
	cmp	w24, #0
	ccmp	w8, #1, #0, ne
	mov	w9, #2
	csel	w0, w9, w8, eq
LBB0_10:
	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
LBB0_11:                                ;   in Loop: Header=BB0_13 Depth=1
	mov	w24, #1
LBB0_12:                                ;   in Loop: Header=BB0_13 Depth=1
	str	wzr, [x25]
	mov	x0, x19
	bl	_readdir
	mov	x23, x0
	cbz	x0, LBB0_5
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	x1, [x23]
	mov	x0, x20
	bl	_strcmp
	cbz	x0, LBB0_12
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	ldr	x1, [x23]
	mov	x0, x21
	bl	_strcmp
	cbz	x0, LBB0_12
; %bb.15:                               ;   in Loop: Header=BB0_13 Depth=1
	ldr	x1, [x23]
	ldrb	w8, [x1]
	cmp	w8, #46
	b.eq	LBB0_11
; %bb.16:                               ;   in Loop: Header=BB0_13 Depth=1
	mov	x0, x22
	bl	_strcmp
	cbnz	x0, LBB0_18
; %bb.17:                               ;   in Loop: Header=BB0_13 Depth=1
	mov	w26, #1
	b	LBB0_12
LBB0_18:
	mov	w20, #4
	b	LBB0_6
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_errno,4,2                      ; @errno
	.comm	_ENOENT,4,2                     ; @ENOENT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"."

l_.str.1:                               ; @.str.1
	.asciz	".."

l_.str.2:                               ; @.str.2
	.asciz	"lost+found"

.subsections_via_symbols
