	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nvkm_clk_init
_nvkm_clk_init:                         ## @nvkm_clk_init
	.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	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_nvkm_clk
	movq	%rax, %r12
	movq	64(%rax), %r13
	leaq	40(%rax), %r15
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$24, %edx
	callq	_memset
	leaq	56(%r12), %rdi
	callq	_INIT_LIST_HEAD
	movl	$255, 40(%r12)
	movq	(%r13), %rsi
	movq	_nv_clk_src_max@GOTPCREL(%rip), %r14
	cmpq	(%r14), %rsi
	je	LBB0_5
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	callq	_nvkm_clk_read
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	48(%r12), %rax
	movq	(%r13), %rcx
	movl	%ebx, (%rax,%rcx,4)
	movq	8(%r13), %rsi
	addq	$8, %r13
	cmpq	(%r14), %rsi
	jne	LBB0_2
LBB0_5:
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_nvkm_pstate_info
	movq	32(%r12), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_6
## %bb.8:
	movq	%r12, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*%rax                           ## TAILCALL
LBB0_3:
	movq	(%r13), %rdx
	leaq	L_.str(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_nvkm_error
	jmp	LBB0_7
LBB0_6:
	movq	16(%r12), %rax
	decq	%rax
	movq	%rax, 24(%r12)
	movq	$0, 8(%r12)
	movabsq	$390842023935, %rax             ## imm = 0x5AFFFFFFFF
	movq	%rax, (%r12)
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_nvkm_pstate_calc
	xorl	%ebx, %ebx
LBB0_7:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_nv_clk_src_max,8,3             ## @nv_clk_src_max
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%02x freq unknown\n"

	.no_dead_strip	_nvkm_clk_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function nvkm_clk_init
lCPI0_0:
	.long	4294967295                      ; 0xffffffff
	.long	90                              ; 0x5a
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_nvkm_clk_init:                         ; @nvkm_clk_init
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x0
	bl	_nvkm_clk
	mov	x19, x0
	ldr	x23, [x0, #64]
	add	x21, x0, #40
	mov	x0, x21
	mov	w1, #0
	mov	w2, #24
	bl	_memset
	add	x0, x19, #56
	bl	_INIT_LIST_HEAD
	mov	w8, #255
	str	w8, [x19, #40]
	ldr	x1, [x23]
Lloh0:
	adrp	x24, _nv_clk_src_max@GOTPAGE
Lloh1:
	ldr	x24, [x24, _nv_clk_src_max@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x24]
	mov	x0, x19
	cmp	x1, x8
	b.eq	LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	bl	_nvkm_clk_read
	mov	x22, x0
	tbnz	w0, #31, LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x8, [x19, #48]
	ldr	x9, [x23]
	str	w22, [x8, x9, lsl #2]
	ldr	x1, [x23, #8]!
	b	LBB0_1
LBB0_4:
	mov	x1, x21
	bl	_nvkm_pstate_info
	ldr	x8, [x19, #32]
	ldr	x1, [x8]
	cbz	x1, LBB0_7
; %bb.5:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	br	x1
LBB0_6:
	ldr	x2, [x23]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_nvkm_error
	b	LBB0_8
LBB0_7:
	ldr	x8, [x19, #16]
	sub	x8, x8, #1
	str	x8, [x19, #24]
	str	xzr, [x19, #8]
Lloh4:
	adrp	x8, lCPI0_0@PAGE
Lloh5:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [x19]
	mov	x0, x19
	mov	w1, #1
	bl	_nvkm_pstate_calc
	mov	w22, #0
LBB0_8:
	mov	x0, x22
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdr	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_nv_clk_src_max,8,3             ; @nv_clk_src_max
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%02x freq unknown\n"

	.no_dead_strip	_nvkm_clk_init
.subsections_via_symbols
