	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function a6xx_submit
_a6xx_submit:                           ## @a6xx_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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -80(%rbp)                 ## 8-byte Spill
	movq	%rsi, %rbx
	movl	(%rsi), %eax
	movq	_MSM_GPU_SUBMIT_STATS_COUNT@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	divl	(%rcx)
	movl	%edx, %r12d
	movq	(%rdi), %rax
	movq	(%rax), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	callq	_to_adreno_gpu
	movq	%rax, %rdi
	callq	_to_a6xx_gpu
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	16(%rbx), %r15
	movq	_REG_A6XX_RBBM_PERFCTR_CP_0_LO@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	movq	_cpcycles_start@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	%r12d, %esi
	callq	_rbmemptr_stats
	movq	%r15, %rdi
	movq	%r14, %rsi
	movl	%eax, %edx
	callq	_get_stats_counter
	movq	_REG_A6XX_GMU_ALWAYS_ON_COUNTER_L@GOTPCREL(%rip), %rax
	movl	$108544, %ecx                   ## imm = 0x1A800
	movq	(%rax), %r13
	addq	%rcx, %r13
	movq	_alwayson_start@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	movl	%r12d, %esi
	callq	_rbmemptr_stats
	movq	%r15, %rdi
	movq	%r13, %rsi
	movl	%eax, %edx
	callq	_get_stats_counter
	movq	_CP_EVENT_WRITE@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%r15, %rdi
	movl	$1, %edx
	callq	_OUT_PKT7
	movq	_PC_CCU_INVALIDATE_DEPTH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_OUT_RING
	movl	(%r14), %esi
	movq	%r15, %rdi
	movl	$1, %edx
	callq	_OUT_PKT7
	movq	_PC_CCU_INVALIDATE_COLOR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_OUT_RING
	movl	4(%rbx), %eax
	testl	%eax, %eax
	je	LBB0_7
## %bb.1:
	xorl	%r13d, %r13d
	movq	_CP_INDIRECT_BUFFER_PFE@GOTPCREL(%rip), %r14
	xorl	%r12d, %r12d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r14), %esi
	movq	%r15, %rdi
	movl	$3, %edx
	callq	_OUT_PKT7
	movq	8(%rbx), %rax
	movl	8(%rax,%r13), %edi
	callq	_lower_32_bits
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_OUT_RING
	movq	8(%rbx), %rax
	movl	8(%rax,%r13), %edi
	callq	_upper_32_bits
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_OUT_RING
	movq	8(%rbx), %rax
	movl	4(%rax,%r13), %esi
	movq	%r15, %rdi
	callq	_OUT_RING
	movl	4(%rbx), %eax
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%r12
	movl	%eax, %ecx
	addq	$12, %r13
	cmpq	%rcx, %r12
	jae	LBB0_7
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%rbx), %rcx
	movl	(%rcx,%r13), %ecx
	cmpl	$130, %ecx
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$129, %ecx
	jne	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	cmpq	%rcx, (%rdx)
	jne	LBB0_5
	jmp	LBB0_6
