	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pwm1_freq_store
_pwm1_freq_store:                       ## @pwm1_freq_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, %rbx
	callq	_dev_get_drvdata
	movq	%rax, %r14
	movq	8(%rax), %r13
	movq	_ADT7470_CFG_LF@GOTPCREL(%rip), %rax
	movb	(%rax), %r15b
	leaq	-56(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$10, %esi
	callq	_kstrtol
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subq	(%rax), %r12
	jmp	LBB0_3
LBB0_2:
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	movq	-56(%rbp), %r13
	movq	_adt7470_freq_map@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%ebx, %edi
	callq	_ARRAY_SIZE
	movq	%r13, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_find_closest
                                        ## kill: def $eax killed $eax def $rax
	leal	248(%rax), %ebx
	xorl	%ecx, %ecx
	cmpl	$8, %eax
	cmovll	%eax, %ebx
	movzbl	%r15b, %r15d
	cmovgel	%ecx, %r15d
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	_ADT7470_REG_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rdi
	callq	_i2c_smbus_read_byte_data
	movq	_ADT7470_REG_CFG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_ADT7470_CFG_LF@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	notb	%cl
	andb	%al, %cl
	orb	%r15b, %cl
	movzbl	%cl, %edx
	movq	%r13, %rdi
	callq	_i2c_smbus_write_byte_data
	movq	_ADT7470_REG_CFG_2@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%r13, %rdi
	callq	_i2c_smbus_read_byte_data
	movl	(%r15), %esi
	movzbl	%al, %eax
	movq	_ADT7470_FREQ_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movq	_ADT7470_FREQ_MASK@GOTPCREL(%rip), %rdx
	movzbl	(%rdx), %edx
	shll	%cl, %ebx
	notl	%edx
	andl	%eax, %edx
	orl	%edx, %ebx
	movzbl	%bl, %edx
	movq	%r13, %rdi
	callq	_i2c_smbus_write_byte_data
	movq	%r14, %rdi
	callq	_mutex_unlock
LBB0_3:
	movq	%r12, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ADT7470_CFG_LF,1,0             ## @ADT7470_CFG_LF
	.comm	_EINVAL,8,3                     ## @EINVAL
	.comm	_adt7470_freq_map,4,2           ## @adt7470_freq_map
	.comm	_ADT7470_REG_CFG,4,2            ## @ADT7470_REG_CFG
	.comm	_ADT7470_REG_CFG_2,4,2          ## @ADT7470_REG_CFG_2
	.comm	_ADT7470_FREQ_MASK,1,0          ## @ADT7470_FREQ_MASK
	.comm	_ADT7470_FREQ_SHIFT,4,2         ## @ADT7470_FREQ_SHIFT
	.no_dead_strip	_pwm1_freq_store
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pwm1_freq_store
_pwm1_freq_store:                       ; @pwm1_freq_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	x22, x2
	bl	_dev_get_drvdata
	mov	x20, x0
	ldr	x21, [x0, #8]
Lloh0:
	adrp	x24, _ADT7470_CFG_LF@GOTPAGE
Lloh1:
	ldr	x24, [x24, _ADT7470_CFG_LF@GOTPAGEOFF]
	ldrb	w25, [x24]
	add	x2, sp, #8
	mov	x0, x22
	mov	w1, #10
	bl	_kstrtol
	cbz	x0, LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	neg	x19, x8
	b	LBB0_3
LBB0_2:
	ldr	x22, [sp, #8]
Lloh5:
	adrp	x8, _adt7470_freq_map@GOTPAGE
Lloh6:
	ldr	x8, [x8, _adt7470_freq_map@GOTPAGEOFF]
Lloh7:
	ldr	w23, [x8]
	mov	x0, x23
	bl	_ARRAY_SIZE
	mov	x2, x0
	mov	x0, x22
	mov	x1, x23
	bl	_find_closest
	add	w8, w0, #248
	cmp	w0, #7
	csel	w22, w8, w0, gt
	csel	w23, wzr, w25, gt
	mov	x0, x20
	bl	_mutex_lock
Lloh8:
	adrp	x25, _ADT7470_REG_CFG@GOTPAGE
Lloh9:
	ldr	x25, [x25, _ADT7470_REG_CFG@GOTPAGEOFF]
	ldr	w1, [x25]
	mov	x0, x21
	bl	_i2c_smbus_read_byte_data
	ldr	w1, [x25]
	ldrb	w8, [x24]
	eor	w8, w8, #0xff
	and	w8, w0, w8
	orr	w2, w8, w23
	mov	x0, x21
	bl	_i2c_smbus_write_byte_data
Lloh10:
	adrp	x23, _ADT7470_REG_CFG_2@GOTPAGE
Lloh11:
	ldr	x23, [x23, _ADT7470_REG_CFG_2@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x21
	bl	_i2c_smbus_read_byte_data
	ldr	w1, [x23]
Lloh12:
	adrp	x8, _ADT7470_FREQ_MASK@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ADT7470_FREQ_MASK@GOTPAGEOFF]
	ldrb	w8, [x8]
	bic	w8, w0, w8
Lloh14:
	adrp	x9, _ADT7470_FREQ_SHIFT@GOTPAGE
Lloh15:
	ldr	x9, [x9, _ADT7470_FREQ_SHIFT@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	lsl	w9, w22, w9
	and	w9, w9, #0xff
	orr	w2, w8, w9
	mov	x0, x21
	bl	_i2c_smbus_write_byte_data
	mov	x0, x20
	bl	_mutex_unlock
LBB0_3:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_ADT7470_CFG_LF,1,0             ; @ADT7470_CFG_LF
	.comm	_EINVAL,8,3                     ; @EINVAL
	.comm	_adt7470_freq_map,4,2           ; @adt7470_freq_map
	.comm	_ADT7470_REG_CFG,4,2            ; @ADT7470_REG_CFG
	.comm	_ADT7470_REG_CFG_2,4,2          ; @ADT7470_REG_CFG_2
	.comm	_ADT7470_FREQ_MASK,1,0          ; @ADT7470_FREQ_MASK
	.comm	_ADT7470_FREQ_SHIFT,4,2         ; @ADT7470_FREQ_SHIFT
	.no_dead_strip	_pwm1_freq_store
.subsections_via_symbols
