	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_plat_get_root_dir              ## -- Begin function plat_get_root_dir
	.p2align	4, 0x90
_plat_get_root_dir:                     ## @plat_get_root_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %r14
	leaq	L_.str(%rip), %rdi
	callq	_getenv
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_PICO_HOME_DIR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	leaq	L_.str.1(%rip), %rdx
	movq	%r14, %rdi
	movl	%r15d, %esi
	movq	%rax, %rcx
	callq	_snprintf
	movl	%eax, %ebx
	leal	-1(%r15), %eax
	cmpl	%r15d, %ebx
	cmovgel	%eax, %ebx
	movq	%r14, %rdi
	movl	$493, %esi                      ## imm = 0x1ED
	callq	_mkdir
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	%r14, %rdi
	movl	%r15d, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_plat_get_data_dir              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"HOME"

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

	.comm	_PICO_HOME_DIR,4,2              ## @PICO_HOME_DIR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_plat_get_root_dir              ; -- Begin function plat_get_root_dir
	.p2align	2
_plat_get_root_dir:                     ; @plat_get_root_dir
	.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
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_getenv
	cbz	x0, LBB0_2
; %bb.1:
	mov	x3, x0
Lloh2:
	adrp	x8, _PICO_HOME_DIR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PICO_HOME_DIR@GOTPAGEOFF]
Lloh4:
	ldr	w4, [x8]
Lloh5:
	adrp	x2, l_.str.1@PAGE
Lloh6:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x1, x20
	bl	_snprintf
	sub	w8, w20, #1
	cmp	w0, w20
	csel	w20, w0, w8, lt
	mov	x0, x19
	mov	w1, #493
	bl	_mkdir
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_2:
	mov	x0, x19
	mov	x1, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_plat_get_data_dir
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"HOME"

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

	.comm	_PICO_HOME_DIR,4,2              ; @PICO_HOME_DIR
.subsections_via_symbols
