	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gmc_v7_0_mc_program
_gmc_v7_0_mc_program:                   ## @gmc_v7_0_mc_program
	.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
	movq	%rdi, %r14
	movl	$2821, %ebx                     ## imm = 0xB05
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	xorl	%esi, %esi
	callq	_WREG32
	leal	1(%rbx), %edi
	xorl	%esi, %esi
	callq	_WREG32
	leal	2(%rbx), %edi
	xorl	%esi, %esi
	callq	_WREG32
	leal	3(%rbx), %edi
	xorl	%esi, %esi
	callq	_WREG32
	leal	4(%rbx), %edi
	xorl	%esi, %esi
	callq	_WREG32
	addl	$6, %ebx
	cmpl	$3013, %ebx                     ## imm = 0xBC5
	jne	LBB0_1
## %bb.2:
	movq	_mmHDP_REG_COHERENCY_FLUSH_CNTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_WREG32
	movq	%r14, %rdi
	callq	_gmc_v7_0_wait_for_idle
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_warn
LBB0_4:
	cmpq	$0, 16(%r14)
	je	LBB0_6
## %bb.5:
	movq	_mmVGA_HDP_CONTROL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_RREG32
	movq	_VGA_HDP_CONTROL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_VGA_MEMORY_DISABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	movl	$1, %ecx
	callq	_REG_SET_FIELD
	movl	(%rbx), %edi
	movl	%eax, %esi
	callq	_WREG32
	movq	_mmVGA_RENDER_CONTROL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_RREG32
	movq	_VGA_RENDER_CONTROL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_VGA_VSTATUS_CNTL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	xorl	%ecx, %ecx
	callq	_REG_SET_FIELD
	movl	(%rbx), %edi
	movl	%eax, %esi
	callq	_WREG32
