	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i915_gem_object_wait_reservation
_i915_gem_object_wait_reservation:      ## @i915_gem_object_wait_reservation
	.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	%r12
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r12
	movl	%esi, %r15d
	movq	%rdi, %r14
	movq	_I915_WAIT_ALL@GOTPCREL(%rip), %rax
	testl	%esi, (%rax)
	je	LBB0_11
## %bb.1:
	leaq	-56(%rbp), %rsi
	leaq	-36(%rbp), %rdx
	leaq	-48(%rbp), %rcx
	movq	%r14, %rdi
	callq	_dma_resv_get_fences_rcu
	testl	%eax, %eax
	je	LBB0_2
## %bb.21:
	movslq	%eax, %r12
	jmp	LBB0_20
LBB0_11:
	movq	%r14, %rdi
	callq	_dma_resv_get_excl_rcu
	movq	%rax, %rdi
	movq	%rax, -56(%rbp)
	xorl	%ebx, %ebx
	testq	%rdi, %rdi
	jne	LBB0_13
	jmp	LBB0_15
LBB0_2:
	cmpl	$0, -36(%rbp)
	je	LBB0_10
## %bb.3:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	-48(%rbp), %rax
	movq	(%rax,%rbx,8), %rdi
	movl	%r15d, %esi
	movq	%r12, %rdx
	callq	_i915_gem_object_wait_fence
	movq	%rax, %r12
	testq	%rax, %rax
	js	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	-48(%rbp), %rax
	movq	(%rax,%rbx,8), %rdi
	callq	_dma_fence_put
	incq	%rbx
	movl	-36(%rbp), %eax
	cmpq	%rax, %rbx
	jb	LBB0_4
## %bb.7:
	cmpl	%ebx, %eax
	ja	LBB0_8
	jmp	LBB0_10
LBB0_5:
	movl	-36(%rbp), %eax
	cmpl	%ebx, %eax
	jbe	LBB0_10
LBB0_8:
	movl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	-48(%rbp), %rax
	movq	(%rax,%rbx,8), %rdi
	callq	_dma_fence_put
	incq	%rbx
	movl	-36(%rbp), %eax
	cmpq	%rax, %rbx
	jb	LBB0_9
LBB0_10:
	movq	-48(%rbp), %rdi
	callq	_kfree
	cmpl	$0, -36(%rbp)
	setne	%al
	testq	%r12, %r12
	setns	%cl
	andb	%al, %cl
	movzbl	%cl, %ebx
	movq	-56(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_15
LBB0_13:
	testq	%r12, %r12
	js	LBB0_15
## %bb.14:
	movl	%r15d, %esi
	movq	%r12, %rdx
	callq	_i915_gem_object_wait_fence
	movq	%rax, %r12
	movq	-56(%rbp), %rdi
LBB0_15:
	callq	_dma_fence_put
	testl	%ebx, %ebx
	je	LBB0_20
## %bb.16:
	movq	%r14, %rdi
	callq	_dma_resv_trylock
	testq	%rax, %rax
	je	LBB0_20
## %bb.17:
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_dma_resv_test_signaled_rcu
	testq	%rax, %rax
	je	LBB0_19
## %bb.18:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_dma_resv_add_excl_fence
LBB0_19:
	movq	%r14, %rdi
	callq	_dma_resv_unlock
LBB0_20:
	movq	%r12, %rax
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_I915_WAIT_ALL,4,2              ## @I915_WAIT_ALL
	.no_dead_strip	_i915_gem_object_wait_reservation
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i915_gem_object_wait_reservation
_i915_gem_object_wait_reservation:      ; @i915_gem_object_wait_reservation
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _I915_WAIT_ALL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _I915_WAIT_ALL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w1
	b.eq	LBB0_3
; %bb.1:
	add	x1, sp, #24
	add	x2, sp, #12
	add	x3, sp, #16
	mov	x0, x20
	bl	_dma_resv_get_fences_rcu
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_4
; %bb.2:
	sxtw	x19, w0
	b	LBB0_20
LBB0_3:
	mov	x0, x20
	bl	_dma_resv_get_excl_rcu
	mov	w22, #0
	str	x0, [sp, #24]
	cbnz	x0, LBB0_13
	b	LBB0_15
LBB0_4:
	ldr	w8, [sp, #12]
	cbz	w8, LBB0_12
; %bb.5:
	mov	x22, #0
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [sp, #16]
	ldr	x0, [x8, x22, lsl #3]
	mov	x1, x21
	mov	x2, x19
	bl	_i915_gem_object_wait_fence
	mov	x19, x0
	tbnz	x0, #63, LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [sp, #16]
	ldr	x0, [x8, x22, lsl #3]
	bl	_dma_fence_put
	add	x22, x22, #1
	ldr	w8, [sp, #12]
	cmp	x22, x8
	b.lo	LBB0_6
; %bb.8:
	cmp	w8, w22
	b.hi	LBB0_10
	b	LBB0_12
LBB0_9:
	ldr	w8, [sp, #12]
	cmp	w8, w22
	b.ls	LBB0_12
LBB0_10:
	and	x22, x22, #0xffffffff
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [sp, #16]
	ldr	x0, [x8, x22, lsl #3]
	bl	_dma_fence_put
	add	x22, x22, #1
	ldr	w8, [sp, #12]
	cmp	x22, x8
	b.lo	LBB0_11
LBB0_12:
	ldr	x0, [sp, #16]
	bl	_kfree
	ldr	w8, [sp, #12]
	cmp	w8, #0
	ccmp	x19, #0, #8, ne
	cset	w22, ge
	ldr	x0, [sp, #24]
	cbz	x0, LBB0_15
LBB0_13:
	tbnz	x19, #63, LBB0_15
; %bb.14:
	mov	x1, x21
	mov	x2, x19
	bl	_i915_gem_object_wait_fence
	mov	x19, x0
	ldr	x0, [sp, #24]
LBB0_15:
	bl	_dma_fence_put
	cbz	w22, LBB0_20
; %bb.16:
	mov	x0, x20
	bl	_dma_resv_trylock
	cbz	x0, LBB0_20
; %bb.17:
	mov	x0, x20
	mov	w1, #1
	bl	_dma_resv_test_signaled_rcu
	cbz	x0, LBB0_19
; %bb.18:
	mov	x0, x20
	mov	x1, #0
	bl	_dma_resv_add_excl_fence
LBB0_19:
	mov	x0, x20
	bl	_dma_resv_unlock
LBB0_20:
	mov	x0, 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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_I915_WAIT_ALL,4,2              ; @I915_WAIT_ALL
	.no_dead_strip	_i915_gem_object_wait_reservation
.subsections_via_symbols
