	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function thermal_get_sensor
_thermal_get_sensor:                    ## @thermal_get_sensor
	.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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movl	%edi, %ecx
	movq	_TP_EC_THERMAL_TMP0@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%edi, -28(%rbp)
	movq	_thermal_read_mode@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	$132, %eax
	je	LBB0_12
## %bb.1:
	cmpl	$131, %eax
	je	LBB0_7
## %bb.2:
	cmpl	$128, %eax
	jne	LBB0_18
## %bb.3:
	cmpl	$7, %ecx
	jg	LBB0_19
## %bb.4:
	addl	%ecx, %edi
	leaq	-40(%rbp), %rsi
	callq	_acpi_ec_read
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	imull	$1000, -40(%rbp), %eax          ## imm = 0x3E8
	jmp	LBB0_17
LBB0_12:
	cmpl	$7, %ecx
	jg	LBB0_19
## %bb.13:
	addl	$48, %ecx
	leaq	L_.str(%rip), %rdx
	leaq	-33(%rbp), %rbx
	movq	%rbx, %rdi
	movl	$5, %esi
	callq	_snprintf
	movq	_ec_handle@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rcx
	leaq	-28(%rbp), %rsi
	movq	%rbx, %rdx
	callq	_acpi_evalf
	testl	%eax, %eax
	je	LBB0_5
## %bb.14:
	movl	-28(%rbp), %eax
	leal	-128(%rax), %ecx
	cmpl	$-255, %ecx
	jae	LBB0_16
## %bb.15:
	movq	_TP_EC_THERMAL_TMP_NA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_16:
	imull	$1000, %eax, %eax               ## imm = 0x3E8
	jmp	LBB0_17
LBB0_7:
	cmpl	$7, %ecx
	jg	LBB0_19
## %bb.8:
	addl	$48, %ecx
	leaq	L_.str(%rip), %rdx
	leaq	-33(%rbp), %rdi
	movl	$5, %esi
	callq	_snprintf
	movq	_ec_handle@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	leaq	L_.str.1(%rip), %rdx
	leaq	L_.str.2(%rip), %rcx
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	callq	_acpi_evalf
	testl	%eax, %eax
	je	LBB0_9
## %bb.10:
	movl	(%r15), %edi
	leaq	L_.str.3(%rip), %rcx
	leaq	-28(%rbp), %rsi
	leaq	-33(%rbp), %rdx
	callq	_acpi_evalf
	testl	%eax, %eax
	je	LBB0_5
## %bb.11:
	imull	$100, -28(%rbp), %eax
	addl	$-273200, %eax                  ## imm = 0xFFFBD4D0
