	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fan_set_disable
_fan_set_disable:                       ## @fan_set_disable
	.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	_fan_control_allowed@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_1
## %bb.3:
	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_19
LBB0_5:
	movq	_fan_control_access_mode@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	$130, %eax
	je	LBB0_9
## %bb.6:
	cmpl	$129, %eax
	je	LBB0_13
## %bb.7:
	cmpl	$128, %eax
	jne	LBB0_8
LBB0_9:
	movq	_fan_status_offset@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_acpi_ec_write
	testl	%eax, %eax
	je	LBB0_15
## %bb.10:
	movq	_fan_control_desired_level@GOTPCREL(%rip), %rax
	movl	$0, (%rax)
	movq	_tp_features@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_13:
	movq	_sfan_handle@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rcx
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	callq	_acpi_evalf
	testl	%eax, %eax
	je	LBB0_15
## %bb.14:
	movq	_fan_control_desired_level@GOTPCREL(%rip), %rax
LBB0_11:
	movl	$0, (%rax)
	jmp	LBB0_12
LBB0_15:
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_8:
	movq	_ENXIO@GOTPCREL(%rip), %rax
LBB0_16:
	movl	(%rax), %ebx
	testl	%ebx, %ebx
	je	LBB0_12
## %bb.17:
	negl	%ebx
	jmp	LBB0_18
LBB0_12:
	movq	_TPACPI_DBG_FAN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_vdbg_printk
	xorl	%ebx, %ebx
LBB0_18:
	movq	_fan_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
LBB0_19:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	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	_fan_status_offset,4,2          ## @fan_status_offset
	.comm	_EIO,4,2                        ## @EIO
	.comm	_fan_control_desired_level,4,2  ## @fan_control_desired_level
	.comm	_tp_features,4,2                ## @tp_features
	.comm	_sfan_handle,4,2                ## @sfan_handle
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"vd"

	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_TPACPI_DBG_FAN,4,2             ## @TPACPI_DBG_FAN
L_.str.1:                               ## @.str.1
	.asciz	"fan control: set fan control register to 0\n"

	.no_dead_strip	_fan_set_disable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fan_set_disable
_fan_set_disable:                       ; @fan_set_disable
	.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:
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_18
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, #130
	b.eq	LBB0_8
; %bb.6:
	cmp	w8, #129
	b.eq	LBB0_10
; %bb.7:
	cmp	w8, #128
	b.ne	LBB0_15
LBB0_8:
Lloh12:
	adrp	x8, _fan_status_offset@GOTPAGE
Lloh13:
	ldr	x8, [x8, _fan_status_offset@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_acpi_ec_write
	cbz	w0, LBB0_13
; %bb.9:
Lloh15:
	adrp	x8, _fan_control_desired_level@GOTPAGE
Lloh16:
	ldr	x8, [x8, _fan_control_desired_level@GOTPAGEOFF]
Lloh17:
	str	wzr, [x8]
Lloh18:
	adrp	x8, _tp_features@GOTPAGE
Lloh19:
	ldr	x8, [x8, _tp_features@GOTPAGEOFF]
	b	LBB0_12
LBB0_10:
Lloh20:
	adrp	x8, _sfan_handle@GOTPAGE
Lloh21:
	ldr	x8, [x8, _sfan_handle@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
Lloh23:
	adrp	x3, l_.str@PAGE
Lloh24:
	add	x3, x3, l_.str@PAGEOFF
	mov	x1, #0
	mov	x2, #0
	mov	w4, #0
	bl	_acpi_evalf
	cbz	w0, LBB0_13
; %bb.11:
Lloh25:
	adrp	x8, _fan_control_desired_level@GOTPAGE
Lloh26:
	ldr	x8, [x8, _fan_control_desired_level@GOTPAGEOFF]
LBB0_12:
	str	wzr, [x8]
	b	LBB0_14
LBB0_13:
Lloh27:
	adrp	x8, _EIO@GOTPAGE
Lloh28:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	cbnz	w8, LBB0_16
LBB0_14:
Lloh30:
	adrp	x8, _TPACPI_DBG_FAN@GOTPAGE
Lloh31:
	ldr	x8, [x8, _TPACPI_DBG_FAN@GOTPAGEOFF]
Lloh32:
	ldr	w0, [x8]
Lloh33:
	adrp	x1, l_.str.1@PAGE
Lloh34:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_vdbg_printk
	mov	w19, #0
	b	LBB0_17
LBB0_15:
Lloh35:
	adrp	x8, _ENXIO@GOTPAGE
Lloh36:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
	cbz	w8, LBB0_14
LBB0_16:
	neg	w19, w8
LBB0_17:
Lloh38:
	adrp	x0, _fan_mutex@GOTPAGE
Lloh39:
	ldr	x0, [x0, _fan_mutex@GOTPAGEOFF]
	bl	_mutex_unlock
LBB0_18:
	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 AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotStr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGot	Lloh38, Lloh39
	.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	_fan_status_offset,4,2          ; @fan_status_offset
	.comm	_EIO,4,2                        ; @EIO
	.comm	_fan_control_desired_level,4,2  ; @fan_control_desired_level
	.comm	_tp_features,4,2                ; @tp_features
	.comm	_sfan_handle,4,2                ; @sfan_handle
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"vd"

	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_TPACPI_DBG_FAN,4,2             ; @TPACPI_DBG_FAN
l_.str.1:                               ; @.str.1
	.asciz	"fan control: set fan control register to 0\n"

	.no_dead_strip	_fan_set_disable
.subsections_via_symbols
