	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nvkm_pstate_new
_nvkm_pstate_new:                       ## @nvkm_pstate_new
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	8(%rdi), %r12
	movq	16(%rdi), %rax
	movq	(%rax), %rdi
	subq	$8, %rsp
	leaq	-120(%rbp), %rax
	leaq	-52(%rbp), %rdx
	leaq	-60(%rbp), %rcx
	leaq	-72(%rbp), %r8
	leaq	-68(%rbp), %r9
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	pushq	%rax
	callq	_nvbios_perfEp
	addq	$16, %rsp
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %r13
	xorl	%eax, %eax
	cmpl	$255, -120(%rbp)
	je	LBB0_20
## %bb.4:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$40, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%rax, %r14
	movq	%rax, %rdi
	addq	$20, %rdi
	callq	_INIT_LIST_HEAD
	movl	-120(%rbp), %eax
	movl	%eax, 4(%r14)
	movl	-84(%rbp), %eax
	movl	%eax, 16(%r14)
	movl	-88(%rbp), %eax
	movl	%eax, 12(%r14)
	movl	-92(%rbp), %eax
	movl	%eax, 8(%r14)
	movl	-96(%rbp), %eax
	movl	%eax, 32(%r14)
	movl	-100(%rbp), %eax
	movq	24(%r14), %rcx
	movq	_nv_clk_src_core@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movl	%eax, (%rcx,%rdx,4)
	movl	-104(%rbp), %eax
	movq	_nv_clk_src_shader@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movl	%eax, (%rcx,%rdx,4)
	movl	-108(%rbp), %eax
	movq	_nv_clk_src_mem@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movl	%eax, (%rcx,%rdx,4)
	movl	-112(%rbp), %eax
	movq	_nv_clk_src_vdec@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movl	%eax, (%rcx,%rdx,4)
	movl	-116(%rbp), %eax
	movq	_nv_clk_src_dom6@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movl	%eax, (%rcx,%rdx,4)
	movl	-52(%rbp), %eax
	cmpl	$64, %eax
	jl	LBB0_16
## %bb.7:
	addq	$12, %r12
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_8 Depth=1
	movl	4(%r14), %edx
	movl	(%r12), %ecx
	movl	-48(%rbp), %r8d
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_nvkm_clk_adjust
LBB0_14:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	24(%r14), %rcx
	movq	-12(%r12), %rdx
	movl	%eax, (%rcx,%rdx,4)
LBB0_15:                                ##   in Loop: Header=BB0_8 Depth=1
	movl	-52(%rbp), %eax
	addq	$16, %r12
	cmpl	$63, %eax
	jle	LBB0_16
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	-12(%r12), %rcx
	movq	_nv_clk_src_max@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_16
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movl	%eax, -56(%rbp)
	movl	-60(%rbp), %eax
	movl	%eax, -64(%rbp)
	movl	(%r12), %edx
	movl	-72(%rbp), %r9d
	movl	-68(%rbp), %eax
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rsi
	leaq	-56(%rbp), %rcx
	leaq	-64(%rbp), %r8
	leaq	-48(%rbp), %rbx
	pushq	%rbx
	pushq	%rax
	callq	_nvbios_perfSp
	addq	$16, %rsp
	testq	%rax, %rax
	je	LBB0_15
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=1
	cmpl	$64, -56(%rbp)
	jne	LBB0_15
## %bb.11:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	_NVKM_CLK_DOM_FLAG_CORE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -4(%r12)
	jne	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_8 Depth=1
	movl	-48(%rbp), %eax
	jmp	LBB0_14
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_16:
	movl	4(%r14), %esi
	leaq	-52(%rbp), %rdx
	leaq	-60(%rbp), %rcx
	leaq	-48(%rbp), %r8
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	callq	_nvbios_cstepEm
	testq	%rax, %rax
	je	LBB0_19
