	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nvkm_therm_update
_nvkm_therm_update:                     ## @nvkm_therm_update
	.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
	movl	%esi, %ebx
	movq	%rdi, %r13
	movq	24(%rdi), %rax
	movq	(%rax), %r15
	leaq	8(%rdi), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	testl	%ebx, %ebx
	jns	LBB0_2
## %bb.1:
	movl	(%r13), %ebx
LBB0_2:
	movl	%ebx, (%r13)
	cmpl	$130, %ebx
	je	LBB0_6
## %bb.3:
	cmpl	$129, %ebx
	jne	LBB0_12
## %bb.4:
	leaq	12(%r13), %rdx
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_nvkm_timer_alarm
	movq	%r13, %rdi
	callq	_nvkm_therm_fan_get
	testl	%eax, %eax
	movl	$100, %r12d
	cmovnsl	%eax, %r12d
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movl	$1, %ebx
	jmp	LBB0_5
LBB0_6:
	movq	16(%r13), %rax
	movl	(%rax), %eax
	cmpl	$133, %eax
	je	LBB0_13
## %bb.7:
	cmpl	$132, %eax
	je	LBB0_10
## %bb.8:
	movl	$-1, %r12d
	cmpl	$131, %eax
	jne	LBB0_15
## %bb.9:
	movq	%r13, %rdi
	callq	_nvkm_therm_update_trip
	jmp	LBB0_14
LBB0_12:
	addq	$12, %r13
	movq	%r15, %rdi
	xorl	%esi, %esi
	movq	%r13, %rdx
	callq	_nvkm_timer_alarm
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock_irqrestore         ## TAILCALL
LBB0_13:
	movq	%r13, %rdi
	callq	_nvkm_therm_update_linear
	jmp	LBB0_14
LBB0_10:
	movl	4(%r13), %r12d
	testl	%r12d, %r12d
	jne	LBB0_16
## %bb.11:
	movq	%r13, %rdi
	callq	_nvkm_therm_update_linear_fallback
LBB0_14:
	movl	%eax, %r12d
LBB0_15:
	leaq	12(%r13), %rdx
	movl	$1000000000, %esi               ## imm = 0x3B9ACA00
	movq	%r15, %rdi
	callq	_nvkm_timer_alarm
LBB0_16:
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	xorl	%ebx, %ebx
	testl	%r12d, %r12d
	js	LBB0_17
LBB0_5:
	leaq	24(%r13), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%r12d, %edx
	callq	_nvkm_debug
	movq	%r13, %rdi
	movl	%ebx, %esi
	movl	%r12d, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_nvkm_therm_fan_set             ## TAILCALL
LBB0_17:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"FAN target request: %d%%\n"

	.no_dead_strip	_nvkm_therm_update
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nvkm_therm_update
_nvkm_therm_update:                     ; @nvkm_therm_update
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x23, x1
	mov	x19, x0
	mov	x20, x0
	ldr	x8, [x20, #24]!
	ldr	x22, [x8]
	sub	x21, x20, #16
	mov	x0, x21
	bl	_spin_lock_irqsave
	tbz	w23, #31, LBB0_2
; %bb.1:
	ldr	w23, [x19]
LBB0_2:
	str	w23, [x19]
	cmp	w23, #130
	b.eq	LBB0_5
; %bb.3:
	cmp	w23, #129
	b.ne	LBB0_9
; %bb.4:
	add	x2, x19, #12
	mov	x0, x22
	mov	x1, #0
	bl	_nvkm_timer_alarm
	mov	x0, x19
	bl	_nvkm_therm_fan_get
	mov	w8, #100
	cmp	w0, #0
	csel	w23, w8, w0, lt
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	mov	w21, #1
	b	LBB0_18
LBB0_5:
	ldr	x8, [x19, #16]
	ldr	w8, [x8]
	cmp	w8, #133
	b.eq	LBB0_10
; %bb.6:
	cmp	w8, #132
	b.eq	LBB0_11
; %bb.7:
	cmp	w8, #131
	b.ne	LBB0_14
; %bb.8:
	mov	x0, x19
	bl	_nvkm_therm_update_trip
	b	LBB0_13
LBB0_9:
	add	x2, x19, #12
	mov	x0, x22
	mov	x1, #0
	bl	_nvkm_timer_alarm
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_spin_unlock_irqrestore
LBB0_10:
	mov	x0, x19
	bl	_nvkm_therm_update_linear
	b	LBB0_13
LBB0_11:
	ldr	w23, [x19, #4]
	cbnz	w23, LBB0_16
; %bb.12:
	mov	x0, x19
	bl	_nvkm_therm_update_linear_fallback
LBB0_13:
	mov	x23, x0
	b	LBB0_15
LBB0_14:
	mov	w23, #-1
LBB0_15:
	add	x2, x19, #12
	mov	x0, x22
	mov	w1, #51712
	movk	w1, #15258, lsl #16
	bl	_nvkm_timer_alarm
LBB0_16:
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	tbnz	w23, #31, LBB0_19
; %bb.17:
	mov	w21, #0
LBB0_18:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x23
	bl	_nvkm_debug
	mov	x0, x19
	mov	x1, x21
	mov	x2, x23
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_nvkm_therm_fan_set
LBB0_19:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"FAN target request: %d%%\n"

	.no_dead_strip	_nvkm_therm_update
.subsections_via_symbols
