	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sys_clone                      ## -- Begin function sys_clone
	.p2align	4, 0x90
_sys_clone:                             ## @sys_clone
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %r15d
	movl	%ecx, %r12d
	movl	%edx, %r13d
	movl	%esi, %r14d
	movl	%edi, %ebx
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	movl	%r14d, %edx
	movl	%r13d, %ecx
	movl	%r12d, %r8d
	movl	%r15d, %r9d
	callq	_STRACE
	movq	_CSIGNAL_@GOTPCREL(%rip), %rax
	movq	_IMPLEMENTED_FLAGS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	notl	%esi
	andl	%ebx, %esi
	je	LBB0_5
## %bb.1:
	leaq	L_.str.1(%rip), %rdi
	callq	_FIXME
LBB0_2:
	movq	__EINVAL@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %r15d
LBB0_4:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	_CLONE_SIGHAND_@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_7
## %bb.6:
	movq	_CLONE_VM_@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	jne	LBB0_8
	jmp	LBB0_2
LBB0_7:
	movq	_CLONE_THREAD_@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	jne	LBB0_2
LBB0_8:
	movq	_current@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_task_create_
	testq	%rax, %rax
	je	LBB0_17
## %bb.9:
	movq	%rax, %rdi
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	%ebx, %esi
	movl	%r14d, %edx
	movl	%r13d, %ecx
	movl	%r12d, %r8d
	movl	%r15d, %r9d
	callq	_copy_task
	testl	%eax, %eax
	js	LBB0_18
## %bb.10:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	$0, 16(%rdi)
	movq	_CLONE_VFORK_@GOTPCREL(%rip), %r14
	testl	%ebx, (%r14)
	movq	%rdi, %r12
	je	LBB0_12
## %bb.11:
	leaq	-48(%rbp), %rdi
	callq	_lock_init
	leaq	-52(%rbp), %rdi
	callq	_cond_init
	movq	%r12, %rdi
	movl	$0, -56(%rbp)
	leaq	-56(%rbp), %rax
	movq	%rax, 8(%r12)
LBB0_12:
	movl	(%rdi), %r15d
	callq	_task_start
	testl	%ebx, (%r14)
	je	LBB0_4
## %bb.13:
	leaq	-48(%rbp), %r14
	movq	%r14, %rdi
	callq	_lock
	cmpl	$0, -56(%rbp)
	jne	LBB0_16
## %bb.14:
	leaq	-52(%rbp), %rbx
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movq	%r14, %rsi
	xorl	%edx, %edx
	callq	_wait_for_ignore_signals
	cmpl	$0, -56(%rbp)
	je	LBB0_15
LBB0_16:
	movq	%r14, %rdi
	callq	_unlock
	movq	$0, 8(%r12)
	leaq	-52(%rbp), %rdi
	callq	_cond_destroy
	jmp	LBB0_4
LBB0_17:
	movq	__ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_18:
	movl	%eax, %r15d
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_task_destroy
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"clone(0x%x, 0x%x, 0x%x, 0x%x, 0x%x)"

	.comm	_CSIGNAL_,4,2                   ## @CSIGNAL_
	.comm	_IMPLEMENTED_FLAGS,4,2          ## @IMPLEMENTED_FLAGS
L_.str.1:                               ## @.str.1
	.asciz	"unimplemented clone flags 0x%x"

	.comm	__EINVAL,4,2                    ## @_EINVAL
	.comm	_CLONE_SIGHAND_,4,2             ## @CLONE_SIGHAND_
	.comm	_CLONE_VM_,4,2                  ## @CLONE_VM_
	.comm	_CLONE_THREAD_,4,2              ## @CLONE_THREAD_
	.comm	_current,4,2                    ## @current
	.comm	__ENOMEM,4,2                    ## @_ENOMEM
	.comm	_CLONE_VFORK_,4,2               ## @CLONE_VFORK_
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sys_clone                      ; -- Begin function sys_clone
	.p2align	2
_sys_clone:                             ; @sys_clone
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x4
	mov	x22, x3
	mov	x23, x2
	mov	x24, x1
	mov	x19, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	mov	x2, x24
	mov	x3, x23
	mov	x4, x22
	mov	x5, x21
	bl	_STRACE
Lloh2:
	adrp	x8, _CSIGNAL_@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CSIGNAL_@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _IMPLEMENTED_FLAGS@GOTPAGE
