	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_temp
_set_temp:                              ## @set_temp
	.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, %r15
	movq	%rdi, %rbx
	movq	%rsi, %rdi
	callq	_to_sensor_dev_attr_2
	movq	%rax, %r13
	movq	%rbx, %rdi
	callq	_to_i2c_client
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdi
	callq	_i2c_get_clientdata
	movq	%rax, %r14
	leaq	-56(%rbp), %rdx
	movq	%r15, %rdi
	movl	$10, %esi
	callq	_strict_strtol
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subq	(%rax), %r12
	jmp	LBB0_27
LBB0_2:
	movq	%r14, %rdi
	addq	$16, %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_mutex_lock
	movq	_REG_CONFIG5@GOTPCREL(%rip), %rax
	movzbl	(%rax), %edi
	callq	_adt7475_read
	movl	%eax, (%r14)
	movl	(%r13), %ecx
	cmpl	$132, %ecx
	je	LBB0_6
## %bb.3:
	cmpl	$129, %ecx
	jne	LBB0_8
## %bb.4:
	movq	_CONFIG5_TEMPOFFSET@GOTPCREL(%rip), %rcx
	movq	-56(%rbp), %rdi
	testl	%eax, (%rcx)
	je	LBB0_11
## %bb.5:
	movl	$-63000, %esi                   ## imm = 0xFFFF09E8
	movl	$127000, %edx                   ## imm = 0x1F018
	callq	_SENSORS_LIMIT
	movq	%rax, %rcx
	movabsq	$2361183241434822607, %rdx      ## imm = 0x20C49BA5E353F7CF
	imulq	%rdx
	movq	%rdx, %r15
	movq	%rcx, -56(%rbp)
	movq	%rdx, %rax
	shrq	$63, %rax
	sarq	$7, %r15
	jmp	LBB0_12
LBB0_6:
	movq	8(%r13), %rdi
	callq	_TEMP_THERM_REG
	movzbl	%al, %edi
	callq	_adt7475_read
	shll	$2, %eax
	cltq
	movq	8(%r14), %rcx
	movq	1024(%rcx), %rcx
	movq	8(%r13), %rdx
	movq	%rax, (%rcx,%rdx,8)
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_adt7475_read_hystersis
	movq	8(%r14), %rax
	movq	1024(%rax), %rax
	movq	8(%r13), %rcx
	movl	(%rax,%rcx,8), %esi
	movq	%r14, %rdi
	callq	_reg2temp
	movl	%eax, %ebx
	movq	-56(%rbp), %rdi
	leal	-15000(%rbx), %esi
	movl	%eax, %edx
	callq	_SENSORS_LIMIT
	movslq	%ebx, %rcx
	subq	%rax, %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, -56(%rbp)
	movq	8(%r13), %rcx
	movq	8(%r14), %rax
	movq	1056(%rax), %rax
	cmpq	$1, %rcx
	jne	LBB0_9
## %bb.7:
	andq	$15, 8(%rax)
	andl	$15, %edx
	jmp	LBB0_10
LBB0_8:
	movq	-56(%rbp), %rsi
	movq	%r14, %rdi
	callq	_temp2reg
	movq	8(%r14), %rcx
	movslq	(%r13), %rdx
	movq	(%rcx,%rdx,8), %rcx
	movq	8(%r13), %rdx
	movq	%rax, (%rcx,%rdx,8)
	movq	8(%r13), %rax
	movq	(%rcx,%rax,8), %r15
	sarq	$2, %r15
	jmp	LBB0_13
LBB0_9:
	andq	$240, (%rax,%rcx,8)
	movl	-56(%rbp), %ecx
	shll	$4, %ecx
	movzbl	%cl, %edx
LBB0_10:
	movq	8(%r13), %rcx
	orq	%rdx, (%rax,%rcx,8)
	movq	8(%r13), %rcx
	movq	(%rax,%rcx,8), %r15
	jmp	LBB0_13
LBB0_11:
	movl	$-63000, %esi                   ## imm = 0xFFFF09E8
	movl	$64000, %edx                    ## imm = 0xFA00
	callq	_SENSORS_LIMIT
	movq	%rax, %rcx
	movabsq	$2361183241434822607, %rdx      ## imm = 0x20C49BA5E353F7CF
	imulq	%rdx
	movq	%rdx, %r15
	movq	%rcx, -56(%rbp)
	movq	%rdx, %rax
	shrq	$63, %rax
	sarq	$6, %r15
LBB0_12:
	addq	%rax, %r15
	movq	8(%r14), %rax
	movq	1032(%rax), %rax
	movq	8(%r13), %rcx
	movq	%r15, (%rax,%rcx,8)
LBB0_13:
	movl	(%r13), %eax
	addl	$-128, %eax
	cmpl	$5, %eax
	ja	LBB0_16
## %bb.14:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_15:
	movq	8(%r13), %rdi
	callq	_TEMP_THERM_REG
	jmp	LBB0_19
LBB0_16:
	xorl	%eax, %eax
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_26
LBB0_17:
	movq	8(%r13), %rdi
	callq	_TEMP_OFFSET_REG
	jmp	LBB0_19