## %bb.17:
	movl	-48(%rbp), %ebx
	.p2align	4, 0x90
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movl	%ebx, %esi
	movq	%r14, %rdx
	callq	_nvkm_cstate_new
	addl	$-1, %ebx
	jb	LBB0_18
LBB0_19:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_nvkm_pstate_info
	leaq	4(%r15), %rsi
	movq	%r14, %rdi
	callq	_list_add_tail
	incl	(%r15)
	xorl	%eax, %eax
	jmp	LBB0_20
LBB0_5:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_20:
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_nv_clk_src_core,8,3            ## @nv_clk_src_core
	.comm	_nv_clk_src_shader,8,3          ## @nv_clk_src_shader
	.comm	_nv_clk_src_mem,8,3             ## @nv_clk_src_mem
	.comm	_nv_clk_src_vdec,8,3            ## @nv_clk_src_vdec
	.comm	_nv_clk_src_dom6,8,3            ## @nv_clk_src_dom6
	.comm	_nv_clk_src_max,8,3             ## @nv_clk_src_max
	.comm	_NVKM_CLK_DOM_FLAG_CORE,4,2     ## @NVKM_CLK_DOM_FLAG_CORE
	.no_dead_strip	_nvkm_pstate_new
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nvkm_pstate_new
_nvkm_pstate_new:                       ; @nvkm_pstate_new
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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, x0
	ldp	x23, x8, [x0, #8]
	ldr	x21, [x8]
	add	x2, sp, #28
	add	x3, sp, #24
	add	x4, sp, #20
	add	x5, sp, #16
	add	x6, sp, #32
	mov	x0, x21
	bl	_nvbios_perfEp
	cbz	x0, LBB0_3
; %bb.1:
	ldr	w8, [sp, #32]
	cmp	w8, #255
	b.ne	LBB0_4
; %bb.2:
	mov	w0, #0
	b	LBB0_21
LBB0_3:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_20
LBB0_4:
	mov	x22, x0
Lloh2:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	w0, #40
	bl	_kzalloc
	cbz	x0, LBB0_19
; %bb.5:
	mov	x20, x0
	add	x0, x0, #20
	bl	_INIT_LIST_HEAD
	ldr	w8, [sp, #32]
	str	w8, [x20, #4]
	ldr	w8, [sp, #68]
	str	w8, [x20, #16]
	ldur	d0, [sp, #60]
	str	d0, [x20, #8]
	ldp	w9, w8, [sp, #52]
	str	w8, [x20, #32]
Lloh5:
	adrp	x8, _nv_clk_src_core@GOTPAGE
Lloh6:
	ldr	x8, [x8, _nv_clk_src_core@GOTPAGEOFF]
	ldr	x10, [x20, #24]
Lloh7:
	ldr	x8, [x8]
	str	w9, [x10, x8, lsl #2]
Lloh8:
	adrp	x8, _nv_clk_src_shader@GOTPAGE
Lloh9:
	ldr	x8, [x8, _nv_clk_src_shader@GOTPAGEOFF]
	ldr	w9, [sp, #48]
Lloh10:
	ldr	x8, [x8]
	str	w9, [x10, x8, lsl #2]
Lloh11:
	adrp	x8, _nv_clk_src_mem@GOTPAGE
Lloh12:
	ldr	x8, [x8, _nv_clk_src_mem@GOTPAGEOFF]
	ldr	w9, [sp, #44]
Lloh13:
	ldr	x8, [x8]
	str	w9, [x10, x8, lsl #2]
Lloh14:
	adrp	x8, _nv_clk_src_vdec@GOTPAGE
Lloh15:
	ldr	x8, [x8, _nv_clk_src_vdec@GOTPAGEOFF]
	ldr	w9, [sp, #40]
Lloh16:
	ldr	x8, [x8]
	str	w9, [x10, x8, lsl #2]
Lloh17:
	adrp	x8, _nv_clk_src_dom6@GOTPAGE
Lloh18:
	ldr	x8, [x8, _nv_clk_src_dom6@GOTPAGEOFF]
	ldr	w9, [sp, #36]
Lloh19:
	ldr	x8, [x8]
	str	w9, [x10, x8, lsl #2]
	ldr	w8, [sp, #28]
	cmp	w8, #64
	b.lt	LBB0_15
; %bb.6:
	add	x23, x23, #12
Lloh20:
	adrp	x24, _nv_clk_src_max@GOTPAGE
Lloh21:
	ldr	x24, [x24, _nv_clk_src_max@GOTPAGEOFF]
Lloh22:
	adrp	x25, _NVKM_CLK_DOM_FLAG_CORE@GOTPAGE
Lloh23:
	ldr	x25, [x25, _NVKM_CLK_DOM_FLAG_CORE@GOTPAGEOFF]
	b	LBB0_10
LBB0_7:                                 ;   in Loop: Header=BB0_10 Depth=1
	ldr	w2, [x20, #4]
	ldr	w3, [x23]
	ldr	w4, [sp, #72]
	mov	x0, x19
	mov	w1, #0
	bl	_nvkm_clk_adjust
LBB0_8:                                 ;   in Loop: Header=BB0_10 Depth=1
	ldr	x8, [x20, #24]
	ldur	x9, [x23, #-12]
	str	w0, [x8, x9, lsl #2]
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	ldr	w8, [sp, #28]
	add	x23, x23, #16
	cmp	w8, #63
	b.le	LBB0_15
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldur	x9, [x23, #-12]
	ldr	x10, [x24]
	cmp	x9, x10
	b.eq	LBB0_15
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	str	w8, [sp, #12]
	ldp	w5, w8, [sp, #20]
	str	w8, [sp, #8]
	ldr	w2, [x23]
	ldr	w6, [sp, #16]
	add	x3, sp, #12
	add	x4, sp, #8
	add	x7, sp, #72
	mov	x0, x21
	mov	x1, x22
	bl	_nvbios_perfSp
	cbz	x0, LBB0_9
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	w8, [sp, #12]
	cmp	w8, #64
	b.ne	LBB0_9
; %bb.13:                               ;   in Loop: Header=BB0_10 Depth=1
	ldur	w8, [x23, #-4]
	ldr	w9, [x25]
	tst	w9, w8
	b.ne	LBB0_7
; %bb.14:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	w0, [sp, #72]
	b	LBB0_8
LBB0_15:
	ldr	w1, [x20, #4]
	add	x2, sp, #28
	add	x3, sp, #24
	add	x4, sp, #72
	mov	x0, x21
	bl	_nvbios_cstepEm
	cbz	x0, LBB0_18
; %bb.16:
	ldr	w21, [sp, #72]
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_nvkm_cstate_new
	sub	w21, w21, #1
	cmn	w21, #1
	b.ne	LBB0_17
LBB0_18:
	mov	x0, x19
	mov	x1, x20
	bl	_nvkm_pstate_info
	add	x1, x19, #4
	mov	x0, x20
	bl	_list_add_tail
	mov	w0, #0
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
	b	LBB0_21
LBB0_19:
Lloh24:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_20:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_21:
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_nv_clk_src_core,8,3            ; @nv_clk_src_core
	.comm	_nv_clk_src_shader,8,3          ; @nv_clk_src_shader
	.comm	_nv_clk_src_mem,8,3             ; @nv_clk_src_mem
	.comm	_nv_clk_src_vdec,8,3            ; @nv_clk_src_vdec
	.comm	_nv_clk_src_dom6,8,3            ; @nv_clk_src_dom6
	.comm	_nv_clk_src_max,8,3             ; @nv_clk_src_max
	.comm	_NVKM_CLK_DOM_FLAG_CORE,4,2     ; @NVKM_CLK_DOM_FLAG_CORE
	.no_dead_strip	_nvkm_pstate_new
.subsections_via_symbols
