	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function max_min_store
_max_min_store:                         ## @max_min_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, -64(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r14
	movq	%rsi, %rbx
	callq	_dev_get_drvdata
	movq	%rax, %r13
	movq	16(%rax), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_to_sensor_dev_attr
	movslq	(%rax), %r15
	movq	_AD7414_REG_LIMIT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%r15,4), %r12d
	leaq	-48(%rbp), %rdx
	movq	%r14, %rdi
	movl	$10, %esi
	callq	_kstrtol
	testl	%eax, %eax
	js	LBB0_2
## %bb.1:
	movq	-48(%rbp), %rdi
	movl	$-40000, %esi                   ## imm = 0xFFFF63C0
	movl	$85000, %edx                    ## imm = 0x14C08
	callq	_clamp_val
	leaq	500(%rax), %rcx
	leaq	-500(%rax), %rdx
	testq	%rax, %rax
	cmovsq	%rdx, %rcx
	movabsq	$2361183241434822607, %rdx      ## imm = 0x20C49BA5E353F7CF
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	shrq	$63, %rax
	sarq	$7, %rdx
	addq	%rax, %rdx
	movq	%rdx, -48(%rbp)
	movq	%r13, %rbx
	addq	$8, %rbx
	movq	%rbx, %rdi
	callq	_mutex_lock
	movq	-48(%rbp), %rax
	movq	(%r13), %rcx
	movq	%rax, (%rcx,%r15,8)
	movq	-48(%rbp), %rdx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r12d, %esi
	callq	_ad7414_write
	movq	%rbx, %rdi
	callq	_mutex_unlock
	movq	-64(%rbp), %rax                 ## 8-byte Reload
                                        ## kill: def $eax killed $eax killed $rax
LBB0_2:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AD7414_REG_LIMIT,8,3           ## @AD7414_REG_LIMIT
	.no_dead_strip	_max_min_store
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function max_min_store
_max_min_store:                         ; @max_min_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	x23, x2
	mov	x22, x1
	bl	_dev_get_drvdata
	mov	x21, x0
	ldr	x20, [x0, #16]
	mov	x0, x22
	bl	_to_sensor_dev_attr
	ldrsw	x24, [x0]
Lloh0:
	adrp	x8, _AD7414_REG_LIMIT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AD7414_REG_LIMIT@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	w22, [x8, x24, lsl #2]
	add	x2, sp, #8
	mov	x0, x23
	mov	w1, #10
	bl	_kstrtol
	tbnz	w0, #31, LBB0_2
; %bb.1:
	ldr	x0, [sp, #8]
	mov	w1, #-40000
	mov	w2, #19464
	movk	w2, #1, lsl #16
	bl	_clamp_val
	cmp	x0, #0
	mov	x8, #-500
	cneg	x8, x8, ge
	add	x8, x8, x0
	mov	x9, #63439
	movk	x9, #58195, lsl #16
	movk	x9, #39845, lsl #32
	movk	x9, #8388, lsl #48
	smulh	x8, x8, x9
	asr	x9, x8, #7
	add	x8, x9, x8, lsr #63
	str	x8, [sp, #8]
	add	x23, x21, #8
	mov	x0, x23
	bl	_mutex_lock
	ldr	x8, [sp, #8]
	ldr	x9, [x21]
	str	x8, [x9, x24, lsl #3]
	ldr	x2, [sp, #8]
	mov	x0, x20
	mov	x1, x22
	bl	_ad7414_write
	mov	x0, x23
	bl	_mutex_unlock
	mov	x0, x19
LBB0_2:
	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
	.cfi_endproc
                                        ; -- End function
	.comm	_AD7414_REG_LIMIT,8,3           ; @AD7414_REG_LIMIT
	.no_dead_strip	_max_min_store
.subsections_via_symbols
