	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function test_dir_exist_and_empty
_test_dir_exist_and_empty:              ## @test_dir_exist_and_empty
	.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	%rsi, %rbx
	movq	%rdi, %r14
	callq	_stat
	testq	%rax, %rax
	jne	LBB0_6
## %bb.1:
	movl	(%rbx), %edi
	callq	_S_ISDIR
	testl	%eax, %eax
	je	LBB0_6
## %bb.2:
	leaq	-32(%rbp), %rsi
	movl	$1, %ebx
	movq	%r14, %rdi
	xorl	%edx, %edx
	movl	$1, %ecx
	callq	_getdir
	movl	%eax, %r15d
	movq	-32(%rbp), %rdi
	callq	_free_filelist
	testl	%r15d, %r15d
	js	LBB0_7
## %bb.3:
	je	LBB0_5
## %bb.4:
	leaq	L_.str.2(%rip), %rsi
	movl	$1, %edi
	movq	%r14, %rdx
	callq	_vkprintf
	xorl	%ebx, %ebx
LBB0_5:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	leaq	L_.str(%rip), %rdi
	movq	%r14, %rsi
	xorl	%eax, %eax
	callq	_kprintf
	movl	$1, %edi
	callq	_exit
LBB0_7:
	leaq	L_.str.1(%rip), %rdi
	movq	%r14, %rsi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_kprintf
	movl	$1, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Directory %s doesn't exist\n"

L_.str.1:                               ## @.str.1
	.asciz	"getdir (%s) returns error code %d.\n"

L_.str.2:                               ## @.str.2
	.asciz	"%s isn't empty directory!\n"

	.no_dead_strip	_test_dir_exist_and_empty
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function test_dir_exist_and_empty
_test_dir_exist_and_empty:              ; @test_dir_exist_and_empty
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x20, x1
	mov	x19, x0
	bl	_stat
	cbnz	x0, LBB0_7
; %bb.1:
	ldr	w0, [x20]
	bl	_S_ISDIR
	cbz	w0, LBB0_7
; %bb.2:
	add	x1, sp, #8
	mov	x0, x19
	mov	w2, #0
	mov	w3, #1
	bl	_getdir
	mov	x20, x0
	ldr	x0, [sp, #8]
	bl	_free_filelist
	tbnz	w20, #31, LBB0_8
; %bb.3:
	cbz	w20, LBB0_5
; %bb.4:
Lloh0:
	adrp	x1, l_.str.2@PAGE
Lloh1:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #1
	mov	x2, x19
	bl	_vkprintf
	mov	w0, #0
	b	LBB0_6
LBB0_5:
	mov	w0, #1
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_7:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_9
LBB0_8:
	str	x20, [sp]
Lloh4:
	adrp	x0, l_.str.1@PAGE
Lloh5:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_9:
	mov	x1, x19
	bl	_kprintf
	mov	w0, #1
	bl	_exit
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Directory %s doesn't exist\n"

l_.str.1:                               ; @.str.1
	.asciz	"getdir (%s) returns error code %d.\n"

l_.str.2:                               ; @.str.2
	.asciz	"%s isn't empty directory!\n"

	.no_dead_strip	_test_dir_exist_and_empty
.subsections_via_symbols
