	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fan_min_store
_fan_min_store:                         ## @fan_min_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r15
	movq	%rdx, %r14
	movq	%rsi, %rbx
	callq	_dev_get_drvdata
	movq	%rax, %r12
	movq	32(%rax), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_to_sensor_dev_attr
	movslq	(%rax), %r13
	leaq	-80(%rbp), %rdx
	movq	%r14, %rdi
	movl	$10, %esi
	callq	_kstrtoul
	testl	%eax, %eax
	jne	LBB0_5
## %bb.1:
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	addq	$16, %rdi
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	callq	_mutex_lock
	movq	_GL518_REG_FAN_LIMIT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	callq	_gl518_read_value
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	-80(%rbp), %r14
	movq	24(%r12), %rax
	movl	(%rax,%r13,4), %edi
	callq	_DIV_FROM_REG
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_FAN_TO_REG
	movq	(%r12), %rcx
	movl	%eax, (%rcx,%r13,4)
	leal	(,%r13,8), %ecx
	movl	$255, %edx
	shll	%cl, %edx
	movb	$8, %bl
	subb	%cl, %bl
	movl	%ebx, %ecx
	shll	%cl, %eax
	andl	-56(%rbp), %edx                 ## 4-byte Folded Reload
	orl	%eax, %edx
	movq	_GL518_REG_FAN_LIMIT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_gl518_write_value
	movq	_GL518_REG_ALARM@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r15, %rdi
	callq	_gl518_read_value
	movl	$32, %edx
	movl	%r13d, %ecx
	shll	%cl, %edx
	movl	%eax, 8(%r12)
	movq	(%r12), %rcx
	cmpl	$0, (%rcx,%r13,4)
	movq	%r15, %rdi
	je	LBB0_2
## %bb.3:
	orl	12(%r12), %edx
	jmp	LBB0_4
LBB0_2:
	notl	%edx
	andl	12(%r12), %edx
LBB0_4:
	movl	%edx, 12(%r12)
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	andl	%eax, %edx
	movl	%edx, 8(%r12)
	movl	(%rbx), %esi
	callq	_gl518_write_value
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	movl	%r15d, %eax
LBB0_5:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GL518_REG_FAN_LIMIT,4,2        ## @GL518_REG_FAN_LIMIT
	.comm	_GL518_REG_ALARM,4,2            ## @GL518_REG_ALARM
	.no_dead_strip	_fan_min_store
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fan_min_store
_fan_min_store:                         ; @fan_min_store
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x3
	mov	x22, x2
	mov	x23, x1
	bl	_dev_get_drvdata
	mov	x21, x0
	ldr	x20, [x0, #32]
	mov	x0, x23
	bl	_to_sensor_dev_attr
	ldrsw	x25, [x0]
	add	x2, sp, #8
	mov	x0, x22
	mov	w1, #10
	bl	_kstrtoul
	cbnz	w0, LBB0_5
; %bb.1:
	add	x22, x21, #16
	mov	x0, x22
	bl	_mutex_lock
Lloh0:
	adrp	x26, _GL518_REG_FAN_LIMIT@GOTPAGE
Lloh1:
	ldr	x26, [x26, _GL518_REG_FAN_LIMIT@GOTPAGEOFF]
	ldr	w1, [x26]
	mov	x0, x20
	bl	_gl518_read_value
	mov	x23, x0
	ldr	x24, [sp, #8]
	ldr	x8, [x21, #24]
	lsl	x27, x25, #2
	ldr	w0, [x8, x27]
	bl	_DIV_FROM_REG
	mov	x1, x0
	mov	x0, x24
	bl	_FAN_TO_REG
	ldr	x8, [x21]
	str	w0, [x8, x27]
	lsl	w8, w25, #3
	mov	w9, #255
	lsl	w9, w9, w8
	and	w9, w9, w23
	mov	w10, #8
	sub	w8, w10, w8
	lsl	w8, w0, w8
	orr	w2, w8, w9
	ldr	w1, [x26]
	mov	x0, x20
	bl	_gl518_write_value
Lloh2:
	adrp	x23, _GL518_REG_ALARM@GOTPAGE
Lloh3:
	ldr	x23, [x23, _GL518_REG_ALARM@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x20
	bl	_gl518_read_value
	str	w0, [x21, #8]
	ldr	x8, [x21]
	ldr	w9, [x8, x27]
	mov	w8, #32
	lsl	w8, w8, w25
	cbz	w9, LBB0_3
; %bb.2:
	ldr	w9, [x21, #12]
	orr	w8, w9, w8
	b	LBB0_4
LBB0_3:
	ldr	w9, [x21, #12]
	bic	w8, w9, w8
LBB0_4:
	and	w2, w8, w0
	stp	w2, w8, [x21, #8]
	ldr	w1, [x23]
	mov	x0, x20
	bl	_gl518_write_value
	mov	x0, x22
	bl	_mutex_unlock
	mov	x0, x19
LBB0_5:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_GL518_REG_FAN_LIMIT,4,2        ; @GL518_REG_FAN_LIMIT
	.comm	_GL518_REG_ALARM,4,2            ; @GL518_REG_ALARM
	.no_dead_strip	_fan_min_store
.subsections_via_symbols
