	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nvkm_perfdom_read
_nvkm_perfdom_read:                     ## @nvkm_perfdom_read
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r13
	movq	%rsi, -56(%rbp)
	movl	%edx, -44(%rbp)
	leaq	32(%rdi), %r12
	movq	24(%rdi), %rax
	movq	(%rax), %r15
	movq	_ENOSYS@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	callq	_nvif_ioctl
	movq	16(%r14), %rax
	movq	%rax, 16(%rsp)
	movups	(%r14), %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
	testl	%eax, %eax
	jne	LBB0_19
## %bb.1:
	movl	16(%r14), %edx
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	callq	_nvif_ioctl
	movq	8(%r13), %rax
	movq	(%rax), %rdx
	testq	%rdx, %rdx
	je	LBB0_3
## %bb.2:
	movq	16(%r13), %rax
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	*(%rax)
	movq	8(%r13), %rax
LBB0_3:
	movq	8(%rax), %rdx
	testq	%rdx, %rdx
	je	LBB0_5
## %bb.4:
	movq	16(%r13), %rax
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	*(%rax)
	movq	8(%r13), %rax
LBB0_5:
	movq	16(%rax), %rdx
	testq	%rdx, %rdx
	je	LBB0_7
## %bb.6:
	movq	16(%r13), %rax
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	*(%rax)
	movq	8(%r13), %rax
LBB0_7:
	movq	24(%rax), %rdx
	testq	%rdx, %rdx
	je	LBB0_9
## %bb.8:
	movq	16(%r13), %rax
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	*(%rax)
LBB0_9:
	movq	(%r13), %rax
	testq	%rax, %rax
	je	LBB0_20
## %bb.10:
	movq	8(%r13), %rcx
	movq	(%rcx), %rdx
	testq	%rdx, %rdx
	je	LBB0_12
## %bb.11:
	movl	(%rdx), %edx
	movq	8(%r14), %rsi
	movl	%edx, (%rsi)
LBB0_12:
	movq	8(%rcx), %rdx
	testq	%rdx, %rdx
	je	LBB0_14
## %bb.13:
	movl	(%rdx), %edx
	movq	8(%r14), %rsi
	movl	%edx, 4(%rsi)
LBB0_14:
	movq	16(%rcx), %rdx
	testq	%rdx, %rdx
	je	LBB0_16
## %bb.15:
	movl	(%rdx), %edx
	movq	8(%r14), %rsi
	movl	%edx, 8(%rsi)
LBB0_16:
	movq	24(%rcx), %rcx
	testq	%rcx, %rcx
	je	LBB0_18
## %bb.17:
	movl	(%rcx), %ecx
	movq	8(%r14), %rdx
	movl	%ecx, 12(%rdx)
LBB0_18:
	movq	%rax, (%r14)
	xorl	%eax, %eax
	jmp	LBB0_19
LBB0_20:
	movq	_EAGAIN@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_19:
	addq	$40, %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	"perfdom read size %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"perfdom read vers %d\n"

	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.no_dead_strip	_nvkm_perfdom_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nvkm_perfdom_read
_nvkm_perfdom_read:                     ; @nvkm_perfdom_read
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x20, x0
	str	x1, [sp, #40]
	str	w2, [sp, #36]
	add	x22, x0, #32
	ldr	x8, [x0, #24]
	ldr	x21, [x8]
Lloh0:
	adrp	x8, _ENOSYS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOSYS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w23, w8
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	bl	_nvif_ioctl
	ldr	q0, [x19]
	str	q0, [sp]
	ldr	x8, [x19, #16]
	str	x8, [sp, #16]
	add	x1, sp, #40
	add	x2, sp, #36
	mov	x3, sp
	mov	x0, x23
	mov	w4, #0
	mov	w5, #0
	mov	w6, #0
	bl	_nvif_unpack
	cbnz	w0, LBB0_20
; %bb.1:
	ldr	w2, [x19, #16]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x22
	bl	_nvif_ioctl
	ldr	x8, [x20, #8]
	ldr	x2, [x8]
	cbz	x2, LBB0_3
; %bb.2:
	ldr	x8, [x20, #16]
	ldr	x8, [x8]
	mov	x0, x21
	mov	x1, x20
	blr	x8
	ldr	x8, [x20, #8]
LBB0_3:
	ldr	x2, [x8, #8]
	cbz	x2, LBB0_5
; %bb.4:
	ldr	x8, [x20, #16]
	ldr	x8, [x8]
	mov	x0, x21
	mov	x1, x20
	blr	x8
	ldr	x8, [x20, #8]
LBB0_5:
	ldr	x2, [x8, #16]
	cbz	x2, LBB0_7
; %bb.6:
	ldr	x8, [x20, #16]
	ldr	x8, [x8]
	mov	x0, x21
	mov	x1, x20
	blr	x8
	ldr	x8, [x20, #8]
LBB0_7:
	ldr	x2, [x8, #24]
	cbz	x2, LBB0_9
; %bb.8:
	ldr	x8, [x20, #16]
	ldr	x8, [x8]
	mov	x0, x21
	mov	x1, x20
	blr	x8
LBB0_9:
	ldr	x8, [x20]
	cbz	x8, LBB0_19
; %bb.10:
	ldr	x9, [x20, #8]
	ldr	x10, [x9]
	cbz	x10, LBB0_12
; %bb.11:
	ldr	w10, [x10]
	ldr	x11, [x19, #8]
	str	w10, [x11]
LBB0_12:
	ldr	x10, [x9, #8]
	cbz	x10, LBB0_14
; %bb.13:
	ldr	w10, [x10]
	ldr	x11, [x19, #8]
	str	w10, [x11, #4]
LBB0_14:
	ldr	x10, [x9, #16]
	cbz	x10, LBB0_16
; %bb.15:
	ldr	w10, [x10]
	ldr	x11, [x19, #8]
	str	w10, [x11, #8]
LBB0_16:
	ldr	x9, [x9, #24]
	cbz	x9, LBB0_18
; %bb.17:
	ldr	w9, [x9]
	ldr	x10, [x19, #8]
	str	w9, [x10, #12]
LBB0_18:
	mov	w0, #0
	str	x8, [x19]
	b	LBB0_20
LBB0_19:
Lloh7:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_20:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	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	"perfdom read size %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"perfdom read vers %d\n"

	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.no_dead_strip	_nvkm_perfdom_read
.subsections_via_symbols
