	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function reroot
_reroot:                                ## @reroot
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -24
	movq	$0, -16(%rbp)
	movq	$0, -24(%rbp)
	xorl	%eax, %eax
	callq	_revoke_ttys
	xorl	%eax, %eax
	callq	_runshutdown
	movq	_SIGKILL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$-1, %edi
	callq	_kill
	testl	%eax, %eax
	je	LBB0_3
## %bb.1:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	_ESRCH@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdi
	jne	LBB0_2
LBB0_3:
	movq	_init_path_argv0@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-16(%rbp), %rsi
	leaq	-24(%rbp), %rdx
	callq	_read_file
	testl	%eax, %eax
	jne	LBB0_7
## %bb.4:
	movq	__PATH_REROOT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_mount_tmpfs
	testl	%eax, %eax
	jne	LBB0_7
## %bb.5:
	movq	__PATH_REROOT_INIT@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movq	-16(%rbp), %rsi
	movq	-24(%rbp), %rdx
	callq	_create_file
	testl	%eax, %eax
	jne	LBB0_7
## %bb.6:
	movl	(%rbx), %edi
	leaq	L_.str.1(%rip), %rdx
	movl	%edi, %esi
	xorl	%ecx, %ecx
	callq	_execl
	movl	(%rbx), %ebx
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_strerror
	leaq	L_.str.2(%rip), %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_emergency
	jmp	LBB0_7
LBB0_2:
	callq	_strerror
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_emergency
LBB0_7:
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_emergency
	movq	-16(%rbp), %rdi
	callq	_free
	movq	_single_user@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SIGKILL,4,2                    ## @SIGKILL
	.comm	_errno,8,3                      ## @errno
	.comm	_ESRCH,8,3                      ## @ESRCH
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"kill(2) failed: %s"

	.comm	_init_path_argv0,4,2            ## @init_path_argv0
	.comm	__PATH_REROOT,4,2               ## @_PATH_REROOT
	.comm	__PATH_REROOT_INIT,4,2          ## @_PATH_REROOT_INIT
L_.str.1:                               ## @.str.1
	.asciz	"-r"

L_.str.2:                               ## @.str.2
	.asciz	"cannot exec %s: %s"

L_.str.3:                               ## @.str.3
	.asciz	"reroot failed; going to single user mode"

	.comm	_single_user,4,2                ## @single_user
	.no_dead_strip	_reroot
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function reroot
_reroot:                                ; @reroot
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	stp	xzr, xzr, [sp, #16]
	bl	_revoke_ttys
	bl	_runshutdown
Lloh0:
	adrp	x8, _SIGKILL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SIGKILL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #-1
	bl	_kill
	cbz	w0, LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _errno@GOTPAGE
Lloh4:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh5:
	ldr	x0, [x8]
Lloh6:
	adrp	x8, _ESRCH@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ESRCH@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_6
LBB0_2:
Lloh9:
	adrp	x8, _init_path_argv0@GOTPAGE
Lloh10:
	ldr	x8, [x8, _init_path_argv0@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	add	x1, sp, #24
	add	x2, sp, #16
	bl	_read_file
	cbnz	w0, LBB0_8
; %bb.3:
Lloh12:
	adrp	x8, __PATH_REROOT@GOTPAGE
Lloh13:
	ldr	x8, [x8, __PATH_REROOT@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	bl	_mount_tmpfs
	cbnz	w0, LBB0_8
; %bb.4:
Lloh15:
	adrp	x19, __PATH_REROOT_INIT@GOTPAGE
Lloh16:
	ldr	x19, [x19, __PATH_REROOT_INIT@GOTPAGEOFF]
	ldr	w0, [x19]
	ldp	x2, x1, [sp, #16]
	bl	_create_file
	cbnz	w0, LBB0_8
; %bb.5:
	ldr	w0, [x19]
Lloh17:
	adrp	x2, l_.str.1@PAGE
Lloh18:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x1, x0
	mov	x3, #0
	bl	_execl
Lloh19:
	adrp	x8, _errno@GOTPAGE
Lloh20:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh21:
	ldr	x0, [x8]
	ldr	w19, [x19]
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x19, x0, [sp]
Lloh22:
	adrp	x0, l_.str.2@PAGE
Lloh23:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_7
LBB0_6:
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh24:
	adrp	x0, l_.str@PAGE
Lloh25:
	add	x0, x0, l_.str@PAGEOFF
LBB0_7:
	bl	_emergency
LBB0_8:
Lloh26:
	adrp	x0, l_.str.3@PAGE
Lloh27:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_emergency
	ldr	x0, [sp, #24]
	bl	_free
Lloh28:
	adrp	x8, _single_user@GOTPAGE
Lloh29:
	ldr	x8, [x8, _single_user@GOTPAGEOFF]
Lloh30:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_SIGKILL,4,2                    ; @SIGKILL
	.comm	_errno,8,3                      ; @errno
	.comm	_ESRCH,8,3                      ; @ESRCH
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"kill(2) failed: %s"

	.comm	_init_path_argv0,4,2            ; @init_path_argv0
	.comm	__PATH_REROOT,4,2               ; @_PATH_REROOT
	.comm	__PATH_REROOT_INIT,4,2          ; @_PATH_REROOT_INIT
l_.str.1:                               ; @.str.1
	.asciz	"-r"

l_.str.2:                               ; @.str.2
	.asciz	"cannot exec %s: %s"

l_.str.3:                               ; @.str.3
	.asciz	"reroot failed; going to single user mode"

	.comm	_single_user,4,2                ; @single_user
	.no_dead_strip	_reroot
.subsections_via_symbols
