	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_temp_type
_set_temp_type:                         ## @set_temp_type
	.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	$40, %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, %r15
	movq	%rdi, %rbx
	movq	%rsi, %rdi
	callq	_to_sensor_dev_attr
	movl	(%rax), %r12d
	movq	%rbx, %rdi
	callq	_dev_get_drvdata
	movq	%rax, %r13
	leaq	-48(%rbp), %rdx
	movq	%r15, %rdi
	movl	$10, %esi
	callq	_kstrtol
	testq	%rax, %rax
	js	LBB0_1
## %bb.2:
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movq	_IT87_REG_TEMP_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_it87_read_value
	movl	$1, %r15d
	movl	%r12d, %ecx
	shll	%cl, %r15d
	movl	$8, %edx
	shll	%cl, %edx
	movl	%edx, -60(%rbp)                 ## 4-byte Spill
	movl	$9, %ebx
	shll	%cl, %ebx
	notl	%ebx
	andl	%eax, %ebx
	movq	%r13, %rdi
	movl	%r12d, %esi
	callq	_has_temp_peci
	testq	%rax, %rax
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	je	LBB0_4
## %bb.3:
	movl	%ebx, %eax
	sarl	$6, %eax
	movl	%ebx, %ecx
	andl	$63, %ecx
	cmpq	$6, -48(%rbp)
	cmovel	%ecx, %ebx
	leal	1(%r12), %edx
	cmpl	%edx, %eax
	cmovel	%ecx, %ebx
LBB0_4:
	movq	_IT87_REG_TEMP_EXTRA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_it87_read_value
	movl	%eax, %r14d
	movq	%r13, %rdi
	movl	%r12d, %esi
	callq	_has_temp_old_peci
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	-48(%rbp), %rax
	movl	%r14d, %ecx
	andl	$127, %ecx
	cmpq	$6, %rax
	movl	%r14d, %edx
	cmovel	%ecx, %edx
	testb	$-128, %r14b
	cmovnel	%ecx, %edx
	movl	%edx, %r14d
	cmpq	$4, %rax
	jne	LBB0_8
	jmp	LBB0_11
LBB0_6:
	movq	-48(%rbp), %rax
	cmpq	$4, %rax
	je	LBB0_11
LBB0_8:
	cmpq	$3, %rax
	je	LBB0_19
## %bb.9:
	cmpq	$2, %rax
	jne	LBB0_12
## %bb.10:
	leaq	L_.str(%rip), %rsi
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_dev_warn
	movq	$4, -48(%rbp)
LBB0_11:
	orl	-60(%rbp), %ebx                 ## 4-byte Folded Reload
	jmp	LBB0_20
LBB0_19:
	orl	%r15d, %ebx
LBB0_20:
	movq	-56(%rbp), %r15                 ## 8-byte Reload
LBB0_21:
	addq	$8, %r15
	movq	%r15, %rdi
	callq	_mutex_lock
	movl	%ebx, (%r13)
	movl	%r14d, 4(%r13)
	movq	_IT87_REG_TEMP_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movl	%ebx, %edx
	callq	_it87_write_value
	movq	%r13, %rdi
	movl	%r12d, %esi
	callq	_has_temp_old_peci
	testq	%rax, %rax
	je	LBB0_23
## %bb.22:
	movq	_IT87_REG_TEMP_EXTRA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	4(%r13), %edx
	movq	%r13, %rdi
	callq	_it87_write_value
LBB0_23:
	movq	$0, 16(%r13)
	movq	%r15, %rdi
	callq	_mutex_unlock
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	jmp	LBB0_24
LBB0_12:
	movq	%r13, %rdi
	movl	%r12d, %esi
	callq	_has_temp_peci
	testq	%rax, %rax
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	je	LBB0_15
## %bb.13:
	cmpq	$6, -48(%rbp)
	jne	LBB0_15
## %bb.14:
	movl	%r12d, %eax
	shll	$6, %eax
	addl	$64, %eax
	orl	%eax, %ebx
	jmp	LBB0_21
LBB0_15:
	movq	%r13, %rdi
	movl	%r12d, %esi
	callq	_has_temp_old_peci
	movq	-48(%rbp), %rcx
	testq	%rax, %rax
	je	LBB0_18
## %bb.16:
	cmpq	$6, %rcx
	jne	LBB0_18
## %bb.17:
	orl	$128, %r14d
	jmp	LBB0_21
