	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function kgd_hqd_sdma_dump
_kgd_hqd_sdma_dump:                     ## @kgd_hqd_sdma_dump
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r14
	movq	%rcx, %r12
	movq	%rdx, %r13
	movq	%rsi, %r15
	callq	_get_amdgpu_device
	movq	_SDMA1_REGISTER_OFFSET@GOTPCREL(%rip), %rax
	imulq	(%rax), %r15
	movq	_KFD_VI_SDMA_QUEUE_OFFSET@GOTPCREL(%rip), %rax
	imulq	(%rax), %r13
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$70, %edi
	movl	$8, %esi
	callq	_kmalloc_array
	movq	%rax, (%r12)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	addq	%r15, %r13
	movq	_mmSDMA0_RLC0_RB_CNTL@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movq	_mmSDMA0_RLC0_DOORBELL@GOTPCREL(%rip), %r15
	cmpq	(%r15), %rbx
	jg	LBB0_4
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	leaq	(%rbx,%r13), %rdi
	callq	_DUMP_REG
	leaq	1(%rbx), %rax
	cmpq	(%r15), %rbx
	movq	%rax, %rbx
	jl	LBB0_3
LBB0_4:
	movq	_mmSDMA0_RLC0_VIRTUAL_ADDR@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movq	_mmSDMA0_RLC0_WATERMARK@GOTPCREL(%rip), %r15
	cmpq	(%r15), %rbx
	jg	LBB0_6
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	leaq	(%rbx,%r13), %rdi
	callq	_DUMP_REG
	leaq	1(%rbx), %rax
	cmpq	(%r15), %rbx
	movq	%rax, %rbx
	jl	LBB0_5
LBB0_6:
	movq	_mmSDMA0_RLC0_CSA_ADDR_LO@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movq	_mmSDMA0_RLC0_CSA_ADDR_HI@GOTPCREL(%rip), %r15
	cmpq	(%r15), %rbx
	jg	LBB0_8
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	leaq	(%rbx,%r13), %rdi
	callq	_DUMP_REG
	leaq	1(%rbx), %rax
	cmpq	(%r15), %rbx
	movq	%rax, %rbx
	jl	LBB0_7
LBB0_8:
	movq	_mmSDMA0_RLC0_IB_SUB_REMAIN@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movq	_mmSDMA0_RLC0_DUMMY_REG@GOTPCREL(%rip), %r15
	cmpq	(%r15), %rbx
	jg	LBB0_10
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	leaq	(%rbx,%r13), %rdi
	callq	_DUMP_REG
	leaq	1(%rbx), %rax
	cmpq	(%r15), %rbx
	movq	%rax, %rbx
	jl	LBB0_9
LBB0_10:
	movq	_mmSDMA0_RLC0_MIDCMD_DATA0@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movq	_mmSDMA0_RLC0_MIDCMD_CNTL@GOTPCREL(%rip), %r15
	cmpq	(%r15), %rbx
	jg	LBB0_12
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	leaq	(%rbx,%r13), %rdi
	callq	_DUMP_REG
	leaq	1(%rbx), %rax
	cmpq	(%r15), %rbx
	movq	%rax, %rbx
	jl	LBB0_11
