	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fan_pulses_store
_fan_pulses_store:                      ## @fan_pulses_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
	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, %r12
	movq	%rdx, %r13
	movq	%rdi, %rbx
	movq	%rsi, %rdi
	callq	_to_sensor_dev_attr
	movslq	(%rax), %r14
	movq	%rbx, %rdi
	callq	_dev_get_drvdata
	movq	%rax, %r15
	movq	8(%rax), %rbx
	leaq	-56(%rbp), %rdx
	movq	%r13, %rdi
	movl	$10, %esi
	callq	_kstrtoul
	testq	%rax, %rax
	jne	LBB0_1
## %bb.2:
	movq	-56(%rbp), %rax
	leaq	-1(%rax), %rcx
	cmpq	$8, %rcx
	jae	LBB0_1
## %bb.3:
	movl	$139, %edx
	btl	%ecx, %edx
	jb	LBB0_4
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_5:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	leaq	l_switch.table.fan_pulses_store(%rip), %rcx
	movl	-4(%rcx,%rax,4), %r13d
	movq	%r15, %rdi
	addq	$4, %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_mutex_lock
	movq	_TC654_FAN_PULSE_SHIFT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movb	(%rax,%r14,4), %cl
	movl	$3, %edx
	shll	%cl, %edx
	notl	%edx
	andl	(%r15), %edx
	movl	%edx, (%r15)
	movb	(%rax,%r14,4), %cl
	shll	%cl, %r13d
	orl	%edx, %r13d
	movl	%r13d, (%r15)
	movq	_TC654_REG_CONFIG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r13d, %edx
	callq	_i2c_smbus_write_byte_data
	movl	%eax, %ebx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	testl	%ebx, %ebx
	cmovsl	%ebx, %r12d
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_TC654_FAN_PULSE_SHIFT,8,3      ## @TC654_FAN_PULSE_SHIFT
	.comm	_TC654_REG_CONFIG,4,2           ## @TC654_REG_CONFIG
	.no_dead_strip	_fan_pulses_store
	.section	__TEXT,__const
	.p2align	2                               ## @switch.table.fan_pulses_store
l_switch.table.fan_pulses_store:
	.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 fan_pulses_store
_fan_pulses_store:                      ; @fan_pulses_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	x20, x0
	mov	x0, x1
	bl	_to_sensor_dev_attr
	ldrsw	x23, [x0]
	mov	x0, x20
	bl	_dev_get_drvdata
	mov	x21, x0
	ldr	x20, [x0, #8]
	add	x2, sp, #8
	mov	x0, x22
	mov	w1, #10
	bl	_kstrtoul
	cbnz	x0, LBB0_3
; %bb.1:
	ldr	x8, [sp, #8]
	sub	x8, x8, #1
	cmp	x8, #8
	b.hs	LBB0_3
; %bb.2:
	mov	w9, #139
	lsr	w9, w9, w8
	tbnz	w9, #0, LBB0_5
LBB0_3:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_4:
	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
LBB0_5:
Lloh3:
	adrp	x9, l_switch.table.fan_pulses_store@PAGE
Lloh4:
	add	x9, x9, l_switch.table.fan_pulses_store@PAGEOFF
	ldr	w24, [x9, x8, lsl #2]
	add	x22, x21, #4
	mov	x0, x22
	bl	_mutex_lock
Lloh5:
	adrp	x8, _TC654_FAN_PULSE_SHIFT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _TC654_FAN_PULSE_SHIFT@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	lsl	x9, x23, #2
	ldr	w10, [x8, x9]
	mov	w11, #3
	lsl	w10, w11, w10
	ldr	w11, [x21]
	bic	w10, w11, w10
	str	w10, [x21]
	ldr	w8, [x8, x9]
	lsl	w8, w24, w8
	orr	w2, w8, w10
	str	w2, [x21]
Lloh8:
	adrp	x8, _TC654_REG_CONFIG@GOTPAGE
Lloh9:
	ldr	x8, [x8, _TC654_REG_CONFIG@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_i2c_smbus_write_byte_data
	mov	x20, x0
	mov	x0, x22
	bl	_mutex_unlock
	cmp	w20, #0
	csel	w0, w20, w19, lt
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_TC654_FAN_PULSE_SHIFT,8,3      ; @TC654_FAN_PULSE_SHIFT
	.comm	_TC654_REG_CONFIG,4,2           ; @TC654_REG_CONFIG
	.no_dead_strip	_fan_pulses_store
	.section	__TEXT,__const
	.p2align	2                               ; @switch.table.fan_pulses_store
l_switch.table.fan_pulses_store:
	.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
