	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function aspeed_get_fan_tach_ch_rpm
_aspeed_get_fan_tach_ch_rpm:            ## @aspeed_get_fan_tach_ch_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
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movl	36(%rdi), %edi
	movq	_ASPEED_PTCR_TRIGGER@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	xorl	%edx, %edx
	callq	_regmap_write
	movl	36(%rbx), %edi
	movl	(%r15), %esi
	movl	$1, %edx
	movl	%r14d, %ecx
	shll	%cl, %edx
	callq	_regmap_write
	movslq	%r14d, %rax
	movq	(%rbx), %rcx
	movq	8(%rbx), %rdx
	movslq	(%rcx,%rax,4), %rax
	movl	(%rdx,%rax,4), %esi
	movq	%rbx, %rdi
	callq	_aspeed_get_fan_tach_ch_measure_period
	movl	%eax, %ecx
	movl	$1000, %eax                     ## imm = 0x3E8
	xorl	%edx, %edx
	idivl	%ecx
	imull	$1000, %eax, %r9d               ## imm = 0x3E8
	movl	36(%rbx), %edi
	movq	_ASPEED_PTCR_RESULT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ASPEED_RPM_STATUS_SLEEP_USEC@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	xorl	%ecx, %ecx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_regmap_read_poll_timeout       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ASPEED_PTCR_TRIGGER,4,2        ## @ASPEED_PTCR_TRIGGER
	.comm	_ASPEED_PTCR_RESULT,4,2         ## @ASPEED_PTCR_RESULT
	.comm	_RESULT_STATUS_MASK,4,2         ## @RESULT_STATUS_MASK
	.comm	_ASPEED_RPM_STATUS_SLEEP_USEC,4,2 ## @ASPEED_RPM_STATUS_SLEEP_USEC
	.comm	_RESULT_VALUE_MASK,4,2          ## @RESULT_VALUE_MASK
	.comm	_BOTH_EDGES,4,2                 ## @BOTH_EDGES
	.no_dead_strip	_aspeed_get_fan_tach_ch_rpm
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function aspeed_get_fan_tach_ch_rpm
_aspeed_get_fan_tach_ch_rpm:            ; @aspeed_get_fan_tach_ch_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
	mov	x19, x1
	mov	x20, x0
	ldr	w0, [x0, #36]
Lloh0:
	adrp	x21, _ASPEED_PTCR_TRIGGER@GOTPAGE
Lloh1:
	ldr	x21, [x21, _ASPEED_PTCR_TRIGGER@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	w2, #0
	bl	_regmap_write
	ldr	w0, [x20, #36]
	ldr	w1, [x21]
	mov	w8, #1
	lsl	w2, w8, w19
	bl	_regmap_write
	ldp	x8, x9, [x20]
	ldrsw	x8, [x8, w19, sxtw #2]
	ldr	w1, [x9, x8, lsl #2]
	mov	x0, x20
	bl	_aspeed_get_fan_tach_ch_measure_period
	mov	w8, #1000
	sdiv	w9, w8, w0
	mul	w5, w9, w8
	ldr	w0, [x20, #36]
Lloh2:
	adrp	x8, _ASPEED_PTCR_RESULT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ASPEED_PTCR_RESULT@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x8, _ASPEED_RPM_STATUS_SLEEP_USEC@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ASPEED_RPM_STATUS_SLEEP_USEC@GOTPAGEOFF]
Lloh7:
	ldr	w4, [x8]
	mov	w3, #0
	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
	b	_regmap_read_poll_timeout
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_ASPEED_PTCR_TRIGGER,4,2        ; @ASPEED_PTCR_TRIGGER
	.comm	_ASPEED_PTCR_RESULT,4,2         ; @ASPEED_PTCR_RESULT
	.comm	_RESULT_STATUS_MASK,4,2         ; @RESULT_STATUS_MASK
	.comm	_ASPEED_RPM_STATUS_SLEEP_USEC,4,2 ; @ASPEED_RPM_STATUS_SLEEP_USEC
	.comm	_RESULT_VALUE_MASK,4,2          ; @RESULT_VALUE_MASK
	.comm	_BOTH_EDGES,4,2                 ; @BOTH_EDGES
	.no_dead_strip	_aspeed_get_fan_tach_ch_rpm
.subsections_via_symbols
