	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function temp_store
_temp_store:                            ## @temp_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, %r12
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	%rsi, %rdi
	callq	_to_sensor_dev_attr_2
	movslq	(%rax), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_to_sensor_dev_attr_2
	movslq	4(%rax), %r13
	movq	%r15, %rdi
	callq	_dev_get_drvdata
	movq	%rax, %r15
	leaq	-48(%rbp), %rdx
	movq	%r12, %rdi
	movl	$10, %esi
	callq	_kstrtol
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	%r15, %rbx
	addq	$24, %r15
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	-48(%rbp), %rdi
	movl	$1000, %esi                     ## imm = 0x3E8
	callq	_DIV_ROUND_CLOSEST
	addq	(%rbx), %rax
	movq	%rax, -48(%rbp)
	movq	8(%rbx), %rcx
	movq	_max6581@GOTPCREL(%rip), %rsi
	xorl	%edx, %edx
	cmpq	(%rsi), %rcx
	sete	%dl
	shll	$7, %edx
	orl	$127, %edx
	movq	%rax, %rdi
	xorl	%esi, %esi
	callq	_clamp_val
	movq	%rax, -48(%rbp)
	movq	16(%rbx), %rcx
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	(%rcx,%rdx,8), %rcx
	movq	%rax, (%rcx,%r13,8)
	movl	28(%rbx), %edi
	cmpl	$2, %r13d
	movq	%rdx, %rcx
	jne	LBB0_3
## %bb.4:
	movq	_MAX6697_REG_MAX@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_1:
	movl	%eax, %r14d
	jmp	LBB0_6
LBB0_3:
	movq	_MAX6697_REG_CRIT@GOTPCREL(%rip), %rax
LBB0_5:
	movq	(%rax), %rax
	movl	(%rax,%rcx,4), %esi
	movq	-48(%rbp), %rdx
	callq	_i2c_smbus_write_byte_data
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_mutex_unlock
	testl	%ebx, %ebx
	cmovsl	%ebx, %r14d
LBB0_6:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_max6581,8,3                    ## @max6581
	.comm	_MAX6697_REG_MAX,8,3            ## @MAX6697_REG_MAX
	.comm	_MAX6697_REG_CRIT,8,3           ## @MAX6697_REG_CRIT
	.no_dead_strip	_temp_store
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function temp_store
_temp_store:                            ; @temp_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	x21, x2
	mov	x20, x1
	mov	x22, x0
	mov	x0, x1
	bl	_to_sensor_dev_attr_2
	ldrsw	x23, [x0]
	mov	x0, x20
	bl	_to_sensor_dev_attr_2
	ldrsw	x24, [x0, #4]
	mov	x0, x22
	bl	_dev_get_drvdata
	mov	x20, x0
	add	x2, sp, #8
	mov	x0, x21
	mov	w1, #10
	bl	_kstrtol
	tbnz	w0, #31, LBB0_2
; %bb.1:
	add	x21, x20, #24
	mov	x0, x21
	bl	_mutex_lock
	ldr	x0, [sp, #8]
	mov	w1, #1000
	bl	_DIV_ROUND_CLOSEST
	ldp	x8, x9, [x20]
	add	x0, x8, x0
Lloh0:
	adrp	x8, _max6581@GOTPAGE
Lloh1:
	ldr	x8, [x8, _max6581@GOTPAGEOFF]
	str	x0, [sp, #8]
Lloh2:
	ldr	x8, [x8]
	cmp	x9, x8
	mov	w8, #127
	mov	w9, #255
	csel	w2, w9, w8, eq
	mov	w1, #0
	bl	_clamp_val
	str	x0, [sp, #8]
	ldr	x8, [x20, #16]
	ldr	x8, [x8, x23, lsl #3]
	str	x0, [x8, x24, lsl #3]
	ldr	w0, [x20, #28]
Lloh3:
	adrp	x8, _MAX6697_REG_MAX@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAX6697_REG_MAX@GOTPAGEOFF]
Lloh5:
	adrp	x9, _MAX6697_REG_CRIT@GOTPAGE
Lloh6:
	ldr	x9, [x9, _MAX6697_REG_CRIT@GOTPAGEOFF]
	cmp	w24, #2
	csel	x8, x8, x9, eq
	ldr	x8, [x8]
	ldr	w1, [x8, x23, lsl #2]
	ldr	x2, [sp, #8]
	bl	_i2c_smbus_write_byte_data
	mov	x20, x0
	mov	x0, x21
	bl	_mutex_unlock
	cmp	w20, #0
	csel	w0, w20, w19, lt
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 AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_max6581,8,3                    ; @max6581
	.comm	_MAX6697_REG_MAX,8,3            ; @MAX6697_REG_MAX
	.comm	_MAX6697_REG_CRIT,8,3           ; @MAX6697_REG_CRIT
	.no_dead_strip	_temp_store
.subsections_via_symbols
