	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function acerhdf_set_cur_state
_acerhdf_set_cur_state:                 ## @acerhdf_set_cur_state
	.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	_kernelmode@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	cmpl	$0, (%rax)
	je	LBB0_4
## %bb.1:
	movq	%rsi, %r14
	leaq	-24(%rbp), %rdi
	callq	_acerhdf_get_temp
	testl	%eax, %eax
	je	LBB0_5
## %bb.2:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_3
LBB0_5:
	leaq	-20(%rbp), %rdi
	callq	_acerhdf_get_fanstate
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	leaq	L_.str.1(%rip), %rdi
LBB0_3:
	callq	_pr_err
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_acerhdf_revert_to_bios_mode
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_4:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_7:
	movl	-20(%rbp), %eax
	testq	%r14, %r14
	je	LBB0_8
## %bb.11:
	movq	_ACERHDF_FAN_OFF@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_4
## %bb.12:
	movq	_ACERHDF_FAN_AUTO@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_8:
	movq	_ACERHDF_FAN_AUTO@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_4
## %bb.9:
	movq	_ACERHDF_FAN_OFF@GOTPCREL(%rip), %rax
LBB0_10:
	movl	(%rax), %edi
	callq	_acerhdf_change_fanstate
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_kernelmode,4,2                 ## @kernelmode
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"error reading temperature, hand off control to BIOS\n"

L_.str.1:                               ## @.str.1
	.asciz	"error reading fan state, hand off control to BIOS\n"

	.comm	_ACERHDF_FAN_AUTO,4,2           ## @ACERHDF_FAN_AUTO
	.comm	_ACERHDF_FAN_OFF,4,2            ## @ACERHDF_FAN_OFF
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_acerhdf_set_cur_state
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function acerhdf_set_cur_state
_acerhdf_set_cur_state:                 ; @acerhdf_set_cur_state
	.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, _kernelmode@GOTPAGE
Lloh1:
	ldr	x8, [x8, _kernelmode@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cbz	w8, LBB0_12
; %bb.1:
	mov	x19, x1
	add	x0, sp, #12
	bl	_acerhdf_get_temp
	cbz	w0, LBB0_3
; %bb.2:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_5
LBB0_3:
	add	x0, sp, #8
	bl	_acerhdf_get_fanstate
	cbz	w0, LBB0_6
; %bb.4:
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_5:
	bl	_pr_err
	bl	_acerhdf_revert_to_bios_mode
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_13
LBB0_6:
	ldr	w8, [sp, #8]
	cbz	x19, LBB0_9
; %bb.7:
Lloh10:
	adrp	x9, _ACERHDF_FAN_OFF@GOTPAGE
Lloh11:
	ldr	x9, [x9, _ACERHDF_FAN_OFF@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_12
; %bb.8:
Lloh13:
	adrp	x8, _ACERHDF_FAN_AUTO@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ACERHDF_FAN_AUTO@GOTPAGEOFF]
	b	LBB0_11
LBB0_9:
Lloh15:
	adrp	x9, _ACERHDF_FAN_AUTO@GOTPAGE
Lloh16:
	ldr	x9, [x9, _ACERHDF_FAN_AUTO@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_12
; %bb.10:
Lloh18:
	adrp	x8, _ACERHDF_FAN_OFF@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ACERHDF_FAN_OFF@GOTPAGEOFF]
LBB0_11:
	ldr	w0, [x8]
	bl	_acerhdf_change_fanstate
LBB0_12:
	mov	w0, #0
LBB0_13:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_kernelmode,4,2                 ; @kernelmode
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"error reading temperature, hand off control to BIOS\n"

l_.str.1:                               ; @.str.1
	.asciz	"error reading fan state, hand off control to BIOS\n"

	.comm	_ACERHDF_FAN_AUTO,4,2           ; @ACERHDF_FAN_AUTO
	.comm	_ACERHDF_FAN_OFF,4,2            ; @ACERHDF_FAN_OFF
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_acerhdf_set_cur_state
.subsections_via_symbols
