	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_move_to_user_mode              ## -- Begin function move_to_user_mode
	.p2align	4, 0x90
_move_to_user_mode:                     ## @move_to_user_mode
	.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
	movq	%rdx, %rbx
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	_current@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	callq	_task_pt_regs
	movq	_PSR_MODE_EL0t@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 12(%rax)
	movq	%rbx, (%rax)
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	addl	%ecx, %ecx
	movl	%ecx, 8(%rax)
	movq	(%r12), %rdi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	callq	_allocate_user_page
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_memcpy
	movq	(%r12), %rax
	movl	(%rax), %edi
	callq	_set_pgd
	jmp	LBB0_3
LBB0_1:
	movl	$-1, %ebx
LBB0_3:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_current,8,3                    ## @current
	.comm	_PSR_MODE_EL0t,4,2              ## @PSR_MODE_EL0t
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_move_to_user_mode              ; -- Begin function move_to_user_mode
	.p2align	2
_move_to_user_mode:                     ; @move_to_user_mode
	.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
Lloh0:
	adrp	x22, _current@GOTPAGE
Lloh1:
	ldr	x22, [x22, _current@GOTPAGEOFF]
	ldr	x0, [x22]
	bl	_task_pt_regs
Lloh2:
	adrp	x8, _PSR_MODE_EL0t@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PSR_MODE_EL0t@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _PAGE_SIZE@GOTPAGE
Lloh6:
	ldr	x9, [x9, _PAGE_SIZE@GOTPAGEOFF]
	str	x21, [x0]
Lloh7:
	ldr	w9, [x9]
	lsl	w9, w9, #1
	stp	w9, w8, [x0, #8]
	ldr	x0, [x22]
	mov	w1, #0
	bl	_allocate_user_page
	cbz	x0, LBB0_2
; %bb.1:
	mov	x1, x20
	mov	x2, x19
	bl	_memcpy
	ldr	x8, [x22]
	ldr	w0, [x8]
	bl	_set_pgd
	mov	w0, #0
	b	LBB0_3
LBB0_2:
	mov	w0, #-1
LBB0_3:
	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	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_current,8,3                    ; @current
	.comm	_PSR_MODE_EL0t,4,2              ; @PSR_MODE_EL0t
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
.subsections_via_symbols
