	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nouveau_therm_update
_nouveau_therm_update:                  ## @nouveau_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, %r12d
	movq	%rdi, %rbx
	callq	_nouveau_timer
	movq	%rax, %r15
	leaq	4(%rbx), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	testl	%r12d, %r12d
	jns	LBB0_2
## %bb.1:
	movl	(%rbx), %r12d
LBB0_2:
	movl	%r12d, (%rbx)
	cmpl	$130, %r12d
	je	LBB0_5
## %bb.3:
	cmpl	$129, %r12d
	jne	LBB0_10
## %bb.4:
	movq	%rbx, %rdi
	callq	_nouveau_therm_fan_get
	testl	%eax, %eax
	movl	$100, %r13d
	cmovnsl	%eax, %r13d
	jmp	LBB0_9
LBB0_5:
	movq	16(%rbx), %rax
	cmpl	$0, (%rax)
	je	LBB0_7
## %bb.6:
	movq	%rbx, %rdi
	callq	_nouveau_therm_update_trip
	jmp	LBB0_8
LBB0_7:
	movq	%rbx, %rdi
	callq	_nouveau_therm_update_linear
LBB0_8:
	movl	%eax, %r13d
LBB0_9:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	movl	%r13d, %edx
	callq	_nv_debug
	xorl	%esi, %esi
	cmpl	$130, %r12d
	setne	%sil
	movq	%rbx, %rdi
	movl	%r13d, %edx
	callq	_nouveau_therm_fan_set
LBB0_10:
	addq	$8, %rbx
	movq	%rbx, %rdi
	callq	_list_empty
	testq	%rax, %rax
	je	LBB0_13
## %bb.11:
	cmpl	$130, %r12d
	jne	LBB0_13
## %bb.12:
	movl	$1000000000, %esi               ## imm = 0x3B9ACA00
	movq	%r15, %rdi
	movq	%rbx, %rdx
	callq	*(%r15)
LBB0_13:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock_irqrestore         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"FAN target request: %d%%\n"

	.no_dead_strip	_nouveau_therm_update
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nouveau_therm_update
_nouveau_therm_update:                  ; @nouveau_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	x21, x1
	mov	x22, x0
	bl	_nouveau_timer
	mov	x20, x0
	add	x19, x22, #4
	mov	x0, x19
	bl	_spin_lock_irqsave
	tbz	w21, #31, LBB0_2
; %bb.1:
	ldr	w21, [x22]
LBB0_2:
	str	w21, [x22]
	cmp	w21, #130
	b.eq	LBB0_5
; %bb.3:
	cmp	w21, #129
	b.ne	LBB0_10
; %bb.4:
	mov	x0, x22
	bl	_nouveau_therm_fan_get
	mov	w8, #100
	cmp	w0, #0
	csel	w23, w8, w0, lt
	b	LBB0_9
LBB0_5:
	ldr	x8, [x22, #16]
	ldr	w8, [x8]
	cbz	w8, LBB0_7
; %bb.6:
	mov	x0, x22
	bl	_nouveau_therm_update_trip
	b	LBB0_8
LBB0_7:
	mov	x0, x22
	bl	_nouveau_therm_update_linear
LBB0_8:
	mov	x23, x0
LBB0_9:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	mov	x2, x23
	bl	_nv_debug
	cmp	w21, #130
	cset	w1, ne
	mov	x0, x22
	mov	x2, x23
	bl	_nouveau_therm_fan_set
LBB0_10:
	add	x22, x22, #8
	mov	x0, x22
	bl	_list_empty
	cbz	x0, LBB0_13
; %bb.11:
	cmp	w21, #130
	b.ne	LBB0_13
; %bb.12:
	ldr	x8, [x20]
	mov	x0, x20
	mov	w1, #51712
	movk	w1, #15258, lsl #16
	mov	x2, x22
	blr	x8
LBB0_13:
	mov	x0, x19
	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
	.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	_nouveau_therm_update
.subsections_via_symbols
