	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_fan_min
_set_fan_min:                           ## @set_fan_min
	.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, -64(%rbp)                 ## 8-byte Spill
	movq	%rdx, %rbx
	movq	%rsi, %r12
	callq	_to_i2c_client
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_i2c_get_clientdata
	movq	%rax, %r14
	movq	%r12, %rdi
	callq	_to_sensor_dev_attr
	movslq	(%rax), %r13
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$10, %edx
	callq	_simple_strtoul
	movq	%rax, %r12
	leaq	16(%r14), %rdi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_mutex_lock
	movq	_GL518_REG_FAN_LIMIT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_gl518_read_value
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	24(%r14), %rax
	movl	(%rax,%r13,4), %edi
	callq	_DIV_FROM_REG
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_FAN_TO_REG
	movq	(%r14), %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	-48(%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(%r14)
	movq	(%r14), %rcx
	cmpl	$0, (%rcx,%r13,4)
	je	LBB0_1
## %bb.2:
	orl	12(%r14), %edx
	jmp	LBB0_3
LBB0_1:
	notl	%edx
	andl	12(%r14), %edx
LBB0_3:
	movl	%edx, 12(%r14)
	andl	%eax, %edx
	movl	%edx, 8(%r14)
	movl	(%rbx), %esi
	movq	%r15, %rdi
	callq	_gl518_write_value
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	addq	$24, %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	_set_fan_min
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_fan_min
_set_fan_min:                           ; @set_fan_min
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	_to_i2c_client
	mov	x20, x0
	bl	_i2c_get_clientdata
	mov	x21, x0
	mov	x0, x23
	bl	_to_sensor_dev_attr
	ldr	w25, [x0]
	mov	x0, x22
	mov	x1, #0
	mov	w2, #10
	bl	_simple_strtoul
	mov	x23, x0
	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	x24, x0
	ldr	x8, [x21, #24]
	sxtw	x9, w25
	lsl	x27, x9, #2
	ldr	w0, [x8, x27]
	bl	_DIV_FROM_REG
	mov	x1, x0
	mov	x0, x23
	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, w24
	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_2
; %bb.1:
	ldr	w9, [x21, #12]
	orr	w8, w9, w8
	b	LBB0_3
LBB0_2:
	ldr	w9, [x21, #12]
	bic	w8, w9, w8
LBB0_3:
	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
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	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	_set_fan_min
.subsections_via_symbols
