	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gfx_v7_0_init_gfx_cgpg
_gfx_v7_0_init_gfx_cgpg:                ## @gfx_v7_0_init_gfx_cgpg
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movq	32(%rdi), %rbx
	movq	_mmRLC_GPM_SCRATCH_ADDR@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	movq	_RLC_CLEAR_STATE_DESCRIPTOR_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_WREG32
	movq	_mmRLC_GPM_SCRATCH_DATA@GOTPCREL(%rip), %r15
	movl	(%r15), %r14d
	testq	%rbx, %rbx
	je	LBB0_2
## %bb.1:
	movl	28(%r13), %edi
	callq	_upper_32_bits
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_WREG32
	movl	(%r15), %r14d
	movl	28(%r13), %edi
	callq	_lower_32_bits
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_WREG32
	movl	(%r15), %edi
	movl	(%r13), %esi
	jmp	LBB0_3
LBB0_2:
	movl	%r14d, %edi
	xorl	%esi, %esi
	callq	_WREG32
	movl	(%r15), %edi
	xorl	%esi, %esi
	callq	_WREG32
	movl	(%r15), %edi
	xorl	%esi, %esi
LBB0_3:
	callq	_WREG32
	cmpq	$0, 8(%r13)
	je	LBB0_7
## %bb.4:
	movl	(%r12), %edi
	movq	_RLC_SAVE_AND_RESTORE_STARTING_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_WREG32
	cmpl	$0, 16(%r13)
	jle	LBB0_7
## %bb.5:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %edi
	movq	8(%r13), %rax
	movl	(%rax,%rbx,4), %esi
	callq	_WREG32
	incq	%rbx
	movslq	16(%r13), %rax
	cmpq	%rax, %rbx
	jl	LBB0_6
LBB0_7:
	movq	_mmRLC_PG_CNTL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_RREG32
	movq	_RLC_PG_CNTL__GFX_POWER_GATING_SRC_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	%eax, %esi
	cmpl	%esi, %eax
	je	LBB0_9
## %bb.8:
	movl	(%rbx), %edi
	callq	_WREG32
