	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_fan
_set_fan:                               ## @set_fan
	.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
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	callq	_dev_get_drvdata
	movq	%rax, %r13
	movq	%rbx, %rdi
	callq	_to_sensor_dev_attr_2
	movslq	(%rax), %rbx
	movl	4(%rax), %r15d
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$10, %edx
	callq	_simple_strtol
	movq	%rax, %r12
	leaq	24(%r13), %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_mutex_lock
	movq	_VT1211_REG_FAN_DIV@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%r13, %rdi
	callq	_vt1211_read8
	movl	%eax, %edx
	shrl	$4, %edx
	andl	$3, %edx
	movq	(%r13), %rcx
	movl	%edx, (%rcx)
	movl	%eax, %edx
	shrl	$6, %edx
	andl	$3, %edx
	movl	%edx, 4(%rcx)
	andl	$15, %eax
	movl	%eax, 8(%r13)
	cmpl	$129, %r15d
	je	LBB0_3
## %bb.1:
	cmpl	$128, %r15d
	jne	LBB0_6
## %bb.2:
	movl	(%rcx,%rbx,4), %esi
	movq	%r12, %rdi
	callq	_RPM_TO_REG
	movq	16(%r13), %rcx
	movl	%eax, (%rcx,%rbx,4)
	movl	%ebx, %edi
	callq	_VT1211_REG_FAN_MIN
	movq	16(%r13), %rcx
	movl	(%rcx,%rbx,4), %edx
	movq	%r13, %rdi
	movl	%eax, %esi
	jmp	LBB0_8
LBB0_3:
	leaq	-1(%r12), %rax
	cmpq	$8, %rax
	jae	LBB0_5
## %bb.4:
	movl	$139, %esi
	btl	%eax, %esi
	jb	LBB0_7
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subq	(%rax), %rbx
	leaq	L_.str(%rip), %rsi
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rdx
	callq	_dev_warn
	jmp	LBB0_10
LBB0_6:
	leaq	L_.str.1(%rip), %rsi
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, %edx
	callq	_dev_dbg
	jmp	LBB0_9
LBB0_7:
	leaq	l_switch.table.set_fan(%rip), %rax
	movl	-4(%rax,%r12,4), %eax
	movl	%eax, (%rcx,%rbx,4)
	movl	(%r14), %esi
	movl	(%rcx), %edx
	movl	4(%rcx), %eax
	shll	$6, %eax
	shll	$4, %edx
	orl	%eax, %edx
	orl	8(%r13), %edx
	movq	%r13, %rdi
LBB0_8:
	callq	_vt1211_write8
LBB0_9:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
LBB0_10:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	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	_VT1211_REG_FAN_DIV,4,2         ## @VT1211_REG_FAN_DIV
	.comm	_EINVAL,8,3                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"fan div value %ld not supported. Choose one of 1, 2, 4, or 8.\n"

L_.str.1:                               ## @.str.1
	.asciz	"Unknown attr fetch (%d)\n"

	.no_dead_strip	_set_fan
	.section	__TEXT,__const
	.p2align	2                               ## @switch.table.set_fan
l_switch.table.set_fan:
	.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
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function set_fan
lCPI0_0:
	.long	4294967292                      ; 0xfffffffc
	.long	4294967290                      ; 0xfffffffa
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_set_fan:                               ; @set_fan
	.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	x20, x2
	mov	x23, x1
	mov	x22, x0
	bl	_dev_get_drvdata
	mov	x21, x0
	mov	x0, x23
	bl	_to_sensor_dev_attr_2
	ldp	w23, w25, [x0]
                                        ; kill: def $w23 killed $w23 def $x23
	sxtw	x23, w23
	mov	x0, x20
	mov	x1, #0
	mov	w2, #10
	bl	_simple_strtol
	mov	x24, x0
	add	x20, x21, #24
	mov	x0, x20
	bl	_mutex_lock
Lloh0:
	adrp	x26, _VT1211_REG_FAN_DIV@GOTPAGE
Lloh1:
	ldr	x26, [x26, _VT1211_REG_FAN_DIV@GOTPAGEOFF]
	ldr	w1, [x26]
	mov	x0, x21
	bl	_vt1211_read8
	ldr	x8, [x21]
	dup.2s	v0, w0
Lloh2:
	adrp	x9, lCPI0_0@PAGE
Lloh3:
	ldr	d1, [x9, lCPI0_0@PAGEOFF]
	ushl.2s	v0, v0, v1
	movi.2s	v1, #3
	and.8b	v0, v0, v1
	str	d0, [x8]
	and	w9, w0, #0xf
	str	w9, [x21, #8]
	cmp	w25, #129
	b.eq	LBB0_3
; %bb.1:
	cmp	w25, #128
	b.ne	LBB0_6
; %bb.2:
	lsl	x22, x23, #2
	ldr	w1, [x8, x22]
	mov	x0, x24
	bl	_RPM_TO_REG
	ldr	x8, [x21, #16]
	str	w0, [x8, x22]
	mov	x0, x23
	bl	_VT1211_REG_FAN_MIN
	mov	x1, x0
	ldr	x8, [x21, #16]
	ldr	w2, [x8, x22]
	b	LBB0_8
LBB0_3:
	sub	x9, x24, #1
	cmp	x9, #8
	b.hs	LBB0_5
; %bb.4:
	mov	w10, #139
	lsr	w10, w10, w9
	tbnz	w10, #0, LBB0_7
LBB0_5:
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	neg	x19, x8
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	mov	x2, x24
	bl	_dev_warn
	b	LBB0_9
LBB0_6:
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x22
	mov	x2, x25
	bl	_dev_dbg
	b	LBB0_9
LBB0_7:
Lloh11:
	adrp	x10, l_switch.table.set_fan@PAGE
Lloh12:
	add	x10, x10, l_switch.table.set_fan@PAGEOFF
	ldr	w9, [x10, x9, lsl #2]
	str	w9, [x8, x23, lsl #2]
	ldr	w1, [x26]
	ldp	w8, w9, [x8]
	lsl	w8, w8, #4
	orr	w8, w8, w9, lsl #6
	ldr	w9, [x21, #8]
	orr	w2, w8, w9
LBB0_8:
	mov	x0, x21
	bl	_vt1211_write8
LBB0_9:
	mov	x0, x20
	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 AdrpLdr	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_VT1211_REG_FAN_DIV,4,2         ; @VT1211_REG_FAN_DIV
	.comm	_EINVAL,8,3                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"fan div value %ld not supported. Choose one of 1, 2, 4, or 8.\n"

l_.str.1:                               ; @.str.1
	.asciz	"Unknown attr fetch (%d)\n"

	.no_dead_strip	_set_fan
	.section	__TEXT,__const
	.p2align	2                               ; @switch.table.set_fan
l_switch.table.set_fan:
	.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
