	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nva3_pm_clocks_set             ## -- Begin function nva3_pm_clocks_set
	.p2align	4, 0x90
_nva3_pm_clocks_set:                    ## @nva3_pm_clocks_set
	.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
	pushq	%rax
	.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, %r12
	callq	_nouveau_dev
	movq	%rax, %rbx
	movq	%r12, %rdi
	callq	_nouveau_drm
	movq	%rax, %r13
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	movq	%rbx, %rdi
	movl	$4195108, %esi                  ## imm = 0x400324
	xorl	%edx, %edx
	callq	_nv_wr32
	movq	%rbx, %rdi
	movl	$4195112, %esi                  ## imm = 0x400328
	movl	$5242908, %edx                  ## imm = 0x50001C
	callq	_nv_wr32
	movq	_nva3_pm_grcp_idle@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movq	%r12, %rdx
	callq	_nv_wait_cb
	testl	%eax, %eax
	je	LBB0_1
## %bb.3:
	movq	%rbx, %rdi
	movl	$9476, %esi                     ## imm = 0x2504
	movl	$1, %edx
	movl	$1, %ecx
	callq	_nv_mask
	movq	%rbx, %rdi
	movl	$9476, %esi                     ## imm = 0x2504
	movl	$16, %edx
	movl	$16, %ecx
	callq	_nv_wait
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	leaq	28(%r14), %rcx
	xorl	%r15d, %r15d
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	$16896, %edx                    ## imm = 0x4200
	callq	_prog_pll
	leaq	24(%r14), %rcx
	movq	%r12, %rdi
	movl	$1, %esi
	movl	$16928, %edx                    ## imm = 0x4220
	callq	_prog_pll
	leaq	20(%r14), %rdx
	movq	%r12, %rdi
	movl	$32, %esi
	callq	_prog_clk
	leaq	16(%r14), %rdx
	movq	%r12, %rdi
	movl	$33, %esi
	callq	_prog_clk
	cmpq	$0, 8(%r14)
	jne	LBB0_7
## %bb.6:
	cmpq	$0, (%r14)
	je	LBB0_8
LBB0_7:
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_prog_mem
	jmp	LBB0_8
LBB0_1:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_2
LBB0_4:
	leaq	L_.str.1(%rip), %rsi
LBB0_2:
	movq	%r13, %rdi
	callq	_NV_ERROR
LBB0_8:
	movq	%rbx, %rdi
	movl	$9476, %esi                     ## imm = 0x2504
	movl	$1, %edx
	xorl	%ecx, %ecx
	callq	_nv_mask
	movq	%rbx, %rdi
	movl	$4195108, %esi                  ## imm = 0x400324
	xorl	%edx, %edx
	callq	_nv_wr32
	movq	%rbx, %rdi
	movl	$4195112, %esi                  ## imm = 0x400328
	movl	$7340188, %edx                  ## imm = 0x70009C
	callq	_nv_wr32
	movq	%rbx, %rdi
	movl	$4195080, %esi                  ## imm = 0x400308
	callq	_nv_rd32
	cmpl	$5242908, %eax                  ## imm = 0x50001C
	jne	LBB0_10
## %bb.9:
	movq	%rbx, %rdi
	movl	$4196388, %esi                  ## imm = 0x400824
	movl	$268435456, %edx                ## imm = 0x10000000
	movl	$268435456, %ecx                ## imm = 0x10000000
	callq	_nv_mask
LBB0_10:
	movq	%r14, %rdi
	callq	_kfree
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_nva3_pm_grcp_idle,4,2          ## @nva3_pm_grcp_idle
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pm: ctxprog didn't go idle\n"

L_.str.1:                               ## @.str.1
	.asciz	"pm: fifo didn't go idle\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nva3_pm_clocks_set             ; -- Begin function nva3_pm_clocks_set
	.p2align	2
_nva3_pm_clocks_set:                    ; @nva3_pm_clocks_set
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x22, x0
	mov	w25, #28
	movk	w25, #80, lsl #16
	mov	w24, #804
	movk	w24, #64, lsl #16
	bl	_nouveau_dev
	mov	x20, x0
	mov	x0, x22
	bl	_nouveau_drm
	mov	x23, x0
Lloh0:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w21, w8
	mov	x0, x20
	mov	w1, #804
	movk	w1, #64, lsl #16
	mov	w2, #0
	bl	_nv_wr32
	add	w1, w24, #4
	mov	x0, x20
	mov	w2, #28
	movk	w2, #80, lsl #16
	bl	_nv_wr32
Lloh3:
	adrp	x8, _nva3_pm_grcp_idle@GOTPAGE
Lloh4:
	ldr	x8, [x8, _nva3_pm_grcp_idle@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, x22
	bl	_nv_wait_cb
	cbz	w0, LBB0_6
; %bb.1:
	mov	x0, x20
	mov	w1, #9476
	mov	w2, #1
	mov	w3, #1
	bl	_nv_mask
	mov	x0, x20
	mov	w1, #9476
	mov	w2, #16
	mov	w3, #16
	bl	_nv_wait
	cbz	w0, LBB0_7
; %bb.2:
	add	x3, x19, #28
	mov	x0, x22
	mov	w1, #0
	mov	w2, #16896
	bl	_prog_pll
	add	x3, x19, #24
	mov	x0, x22
	mov	w1, #1
	mov	w2, #16928
	bl	_prog_pll
	add	x2, x19, #20
	mov	x0, x22
	mov	w1, #32
	bl	_prog_clk
	add	x2, x19, #16
	mov	x0, x22
	mov	w1, #33
	bl	_prog_clk
	ldr	x8, [x19, #8]
	cbnz	x8, LBB0_4
; %bb.3:
	ldr	x8, [x19]
	cbz	x8, LBB0_5
LBB0_4:
	mov	x0, x22
	mov	x1, x19
	bl	_prog_mem
LBB0_5:
	mov	w21, #0
	b	LBB0_9
LBB0_6:
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_8
LBB0_7:
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_8:
	mov	x0, x23
	bl	_NV_ERROR
LBB0_9:
	mov	x0, x20
	mov	w1, #9476
	mov	w2, #1
	mov	w3, #0
	bl	_nv_mask
	mov	x0, x20
	mov	w1, #804
	movk	w1, #64, lsl #16
	mov	w2, #0
	bl	_nv_wr32
	add	w1, w24, #4
	mov	x0, x20
	mov	w2, #156
	movk	w2, #112, lsl #16
	bl	_nv_wr32
	sub	w1, w24, #28
	mov	x0, x20
	bl	_nv_rd32
	cmp	w0, w25
	b.ne	LBB0_11
; %bb.10:
	add	w1, w24, #1280
	mov	x0, x20
	mov	w2, #268435456
	mov	w3, #268435456
	bl	_nv_mask
LBB0_11:
	mov	x0, x19
	bl	_kfree
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_nva3_pm_grcp_idle,4,2          ; @nva3_pm_grcp_idle
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pm: ctxprog didn't go idle\n"

l_.str.1:                               ; @.str.1
	.asciz	"pm: fifo didn't go idle\n"

.subsections_via_symbols