LBB0_18:
	movq	8(%r13), %rdi
	callq	_TEMP_MIN_REG
	jmp	LBB0_19
LBB0_20:
	movq	8(%r13), %rdi
	callq	_TEMP_MAX_REG
	jmp	LBB0_19
LBB0_21:
	cmpq	$2, 8(%r13)
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	jne	LBB0_24
## %bb.22:
	movq	_REG_REMOTE2_HYSTERSIS@GOTPCREL(%rip), %rax
	jmp	LBB0_25
LBB0_23:
	movq	8(%r13), %rdi
	callq	_TEMP_TMIN_REG
LBB0_19:
                                        ## kill: def $al killed $al def $eax
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
LBB0_26:
	movzbl	%al, %esi
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %rdx
	callq	_i2c_smbus_write_byte_data
	movq	%rbx, %rdi
	callq	_mutex_unlock
LBB0_27:
	movq	%r12, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_24:
	movq	_REG_REMOTE1_HYSTERSIS@GOTPCREL(%rip), %rax
LBB0_25:
	movb	(%rax), %al
	jmp	LBB0_26
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_15, LBB0_15-LJTI0_0
.set L0_0_set_17, LBB0_17-LJTI0_0
.set L0_0_set_18, LBB0_18-LJTI0_0
.set L0_0_set_20, LBB0_20-LJTI0_0
.set L0_0_set_21, LBB0_21-LJTI0_0
.set L0_0_set_23, LBB0_23-LJTI0_0
LJTI0_0:
	.long	L0_0_set_15
	.long	L0_0_set_17
	.long	L0_0_set_18
	.long	L0_0_set_20
	.long	L0_0_set_21
	.long	L0_0_set_23
	.end_data_region
                                        ## -- End function
	.comm	_EINVAL,8,3                     ## @EINVAL
	.comm	_REG_CONFIG5,1,0                ## @REG_CONFIG5
	.comm	_CONFIG5_TEMPOFFSET,4,2         ## @CONFIG5_TEMPOFFSET
	.comm	_REG_REMOTE1_HYSTERSIS,1,0      ## @REG_REMOTE1_HYSTERSIS
	.comm	_REG_REMOTE2_HYSTERSIS,1,0      ## @REG_REMOTE2_HYSTERSIS
	.no_dead_strip	_set_temp
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_temp
_set_temp:                              ; @set_temp
	.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, x0
	mov	x0, x1
	bl	_to_sensor_dev_attr_2
	mov	x22, x0
	mov	x0, x20
	bl	_to_i2c_client
	mov	x20, x0
	bl	_i2c_get_clientdata
	mov	x23, x0
	add	x2, sp, #8
	mov	x0, x21
	mov	w1, #10
	bl	_strict_strtol
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	neg	x19, x8
	b	LBB0_26
LBB0_2:
	add	x21, x23, #16
	mov	x0, x21
	bl	_mutex_lock
Lloh3:
	adrp	x8, _REG_CONFIG5@GOTPAGE
Lloh4:
	ldr	x8, [x8, _REG_CONFIG5@GOTPAGEOFF]
	ldrb	w0, [x8]
	bl	_adt7475_read
	str	w0, [x23]
	ldr	w8, [x22]
	cmp	w8, #132
	b.eq	LBB0_6
; %bb.3:
	cmp	w8, #129
	b.ne	LBB0_8
; %bb.4:
Lloh5:
	adrp	x8, _CONFIG5_TEMPOFFSET@GOTPAGE
