	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function si_thermal_enable_alert
_si_thermal_enable_alert:               ## @si_thermal_enable_alert
	.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
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r14
	movq	_CG_THERMAL_INT@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_RREG32
	movq	_THERM_INT_MASK_HIGH@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_THERM_INT_MASK_LOW@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ebx, %ebx
	je	LBB0_3
## %bb.1:
	orl	%esi, %ecx
	notl	%ecx
	andl	%ecx, %eax
	movl	(%r15), %edi
	movl	%eax, %esi
	callq	_WREG32
	movl	$0, (%r14)
	movq	_PPSMC_MSG_EnableThermalInterrupt@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_si_send_msg_to_smc
	movq	%rax, %rcx
	movq	_PPSMC_Result_OK@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	cmpq	(%rdx), %rcx
	je	LBB0_4
## %bb.2:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_DEBUG_KMS
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_4
LBB0_3:
	orl	%eax, %esi
	orl	%ecx, %esi
	movl	(%r15), %edi
	callq	_WREG32
	movl	$1, (%r14)
	xorl	%eax, %eax
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CG_THERMAL_INT,4,2             ## @CG_THERMAL_INT
	.comm	_THERM_INT_MASK_HIGH,4,2        ## @THERM_INT_MASK_HIGH
	.comm	_THERM_INT_MASK_LOW,4,2         ## @THERM_INT_MASK_LOW
	.comm	_PPSMC_MSG_EnableThermalInterrupt,4,2 ## @PPSMC_MSG_EnableThermalInterrupt
	.comm	_PPSMC_Result_OK,8,3            ## @PPSMC_Result_OK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Could not enable thermal interrupts.\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_si_thermal_enable_alert
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function si_thermal_enable_alert
_si_thermal_enable_alert:               ; @si_thermal_enable_alert
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x21, _CG_THERMAL_INT@GOTPAGE
Lloh1:
	ldr	x21, [x21, _CG_THERMAL_INT@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_RREG32
Lloh2:
	adrp	x8, _THERM_INT_MASK_HIGH@GOTPAGE
Lloh3:
	ldr	x8, [x8, _THERM_INT_MASK_HIGH@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _THERM_INT_MASK_LOW@GOTPAGE
Lloh6:
	ldr	x9, [x9, _THERM_INT_MASK_LOW@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	cbz	w20, LBB0_3
; %bb.1:
	orr	w8, w9, w8
	bic	w1, w0, w8
	ldr	w0, [x21]
	bl	_WREG32
	str	wzr, [x19]
Lloh8:
	adrp	x8, _PPSMC_MSG_EnableThermalInterrupt@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PPSMC_MSG_EnableThermalInterrupt@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_si_send_msg_to_smc
	mov	x8, x0
	mov	w0, #0
Lloh11:
	adrp	x9, _PPSMC_Result_OK@GOTPAGE
Lloh12:
	ldr	x9, [x9, _PPSMC_Result_OK@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_4
; %bb.2:
Lloh14:
	adrp	x0, l_.str@PAGE
Lloh15:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_KMS
Lloh16:
	adrp	x8, _EINVAL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_4
LBB0_3:
	orr	w8, w8, w0
	orr	w1, w8, w9
	ldr	w0, [x21]
	bl	_WREG32
	mov	w0, #0
	mov	w8, #1
	str	w8, [x19]
LBB0_4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_CG_THERMAL_INT,4,2             ; @CG_THERMAL_INT
	.comm	_THERM_INT_MASK_HIGH,4,2        ; @THERM_INT_MASK_HIGH
	.comm	_THERM_INT_MASK_LOW,4,2         ; @THERM_INT_MASK_LOW
	.comm	_PPSMC_MSG_EnableThermalInterrupt,4,2 ; @PPSMC_MSG_EnableThermalInterrupt
	.comm	_PPSMC_Result_OK,8,3            ; @PPSMC_Result_OK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Could not enable thermal interrupts.\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_si_thermal_enable_alert
.subsections_via_symbols