LBB0_12:
	movl	$1, %edi
	callq	_WARN_ON_ONCE
	movq	$0, (%r14)
	xorl	%eax, %eax
	jmp	LBB0_13
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SDMA1_REGISTER_OFFSET,8,3      ## @SDMA1_REGISTER_OFFSET
	.comm	_KFD_VI_SDMA_QUEUE_OFFSET,8,3   ## @KFD_VI_SDMA_QUEUE_OFFSET
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_mmSDMA0_RLC0_RB_CNTL,8,3       ## @mmSDMA0_RLC0_RB_CNTL
	.comm	_mmSDMA0_RLC0_DOORBELL,8,3      ## @mmSDMA0_RLC0_DOORBELL
	.comm	_mmSDMA0_RLC0_VIRTUAL_ADDR,8,3  ## @mmSDMA0_RLC0_VIRTUAL_ADDR
	.comm	_mmSDMA0_RLC0_WATERMARK,8,3     ## @mmSDMA0_RLC0_WATERMARK
	.comm	_mmSDMA0_RLC0_CSA_ADDR_LO,8,3   ## @mmSDMA0_RLC0_CSA_ADDR_LO
	.comm	_mmSDMA0_RLC0_CSA_ADDR_HI,8,3   ## @mmSDMA0_RLC0_CSA_ADDR_HI
	.comm	_mmSDMA0_RLC0_IB_SUB_REMAIN,8,3 ## @mmSDMA0_RLC0_IB_SUB_REMAIN
	.comm	_mmSDMA0_RLC0_DUMMY_REG,8,3     ## @mmSDMA0_RLC0_DUMMY_REG
	.comm	_mmSDMA0_RLC0_MIDCMD_DATA0,8,3  ## @mmSDMA0_RLC0_MIDCMD_DATA0
	.comm	_mmSDMA0_RLC0_MIDCMD_CNTL,8,3   ## @mmSDMA0_RLC0_MIDCMD_CNTL
	.comm	_HQD_N_REGS,4,2                 ## @HQD_N_REGS
	.no_dead_strip	_kgd_hqd_sdma_dump
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function kgd_hqd_sdma_dump
_kgd_hqd_sdma_dump:                     ; @kgd_hqd_sdma_dump
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x4
	mov	x22, x3
	mov	x20, x2
	mov	x21, x1
	bl	_get_amdgpu_device
Lloh0:
	adrp	x8, _SDMA1_REGISTER_OFFSET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SDMA1_REGISTER_OFFSET@GOTPAGEOFF]
Lloh2:
	ldr	x24, [x8]
Lloh3:
	adrp	x8, _KFD_VI_SDMA_QUEUE_OFFSET@GOTPAGE
Lloh4:
	ldr	x8, [x8, _KFD_VI_SDMA_QUEUE_OFFSET@GOTPAGEOFF]
Lloh5:
	ldr	x23, [x8]
Lloh6:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	w0, #70
	mov	w1, #8
	bl	_kmalloc_array
	str	x0, [x22]
	cbz	x0, LBB0_12
; %bb.1:
	mul	x8, x24, x21
Lloh9:
	adrp	x9, _mmSDMA0_RLC0_RB_CNTL@GOTPAGE
Lloh10:
	ldr	x9, [x9, _mmSDMA0_RLC0_RB_CNTL@GOTPAGEOFF]
	madd	x20, x23, x20, x8
Lloh11:
	ldr	x22, [x9]
Lloh12:
	adrp	x21, _mmSDMA0_RLC0_DOORBELL@GOTPAGE
Lloh13:
	ldr	x21, [x21, _mmSDMA0_RLC0_DOORBELL@GOTPAGEOFF]
	ldr	x8, [x21]
	cmp	x22, x8
	b.gt	LBB0_3
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	add	x0, x20, x22
	bl	_DUMP_REG
	add	x8, x22, #1
	ldr	x9, [x21]
	cmp	x22, x9
	mov	x22, x8
	b.lt	LBB0_2
LBB0_3:
Lloh14:
	adrp	x8, _mmSDMA0_RLC0_VIRTUAL_ADDR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _mmSDMA0_RLC0_VIRTUAL_ADDR@GOTPAGEOFF]
Lloh16:
	ldr	x22, [x8]
Lloh17:
	adrp	x21, _mmSDMA0_RLC0_WATERMARK@GOTPAGE
Lloh18:
	ldr	x21, [x21, _mmSDMA0_RLC0_WATERMARK@GOTPAGEOFF]
	ldr	x8, [x21]
	cmp	x22, x8
	b.gt	LBB0_5
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	add	x0, x20, x22
	bl	_DUMP_REG
	add	x8, x22, #1
	ldr	x9, [x21]
	cmp	x22, x9
	mov	x22, x8
	b.lt	LBB0_4
LBB0_5:
Lloh19:
	adrp	x8, _mmSDMA0_RLC0_CSA_ADDR_LO@GOTPAGE
Lloh20:
	ldr	x8, [x8, _mmSDMA0_RLC0_CSA_ADDR_LO@GOTPAGEOFF]
Lloh21:
	ldr	x22, [x8]
Lloh22:
	adrp	x21, _mmSDMA0_RLC0_CSA_ADDR_HI@GOTPAGE
