	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i8k_set_fan
_i8k_set_fan:                           ## @i8k_set_fan
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	_I8K_FAN_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%esi, %eax
	cmovgel	%esi, %eax
	movl	%edi, %ebx
	shll	$8, %eax
	xorl	%ecx, %ecx
	testl	%esi, %esi
	movq	_I8K_SMM_SET_FAN@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	cmovnsl	%eax, %ecx
	movl	%edx, -12(%rbp)
	movzbl	%bl, %eax
	orl	%ecx, %eax
	movl	%eax, -16(%rbp)
	leaq	-16(%rbp), %rdi
	callq	_i8k_smm
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	movl	%ebx, %edi
	callq	_i8k_get_fan_status
	movl	%eax, %eax
LBB0_2:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_I8K_SMM_SET_FAN,4,2            ## @I8K_SMM_SET_FAN
	.comm	_I8K_FAN_MAX,4,2                ## @I8K_FAN_MAX
	.no_dead_strip	_i8k_set_fan
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i8k_set_fan
_i8k_set_fan:                           ; @i8k_set_fan
	.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	x8, _I8K_SMM_SET_FAN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _I8K_SMM_SET_FAN@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _I8K_FAN_MAX@GOTPAGE
Lloh4:
	ldr	x9, [x9, _I8K_FAN_MAX@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w9, w1
	csel	w9, w9, w1, lt
	lsl	w9, w9, #8
	cmp	w1, #0
	csel	w9, wzr, w9, lt
	bfxil	w9, w0, #0, #8
	stp	w9, w8, [sp, #8]
	add	x0, sp, #8
	bl	_i8k_smm
	cbnz	x0, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_i8k_get_fan_status
	mov	w0, w0
LBB0_2:
                                        ; kill: def $w0 killed $w0 killed $x0
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_I8K_SMM_SET_FAN,4,2            ; @I8K_SMM_SET_FAN
	.comm	_I8K_FAN_MAX,4,2                ; @I8K_FAN_MAX
	.no_dead_strip	_i8k_set_fan
.subsections_via_symbols