LBB0_7:
	movq	_REG_A6XX_RBBM_PERFCTR_CP_0_LO@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	movq	_cpcycles_end@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	movl	%r14d, %esi
	callq	_rbmemptr_stats
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	%eax, %edx
	callq	_get_stats_counter
	movq	_REG_A6XX_GMU_ALWAYS_ON_COUNTER_L@GOTPCREL(%rip), %r12
	movl	$108544, %r13d                  ## imm = 0x1A800
	addq	(%r12), %r13
	movq	_alwayson_end@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_rbmemptr_stats
	movq	%r15, %rdi
	movq	%r13, %rsi
	movl	%eax, %edx
	callq	_get_stats_counter
	movl	$2, %edi
	callq	_REG_A6XX_CP_SCRATCH_REG
	movq	%r15, %rdi
	movl	%eax, %esi
	movl	$1, %edx
	callq	_OUT_PKT4
	movl	(%rbx), %esi
	movq	%r15, %rdi
	callq	_OUT_RING
	movq	_CP_EVENT_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$4, %edx
	callq	_OUT_PKT7
	movq	_CACHE_FLUSH_TS@GOTPCREL(%rip), %rax
	movl	$-2147483648, %esi              ## imm = 0x80000000
	orl	(%rax), %esi
	movq	%r15, %rdi
	callq	_OUT_RING
	movq	_fence@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%r15, %rdi
	callq	_rbmemptr
	movl	%eax, %edi
	callq	_lower_32_bits
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_OUT_RING
	movl	(%r14), %esi
	movq	%r15, %rdi
	callq	_rbmemptr
	movl	%eax, %edi
	callq	_upper_32_bits
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_OUT_RING
	movl	(%rbx), %esi
	movq	%r15, %rdi
	callq	_OUT_RING
	movq	(%r12), %rsi
	movq	_REG_A6XX_GMU_ALWAYS_ON_COUNTER_H@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_gmu_read64
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_trace_msm_gpu_submit_flush
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %rsi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_a6xx_flush                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MSM_GPU_SUBMIT_STATS_COUNT,4,2 ## @MSM_GPU_SUBMIT_STATS_COUNT
	.comm	_REG_A6XX_RBBM_PERFCTR_CP_0_LO,8,3 ## @REG_A6XX_RBBM_PERFCTR_CP_0_LO
	.comm	_cpcycles_start,4,2             ## @cpcycles_start
	.comm	_REG_A6XX_GMU_ALWAYS_ON_COUNTER_L,8,3 ## @REG_A6XX_GMU_ALWAYS_ON_COUNTER_L
	.comm	_alwayson_start,4,2             ## @alwayson_start
	.comm	_CP_EVENT_WRITE,4,2             ## @CP_EVENT_WRITE
	.comm	_PC_CCU_INVALIDATE_DEPTH,4,2    ## @PC_CCU_INVALIDATE_DEPTH
	.comm	_PC_CCU_INVALIDATE_COLOR,4,2    ## @PC_CCU_INVALIDATE_COLOR
	.comm	_CP_INDIRECT_BUFFER_PFE,4,2     ## @CP_INDIRECT_BUFFER_PFE
	.comm	_cpcycles_end,4,2               ## @cpcycles_end
	.comm	_alwayson_end,4,2               ## @alwayson_end
	.comm	_CACHE_FLUSH_TS,4,2             ## @CACHE_FLUSH_TS
	.comm	_fence,4,2                      ## @fence
	.comm	_REG_A6XX_GMU_ALWAYS_ON_COUNTER_H,4,2 ## @REG_A6XX_GMU_ALWAYS_ON_COUNTER_H
	.no_dead_strip	_a6xx_submit
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function a6xx_submit
_a6xx_submit:                           ; @a6xx_submit
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x24, x2
	mov	x20, x1
	mov	x19, x0
	mov	w22, #43008
	movk	w22, #1, lsl #16
Lloh0:
	adrp	x8, _MSM_GPU_SUBMIT_STATS_COUNT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MSM_GPU_SUBMIT_STATS_COUNT@GOTPAGEOFF]
	ldr	w9, [x1]