LBB0_17:
	movl	%eax, (%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_22
LBB0_19:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_20
LBB0_18:
	movq	_ENOSYS@GOTPCREL(%rip), %rax
	jmp	LBB0_20
LBB0_5:
	movq	_EIO@GOTPCREL(%rip), %rax
LBB0_20:
	xorl	%ebx, %ebx
LBB0_21:
	subl	(%rax), %ebx
LBB0_22:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_21
	.cfi_endproc
                                        ## -- End function
	.comm	_TP_EC_THERMAL_TMP0,4,2         ## @TP_EC_THERMAL_TMP0
	.comm	_thermal_read_mode,4,2          ## @thermal_read_mode
	.comm	_EIO,4,2                        ## @EIO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"TMP%c"

	.comm	_ec_handle,4,2                  ## @ec_handle
L_.str.1:                               ## @.str.1
	.asciz	"UPDT"

L_.str.2:                               ## @.str.2
	.asciz	"v"

L_.str.3:                               ## @.str.3
	.asciz	"d"

	.comm	_TP_EC_THERMAL_TMP_NA,4,2       ## @TP_EC_THERMAL_TMP_NA
	.comm	_ENOSYS,4,2                     ## @ENOSYS
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_TP_EC_THERMAL_TMP8,4,2         ## @TP_EC_THERMAL_TMP8
	.no_dead_strip	_thermal_get_sensor
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function thermal_get_sensor
_thermal_get_sensor:                    ; @thermal_get_sensor
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
Lloh0:
	adrp	x8, _TP_EC_THERMAL_TMP0@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TP_EC_THERMAL_TMP0@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #12]
Lloh3:
	adrp	x9, _thermal_read_mode@GOTPAGE
Lloh4:
	ldr	x9, [x9, _thermal_read_mode@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w9, #132
	b.eq	LBB0_6
; %bb.1:
	cmp	w9, #131
	b.eq	LBB0_10
; %bb.2:
	cmp	w9, #128
	b.ne	LBB0_15
; %bb.3:
	cmp	w0, #7
	b.gt	LBB0_14
; %bb.4:
	add	w0, w8, w0
	add	x1, sp, #8
	bl	_acpi_ec_read
	cbz	w0, LBB0_16
; %bb.5:
	mov	w0, #0
	ldr	w8, [sp, #8]
	b	LBB0_9
LBB0_6:
	cmp	w0, #7
	b.gt	LBB0_14
; %bb.7:
	add	w3, w0, #48
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	add	x0, sp, #3
	mov	w1, #5
	bl	_snprintf
Lloh8:
	adrp	x8, _ec_handle@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ec_handle@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
Lloh11:
	adrp	x3, l_.str.3@PAGE
Lloh12:
	add	x3, x3, l_.str.3@PAGEOFF
	add	x1, sp, #12
	add	x2, sp, #3
	bl	_acpi_evalf
	cbz	w0, LBB0_16
; %bb.8:
	mov	w0, #0
	ldr	w8, [sp, #12]
	sub	w9, w8, #128
Lloh13:
	adrp	x10, _TP_EC_THERMAL_TMP_NA@GOTPAGE
Lloh14:
	ldr	x10, [x10, _TP_EC_THERMAL_TMP_NA@GOTPAGEOFF]
Lloh15:
	ldr	w10, [x10]
	cmn	w9, #255
	csel	w8, w10, w8, lo
LBB0_9:
	mov	w9, #1000
	mul	w8, w8, w9
	str	w8, [x19]
	b	LBB0_18
LBB0_10:
	cmp	w0, #7
	b.gt	LBB0_14
; %bb.11:
	add	w3, w0, #48
Lloh16:
	adrp	x2, l_.str@PAGE
Lloh17:
	add	x2, x2, l_.str@PAGEOFF
	add	x0, sp, #3
	mov	w1, #5
	bl	_snprintf
Lloh18:
	adrp	x20, _ec_handle@GOTPAGE
Lloh19:
	ldr	x20, [x20, _ec_handle@GOTPAGEOFF]
	ldr	w0, [x20]
Lloh20:
	adrp	x2, l_.str.1@PAGE
Lloh21:
	add	x2, x2, l_.str.1@PAGEOFF
Lloh22:
	adrp	x3, l_.str.2@PAGE
Lloh23:
	add	x3, x3, l_.str.2@PAGEOFF
	mov	x1, #0
	bl	_acpi_evalf
	cbz	w0, LBB0_16
; %bb.12:
	ldr	w0, [x20]
Lloh24:
	adrp	x3, l_.str.3@PAGE
Lloh25:
	add	x3, x3, l_.str.3@PAGEOFF
	add	x1, sp, #12
	add	x2, sp, #3
	bl	_acpi_evalf
	cbz	w0, LBB0_16
; %bb.13:
	mov	w0, #0
	ldr	w8, [sp, #12]
	mov	w9, #100
	mov	w10, #54480
	movk	w10, #65531, lsl #16
	madd	w8, w8, w9, w10
	str	w8, [x19]
	b	LBB0_18
LBB0_14:
Lloh26:
	adrp	x8, _EINVAL@GOTPAGE
Lloh27:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_17
LBB0_15:
Lloh28:
	adrp	x8, _ENOSYS@GOTPAGE
Lloh29:
	ldr	x8, [x8, _ENOSYS@GOTPAGEOFF]
	b	LBB0_17
LBB0_16:
Lloh30:
	adrp	x8, _EIO@GOTPAGE
Lloh31:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_17:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_18:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_TP_EC_THERMAL_TMP0,4,2         ; @TP_EC_THERMAL_TMP0
	.comm	_thermal_read_mode,4,2          ; @thermal_read_mode
	.comm	_EIO,4,2                        ; @EIO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"TMP%c"

	.comm	_ec_handle,4,2                  ; @ec_handle
l_.str.1:                               ; @.str.1
	.asciz	"UPDT"

l_.str.2:                               ; @.str.2
	.asciz	"v"

l_.str.3:                               ; @.str.3
	.asciz	"d"

	.comm	_TP_EC_THERMAL_TMP_NA,4,2       ; @TP_EC_THERMAL_TMP_NA
	.comm	_ENOSYS,4,2                     ; @ENOSYS
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_TP_EC_THERMAL_TMP8,4,2         ; @TP_EC_THERMAL_TMP8
	.no_dead_strip	_thermal_get_sensor
.subsections_via_symbols