LBB0_6:
	movq	_mmMC_VM_SYSTEM_APERTURE_LOW_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	8(%r14), %esi
	sarl	$12, %esi
	callq	_WREG32
	movq	_mmMC_VM_SYSTEM_APERTURE_HIGH_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	12(%r14), %esi
	sarl	$12, %esi
	callq	_WREG32
	movq	_mmMC_VM_SYSTEM_APERTURE_DEFAULT_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	4(%r14), %esi
	sarl	$12, %esi
	callq	_WREG32
	movq	_mmMC_VM_AGP_BASE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_WREG32
	movq	_mmMC_VM_AGP_TOP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$268435455, %esi                ## imm = 0xFFFFFFF
	callq	_WREG32
	movq	_mmMC_VM_AGP_BOT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$268435455, %esi                ## imm = 0xFFFFFFF
	callq	_WREG32
	movq	%r14, %rdi
	callq	_gmc_v7_0_wait_for_idle
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_warn
LBB0_8:
	movq	_mmBIF_FB_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_BIF_FB_EN__FB_READ_EN_MASK@GOTPCREL(%rip), %rax
	movq	_BIF_FB_EN__FB_WRITE_EN_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	callq	_WREG32
	movq	_mmHDP_MISC_CNTL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_RREG32
	movq	_HDP_MISC_CNTL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_FLUSH_INVALIDATE_CACHE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	xorl	%ecx, %ecx
	callq	_REG_SET_FIELD
	movl	(%rbx), %edi
	movl	%eax, %esi
	callq	_WREG32
	movq	_mmHDP_HOST_PATH_CNTL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_RREG32
	movl	(%rbx), %edi
	movl	%eax, %esi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_WREG32                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_mmHDP_REG_COHERENCY_FLUSH_CNTL,4,2 ## @mmHDP_REG_COHERENCY_FLUSH_CNTL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Wait for MC idle timedout !\n"

	.comm	_mmVGA_HDP_CONTROL,4,2          ## @mmVGA_HDP_CONTROL
	.comm	_VGA_HDP_CONTROL,4,2            ## @VGA_HDP_CONTROL
	.comm	_VGA_MEMORY_DISABLE,4,2         ## @VGA_MEMORY_DISABLE
	.comm	_mmVGA_RENDER_CONTROL,4,2       ## @mmVGA_RENDER_CONTROL
	.comm	_VGA_RENDER_CONTROL,4,2         ## @VGA_RENDER_CONTROL
	.comm	_VGA_VSTATUS_CNTL,4,2           ## @VGA_VSTATUS_CNTL
	.comm	_mmMC_VM_SYSTEM_APERTURE_LOW_ADDR,4,2 ## @mmMC_VM_SYSTEM_APERTURE_LOW_ADDR
	.comm	_mmMC_VM_SYSTEM_APERTURE_HIGH_ADDR,4,2 ## @mmMC_VM_SYSTEM_APERTURE_HIGH_ADDR
	.comm	_mmMC_VM_SYSTEM_APERTURE_DEFAULT_ADDR,4,2 ## @mmMC_VM_SYSTEM_APERTURE_DEFAULT_ADDR
	.comm	_mmMC_VM_AGP_BASE,4,2           ## @mmMC_VM_AGP_BASE
	.comm	_mmMC_VM_AGP_TOP,4,2            ## @mmMC_VM_AGP_TOP
	.comm	_mmMC_VM_AGP_BOT,4,2            ## @mmMC_VM_AGP_BOT
	.comm	_mmBIF_FB_EN,4,2                ## @mmBIF_FB_EN
	.comm	_BIF_FB_EN__FB_READ_EN_MASK,4,2 ## @BIF_FB_EN__FB_READ_EN_MASK
	.comm	_BIF_FB_EN__FB_WRITE_EN_MASK,4,2 ## @BIF_FB_EN__FB_WRITE_EN_MASK
	.comm	_mmHDP_MISC_CNTL,4,2            ## @mmHDP_MISC_CNTL
	.comm	_HDP_MISC_CNTL,4,2              ## @HDP_MISC_CNTL
	.comm	_FLUSH_INVALIDATE_CACHE,4,2     ## @FLUSH_INVALIDATE_CACHE
	.comm	_mmHDP_HOST_PATH_CNTL,4,2       ## @mmHDP_HOST_PATH_CNTL
	.no_dead_strip	_gmc_v7_0_mc_program
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gmc_v7_0_mc_program
_gmc_v7_0_mc_program:                   ; @gmc_v7_0_mc_program
	.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
	mov	x19, x0
	mov	w20, #2821
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	w1, #0
	bl	_WREG32
	add	w0, w20, #1
	mov	w1, #0
	bl	_WREG32
	add	w0, w20, #2
	mov	w1, #0
	bl	_WREG32
	add	w0, w20, #3
	mov	w1, #0
	bl	_WREG32
	add	w0, w20, #4
	mov	w1, #0
	bl	_WREG32
	add	w20, w20, #6
	cmp	w20, #3013
	b.ne	LBB0_1
; %bb.2:
Lloh0:
	adrp	x8, _mmHDP_REG_COHERENCY_FLUSH_CNTL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _mmHDP_REG_COHERENCY_FLUSH_CNTL@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_WREG32
	mov	x0, x19
	bl	_gmc_v7_0_wait_for_idle
	cbz	x0, LBB0_4
; %bb.3:
	ldr	w0, [x19]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_warn
LBB0_4:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_6
; %bb.5:
Lloh5:
	adrp	x20, _mmVGA_HDP_CONTROL@GOTPAGE
