	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sdma_v4_1_update_power_gating
_sdma_v4_1_update_power_gating:         ## @sdma_v4_1_update_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	testl	%esi, %esi
	je	LBB0_3
## %bb.1:
	movq	_AMD_PG_SUPPORT_SDMA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdi)
	je	LBB0_3
## %bb.2:
	movq	_SDMA0@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_mmSDMA0_CNTL@GOTPCREL(%rip), %rax
	movl	(%rax), %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_5
LBB0_6:
	movq	_SDMA0@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_mmSDMA0_CNTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	callq	_SOC15_REG_OFFSET
	movl	%eax, %edi
	movl	%ebx, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_WREG32                         ## TAILCALL
LBB0_3:
	movq	_SDMA0@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_mmSDMA0_CNTL@GOTPCREL(%rip), %rax
	movl	(%rax), %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
	notl	%ebx
	andl	%eax, %ebx
	cmpl	%eax, %ebx
	jne	LBB0_6
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AMD_PG_SUPPORT_SDMA,4,2        ## @AMD_PG_SUPPORT_SDMA
	.comm	_SDMA0,4,2                      ## @SDMA0
	.comm	_mmSDMA0_CNTL,4,2               ## @mmSDMA0_CNTL
	.comm	_SDMA0_CNTL__CTXEMPTY_INT_ENABLE_MASK,4,2 ## @SDMA0_CNTL__CTXEMPTY_INT_ENABLE_MASK
	.no_dead_strip	_sdma_v4_1_update_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_update_power_gating
_sdma_v4_1_update_power_gating:         ; @sdma_v4_1_update_power_gating
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	cbz	w1, LBB0_4
; %bb.1:
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _AMD_PG_SUPPORT_SDMA@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AMD_PG_SUPPORT_SDMA@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.2:
Lloh3:
	adrp	x8, _SDMA0@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SDMA0@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x8, _mmSDMA0_CNTL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _mmSDMA0_CNTL@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	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_5
LBB0_3:
Lloh12:
	adrp	x8, _SDMA0@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SDMA0@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
Lloh15:
	adrp	x8, _mmSDMA0_CNTL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _mmSDMA0_CNTL@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	mov	w1, #0
	bl	_SOC15_REG_OFFSET
	mov	x1, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_WREG32
LBB0_4:
Lloh18:
	adrp	x8, _SDMA0@GOTPAGE
Lloh19:
	ldr	x8, [x8, _SDMA0@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
Lloh21:
	adrp	x8, _mmSDMA0_CNTL@GOTPAGE
Lloh22:
	ldr	x8, [x8, _mmSDMA0_CNTL@GOTPAGEOFF]
Lloh23:
	ldr	w2, [x8]
	mov	w1, #0
	bl	_SOC15_REG_OFFSET
	bl	_RREG32
Lloh24:
	adrp	x8, _SDMA0_CNTL__CTXEMPTY_INT_ENABLE_MASK@GOTPAGE
Lloh25:
	ldr	x8, [x8, _SDMA0_CNTL__CTXEMPTY_INT_ENABLE_MASK@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	bic	w19, w0, w8
	cmp	w19, w0
	b.ne	LBB0_3
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_AMD_PG_SUPPORT_SDMA,4,2        ; @AMD_PG_SUPPORT_SDMA
	.comm	_SDMA0,4,2                      ; @SDMA0
	.comm	_mmSDMA0_CNTL,4,2               ; @mmSDMA0_CNTL
	.comm	_SDMA0_CNTL__CTXEMPTY_INT_ENABLE_MASK,4,2 ; @SDMA0_CNTL__CTXEMPTY_INT_ENABLE_MASK
	.no_dead_strip	_sdma_v4_1_update_power_gating
.subsections_via_symbols
