	.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, %r15
	movq	%rdx, %r13
	movq	%rsi, %rbx
	callq	_dev_get_drvdata
	movq	%rax, %r14
	movq	16(%rax), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_to_sensor_dev_attr_2
	movslq	(%rax), %r12
	movq	%rbx, %rdi
	callq	_to_sensor_dev_attr_2
	movslq	4(%rax), %rbx
	leaq	-48(%rbp), %rdx
	movq	%r13, %rdi
	movl	$10, %esi
	callq	_kstrtol
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	-48(%rbp), %rdi
	movl	$-127000, %esi                  ## imm = 0xFFFE0FE8
	movl	$127000, %edx                   ## imm = 0x1F018
	callq	_clamp_val
	movq	%rax, -48(%rbp)
	movq	%rax, %rdi
	movl	$1000, %esi                     ## imm = 0x3E8
	callq	_DIV_ROUND_CLOSEST
	movq	%rax, -48(%rbp)
	movq	_min@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	jne	LBB0_4
## %bb.3:
	movl	%ebx, %edi
	callq	_EMC6W201_REG_TEMP_LOW
	jmp	LBB0_5
LBB0_1:
                                        ## kill: def $eax killed $eax def $rax
	jmp	LBB0_6
LBB0_4:
	movl	%ebx, %edi
	callq	_EMC6W201_REG_TEMP_HIGH
LBB0_5:
	movl	%eax, %r13d
	movq	%rbx, %r15
	movq	%r14, %rbx
	addq	$8, %rbx
	movq	%rbx, %rdi
	callq	_mutex_lock
	movq	-48(%rbp), %rdx
	movq	(%r14), %rax
	movq	(%rax,%r12,8), %rax
	movq	%rdx, (%rax,%r15,8)
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	%r13d, %esi
	callq	_emc6w201_write8
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_mutex_unlock
	testl	%r14d, %r14d
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	cmovsl	%r14d, %eax
LBB0_6:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_min,4,2                        ## @min
	.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, #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	x23, x2
	mov	x22, x1
	bl	_dev_get_drvdata
	mov	x21, x0
	ldr	x20, [x0, #16]
	mov	x0, x22
	bl	_to_sensor_dev_attr_2
	ldrsw	x25, [x0]
	mov	x0, x22
	bl	_to_sensor_dev_attr_2
	ldrsw	x22, [x0, #4]
	add	x2, sp, #8
	mov	x0, x23
	mov	w1, #10
	bl	_kstrtol
	tbnz	w0, #31, LBB0_5
; %bb.1:
	ldr	x0, [sp, #8]
	mov	w1, #4072
	movk	w1, #65534, lsl #16
	mov	w2, #61464
	movk	w2, #1, lsl #16
	bl	_clamp_val
	str	x0, [sp, #8]
	mov	w1, #1000
	bl	_DIV_ROUND_CLOSEST
	str	x0, [sp, #8]
Lloh0:
	adrp	x8, _min@GOTPAGE
Lloh1:
	ldr	x8, [x8, _min@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	mov	x0, x22
	cmp	w25, w8
	b.ne	LBB0_3
; %bb.2:
	bl	_EMC6W201_REG_TEMP_LOW
	b	LBB0_4
LBB0_3:
	bl	_EMC6W201_REG_TEMP_HIGH
LBB0_4:
	mov	x23, x0
	add	x24, x21, #8
	mov	x0, x24
	bl	_mutex_lock
	ldr	x2, [sp, #8]
	ldr	x8, [x21]
	ldr	x8, [x8, x25, lsl #3]
	str	x2, [x8, x22, lsl #3]
	mov	x0, x20
	mov	x1, x23
	bl	_emc6w201_write8
	mov	x20, x0
	mov	x0, x24
	bl	_mutex_unlock
	cmp	w20, #0
	csel	w0, w20, w19, lt
LBB0_5:
	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
	.cfi_endproc
                                        ; -- End function
	.comm	_min,4,2                        ; @min
	.no_dead_strip	_temp_store
.subsections_via_symbols
