	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_fan_div
_set_fan_div:                           ## @set_fan_div
	.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
	pushq	%rax
	.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, %r13
	movq	%rsi, %rbx
	callq	_to_i2c_client
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_i2c_get_clientdata
	movq	%rax, %r12
	movq	%rbx, %rdi
	callq	_to_sensor_dev_attr
	movslq	(%rax), %rbx
	movq	%r13, %rdi
	xorl	%esi, %esi
	movl	$10, %edx
	callq	_simple_strtoul
	leaq	-1(%rax), %rcx
	cmpq	$8, %rcx
	jae	LBB0_1
## %bb.2:
	movl	$139, %edx
	btl	%ecx, %edx
	jb	LBB0_3
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movq	%rax, %rdx
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subq	(%rax), %r15
	jmp	LBB0_4
LBB0_3:
	leaq	l_switch.table.set_fan_div(%rip), %rcx
	movl	-4(%rcx,%rax,4), %r13d
	movq	%r12, %rdi
	addq	$8, %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_mutex_lock
	movq	(%r12), %rax
	movl	%r13d, (%rax,%rbx,4)
	movq	_GL520_REG_FAN_DIV@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	_gl520_read_value
	testl	%ebx, %ebx
	movl	$-193, %ecx
	movl	$-49, %edx
	cmovel	%ecx, %edx
	sete	%cl
	andl	%eax, %edx
	addb	%cl, %cl
	orb	$4, %cl
	shll	%cl, %r13d
	orl	%edx, %r13d
	movq	%r14, %rdi
	movl	%r12d, %esi
	movl	%r13d, %edx
	callq	_gl520_write_value
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
LBB0_4:
	movq	%r15, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"fan_div value %ld not supported. Choose one of 1, 2, 4 or 8!\n"

	.comm	_EINVAL,8,3                     ## @EINVAL
	.comm	_GL520_REG_FAN_DIV,4,2          ## @GL520_REG_FAN_DIV
	.no_dead_strip	_set_fan_div
	.section	__TEXT,__const
	.p2align	2                               ## @switch.table.set_fan_div
l_switch.table.set_fan_div:
	.long	0                               ## 0x0
	.long	1                               ## 0x1
	.long	0                               ## 0x0
	.long	2                               ## 0x2
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	3                               ## 0x3

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_fan_div
_set_fan_div:                           ; @set_fan_div
	.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	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	x23, [x0]
	mov	x0, x22
	mov	x1, #0
	mov	w2, #10
	bl	_simple_strtoul
	mov	x2, x0
	sub	x8, x0, #1
	cmp	x8, #8
	b.hs	LBB0_2
; %bb.1:
	mov	w9, #139
	lsr	w9, w9, w8
	tbnz	w9, #0, LBB0_3
LBB0_2:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	neg	x19, x8
	b	LBB0_4
LBB0_3:
Lloh5:
	adrp	x9, l_switch.table.set_fan_div@PAGE
Lloh6:
	add	x9, x9, l_switch.table.set_fan_div@PAGEOFF
	ldr	w24, [x9, x8, lsl #2]
	add	x22, x21, #8
	mov	x0, x22
	bl	_mutex_lock
	ldr	x8, [x21]
	str	w24, [x8, x23, lsl #2]
Lloh7:
	adrp	x8, _GL520_REG_FAN_DIV@GOTPAGE
Lloh8:
	ldr	x8, [x8, _GL520_REG_FAN_DIV@GOTPAGEOFF]
Lloh9:
	ldr	w21, [x8]
	mov	x0, x20
	mov	x1, x21
	bl	_gl520_read_value
	mov	w8, #-49
	mov	w9, #-193
	cmp	w23, #0
	csel	w8, w9, w8, eq
	mov	w9, #4
	mov	w10, #6
	csel	w9, w10, w9, eq
	and	w8, w0, w8
	lsl	w9, w24, w9
	orr	w2, w8, w9
	mov	x0, x20
	mov	x1, x21
	bl	_gl520_write_value
	mov	x0, x22
	bl	_mutex_unlock
LBB0_4:
	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	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"fan_div value %ld not supported. Choose one of 1, 2, 4 or 8!\n"

	.comm	_EINVAL,8,3                     ; @EINVAL
	.comm	_GL520_REG_FAN_DIV,4,2          ; @GL520_REG_FAN_DIV
	.no_dead_strip	_set_fan_div
	.section	__TEXT,__const
	.p2align	2                               ; @switch.table.set_fan_div
l_switch.table.set_fan_div:
	.long	0                               ; 0x0
	.long	1                               ; 0x1
	.long	0                               ; 0x0
	.long	2                               ; 0x2
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	3                               ; 0x3

.subsections_via_symbols
