	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_rootdisk
_get_rootdisk:                          ## @get_rootdisk
	.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
	subq	$48, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsp, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movq	_PATH_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	leaq	L_.str(%rip), %rdi
	leaq	-72(%rbp), %rsi
	callq	_statfs
	cmpl	$-1, %eax
	jne	LBB0_2
## %bb.1:
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_2:
	movq	_REG_EXTENDED@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.2(%rip), %rsi
	leaq	-76(%rbp), %rdi
	callq	_regcomp
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	leaq	L_.str.3(%rip), %rsi
	movl	$1, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_errx
LBB0_4:
	movl	-72(%rbp), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_strlcpy
	leaq	L_.str.4(%rip), %rsi
	movq	%r14, %rdi
	callq	_strstr
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	%rax, %r15
	movq	%rax, %rbx
	addq	$4, %rbx
	movq	%rbx, %rdi
	callq	_strlen
	leaq	1(%rax), %rdx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_memmove
LBB0_6:
	leaq	-76(%rbp), %rdi
	leaq	-64(%rbp), %rcx
	movq	%r14, %rsi
	movl	$2, %edx
	xorl	%r8d, %r8d
	callq	_regexec
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	leaq	L_.str.5(%rip), %rsi
	movl	$1, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_errx
LBB0_8:
	movl	-56(%rbp), %edi
	subl	-52(%rbp), %edi
	incl	%edi
	callq	_malloc
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_10
## %bb.9:
	leaq	L_.str.6(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_errx
LBB0_10:
	movl	-56(%rbp), %edx
	movl	-52(%rbp), %eax
	movl	-72(%rbp), %esi
	addl	%eax, %esi
	subl	%eax, %edx
	movq	%rbx, %rdi
	callq	_memcpy
	movslq	-56(%rbp), %rax
	movslq	-52(%rbp), %rcx
	subq	%rcx, %rax
	movb	$0, (%rbx,%rax)
	movq	%r12, %rsp
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_12
## %bb.11:
	movq	%rbx, %rax
	leaq	-32(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_PATH_MAX,4,2                   ## @PATH_MAX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"/"

L_.str.1:                               ## @.str.1
	.asciz	"statfs(\"/\")"

L_.str.2:                               ## @.str.2
	.asciz	"^(/dev/[a-z/]+[0-9]*)([sp][0-9]+)?[a-h]?(\\.journal)?$"

	.comm	_REG_EXTENDED,4,2               ## @REG_EXTENDED
L_.str.3:                               ## @.str.3
	.asciz	"regcomp() failed (%d)"

L_.str.4:                               ## @.str.4
	.asciz	".eli"

L_.str.5:                               ## @.str.5
	.asciz	"mounted root fs resource doesn't match expectations (regexec returned %d)"

L_.str.6:                               ## @.str.6
	.asciz	"out of memory"

	.comm	_NMATCHES,4,2                   ## @NMATCHES
	.no_dead_strip	_get_rootdisk
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_rootdisk
_get_rootdisk:                          ; @get_rootdisk
	.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
	sub	sp, sp, #48
	mov	x22, sp
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
Lloh3:
	adrp	x8, _PATH_MAX@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PATH_MAX@GOTPAGEOFF]
Lloh5:
	ldr	w20, [x8]
	mov	x9, x20
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x20, #15
	and	x9, x9, #0x1fffffff0
	sub	x19, x8, x9
	mov	sp, x19
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	sub	x1, x29, #64
	bl	_statfs
	cmn	w0, #1
	b.ne	LBB0_2
; %bb.1:
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_2:
Lloh12:
	adrp	x8, _REG_EXTENDED@GOTPAGE
Lloh13:
	ldr	x8, [x8, _REG_EXTENDED@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
Lloh15:
	adrp	x1, l_.str.2@PAGE
Lloh16:
	add	x1, x1, l_.str.2@PAGEOFF
	sub	x0, x29, #68
	bl	_regcomp
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_4
; %bb.3:
	str	x0, [sp, #-16]!
Lloh17:
	adrp	x1, l_.str.3@PAGE
Lloh18:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w0, #1
	bl	_errx
	add	sp, sp, #16
LBB0_4:
	ldur	w1, [x29, #-64]
	mov	x0, x19
	mov	x2, x20
	bl	_strlcpy
Lloh19:
	adrp	x1, l_.str.4@PAGE
Lloh20:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_strstr
	cbz	x0, LBB0_6
; %bb.5:
	mov	x20, x0
	add	x21, x0, #4
	mov	x0, x21
	bl	_strlen
	add	x2, x0, #1
	mov	x0, x20
	mov	x1, x21
	bl	_memmove
LBB0_6:
	sub	x0, x29, #68
	sub	x3, x29, #56
	mov	x1, x19
	mov	w2, #2
	mov	w4, #0
	bl	_regexec
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_8
; %bb.7:
	str	x0, [sp, #-16]!
Lloh21:
	adrp	x1, l_.str.5@PAGE
Lloh22:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	w0, #1
	bl	_errx
	add	sp, sp, #16
LBB0_8:
	ldp	w8, w9, [x29, #-48]
	sub	w8, w8, w9
	add	w0, w8, #1
	bl	_malloc
	mov	x19, x0
	cbnz	x0, LBB0_10
; %bb.9:
Lloh23:
	adrp	x1, l_.str.6@PAGE
Lloh24:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	w0, #1
	bl	_errx
LBB0_10:
	ldur	w8, [x29, #-64]
	ldp	w10, w9, [x29, #-48]
	add	w1, w9, w8
	sub	w2, w10, w9
	mov	x0, x19
	bl	_memcpy
	ldpsw	x8, x9, [x29, #-48]
	sub	x8, x8, x9
	strb	wzr, [x19, x8]
	mov	sp, x22
	ldur	x8, [x29, #-40]
Lloh25:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh26:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh27:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_12
; %bb.11:
	mov	x0, x19
	sub	sp, x29, #32
	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
LBB0_12:
	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	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_PATH_MAX,4,2                   ; @PATH_MAX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"/"

l_.str.1:                               ; @.str.1
	.asciz	"statfs(\"/\")"

l_.str.2:                               ; @.str.2
	.asciz	"^(/dev/[a-z/]+[0-9]*)([sp][0-9]+)?[a-h]?(\\.journal)?$"

	.comm	_REG_EXTENDED,4,2               ; @REG_EXTENDED
l_.str.3:                               ; @.str.3
	.asciz	"regcomp() failed (%d)"

l_.str.4:                               ; @.str.4
	.asciz	".eli"

l_.str.5:                               ; @.str.5
	.asciz	"mounted root fs resource doesn't match expectations (regexec returned %d)"

l_.str.6:                               ; @.str.6
	.asciz	"out of memory"

	.comm	_NMATCHES,4,2                   ; @NMATCHES
	.no_dead_strip	_get_rootdisk
.subsections_via_symbols
