	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function eb_lookup_vmas
_eb_lookup_vmas:                        ## @eb_lookup_vmas
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	8(%rdi), %rbx
	movq	%rbx, %rdi
	callq	_i915_gem_context_is_banned
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_2
LBB0_3:
	movq	%rbx, %r15
	leaq	64(%r12), %rdi
	callq	_INIT_LIST_HEAD
	leaq	60(%r12), %rdi
	callq	_INIT_LIST_HEAD
	movq	%r12, %rdi
	callq	_eb_batch_index
	movl	%eax, %ebx
	movq	8(%r12), %rdi
	callq	_mutex_lock
	movq	8(%r12), %rdi
	callq	_i915_gem_context_is_closed
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_4
## %bb.26:
	movq	_ENOENT@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_27
LBB0_4:
	movl	%ebx, -60(%rbp)                 ## 4-byte Spill
	cmpl	$0, (%r12)
	movq	%r12, %r14
	je	LBB0_25
## %bb.5:
	movq	%r15, %r12
	addq	$4, %r12
	xorl	%ebx, %ebx
	xorl	%r13d, %r13d
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_23:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	40(%r12), %rdi
	addq	%rbx, %rdi
	movq	32(%r12), %rax
	movl	(%rax,%rbx), %edx
	movq	%r14, %rsi
	callq	_eb_vma_misplaced
	testq	%rax, %rax
	setne	%al
LBB0_24:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	%r12, %r14
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movzbl	%al, %edi
	callq	_GEM_BUG_ON
	incq	%r13
	movl	(%r14), %eax
	addq	$4, %rbx
	cmpq	%rax, %r13
	jae	LBB0_25
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, -88(%rbp)                 ## 8-byte Spill
	movq	40(%r14), %rax
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	movl	(%rax,%rbx), %r15d
	movq	%r12, %rdi
	movl	%r15d, %esi
	callq	_radix_tree_lookup
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_likely
	testq	%rax, %rax
	jne	LBB0_20
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	56(%r14), %edi
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	movl	%r15d, %esi
	callq	_i915_gem_object_lookup
	movq	%rax, %rbx
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	movq	%r14, %r12
	jne	LBB0_8
## %bb.10:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	48(%r12), %rax
	movl	(%rax), %esi
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_i915_vma_instance
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	jne	LBB0_11
## %bb.13:                              ##   in Loop: Header=BB0_6 Depth=1
	xorl	%eax, %eax
	callq	_i915_lut_handle_alloc
	movq	%rax, %r14
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_14
## %bb.15:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movq	%rbx, %rdx
	callq	_radix_tree_insert
	movl	%eax, %r15d
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_16
## %bb.17:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	%rbx, %rdi
	addq	$16, %rdi
	callq	_atomic_fetch_inc
	testl	%eax, %eax
	jne	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	%rbx, %rdi
	callq	_i915_vma_reopen
LBB0_19:                                ##   in Loop: Header=BB0_6 Depth=1
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 16(%r14)
	movq	8(%r12), %rax
	movq	%rax, 8(%r14)
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	callq	_i915_gem_object_lock
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_list_add
	movq	%r15, %rdi
	callq	_i915_gem_object_unlock
	movq	%r12, %r14
LBB0_20:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	%r14, %rdi
	movq	-88(%rbp), %r13                 ## 8-byte Reload
	movl	%r13d, %esi
	movl	-60(%rbp), %edx                 ## 4-byte Reload
	movq	%rbx, %rcx
	callq	_eb_add_vma
	movl	%eax, %r15d
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	movq	%r14, %r12
	jne	LBB0_9
## %bb.21:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	16(%r12), %rax
	xorl	%edi, %edi
	movq	%rbx, %r14
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	cmpq	(%rax,%rbx,2), %r14
	setne	%dil
	callq	_GEM_BUG_ON
	movq	32(%r12), %rax
	addq	%rbx, %rax
	xorl	%edi, %edi
	cmpq	8(%r14), %rax
	setne	%dil
	callq	_GEM_BUG_ON
	movq	%r14, %rdi
	callq	_drm_mm_node_allocated
	testq	%rax, %rax
	jne	LBB0_23
## %bb.22:                              ##   in Loop: Header=BB0_6 Depth=1
	xorl	%eax, %eax
	jmp	LBB0_24
LBB0_25:
	movq	8(%r14), %rdi
	callq	_mutex_unlock
	movq	___EXEC_VALIDATED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	24(%r14), %rcx
	orl	%eax, (%rcx)
	movq	%r14, %rdi
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_eb_reserve                     ## TAILCALL
LBB0_8:
	movq	_ENOENT@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_9
LBB0_11:
	movq	%rbx, %rdi
	callq	_PTR_ERR
	movl	%eax, %r15d
	jmp	LBB0_12
LBB0_14:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_12
LBB0_16:
	movq	%r14, %rdi
	callq	_i915_lut_handle_free
LBB0_12:
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_i915_gem_object_put
LBB0_9:
	movq	16(%r12), %rax
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movq	$0, (%rax,%rcx,2)
LBB0_27:
	movq	8(%r12), %rdi
	callq	_mutex_unlock