Lloh6:
	ldr	x8, [x8, _CONFIG5_TEMPOFFSET@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x8]
	ldr	x8, [sp, #8]
	tst	w9, w0
	b.eq	LBB0_11
; %bb.5:
	mov	x0, x8
	mov	w1, #-63000
	mov	w2, #61464
	movk	w2, #1, lsl #16
	bl	_SENSORS_LIMIT
	str	x0, [sp, #8]
	mov	x8, #63439
	movk	x8, #58195, lsl #16
	movk	x8, #39845, lsl #32
	movk	x8, #8388, lsl #48
	smulh	x8, x0, x8
	asr	x9, x8, #7
	b	LBB0_12
LBB0_6:
	ldr	x0, [x22, #8]
	bl	_TEMP_THERM_REG
	bl	_adt7475_read
	lsl	w8, w0, #2
	sxtw	x8, w8
	ldr	x9, [x23, #8]
	ldr	x9, [x9, #1024]
	ldr	x10, [x22, #8]
	str	x8, [x9, x10, lsl #3]
	mov	x0, x20
	bl	_adt7475_read_hystersis
	ldr	x8, [x23, #8]
	ldr	x8, [x8, #1024]
	ldr	x9, [x22, #8]
	ldr	x1, [x8, x9, lsl #3]
	mov	x0, x23
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_reg2temp
	mov	x24, x0
	ldr	x0, [sp, #8]
	mov	w8, #-15000
	add	w1, w24, w8
	mov	x2, x24
	bl	_SENSORS_LIMIT
	sxtw	x8, w24
	sub	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	x9, x9, x8, lsr #63
	str	x9, [sp, #8]
	ldr	x10, [x22, #8]
	ldr	x8, [x23, #8]
	ldr	x8, [x8, #1056]
	cmp	x10, #1
	b.ne	LBB0_9
; %bb.7:
	ldr	x10, [x8, #8]
	and	x10, x10, #0xf
	str	x10, [x8, #8]
	and	x9, x9, #0xf
	b	LBB0_10
LBB0_8:
	ldr	x1, [sp, #8]
	mov	x0, x23
	bl	_temp2reg
	ldr	x8, [x23, #8]
	ldrsw	x9, [x22]
	ldr	x8, [x8, x9, lsl #3]
	ldr	x9, [x22, #8]
	str	x0, [x8, x9, lsl #3]
	ldr	x9, [x22, #8]
	ldr	x8, [x8, x9, lsl #3]
	asr	x24, x8, #2
	b	LBB0_13
LBB0_9:
	lsl	x9, x10, #3
	ldr	x10, [x8, x9]
	and	x10, x10, #0xf0
	str	x10, [x8, x9]
	ldr	w9, [sp, #8]
	lsl	w9, w9, #4
	and	x9, x9, #0xf0
LBB0_10:
	ldr	x10, [x22, #8]
	lsl	x10, x10, #3
	ldr	x11, [x8, x10]
	orr	x9, x11, x9
	str	x9, [x8, x10]
	ldr	x9, [x22, #8]
	ldr	x24, [x8, x9, lsl #3]
	b	LBB0_13
LBB0_11:
	mov	x0, x8
	mov	w1, #-63000
	mov	w2, #64000
	bl	_SENSORS_LIMIT
	str	x0, [sp, #8]
	mov	x8, #63439
	movk	x8, #58195, lsl #16
	movk	x8, #39845, lsl #32
	movk	x8, #8388, lsl #48
	smulh	x8, x0, x8
	asr	x9, x8, #6
LBB0_12:
	add	x24, x9, x8, lsr #63
	ldr	x8, [x23, #8]
	ldr	x8, [x8, #1032]
	ldr	x9, [x22, #8]
	str	x24, [x8, x9, lsl #3]
LBB0_13:
	ldr	w8, [x22]
	sub	w8, w8, #128
	cmp	w8, #5
	b.hi	LBB0_16
; %bb.14:
Lloh8:
	adrp	x9, lJTI0_0@PAGE
Lloh9:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_15
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_15:
	ldr	x0, [x22, #8]
	bl	_TEMP_THERM_REG
	mov	x1, x0
	b	LBB0_25
LBB0_16:
	mov	w1, #0
	b	LBB0_25
LBB0_17:
	ldr	x0, [x22, #8]
	bl	_TEMP_OFFSET_REG
	mov	x1, x0
	b	LBB0_25
LBB0_18:
	ldr	x0, [x22, #8]
	bl	_TEMP_MIN_REG
	mov	x1, x0
	b	LBB0_25
LBB0_19:
	ldr	x0, [x22, #8]
	bl	_TEMP_MAX_REG
	mov	x1, x0
	b	LBB0_25
LBB0_20:
	ldr	x8, [x22, #8]
	cmp	x8, #2
	b.ne	LBB0_23
; %bb.21:
Lloh10:
	adrp	x8, _REG_REMOTE2_HYSTERSIS@GOTPAGE
Lloh11:
	ldr	x8, [x8, _REG_REMOTE2_HYSTERSIS@GOTPAGEOFF]
	b	LBB0_24
LBB0_22:
	ldr	x0, [x22, #8]
	bl	_TEMP_TMIN_REG
	mov	x1, x0
	b	LBB0_25
LBB0_23:
Lloh12:
	adrp	x8, _REG_REMOTE1_HYSTERSIS@GOTPAGE
Lloh13:
	ldr	x8, [x8, _REG_REMOTE1_HYSTERSIS@GOTPAGEOFF]
LBB0_24:
	ldrb	w1, [x8]
LBB0_25:
	mov	x0, x20
	mov	x2, x24
	bl	_i2c_smbus_write_byte_data
	mov	x0, x21
	bl	_mutex_unlock
LBB0_26:
	mov	x0, x19
	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
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_15-LBB0_15)>>2
	.byte	(LBB0_17-LBB0_15)>>2
	.byte	(LBB0_18-LBB0_15)>>2
	.byte	(LBB0_19-LBB0_15)>>2
	.byte	(LBB0_20-LBB0_15)>>2
	.byte	(LBB0_22-LBB0_15)>>2
                                        ; -- End function
	.comm	_EINVAL,8,3                     ; @EINVAL
	.comm	_REG_CONFIG5,1,0                ; @REG_CONFIG5
	.comm	_CONFIG5_TEMPOFFSET,4,2         ; @CONFIG5_TEMPOFFSET
	.comm	_REG_REMOTE1_HYSTERSIS,1,0      ; @REG_REMOTE1_HYSTERSIS
	.comm	_REG_REMOTE2_HYSTERSIS,1,0      ; @REG_REMOTE2_HYSTERSIS
	.no_dead_strip	_set_temp
.subsections_via_symbols
