	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function debugbus_read
_debugbus_read:                         ## @debugbus_read
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movl	%esi, %r12d
	movq	%rdi, %r15
	movl	%edx, %edi
	callq	_A6XX_DBGC_CFG_DBGBUS_SEL_D_PING_INDEX
	movl	%eax, %ebx
	movl	%r12d, %edi
	callq	_A6XX_DBGC_CFG_DBGBUS_SEL_D_PING_BLK_SEL
	orl	%eax, %ebx
	movq	_REG_A6XX_DBGC_CFG_DBGBUS_SEL_A@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_gpu_write
	movq	_REG_A6XX_DBGC_CFG_DBGBUS_SEL_B@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_gpu_write
	movq	_REG_A6XX_DBGC_CFG_DBGBUS_SEL_C@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_gpu_write
	movq	_REG_A6XX_DBGC_CFG_DBGBUS_SEL_D@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_gpu_write
	movl	$1, %edi
	callq	_udelay
	movq	_REG_A6XX_DBGC_CFG_DBGBUS_TRACE_BUF2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_gpu_read
	movl	%eax, (%r14)
	movq	_REG_A6XX_DBGC_CFG_DBGBUS_TRACE_BUF1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_gpu_read
	movl	%eax, 4(%r14)
	movl	$2, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_A6XX_DBGC_CFG_DBGBUS_SEL_A,4,2 ## @REG_A6XX_DBGC_CFG_DBGBUS_SEL_A
	.comm	_REG_A6XX_DBGC_CFG_DBGBUS_SEL_B,4,2 ## @REG_A6XX_DBGC_CFG_DBGBUS_SEL_B
	.comm	_REG_A6XX_DBGC_CFG_DBGBUS_SEL_C,4,2 ## @REG_A6XX_DBGC_CFG_DBGBUS_SEL_C
	.comm	_REG_A6XX_DBGC_CFG_DBGBUS_SEL_D,4,2 ## @REG_A6XX_DBGC_CFG_DBGBUS_SEL_D
	.comm	_REG_A6XX_DBGC_CFG_DBGBUS_TRACE_BUF2,4,2 ## @REG_A6XX_DBGC_CFG_DBGBUS_TRACE_BUF2
	.comm	_REG_A6XX_DBGC_CFG_DBGBUS_TRACE_BUF1,4,2 ## @REG_A6XX_DBGC_CFG_DBGBUS_TRACE_BUF1
	.no_dead_strip	_debugbus_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function debugbus_read
_debugbus_read:                         ; @debugbus_read
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x3
	mov	x21, x1
	mov	x20, x0
	mov	x0, x2
	bl	_A6XX_DBGC_CFG_DBGBUS_SEL_D_PING_INDEX
	mov	x22, x0
	mov	x0, x21
	bl	_A6XX_DBGC_CFG_DBGBUS_SEL_D_PING_BLK_SEL
	orr	w21, w0, w22
Lloh0:
	adrp	x8, _REG_A6XX_DBGC_CFG_DBGBUS_SEL_A@GOTPAGE
Lloh1:
	ldr	x8, [x8, _REG_A6XX_DBGC_CFG_DBGBUS_SEL_A@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, x21
	bl	_gpu_write
Lloh3:
	adrp	x8, _REG_A6XX_DBGC_CFG_DBGBUS_SEL_B@GOTPAGE
Lloh4:
	ldr	x8, [x8, _REG_A6XX_DBGC_CFG_DBGBUS_SEL_B@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, x21
	bl	_gpu_write
Lloh6:
	adrp	x8, _REG_A6XX_DBGC_CFG_DBGBUS_SEL_C@GOTPAGE
Lloh7:
	ldr	x8, [x8, _REG_A6XX_DBGC_CFG_DBGBUS_SEL_C@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, x21
	bl	_gpu_write
Lloh9:
	adrp	x8, _REG_A6XX_DBGC_CFG_DBGBUS_SEL_D@GOTPAGE
Lloh10:
	ldr	x8, [x8, _REG_A6XX_DBGC_CFG_DBGBUS_SEL_D@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, x21
	bl	_gpu_write
	mov	w0, #1
	bl	_udelay
Lloh12:
	adrp	x8, _REG_A6XX_DBGC_CFG_DBGBUS_TRACE_BUF2@GOTPAGE
Lloh13:
	ldr	x8, [x8, _REG_A6XX_DBGC_CFG_DBGBUS_TRACE_BUF2@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_gpu_read
	str	w0, [x19]
Lloh15:
	adrp	x8, _REG_A6XX_DBGC_CFG_DBGBUS_TRACE_BUF1@GOTPAGE
Lloh16:
	ldr	x8, [x8, _REG_A6XX_DBGC_CFG_DBGBUS_TRACE_BUF1@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_gpu_read
	str	w0, [x19, #4]
	mov	w0, #2
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.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
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_A6XX_DBGC_CFG_DBGBUS_SEL_A,4,2 ; @REG_A6XX_DBGC_CFG_DBGBUS_SEL_A
	.comm	_REG_A6XX_DBGC_CFG_DBGBUS_SEL_B,4,2 ; @REG_A6XX_DBGC_CFG_DBGBUS_SEL_B
	.comm	_REG_A6XX_DBGC_CFG_DBGBUS_SEL_C,4,2 ; @REG_A6XX_DBGC_CFG_DBGBUS_SEL_C
	.comm	_REG_A6XX_DBGC_CFG_DBGBUS_SEL_D,4,2 ; @REG_A6XX_DBGC_CFG_DBGBUS_SEL_D
	.comm	_REG_A6XX_DBGC_CFG_DBGBUS_TRACE_BUF2,4,2 ; @REG_A6XX_DBGC_CFG_DBGBUS_TRACE_BUF2
	.comm	_REG_A6XX_DBGC_CFG_DBGBUS_TRACE_BUF1,4,2 ; @REG_A6XX_DBGC_CFG_DBGBUS_TRACE_BUF1
	.no_dead_strip	_debugbus_read
.subsections_via_symbols
