	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fan_pwm1_store
_fan_pwm1_store:                        ## @fan_pwm1_store
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %rbx
	movq	%rdx, %rdi
	leaq	-40(%rbp), %rdx
	movl	$255, %esi
	callq	_parse_strtoul
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_3:
	movq	-40(%rbp), %rdx
	leaq	L_.str(%rip), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_tpacpi_disclose_usertask
	movl	-40(%rbp), %r14d
	movq	_fan_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_lock_killable
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	_ERESTARTSYS@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_14:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	leaq	-28(%rbp), %rdi
	callq	_fan_get_status
	movl	%eax, %r15d
	testl	%eax, %eax
	je	LBB0_6
LBB0_11:
	movq	_fan_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	movl	%r15d, %ebx
	jmp	LBB0_14
LBB0_6:
	movq	_TP_EC_FAN_AUTO@GOTPCREL(%rip), %rax
	movq	_TP_EC_FAN_FULLSPEED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	testl	%ecx, -28(%rbp)
	je	LBB0_7
LBB0_10:
	movq	_fan_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	jmp	LBB0_14
LBB0_7:
	shrl	$5, %r14d
	andl	$7, %r14d
	movl	%r14d, %edi
	callq	_fan_set_level
	movl	%eax, %r15d
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%r15d, %eax
	jne	LBB0_8
## %bb.12:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_fan_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	testl	%r14d, %r14d
	je	LBB0_14
## %bb.13:
	negl	%r14d
	movq	%r14, %rbx
	jmp	LBB0_14
LBB0_8:
	testl	%r15d, %r15d
	jne	LBB0_11
## %bb.9:
	movl	%r14d, %edi
	callq	_fan_update_desired_level
	xorl	%eax, %eax
	callq	_fan_watchdog_reset
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"hwmon pwm1"

L_.str.1:                               ## @.str.1
	.asciz	"set fan speed to %lu\n"

	.comm	_fan_mutex,4,2                  ## @fan_mutex
	.comm	_ERESTARTSYS,4,2                ## @ERESTARTSYS
	.comm	_TP_EC_FAN_AUTO,4,2             ## @TP_EC_FAN_AUTO
	.comm	_TP_EC_FAN_FULLSPEED,4,2        ## @TP_EC_FAN_FULLSPEED
	.comm	_ENXIO,4,2                      ## @ENXIO
	.no_dead_strip	_fan_pwm1_store
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fan_pwm1_store
_fan_pwm1_store:                        ; @fan_pwm1_store
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x3
	mov	x0, x2
	add	x2, sp, #8
	mov	w1, #255
	bl	_parse_strtoul
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:
	ldr	x2, [sp, #8]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_tpacpi_disclose_usertask
	ldr	w21, [sp, #8]
Lloh6:
	adrp	x0, _fan_mutex@GOTPAGE
Lloh7:
	ldr	x0, [x0, _fan_mutex@GOTPAGEOFF]
	bl	_mutex_lock_killable
	cbz	x0, LBB0_6
; %bb.3:
Lloh8:
	adrp	x8, _ERESTARTSYS@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ERESTARTSYS@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_5:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_6:
	add	x0, sp, #4
	bl	_fan_get_status
	mov	x20, x0
	cbz	w0, LBB0_8
LBB0_7:
Lloh10:
	adrp	x0, _fan_mutex@GOTPAGE
Lloh11:
	ldr	x0, [x0, _fan_mutex@GOTPAGEOFF]
	bl	_mutex_unlock
	mov	w19, w20
	b	LBB0_5
LBB0_8:
	ldr	w8, [sp, #4]
Lloh12:
	adrp	x9, _TP_EC_FAN_AUTO@GOTPAGE
Lloh13:
	ldr	x9, [x9, _TP_EC_FAN_AUTO@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
Lloh15:
	adrp	x10, _TP_EC_FAN_FULLSPEED@GOTPAGE
Lloh16:
	ldr	x10, [x10, _TP_EC_FAN_FULLSPEED@GOTPAGEOFF]
Lloh17:
	ldr	w10, [x10]
	orr	w9, w10, w9
	tst	w9, w8
	b.eq	LBB0_10
LBB0_9:
Lloh18:
	adrp	x0, _fan_mutex@GOTPAGE
Lloh19:
	ldr	x0, [x0, _fan_mutex@GOTPAGEOFF]
	bl	_mutex_unlock
	b	LBB0_5
LBB0_10:
	ubfx	w21, w21, #5, #3
	mov	x0, x21
	bl	_fan_set_level
Lloh20:
	adrp	x8, _ENXIO@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	cmn	w0, w8
	b.ne	LBB0_13
; %bb.11:
Lloh23:
	adrp	x8, _EINVAL@GOTPAGE
Lloh24:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh25:
	ldr	w20, [x8]
Lloh26:
	adrp	x0, _fan_mutex@GOTPAGE
Lloh27:
	ldr	x0, [x0, _fan_mutex@GOTPAGEOFF]
	bl	_mutex_unlock
	cbz	w20, LBB0_5
; %bb.12:
	neg	w19, w20
	b	LBB0_5
LBB0_13:
	mov	x20, x0
	cbnz	w0, LBB0_7
; %bb.14:
	mov	x0, x21
	bl	_fan_update_desired_level
	bl	_fan_watchdog_reset
	b	LBB0_9
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"hwmon pwm1"

l_.str.1:                               ; @.str.1
	.asciz	"set fan speed to %lu\n"

	.comm	_fan_mutex,4,2                  ; @fan_mutex
	.comm	_ERESTARTSYS,4,2                ; @ERESTARTSYS
	.comm	_TP_EC_FAN_AUTO,4,2             ; @TP_EC_FAN_AUTO
	.comm	_TP_EC_FAN_FULLSPEED,4,2        ; @TP_EC_FAN_FULLSPEED
	.comm	_ENXIO,4,2                      ; @ENXIO
	.no_dead_strip	_fan_pwm1_store
.subsections_via_symbols
