	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function g84_therm_threshold_hyst_emulation
_g84_therm_threshold_hyst_emulation:    ## @g84_therm_threshold_hyst_emulation
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r12
	movl	%esi, %ebx
	movq	%rdi, %r13
	movq	8(%rdi), %r15
	movl	%r8d, -44(%rbp)                 ## 4-byte Spill
	movl	%r8d, %esi
	callq	_nvkm_therm_sensor_get_threshold_state
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_nvkm_rd32
	movl	(%r12), %edx
	movq	_NVKM_THERM_THRS_LOWER@GOTPCREL(%rip), %r14
	cmpl	%edx, %eax
	jne	LBB0_2
## %bb.1:
	subl	4(%r12), %eax
	movq	_NVKM_THERM_THRS_HIGHER@GOTPCREL(%rip), %r14
	movl	%eax, %edx
LBB0_2:
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_nvkm_wr32
	movl	(%r14), %ebx
	movq	(%r13), %rax
	movq	%r13, %rdi
	callq	*(%rax)
	movq	_NVKM_THERM_THRS_LOWER@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	%ecx, %ebx
	jne	LBB0_5
## %bb.3:
	cmpl	(%r12), %eax
	jle	LBB0_5
## %bb.4:
	movq	_NVKM_THERM_THRS_HIGHER@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	jmp	LBB0_7
LBB0_5:
	movq	_NVKM_THERM_THRS_HIGHER@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ebx
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	jne	LBB0_7
## %bb.6:
	movl	(%r12), %edx
	subl	4(%r12), %edx
	cmpl	%edx, %eax
	cmovll	%ecx, %ebx
LBB0_7:
	movq	%r13, %rdi
	movl	%r14d, %esi
	movl	%ebx, %edx
	callq	_nvkm_therm_sensor_set_threshold_state
	cmpl	%ebx, -48(%rbp)                 ## 4-byte Folded Reload
	jae	LBB0_9
## %bb.8:
	movq	_NVKM_THERM_THRS_RISING@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_9:
	jbe	LBB0_12
## %bb.10:
	movq	_NVKM_THERM_THRS_FALLING@GOTPCREL(%rip), %rax
LBB0_11:
	movl	(%rax), %edx
	movq	%r13, %rdi
	movl	%r14d, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_nvkm_therm_sensor_event        ## TAILCALL
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NVKM_THERM_THRS_HIGHER,4,2     ## @NVKM_THERM_THRS_HIGHER
	.comm	_NVKM_THERM_THRS_LOWER,4,2      ## @NVKM_THERM_THRS_LOWER
	.comm	_NVKM_THERM_THRS_RISING,4,2     ## @NVKM_THERM_THRS_RISING
	.comm	_NVKM_THERM_THRS_FALLING,4,2    ## @NVKM_THERM_THRS_FALLING
	.no_dead_strip	_g84_therm_threshold_hyst_emulation
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function g84_therm_threshold_hyst_emulation
_g84_therm_threshold_hyst_emulation:    ; @g84_therm_threshold_hyst_emulation
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x4
	mov	x22, x3
	mov	x23, x1
	mov	x20, x0
	ldr	x24, [x0, #8]
	mov	x1, x4
	bl	_nvkm_therm_sensor_get_threshold_state
	mov	x21, x0
	mov	x0, x24
	mov	x1, x23
	bl	_nvkm_rd32
	ldr	w2, [x22]
Lloh0:
	adrp	x25, _NVKM_THERM_THRS_LOWER@GOTPAGE
Lloh1:
	ldr	x25, [x25, _NVKM_THERM_THRS_LOWER@GOTPAGEOFF]
	cmp	w0, w2
	b.ne	LBB0_2
; %bb.1:
	ldr	w8, [x22, #4]
	sub	w2, w0, w8
Lloh2:
	adrp	x26, _NVKM_THERM_THRS_HIGHER@GOTPAGE
Lloh3:
	ldr	x26, [x26, _NVKM_THERM_THRS_HIGHER@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:
	mov	x26, x25
LBB0_3:
	mov	x0, x24
	mov	x1, x23
	bl	_nvkm_wr32
	ldr	w23, [x26]
	ldr	x8, [x20]
	ldr	x8, [x8]
	mov	x0, x20
	blr	x8
	ldr	w8, [x25]
	cmp	w23, w8
	b.ne	LBB0_6
; %bb.4:
	ldr	w9, [x22]
	cmp	w0, w9
	b.le	LBB0_6
; %bb.5:
Lloh4:
	adrp	x8, _NVKM_THERM_THRS_HIGHER@GOTPAGE
Lloh5:
	ldr	x8, [x8, _NVKM_THERM_THRS_HIGHER@GOTPAGEOFF]
Lloh6:
	ldr	w23, [x8]
	b	LBB0_8
LBB0_6:
Lloh7:
	adrp	x9, _NVKM_THERM_THRS_HIGHER@GOTPAGE
Lloh8:
	ldr	x9, [x9, _NVKM_THERM_THRS_HIGHER@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	cmp	w23, w9
	b.ne	LBB0_8
; %bb.7:
	ldp	w9, w10, [x22]
	sub	w9, w9, w10
	cmp	w0, w9
	csel	w23, w8, w23, lt
LBB0_8:
	mov	x0, x20
	mov	x1, x19
	mov	x2, x23
	bl	_nvkm_therm_sensor_set_threshold_state
	cmp	w21, w23
	b.hs	LBB0_10
; %bb.9:
Lloh10:
	adrp	x8, _NVKM_THERM_THRS_RISING@GOTPAGE
Lloh11:
	ldr	x8, [x8, _NVKM_THERM_THRS_RISING@GOTPAGEOFF]
	b	LBB0_12
LBB0_10:
	b.ls	LBB0_13
; %bb.11:
Lloh12:
	adrp	x8, _NVKM_THERM_THRS_FALLING@GOTPAGE
Lloh13:
	ldr	x8, [x8, _NVKM_THERM_THRS_FALLING@GOTPAGEOFF]
LBB0_12:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, 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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_nvkm_therm_sensor_event
LBB0_13:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_NVKM_THERM_THRS_HIGHER,4,2     ; @NVKM_THERM_THRS_HIGHER
	.comm	_NVKM_THERM_THRS_LOWER,4,2      ; @NVKM_THERM_THRS_LOWER
	.comm	_NVKM_THERM_THRS_RISING,4,2     ; @NVKM_THERM_THRS_RISING
	.comm	_NVKM_THERM_THRS_FALLING,4,2    ; @NVKM_THERM_THRS_FALLING
	.no_dead_strip	_g84_therm_threshold_hyst_emulation
.subsections_via_symbols
