	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nvd0_therm_init
_nvd0_therm_init:                       ## @nvd0_therm_init
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	addq	$8, %rdi
	callq	_nouveau_therm_init
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_4
## %bb.1:
	movq	%rbx, %rdi
	movl	$59168, %esi                    ## imm = 0xE720
	movl	$3, %edx
	movl	$2, %ecx
	callq	_nv_mask
	movq	(%rbx), %rax
	movq	(%rax), %rcx
	movq	_DCB_GPIO_UNUSED@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_3
## %bb.2:
	movl	8(%rax), %ecx
	movq	%rbx, %rdi
	movl	$55196, %esi                    ## imm = 0xD79C
	movl	$255, %edx
	callq	_nv_mask
	movq	%rbx, %rdi
	callq	_nv_device
	imull	$1000, (%rax), %edx             ## imm = 0x3E8
	movq	%rbx, %rdi
	movl	$59172, %esi                    ## imm = 0xE724
	callq	_nv_wr32
	movq	%rbx, %rdi
	movl	$59168, %esi                    ## imm = 0xE720
	movl	$1, %edx
	movl	$1, %ecx
	callq	_nv_mask
LBB0_3:
	movq	%rbx, %rdi
	movl	$59168, %esi                    ## imm = 0xE720
	movl	$2, %edx
	xorl	%ecx, %ecx
	callq	_nv_mask
LBB0_4:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DCB_GPIO_UNUSED,8,3            ## @DCB_GPIO_UNUSED
	.no_dead_strip	_nvd0_therm_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nvd0_therm_init
_nvd0_therm_init:                       ; @nvd0_therm_init
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x0
	add	x0, x0, #8
	bl	_nouveau_therm_init
	mov	x19, x0
	cbnz	w0, LBB0_4
; %bb.1:
	mov	x0, x20
	mov	w1, #59168
	mov	w2, #3
	mov	w3, #2
	bl	_nv_mask
	ldr	x8, [x20]
	ldr	x9, [x8]
Lloh0:
	adrp	x10, _DCB_GPIO_UNUSED@GOTPAGE
Lloh1:
	ldr	x10, [x10, _DCB_GPIO_UNUSED@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
	cmp	x9, x10
	b.eq	LBB0_3
; %bb.2:
	ldr	w3, [x8, #8]
	mov	x0, x20
	mov	w1, #55196
	mov	w2, #255
	bl	_nv_mask
	mov	x0, x20
	bl	_nv_device
	ldr	w8, [x0]
	mov	w9, #1000
	mul	w2, w8, w9
	mov	x0, x20
	mov	w1, #59172
	bl	_nv_wr32
	mov	x0, x20
	mov	w1, #59168
	mov	w2, #1
	mov	w3, #1
	bl	_nv_mask
LBB0_3:
	mov	x0, x20
	mov	w1, #59168
	mov	w2, #2
	mov	w3, #0
	bl	_nv_mask
LBB0_4:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_DCB_GPIO_UNUSED,8,3            ; @DCB_GPIO_UNUSED
	.no_dead_strip	_nvd0_therm_init
.subsections_via_symbols
