	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function amdgpu_ttm_bo_eviction_valuable
_amdgpu_ttm_bo_eviction_valuable:       ## @amdgpu_ttm_bo_eviction_valuable
	.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
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	8(%rdi), %r14
	movq	24(%rdi), %r15
	movq	_ttm_bo_type_kernel@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movl	32(%rbx), %edi
	movl	$1, %esi
	callq	_dma_resv_test_signaled_rcu
	testl	%eax, %eax
	je	LBB0_15
LBB0_2:
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movl	32(%rbx), %edi
	callq	_dma_resv_get_list
	testq	%rax, %rax
	je	LBB0_7
## %bb.3:
	movq	%rax, %r13
	cmpl	$0, (%rax)
	jle	LBB0_7
## %bb.4:
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r13), %rax
	movl	(%rax,%r12,4), %ebx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	32(%rax), %edi
	callq	_dma_resv_held
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_rcu_dereference_protected
	movq	_current@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rcx), %esi
	movq	%rax, %rdi
	callq	_amdkfd_fence_check_mm
	testq	%rax, %rax
	jne	LBB0_15
## %bb.5:                               ##   in Loop: Header=BB0_6 Depth=1
	incq	%r12
	movslq	(%r13), %rax
	cmpq	%rax, %r12
	jl	LBB0_6
LBB0_7:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	16(%rdi), %ecx
	movl	$1, %eax
	cmpl	$129, %ecx
	je	LBB0_16
## %bb.8:
	cmpl	$128, %ecx
	jne	LBB0_17
## %bb.9:
	testq	%r14, %r14
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	je	LBB0_15
## %bb.10:
	movq	(%rdi), %rbx
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_11 Depth=1
	addq	$16, %r15
	subq	%rcx, %r14
	je	LBB0_15
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rdx
	movq	8(%r15), %rcx
	leaq	(%rcx,%rdx), %rsi
	cmpq	%rsi, %rbx
	jae	LBB0_14
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	8(%rdi), %rsi
	testq	%rsi, %rsi
	je	LBB0_16
## %bb.13:                              ##   in Loop: Header=BB0_11 Depth=1
	cmpq	%rdx, %rsi
	jbe	LBB0_14
	jmp	LBB0_16
LBB0_15:
	xorl	%eax, %eax
LBB0_16:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ttm_bo_eviction_valuable       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ttm_bo_type_kernel,8,3         ## @ttm_bo_type_kernel
	.comm	_current,8,3                    ## @current
	.no_dead_strip	_amdgpu_ttm_bo_eviction_valuable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function amdgpu_ttm_bo_eviction_valuable
_amdgpu_ttm_bo_eviction_valuable:       ; @amdgpu_ttm_bo_eviction_valuable
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x1
	mov	x20, x0
	ldr	x23, [x0, #24]
	ldp	x8, x24, [x0]
Lloh0:
	adrp	x9, _ttm_bo_type_kernel@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ttm_bo_type_kernel@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	ldr	w0, [x20, #32]
	mov	w1, #1
	bl	_dma_resv_test_signaled_rcu
	cbz	w0, LBB0_16
LBB0_2:
	ldr	w0, [x20, #32]
	bl	_dma_resv_get_list
	cbz	x0, LBB0_7
; %bb.3:
	mov	x21, x0
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.4:
	mov	x25, #0
Lloh3:
	adrp	x26, _current@GOTPAGE
Lloh4:
	ldr	x26, [x26, _current@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21, #8]
	ldr	w22, [x8, x25, lsl #2]
	ldr	w0, [x20, #32]
	bl	_dma_resv_held
	mov	x1, x0
	mov	x0, x22
	bl	_rcu_dereference_protected
	ldr	x8, [x26]
	ldr	w1, [x8]
	bl	_amdkfd_fence_check_mm
	cbnz	x0, LBB0_15
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x25, x25, #1
	ldrsw	x8, [x21]
	cmp	x25, x8
	b.lt	LBB0_5
LBB0_7:
	ldr	w8, [x20, #16]
	cmp	w8, #129
	b.eq	LBB0_14
; %bb.8:
	cmp	w8, #128
	b.ne	LBB0_17
; %bb.9:
	cbz	x24, LBB0_15
; %bb.10:
	ldr	x8, [x19]
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	add	x23, x23, #16
	subs	x24, x24, x9
	b.eq	LBB0_15
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldp	x10, x9, [x23]
	add	x11, x9, x10
	cmp	x8, x11
	b.hs	LBB0_11
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	x11, [x19, #8]
	cmp	x11, #0
	ccmp	x11, x10, #2, ne
	b.ls	LBB0_11
LBB0_14:
	mov	w0, #1
	b	LBB0_16
LBB0_15:
	mov	w0, #0
LBB0_16:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_17:
	mov	x0, x20
	mov	x1, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_ttm_bo_eviction_valuable
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_ttm_bo_type_kernel,8,3         ; @ttm_bo_type_kernel
	.comm	_current,8,3                    ; @current
	.no_dead_strip	_amdgpu_ttm_bo_eviction_valuable
.subsections_via_symbols
