	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_smu7_fan_ctrl_get_fan_speed_rpm ## -- Begin function smu7_fan_ctrl_get_fan_speed_rpm
	.p2align	4, 0x90
_smu7_fan_ctrl_get_fan_speed_rpm:       ## @smu7_fan_ctrl_get_fan_speed_rpm
	.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
	cmpq	$0, 24(%rdi)
	je	LBB0_1
LBB0_2:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
LBB0_3:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%rdi, %rbx
	cmpl	$0, 16(%rdi)
	je	LBB0_2
## %bb.4:
	movq	%rsi, %r14
	movl	8(%rbx), %edi
	movq	_CGS_IND_REG__SMC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_CG_TACH_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_TACH_PERIOD@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_PHM_READ_VFPF_INDIRECT_FIELD
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	movl	%eax, %r15d
	movq	(%rbx), %rdi
	callq	_amdgpu_asic_get_xclk
	imull	$600000, %eax, %eax             ## imm = 0x927C0
	cltd
	idivl	%r15d
	movl	%eax, (%r14)
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_CGS_IND_REG__SMC,4,2           ## @CGS_IND_REG__SMC
	.comm	_CG_TACH_STATUS,4,2             ## @CG_TACH_STATUS
	.comm	_TACH_PERIOD,4,2                ## @TACH_PERIOD
	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_smu7_fan_ctrl_get_fan_speed_rpm ; -- Begin function smu7_fan_ctrl_get_fan_speed_rpm
	.p2align	2
_smu7_fan_ctrl_get_fan_speed_rpm:       ; @smu7_fan_ctrl_get_fan_speed_rpm
	.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
	ldr	x8, [x0, #24]
	cbz	x8, LBB0_4
LBB0_1:
Lloh0:
	adrp	x8, _ENODEV@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	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
LBB0_4:
	mov	x20, x0
	ldr	w8, [x0, #16]
	cbz	w8, LBB0_1
; %bb.5:
	mov	x19, x1
	ldr	w0, [x20, #8]
Lloh2:
	adrp	x8, _CGS_IND_REG__SMC@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CGS_IND_REG__SMC@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x8, _CG_TACH_STATUS@GOTPAGE
Lloh6:
	ldr	x8, [x8, _CG_TACH_STATUS@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
Lloh8:
	adrp	x8, _TACH_PERIOD@GOTPAGE
Lloh9:
	ldr	x8, [x8, _TACH_PERIOD@GOTPAGEOFF]
Lloh10:
	ldr	w3, [x8]
	bl	_PHM_READ_VFPF_INDIRECT_FIELD
	cbz	w0, LBB0_7
; %bb.6:
	mov	x21, x0
	ldr	x0, [x20]
	bl	_amdgpu_asic_get_xclk
	mov	x8, x0
	mov	w0, #0
	mov	w9, #10176
	movk	w9, #9, lsl #16
	mul	w8, w8, w9
	sdiv	w8, w8, w21
	str	w8, [x19]
	b	LBB0_3
LBB0_7:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_2
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_CGS_IND_REG__SMC,4,2           ; @CGS_IND_REG__SMC
	.comm	_CG_TACH_STATUS,4,2             ; @CG_TACH_STATUS
	.comm	_TACH_PERIOD,4,2                ; @TACH_PERIOD
	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
