	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nvkm_cstate_new
_nvkm_cstate_new:                       ## @nvkm_cstate_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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movl	%esi, %r12d
	movq	%rdi, %r15
	movq	(%rdi), %rbx
	movq	8(%rdi), %rax
	movq	(%rax), %r13
	movq	8(%rax), %rdi
	leaq	-56(%rbp), %rdx
	leaq	-52(%rbp), %rcx
	leaq	-48(%rbp), %r8
	callq	_nvbios_cstepXp
	testl	%eax, %eax
	je	LBB0_1
## %bb.3:
	testq	%r13, %r13
	je	LBB0_6
## %bb.4:
	movl	-44(%rbp), %esi
	movq	%r13, %rdi
	callq	_nvkm_volt_map_min
	cmpq	(%r13), %rax
	jle	LBB0_6
## %bb.5:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_6:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$24, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movq	%rax, %r13
	movq	24(%r14), %rax
	movq	%rax, 16(%r13)
	movups	8(%r14), %xmm0
	movups	%xmm0, (%r13)
	movl	-44(%rbp), %eax
	movl	%eax, 16(%r13)
	movl	%r12d, (%r13)
	testq	%rbx, %rbx
	je	LBB0_14
## %bb.9:
	movq	(%rbx), %rax
	movq	_nv_clk_src_max@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
LBB0_14:
	addq	$4, %r13
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_list_add
	xorl	%eax, %eax
	jmp	LBB0_15
LBB0_1:
	movq	_ENOENT@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_7:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_15:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	addq	$16, %rbx
	movq	_NVKM_CLK_DOM_FLAG_CORE@GOTPCREL(%rip), %r12
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_11 Depth=1
	movq	(%rbx), %rax
	addq	$16, %rbx
	movq	_nv_clk_src_max@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_14
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %eax
	testl	%eax, -8(%rbx)
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	movl	4(%r14), %edx
	movl	-4(%rbx), %ecx
	movl	-48(%rbp), %r8d
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_nvkm_clk_adjust
	movq	8(%r13), %rcx
	movq	-16(%rbx), %rdx
	movl	%eax, (%rcx,%rdx,4)
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.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_cstate_new
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nvkm_cstate_new
_nvkm_cstate_new:                       ; @nvkm_cstate_new
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x2
	mov	x22, x1
	mov	x20, x0
	ldp	x23, x8, [x0]
	ldp	x21, x0, [x8]
	add	x2, sp, #4
	mov	x3, sp
	add	x4, sp, #8
	bl	_nvbios_cstepXp
	cbz	w0, LBB0_8
; %bb.1:
	cbz	x21, LBB0_4
; %bb.2:
	ldr	w1, [sp, #12]
	mov	x0, x21
	bl	_nvkm_volt_map_min
	ldr	x8, [x21]
	cmp	x0, x8
	b.le	LBB0_4
; %bb.3:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_10
LBB0_4:
Lloh2:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	w0, #24
	bl	_kzalloc
	cbz	x0, LBB0_9
; %bb.5:
	mov	x21, x0
	ldur	q0, [x19, #8]
	ldr	x8, [x19, #24]
	str	x8, [x0, #16]
	str	q0, [x0]
	ldr	w8, [sp, #12]
	str	w8, [x0, #16]
	str	w22, [x0]
	cbz	x23, LBB0_7
; %bb.6:
	ldr	x8, [x23]
Lloh5:
	adrp	x22, _nv_clk_src_max@GOTPAGE
Lloh6:
	ldr	x22, [x22, _nv_clk_src_max@GOTPAGEOFF]
	ldr	x9, [x22]
	cmp	x8, x9
	b.ne	LBB0_12
LBB0_7:
	add	x0, x21, #4
	mov	x1, x19
	bl	_list_add
	mov	w0, #0
	b	LBB0_11
LBB0_8:
Lloh7:
	adrp	x8, _ENOENT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_11:
	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
	add	sp, sp, #80
	ret
LBB0_12:
	add	x23, x23, #16
Lloh11:
	adrp	x24, _NVKM_CLK_DOM_FLAG_CORE@GOTPAGE
Lloh12:
	ldr	x24, [x24, _NVKM_CLK_DOM_FLAG_CORE@GOTPAGEOFF]
	b	LBB0_14
LBB0_13:                                ;   in Loop: Header=BB0_14 Depth=1
	ldr	x8, [x23], #16
	ldr	x9, [x22]
	cmp	x8, x9
	b.eq	LBB0_7
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldur	w8, [x23, #-8]
	ldr	w9, [x24]
	tst	w9, w8
	b.eq	LBB0_13
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	ldr	w2, [x19, #4]
	ldur	w3, [x23, #-4]
	ldr	w4, [sp, #8]
	mov	x0, x20
	mov	w1, #1
	bl	_nvkm_clk_adjust
	ldr	x8, [x21, #8]
	ldur	x9, [x23, #-16]
	str	w0, [x8, x9, lsl #2]
	b	LBB0_13
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.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_cstate_new
.subsections_via_symbols