Lloh6:
	ldr	x9, [x9, _IMPLEMENTED_FLAGS@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	orr	w8, w9, w8
	bics	w1, w19, w8
	b.eq	LBB0_5
; %bb.1:
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_FIXME
LBB0_2:
Lloh10:
	adrp	x8, __EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, __EINVAL@GOTPAGEOFF]
LBB0_3:
	ldr	w21, [x8]
LBB0_4:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_5:
Lloh12:
	adrp	x8, _CLONE_SIGHAND_@GOTPAGE
Lloh13:
	ldr	x8, [x8, _CLONE_SIGHAND_@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	tst	w8, w19
	b.eq	LBB0_7
; %bb.6:
Lloh15:
	adrp	x8, _CLONE_VM_@GOTPAGE
Lloh16:
	ldr	x8, [x8, _CLONE_VM_@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	tst	w8, w19
	b.ne	LBB0_8
	b	LBB0_2
LBB0_7:
Lloh18:
	adrp	x8, _CLONE_THREAD_@GOTPAGE
Lloh19:
	ldr	x8, [x8, _CLONE_THREAD_@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	tst	w8, w19
	b.ne	LBB0_2
LBB0_8:
Lloh21:
	adrp	x8, _current@GOTPAGE
Lloh22:
	ldr	x8, [x8, _current@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
	bl	_task_create_
	cbz	x0, LBB0_17
; %bb.9:
	mov	x20, x0
	mov	x1, x19
	mov	x2, x24
	mov	x3, x23
	mov	x4, x22
	mov	x5, x21
	bl	_copy_task
	tbnz	w0, #31, LBB0_18
; %bb.10:
	str	xzr, [x20, #16]
Lloh24:
	adrp	x22, _CLONE_VFORK_@GOTPAGE
Lloh25:
	ldr	x22, [x22, _CLONE_VFORK_@GOTPAGEOFF]
	ldr	w8, [x22]
	tst	w8, w19
	b.eq	LBB0_12
; %bb.11:
	mov	x21, sp
	add	x0, x21, #8
	bl	_lock_init
	orr	x0, x21, #0x4
	bl	_cond_init
	str	wzr, [sp]
	str	x21, [x20, #8]
LBB0_12:
	ldr	w21, [x20]
	mov	x0, x20
	bl	_task_start
	ldr	w8, [x22]
	tst	w8, w19
	b.eq	LBB0_4
; %bb.13:
	mov	x23, sp
	add	x19, x23, #8
	mov	x0, x19
	bl	_lock
	ldr	w8, [sp]
	cbnz	w8, LBB0_16
; %bb.14:
	orr	x22, x23, #0x4
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	mov	x1, x19
	mov	x2, #0
	bl	_wait_for_ignore_signals
	ldr	w8, [sp]
	cbz	w8, LBB0_15
LBB0_16:
	mov	x0, x19
	bl	_unlock
	str	xzr, [x20, #8]
	orr	x0, x23, #0x4
	bl	_cond_destroy
	b	LBB0_4
LBB0_17:
Lloh26:
	adrp	x8, __ENOMEM@GOTPAGE
Lloh27:
	ldr	x8, [x8, __ENOMEM@GOTPAGEOFF]
	b	LBB0_3
LBB0_18:
	mov	x21, x0
	mov	x0, x20
	bl	_task_destroy
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"clone(0x%x, 0x%x, 0x%x, 0x%x, 0x%x)"

	.comm	_CSIGNAL_,4,2                   ; @CSIGNAL_
	.comm	_IMPLEMENTED_FLAGS,4,2          ; @IMPLEMENTED_FLAGS
l_.str.1:                               ; @.str.1
	.asciz	"unimplemented clone flags 0x%x"

	.comm	__EINVAL,4,2                    ; @_EINVAL
	.comm	_CLONE_SIGHAND_,4,2             ; @CLONE_SIGHAND_
	.comm	_CLONE_VM_,4,2                  ; @CLONE_VM_
	.comm	_CLONE_THREAD_,4,2              ; @CLONE_THREAD_
	.comm	_current,4,2                    ; @current
	.comm	__ENOMEM,4,2                    ; @_ENOMEM
	.comm	_CLONE_VFORK_,4,2               ; @CLONE_VFORK_
.subsections_via_symbols