LBB0_2:
	movl	%r15d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EIO,4,2                        ## @EIO
	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	___EXEC_VALIDATED,4,2           ## @__EXEC_VALIDATED
	.no_dead_strip	_eb_lookup_vmas
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function eb_lookup_vmas
_eb_lookup_vmas:                        ; @eb_lookup_vmas
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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, x0
	ldr	x22, [x0, #8]
	mov	x0, x22
	bl	_i915_gem_context_is_banned
	bl	_unlikely
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w26, w8
	b	LBB0_26
LBB0_2:
	add	x0, x19, #64
	bl	_INIT_LIST_HEAD
	add	x0, x19, #60
	bl	_INIT_LIST_HEAD
	mov	x0, x19
	bl	_eb_batch_index
	mov	x27, x0
	ldr	x0, [x19, #8]
	bl	_mutex_lock
	ldr	x0, [x19, #8]
	bl	_i915_gem_context_is_closed
	bl	_unlikely
	cbz	x0, LBB0_4
; %bb.3:
Lloh3:
	adrp	x8, _ENOENT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w26, w8
	b	LBB0_25
LBB0_4:
	ldr	w8, [x19]
	cbz	w8, LBB0_18
; %bb.5:
	mov	x20, #0
	mov	x28, #0
	mov	x21, #0
	add	x22, x22, #4
	str	w27, [sp, #12]                  ; 4-byte Folded Spill
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	bl	_GEM_BUG_ON
	add	x21, x21, #1
	ldr	w8, [x19]
	add	x28, x28, #8
	add	x20, x20, #4
	cmp	x21, x8
	b.hs	LBB0_18
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #40]
	ldr	w25, [x8, x20]
	mov	x0, x22
	mov	x1, x25
	bl	_radix_tree_lookup
	mov	x23, x0
	bl	_likely
	cbnz	x0, LBB0_15
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w0, [x19, #56]
	mov	x1, x25
	bl	_i915_gem_object_lookup
	mov	x24, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_unlikely
	cbnz	x0, LBB0_19
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x19, #48]
	ldr	w1, [x8]
	mov	x0, x24
	mov	x2, #0
	bl	_i915_vma_instance
	mov	x23, x0
	bl	_IS_ERR
	cbnz	x0, LBB0_20
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=1
	bl	_i915_lut_handle_alloc
	mov	x27, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_unlikely
	cbnz	x0, LBB0_21
; %bb.11:                               ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x22
	mov	x1, x25
	mov	x2, x23
	bl	_radix_tree_insert
	mov	x26, x0
	bl	_unlikely
	cbnz	x0, LBB0_22
; %bb.12:                               ;   in Loop: Header=BB0_7 Depth=1
	add	x0, x23, #16
	bl	_atomic_fetch_inc
	cbnz	w0, LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x23
	bl	_i915_vma_reopen
LBB0_14:                                ;   in Loop: Header=BB0_7 Depth=1
	str	w25, [x27, #16]
	ldr	x8, [x19, #8]
	str	x8, [x27, #8]
	mov	x0, x24
	bl	_i915_gem_object_lock
	mov	x0, x27
	mov	x1, x24
	bl	_list_add
	mov	x0, x24
	bl	_i915_gem_object_unlock
	ldr	w27, [sp, #12]                  ; 4-byte Folded Reload
LBB0_15:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x19
	mov	x1, x21
	mov	x2, x27
	mov	x3, x23
	bl	_eb_add_vma
	mov	x26, x0
	bl	_unlikely
	cbnz	x0, LBB0_24
; %bb.16:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x19, #16]
	ldr	x8, [x8, x28]
	cmp	x23, x8
	cset	w0, ne
	bl	_GEM_BUG_ON
	ldr	x8, [x23, #8]
	ldr	x9, [x19, #32]
	add	x9, x9, x20
	cmp	x9, x8
	cset	w0, ne
	bl	_GEM_BUG_ON
	mov	x0, x23
	bl	_drm_mm_node_allocated
	cbz	x0, LBB0_6
; %bb.17:                               ;   in Loop: Header=BB0_7 Depth=1
	ldp	x9, x8, [x19, #32]
	add	x0, x8, x20
	ldr	w2, [x9, x20]
	mov	x1, x23
	bl	_eb_vma_misplaced
	cmp	x0, #0
	cset	w0, ne
	b	LBB0_6
LBB0_18:
	ldr	x0, [x19, #8]
	bl	_mutex_unlock
Lloh6:
	adrp	x8, ___EXEC_VALIDATED@GOTPAGE
Lloh7:
	ldr	x8, [x8, ___EXEC_VALIDATED@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	ldr	x9, [x19, #24]
	ldr	w10, [x9]
	orr	w8, w10, w8
	str	w8, [x9]
	mov	x0, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_eb_reserve
LBB0_19:
Lloh9:
	adrp	x8, _ENOENT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w26, w8
	b	LBB0_24
LBB0_20:
	mov	x0, x23
	bl	_PTR_ERR
	mov	x26, x0
	b	LBB0_23
LBB0_21:
Lloh12:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w26, w8
	b	LBB0_23
LBB0_22:
	mov	x0, x27
	bl	_i915_lut_handle_free
LBB0_23:
	mov	x0, x24
	bl	_i915_gem_object_put
LBB0_24:
	ldr	x8, [x19, #16]
	str	xzr, [x8, x28]
LBB0_25:
	ldr	x0, [x19, #8]
	bl	_mutex_unlock
LBB0_26:
	mov	x0, x26
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_EIO,4,2                        ; @EIO
	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	___EXEC_VALIDATED,4,2           ; @__EXEC_VALIDATED
	.no_dead_strip	_eb_lookup_vmas
.subsections_via_symbols
