	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function store_pwm
_store_pwm:                             ## @store_pwm
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r12
	movq	%rsi, %rbx
	callq	_dev_get_drvdata
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_to_sensor_dev_attr_2
	movslq	(%rax), %r15
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	$10, %edx
	callq	_simple_strtol
	movq	%rax, %rdi
	xorl	%esi, %esi
	movl	$255, %edx
	callq	_SENSORS_LIMIT
	movq	%rax, %r13
	leaq	40(%r14), %r12
	movq	%r12, %rdi
	callq	_mutex_lock
	movq	_F71882FG_REG_PWM_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_f71882fg_read8
	movl	%eax, (%r14)
	leal	(%r15,%r15), %ecx
	movl	%eax, %edx
	sarl	%cl, %edx
	movq	8(%r14), %rsi
	movq	_f8000@GOTPCREL(%rip), %rdi
	cmpq	(%rdi), %rsi
	jne	LBB0_4
## %bb.1:
	andl	$3, %edx
	cmpl	$2, %edx
	je	LBB0_2
LBB0_5:
	movq	_EROFS@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subq	(%rax), %rbx
	jmp	LBB0_8
LBB0_4:
	testb	$2, %dl
	je	LBB0_5
LBB0_2:
	movl	%r15d, %edi
	btl	%ecx, %eax
	jae	LBB0_6
## %bb.3:
	callq	_F71882FG_REG_PWM
	movq	%r14, %rdi
	movl	%eax, %esi
	movq	%r13, %rdx
	callq	_f71882fg_write8
	movq	16(%r14), %rax
	movq	%r13, (%rax,%r15,8)
	jmp	LBB0_7
LBB0_6:
	callq	_F71882FG_REG_FAN_FULL_SPEED
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_f71882fg_read16
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	%eax, %edi
	callq	_fan_from_reg
	imulq	%rax, %r13
	movabsq	$-9187201950435737471, %rcx     ## imm = 0x8080808080808081
	movq	%r13, %rax
	imulq	%rcx
	addq	%rdx, %r13
	movq	%r13, %rax
	shrq	$63, %rax
	sarq	$7, %r13
	addq	%rax, %r13
	movq	%r13, %rdi
	callq	_fan_to_reg
	movl	%eax, %ebx
	movl	%r15d, %edi
	callq	_F71882FG_REG_FAN_TARGET
	movq	%r14, %rdi
	movl	%eax, %esi
	movl	%ebx, %edx
	callq	_f71882fg_write16
	movq	24(%r14), %rax
	movl	%ebx, (%rax,%r15,4)
	movq	32(%r14), %rax
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, (%rax,%r15,4)
LBB0_7:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
LBB0_8:
	movq	%r12, %rdi
	callq	_mutex_unlock
	movq	%rbx, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_F71882FG_REG_PWM_ENABLE,4,2    ## @F71882FG_REG_PWM_ENABLE
	.comm	_f8000,8,3                      ## @f8000
	.comm	_EROFS,8,3                      ## @EROFS
	.no_dead_strip	_store_pwm
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function store_pwm
_store_pwm:                             ; @store_pwm
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x3
	mov	x22, x2
	mov	x21, x1
	bl	_dev_get_drvdata
	mov	x20, x0
	mov	x0, x21
	bl	_to_sensor_dev_attr_2
	ldrsw	x21, [x0]
	mov	x0, x22
	mov	x1, #0
	mov	w2, #10
	bl	_simple_strtol
	mov	w1, #0
	mov	w2, #255
	bl	_SENSORS_LIMIT
	mov	x23, x0
	add	x22, x20, #40
	mov	x0, x22
	bl	_mutex_lock
Lloh0:
	adrp	x8, _F71882FG_REG_PWM_ENABLE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _F71882FG_REG_PWM_ENABLE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_f71882fg_read8
	str	w0, [x20]
	ldr	x10, [x20, #8]
Lloh3:
	adrp	x8, _f8000@GOTPAGE
Lloh4:
	ldr	x8, [x8, _f8000@GOTPAGEOFF]
Lloh5:
	ldr	x11, [x8]
	lsl	w8, w21, #1
	asr	w9, w0, w8
	cmp	x10, x11
	b.ne	LBB0_3
; %bb.1:
	and	w9, w9, #0x3
	cmp	w9, #2
	b.eq	LBB0_4
LBB0_2:
Lloh6:
	adrp	x8, _EROFS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EROFS@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	neg	x19, x8
	b	LBB0_7
LBB0_3:
	tbz	w9, #1, LBB0_2
LBB0_4:
	lsr	w8, w0, w8
	tbz	w8, #0, LBB0_6
; %bb.5:
	mov	x0, x21
	bl	_F71882FG_REG_PWM
	mov	x1, x0
	mov	x0, x20
	mov	x2, x23
	bl	_f71882fg_write8
	ldr	x8, [x20, #16]
	str	x23, [x8, x21, lsl #3]
	b	LBB0_7
LBB0_6:
	mov	x0, x21
	bl	_F71882FG_REG_FAN_FULL_SPEED
	mov	x1, x0
	mov	x0, x20
	bl	_f71882fg_read16
	mov	x24, x0
	bl	_fan_from_reg
	mul	x8, x0, x23
	mov	x9, #-9187201950435737472
	movk	x9, #32897
	smulh	x9, x8, x9
	add	x8, x9, x8
	asr	x9, x8, #7
	add	x0, x9, x8, lsr #63
	bl	_fan_to_reg
	mov	x23, x0
	mov	x0, x21
	bl	_F71882FG_REG_FAN_TARGET
	mov	x1, x0
	mov	x0, x20
	mov	x2, x23
	bl	_f71882fg_write16
	lsl	x8, x21, #2
	ldp	x9, x10, [x20, #24]
	str	w23, [x9, x8]
	str	w24, [x10, x8]
LBB0_7:
	mov	x0, x22
	bl	_mutex_unlock
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_F71882FG_REG_PWM_ENABLE,4,2    ; @F71882FG_REG_PWM_ENABLE
	.comm	_f8000,8,3                      ; @f8000
	.comm	_EROFS,8,3                      ; @EROFS
	.no_dead_strip	_store_pwm
.subsections_via_symbols
