	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function a5xx_submit
_a5xx_submit:                           ## @a5xx_submit
	.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	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r15
	movq	%rdi, %r14
	callq	_to_adreno_gpu
	movq	%rax, %rdi
	callq	_to_a5xx_gpu
	movq	%rax, %r13
	movq	(%r14), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	16(%r15), %rbx
	movq	_CONFIG_DRM_MSM_GPU_SUDO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_IS_ENABLED
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	cmpq	$0, 24(%r15)
	je	LBB0_2
## %bb.10:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	$0, (%rax)
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_a5xx_submit_in_rb              ## TAILCALL
LBB0_2:
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movq	_CP_PREEMPT_ENABLE_GLOBAL@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_OUT_PKT7
	movq	%rbx, %rdi
	movl	$2, %esi
	callq	_OUT_RING
	movq	_CP_SET_PROTECTED_MODE@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_OUT_PKT7
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_OUT_RING
	movq	_REG_A5XX_CP_CONTEXT_SWITCH_SAVE_ADDR_LO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$2, %edx
	callq	_OUT_PKT4
	movq	(%r13), %rax
	movq	16(%r15), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %edi
	callq	_lower_32_bits
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_OUT_RING
	movq	(%r13), %rax
	movq	16(%r15), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %edi
	callq	_upper_32_bits
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_OUT_RING
	movl	(%r14), %esi
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_OUT_PKT7
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_OUT_RING
	movl	(%r12), %esi
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_OUT_PKT7
	movq	%rbx, %rdi
	movl	$2, %esi
	callq	_OUT_RING
	movq	_CP_YIELD_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_OUT_PKT7
	movq	%rbx, %rdi
	movl	$2, %esi
	callq	_OUT_RING
	movl	(%r15), %eax
	testl	%eax, %eax
	je	LBB0_9
## %bb.3:
	xorl	%r13d, %r13d
	movq	_CP_INDIRECT_BUFFER_PFE@GOTPCREL(%rip), %r12
	xorl	%r14d, %r14d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	(%r12), %esi
	movq	%rbx, %rdi
	movl	$3, %edx
	callq	_OUT_PKT7
	movq	8(%r15), %rax
	movl	8(%rax,%r13), %edi
	callq	_lower_32_bits
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_OUT_RING
	movq	8(%r15), %rax
	movl	8(%rax,%r13), %edi
	callq	_upper_32_bits
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_OUT_RING
	movq	8(%r15), %rax
	movl	4(%rax,%r13), %esi
	movq	%rbx, %rdi
	callq	_OUT_RING
	movl	(%r15), %eax
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=1
	incq	%r14
	movl	%eax, %ecx
	addq	$12, %r13
	cmpq	%rcx, %r14
	jae	LBB0_9
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %rcx
	movl	(%rcx,%r13), %ecx
	cmpl	$130, %ecx
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpl	$129, %ecx
	jne	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	cmpq	%rcx, (%rdx)
	jne	LBB0_7
	jmp	LBB0_8