Lloh6:
	ldr	x20, [x20, _mmVGA_HDP_CONTROL@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_RREG32
Lloh7:
	adrp	x8, _VGA_HDP_CONTROL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _VGA_HDP_CONTROL@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
Lloh10:
	adrp	x8, _VGA_MEMORY_DISABLE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _VGA_MEMORY_DISABLE@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
	mov	w3, #1
	bl	_REG_SET_FIELD
	mov	x1, x0
	ldr	w0, [x20]
	bl	_WREG32
Lloh13:
	adrp	x20, _mmVGA_RENDER_CONTROL@GOTPAGE
Lloh14:
	ldr	x20, [x20, _mmVGA_RENDER_CONTROL@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_RREG32
Lloh15:
	adrp	x8, _VGA_RENDER_CONTROL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _VGA_RENDER_CONTROL@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
Lloh18:
	adrp	x8, _VGA_VSTATUS_CNTL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _VGA_VSTATUS_CNTL@GOTPAGEOFF]
Lloh20:
	ldr	w2, [x8]
	mov	w3, #0
	bl	_REG_SET_FIELD
	mov	x1, x0
	ldr	w0, [x20]
	bl	_WREG32
LBB0_6:
Lloh21:
	adrp	x8, _mmMC_VM_SYSTEM_APERTURE_LOW_ADDR@GOTPAGE
Lloh22:
	ldr	x8, [x8, _mmMC_VM_SYSTEM_APERTURE_LOW_ADDR@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
	ldr	w8, [x19, #8]
	asr	w1, w8, #12
	bl	_WREG32
Lloh24:
	adrp	x8, _mmMC_VM_SYSTEM_APERTURE_HIGH_ADDR@GOTPAGE
Lloh25:
	ldr	x8, [x8, _mmMC_VM_SYSTEM_APERTURE_HIGH_ADDR@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
	ldr	w8, [x19, #12]
	asr	w1, w8, #12
	bl	_WREG32
Lloh27:
	adrp	x8, _mmMC_VM_SYSTEM_APERTURE_DEFAULT_ADDR@GOTPAGE
Lloh28:
	ldr	x8, [x8, _mmMC_VM_SYSTEM_APERTURE_DEFAULT_ADDR@GOTPAGEOFF]
Lloh29:
	ldr	w0, [x8]
	ldr	w8, [x19, #4]
	asr	w1, w8, #12
	bl	_WREG32
Lloh30:
	adrp	x8, _mmMC_VM_AGP_BASE@GOTPAGE
Lloh31:
	ldr	x8, [x8, _mmMC_VM_AGP_BASE@GOTPAGEOFF]
Lloh32:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_WREG32
Lloh33:
	adrp	x8, _mmMC_VM_AGP_TOP@GOTPAGE
Lloh34:
	ldr	x8, [x8, _mmMC_VM_AGP_TOP@GOTPAGEOFF]
Lloh35:
	ldr	w0, [x8]
	mov	w1, #268435455
	bl	_WREG32
Lloh36:
	adrp	x8, _mmMC_VM_AGP_BOT@GOTPAGE
Lloh37:
	ldr	x8, [x8, _mmMC_VM_AGP_BOT@GOTPAGEOFF]
Lloh38:
	ldr	w0, [x8]
	mov	w1, #268435455
	bl	_WREG32
	mov	x0, x19
	bl	_gmc_v7_0_wait_for_idle
	cbz	x0, LBB0_8
; %bb.7:
	ldr	w0, [x19]
Lloh39:
	adrp	x1, l_.str@PAGE
Lloh40:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_warn
LBB0_8:
Lloh41:
	adrp	x8, _mmBIF_FB_EN@GOTPAGE
Lloh42:
	ldr	x8, [x8, _mmBIF_FB_EN@GOTPAGEOFF]
Lloh43:
	adrp	x9, _BIF_FB_EN__FB_READ_EN_MASK@GOTPAGE
Lloh44:
	ldr	x9, [x9, _BIF_FB_EN__FB_READ_EN_MASK@GOTPAGEOFF]
Lloh45:
	ldr	w0, [x8]
Lloh46:
	ldr	w8, [x9]
Lloh47:
	adrp	x9, _BIF_FB_EN__FB_WRITE_EN_MASK@GOTPAGE
Lloh48:
	ldr	x9, [x9, _BIF_FB_EN__FB_WRITE_EN_MASK@GOTPAGEOFF]
Lloh49:
	ldr	w9, [x9]
	orr	w1, w9, w8
	bl	_WREG32
Lloh50:
	adrp	x19, _mmHDP_MISC_CNTL@GOTPAGE
Lloh51:
	ldr	x19, [x19, _mmHDP_MISC_CNTL@GOTPAGEOFF]
	ldr	w0, [x19]
	bl	_RREG32
Lloh52:
	adrp	x8, _HDP_MISC_CNTL@GOTPAGE
Lloh53:
	ldr	x8, [x8, _HDP_MISC_CNTL@GOTPAGEOFF]
Lloh54:
	ldr	w1, [x8]
Lloh55:
	adrp	x8, _FLUSH_INVALIDATE_CACHE@GOTPAGE
Lloh56:
	ldr	x8, [x8, _FLUSH_INVALIDATE_CACHE@GOTPAGEOFF]
Lloh57:
	ldr	w2, [x8]
	mov	w3, #0
	bl	_REG_SET_FIELD
	mov	x1, x0
	ldr	w0, [x19]
	bl	_WREG32
Lloh58:
	adrp	x19, _mmHDP_HOST_PATH_CNTL@GOTPAGE
Lloh59:
	ldr	x19, [x19, _mmHDP_HOST_PATH_CNTL@GOTPAGEOFF]
	ldr	w0, [x19]
	bl	_RREG32
	mov	x1, x0
	ldr	w0, [x19]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_WREG32
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpLdrGot	Lloh58, Lloh59
	.loh AdrpLdrGotLdr	Lloh55, Lloh56, Lloh57
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpLdrGot	Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh46
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh45
	.cfi_endproc
                                        ; -- End function
	.comm	_mmHDP_REG_COHERENCY_FLUSH_CNTL,4,2 ; @mmHDP_REG_COHERENCY_FLUSH_CNTL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Wait for MC idle timedout !\n"

	.comm	_mmVGA_HDP_CONTROL,4,2          ; @mmVGA_HDP_CONTROL
	.comm	_VGA_HDP_CONTROL,4,2            ; @VGA_HDP_CONTROL
	.comm	_VGA_MEMORY_DISABLE,4,2         ; @VGA_MEMORY_DISABLE
	.comm	_mmVGA_RENDER_CONTROL,4,2       ; @mmVGA_RENDER_CONTROL
	.comm	_VGA_RENDER_CONTROL,4,2         ; @VGA_RENDER_CONTROL
	.comm	_VGA_VSTATUS_CNTL,4,2           ; @VGA_VSTATUS_CNTL
	.comm	_mmMC_VM_SYSTEM_APERTURE_LOW_ADDR,4,2 ; @mmMC_VM_SYSTEM_APERTURE_LOW_ADDR
	.comm	_mmMC_VM_SYSTEM_APERTURE_HIGH_ADDR,4,2 ; @mmMC_VM_SYSTEM_APERTURE_HIGH_ADDR
	.comm	_mmMC_VM_SYSTEM_APERTURE_DEFAULT_ADDR,4,2 ; @mmMC_VM_SYSTEM_APERTURE_DEFAULT_ADDR
	.comm	_mmMC_VM_AGP_BASE,4,2           ; @mmMC_VM_AGP_BASE
	.comm	_mmMC_VM_AGP_TOP,4,2            ; @mmMC_VM_AGP_TOP
	.comm	_mmMC_VM_AGP_BOT,4,2            ; @mmMC_VM_AGP_BOT
	.comm	_mmBIF_FB_EN,4,2                ; @mmBIF_FB_EN
	.comm	_BIF_FB_EN__FB_READ_EN_MASK,4,2 ; @BIF_FB_EN__FB_READ_EN_MASK
	.comm	_BIF_FB_EN__FB_WRITE_EN_MASK,4,2 ; @BIF_FB_EN__FB_WRITE_EN_MASK
	.comm	_mmHDP_MISC_CNTL,4,2            ; @mmHDP_MISC_CNTL
	.comm	_HDP_MISC_CNTL,4,2              ; @HDP_MISC_CNTL
	.comm	_FLUSH_INVALIDATE_CACHE,4,2     ; @FLUSH_INVALIDATE_CACHE
	.comm	_mmHDP_HOST_PATH_CNTL,4,2       ; @mmHDP_HOST_PATH_CNTL
	.no_dead_strip	_gmc_v7_0_mc_program
.subsections_via_symbols
