	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fan_get_speed
_fan_get_speed:                         ## @fan_get_speed
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_fan_status_access_mode@GOTPCREL(%rip), %rax
	cmpl	$128, (%rax)
	jne	LBB0_10
## %bb.1:
	movq	%rdi, %r14
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_fan_select_fan1
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_unlikely
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_10:
	movq	_ENXIO@GOTPCREL(%rip), %rax
LBB0_11:
	xorl	%ebx, %ebx
LBB0_12:
	subl	(%rax), %ebx
LBB0_13:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_3:
	movq	_fan_rpm_offset@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	leaq	-20(%rbp), %rsi
	callq	_acpi_ec_read
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	movl	(%rbx), %edi
	incl	%edi
	leaq	-24(%rbp), %rsi
	callq	_acpi_ec_read
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	jmp	LBB0_6
LBB0_4:
	movl	$1, %edi
LBB0_6:
	callq	_unlikely
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_8:
	movq	%r14, %rdi
	callq	_likely
	xorl	%ebx, %ebx
	testl	%eax, %eax
	je	LBB0_13
## %bb.9:
	movl	-24(%rbp), %eax
	shll	$8, %eax
	orl	-20(%rbp), %eax
	movl	%eax, (%r14)
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_fan_status_access_mode,4,2     ## @fan_status_access_mode
	.comm	_EIO,4,2                        ## @EIO
	.comm	_fan_rpm_offset,4,2             ## @fan_rpm_offset
	.comm	_ENXIO,4,2                      ## @ENXIO
	.no_dead_strip	_fan_get_speed
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fan_get_speed
_fan_get_speed:                         ; @fan_get_speed
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
Lloh0:
	adrp	x8, _fan_status_access_mode@GOTPAGE
Lloh1:
	ldr	x8, [x8, _fan_status_access_mode@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, #128
	b.ne	LBB0_5
; %bb.1:
	mov	x19, x0
	bl	_fan_select_fan1
	cmp	w0, #0
	cset	w0, eq
	bl	_unlikely
	cbnz	w0, LBB0_4
; %bb.2:
Lloh3:
	adrp	x20, _fan_rpm_offset@GOTPAGE
Lloh4:
	ldr	x20, [x20, _fan_rpm_offset@GOTPAGEOFF]
	ldr	w0, [x20]
	add	x1, sp, #8
	bl	_acpi_ec_read
	cbz	w0, LBB0_8
; %bb.3:
	ldr	w8, [x20]
	add	w0, w8, #1
	add	x1, sp, #12
	bl	_acpi_ec_read
	cmp	w0, #0
	cset	w0, eq
	bl	_unlikely
	cbz	w0, LBB0_9
LBB0_4:
Lloh5:
	adrp	x8, _EIO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
Lloh7:
	adrp	x8, _ENXIO@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_8:
	mov	w0, #1
	bl	_unlikely
	cbnz	w0, LBB0_4
LBB0_9:
	mov	x0, x19
	bl	_likely
	cbz	w0, LBB0_7
; %bb.10:
	mov	w0, #0
	ldp	w9, w8, [sp, #8]
	orr	w8, w9, w8, lsl #8
	str	w8, [x19]
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_fan_status_access_mode,4,2     ; @fan_status_access_mode
	.comm	_EIO,4,2                        ; @EIO
	.comm	_fan_rpm_offset,4,2             ; @fan_rpm_offset
	.comm	_ENXIO,4,2                      ; @ENXIO
	.no_dead_strip	_fan_get_speed
.subsections_via_symbols
