	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function await_fence_array
_await_fence_array:                     ## @await_fence_array
	.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	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	8(%rdi), %rax
	movl	(%rax), %r15d
	testq	%r15, %r15
	je	LBB0_7
## %bb.1:
	movq	%rsi, %r12
	xorl	%r14d, %r14d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%r14
	cmpq	%r14, %r15
	je	LBB0_7
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12,%r14,8), %rdi
	leaq	-44(%rbp), %rsi
	movl	$2, %edx
	callq	_ptr_unpack_bits
	movq	_I915_EXEC_FENCE_WAIT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, -44(%rbp)
	je	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, %rdi
	callq	_drm_syncobj_fence_get
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, %rbx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_i915_request_await_dma_fence
	movl	%eax, %r13d
	movq	%rbx, %rdi
	callq	_dma_fence_put
	testl	%r13d, %r13d
	jns	LBB0_6
	jmp	LBB0_8
LBB0_7:
	xorl	%r13d, %r13d
	jmp	LBB0_8
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
LBB0_8:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_I915_EXEC_FENCE_WAIT,4,2       ## @I915_EXEC_FENCE_WAIT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_await_fence_array
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function await_fence_array
_await_fence_array:                     ; @await_fence_array
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	ldr	x8, [x0, #8]
	ldr	w23, [x8]
	cbz	w23, LBB0_6
; %bb.1:
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x24, _I915_EXEC_FENCE_WAIT@GOTPAGE
Lloh1:
	ldr	x24, [x24, _I915_EXEC_FENCE_WAIT@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x19, x19, #8
	subs	x23, x23, #1
	b.eq	LBB0_6
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x19]
	add	x1, sp, #12
	mov	w2, #2
	bl	_ptr_unpack_bits
	ldr	w8, [sp, #12]
	ldr	w9, [x24]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	bl	_drm_syncobj_fence_get
	cbz	x0, LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x22, x0
	ldr	w0, [x20]
	mov	x1, x22
	bl	_i915_request_await_dma_fence
	mov	x21, x0
	mov	x0, x22
	bl	_dma_fence_put
	tbz	w21, #31, LBB0_2
	b	LBB0_8
LBB0_6:
	mov	w21, #0
	b	LBB0_8
LBB0_7:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_8:
	mov	x0, x21
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_I915_EXEC_FENCE_WAIT,4,2       ; @I915_EXEC_FENCE_WAIT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_await_fence_array
.subsections_via_symbols
