	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function a5xx_submit_in_rb
_a5xx_submit_in_rb:                     ## @a5xx_submit_in_rb
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r15
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	24(%rsi), %rbx
	movl	(%rsi), %eax
	testl	%eax, %eax
	je	LBB0_11
## %bb.1:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	xorl	%r12d, %r12d
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rdi
	callq	_msm_gem_put_vaddr
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	movl	(%r15), %eax
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	incl	%r12d
	cmpl	%eax, %r12d
	jae	LBB0_11
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_8 Depth 2
	movq	8(%r15), %rcx
	movl	%r12d, %edx
	leaq	(%rdx,%rdx,2), %rdx
	movl	(%rcx,%rdx,8), %esi
	cmpl	$130, %esi
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$129, %esi
	jne	LBB0_10
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	cmpq	%rsi, (%rdi)
	je	LBB0_10
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	16(%r15), %rax
	movq	8(%rcx,%rdx,8), %rsi
	movq	(%rax,%rsi,8), %r13
	movl	16(%rcx,%rdx,8), %r12d
	movq	%r13, %rdi
	callq	_msm_gem_get_vaddr
	movq	%rax, %r14
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_WARN_ON
	testl	%eax, %eax
	jne	LBB0_12
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	testl	%r12d, %r12d
	je	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_8:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_adreno_wait_ring
	movl	(%r14,%r15,4), %esi
	movq	%rbx, %rdi
	callq	_OUT_RING
	incq	%r15
	cmpq	%r15, %r12
	jne	LBB0_8
	jmp	LBB0_9
LBB0_11:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_a5xx_flush
	movq	%r14, %rdi
	callq	_a5xx_preempt_trigger
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_a5xx_idle
	movl	4(%r15), %eax
	movq	(%rbx), %rcx
	movl	%eax, (%rcx)
	movq	%r14, %rdi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_msm_gpu_retire                 ## TAILCALL
LBB0_12:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_a5xx_submit_in_rb
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function a5xx_submit_in_rb
_a5xx_submit_in_rb:                     ; @a5xx_submit_in_rb
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x20, x1
	mov	x19, x0
	ldr	x21, [x1, #24]
	ldr	w8, [x1]
	cbz	w8, LBB0_11
; %bb.1:
	mov	x22, x2
	mov	w27, #0
	ldr	x9, [x19]
	ldr	x25, [x9]
	mov	w26, #24
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x23
	bl	_msm_gem_put_vaddr
	ldr	w8, [x20]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	w27, w27, #1
	cmp	w27, w8
	b.hs	LBB0_11
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_10 Depth 2
	ldr	x9, [x20, #8]
	umull	x10, w27, w26
	ldr	w10, [x9, x10]
	cmp	w10, #130
	b.eq	LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	w10, #129
	b.ne	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x10, [x25]
	cmp	x10, x22
	b.eq	LBB0_3
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	w8, w27
	ldr	x10, [x20, #16]
	madd	x8, x8, x26, x9
	ldr	x9, [x8, #8]
	ldr	x23, [x10, x9, lsl #3]
	ldr	w27, [x8, #16]
	mov	x0, x23
	bl	_msm_gem_get_vaddr
	mov	x24, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_WARN_ON
	cbnz	w0, LBB0_12
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	cbz	w27, LBB0_2
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x28, x27
LBB0_10:                                ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x21
	mov	w1, #1
	bl	_adreno_wait_ring
	ldr	w1, [x24], #4
	mov	x0, x21
	bl	_OUT_RING
	subs	x28, x28, #1
	b.ne	LBB0_10
	b	LBB0_2
LBB0_11:
	mov	x0, x19
	mov	x1, x21
	bl	_a5xx_flush
	mov	x0, x19
	bl	_a5xx_preempt_trigger
	mov	x0, x19
	mov	x1, x21
	bl	_a5xx_idle
	ldr	w8, [x20, #4]
	ldr	x9, [x21]
	str	w8, [x9]
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_msm_gpu_retire
LBB0_12:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_a5xx_submit_in_rb
.subsections_via_symbols
