	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sdma_v4_1_init_power_gating
_sdma_v4_1_init_power_gating:           ## @sdma_v4_1_init_power_gating
	.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	_SDMA0@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movq	_mmSDMA0_POWER_CNTL@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	xorl	%esi, %esi
	callq	_SOC15_REG_OFFSET
	movl	%eax, %edi
	callq	_RREG32
	movq	_SDMA0_POWER_CNTL__PG_CNTL_ENABLE_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	orl	%eax, %ebx
	cmpl	%eax, %ebx
	je	LBB0_2
## %bb.1:
	movl	(%r14), %edi
	movl	(%r15), %edx
	xorl	%esi, %esi
	callq	_SOC15_REG_OFFSET
	movl	%eax, %edi
	movl	%ebx, %esi
	callq	_WREG32
LBB0_2:
	movl	(%r14), %edi
	movq	_mmSDMA0_CNTL@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	xorl	%esi, %esi
	callq	_SOC15_REG_OFFSET
	movl	%eax, %edi
	callq	_RREG32
	movq	_SDMA0_CNTL__CTXEMPTY_INT_ENABLE_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	orl	%eax, %ebx
	cmpl	%eax, %ebx
	je	LBB0_4
## %bb.3:
	movl	(%r14), %edi
	movl	(%r12), %edx
	xorl	%esi, %esi
	callq	_SOC15_REG_OFFSET
	movl	%eax, %edi
	movl	%ebx, %esi
	callq	_WREG32
LBB0_4:
	movl	(%r14), %edi
	movl	(%r15), %edx
	xorl	%esi, %esi
	callq	_SOC15_REG_OFFSET
	movl	%eax, %edi
	callq	_RREG32
	movq	_SDMA0_POWER_CNTL__ON_OFF_CONDITION_HOLD_TIME_MASK@GOTPCREL(%rip), %rcx
	movq	_mmSDMA0_POWER_CNTL_DEFAULT@GOTPCREL(%rip), %rdx
	movl	(%rdx), %ebx
	movl	%ebx, %edx
	xorl	%eax, %edx
	andl	(%rcx), %edx
	xorl	%eax, %edx
	movq	_SDMA0_POWER_CNTL__ON_OFF_STATUS_DURATION_TIME_MASK@GOTPCREL(%rip), %rcx
	xorl	%edx, %ebx
	andl	(%rcx), %ebx
	xorl	%edx, %ebx
	cmpl	%eax, %ebx
	jne	LBB0_6
## %bb.5:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movl	(%r14), %edi
	movl	(%r15), %edx
	xorl	%esi, %esi
	callq	_SOC15_REG_OFFSET
	movl	%eax, %edi
	movl	%ebx, %esi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_WREG32                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_SDMA0,4,2                      ## @SDMA0
	.comm	_mmSDMA0_POWER_CNTL,4,2         ## @mmSDMA0_POWER_CNTL
	.comm	_SDMA0_POWER_CNTL__PG_CNTL_ENABLE_MASK,4,2 ## @SDMA0_POWER_CNTL__PG_CNTL_ENABLE_MASK
	.comm	_mmSDMA0_CNTL,4,2               ## @mmSDMA0_CNTL
	.comm	_SDMA0_CNTL__CTXEMPTY_INT_ENABLE_MASK,4,2 ## @SDMA0_CNTL__CTXEMPTY_INT_ENABLE_MASK
	.comm	_SDMA0_POWER_CNTL__ON_OFF_CONDITION_HOLD_TIME_MASK,4,2 ## @SDMA0_POWER_CNTL__ON_OFF_CONDITION_HOLD_TIME_MASK
	.comm	_mmSDMA0_POWER_CNTL_DEFAULT,4,2 ## @mmSDMA0_POWER_CNTL_DEFAULT
	.comm	_SDMA0_POWER_CNTL__ON_OFF_STATUS_DURATION_TIME_MASK,4,2 ## @SDMA0_POWER_CNTL__ON_OFF_STATUS_DURATION_TIME_MASK
	.no_dead_strip	_sdma_v4_1_init_power_gating
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sdma_v4_1_init_power_gating
_sdma_v4_1_init_power_gating:           ; @sdma_v4_1_init_power_gating
	.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
Lloh0:
	adrp	x20, _SDMA0@GOTPAGE
Lloh1:
	ldr	x20, [x20, _SDMA0@GOTPAGEOFF]
	ldr	w0, [x20]
Lloh2:
	adrp	x21, _mmSDMA0_POWER_CNTL@GOTPAGE
