	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gen6_update_ring_freq
_gen6_update_ring_freq:                 ## @gen6_update_ring_freq
	.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), %r14
	leaq	8(%r14), %rdi
	callq	_mutex_is_locked
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_WARN_ON
	xorl	%edi, %edi
	callq	_cpufreq_quick_get_max
                                        ## kill: def $eax killed $eax def $rax
	testl	%eax, %eax
	movq	_tsc_khz@GOTPCREL(%rip), %rcx
	cmovel	(%rcx), %eax
	movl	(%r14), %r12d
	cmpl	4(%r14), %r12d
	jge	LBB0_1
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	imulq	$274877907, %rax, %r15          ## imm = 0x10624DD3
	shrq	$38, %r15
	movl	%r12d, %ebx
	negl	%ebx
	movq	_GEN6_PCODE_WRITE_MIN_FREQ_TABLE@GOTPCREL(%rip), %r13
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	$100, %esi
	callq	_DIV_ROUND_CLOSEST
	movq	_GEN6_PCODE_FREQ_IA_RATIO_SHIFT@GOTPCREL(%rip), %rcx
	movzbl	(%rcx), %ecx
	shll	%cl, %eax
	movl	(%r13), %esi
	orl	%r12d, %eax
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_sandybridge_pcode_write
	leal	-1(%r12), %eax
	incl	%ebx
	cmpl	4(%r14), %r12d
	movl	%eax, %r12d
	jle	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	$800, %edi                      ## imm = 0x320
	cmpl	$15, %r12d
	jl	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r14), %eax
	addl	%ebx, %eax
	imull	$-90, %eax, %edi
	addl	%r15d, %edi
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_tsc_khz,4,2                    ## @tsc_khz
	.comm	_GEN6_PCODE_FREQ_IA_RATIO_SHIFT,4,2 ## @GEN6_PCODE_FREQ_IA_RATIO_SHIFT
	.comm	_GEN6_PCODE_WRITE_MIN_FREQ_TABLE,4,2 ## @GEN6_PCODE_WRITE_MIN_FREQ_TABLE
	.no_dead_strip	_gen6_update_ring_freq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gen6_update_ring_freq
_gen6_update_ring_freq:                 ; @gen6_update_ring_freq
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	ldr	x19, [x0]
	add	x0, x19, #8
	bl	_mutex_is_locked
	cmp	w0, #0
	cset	w0, eq
	bl	_WARN_ON
	mov	w0, #0
	bl	_cpufreq_quick_get_max
Lloh0:
	adrp	x8, _tsc_khz@GOTPAGE
Lloh1:
	ldr	x8, [x8, _tsc_khz@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w0, #0
	csel	w8, w8, w0, eq
	ldp	w20, w9, [x19]
	cmp	w20, w9
	b.ge	LBB0_2
LBB0_1:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_2:
	mov	w9, #19923
	movk	w9, #4194, lsl #16
	umull	x8, w8, w9
	lsr	x21, x8, #38
	neg	w22, w20
Lloh3:
	adrp	x23, _GEN6_PCODE_FREQ_IA_RATIO_SHIFT@GOTPAGE
Lloh4:
	ldr	x23, [x23, _GEN6_PCODE_FREQ_IA_RATIO_SHIFT@GOTPAGEOFF]
Lloh5:
	adrp	x24, _GEN6_PCODE_WRITE_MIN_FREQ_TABLE@GOTPAGE
Lloh6:
	ldr	x24, [x24, _GEN6_PCODE_WRITE_MIN_FREQ_TABLE@GOTPAGEOFF]
	mov	w25, #-90
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x19]
	add	w8, w22, w8
	madd	w0, w8, w25, w21
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	w1, #100
	bl	_DIV_ROUND_CLOSEST
	ldr	w8, [x23]
	lsl	w8, w0, w8
	ldr	w1, [x24]
	orr	w2, w8, w20
	mov	x0, x19
	bl	_sandybridge_pcode_write
	sub	w8, w20, #1
	ldr	w9, [x19, #4]
	add	w22, w22, #1
	cmp	w20, w9
	mov	x20, x8
	b.le	LBB0_1
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w20, #15
	b.ge	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w0, #800
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_tsc_khz,4,2                    ; @tsc_khz
	.comm	_GEN6_PCODE_FREQ_IA_RATIO_SHIFT,4,2 ; @GEN6_PCODE_FREQ_IA_RATIO_SHIFT
	.comm	_GEN6_PCODE_WRITE_MIN_FREQ_TABLE,4,2 ; @GEN6_PCODE_WRITE_MIN_FREQ_TABLE
	.no_dead_strip	_gen6_update_ring_freq
.subsections_via_symbols
