	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dir_simple
_dir_simple:                            ## @dir_simple
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movq	_MAXPATHLEN@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	leaq	L_.str(%rip), %rdx
	movq	%r15, %rdi
	movl	%ebx, %esi
	movq	%r14, %rcx
	callq	_snprintf
	movq	%r15, %rdi
	movl	$511, %esi                      ## imm = 0x1FF
	callq	_rump_sys_mkdir
	cmpl	$-1, %eax
	jne	LBB0_2
## %bb.1:
	leaq	L_.str.1(%rip), %rdi
	callq	_atf_tc_fail_errno
LBB0_2:
	leaq	-40(%rbp), %rsi
	movq	%r15, %rdi
	callq	_rump_sys_stat
	cmpl	$-1, %eax
	jne	LBB0_4
## %bb.3:
	leaq	L_.str.2(%rip), %rdi
	callq	_atf_tc_fail_errno
LBB0_4:
	movq	%r15, %rdi
	callq	_rump_sys_rmdir
	cmpl	$-1, %eax
	jne	LBB0_6
## %bb.5:
	leaq	L_.str.3(%rip), %rdi
	callq	_atf_tc_fail_errno
LBB0_6:
	leaq	-40(%rbp), %rsi
	movq	%r15, %rdi
	callq	_rump_sys_stat
	cmpl	$-1, %eax
	jne	LBB0_8
## %bb.7:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_ENOENT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_9
LBB0_8:
	leaq	L_.str.4(%rip), %rdi
	callq	_atf_tc_fail
LBB0_9:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_11
## %bb.10:
	leaq	-24(%rbp), %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAXPATHLEN,4,2                 ## @MAXPATHLEN
	.comm	_USES_DIRS,4,2                  ## @USES_DIRS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s/dir"

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

L_.str.2:                               ## @.str.2
	.asciz	"stat new directory"

L_.str.3:                               ## @.str.3
	.asciz	"rmdir"

	.comm	_errno,8,3                      ## @errno
	.comm	_ENOENT,8,3                     ## @ENOENT
L_.str.4:                               ## @.str.4
	.asciz	"ENOENT expected from stat"

	.no_dead_strip	_dir_simple
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dir_simple
_dir_simple:                            ; @dir_simple
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	sub	sp, sp, #16
	mov	x3, x1
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-24]
Lloh3:
	adrp	x8, _MAXPATHLEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAXPATHLEN@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x9, x1
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x1, #15
	and	x9, x9, #0x1fffffff0
	sub	x19, x8, x9
	mov	sp, x19
Lloh8:
	adrp	x2, l_.str@PAGE
Lloh9:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_snprintf
	mov	x0, x19
	mov	w1, #511
	bl	_rump_sys_mkdir
	cmn	w0, #1
	b.ne	LBB0_2
; %bb.1:
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_atf_tc_fail_errno
LBB0_2:
	sub	x1, x29, #32
	mov	x0, x19
	bl	_rump_sys_stat
	cmn	w0, #1
	b.ne	LBB0_4
; %bb.3:
Lloh12:
	adrp	x0, l_.str.2@PAGE
Lloh13:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_atf_tc_fail_errno
LBB0_4:
	mov	x0, x19
	bl	_rump_sys_rmdir
	cmn	w0, #1
	b.ne	LBB0_6
; %bb.5:
Lloh14:
	adrp	x0, l_.str.3@PAGE
Lloh15:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_atf_tc_fail_errno
LBB0_6:
	sub	x1, x29, #32
	mov	x0, x19
	bl	_rump_sys_stat
	cmn	w0, #1
	b.ne	LBB0_8
; %bb.7:
Lloh16:
	adrp	x8, _errno@GOTPAGE
Lloh17:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
Lloh19:
	adrp	x9, _ENOENT@GOTPAGE
Lloh20:
	ldr	x9, [x9, _ENOENT@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_9
LBB0_8:
Lloh22:
	adrp	x0, l_.str.4@PAGE
Lloh23:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_atf_tc_fail
LBB0_9:
	ldur	x8, [x29, #-24]
Lloh24:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh25:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh26:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_11
; %bb.10:
	sub	sp, x29, #16
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_11:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_MAXPATHLEN,4,2                 ; @MAXPATHLEN
	.comm	_USES_DIRS,4,2                  ; @USES_DIRS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s/dir"

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

l_.str.2:                               ; @.str.2
	.asciz	"stat new directory"

l_.str.3:                               ; @.str.3
	.asciz	"rmdir"

	.comm	_errno,8,3                      ; @errno
	.comm	_ENOENT,8,3                     ; @ENOENT
l_.str.4:                               ; @.str.4
	.asciz	"ENOENT expected from stat"

	.no_dead_strip	_dir_simple
.subsections_via_symbols
