	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fan_store
_fan_store:                             ## @fan_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movq	%rdx, %r13
	movq	%rsi, %rbx
	callq	_dev_get_drvdata
	movq	%rax, %r12
	movq	16(%rax), %r15
	movq	%rbx, %rdi
	callq	_to_sensor_dev_attr
	movslq	(%rax), %rbx
	leaq	-48(%rbp), %rdx
	movq	%r13, %rdi
	movl	$10, %esi
	callq	_kstrtol
	testl	%eax, %eax
	jne	LBB0_10
## %bb.1:
	movq	%r12, %r13
	movq	-48(%rbp), %rcx
	testq	%rcx, %rcx
	jle	LBB0_2
## %bb.3:
	cmpq	$6000000, %rcx                  ## imm = 0x5B8D80
	ja	LBB0_4
## %bb.5:
	movl	$6000000, %eax                  ## imm = 0x5B8D80
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $eax killed $eax def $rax
	jmp	LBB0_6
LBB0_2:
	movl	$65535, %eax                    ## imm = 0xFFFF
	jmp	LBB0_6
LBB0_4:
	xorl	%eax, %eax
LBB0_6:
	movq	%rax, -48(%rbp)
	addq	$8, %r12
	movq	%r12, %rdi
	callq	_mutex_lock
	movq	-48(%rbp), %rdi
	movl	$1, %esi
	movl	$65535, %edx                    ## imm = 0xFFFF
	callq	_clamp_val
	movq	(%r13), %rcx
	movl	%eax, (%rcx,%rbx,4)
	movq	_fan_reg_low@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rcx,%rbx,4), %esi
	movzbl	%al, %edx
	movq	%r15, %rdi
	callq	_i2c_smbus_write_byte_data
	testq	%rax, %rax
	jne	LBB0_8
## %bb.7:
	movq	_fan_reg_hi@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%rbx,4), %esi
	movq	(%r13), %rax
	movl	(%rax,%rbx,4), %edx
	sarl	$8, %edx
	movq	%r15, %rdi
	callq	_i2c_smbus_write_byte_data
	testq	%rax, %rax
	je	LBB0_9
LBB0_8:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subq	(%rax), %r14
LBB0_9:
	movq	%r12, %rdi
	callq	_mutex_unlock
	movl	%r14d, %eax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_fan_reg_low,8,3                ## @fan_reg_low
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Register write error, aborting.\n"

	.comm	_EIO,8,3                        ## @EIO
	.comm	_fan_reg_hi,8,3                 ## @fan_reg_hi
	.no_dead_strip	_fan_store
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fan_store
_fan_store:                             ; @fan_store
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x3
	mov	x22, x2
	mov	x23, x1
	bl	_dev_get_drvdata
	mov	x21, x0
	ldr	x20, [x0, #16]
	mov	x0, x23
	bl	_to_sensor_dev_attr
	ldrsw	x23, [x0]
	add	x2, sp, #8
	mov	x0, x22
	mov	w1, #10
	bl	_kstrtol
	cbnz	w0, LBB0_5
; %bb.1:
	ldr	x8, [sp, #8]
	mov	w9, #65535
	mov	w10, #36224
	movk	w10, #91, lsl #16
	udiv	x10, x10, x8
	cmp	x8, #1
	csel	x8, x9, x10, lt
	str	x8, [sp, #8]
	add	x22, x21, #8
	mov	x0, x22
	bl	_mutex_lock
	ldr	x0, [sp, #8]
	mov	w1, #1
	mov	w2, #65535
	bl	_clamp_val
	ldr	x8, [x21]
	lsl	x23, x23, #2
	str	w0, [x8, x23]
Lloh0:
	adrp	x8, _fan_reg_low@GOTPAGE
Lloh1:
	ldr	x8, [x8, _fan_reg_low@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	w1, [x8, x23]
	and	w2, w0, #0xff
	mov	x0, x20
	bl	_i2c_smbus_write_byte_data
	cbnz	x0, LBB0_3
; %bb.2:
Lloh3:
	adrp	x8, _fan_reg_hi@GOTPAGE
Lloh4:
	ldr	x8, [x8, _fan_reg_hi@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	ldr	w1, [x8, x23]
	ldr	x8, [x21]
	ldr	w8, [x8, x23]
	asr	w2, w8, #8
	mov	x0, x20
	bl	_i2c_smbus_write_byte_data
	cbz	x0, LBB0_4
LBB0_3:
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh8:
	adrp	x8, _EIO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	neg	x19, x8
LBB0_4:
	mov	x0, x22
	bl	_mutex_unlock
	mov	x0, x19
LBB0_5:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_fan_reg_low,8,3                ; @fan_reg_low
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Register write error, aborting.\n"

	.comm	_EIO,8,3                        ; @EIO
	.comm	_fan_reg_hi,8,3                 ; @fan_reg_hi
	.no_dead_strip	_fan_store
.subsections_via_symbols
