	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function amdgpu_vram_mgr_del
_amdgpu_vram_mgr_del:                   ## @amdgpu_vram_mgr_del
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	movl	8(%rdi), %edi
	callq	_amdgpu_ttm_adev
	movq	8(%r15), %rbx
	testq	%rbx, %rbx
	je	LBB0_6
## %bb.1:
	movq	%rax, %r13
	movq	(%r14), %rax
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movl	(%r15), %r12d
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	leaq	8(%rax), %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_spin_lock
	testl	%r12d, %r12d
	je	LBB0_2
## %bb.3:
	xorl	%r15d, %r15d
	xorl	%r14d, %r14d
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %r13d
	movq	%rbx, %rdi
	callq	_drm_mm_remove_node
	movl	(%rbx), %eax
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rcx
	movzbl	(%rcx), %ecx
	shll	%cl, %eax
	addl	%eax, %r14d
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rsi
	callq	_amdgpu_vram_mgr_vis_size
	addl	%eax, %r15d
	addq	$4, %rbx
	subl	%r13d, %r12d
	jne	LBB0_4
	jmp	LBB0_5
LBB0_2:
	xorl	%r14d, %r14d
	xorl	%r15d, %r15d
LBB0_5:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_unlock
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	leaq	4(%rbx), %rsi
	movl	%r14d, %edi
	callq	_atomic64_sub
	movl	%r15d, %edi
	movq	%rbx, %rsi
	callq	_atomic64_sub
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	8(%rbx), %rdi
	callq	_kvfree
	movq	$0, 8(%rbx)
LBB0_6:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
	.no_dead_strip	_amdgpu_vram_mgr_del
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function amdgpu_vram_mgr_del
_amdgpu_vram_mgr_del:                   ; @amdgpu_vram_mgr_del
	.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	x19, x1
	mov	x20, x0
	ldr	w0, [x0, #8]
	bl	_amdgpu_ttm_adev
	ldr	x25, [x19, #8]
	cbz	x25, LBB0_6
; %bb.1:
	mov	x23, x0
	ldr	x20, [x20]
	ldr	w26, [x19]
	add	x21, x20, #8
	mov	x0, x21
	bl	_spin_lock
	cbz	w26, LBB0_4
; %bb.2:
	mov	w22, #0
	mov	w24, #0
Lloh0:
	adrp	x27, _PAGE_SHIFT@GOTPAGE
Lloh1:
	ldr	x27, [x27, _PAGE_SHIFT@GOTPAGEOFF]
	mov	x28, x25
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x25]
	sub	w26, w26, w8
	mov	x0, x25
	bl	_drm_mm_remove_node
	ldr	w8, [x28], #4
	ldr	w9, [x27]
	lsl	w8, w8, w9
	add	w24, w8, w24
	mov	x0, x23
	mov	x1, x25
	bl	_amdgpu_vram_mgr_vis_size
	add	w22, w22, w0
	mov	x25, x28
	cbnz	w26, LBB0_3
	b	LBB0_5
LBB0_4:
	mov	w24, #0
	mov	w22, #0
LBB0_5:
	mov	x0, x21
	bl	_spin_unlock
	add	x1, x20, #4
	mov	x0, x24
	bl	_atomic64_sub
	mov	x0, x22
	mov	x1, x20
	bl	_atomic64_sub
	ldr	x0, [x19, #8]
	bl	_kvfree
	str	xzr, [x19, #8]
LBB0_6:
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
	.no_dead_strip	_amdgpu_vram_mgr_del
.subsections_via_symbols
