	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gm20b_clk_init_safe_fmax
_gm20b_clk_init_safe_fmax:              ## @gm20b_clk_init_safe_fmax
	.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	8(%rdi), %r8
	movq	16(%rdi), %rax
	movq	(%rax), %rax
	movl	(%r8), %r12d
	movl	(%rax), %edx
	xorl	%r13d, %r13d
	cmpl	$2, %edx
	jl	LBB0_8
## %bb.1:
	movq	8(%rax), %rsi
	movl	(%rsi), %ebx
	leaq	-1(%rdx), %rcx
	addq	$-2, %rdx
	movl	%ecx, %r9d
	andl	$3, %r9d
	cmpq	$3, %rdx
	jae	LBB0_15
## %bb.2:
	xorl	%r13d, %r13d
	movl	$1, %eax
LBB0_3:
	testq	%r9, %r9
	je	LBB0_8
## %bb.4:
	leaq	(%rsi,%rax,8), %rcx
	addq	$4, %rcx
	xorl	%esi, %esi
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	incq	%rsi
	cmpq	%rsi, %r9
	je	LBB0_8
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	-4(%rcx,%rsi,8), %edx
	cmpl	%ebx, %edx
	jg	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	(%rcx,%rsi,8), %r13d
	movl	%edx, %ebx
	jmp	LBB0_7
LBB0_8:
	leaq	16(%rdi), %rbx
	testl	%r12d, %r12d
	jle	LBB0_14
## %bb.9:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	8(%r8), %rbx
	shlq	$4, %r12
	xorl	%r14d, %r14d
	movq	_nv_clk_src_gpc@GOTPCREL(%rip), %r15
	xorl	%eax, %eax
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_10 Depth=1
	addq	$16, %r14
	cmpq	%r14, %r12
	je	LBB0_13
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	cmpl	%r13d, (%rbx,%r14)
	jne	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	8(%rbx,%r14), %rcx
	movq	(%r15), %rdx
	movl	(%rcx,%rdx,4), %esi
	movl	%eax, %edi
	callq	_max
	jmp	LBB0_12
LBB0_13:
	testl	%eax, %eax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_14
## %bb.25:
	imull	$90, %eax, %eax
	cltq
	imulq	$1374389535, %rax, %rdx         ## imm = 0x51EB851F
	movq	%rdx, %rax
	shrq	$63, %rax
	sarq	$37, %rdx
	addl	%eax, %edx
	movl	%edx, (%rcx)
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_nvkm_debug
	xorl	%eax, %eax
	jmp	LBB0_26
LBB0_14:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_nvkm_error
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_26:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	andq	$-4, %rcx
	negq	%rcx
	xorl	%r13d, %r13d
	movl	$1, %eax
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_24:                                ##   in Loop: Header=BB0_16 Depth=1
	leaq	(%rcx,%rax), %rdx
	addq	$4, %rdx
	addq	$4, %rax
	cmpq	$1, %rdx
	je	LBB0_3
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rsi,%rax,8), %edx
	cmpl	%ebx, %edx
	jg	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_16 Depth=1
	movl	4(%rsi,%rax,8), %r13d
	movl	%edx, %ebx
LBB0_18:                                ##   in Loop: Header=BB0_16 Depth=1
	movl	8(%rsi,%rax,8), %edx
	cmpl	%ebx, %edx
	jg	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_16 Depth=1
	movl	12(%rsi,%rax,8), %r13d
	movl	%edx, %ebx
LBB0_20:                                ##   in Loop: Header=BB0_16 Depth=1
	movl	16(%rsi,%rax,8), %edx
	cmpl	%ebx, %edx
	jg	LBB0_22
## %bb.21:                              ##   in Loop: Header=BB0_16 Depth=1
	movl	20(%rsi,%rax,8), %r13d
	movl	%edx, %ebx
LBB0_22:                                ##   in Loop: Header=BB0_16 Depth=1
	movl	24(%rsi,%rax,8), %edx
	cmpl	%ebx, %edx
	jg	LBB0_24
## %bb.23:                              ##   in Loop: Header=BB0_16 Depth=1
	movl	28(%rsi,%rax,8), %r13d
	movl	%edx, %ebx
	jmp	LBB0_24
	.cfi_endproc
                                        ## -- End function
	.comm	_nv_clk_src_gpc,8,3             ## @nv_clk_src_gpc
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to evaluate safe fmax\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"safe fmax @ vmin = %u Khz\n"

	.no_dead_strip	_gm20b_clk_init_safe_fmax
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gm20b_clk_init_safe_fmax
_gm20b_clk_init_safe_fmax:              ; @gm20b_clk_init_safe_fmax
	.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
	mov	x19, x0
	ldr	x8, [x19, #16]!
	ldr	x9, [x8]
	ldur	x8, [x19, #-8]
	ldr	w21, [x8]
	ldr	w10, [x9]
	cmp	w10, #1
	b.le	LBB0_5
; %bb.1:
	mov	w22, #0
	ldr	x9, [x9, #8]
	ldr	w11, [x9], #12
	sub	x10, x10, #1
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x9, x9, #8
	subs	x10, x10, #1
	b.eq	LBB0_6
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldur	w12, [x9, #-4]
	cmp	w12, w11
	b.gt	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w22, [x9]
	mov	x11, x12
	b	LBB0_2
LBB0_5:
	mov	w22, #0
LBB0_6:
	cmp	w21, #1
	b.lt	LBB0_13
; %bb.7:
	mov	w0, #0
	ldr	x8, [x8, #8]
	add	x23, x8, #8
Lloh0:
	adrp	x24, _nv_clk_src_gpc@GOTPAGE
Lloh1:
	ldr	x24, [x24, _nv_clk_src_gpc@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	add	x23, x23, #16
	subs	x21, x21, #1
	b.eq	LBB0_11
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldur	w8, [x23, #-8]
	cmp	w8, w22
	b.ne	LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	x8, [x23]
	ldr	x9, [x24]
	ldr	w1, [x8, x9, lsl #2]
	bl	_max
	b	LBB0_8
LBB0_11:
	cbz	w0, LBB0_13
; %bb.12:
	mov	w8, #90
	mul	w8, w0, w8
	mov	w9, #34079
	movk	w9, #20971, lsl #16
	smull	x8, w8, w9
	lsr	x9, x8, #63
	asr	x8, x8, #37
	add	w2, w8, w9
	str	w2, [x20]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_nvkm_debug
	mov	w0, #0
	b	LBB0_14
LBB0_13:
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_nvkm_error
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_14:
	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 AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_nv_clk_src_gpc,8,3             ; @nv_clk_src_gpc
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to evaluate safe fmax\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"safe fmax @ vmin = %u Khz\n"

	.no_dead_strip	_gm20b_clk_init_safe_fmax
.subsections_via_symbols
