	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fan_pwm1_show
_fan_pwm1_show:                         ## @fan_pwm1_show
	.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	%rdx, %rbx
	leaq	-12(%rbp), %rdi
	callq	_fan_get_status_safe
	testl	%eax, %eax
	jne	LBB0_6
## %bb.1:
	movl	-12(%rbp), %eax
	movq	_TP_EC_FAN_AUTO@GOTPCREL(%rip), %rcx
	movq	_TP_EC_FAN_FULLSPEED@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	testl	%eax, %edx
	je	LBB0_3
## %bb.2:
	movq	_fan_control_desired_level@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -12(%rbp)
LBB0_3:
	cmpl	$8, %eax
	jl	LBB0_5
## %bb.4:
	movl	$7, -12(%rbp)
	movl	$7, %eax
LBB0_5:
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %ecx
	shll	$8, %ecx
	subl	%eax, %ecx
	movslq	%ecx, %rcx
	imulq	$-1840700269, %rcx, %rax        ## imm = 0x92492493
	shrq	$32, %rax
	addl	%eax, %ecx
	movl	%ecx, %eax
	shrl	$31, %eax
	sarl	$2, %ecx
	addl	%eax, %ecx
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %rdi
                                        ## kill: def $ecx killed $ecx killed $rcx
	callq	_snprintf
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TP_EC_FAN_AUTO,4,2             ## @TP_EC_FAN_AUTO
	.comm	_TP_EC_FAN_FULLSPEED,4,2        ## @TP_EC_FAN_FULLSPEED
	.comm	_fan_control_desired_level,4,2  ## @fan_control_desired_level
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%u\n"

	.no_dead_strip	_fan_pwm1_show
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fan_pwm1_show
_fan_pwm1_show:                         ; @fan_pwm1_show
	.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, x2
	add	x0, sp, #12
	bl	_fan_get_status_safe
	cbnz	w0, LBB0_6
; %bb.1:
	ldr	w8, [sp, #12]
Lloh0:
	adrp	x9, _TP_EC_FAN_AUTO@GOTPAGE
Lloh1:
	ldr	x9, [x9, _TP_EC_FAN_AUTO@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
Lloh3:
	adrp	x10, _TP_EC_FAN_FULLSPEED@GOTPAGE
Lloh4:
	ldr	x10, [x10, _TP_EC_FAN_FULLSPEED@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	orr	w9, w10, w9
	tst	w9, w8
	b.eq	LBB0_3
; %bb.2:
Lloh6:
	adrp	x8, _fan_control_desired_level@GOTPAGE
Lloh7:
	ldr	x8, [x8, _fan_control_desired_level@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [sp, #12]
LBB0_3:
	cmp	w8, #8
	b.lt	LBB0_5
; %bb.4:
	mov	w8, #7
	str	w8, [sp, #12]
LBB0_5:
Lloh9:
	adrp	x9, _PAGE_SIZE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _PAGE_SIZE@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x9]
	lsl	w9, w8, #8
	mov	w10, #9363
	movk	w10, #37449, lsl #16
	sub	w8, w9, w8
	smull	x9, w8, w10
	lsr	x9, x9, #32
	add	w8, w9, w8
	asr	w9, w8, #2
	add	w3, w9, w8, lsr #31
Lloh12:
	adrp	x2, l_.str@PAGE
Lloh13:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_snprintf
LBB0_6:
	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
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_TP_EC_FAN_AUTO,4,2             ; @TP_EC_FAN_AUTO
	.comm	_TP_EC_FAN_FULLSPEED,4,2        ; @TP_EC_FAN_FULLSPEED
	.comm	_fan_control_desired_level,4,2  ; @fan_control_desired_level
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%u\n"

	.no_dead_strip	_fan_pwm1_show
.subsections_via_symbols
