	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nvkm_cstate_valid
_nvkm_cstate_valid:                     ## @nvkm_cstate_valid
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	16(%rdi), %rdx
	movq	24(%rdi), %rax
	movq	(%rdx), %r15
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_nv_clk_src_max@GOTPCREL(%rip), %rdx
	movq	(%rdx), %r9
	movq	(%rax), %rbx
	cmpq	%r9, %rbx
	jne	LBB0_6
LBB0_2:
	testq	%r15, %r15
	je	LBB0_5
## %bb.3:
	movl	(%rsi), %esi
	movq	%r15, %rdi
	movl	%ecx, %edx
	callq	_nvkm_volt_map
	testl	%eax, %eax
	js	LBB0_16
## %bb.4:
	movl	%eax, %ebx
	movl	(%r15), %esi
	movl	%r14d, %edi
	callq	_min
	movl	%eax, %ecx
	xorl	%eax, %eax
	cmpl	%ecx, %ebx
	setle	%al
	jmp	LBB0_17
LBB0_5:
	movl	$1, %eax
	jmp	LBB0_17
LBB0_6:
	movq	_NVKM_CLK_DOM_FLAG_VPSTATE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r8d
	addq	$16, %rax
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_8 Depth=1
	movq	(%rax), %rbx
	addq	$16, %rax
	cmpq	%r9, %rbx
	je	LBB0_2
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	testl	%r8d, -8(%rax)
	je	LBB0_7
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movq	8(%rsi), %rdx
	movl	(%rdx,%rbx,4), %ebx
	movl	(%rdi), %edx
	cmpl	$129, %edx
	je	LBB0_13
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=1
	cmpl	$128, %edx
	jne	LBB0_7
## %bb.11:                              ##   in Loop: Header=BB0_8 Depth=1
	movl	8(%rdi), %edx
	testl	%edx, %edx
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_8 Depth=1
	cmpl	%edx, %ebx
	jg	LBB0_16
LBB0_13:                                ##   in Loop: Header=BB0_8 Depth=1
	movl	4(%rdi), %edx
	testl	%edx, %edx
	je	LBB0_7
## %bb.14:                              ##   in Loop: Header=BB0_8 Depth=1
	cmpl	%edx, %ebx
	jle	LBB0_7
LBB0_16:
	xorl	%eax, %eax
LBB0_17:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_nv_clk_src_max,8,3             ## @nv_clk_src_max
	.comm	_NVKM_CLK_DOM_FLAG_VPSTATE,4,2  ## @NVKM_CLK_DOM_FLAG_VPSTATE
	.no_dead_strip	_nvkm_cstate_valid
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nvkm_cstate_valid
_nvkm_cstate_valid:                     ; @nvkm_cstate_valid
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x2
	ldp	x8, x10, [x0, #16]
	ldr	x20, [x8]
	cbz	x10, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _nv_clk_src_max@GOTPAGE
Lloh1:
	ldr	x8, [x8, _nv_clk_src_max@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	x11, [x10]
	cmp	x11, x8
	b.ne	LBB0_6
LBB0_2:
	cbz	x20, LBB0_5
; %bb.3:
	ldr	w1, [x1]
	mov	x0, x20
	mov	x2, x3
	bl	_nvkm_volt_map
	tbnz	w0, #31, LBB0_14
; %bb.4:
	mov	x21, x0
	ldr	w1, [x20]
	mov	x0, x19
	bl	_min
	cmp	w21, w0
	cset	w0, le
	b	LBB0_15
LBB0_5:
	mov	w0, #1
	b	LBB0_15
LBB0_6:
Lloh3:
	adrp	x9, _NVKM_CLK_DOM_FLAG_VPSTATE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _NVKM_CLK_DOM_FLAG_VPSTATE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	add	x10, x10, #16
	b	LBB0_9
LBB0_7:                                 ;   in Loop: Header=BB0_9 Depth=1
	ldr	w12, [x0, #4]
	cmp	w12, #0
	ccmp	w11, w12, #4, ne
	b.gt	LBB0_14
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	ldr	x11, [x10], #16
	cmp	x11, x8
	b.eq	LBB0_2
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldur	w12, [x10, #-8]
	tst	w9, w12
	b.eq	LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	x12, [x1, #8]
	ldr	w11, [x12, x11, lsl #2]
	ldr	w12, [x0]
	cmp	w12, #129
	b.eq	LBB0_7
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=1
	cmp	w12, #128
	b.ne	LBB0_8
; %bb.12:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	w12, [x0, #8]
	cbz	w12, LBB0_7
; %bb.13:                               ;   in Loop: Header=BB0_9 Depth=1
	cmp	w11, w12
	b.le	LBB0_7
LBB0_14:
	mov	w0, #0
LBB0_15:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_nv_clk_src_max,8,3             ; @nv_clk_src_max
	.comm	_NVKM_CLK_DOM_FLAG_VPSTATE,4,2  ; @NVKM_CLK_DOM_FLAG_VPSTATE
	.no_dead_strip	_nvkm_cstate_valid
.subsections_via_symbols