Lloh23:
	ldr	x21, [x21, _mmSDMA0_RLC0_CSA_ADDR_HI@GOTPAGEOFF]
	ldr	x8, [x21]
	cmp	x22, x8
	b.gt	LBB0_7
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	add	x0, x20, x22
	bl	_DUMP_REG
	add	x8, x22, #1
	ldr	x9, [x21]
	cmp	x22, x9
	mov	x22, x8
	b.lt	LBB0_6
LBB0_7:
Lloh24:
	adrp	x8, _mmSDMA0_RLC0_IB_SUB_REMAIN@GOTPAGE
Lloh25:
	ldr	x8, [x8, _mmSDMA0_RLC0_IB_SUB_REMAIN@GOTPAGEOFF]
Lloh26:
	ldr	x22, [x8]
Lloh27:
	adrp	x21, _mmSDMA0_RLC0_DUMMY_REG@GOTPAGE
Lloh28:
	ldr	x21, [x21, _mmSDMA0_RLC0_DUMMY_REG@GOTPAGEOFF]
	ldr	x8, [x21]
	cmp	x22, x8
	b.gt	LBB0_9
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	add	x0, x20, x22
	bl	_DUMP_REG
	add	x8, x22, #1
	ldr	x9, [x21]
	cmp	x22, x9
	mov	x22, x8
	b.lt	LBB0_8
LBB0_9:
Lloh29:
	adrp	x8, _mmSDMA0_RLC0_MIDCMD_DATA0@GOTPAGE
Lloh30:
	ldr	x8, [x8, _mmSDMA0_RLC0_MIDCMD_DATA0@GOTPAGEOFF]
Lloh31:
	ldr	x22, [x8]
Lloh32:
	adrp	x21, _mmSDMA0_RLC0_MIDCMD_CNTL@GOTPAGE
Lloh33:
	ldr	x21, [x21, _mmSDMA0_RLC0_MIDCMD_CNTL@GOTPAGEOFF]
	ldr	x8, [x21]
	cmp	x22, x8
	b.gt	LBB0_11
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	add	x0, x20, x22
	bl	_DUMP_REG
	add	x8, x22, #1
	ldr	x9, [x21]
	cmp	x22, x9
	mov	x22, x8
	b.lt	LBB0_10
LBB0_11:
	mov	w0, #1
	bl	_WARN_ON_ONCE
	mov	w0, #0
	str	xzr, [x19]
	b	LBB0_13
LBB0_12:
Lloh34:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh35:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh36:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_13:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.comm	_SDMA1_REGISTER_OFFSET,8,3      ; @SDMA1_REGISTER_OFFSET
	.comm	_KFD_VI_SDMA_QUEUE_OFFSET,8,3   ; @KFD_VI_SDMA_QUEUE_OFFSET
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_mmSDMA0_RLC0_RB_CNTL,8,3       ; @mmSDMA0_RLC0_RB_CNTL
	.comm	_mmSDMA0_RLC0_DOORBELL,8,3      ; @mmSDMA0_RLC0_DOORBELL
	.comm	_mmSDMA0_RLC0_VIRTUAL_ADDR,8,3  ; @mmSDMA0_RLC0_VIRTUAL_ADDR
	.comm	_mmSDMA0_RLC0_WATERMARK,8,3     ; @mmSDMA0_RLC0_WATERMARK
	.comm	_mmSDMA0_RLC0_CSA_ADDR_LO,8,3   ; @mmSDMA0_RLC0_CSA_ADDR_LO
	.comm	_mmSDMA0_RLC0_CSA_ADDR_HI,8,3   ; @mmSDMA0_RLC0_CSA_ADDR_HI
	.comm	_mmSDMA0_RLC0_IB_SUB_REMAIN,8,3 ; @mmSDMA0_RLC0_IB_SUB_REMAIN
	.comm	_mmSDMA0_RLC0_DUMMY_REG,8,3     ; @mmSDMA0_RLC0_DUMMY_REG
	.comm	_mmSDMA0_RLC0_MIDCMD_DATA0,8,3  ; @mmSDMA0_RLC0_MIDCMD_DATA0
	.comm	_mmSDMA0_RLC0_MIDCMD_CNTL,8,3   ; @mmSDMA0_RLC0_MIDCMD_CNTL
	.comm	_HQD_N_REGS,4,2                 ; @HQD_N_REGS
	.no_dead_strip	_kgd_hqd_sdma_dump
.subsections_via_symbols