Lloh2:
	ldr	w8, [x8]
	udiv	w10, w9, w8
	msub	w23, w10, w8, w9
	ldr	x8, [x0]
	ldr	x28, [x8]
	bl	_to_adreno_gpu
	bl	_to_a6xx_gpu
	str	x0, [sp, #8]                    ; 8-byte Folded Spill
	ldr	x21, [x20, #16]
Lloh3:
	adrp	x8, _REG_A6XX_RBBM_PERFCTR_CP_0_LO@GOTPAGE
Lloh4:
	ldr	x8, [x8, _REG_A6XX_RBBM_PERFCTR_CP_0_LO@GOTPAGEOFF]
Lloh5:
	ldr	x25, [x8]
Lloh6:
	adrp	x8, _cpcycles_start@GOTPAGE
Lloh7:
	ldr	x8, [x8, _cpcycles_start@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x0, x21
	mov	x1, x23
	bl	_rbmemptr_stats
	mov	x2, x0
	mov	x0, x21
	mov	x1, x25
	bl	_get_stats_counter
Lloh9:
	adrp	x8, _REG_A6XX_GMU_ALWAYS_ON_COUNTER_L@GOTPAGE
Lloh10:
	ldr	x8, [x8, _REG_A6XX_GMU_ALWAYS_ON_COUNTER_L@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	add	x25, x8, x22
Lloh12:
	adrp	x8, _alwayson_start@GOTPAGE
Lloh13:
	ldr	x8, [x8, _alwayson_start@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	mov	x0, x21
	mov	x1, x23
	bl	_rbmemptr_stats
	mov	x2, x0
	mov	x0, x21
	mov	x1, x25
	bl	_get_stats_counter
Lloh15:
	adrp	x25, _CP_EVENT_WRITE@GOTPAGE
Lloh16:
	ldr	x25, [x25, _CP_EVENT_WRITE@GOTPAGEOFF]
	ldr	w1, [x25]
	mov	x0, x21
	mov	w2, #1
	bl	_OUT_PKT7
Lloh17:
	adrp	x8, _PC_CCU_INVALIDATE_DEPTH@GOTPAGE
Lloh18:
	ldr	x8, [x8, _PC_CCU_INVALIDATE_DEPTH@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_OUT_RING
	ldr	w1, [x25]
	mov	x0, x21
	mov	w2, #1
	bl	_OUT_PKT7
Lloh20:
	adrp	x8, _PC_CCU_INVALIDATE_COLOR@GOTPAGE
Lloh21:
	ldr	x8, [x8, _PC_CCU_INVALIDATE_COLOR@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_OUT_RING
	ldr	w8, [x20, #4]
	cbz	w8, LBB0_7
; %bb.1:
	mov	x27, #0
	mov	x26, #0
Lloh23:
	adrp	x22, _CP_INDIRECT_BUFFER_PFE@GOTPAGE
Lloh24:
	ldr	x22, [x22, _CP_INDIRECT_BUFFER_PFE@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w1, [x22]
	mov	x0, x21
	mov	w2, #3
	bl	_OUT_PKT7
	ldr	x8, [x20, #8]
	add	x8, x8, x27
	ldr	w0, [x8, #8]
	bl	_lower_32_bits
	mov	x1, x0
	mov	x0, x21
	bl	_OUT_RING
	ldr	x8, [x20, #8]
	add	x8, x8, x27
	ldr	w0, [x8, #8]
	bl	_upper_32_bits
	mov	x1, x0
	mov	x0, x21
	bl	_OUT_RING
	ldr	x8, [x20, #8]
	add	x8, x8, x27
	ldr	w1, [x8, #4]
	mov	x0, x21
	bl	_OUT_RING
	ldr	w8, [x20, #4]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x26, x26, #1
	add	x27, x27, #12
	cmp	x26, w8, uxtw
	b.hs	LBB0_7
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x20, #8]
	ldr	w9, [x9, x27]
	cmp	w9, #130
	b.eq	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	w9, #129
	b.ne	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x9, [x28]
	cmp	x9, x24
	b.ne	LBB0_2
	b	LBB0_3
LBB0_7:
Lloh25:
	adrp	x8, _REG_A6XX_RBBM_PERFCTR_CP_0_LO@GOTPAGE
Lloh26:
	ldr	x8, [x8, _REG_A6XX_RBBM_PERFCTR_CP_0_LO@GOTPAGEOFF]
Lloh27:
	ldr	x24, [x8]
Lloh28:
	adrp	x8, _cpcycles_end@GOTPAGE
Lloh29:
	ldr	x8, [x8, _cpcycles_end@GOTPAGEOFF]
Lloh30:
	ldr	w2, [x8]
	mov	x0, x21
	mov	x1, x23
	bl	_rbmemptr_stats
	mov	x2, x0
	mov	x0, x21
	mov	x1, x24
	bl	_get_stats_counter
Lloh31:
	adrp	x26, _REG_A6XX_GMU_ALWAYS_ON_COUNTER_L@GOTPAGE
Lloh32:
	ldr	x26, [x26, _REG_A6XX_GMU_ALWAYS_ON_COUNTER_L@GOTPAGEOFF]
	ldr	x8, [x26]
	mov	w9, #43008
	movk	w9, #1, lsl #16
	add	x24, x8, x9
Lloh33:
	adrp	x8, _alwayson_end@GOTPAGE
Lloh34:
	ldr	x8, [x8, _alwayson_end@GOTPAGEOFF]
Lloh35:
	ldr	w2, [x8]
	mov	x0, x21
	mov	x1, x23
	bl	_rbmemptr_stats
	mov	x2, x0
	mov	x0, x21
	mov	x1, x24
	bl	_get_stats_counter
	mov	w0, #2
	bl	_REG_A6XX_CP_SCRATCH_REG
	mov	x1, x0
	mov	x0, x21
	mov	w2, #1
	bl	_OUT_PKT4
	ldr	w1, [x20]
	mov	x0, x21
	bl	_OUT_RING
	ldr	w1, [x25]
	mov	x0, x21
	mov	w2, #4
	bl	_OUT_PKT7
Lloh36:
	adrp	x8, _CACHE_FLUSH_TS@GOTPAGE
Lloh37:
	ldr	x8, [x8, _CACHE_FLUSH_TS@GOTPAGEOFF]
Lloh38:
	ldr	w8, [x8]
	orr	w1, w8, #0x80000000
	mov	x0, x21
	bl	_OUT_RING
Lloh39:
	adrp	x22, _fence@GOTPAGE
Lloh40:
	ldr	x22, [x22, _fence@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x21
	bl	_rbmemptr
	bl	_lower_32_bits
	mov	x1, x0
	mov	x0, x21
	bl	_OUT_RING
	ldr	w1, [x22]
	mov	x0, x21
	bl	_rbmemptr
	bl	_upper_32_bits
	mov	x1, x0
	mov	x0, x21
	bl	_OUT_RING
	ldr	w1, [x20]
	mov	x0, x21
	bl	_OUT_RING
	ldr	x1, [x26]
Lloh41:
	adrp	x8, _REG_A6XX_GMU_ALWAYS_ON_COUNTER_H@GOTPAGE
Lloh42:
	ldr	x8, [x8, _REG_A6XX_GMU_ALWAYS_ON_COUNTER_H@GOTPAGEOFF]
Lloh43:
	ldr	w2, [x8]
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
	bl	_gmu_read64
	mov	x1, x0
	mov	x0, x20
	bl	_trace_msm_gpu_submit_flush
	mov	x0, x19
	mov	x1, x21
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_a6xx_flush
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGot	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_MSM_GPU_SUBMIT_STATS_COUNT,4,2 ; @MSM_GPU_SUBMIT_STATS_COUNT
	.comm	_REG_A6XX_RBBM_PERFCTR_CP_0_LO,8,3 ; @REG_A6XX_RBBM_PERFCTR_CP_0_LO
	.comm	_cpcycles_start,4,2             ; @cpcycles_start
	.comm	_REG_A6XX_GMU_ALWAYS_ON_COUNTER_L,8,3 ; @REG_A6XX_GMU_ALWAYS_ON_COUNTER_L
	.comm	_alwayson_start,4,2             ; @alwayson_start
	.comm	_CP_EVENT_WRITE,4,2             ; @CP_EVENT_WRITE
	.comm	_PC_CCU_INVALIDATE_DEPTH,4,2    ; @PC_CCU_INVALIDATE_DEPTH
	.comm	_PC_CCU_INVALIDATE_COLOR,4,2    ; @PC_CCU_INVALIDATE_COLOR
	.comm	_CP_INDIRECT_BUFFER_PFE,4,2     ; @CP_INDIRECT_BUFFER_PFE
	.comm	_cpcycles_end,4,2               ; @cpcycles_end
	.comm	_alwayson_end,4,2               ; @alwayson_end
	.comm	_CACHE_FLUSH_TS,4,2             ; @CACHE_FLUSH_TS
	.comm	_fence,4,2                      ; @fence
	.comm	_REG_A6XX_GMU_ALWAYS_ON_COUNTER_H,4,2 ; @REG_A6XX_GMU_ALWAYS_ON_COUNTER_H
	.no_dead_strip	_a6xx_submit
.subsections_via_symbols
