	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nvkm_ramht_update
_nvkm_ramht_update:                     ## @nvkm_ramht_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, %r15d
	movl	%r8d, -48(%rbp)                 ## 4-byte Spill
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
                                        ## kill: def $esi killed $esi def $rsi
	movq	%rdi, %r12
	movq	24(%rdi), %r14
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movslq	%esi, %rbx
	shlq	$4, %rbx
	leaq	(%r14,%rbx), %r13
	addq	$8, %r13
	movq	%r13, %rdi
	callq	_nvkm_gpuobj_del
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%r14,%rbx)
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	movl	%r15d, 4(%r14,%rbx)
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	movl	16(%r12), %esi
	movl	$16, %edx
	movq	%r13, %rcx
	callq	_nvkm_object_bind
	testl	%eax, %eax
	je	LBB0_6
## %bb.3:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	addl	%eax, %ecx
	jne	LBB0_4
## %bb.5:
	movq	$0, (%r13)
	jmp	LBB0_7
LBB0_1:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movl	16(%rbp), %r14d
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	jmp	LBB0_15
LBB0_6:
	movq	(%r13), %rax
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movq	8(%r12), %rcx
	movq	(%rcx), %rcx
	movq	_NV_50@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movl	16(%rbp), %r14d
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	jl	LBB0_10
## %bb.9:
	movq	8(%rax), %rax
LBB0_10:
	movl	(%rax), %eax
	testl	%ecx, %ecx
	jns	LBB0_13
LBB0_12:
	negb	%cl
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %eax
	jmp	LBB0_14
LBB0_7:
	movl	$64, %eax
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movl	16(%rbp), %r14d
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	testl	%ecx, %ecx
	js	LBB0_12
LBB0_13:
                                        ## kill: def $cl killed $cl killed $ecx
	sarl	%cl, %eax
LBB0_14:
	orl	%eax, %r14d
LBB0_15:
	movl	(%r12), %edi
	callq	_nvkm_kmap
	movl	(%r12), %edi
	leal	(,%rbx,8), %esi
	movl	%r15d, %edx
	callq	_nvkm_wo32
	movl	(%r12), %edi
	leal	4(,%rbx,8), %esi
	movl	%r14d, %edx
	callq	_nvkm_wo32
	movl	(%r12), %edi
	callq	_nvkm_done
	incl	%ebx
	movl	%ebx, %eax
LBB0_16:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	addq	%rbx, %r14
	movl	$-1, (%r14)
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_NV_50,8,3                      ## @NV_50
	.no_dead_strip	_nvkm_ramht_update
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nvkm_ramht_update
_nvkm_ramht_update:                     ; @nvkm_ramht_update
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x6
	mov	x22, x5
	mov	x23, x4
	mov	x26, x3
	mov	x25, x2
	mov	x19, x1
	mov	x21, x0
	ldr	x8, [x0, #24]
	add	x27, x8, w1, sxtw #4
	add	x24, x27, #8
	mov	x0, x24
	bl	_nvkm_gpuobj_del
	stp	w26, w22, [x27]
	cbz	x25, LBB0_10
; %bb.1:
	ldr	w1, [x21, #16]
	mov	x0, x25
	mov	w2, #16
	mov	x3, x24
	bl	_nvkm_object_bind
	cbz	w0, LBB0_4
; %bb.2:
Lloh0:
	adrp	x8, _ENODEV@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmn	w0, w8
	b.ne	LBB0_12
; %bb.3:
	str	xzr, [x24]
	b	LBB0_8
LBB0_4:
	ldr	x8, [x24]
	cbz	x8, LBB0_8
; %bb.5:
	ldr	x9, [x21, #8]
	ldr	x9, [x9]
Lloh3:
	adrp	x10, _NV_50@GOTPAGE
Lloh4:
	ldr	x10, [x10, _NV_50@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x9, x10
	b.lt	LBB0_7
; %bb.6:
	ldr	x8, [x8, #8]
LBB0_7:
	ldr	w8, [x8]
	b	LBB0_9
LBB0_8:
	mov	w8, #64
LBB0_9:
	asr	w9, w8, w23
	orr	w9, w9, w20
	neg	w10, w23
	lsl	w8, w8, w10
	orr	w8, w8, w20
	tst	w23, #0x80000000
	csel	w20, w9, w8, eq
LBB0_10:
	ldr	w0, [x21]
	bl	_nvkm_kmap
	ldr	w0, [x21]
	lsl	w1, w19, #3
	mov	x2, x22
	bl	_nvkm_wo32
	ldr	w0, [x21]
	mov	w1, #4
	bfi	w1, w19, #3, #29
	mov	x2, x20
	bl	_nvkm_wo32
	ldr	w0, [x21]
	bl	_nvkm_done
	add	w0, w19, #1
LBB0_11:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_12:
	mov	w8, #-1
	str	w8, [x27]
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_NV_50,8,3                      ; @NV_50
	.no_dead_strip	_nvkm_ramht_update
.subsections_via_symbols