LBB0_9:
	movq	_mmRLC_SAVE_AND_RESTORE_BASE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	20(%r13), %esi
	sarl	$8, %esi
	callq	_WREG32
	movq	_mmRLC_JUMP_TABLE_RESTORE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	24(%r13), %esi
	sarl	$8, %esi
	callq	_WREG32
	movq	_mmCP_RB_WPTR_POLL_CNTL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_RREG32
	movq	_CP_RB_WPTR_POLL_CNTL__IDLE_POLL_COUNT_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_CP_RB_WPTR_POLL_CNTL__IDLE_POLL_COUNT__SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	$96, %esi
	shll	%cl, %esi
	notl	%edx
	andl	%eax, %edx
	orl	%edx, %esi
	movl	(%rbx), %edi
	callq	_WREG32
	movq	_mmRLC_PG_DELAY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$269488144, %esi                ## imm = 0x10101010
	callq	_WREG32
	movq	_mmRLC_PG_DELAY_2@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_RREG32
                                        ## kill: def $eax killed $eax def $rax
	andl	$-256, %eax
	leal	3(%rax), %esi
	movl	(%rbx), %edi
	callq	_WREG32
	movq	_mmRLC_AUTO_PG_CTRL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_RREG32
	movq	_RLC_AUTO_PG_CTRL__GRBM_REG_SAVE_GFX_IDLE_THRESHOLD_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_RLC_AUTO_PG_CTRL__GRBM_REG_SAVE_GFX_IDLE_THRESHOLD__SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	$1792, %esi                     ## imm = 0x700
	shll	%cl, %esi
	notl	%edx
	andl	%eax, %edx
	orl	%edx, %esi
	movl	(%rbx), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_WREG32                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_mmRLC_GPM_SCRATCH_ADDR,4,2     ## @mmRLC_GPM_SCRATCH_ADDR
	.comm	_RLC_CLEAR_STATE_DESCRIPTOR_OFFSET,4,2 ## @RLC_CLEAR_STATE_DESCRIPTOR_OFFSET
	.comm	_mmRLC_GPM_SCRATCH_DATA,4,2     ## @mmRLC_GPM_SCRATCH_DATA
	.comm	_RLC_SAVE_AND_RESTORE_STARTING_OFFSET,4,2 ## @RLC_SAVE_AND_RESTORE_STARTING_OFFSET
	.comm	_mmRLC_PG_CNTL,4,2              ## @mmRLC_PG_CNTL
	.comm	_RLC_PG_CNTL__GFX_POWER_GATING_SRC_MASK,4,2 ## @RLC_PG_CNTL__GFX_POWER_GATING_SRC_MASK
	.comm	_mmRLC_SAVE_AND_RESTORE_BASE,4,2 ## @mmRLC_SAVE_AND_RESTORE_BASE
	.comm	_mmRLC_JUMP_TABLE_RESTORE,4,2   ## @mmRLC_JUMP_TABLE_RESTORE
	.comm	_mmCP_RB_WPTR_POLL_CNTL,4,2     ## @mmCP_RB_WPTR_POLL_CNTL
	.comm	_CP_RB_WPTR_POLL_CNTL__IDLE_POLL_COUNT_MASK,4,2 ## @CP_RB_WPTR_POLL_CNTL__IDLE_POLL_COUNT_MASK
	.comm	_CP_RB_WPTR_POLL_CNTL__IDLE_POLL_COUNT__SHIFT,4,2 ## @CP_RB_WPTR_POLL_CNTL__IDLE_POLL_COUNT__SHIFT
	.comm	_mmRLC_PG_DELAY,4,2             ## @mmRLC_PG_DELAY
	.comm	_mmRLC_PG_DELAY_2,4,2           ## @mmRLC_PG_DELAY_2
	.comm	_mmRLC_AUTO_PG_CTRL,4,2         ## @mmRLC_AUTO_PG_CTRL
	.comm	_RLC_AUTO_PG_CTRL__GRBM_REG_SAVE_GFX_IDLE_THRESHOLD_MASK,4,2 ## @RLC_AUTO_PG_CTRL__GRBM_REG_SAVE_GFX_IDLE_THRESHOLD_MASK
	.comm	_RLC_AUTO_PG_CTRL__GRBM_REG_SAVE_GFX_IDLE_THRESHOLD__SHIFT,4,2 ## @RLC_AUTO_PG_CTRL__GRBM_REG_SAVE_GFX_IDLE_THRESHOLD__SHIFT
	.no_dead_strip	_gfx_v7_0_init_gfx_cgpg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gfx_v7_0_init_gfx_cgpg
