	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function check_dir
_check_dir:                             ## @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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movq	%rsi, %r14
	movq	%rdi, %rbx
	callq	_stat
	testq	%rax, %rax
	js	LBB0_1
LBB0_5:
	movl	4(%r14), %edi
	callq	_S_ISDIR
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movq	%rbx, %rdi
	callq	_strlen
	movq	_MAX_DIRNAME_LEN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jle	LBB0_8
LBB0_7:
	movq	_ENOTDIR@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_errno@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	movl	$-1, %r15d
	jmp	LBB0_9
LBB0_1:
	movl	$-1, %r15d
	testl	%r12d, %r12d
	je	LBB0_9
## %bb.2:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	_ENOENT@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	%rcx, (%rax)
	jne	LBB0_9
## %bb.3:
	movq	%rbx, %rdi
	movl	$488, %esi                      ## imm = 0x1E8
	callq	_mkdir
	testq	%rax, %rax
	js	LBB0_9
## %bb.4:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_stat
	testq	%rax, %rax
	jns	LBB0_5
	jmp	LBB0_9
LBB0_8:
	movl	(%r14), %r15d
LBB0_9:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_errno,8,3                      ## @errno
	.comm	_ENOENT,8,3                     ## @ENOENT
	.comm	_MAX_DIRNAME_LEN,8,3            ## @MAX_DIRNAME_LEN
	.comm	_ENOTDIR,8,3                    ## @ENOTDIR
	.no_dead_strip	_check_dir
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function check_dir
_check_dir:                             ; @check_dir
	.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	x21, x2
	mov	x19, x1
	mov	x20, x0
	bl	_stat
	tbnz	x0, #63, LBB0_5
LBB0_1:
	ldr	w0, [x19, #4]
	bl	_S_ISDIR
	cbz	w0, LBB0_3
; %bb.2:
	mov	x0, x20
	bl	_strlen
Lloh0:
	adrp	x8, _MAX_DIRNAME_LEN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX_DIRNAME_LEN@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.le	LBB0_9
LBB0_3:
Lloh3:
	adrp	x8, _ENOTDIR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOTDIR@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
Lloh6:
	adrp	x9, _errno@GOTPAGE
Lloh7:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh8:
	str	x8, [x9]
LBB0_4:
	mov	w0, #-1
	b	LBB0_10
LBB0_5:
	mov	w0, #-1
	cbz	w21, LBB0_10
; %bb.6:
Lloh9:
	adrp	x8, _errno@GOTPAGE
Lloh10:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
Lloh12:
	adrp	x9, _ENOENT@GOTPAGE
Lloh13:
	ldr	x9, [x9, _ENOENT@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.7:
	mov	x0, x20
	mov	w1, #488
	bl	_mkdir
	tbnz	x0, #63, LBB0_4
; %bb.8:
	mov	x0, x20
	mov	x1, x19
	bl	_stat
	tbz	x0, #63, LBB0_1
	b	LBB0_4
LBB0_9:
	ldr	w0, [x19]
LBB0_10:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotStr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_errno,8,3                      ; @errno
	.comm	_ENOENT,8,3                     ; @ENOENT
	.comm	_MAX_DIRNAME_LEN,8,3            ; @MAX_DIRNAME_LEN
	.comm	_ENOTDIR,8,3                    ; @ENOTDIR
	.no_dead_strip	_check_dir
.subsections_via_symbols
