	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function acerhdf_get_fanstate
_acerhdf_get_fanstate:                  ## @acerhdf_get_fanstate
	.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	%rdi, %r14
	movq	_ctrl_cfg@GOTPCREL(%rip), %rbx
	movl	8(%rbx), %edi
	leaq	-24(%rbp), %rsi
	callq	_ec_read
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_6
LBB0_2:
	movq	-24(%rbp), %rax
	cmpq	(%rbx), %rax
	jne	LBB0_3
## %bb.4:
	movq	_ACERHDF_FAN_OFF@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_3:
	movq	_ACERHDF_FAN_AUTO@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %eax
	movl	%eax, (%r14)
	xorl	%eax, %eax
LBB0_6:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ctrl_cfg,16,3                  ## @ctrl_cfg
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ACERHDF_FAN_AUTO,4,2           ## @ACERHDF_FAN_AUTO
	.comm	_ACERHDF_FAN_OFF,4,2            ## @ACERHDF_FAN_OFF
	.no_dead_strip	_acerhdf_get_fanstate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function acerhdf_get_fanstate
_acerhdf_get_fanstate:                  ; @acerhdf_get_fanstate
	.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
	mov	x19, x0
Lloh0:
	adrp	x20, _ctrl_cfg@GOTPAGE
Lloh1:
	ldr	x20, [x20, _ctrl_cfg@GOTPAGEOFF]
	ldr	w0, [x20, #8]
	add	x1, sp, #8
	bl	_ec_read
	cbz	x0, LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_3
LBB0_2:
	ldr	x8, [sp, #8]
	ldr	x9, [x20]
Lloh5:
	adrp	x10, _ACERHDF_FAN_OFF@GOTPAGE
Lloh6:
	ldr	x10, [x10, _ACERHDF_FAN_OFF@GOTPAGEOFF]
Lloh7:
	adrp	x11, _ACERHDF_FAN_AUTO@GOTPAGE
Lloh8:
	ldr	x11, [x11, _ACERHDF_FAN_AUTO@GOTPAGEOFF]
	cmp	x8, x9
	csel	x8, x10, x11, eq
	ldr	w8, [x8]
	str	w8, [x19]
LBB0_3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_ctrl_cfg,16,3                  ; @ctrl_cfg
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ACERHDF_FAN_AUTO,4,2           ; @ACERHDF_FAN_AUTO
	.comm	_ACERHDF_FAN_OFF,4,2            ; @ACERHDF_FAN_OFF
	.no_dead_strip	_acerhdf_get_fanstate
.subsections_via_symbols
