	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cik_enable_sdma_mgls
_cik_enable_sdma_mgls:                  ## @cik_enable_sdma_mgls
	.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_5
## %bb.1:
	movq	_AMD_CG_SUPPORT_SDMA_LS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdi)
	je	LBB0_5
## %bb.2:
	movq	_mmSDMA0_POWER_CNTL@GOTPCREL(%rip), %rbx
	movq	_SDMA0_REGISTER_OFFSET@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	addq	(%rbx), %rdi
	callq	_RREG32
	movl	%eax, %esi
	orl	$256, %esi                      ## imm = 0x100
	cmpl	%esi, %eax
	je	LBB0_4
## %bb.3:
	movq	(%r14), %rdi
	addq	(%rbx), %rdi
	callq	_WREG32
LBB0_4:
	movq	_SDMA1_REGISTER_OFFSET@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%rbx), %rdi
	callq	_RREG32
	movl	%eax, %esi
	orl	$256, %esi                      ## imm = 0x100
	cmpl	%esi, %eax
	je	LBB0_9
LBB0_10:
	movq	_mmSDMA0_POWER_CNTL@GOTPCREL(%rip), %rax
	movq	_SDMA1_REGISTER_OFFSET@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdi
	addq	(%rax), %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_WREG32                         ## TAILCALL
LBB0_5:
	movq	_mmSDMA0_POWER_CNTL@GOTPCREL(%rip), %rbx
	movq	_SDMA0_REGISTER_OFFSET@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	addq	(%rbx), %rdi
	callq	_RREG32
	movl	%eax, %esi
	andl	$-257, %esi                     ## imm = 0xFEFF
	cmpl	%esi, %eax
	je	LBB0_7
## %bb.6:
	movq	(%r14), %rdi
	addq	(%rbx), %rdi
	callq	_WREG32
LBB0_7:
	movq	_SDMA1_REGISTER_OFFSET@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%rbx), %rdi
	callq	_RREG32
	movl	%eax, %esi
	andl	$-257, %esi                     ## imm = 0xFEFF
	cmpl	%esi, %eax
	jne	LBB0_10
LBB0_9:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AMD_CG_SUPPORT_SDMA_LS,4,2     ## @AMD_CG_SUPPORT_SDMA_LS
	.comm	_mmSDMA0_POWER_CNTL,8,3         ## @mmSDMA0_POWER_CNTL
	.comm	_SDMA0_REGISTER_OFFSET,8,3      ## @SDMA0_REGISTER_OFFSET
	.comm	_SDMA1_REGISTER_OFFSET,8,3      ## @SDMA1_REGISTER_OFFSET
	.no_dead_strip	_cik_enable_sdma_mgls
.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_mgls
_cik_enable_sdma_mgls:                  ; @cik_enable_sdma_mgls
	.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_6
; %bb.1:
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _AMD_CG_SUPPORT_SDMA_LS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AMD_CG_SUPPORT_SDMA_LS@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.2:
Lloh3:
	adrp	x19, _mmSDMA0_POWER_CNTL@GOTPAGE
Lloh4:
	ldr	x19, [x19, _mmSDMA0_POWER_CNTL@GOTPAGEOFF]
	ldr	x8, [x19]
Lloh5:
	adrp	x20, _SDMA0_REGISTER_OFFSET@GOTPAGE
Lloh6:
	ldr	x20, [x20, _SDMA0_REGISTER_OFFSET@GOTPAGEOFF]
	ldr	x9, [x20]
	add	x0, x9, x8
	bl	_RREG32
	orr	w1, w0, #0x100
	cmp	w0, w1
	b.eq	LBB0_4
; %bb.3:
	ldr	x8, [x19]
	ldr	x9, [x20]
	add	x0, x9, x8
	bl	_WREG32
LBB0_4:
	ldr	x8, [x19]
Lloh7:
	adrp	x9, _SDMA1_REGISTER_OFFSET@GOTPAGE
Lloh8:
	ldr	x9, [x9, _SDMA1_REGISTER_OFFSET@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_RREG32
	orr	w1, w0, #0x100
	cmp	w0, w1
	b.eq	LBB0_9
LBB0_5:
Lloh10:
	adrp	x8, _mmSDMA0_POWER_CNTL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _mmSDMA0_POWER_CNTL@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
Lloh13:
	adrp	x9, _SDMA1_REGISTER_OFFSET@GOTPAGE
Lloh14:
	ldr	x9, [x9, _SDMA1_REGISTER_OFFSET@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	add	x0, x9, x8
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_WREG32
LBB0_6:
Lloh16:
	adrp	x19, _mmSDMA0_POWER_CNTL@GOTPAGE
Lloh17:
	ldr	x19, [x19, _mmSDMA0_POWER_CNTL@GOTPAGEOFF]
	ldr	x8, [x19]
Lloh18:
	adrp	x20, _SDMA0_REGISTER_OFFSET@GOTPAGE
Lloh19:
	ldr	x20, [x20, _SDMA0_REGISTER_OFFSET@GOTPAGEOFF]
	ldr	x9, [x20]
	add	x0, x9, x8
	bl	_RREG32
	and	w1, w0, #0xfffffeff
	cmp	w0, w1
	b.eq	LBB0_8
; %bb.7:
	ldr	x8, [x19]
	ldr	x9, [x20]
	add	x0, x9, x8
	bl	_WREG32
LBB0_8:
	ldr	x8, [x19]
Lloh20:
	adrp	x9, _SDMA1_REGISTER_OFFSET@GOTPAGE
Lloh21:
	ldr	x9, [x9, _SDMA1_REGISTER_OFFSET@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_RREG32
	and	w1, w0, #0xfffffeff
	cmp	w0, w1
	b.ne	LBB0_5
LBB0_9:
	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 AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_AMD_CG_SUPPORT_SDMA_LS,4,2     ; @AMD_CG_SUPPORT_SDMA_LS
	.comm	_mmSDMA0_POWER_CNTL,8,3         ; @mmSDMA0_POWER_CNTL
	.comm	_SDMA0_REGISTER_OFFSET,8,3      ; @SDMA0_REGISTER_OFFSET
	.comm	_SDMA1_REGISTER_OFFSET,8,3      ; @SDMA1_REGISTER_OFFSET
	.no_dead_strip	_cik_enable_sdma_mgls
.subsections_via_symbols
