	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sdma_v2_4_soft_reset
_sdma_v2_4_soft_reset:                  ## @sdma_v2_4_soft_reset
	.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	%rdi, %r14
	movq	_mmSRBM_STATUS2@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_RREG32
	movl	%eax, %ebx
	movq	_SRBM_STATUS2__SDMA_BUSY_MASK@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_1
## %bb.2:
	movq	_mmSDMA0_F32_CNTL@GOTPCREL(%rip), %r15
	movq	_SDMA0_REGISTER_OFFSET@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	addq	(%r15), %rdi
	callq	_RREG32
	movq	_SDMA0_F32_CNTL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_HALT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	xorl	%ecx, %ecx
	callq	_REG_SET_FIELD
	movl	%eax, %ebx
	movq	(%r12), %rdi
	addq	(%r15), %rdi
	movl	%eax, %esi
	callq	_WREG32
	movq	_SRBM_SOFT_RESET__SOFT_RESET_SDMA_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	jmp	LBB0_3
LBB0_1:
	xorl	%r15d, %r15d
LBB0_3:
	movq	_SRBM_STATUS2__SDMA1_BUSY_MASK@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_5
## %bb.4:
	movq	_mmSDMA0_F32_CNTL@GOTPCREL(%rip), %r12
	movq	_SDMA1_REGISTER_OFFSET@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	addq	(%r12), %rdi
	callq	_RREG32
	movq	_SDMA0_F32_CNTL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_HALT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	xorl	%ecx, %ecx
	callq	_REG_SET_FIELD
	movq	(%rbx), %rdi
	addq	(%r12), %rdi
	movl	%eax, %esi
	callq	_WREG32
	movq	_SRBM_SOFT_RESET__SOFT_RESET_SDMA1_MASK@GOTPCREL(%rip), %rax
	orl	(%rax), %r15d
LBB0_5:
	testl	%r15d, %r15d
	je	LBB0_7
## %bb.6:
	movq	_mmSRBM_SOFT_RESET@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	callq	_RREG32
	movl	%eax, %ebx
	orl	%r15d, %ebx
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	callq	_dev_info
	movq	(%r12), %rdi
	movl	%ebx, %esi
	callq	_WREG32
	movq	(%r12), %rdi
	callq	_RREG32
	movl	%eax, %ebx
	movl	$50, %edi
	callq	_udelay
	notl	%r15d
	andl	%ebx, %r15d
	movq	(%r12), %rdi
	movl	%r15d, %esi
	callq	_WREG32
	movq	(%r12), %rdi
	callq	_RREG32
	movl	$50, %edi
	callq	_udelay
LBB0_7:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_mmSRBM_STATUS2,8,3             ## @mmSRBM_STATUS2
	.comm	_SRBM_STATUS2__SDMA_BUSY_MASK,4,2 ## @SRBM_STATUS2__SDMA_BUSY_MASK
	.comm	_mmSDMA0_F32_CNTL,8,3           ## @mmSDMA0_F32_CNTL
	.comm	_SDMA0_REGISTER_OFFSET,8,3      ## @SDMA0_REGISTER_OFFSET
	.comm	_SDMA0_F32_CNTL,4,2             ## @SDMA0_F32_CNTL
	.comm	_HALT,4,2                       ## @HALT
	.comm	_SRBM_SOFT_RESET__SOFT_RESET_SDMA_MASK,4,2 ## @SRBM_SOFT_RESET__SOFT_RESET_SDMA_MASK
	.comm	_SRBM_STATUS2__SDMA1_BUSY_MASK,4,2 ## @SRBM_STATUS2__SDMA1_BUSY_MASK
	.comm	_SDMA1_REGISTER_OFFSET,8,3      ## @SDMA1_REGISTER_OFFSET
	.comm	_SRBM_SOFT_RESET__SOFT_RESET_SDMA1_MASK,4,2 ## @SRBM_SOFT_RESET__SOFT_RESET_SDMA1_MASK
	.comm	_mmSRBM_SOFT_RESET,8,3          ## @mmSRBM_SOFT_RESET
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SRBM_SOFT_RESET=0x%08X\n"

	.no_dead_strip	_sdma_v2_4_soft_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sdma_v2_4_soft_reset
_sdma_v2_4_soft_reset:                  ; @sdma_v2_4_soft_reset
	.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, x0
Lloh0:
	adrp	x8, _mmSRBM_STATUS2@GOTPAGE
Lloh1:
	ldr	x8, [x8, _mmSRBM_STATUS2@GOTPAGEOFF]
Lloh2:
	ldr	x0, [x8]
	bl	_RREG32
Lloh3:
	adrp	x8, _SRBM_STATUS2__SDMA_BUSY_MASK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SRBM_STATUS2__SDMA_BUSY_MASK@GOTPAGEOFF]
Lloh5:
	adrp	x22, _mmSDMA0_F32_CNTL@GOTPAGE
