	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nvkm_perfsrc_enable
_nvkm_perfsrc_enable:                   ## @nvkm_perfsrc_enable
	.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
	movq	%rsi, %r15
	movq	%rdi, %r12
	movq	(%rdi), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	$0, -64(%rbp)
	xorl	%ebx, %ebx
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_2 Depth 2
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_2:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%r15), %rax
	movq	(%rax,%rbx,8), %rax
	cmpl	$0, (%rax,%r14,4)
	je	LBB0_7
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=2
	movl	16(%r15), %esi
	movq	8(%r15), %rax
	movl	(%rax,%rbx,4), %edx
	movq	%r12, %rdi
	leaq	-64(%rbp), %rcx
	callq	_nvkm_perfsig_find
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=2
	movq	(%r15), %rcx
	movq	(%rcx,%rbx,8), %rcx
	movl	(%rcx,%r14,4), %edx
	movq	%r12, %rdi
	movq	%rax, %rsi
	callq	_nvkm_perfsrc_find
	testq	%rax, %rax
	je	LBB0_4
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=2
	movq	%r12, %r15
	movq	%rax, %r13
	xorl	%eax, %eax
	cmpq	$0, 16(%r13)
	setne	%al
	movl	(%r13), %r12d
	movzbl	4(%r13), %ecx
	shll	%cl, %r12d
	shll	$31, %eax
	orl	%eax, %r12d
	movl	8(%r13), %esi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r12d, %edx
	callq	_nvkm_mask
	movl	8(%r13), %edx
	movq	%r15, %rdi
	leaq	L_.str(%rip), %rsi
	movl	%r12d, %ecx
	callq	_nvkm_debug
	incq	%r14
	cmpq	$8, %r14
	movq	%r15, %r12
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	jne	LBB0_2
LBB0_7:                                 ##   in Loop: Header=BB0_1 Depth=1
	incq	%rbx
	cmpq	$4, %rbx
	jne	LBB0_1
## %bb.8:
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"enabled source %08x %08x %08x\n"

	.no_dead_strip	_nvkm_perfsrc_enable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nvkm_perfsrc_enable
_nvkm_perfsrc_enable:                   ; @nvkm_perfsrc_enable
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x1
	mov	x20, x0
	mov	x25, #0
	ldr	x21, [x0]
	str	xzr, [sp, #8]
Lloh0:
	adrp	x22, l_.str@PAGE
Lloh1:
	add	x22, x22, l_.str@PAGEOFF
LBB0_1:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_2 Depth 2
	mov	x26, #0
LBB0_2:                                 ;   Parent Loop BB0_1 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x19]
	ldr	x8, [x8, x25, lsl #3]
	ldr	w8, [x8, x26]
	cbz	w8, LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=2
	ldr	w1, [x19, #16]
	ldr	x8, [x19, #8]
	ldr	w2, [x8, x25, lsl #2]
	add	x3, sp, #8
	mov	x0, x20
	bl	_nvkm_perfsig_find
	cbz	x0, LBB0_8
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=2
	mov	x1, x0
	ldr	x8, [x19]
	ldr	x8, [x8, x25, lsl #3]
	ldr	w2, [x8, x26]
	mov	x0, x20
	bl	_nvkm_perfsrc_find
	cbz	x0, LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=2
	mov	x23, x0
	ldr	x8, [x0, #16]
	cmp	x8, #0
	cset	w8, ne
	ldp	w9, w10, [x0]
	lsl	w9, w9, w10
	orr	w24, w9, w8, lsl #31
	ldr	w1, [x0, #8]
	mov	x0, x21
	mov	x2, x24
	bl	_nvkm_mask
	ldr	w2, [x23, #8]
	mov	x0, x20
	mov	x1, x22
	mov	x3, x24
	bl	_nvkm_debug
	add	x26, x26, #4
	cmp	x26, #32
	b.ne	LBB0_2
LBB0_6:                                 ;   in Loop: Header=BB0_1 Depth=1
	add	x25, x25, #1
	cmp	x25, #4
	b.ne	LBB0_1
; %bb.7:
	mov	w0, #0
	b	LBB0_9
LBB0_8:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"enabled source %08x %08x %08x\n"

	.no_dead_strip	_nvkm_perfsrc_enable
.subsections_via_symbols
