	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cik_enable_sdma_mgcg
_cik_enable_sdma_mgcg:                  ## @cik_enable_sdma_mgcg
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	testl	%esi, %esi
	je	LBB0_4
## %bb.1:
	movq	_AMD_CG_SUPPORT_SDMA_MGCG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdi)
	je	LBB0_4
## %bb.2:
	movq	_mmSDMA0_CLK_CTRL@GOTPCREL(%rip), %rax
	movq	_SDMA0_REGISTER_OFFSET@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdi
	addq	(%rax), %rdi
	movl	$256, %ebx                      ## imm = 0x100
	movl	$256, %esi                      ## imm = 0x100
	callq	_WREG32
	jmp	LBB0_3
LBB0_4:
	movq	_mmSDMA0_CLK_CTRL@GOTPCREL(%rip), %rbx
	movq	_SDMA0_REGISTER_OFFSET@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	addq	(%rbx), %rdi
	callq	_RREG32
	movl	%eax, %esi
	orl	$-16777216, %esi                ## imm = 0xFF000000
	cmpl	%eax, %esi
	je	LBB0_6
## %bb.5:
	movq	(%r14), %rdi
	addq	(%rbx), %rdi
	callq	_WREG32
LBB0_6:
	movq	_SDMA1_REGISTER_OFFSET@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%rbx), %rdi
	callq	_RREG32
	movl	%eax, %ebx
	orl	$-16777216, %ebx                ## imm = 0xFF000000
	cmpl	%eax, %ebx
	jne	LBB0_3
## %bb.7:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_3:
	movq	_mmSDMA0_CLK_CTRL@GOTPCREL(%rip), %rax
	movq	_SDMA1_REGISTER_OFFSET@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdi
	addq	(%rax), %rdi
	movl	%ebx, %esi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_WREG32                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_AMD_CG_SUPPORT_SDMA_MGCG,4,2   ## @AMD_CG_SUPPORT_SDMA_MGCG
	.comm	_mmSDMA0_CLK_CTRL,8,3           ## @mmSDMA0_CLK_CTRL
	.comm	_SDMA0_REGISTER_OFFSET,8,3      ## @SDMA0_REGISTER_OFFSET
	.comm	_SDMA1_REGISTER_OFFSET,8,3      ## @SDMA1_REGISTER_OFFSET
	.no_dead_strip	_cik_enable_sdma_mgcg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cik_enable_sdma_mgcg
_cik_enable_sdma_mgcg:                  ; @cik_enable_sdma_mgcg
	.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, _mmSDMA0_CLK_CTRL@GOTPAGE
Lloh1:
	ldr	x20, [x20, _mmSDMA0_CLK_CTRL@GOTPAGEOFF]
Lloh2:
	adrp	x21, _SDMA1_REGISTER_OFFSET@GOTPAGE
Lloh3:
	ldr	x21, [x21, _SDMA1_REGISTER_OFFSET@GOTPAGEOFF]
	cbz	w1, LBB0_3
; %bb.1:
	ldr	w8, [x0]
Lloh4:
	adrp	x9, _AMD_CG_SUPPORT_SDMA_MGCG@GOTPAGE
Lloh5:
	ldr	x9, [x9, _AMD_CG_SUPPORT_SDMA_MGCG@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.2:
	ldr	x8, [x20]
Lloh7:
	adrp	x9, _SDMA0_REGISTER_OFFSET@GOTPAGE
Lloh8:
	ldr	x9, [x9, _SDMA0_REGISTER_OFFSET@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	add	x0, x9, x8
	mov	w19, #256
	mov	w1, #256
	bl	_WREG32
	b	LBB0_7
LBB0_3:
	ldr	x8, [x20]
Lloh10:
	adrp	x19, _SDMA0_REGISTER_OFFSET@GOTPAGE
Lloh11:
	ldr	x19, [x19, _SDMA0_REGISTER_OFFSET@GOTPAGEOFF]
	ldr	x9, [x19]
	add	x0, x9, x8
	bl	_RREG32
	orr	w1, w0, #0xff000000
	cmp	w1, w0
	b.eq	LBB0_5
; %bb.4:
	ldr	x8, [x20]
	ldr	x9, [x19]
	add	x0, x9, x8
	bl	_WREG32
LBB0_5:
	ldr	x8, [x20]
	ldr	x9, [x21]
	add	x0, x9, x8
	bl	_RREG32
	orr	w19, w0, #0xff000000
	cmp	w19, w0
	b.ne	LBB0_7
; %bb.6:
	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_7:
	ldr	x8, [x20]
	ldr	x9, [x21]
	add	x0, x9, x8
	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 AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_AMD_CG_SUPPORT_SDMA_MGCG,4,2   ; @AMD_CG_SUPPORT_SDMA_MGCG
	.comm	_mmSDMA0_CLK_CTRL,8,3           ; @mmSDMA0_CLK_CTRL
	.comm	_SDMA0_REGISTER_OFFSET,8,3      ; @SDMA0_REGISTER_OFFSET
	.comm	_SDMA1_REGISTER_OFFSET,8,3      ; @SDMA1_REGISTER_OFFSET
	.no_dead_strip	_cik_enable_sdma_mgcg
.subsections_via_symbols
