	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nvkm_perfmon_mthd_query_domain
_nvkm_perfmon_mthd_query_domain:        ## @nvkm_perfmon_mthd_query_domain
	.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	$72, %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, %r13
	movq	%rsi, -56(%rbp)
	movl	%edx, -44(%rbp)
	movq	(%rdi), %r14
	addq	$8, %r13
	movq	_ENOSYS@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_nvif_ioctl
	movq	16(%r15), %rax
	movq	%rax, -64(%rbp)
	movups	(%r15), %xmm0
	movaps	%xmm0, -80(%rbp)
	movq	-64(%rbp), %rax
	movq	%rax, 16(%rsp)
	movaps	-80(%rbp), %xmm0
	movups	%xmm0, (%rsp)
	leaq	-56(%rbp), %rsi
	leaq	-44(%rbp), %rdx
	movl	%ebx, %edi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_nvif_unpack
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_12
## %bb.1:
	movl	(%r15), %ecx
	movl	20(%r15), %edx
	leaq	L_.str.1(%rip), %rsi
	xorl	%r12d, %r12d
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_nvif_ioctl
	movzbl	(%r15), %ebx
	movq	%r14, %rdi
	callq	_nvkm_pm_count_perfdom
	cmpl	%eax, %ebx
	jle	LBB0_3
## %bb.2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_3:
	movl	%eax, %r13d
	testl	%ebx, %ebx
	je	LBB0_6
## %bb.4:
	leal	-1(%rbx), %r12d
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	_nvkm_perfdom_find
	testq	%rax, %rax
	je	LBB0_10
## %bb.5:
	movq	%rax, %r14
	movl	%r12d, 4(%r15)
	movq	%rax, %rdi
	callq	_nvkm_perfdom_count_perfsig
	movl	%eax, 16(%r15)
	movl	12(%r15), %edi
	movl	(%r14), %esi
	movl	$3, %edx
	callq	_strncpy
	movl	$4, 8(%r15)
LBB0_6:
	cmpl	%r13d, %ebx
	jge	LBB0_8
## %bb.7:
	incl	%ebx
	movl	%ebx, (%r15)
	jmp	LBB0_9
LBB0_8:
	movl	$255, (%r15)
LBB0_9:
	xorl	%r12d, %r12d
	jmp	LBB0_12
LBB0_10:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
LBB0_11:
	subl	(%rax), %r12d
LBB0_12:
	movl	%r12d, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOSYS,4,2                     ## @ENOSYS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"perfmon query domain size %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"perfmon domain vers %d iter %02x\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_nvkm_perfmon_mthd_query_domain
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nvkm_perfmon_mthd_query_domain
_nvkm_perfmon_mthd_query_domain:        ; @nvkm_perfmon_mthd_query_domain
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x19, x1
	mov	x21, x0
	str	x1, [sp, #56]
	str	w2, [sp, #52]
	ldr	x20, [x21], #8
Lloh0:
	adrp	x8, _ENOSYS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOSYS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w22, w8
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_nvif_ioctl
	ldr	q0, [x19]
	str	q0, [sp, #16]
	ldr	x8, [x19, #16]
	str	x8, [sp, #32]
	add	x1, sp, #56
	add	x2, sp, #52
	add	x3, sp, #16
	mov	x0, x22
	mov	w4, #0
	mov	w5, #0
	mov	w6, #0
	bl	_nvif_unpack
	cbnz	w0, LBB0_10
; %bb.1:
	ldr	w2, [x19, #20]
	ldr	w8, [x19]
	str	x8, [sp]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_nvif_ioctl
	ldrb	w23, [x19]
	mov	x0, x20
	bl	_nvkm_pm_count_perfdom
	cmp	w23, w0
	b.le	LBB0_3
LBB0_2:
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_10
LBB0_3:
	mov	x21, x0
	cbz	w23, LBB0_6
; %bb.4:
	sub	w22, w23, #1
	mov	x0, x20
	mov	x1, x22
	bl	_nvkm_perfdom_find
	cbz	x0, LBB0_2
; %bb.5:
	mov	x20, x0
	str	w22, [x19, #4]
	bl	_nvkm_perfdom_count_perfsig
	str	w0, [x19, #16]
	ldr	w0, [x19, #12]
	ldr	w1, [x20]
	mov	w2, #3
	bl	_strncpy
	mov	w8, #4
	str	w8, [x19, #8]
LBB0_6:
	cmp	w23, w21
	b.ge	LBB0_8
; %bb.7:
	mov	w0, #0
	add	w8, w23, #1
	b	LBB0_9
LBB0_8:
	mov	w0, #0
	mov	w8, #255
LBB0_9:
	str	w8, [x19]
LBB0_10:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOSYS,4,2                     ; @ENOSYS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"perfmon query domain size %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"perfmon domain vers %d iter %02x\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_nvkm_perfmon_mthd_query_domain
.subsections_via_symbols