Lloh6:
	ldr	x22, [x22, _mmSDMA0_F32_CNTL@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x23, _SDMA0_F32_CNTL@GOTPAGE
Lloh9:
	ldr	x23, [x23, _SDMA0_F32_CNTL@GOTPAGEOFF]
Lloh10:
	adrp	x24, _HALT@GOTPAGE
Lloh11:
	ldr	x24, [x24, _HALT@GOTPAGEOFF]
	tst	w8, w0
	b.eq	LBB0_2
; %bb.1:
	ldr	x8, [x22]
Lloh12:
	adrp	x21, _SDMA0_REGISTER_OFFSET@GOTPAGE
Lloh13:
	ldr	x21, [x21, _SDMA0_REGISTER_OFFSET@GOTPAGEOFF]
	ldr	x9, [x21]
	add	x0, x9, x8
	bl	_RREG32
	ldr	w1, [x23]
	ldr	w2, [x24]
	mov	w3, #0
	bl	_REG_SET_FIELD
	mov	x20, x0
	ldr	x8, [x22]
	ldr	x9, [x21]
	add	x0, x9, x8
	mov	x1, x20
	bl	_WREG32
Lloh14:
	adrp	x8, _SRBM_SOFT_RESET__SOFT_RESET_SDMA_MASK@GOTPAGE
Lloh15:
	ldr	x8, [x8, _SRBM_SOFT_RESET__SOFT_RESET_SDMA_MASK@GOTPAGEOFF]
Lloh16:
	ldr	w21, [x8]
	b	LBB0_3
LBB0_2:
	mov	x20, x0
	mov	w21, #0
LBB0_3:
Lloh17:
	adrp	x8, _SRBM_STATUS2__SDMA1_BUSY_MASK@GOTPAGE
Lloh18:
	ldr	x8, [x8, _SRBM_STATUS2__SDMA1_BUSY_MASK@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_5
; %bb.4:
	ldr	x8, [x22]
Lloh20:
	adrp	x20, _SDMA1_REGISTER_OFFSET@GOTPAGE
Lloh21:
	ldr	x20, [x20, _SDMA1_REGISTER_OFFSET@GOTPAGEOFF]
	ldr	x9, [x20]
	add	x0, x9, x8
	bl	_RREG32
	ldr	w1, [x23]
	ldr	w2, [x24]
	mov	w3, #0
	bl	_REG_SET_FIELD
	mov	x1, x0
	ldr	x8, [x22]
	ldr	x9, [x20]
	add	x0, x9, x8
	bl	_WREG32
Lloh22:
	adrp	x8, _SRBM_SOFT_RESET__SOFT_RESET_SDMA1_MASK@GOTPAGE
Lloh23:
	ldr	x8, [x8, _SRBM_SOFT_RESET__SOFT_RESET_SDMA1_MASK@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	orr	w21, w8, w21
LBB0_5:
	cbz	w21, LBB0_7
; %bb.6:
Lloh25:
	adrp	x22, _mmSRBM_SOFT_RESET@GOTPAGE
Lloh26:
	ldr	x22, [x22, _mmSRBM_SOFT_RESET@GOTPAGEOFF]
	ldr	x0, [x22]
	bl	_RREG32
	orr	w20, w0, w21
	ldr	w0, [x19]
Lloh27:
	adrp	x1, l_.str@PAGE
Lloh28:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_dev_info
	ldr	x0, [x22]
	mov	x1, x20
	bl	_WREG32
	ldr	x0, [x22]
	bl	_RREG32
	mov	x19, x0
	mov	w0, #50
	bl	_udelay
	bic	w1, w19, w21
	ldr	x0, [x22]
	bl	_WREG32
	ldr	x0, [x22]
	bl	_RREG32
	mov	w0, #50
	bl	_udelay
LBB0_7:
	mov	w0, #0
	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 AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_mmSRBM_STATUS2,8,3             ; @mmSRBM_STATUS2
	.comm	_SRBM_STATUS2__SDMA_BUSY_MASK,4,2 ; @SRBM_STATUS2__SDMA_BUSY_MASK
	.comm	_mmSDMA0_F32_CNTL,8,3           ; @mmSDMA0_F32_CNTL
	.comm	_SDMA0_REGISTER_OFFSET,8,3      ; @SDMA0_REGISTER_OFFSET
	.comm	_SDMA0_F32_CNTL,4,2             ; @SDMA0_F32_CNTL
	.comm	_HALT,4,2                       ; @HALT
	.comm	_SRBM_SOFT_RESET__SOFT_RESET_SDMA_MASK,4,2 ; @SRBM_SOFT_RESET__SOFT_RESET_SDMA_MASK
	.comm	_SRBM_STATUS2__SDMA1_BUSY_MASK,4,2 ; @SRBM_STATUS2__SDMA1_BUSY_MASK
	.comm	_SDMA1_REGISTER_OFFSET,8,3      ; @SDMA1_REGISTER_OFFSET
	.comm	_SRBM_SOFT_RESET__SOFT_RESET_SDMA1_MASK,4,2 ; @SRBM_SOFT_RESET__SOFT_RESET_SDMA1_MASK
	.comm	_mmSRBM_SOFT_RESET,8,3          ; @mmSRBM_SOFT_RESET
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SRBM_SOFT_RESET=0x%08X\n"

	.no_dead_strip	_sdma_v2_4_soft_reset
.subsections_via_symbols