LBB0_9:
	movq	_CP_SET_RENDER_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$5, %edx
	callq	_OUT_PKT7
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_OUT_RING
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_OUT_RING
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_OUT_RING
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_OUT_RING
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_OUT_RING
	movq	_CP_YIELD_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_OUT_PKT7
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_OUT_RING
	movl	$2, %edi
	callq	_REG_A5XX_CP_SCRATCH_REG
	movq	%rbx, %rdi
	movl	%eax, %esi
	movl	$1, %edx
	callq	_OUT_PKT4
	movl	4(%r15), %esi
	movq	%rbx, %rdi
	callq	_OUT_RING
	movq	_CP_EVENT_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$4, %edx
	callq	_OUT_PKT7
	movq	_CACHE_FLUSH_TS@GOTPCREL(%rip), %rax
	movl	$-2147483648, %esi              ## imm = 0x80000000
	orl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_OUT_RING
	movq	_fence@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_rbmemptr
	movl	%eax, %edi
	callq	_lower_32_bits
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_OUT_RING
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_rbmemptr
	movl	%eax, %edi
	callq	_upper_32_bits
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_OUT_RING
	movl	4(%r15), %esi
	movq	%rbx, %rdi
	callq	_OUT_RING
	movq	_CP_CONTEXT_SWITCH_YIELD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$4, %edx
	callq	_OUT_PKT7
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_OUT_RING
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_OUT_RING
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_OUT_RING
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_OUT_RING
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_a5xx_flush
	movq	%r14, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_a5xx_preempt_trigger           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_CONFIG_DRM_MSM_GPU_SUDO,4,2    ## @CONFIG_DRM_MSM_GPU_SUDO
	.comm	_CP_PREEMPT_ENABLE_GLOBAL,4,2   ## @CP_PREEMPT_ENABLE_GLOBAL
	.comm	_CP_SET_PROTECTED_MODE,4,2      ## @CP_SET_PROTECTED_MODE
	.comm	_REG_A5XX_CP_CONTEXT_SWITCH_SAVE_ADDR_LO,4,2 ## @REG_A5XX_CP_CONTEXT_SWITCH_SAVE_ADDR_LO
	.comm	_CP_YIELD_ENABLE,4,2            ## @CP_YIELD_ENABLE
	.comm	_CP_INDIRECT_BUFFER_PFE,4,2     ## @CP_INDIRECT_BUFFER_PFE
	.comm	_CP_SET_RENDER_MODE,4,2         ## @CP_SET_RENDER_MODE
	.comm	_CP_EVENT_WRITE,4,2             ## @CP_EVENT_WRITE
	.comm	_CACHE_FLUSH_TS,4,2             ## @CACHE_FLUSH_TS
	.comm	_fence,4,2                      ## @fence
	.comm	_CP_CONTEXT_SWITCH_YIELD,4,2    ## @CP_CONTEXT_SWITCH_YIELD
	.no_dead_strip	_a5xx_submit
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function a5xx_submit
_a5xx_submit:                           ; @a5xx_submit
	.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	x22, x2
	mov	x21, x1
	mov	x19, x0
	bl	_to_adreno_gpu
	bl	_to_a5xx_gpu
	mov	x23, x0
	ldr	x8, [x19]
	ldr	x24, [x8]
	ldr	x20, [x21, #16]
Lloh0:
	adrp	x8, _CONFIG_DRM_MSM_GPU_SUDO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CONFIG_DRM_MSM_GPU_SUDO@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_IS_ENABLED
	cbz	x0, LBB0_3
; %bb.1:
	ldr	x8, [x21, #24]
	cbz	x8, LBB0_3
; %bb.2:
	str	xzr, [x24]
	mov	x0, x19
	mov	x1, x21
	mov	x2, x22
	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	_a5xx_submit_in_rb
LBB0_3:
Lloh3:
	adrp	x25, _CP_PREEMPT_ENABLE_GLOBAL@GOTPAGE
Lloh4:
	ldr	x25, [x25, _CP_PREEMPT_ENABLE_GLOBAL@GOTPAGEOFF]
	ldr	w1, [x25]
	mov	x0, x20
	mov	w2, #1
	bl	_OUT_PKT7
	mov	x0, x20
	mov	w1, #2
	bl	_OUT_RING
Lloh5:
	adrp	x26, _CP_SET_PROTECTED_MODE@GOTPAGE
Lloh6:
	ldr	x26, [x26, _CP_SET_PROTECTED_MODE@GOTPAGEOFF]
	ldr	w1, [x26]
	mov	x0, x20
	mov	w2, #1
	bl	_OUT_PKT7
	mov	x0, x20
	mov	w1, #0
	bl	_OUT_RING
Lloh7:
	adrp	x8, _REG_A5XX_CP_CONTEXT_SWITCH_SAVE_ADDR_LO@GOTPAGE
Lloh8:
	ldr	x8, [x8, _REG_A5XX_CP_CONTEXT_SWITCH_SAVE_ADDR_LO@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #2
	bl	_OUT_PKT4
	ldr	x8, [x23]
	ldr	x9, [x21, #16]
	ldr	x9, [x9]
	ldr	w0, [x8, x9, lsl #2]
	bl	_lower_32_bits
	mov	x1, x0
	mov	x0, x20
	bl	_OUT_RING
	ldr	x8, [x23]
	ldr	x9, [x21, #16]
	ldr	x9, [x9]
	ldr	w0, [x8, x9, lsl #2]
	bl	_upper_32_bits
	mov	x1, x0
	mov	x0, x20
	bl	_OUT_RING
	ldr	w1, [x26]
	mov	x0, x20
	mov	w2, #1
	bl	_OUT_PKT7
	mov	x0, x20
	mov	w1, #1
	bl	_OUT_RING
	ldr	w1, [x25]
	mov	x0, x20
	mov	w2, #1
	bl	_OUT_PKT7
	mov	x0, x20
	mov	w1, #2
	bl	_OUT_RING
Lloh10:
	adrp	x23, _CP_YIELD_ENABLE@GOTPAGE
Lloh11:
	ldr	x23, [x23, _CP_YIELD_ENABLE@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x20
	mov	w2, #1
	bl	_OUT_PKT7
	mov	x0, x20
	mov	w1, #2
	bl	_OUT_RING
	ldr	w8, [x21]
	cbz	w8, LBB0_10
; %bb.4:
	mov	x25, #0
	mov	x26, #0
Lloh12:
	adrp	x27, _CP_INDIRECT_BUFFER_PFE@GOTPAGE
Lloh13:
	ldr	x27, [x27, _CP_INDIRECT_BUFFER_PFE@GOTPAGEOFF]
	b	LBB0_7
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=1
	ldr	w1, [x27]
	mov	x0, x20
	mov	w2, #3
	bl	_OUT_PKT7
	ldr	x8, [x21, #8]
	add	x8, x8, x25
	ldr	w0, [x8, #8]
	bl	_lower_32_bits
	mov	x1, x0
	mov	x0, x20
	bl	_OUT_RING
	ldr	x8, [x21, #8]
	add	x8, x8, x25
	ldr	w0, [x8, #8]
	bl	_upper_32_bits
	mov	x1, x0
	mov	x0, x20
	bl	_OUT_RING
	ldr	x8, [x21, #8]
	add	x8, x8, x25
	ldr	w1, [x8, #4]
	mov	x0, x20
	bl	_OUT_RING
	ldr	w8, [x21]
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	x26, x26, #1
	add	x25, x25, #12
	cmp	x26, w8, uxtw
	b.hs	LBB0_10
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x21, #8]
	ldr	w9, [x9, x25]
	cmp	w9, #130
	b.eq	LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	cmp	w9, #129
	b.ne	LBB0_6
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x9, [x24]
	cmp	x9, x22
	b.ne	LBB0_5
	b	LBB0_6
LBB0_10:
Lloh14:
	adrp	x8, _CP_SET_RENDER_MODE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _CP_SET_RENDER_MODE@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #5
	bl	_OUT_PKT7
	mov	x0, x20
	mov	w1, #0
	bl	_OUT_RING
	mov	x0, x20
	mov	w1, #0
	bl	_OUT_RING
	mov	x0, x20
	mov	w1, #0
	bl	_OUT_RING
	mov	x0, x20
	mov	w1, #0
	bl	_OUT_RING
	mov	x0, x20
	mov	w1, #0
	bl	_OUT_RING
	ldr	w1, [x23]
	mov	x0, x20
	mov	w2, #1
	bl	_OUT_PKT7
	mov	x0, x20
	mov	w1, #1
	bl	_OUT_RING
	mov	w0, #2
	bl	_REG_A5XX_CP_SCRATCH_REG
	mov	x1, x0
	mov	x0, x20
	mov	w2, #1
	bl	_OUT_PKT4
	ldr	w1, [x21, #4]
	mov	x0, x20
	bl	_OUT_RING
Lloh17:
	adrp	x8, _CP_EVENT_WRITE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _CP_EVENT_WRITE@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #4
	bl	_OUT_PKT7
Lloh20:
	adrp	x8, _CACHE_FLUSH_TS@GOTPAGE
Lloh21:
	ldr	x8, [x8, _CACHE_FLUSH_TS@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	orr	w1, w8, #0x80000000
	mov	x0, x20
	bl	_OUT_RING
Lloh23:
	adrp	x22, _fence@GOTPAGE
Lloh24:
	ldr	x22, [x22, _fence@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x20
	bl	_rbmemptr
	bl	_lower_32_bits
	mov	x1, x0
	mov	x0, x20
	bl	_OUT_RING
	ldr	w1, [x22]
	mov	x0, x20
	bl	_rbmemptr
	bl	_upper_32_bits
	mov	x1, x0
	mov	x0, x20
	bl	_OUT_RING
	ldr	w1, [x21, #4]
	mov	x0, x20
	bl	_OUT_RING
Lloh25:
	adrp	x8, _CP_CONTEXT_SWITCH_YIELD@GOTPAGE
Lloh26:
	ldr	x8, [x8, _CP_CONTEXT_SWITCH_YIELD@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #4
	bl	_OUT_PKT7
	mov	x0, x20
	mov	w1, #0
	bl	_OUT_RING
	mov	x0, x20
	mov	w1, #0
	bl	_OUT_RING
	mov	x0, x20
	mov	w1, #1
	bl	_OUT_RING
	mov	x0, x20
	mov	w1, #1
	bl	_OUT_RING
	mov	x0, x19
	mov	x1, x20
	bl	_a5xx_flush
	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	_a5xx_preempt_trigger
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_CONFIG_DRM_MSM_GPU_SUDO,4,2    ; @CONFIG_DRM_MSM_GPU_SUDO
	.comm	_CP_PREEMPT_ENABLE_GLOBAL,4,2   ; @CP_PREEMPT_ENABLE_GLOBAL
	.comm	_CP_SET_PROTECTED_MODE,4,2      ; @CP_SET_PROTECTED_MODE
	.comm	_REG_A5XX_CP_CONTEXT_SWITCH_SAVE_ADDR_LO,4,2 ; @REG_A5XX_CP_CONTEXT_SWITCH_SAVE_ADDR_LO
	.comm	_CP_YIELD_ENABLE,4,2            ; @CP_YIELD_ENABLE
	.comm	_CP_INDIRECT_BUFFER_PFE,4,2     ; @CP_INDIRECT_BUFFER_PFE
	.comm	_CP_SET_RENDER_MODE,4,2         ; @CP_SET_RENDER_MODE
	.comm	_CP_EVENT_WRITE,4,2             ; @CP_EVENT_WRITE
	.comm	_CACHE_FLUSH_TS,4,2             ; @CACHE_FLUSH_TS
	.comm	_fence,4,2                      ; @fence
	.comm	_CP_CONTEXT_SWITCH_YIELD,4,2    ; @CP_CONTEXT_SWITCH_YIELD
	.no_dead_strip	_a5xx_submit
.subsections_via_symbols
