	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function perf_enable_service
_perf_enable_service:                   ## @perf_enable_service
	.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	%rdi, %r15
	movq	8(%rdi), %rdi
	callq	_ntb_db_valid_mask
	movq	8(%r15), %rdi
	movl	%eax, %esi
	callq	_ntb_db_set_mask
	movq	8(%r15), %rdi
	movq	_perf_ops@GOTPCREL(%rip), %rdx
	movq	%r15, %rsi
	callq	_ntb_set_ctx
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_10
## %bb.1:
	movq	_perf_msg_cmd_send@GOTPCREL(%rip), %rax
	movq	(%r15), %rcx
	movq	8(%r15), %rdi
	cmpq	(%rax), %rcx
	jne	LBB0_3
## %bb.2:
	callq	_ntb_msg_inbits
	movl	%eax, %ebx
	movq	8(%r15), %rdi
	callq	_ntb_msg_outbits
	movq	8(%r15), %rdi
	orl	%ebx, %eax
	movl	%eax, %esi
	callq	_ntb_msg_set_mask
	movl	%ebx, %edi
	callq	___ffs64
	movl	%eax, %edi
	callq	_BIT_ULL
	movl	%eax, %ebx
	movq	8(%r15), %rdi
	movl	%eax, %esi
	callq	_ntb_msg_clear_mask
	movl	%eax, %r14d
	movq	8(%r15), %rdi
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_7
LBB0_3:
	callq	_ntb_spad_count
	testl	%eax, %eax
	jle	LBB0_6
## %bb.4:
	movl	%eax, %r14d
	xorl	%ebx, %ebx
	movq	_PERF_CMD_INVAL@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %rdi
	movl	(%r12), %edx
	movl	%ebx, %esi
	callq	_ntb_spad_write
	incl	%ebx
	cmpl	%ebx, %r14d
	jne	LBB0_5
LBB0_6:
	movl	16(%r15), %edi
	callq	_PERF_SPAD_NOTIFY
	movl	%eax, %ebx
	movq	8(%r15), %rdi
	movl	%eax, %esi
	callq	_ntb_db_clear_mask
	movl	%eax, %r14d
	movq	8(%r15), %rdi
	leaq	L_.str.1(%rip), %rsi
LBB0_7:
	movl	%ebx, %edx
	callq	_dev_dbg
	movq	8(%r15), %rdi
	testl	%r14d, %r14d
	je	LBB0_9
## %bb.8:
	callq	_ntb_clear_ctx
	jmp	LBB0_10
LBB0_9:
	movq	_NTB_SPEED_AUTO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_NTB_WIDTH_AUTO@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_ntb_link_enable
	movq	8(%r15), %rdi
	callq	_ntb_link_event
	xorl	%r14d, %r14d
LBB0_10:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_perf_ops,4,2                   ## @perf_ops
	.comm	_perf_msg_cmd_send,8,3          ## @perf_msg_cmd_send
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MSG sts unmasked %#llx\n"

	.comm	_PERF_CMD_INVAL,4,2             ## @PERF_CMD_INVAL
L_.str.1:                               ## @.str.1
	.asciz	"DB bits unmasked %#llx\n"

	.comm	_NTB_SPEED_AUTO,4,2             ## @NTB_SPEED_AUTO
	.comm	_NTB_WIDTH_AUTO,4,2             ## @NTB_WIDTH_AUTO
	.no_dead_strip	_perf_enable_service
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function perf_enable_service
_perf_enable_service:                   ; @perf_enable_service
	.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	x19, x0
	ldr	x0, [x0, #8]
	bl	_ntb_db_valid_mask
	mov	x1, x0
	ldr	x0, [x19, #8]
	bl	_ntb_db_set_mask
	ldr	x0, [x19, #8]
Lloh0:
	adrp	x2, _perf_ops@GOTPAGE
Lloh1:
	ldr	x2, [x2, _perf_ops@GOTPAGEOFF]
	mov	x1, x19
	bl	_ntb_set_ctx
	mov	x20, x0
	cbnz	w0, LBB0_10
; %bb.1:
Lloh2:
	adrp	x8, _perf_msg_cmd_send@GOTPAGE
Lloh3:
	ldr	x8, [x8, _perf_msg_cmd_send@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	ldp	x9, x0, [x19]
	cmp	x9, x8
	b.ne	LBB0_3
; %bb.2:
	bl	_ntb_msg_inbits
	mov	x20, x0
	ldr	x0, [x19, #8]
	bl	_ntb_msg_outbits
	ldr	x8, [x19, #8]
	orr	w1, w0, w20
	mov	x0, x8
	bl	_ntb_msg_set_mask
	mov	x0, x20
	bl	___ffs64
	bl	_BIT_ULL
	mov	x21, x0
	ldr	x0, [x19, #8]
	mov	x1, x21
	bl	_ntb_msg_clear_mask
	mov	x20, x0
	ldr	x0, [x19, #8]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_7
LBB0_3:
	bl	_ntb_spad_count
	cmp	w0, #1
	b.lt	LBB0_6
; %bb.4:
	mov	x20, x0
	mov	w21, #0
Lloh7:
	adrp	x22, _PERF_CMD_INVAL@GOTPAGE
Lloh8:
	ldr	x22, [x22, _PERF_CMD_INVAL@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x19, #8]
	ldr	w2, [x22]
	mov	x1, x21
	bl	_ntb_spad_write
	add	w21, w21, #1
	cmp	w20, w21
	b.ne	LBB0_5
LBB0_6:
	ldr	w0, [x19, #16]
	bl	_PERF_SPAD_NOTIFY
	mov	x21, x0
	ldr	x0, [x19, #8]
	mov	x1, x21
	bl	_ntb_db_clear_mask
	mov	x20, x0
	ldr	x0, [x19, #8]
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_7:
	mov	x2, x21
	bl	_dev_dbg
	ldr	x0, [x19, #8]
	cbz	w20, LBB0_9
; %bb.8:
	bl	_ntb_clear_ctx
	b	LBB0_10
LBB0_9:
Lloh11:
	adrp	x8, _NTB_SPEED_AUTO@GOTPAGE
Lloh12:
	ldr	x8, [x8, _NTB_SPEED_AUTO@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
Lloh14:
	adrp	x8, _NTB_WIDTH_AUTO@GOTPAGE
Lloh15:
	ldr	x8, [x8, _NTB_WIDTH_AUTO@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	bl	_ntb_link_enable
	ldr	x0, [x19, #8]
	bl	_ntb_link_event
LBB0_10:
	mov	x0, x20
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_perf_ops,4,2                   ; @perf_ops
	.comm	_perf_msg_cmd_send,8,3          ; @perf_msg_cmd_send
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MSG sts unmasked %#llx\n"

	.comm	_PERF_CMD_INVAL,4,2             ; @PERF_CMD_INVAL
l_.str.1:                               ; @.str.1
	.asciz	"DB bits unmasked %#llx\n"

	.comm	_NTB_SPEED_AUTO,4,2             ; @NTB_SPEED_AUTO
	.comm	_NTB_WIDTH_AUTO,4,2             ; @NTB_WIDTH_AUTO
	.no_dead_strip	_perf_enable_service
.subsections_via_symbols
