	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pwm_auto_store
_pwm_auto_store:                        ## @pwm_auto_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, %r14
	movq	%rdx, %r15
	movq	%rdi, %rbx
	movq	%rsi, %rdi
	callq	_to_sensor_dev_attr
	movq	%rax, %r12
	movq	%rbx, %rdi
	callq	_dev_get_drvdata
	movq	%rax, %r13
	movq	16(%rax), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	(%r12), %edi
	callq	_ADT7470_REG_PWM_CFG
	movl	%eax, %ebx
	leaq	-48(%rbp), %rdx
	movq	%r15, %rdi
	movl	$10, %esi
	callq	_kstrtol
	testq	%rax, %rax
	jne	LBB0_1
## %bb.2:
	movl	%ebx, -52(%rbp)                 ## 4-byte Spill
	movq	-48(%rbp), %rax
	leaq	-3(%rax), %rcx
	cmpq	$-3, %rcx
	ja	LBB0_3
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subq	(%rax), %r14
LBB0_7:
	movq	%r14, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	testb	$1, (%r12)
	jne	LBB0_4
## %bb.5:
	movq	_ADT7470_PWM1_AUTO_MASK@GOTPCREL(%rip), %rcx
	jmp	LBB0_6
LBB0_4:
	movq	_ADT7470_PWM2_AUTO_MASK@GOTPCREL(%rip), %rcx
LBB0_6:
	movl	(%rcx), %r15d
	decq	%rax
	movq	%rax, -48(%rbp)
	movq	%r13, %rbx
	addq	$8, %rbx
	movq	%rbx, %rdi
	callq	_mutex_lock
	movq	-48(%rbp), %rax
	movq	(%r13), %rcx
	movslq	(%r12), %rdx
	movq	%rax, (%rcx,%rdx,8)
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rdi
	movl	-52(%rbp), %r12d                ## 4-byte Reload
	movl	%r12d, %esi
	callq	_i2c_smbus_read_byte_data
	movl	%eax, %ecx
	orl	%r15d, %ecx
	notl	%r15d
	andl	%eax, %r15d
	cmpq	$0, -48(%rbp)
	cmovnel	%ecx, %r15d
	movq	%r13, %rdi
	movl	%r12d, %esi
	movl	%r15d, %edx
	callq	_i2c_smbus_write_byte_data
	movq	%rbx, %rdi
	callq	_mutex_unlock
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,8,3                     ## @EINVAL
	.comm	_ADT7470_PWM2_AUTO_MASK,4,2     ## @ADT7470_PWM2_AUTO_MASK
	.comm	_ADT7470_PWM1_AUTO_MASK,4,2     ## @ADT7470_PWM1_AUTO_MASK
	.no_dead_strip	_pwm_auto_store
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pwm_auto_store
_pwm_auto_store:                        ; @pwm_auto_store
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x24, x2
	mov	x20, x0
	mov	x0, x1
	bl	_to_sensor_dev_attr
	mov	x22, x0
	mov	x0, x20
	bl	_dev_get_drvdata
	mov	x23, x0
	ldr	x20, [x0, #16]
	ldr	w0, [x22]
	bl	_ADT7470_REG_PWM_CFG
	mov	x21, x0
	add	x2, sp, #8
	mov	x0, x24
	mov	w1, #10
	bl	_kstrtol
	cbnz	x0, LBB0_2
; %bb.1:
	ldr	x8, [sp, #8]
	sub	x9, x8, #3
	cmn	x9, #3
	b.hi	LBB0_3
LBB0_2:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	neg	x19, x8
	b	LBB0_4
LBB0_3:
	ldr	w9, [x22]
Lloh3:
	adrp	x10, _ADT7470_PWM1_AUTO_MASK@GOTPAGE
Lloh4:
	ldr	x10, [x10, _ADT7470_PWM1_AUTO_MASK@GOTPAGEOFF]
Lloh5:
	adrp	x11, _ADT7470_PWM2_AUTO_MASK@GOTPAGE
Lloh6:
	ldr	x11, [x11, _ADT7470_PWM2_AUTO_MASK@GOTPAGEOFF]
	tst	w9, #0x1
	csel	x9, x10, x11, eq
	ldr	w25, [x9]
	sub	x8, x8, #1
	str	x8, [sp, #8]
	add	x24, x23, #8
	mov	x0, x24
	bl	_mutex_lock
	ldr	x8, [sp, #8]
	ldr	x9, [x23]
	ldrsw	x10, [x22]
	str	x8, [x9, x10, lsl #3]
	mov	x0, x20
	mov	x1, x21
	bl	_i2c_smbus_read_byte_data
	ldr	x8, [sp, #8]
	orr	w9, w0, w25
	bic	w10, w0, w25
	cmp	x8, #0
	csel	w2, w10, w9, eq
	mov	x0, x20
	mov	x1, x21
	bl	_i2c_smbus_write_byte_data
	mov	x0, x24
	bl	_mutex_unlock
LBB0_4:
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,8,3                     ; @EINVAL
	.comm	_ADT7470_PWM2_AUTO_MASK,4,2     ; @ADT7470_PWM2_AUTO_MASK
	.comm	_ADT7470_PWM1_AUTO_MASK,4,2     ; @ADT7470_PWM1_AUTO_MASK
	.no_dead_strip	_pwm_auto_store
.subsections_via_symbols
