	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_copy_process                   ## -- Begin function copy_process
	.p2align	4, 0x90
_copy_process:                          ## @copy_process
	.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
	movq	%rsi, %r15
	movq	%rdi, %rbx
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_preempt_disable
	xorl	%eax, %eax
	callq	_get_free_page
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	_current@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 40(%rax)
	movq	_TASK_RUNNING@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, 48(%rax)
	movl	%ecx, 44(%rax)
	movl	$1, (%rax)
	movq	%rbx, 8(%rax)
	movq	%r15, 16(%rax)
	movq	_ret_from_fork@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, 24(%rax)
	movq	_THREAD_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	addl	%eax, %edx
	movl	%edx, 32(%rax)
	movq	_nr_tasks@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rsi
	leal	1(%rsi), %edi
	movl	%edi, (%rcx)
	movq	_task@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rax, (%rcx,%rsi,8)
	leaq	L_.str(%rip), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_printf
	xorl	%eax, %eax
	callq	_preempt_enable
	jmp	LBB0_3
LBB0_1:
	movl	$1, %r14d
LBB0_3:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_current,8,3                    ## @current
	.comm	_TASK_RUNNING,4,2               ## @TASK_RUNNING
	.comm	_ret_from_fork,8,3              ## @ret_from_fork
	.comm	_THREAD_SIZE,4,2                ## @THREAD_SIZE
	.comm	_nr_tasks,4,2                   ## @nr_tasks
	.comm	_task,8,3                       ## @task
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"copy_process: pid=%d, sp=%x\r\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_copy_process                   ; -- Begin function copy_process
	.p2align	2
_copy_process:                          ; @copy_process
	.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	x19, x1
	mov	x20, x0
	bl	_preempt_disable
	bl	_get_free_page
	mov	w8, #1
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x9, _current@GOTPAGE
Lloh1:
	ldr	x9, [x9, _current@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	ldr	w9, [x9]
Lloh3:
	adrp	x10, _TASK_RUNNING@GOTPAGE
Lloh4:
	ldr	x10, [x10, _TASK_RUNNING@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	stp	w9, w10, [x0, #44]
	str	w9, [x0, #40]
	str	w8, [x0]
Lloh6:
	adrp	x8, _ret_from_fork@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ret_from_fork@GOTPAGEOFF]
	stp	x20, x19, [x0, #8]
Lloh8:
	ldr	x8, [x8]
	str	x8, [x0, #24]
Lloh9:
	adrp	x8, _THREAD_SIZE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _THREAD_SIZE@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	add	w2, w8, w0
	str	w2, [x0, #32]
Lloh12:
	adrp	x8, _nr_tasks@GOTPAGE
Lloh13:
	ldr	x8, [x8, _nr_tasks@GOTPAGEOFF]
	ldrsw	x1, [x8]
	add	w9, w1, #1
	str	w9, [x8]
Lloh14:
	adrp	x8, _task@GOTPAGE
Lloh15:
	ldr	x8, [x8, _task@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	str	x0, [x8, x1, lsl #3]
Lloh17:
	adrp	x0, l_.str@PAGE
Lloh18:
	add	x0, x0, l_.str@PAGEOFF
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_printf
	bl	_preempt_enable
	mov	w8, #0
LBB0_2:
	mov	x0, x8
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_current,8,3                    ; @current
	.comm	_TASK_RUNNING,4,2               ; @TASK_RUNNING
	.comm	_ret_from_fork,8,3              ; @ret_from_fork
	.comm	_THREAD_SIZE,4,2                ; @THREAD_SIZE
	.comm	_nr_tasks,4,2                   ; @nr_tasks
	.comm	_task,8,3                       ; @task
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"copy_process: pid=%d, sp=%x\r\n"

.subsections_via_symbols