_gfx_v7_0_init_gfx_cgpg:                ; @gfx_v7_0_init_gfx_cgpg
	.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
	ldr	x23, [x0, #32]
Lloh0:
	adrp	x22, _mmRLC_GPM_SCRATCH_ADDR@GOTPAGE
Lloh1:
	ldr	x22, [x22, _mmRLC_GPM_SCRATCH_ADDR@GOTPAGEOFF]
	ldr	w0, [x22]
Lloh2:
	adrp	x8, _RLC_CLEAR_STATE_DESCRIPTOR_OFFSET@GOTPAGE
Lloh3:
	ldr	x8, [x8, _RLC_CLEAR_STATE_DESCRIPTOR_OFFSET@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	bl	_WREG32
Lloh5:
	adrp	x21, _mmRLC_GPM_SCRATCH_DATA@GOTPAGE
Lloh6:
	ldr	x21, [x21, _mmRLC_GPM_SCRATCH_DATA@GOTPAGEOFF]
	ldr	w20, [x21]
	cbz	x23, LBB0_2
; %bb.1:
	ldr	w0, [x19, #28]
	bl	_upper_32_bits
	mov	x1, x0
	mov	x0, x20
	bl	_WREG32
	ldr	w20, [x21]
	ldr	w0, [x19, #28]
	bl	_lower_32_bits
	mov	x1, x0
	mov	x0, x20
	bl	_WREG32
	ldr	w0, [x21]
	ldr	w1, [x19]
	b	LBB0_3
LBB0_2:
	mov	x0, x20
	mov	w1, #0
	bl	_WREG32
	ldr	w0, [x21]
	mov	w1, #0
	bl	_WREG32
	ldr	w0, [x21]
	mov	w1, #0
LBB0_3:
	bl	_WREG32
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_7
; %bb.4:
	ldr	w0, [x22]
Lloh7:
	adrp	x8, _RLC_SAVE_AND_RESTORE_STARTING_OFFSET@GOTPAGE
Lloh8:
	ldr	x8, [x8, _RLC_SAVE_AND_RESTORE_STARTING_OFFSET@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	bl	_WREG32
	ldr	w8, [x19, #16]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.5:
	mov	x20, #0
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x21]
	ldr	x8, [x19, #8]
	ldr	w1, [x8, x20, lsl #2]
	bl	_WREG32
	add	x20, x20, #1
	ldrsw	x8, [x19, #16]
	cmp	x20, x8
	b.lt	LBB0_6
LBB0_7:
Lloh10:
	adrp	x20, _mmRLC_PG_CNTL@GOTPAGE
Lloh11:
	ldr	x20, [x20, _mmRLC_PG_CNTL@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_RREG32
Lloh12:
	adrp	x8, _RLC_PG_CNTL__GFX_POWER_GATING_SRC_MASK@GOTPAGE
Lloh13:
	ldr	x8, [x8, _RLC_PG_CNTL__GFX_POWER_GATING_SRC_MASK@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	orr	w1, w8, w0
	cmp	w0, w1
	b.eq	LBB0_9
; %bb.8:
	ldr	w0, [x20]
	bl	_WREG32
LBB0_9:
Lloh15:
	adrp	x8, _mmRLC_SAVE_AND_RESTORE_BASE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _mmRLC_SAVE_AND_RESTORE_BASE@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	ldr	w8, [x19, #20]
	asr	w1, w8, #8
	bl	_WREG32
Lloh18:
	adrp	x8, _mmRLC_JUMP_TABLE_RESTORE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _mmRLC_JUMP_TABLE_RESTORE@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	ldr	w8, [x19, #24]
	asr	w1, w8, #8
	bl	_WREG32
Lloh21:
	adrp	x19, _mmCP_RB_WPTR_POLL_CNTL@GOTPAGE
Lloh22:
	ldr	x19, [x19, _mmCP_RB_WPTR_POLL_CNTL@GOTPAGEOFF]
	ldr	w0, [x19]
	bl	_RREG32
Lloh23:
	adrp	x8, _CP_RB_WPTR_POLL_CNTL__IDLE_POLL_COUNT_MASK@GOTPAGE
Lloh24:
	ldr	x8, [x8, _CP_RB_WPTR_POLL_CNTL__IDLE_POLL_COUNT_MASK@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
Lloh26:
	adrp	x9, _CP_RB_WPTR_POLL_CNTL__IDLE_POLL_COUNT__SHIFT@GOTPAGE
Lloh27:
	ldr	x9, [x9, _CP_RB_WPTR_POLL_CNTL__IDLE_POLL_COUNT__SHIFT@GOTPAGEOFF]
	bic	w8, w0, w8
Lloh28:
	ldr	w9, [x9]
	mov	w10, #96
	lsl	w9, w10, w9
	orr	w1, w9, w8
	ldr	w0, [x19]
	bl	_WREG32
Lloh29:
	adrp	x8, _mmRLC_PG_DELAY@GOTPAGE
Lloh30:
	ldr	x8, [x8, _mmRLC_PG_DELAY@GOTPAGEOFF]
Lloh31:
	ldr	w0, [x8]
	mov	w1, #269488144
	bl	_WREG32
Lloh32:
	adrp	x19, _mmRLC_PG_DELAY_2@GOTPAGE
Lloh33:
	ldr	x19, [x19, _mmRLC_PG_DELAY_2@GOTPAGEOFF]
	ldr	w0, [x19]
	bl	_RREG32
	and	w8, w0, #0xffffff00
	orr	w1, w8, #0x3
	ldr	w0, [x19]
	bl	_WREG32
Lloh34:
	adrp	x19, _mmRLC_AUTO_PG_CTRL@GOTPAGE
Lloh35:
	ldr	x19, [x19, _mmRLC_AUTO_PG_CTRL@GOTPAGEOFF]
	ldr	w0, [x19]
	bl	_RREG32
Lloh36:
	adrp	x8, _RLC_AUTO_PG_CTRL__GRBM_REG_SAVE_GFX_IDLE_THRESHOLD_MASK@GOTPAGE
Lloh37:
	ldr	x8, [x8, _RLC_AUTO_PG_CTRL__GRBM_REG_SAVE_GFX_IDLE_THRESHOLD_MASK@GOTPAGEOFF]
Lloh38:
	ldr	w8, [x8]
	bic	w8, w0, w8
Lloh39:
	adrp	x9, _RLC_AUTO_PG_CTRL__GRBM_REG_SAVE_GFX_IDLE_THRESHOLD__SHIFT@GOTPAGE
Lloh40:
	ldr	x9, [x9, _RLC_AUTO_PG_CTRL__GRBM_REG_SAVE_GFX_IDLE_THRESHOLD__SHIFT@GOTPAGEOFF]
Lloh41:
	ldr	w9, [x9]
	mov	w10, #1792
	lsl	w9, w10, w9
	orr	w1, w9, w8
	ldr	w0, [x19]
	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
	b	_WREG32
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_mmRLC_GPM_SCRATCH_ADDR,4,2     ; @mmRLC_GPM_SCRATCH_ADDR
	.comm	_RLC_CLEAR_STATE_DESCRIPTOR_OFFSET,4,2 ; @RLC_CLEAR_STATE_DESCRIPTOR_OFFSET
	.comm	_mmRLC_GPM_SCRATCH_DATA,4,2     ; @mmRLC_GPM_SCRATCH_DATA
	.comm	_RLC_SAVE_AND_RESTORE_STARTING_OFFSET,4,2 ; @RLC_SAVE_AND_RESTORE_STARTING_OFFSET
	.comm	_mmRLC_PG_CNTL,4,2              ; @mmRLC_PG_CNTL
	.comm	_RLC_PG_CNTL__GFX_POWER_GATING_SRC_MASK,4,2 ; @RLC_PG_CNTL__GFX_POWER_GATING_SRC_MASK
	.comm	_mmRLC_SAVE_AND_RESTORE_BASE,4,2 ; @mmRLC_SAVE_AND_RESTORE_BASE
	.comm	_mmRLC_JUMP_TABLE_RESTORE,4,2   ; @mmRLC_JUMP_TABLE_RESTORE
	.comm	_mmCP_RB_WPTR_POLL_CNTL,4,2     ; @mmCP_RB_WPTR_POLL_CNTL
	.comm	_CP_RB_WPTR_POLL_CNTL__IDLE_POLL_COUNT_MASK,4,2 ; @CP_RB_WPTR_POLL_CNTL__IDLE_POLL_COUNT_MASK
	.comm	_CP_RB_WPTR_POLL_CNTL__IDLE_POLL_COUNT__SHIFT,4,2 ; @CP_RB_WPTR_POLL_CNTL__IDLE_POLL_COUNT__SHIFT
	.comm	_mmRLC_PG_DELAY,4,2             ; @mmRLC_PG_DELAY
	.comm	_mmRLC_PG_DELAY_2,4,2           ; @mmRLC_PG_DELAY_2
	.comm	_mmRLC_AUTO_PG_CTRL,4,2         ; @mmRLC_AUTO_PG_CTRL
	.comm	_RLC_AUTO_PG_CTRL__GRBM_REG_SAVE_GFX_IDLE_THRESHOLD_MASK,4,2 ; @RLC_AUTO_PG_CTRL__GRBM_REG_SAVE_GFX_IDLE_THRESHOLD_MASK
	.comm	_RLC_AUTO_PG_CTRL__GRBM_REG_SAVE_GFX_IDLE_THRESHOLD__SHIFT,4,2 ; @RLC_AUTO_PG_CTRL__GRBM_REG_SAVE_GFX_IDLE_THRESHOLD__SHIFT
	.no_dead_strip	_gfx_v7_0_init_gfx_cgpg
.subsections_via_symbols
