	.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, -56(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r14
	movq	%rsi, %rbx
	callq	_to_i2c_client
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_i2c_get_clientdata
	movq	%rax, %r13
	movq	%rbx, %rdi
	callq	_to_sensor_dev_attr
	movslq	(%rax), %r12
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$10, %edx
	callq	_simple_strtoul
	movq	%rax, %rbx
	leaq	16(%r13), %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_mutex_lock
	movq	24(%r13), %rax
	movl	(%rax,%r12,4), %esi
	movq	%rbx, %rdi
	callq	_FAN_TO_REG
	movl	%eax, %ebx
	movq	(%r13), %rax
	movl	%ebx, (%rax,%r12,4)
	movq	_GL520_REG_FAN_MIN@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_gl520_read_value
	testq	%r12, %r12
	je	LBB0_1
## %bb.2:
	andl	$-256, %eax
	jmp	LBB0_3
LBB0_1:
	andl	$-65281, %eax                   ## imm = 0xFFFF00FF
	shll	$8, %ebx
LBB0_3:
	orl	%eax, %ebx
	movq	%r15, %rdi
	movl	%r14d, %esi
	movl	%ebx, %edx
	callq	_gl520_write_value
	movq	_GL520_REG_BEEP_MASK@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r15, %rdi
	callq	_gl520_read_value
	movl	%eax, 8(%r13)
	movq	(%r13), %rcx
	cmpl	$0, (%rcx,%r12,4)
	je	LBB0_4
## %bb.5:
	xorl	%edx, %edx
	testl	%r12d, %r12d
	setne	%dl
	shll	$5, %edx
	addl	$32, %edx
	orl	12(%r13), %edx
	jmp	LBB0_6
LBB0_4:
	xorl	%edx, %edx
	testl	%r12d, %r12d
	sete	%dl
	shll	$5, %edx
	addl	$-65, %edx
	andl	12(%r13), %edx
LBB0_6:
	movl	%edx, 12(%r13)
	andl	%eax, %edx
	movl	%edx, 8(%r13)
	movl	(%rbx), %esi
	movq	%r15, %rdi
	callq	_gl520_write_value
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	movq	-56(%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	_GL520_REG_FAN_MIN,4,2          ## @GL520_REG_FAN_MIN
	.comm	_GL520_REG_BEEP_MASK,4,2        ## @GL520_REG_BEEP_MASK
	.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	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	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
	ldrsw	x25, [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
	ldr	x8, [x21, #24]
	lsl	x24, x25, #2
	ldr	w1, [x8, x24]
	mov	x0, x23
	bl	_FAN_TO_REG
	mov	x23, x0
	ldr	x8, [x21]
	str	w0, [x8, x24]
Lloh0:
	adrp	x8, _GL520_REG_FAN_MIN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GL520_REG_FAN_MIN@GOTPAGEOFF]
Lloh2:
	ldr	w24, [x8]
	mov	x0, x20
	mov	x1, x24
	bl	_gl520_read_value
	and	w8, w0, #0xffffff00
	orr	w8, w8, w23
	and	w9, w0, #0xffff00ff
	orr	w9, w9, w23, lsl #8
	cmp	w25, #0
	csel	w2, w8, w9, ne
	mov	x0, x20
	mov	x1, x24
	bl	_gl520_write_value
Lloh3:
	adrp	x23, _GL520_REG_BEEP_MASK@GOTPAGE
Lloh4:
	ldr	x23, [x23, _GL520_REG_BEEP_MASK@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x20
	bl	_gl520_read_value
	str	w0, [x21, #8]
	ldr	x8, [x21]
	ldr	w8, [x8, x25, lsl #2]
	cbz	w8, LBB0_2
; %bb.1:
	mov	w8, #64
	mov	w9, #32
	cmp	w25, #0
	csel	w8, w9, w8, eq
	ldr	w9, [x21, #12]
	orr	w8, w9, w8
	b	LBB0_3
LBB0_2:
	mov	w8, #-65
	mov	w9, #-33
	cmp	w25, #0
	csel	w8, w9, w8, eq
	ldr	w9, [x21, #12]
	and	w8, w9, w8
LBB0_3:
	and	w2, w8, w0
	stp	w2, w8, [x21, #8]
	ldr	w1, [x23]
	mov	x0, x20
	bl	_gl520_write_value
	mov	x0, x22
	bl	_mutex_unlock
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_GL520_REG_FAN_MIN,4,2          ; @GL520_REG_FAN_MIN
	.comm	_GL520_REG_BEEP_MASK,4,2        ; @GL520_REG_BEEP_MASK
	.no_dead_strip	_set_fan_min
.subsections_via_symbols
