	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function etnaviv_sched_dependency
_etnaviv_sched_dependency:              ## @etnaviv_sched_dependency
	.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
	callq	_to_etnaviv_submit
	movq	%rax, %r14
	movq	16(%rax), %rdi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	16(%r14), %rbx
	movq	$0, 16(%r14)
	movq	%rbx, %rdi
	callq	_dma_fence_is_signaled
	testl	%eax, %eax
	je	LBB0_16
## %bb.2:
	movq	%rbx, %rdi
	callq	_dma_fence_put
LBB0_3:
	cmpl	$0, (%r14)
	jle	LBB0_15
## %bb.4:
	xorl	%r15d, %r15d
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	8(%rbx,%r13,8), %rdi
	callq	_kfree
	movl	$0, (%r14)
	movq	$0, 8(%rbx,%r13,8)
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	incq	%r15
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movslq	(%r14), %rax
	cmpq	%rax, %r15
	jge	LBB0_15
LBB0_5:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_10 Depth 2
	movq	8(%r14), %r12
	leaq	(%r15,%r15,2), %r13
	movq	16(%r12,%r13,8), %rbx
	testq	%rbx, %rbx
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	leaq	(%r12,%r13,8), %rax
	addq	$16, %rax
	movq	$0, (%rax)
	movq	%rbx, %rdi
	callq	_dma_fence_is_signaled
	testl	%eax, %eax
	je	LBB0_16
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%rbx, %rdi
	callq	_dma_fence_put
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	leaq	(%r12,%r13,8), %r14
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	movl	(%r12,%r13,8), %eax
	testl	%eax, %eax
	jle	LBB0_14
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%r13,8), %r15
	addq	$8, %r15
	xorl	%r12d, %r12d
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_10 Depth=2
	incq	%r12
	movslq	%eax, %rcx
	cmpq	%rcx, %r12
	jge	LBB0_14
LBB0_10:                                ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%r15), %rcx
	movq	(%rcx,%r12,8), %rbx
	testq	%rbx, %rbx
	je	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=2
	movq	$0, (%rcx,%r12,8)
	movq	%rbx, %rdi
	callq	_dma_fence_is_signaled
	testl	%eax, %eax
	je	LBB0_16
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=2
	movq	%rbx, %rdi
	callq	_dma_fence_put
	movl	(%r14), %eax
	jmp	LBB0_13
LBB0_15:
	xorl	%ebx, %ebx
LBB0_16:
	movq	%rbx, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_etnaviv_sched_dependency
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function etnaviv_sched_dependency
_etnaviv_sched_dependency:              ; @etnaviv_sched_dependency
	.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
	bl	_to_etnaviv_submit
	mov	x19, x0
	ldr	x0, [x0, #16]
	bl	_unlikely
	cbz	x0, LBB0_3
; %bb.1:
	ldr	x20, [x19, #16]
	str	xzr, [x19, #16]
	mov	x0, x20
	bl	_dma_fence_is_signaled
	cbz	w0, LBB0_16
; %bb.2:
	mov	x0, x20
	bl	_dma_fence_put
LBB0_3:
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_15
; %bb.4:
	mov	x21, #0
	mov	w22, #24
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	madd	x20, x21, x22, x23
	ldr	x0, [x20, #8]
	bl	_kfree
	str	wzr, [x24]
	str	xzr, [x20, #8]
	add	x21, x21, #1
	ldrsw	x8, [x19]
	cmp	x21, x8
	b.ge	LBB0_15
LBB0_6:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_12 Depth 2
	ldr	x23, [x19, #8]
	madd	x8, x21, x22, x23
	ldr	x20, [x8, #16]!
	cbz	x20, LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	str	xzr, [x8]
	mov	x0, x20
	bl	_dma_fence_is_signaled
	cbz	w0, LBB0_16
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x20
	bl	_dma_fence_put
LBB0_9:                                 ;   in Loop: Header=BB0_6 Depth=1
	madd	x24, x21, x22, x23
	ldr	w8, [x24]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	x25, #0
	madd	x9, x21, x22, x23
	add	x26, x9, #8
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=2
	add	x25, x25, #1
	cmp	x25, w8, sxtw
	b.ge	LBB0_5
LBB0_12:                                ;   Parent Loop BB0_6 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x9, [x26]
	ldr	x20, [x9, x25, lsl #3]
	cbz	x20, LBB0_11
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=2
	str	xzr, [x9, x25, lsl #3]
	mov	x0, x20
	bl	_dma_fence_is_signaled
	cbz	w0, LBB0_16
; %bb.14:                               ;   in Loop: Header=BB0_12 Depth=2
	mov	x0, x20
	bl	_dma_fence_put
	ldr	w8, [x24]
	b	LBB0_11
LBB0_15:
	mov	x20, #0
LBB0_16:
	mov	x0, x20
	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
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_etnaviv_sched_dependency
.subsections_via_symbols
