	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_proc_trace                     ## -- Begin function proc_trace
	.p2align	4, 0x90
_proc_trace:                            ## @proc_trace
	.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
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movl	$1, %esi
	callq	_proc_get_state
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	%eax, %r14d
	testl	%r15d, %r15d
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.1(%rip), %rdx
	cmoveq	%rax, %rdx
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_proc_debug
	testl	%r15d, %r15d
	je	LBB0_6
## %bb.3:
	movq	(%rbx), %rax
	movq	_MACH_PORT_NULL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.4:
	movq	8(%rbx), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_proc_steal_exc_port
LBB0_5:
	movl	%r14d, %edi
	callq	_THREAD_STATE_SET_TRACED
	jmp	LBB0_7
LBB0_1:
	xorl	%eax, %eax
	jmp	LBB0_8
LBB0_6:
	movl	%r14d, %edi
	callq	_THREAD_STATE_CLEAR_TRACED
LBB0_7:
	movl	$1, %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"tracing %s"

L_.str.1:                               ## @.str.1
	.asciz	"on"

L_.str.2:                               ## @.str.2
	.asciz	"off"

	.comm	_MACH_PORT_NULL,8,3             ## @MACH_PORT_NULL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_proc_trace                     ; -- Begin function proc_trace
	.p2align	2
_proc_trace:                            ; @proc_trace
	.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, x1
	mov	x20, x0
	mov	w1, #1
	bl	_proc_get_state
	cbz	w0, LBB0_7
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x8, l_.str.1@PAGE
Lloh1:
	add	x8, x8, l_.str.1@PAGEOFF
Lloh2:
	adrp	x9, l_.str.2@PAGE
Lloh3:
	add	x9, x9, l_.str.2@PAGEOFF
	cmp	w21, #0
	csel	x2, x9, x8, eq
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_proc_debug
	cbz	w21, LBB0_5
; %bb.2:
	ldr	x8, [x20]
Lloh6:
	adrp	x9, _MACH_PORT_NULL@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MACH_PORT_NULL@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.3:
	ldr	x8, [x20, #8]
	ldr	w1, [x8]
	mov	x0, x20
	bl	_proc_steal_exc_port
LBB0_4:
	mov	x0, x19
	bl	_THREAD_STATE_SET_TRACED
	b	LBB0_6
LBB0_5:
	mov	x0, x19
	bl	_THREAD_STATE_CLEAR_TRACED
LBB0_6:
	mov	w0, #1
LBB0_7:
	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 AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"tracing %s"

l_.str.1:                               ; @.str.1
	.asciz	"on"

l_.str.2:                               ; @.str.2
	.asciz	"off"

	.comm	_MACH_PORT_NULL,8,3             ; @MACH_PORT_NULL
.subsections_via_symbols