Lloh3:
	ldr	x21, [x21, _mmSDMA0_POWER_CNTL@GOTPAGEOFF]
	ldr	w2, [x21]
	mov	w1, #0
	bl	_SOC15_REG_OFFSET
	bl	_RREG32
Lloh4:
	adrp	x8, _SDMA0_POWER_CNTL__PG_CNTL_ENABLE_MASK@GOTPAGE
Lloh5:
	ldr	x8, [x8, _SDMA0_POWER_CNTL__PG_CNTL_ENABLE_MASK@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	orr	w19, w8, w0
	cmp	w19, w0
	b.eq	LBB0_2
; %bb.1:
	ldr	w0, [x20]
	ldr	w2, [x21]
	mov	w1, #0
	bl	_SOC15_REG_OFFSET
	mov	x1, x19
	bl	_WREG32
LBB0_2:
	ldr	w0, [x20]
Lloh7:
	adrp	x22, _mmSDMA0_CNTL@GOTPAGE
Lloh8:
	ldr	x22, [x22, _mmSDMA0_CNTL@GOTPAGEOFF]
	ldr	w2, [x22]
	mov	w1, #0
	bl	_SOC15_REG_OFFSET
	bl	_RREG32
Lloh9:
	adrp	x8, _SDMA0_CNTL__CTXEMPTY_INT_ENABLE_MASK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SDMA0_CNTL__CTXEMPTY_INT_ENABLE_MASK@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	orr	w19, w8, w0
	cmp	w19, w0
	b.eq	LBB0_4
; %bb.3:
	ldr	w0, [x20]
	ldr	w2, [x22]
	mov	w1, #0
	bl	_SOC15_REG_OFFSET
	mov	x1, x19
	bl	_WREG32
LBB0_4:
	ldr	w0, [x20]
	ldr	w2, [x21]
	mov	w1, #0
	bl	_SOC15_REG_OFFSET
	bl	_RREG32
Lloh12:
	adrp	x8, _SDMA0_POWER_CNTL__ON_OFF_CONDITION_HOLD_TIME_MASK@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SDMA0_POWER_CNTL__ON_OFF_CONDITION_HOLD_TIME_MASK@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	bic	w9, w0, w8
Lloh15:
	adrp	x10, _mmSDMA0_POWER_CNTL_DEFAULT@GOTPAGE
Lloh16:
	ldr	x10, [x10, _mmSDMA0_POWER_CNTL_DEFAULT@GOTPAGEOFF]
Lloh17:
	ldr	w10, [x10]
	and	w8, w10, w8
Lloh18:
	adrp	x11, _SDMA0_POWER_CNTL__ON_OFF_STATUS_DURATION_TIME_MASK@GOTPAGE
Lloh19:
	ldr	x11, [x11, _SDMA0_POWER_CNTL__ON_OFF_STATUS_DURATION_TIME_MASK@GOTPAGEOFF]
	orr	w8, w8, w9
Lloh20:
	ldr	w9, [x11]
	bic	w8, w8, w9
	and	w9, w9, w10
	orr	w19, w8, w9
	cmp	w19, w0
	b.ne	LBB0_6
; %bb.5:
	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
LBB0_6:
	ldr	w0, [x20]
	ldr	w2, [x21]
	mov	w1, #0
	bl	_SOC15_REG_OFFSET
	mov	x1, x19
	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
	b	_WREG32
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_SDMA0,4,2                      ; @SDMA0
	.comm	_mmSDMA0_POWER_CNTL,4,2         ; @mmSDMA0_POWER_CNTL
	.comm	_SDMA0_POWER_CNTL__PG_CNTL_ENABLE_MASK,4,2 ; @SDMA0_POWER_CNTL__PG_CNTL_ENABLE_MASK
	.comm	_mmSDMA0_CNTL,4,2               ; @mmSDMA0_CNTL
	.comm	_SDMA0_CNTL__CTXEMPTY_INT_ENABLE_MASK,4,2 ; @SDMA0_CNTL__CTXEMPTY_INT_ENABLE_MASK
	.comm	_SDMA0_POWER_CNTL__ON_OFF_CONDITION_HOLD_TIME_MASK,4,2 ; @SDMA0_POWER_CNTL__ON_OFF_CONDITION_HOLD_TIME_MASK
	.comm	_mmSDMA0_POWER_CNTL_DEFAULT,4,2 ; @mmSDMA0_POWER_CNTL_DEFAULT
	.comm	_SDMA0_POWER_CNTL__ON_OFF_STATUS_DURATION_TIME_MASK,4,2 ; @SDMA0_POWER_CNTL__ON_OFF_STATUS_DURATION_TIME_MASK
	.no_dead_strip	_sdma_v4_1_init_power_gating
.subsections_via_symbols