LBB0_18:
	testq	%rcx, %rcx
	je	LBB0_21
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subq	(%rcx), %rax
LBB0_24:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,8,3                     ## @EINVAL
	.comm	_IT87_REG_TEMP_ENABLE,4,2       ## @IT87_REG_TEMP_ENABLE
	.comm	_IT87_REG_TEMP_EXTRA,4,2        ## @IT87_REG_TEMP_EXTRA
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Sensor type 2 is deprecated, please use 4 instead\n"

	.no_dead_strip	_set_temp_type
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_temp_type
_set_temp_type:                         ; @set_temp_type
	.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
	mov	x24, x0
	mov	x0, x1
	bl	_to_sensor_dev_attr
	ldr	w21, [x0]
	mov	x0, x24
	bl	_dev_get_drvdata
	mov	x20, x0
	add	x2, sp, #8
	mov	x0, x22
	mov	w1, #10
	bl	_kstrtol
	tbnz	x0, #63, LBB0_23
; %bb.1:
Lloh0:
	adrp	x25, _IT87_REG_TEMP_ENABLE@GOTPAGE
Lloh1:
	ldr	x25, [x25, _IT87_REG_TEMP_ENABLE@GOTPAGEOFF]
	ldr	w1, [x25]
	mov	x0, x20
	bl	_it87_read_value
	mov	w8, #9
	lsl	w8, w8, w21
	bic	w22, w0, w8
	mov	x0, x20
	mov	x1, x21
	bl	_has_temp_peci
	cbz	x0, LBB0_3
; %bb.2:
	asr	w8, w22, #6
	add	w9, w21, #1
	ldr	x10, [sp, #8]
	cmp	x10, #6
	ccmp	w8, w9, #4, ne
	and	w8, w22, #0x3f
	csel	w22, w8, w22, eq
LBB0_3:
Lloh2:
	adrp	x26, _IT87_REG_TEMP_EXTRA@GOTPAGE
Lloh3:
	ldr	x26, [x26, _IT87_REG_TEMP_EXTRA@GOTPAGEOFF]
	ldr	w1, [x26]
	mov	x0, x20
	bl	_it87_read_value
	mov	x23, x0
	mov	x0, x20
	mov	x1, x21
	bl	_has_temp_old_peci
	cbz	x0, LBB0_5
; %bb.4:
	and	w9, w23, #0x80
	ldr	x8, [sp, #8]
	cmp	x8, #6
	cset	w10, eq
	orr	w9, w10, w9, lsr #7
	and	w10, w23, #0x7f
	cmp	w9, #0
	csel	w23, w10, w23, ne
	cmp	x8, #4
	b.ne	LBB0_6
	b	LBB0_9
LBB0_5:
	ldr	x8, [sp, #8]
	cmp	x8, #4
	b.eq	LBB0_9
LBB0_6:
	cmp	x8, #3
	b.eq	LBB0_10
; %bb.7:
	cmp	x8, #2
	b.ne	LBB0_16
; %bb.8:
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x24
	bl	_dev_warn
	mov	w8, #4
	str	x8, [sp, #8]
LBB0_9:
	mov	w8, #8
	b	LBB0_11
LBB0_10:
	mov	w8, #1
LBB0_11:
	lsl	w8, w8, w21
LBB0_12:
	orr	w22, w22, w8
LBB0_13:
	add	x24, x20, #8
	mov	x0, x24
	bl	_mutex_lock
	stp	w22, w23, [x20]
	ldr	w1, [x25]
	mov	x0, x20
	mov	x2, x22
	bl	_it87_write_value
	mov	x0, x20
	mov	x1, x21
	bl	_has_temp_old_peci
	cbz	x0, LBB0_15
; %bb.14:
	ldr	w1, [x26]
	ldr	w2, [x20, #4]
	mov	x0, x20
	bl	_it87_write_value
LBB0_15:
	str	xzr, [x20, #16]
	mov	x0, x24
	bl	_mutex_unlock
	b	LBB0_24
LBB0_16:
	mov	x0, x20
	mov	x1, x21
	bl	_has_temp_peci
	cbz	x0, LBB0_19
; %bb.17:
	ldr	x8, [sp, #8]
	cmp	x8, #6
	b.ne	LBB0_19
; %bb.18:
	lsl	w8, w21, #6
	add	w8, w8, #64
	b	LBB0_12
LBB0_19:
	mov	x0, x20
	mov	x1, x21
	bl	_has_temp_old_peci
	ldr	x8, [sp, #8]
	cbz	x0, LBB0_22
; %bb.20:
	cmp	x8, #6
	b.ne	LBB0_22
; %bb.21:
	orr	w23, w23, #0x80
	b	LBB0_13
LBB0_22:
	cbz	x8, LBB0_13
LBB0_23:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	neg	x19, x8
LBB0_24:
	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 AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,8,3                     ; @EINVAL
	.comm	_IT87_REG_TEMP_ENABLE,4,2       ; @IT87_REG_TEMP_ENABLE
	.comm	_IT87_REG_TEMP_EXTRA,4,2        ; @IT87_REG_TEMP_EXTRA
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Sensor type 2 is deprecated, please use 4 instead\n"

	.no_dead_strip	_set_temp_type
.subsections_via_symbols
