	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_proc_detach                    ## -- Begin function proc_detach
	.p2align	4, 0x90
_proc_detach:                           ## @proc_detach
	.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
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	movq	_PRELEASE_HANG@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jne	LBB0_3
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_11
LBB0_3:
	movq	%rdi, %rbx
	movq	_PRELEASE_KILL@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jne	LBB0_5
## %bb.4:
	movq	%rbx, %rdi
	callq	_proc_getpid
	movq	_SIGKILL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
LBB0_9:
	callq	_kill
	jmp	LBB0_10
LBB0_5:
	movq	_PATTACH_RDONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_6
LBB0_10:
	movq	%rbx, %rdi
	callq	_proc_free
	xorl	%eax, %eax
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	%rbx, %rdi
	callq	_proc_getpid
	movl	%eax, %r14d
	movq	_PT_DETACH@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movl	%eax, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_ptrace
	testq	%rax, %rax
	sete	%cl
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_ESRCH@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	setne	%dl
	orb	%cl, %dl
	cmpb	$1, %dl
	jne	LBB0_10
## %bb.7:
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
## %bb.8:
	movq	_SIGSTOP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	callq	_kill
	movq	_WUNTRACED@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-28(%rbp), %rsi
	movl	%r14d, %edi
	callq	_waitpid
	movl	(%r15), %edi
	movl	%r14d, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_ptrace
	movq	_SIGCONT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PRELEASE_HANG,4,2              ## @PRELEASE_HANG
	.comm	_PRELEASE_KILL,4,2              ## @PRELEASE_KILL
	.comm	_SIGKILL,4,2                    ## @SIGKILL
	.comm	_PATTACH_RDONLY,4,2             ## @PATTACH_RDONLY
	.comm	_PT_DETACH,4,2                  ## @PT_DETACH
	.comm	_errno,8,3                      ## @errno
	.comm	_ESRCH,8,3                      ## @ESRCH
	.comm	_EBUSY,8,3                      ## @EBUSY
	.comm	_SIGSTOP,4,2                    ## @SIGSTOP
	.comm	_WUNTRACED,4,2                  ## @WUNTRACED
	.comm	_SIGCONT,4,2                    ## @SIGCONT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_proc_detach                    ; -- Begin function proc_detach
	.p2align	2
_proc_detach:                           ; @proc_detach
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _PRELEASE_HANG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PRELEASE_HANG@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w1
	b.ne	LBB0_3
LBB0_2:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	b	LBB0_9
LBB0_3:
	mov	x19, x0
Lloh6:
	adrp	x8, _PRELEASE_KILL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PRELEASE_KILL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w8, w1
	b.ne	LBB0_6
; %bb.4:
	mov	x0, x19
	bl	_proc_getpid
Lloh9:
	adrp	x8, _SIGKILL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SIGKILL@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
LBB0_5:
	bl	_kill
	b	LBB0_8
LBB0_6:
	ldr	w8, [x19]
Lloh12:
	adrp	x9, _PATTACH_RDONLY@GOTPAGE
Lloh13:
	ldr	x9, [x9, _PATTACH_RDONLY@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_8
; %bb.7:
	mov	x0, x19
	bl	_proc_getpid
	mov	x20, x0
Lloh15:
	adrp	x21, _PT_DETACH@GOTPAGE
Lloh16:
	ldr	x21, [x21, _PT_DETACH@GOTPAGEOFF]
	ldr	w0, [x21]
	mov	x1, x20
	mov	w2, #0
	mov	w3, #0
	bl	_ptrace
Lloh17:
	adrp	x8, _errno@GOTPAGE
Lloh18:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
Lloh20:
	adrp	x9, _ESRCH@GOTPAGE
Lloh21:
	ldr	x9, [x9, _ESRCH@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	cmp	x8, x9
	ccmp	x0, #0, #4, eq
Lloh23:
	adrp	x9, _EBUSY@GOTPAGE
Lloh24:
	ldr	x9, [x9, _EBUSY@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	ccmp	x8, x9, #0, eq
	b.eq	LBB0_10
LBB0_8:
	mov	x0, x19
	bl	_proc_free
	mov	w0, #0
LBB0_9:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_10:
Lloh26:
	adrp	x8, _SIGSTOP@GOTPAGE
Lloh27:
	ldr	x8, [x8, _SIGSTOP@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_kill
Lloh29:
	adrp	x8, _WUNTRACED@GOTPAGE
Lloh30:
	ldr	x8, [x8, _WUNTRACED@GOTPAGEOFF]
Lloh31:
	ldr	w2, [x8]
	add	x1, sp, #12
	mov	x0, x20
	bl	_waitpid
	ldr	w0, [x21]
	mov	x1, x20
	mov	w2, #0
	mov	w3, #0
	bl	_ptrace
Lloh32:
	adrp	x8, _SIGCONT@GOTPAGE
Lloh33:
	ldr	x8, [x8, _SIGCONT@GOTPAGEOFF]
Lloh34:
	ldr	w1, [x8]
	mov	x0, x20
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PRELEASE_HANG,4,2              ; @PRELEASE_HANG
	.comm	_PRELEASE_KILL,4,2              ; @PRELEASE_KILL
	.comm	_SIGKILL,4,2                    ; @SIGKILL
	.comm	_PATTACH_RDONLY,4,2             ; @PATTACH_RDONLY
	.comm	_PT_DETACH,4,2                  ; @PT_DETACH
	.comm	_errno,8,3                      ; @errno
	.comm	_ESRCH,8,3                      ; @ESRCH
	.comm	_EBUSY,8,3                      ; @EBUSY
	.comm	_SIGSTOP,4,2                    ; @SIGSTOP
	.comm	_WUNTRACED,4,2                  ; @WUNTRACED
	.comm	_SIGCONT,4,2                    ; @SIGCONT
.subsections_via_symbols
