	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fan_set_speed
_fan_set_speed:                         ## @fan_set_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_control_allowed@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_1
## %bb.3:
	movl	%edi, %r14d
	movq	_fan_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_lock_killable
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	_ERESTARTSYS@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_1:
	movq	_EPERM@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_13
LBB0_5:
	movq	_fan_control_access_mode@GOTPCREL(%rip), %rax
	cmpl	$128, (%rax)
	jne	LBB0_10
## %bb.6:
	cmpl	$65535, %r14d                   ## imm = 0xFFFF
	ja	LBB0_9
## %bb.7:
	movq	_fans_handle@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r14d, (%rsp)
	leaq	L_.str(%rip), %rcx
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	xorl	%edx, %edx
	movl	%r14d, %r8d
	movl	%r14d, %r9d
	callq	_acpi_evalf
	testl	%eax, %eax
	jne	LBB0_12
## %bb.8:
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_10:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_9:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_11:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_12:
	movq	_fan_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
LBB0_13:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_fan_control_allowed,4,2        ## @fan_control_allowed
	.comm	_EPERM,4,2                      ## @EPERM
	.comm	_fan_mutex,4,2                  ## @fan_mutex
	.comm	_ERESTARTSYS,4,2                ## @ERESTARTSYS
	.comm	_fan_control_access_mode,4,2    ## @fan_control_access_mode
	.comm	_fans_handle,4,2                ## @fans_handle
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"vddd"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENXIO,4,2                      ## @ENXIO
	.no_dead_strip	_fan_set_speed
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fan_set_speed
_fan_set_speed:                         ; @fan_set_speed
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.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_control_allowed@GOTPAGE
Lloh1:
	ldr	x8, [x8, _fan_control_allowed@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cbz	w8, LBB0_3
; %bb.1:
	mov	x19, x0
Lloh3:
	adrp	x0, _fan_mutex@GOTPAGE
Lloh4:
	ldr	x0, [x0, _fan_mutex@GOTPAGEOFF]
	bl	_mutex_lock_killable
	cbz	x0, LBB0_5
; %bb.2:
Lloh5:
	adrp	x8, _ERESTARTSYS@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ERESTARTSYS@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:
Lloh7:
	adrp	x8, _EPERM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w19, w8
	b	LBB0_14
LBB0_5:
Lloh9:
	adrp	x8, _fan_control_access_mode@GOTPAGE
Lloh10:
	ldr	x8, [x8, _fan_control_access_mode@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmp	w8, #128
	b.ne	LBB0_9
; %bb.6:
	lsr	w8, w19, #16
	cbnz	w8, LBB0_10
; %bb.7:
Lloh12:
	adrp	x8, _fans_handle@GOTPAGE
Lloh13:
	ldr	x8, [x8, _fans_handle@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
Lloh15:
	adrp	x3, l_.str@PAGE
Lloh16:
	add	x3, x3, l_.str@PAGEOFF
	mov	x1, #0
	mov	x2, #0
	mov	x4, x19
	mov	x5, x19
	mov	x6, x19
	bl	_acpi_evalf
	cbz	w0, LBB0_11
; %bb.8:
	mov	w19, #0
	b	LBB0_13
LBB0_9:
Lloh17:
	adrp	x8, _ENXIO@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
	b	LBB0_12
LBB0_10:
Lloh19:
	adrp	x8, _EINVAL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_12
LBB0_11:
Lloh21:
	adrp	x8, _EIO@GOTPAGE
Lloh22:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_12:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_13:
Lloh23:
	adrp	x0, _fan_mutex@GOTPAGE
Lloh24:
	ldr	x0, [x0, _fan_mutex@GOTPAGEOFF]
	bl	_mutex_unlock
LBB0_14:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_fan_control_allowed,4,2        ; @fan_control_allowed
	.comm	_EPERM,4,2                      ; @EPERM
	.comm	_fan_mutex,4,2                  ; @fan_mutex
	.comm	_ERESTARTSYS,4,2                ; @ERESTARTSYS
	.comm	_fan_control_access_mode,4,2    ; @fan_control_access_mode
	.comm	_fans_handle,4,2                ; @fans_handle
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"vddd"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENXIO,4,2                      ; @ENXIO
	.no_dead_strip	_fan_set_speed
.subsections_via_symbols
