	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ast_post_chip_2500             ## -- Begin function ast_post_chip_2500
	.p2align	4, 0x90
_ast_post_chip_2500:                    ## @ast_post_chip_2500
	.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), %rbx
	movq	_AST_IO_CRTC_PORT@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%rbx, %rdi
	movl	$208, %edx
	movl	$255, %ecx
	callq	_ast_get_index_reg_mask
	testb	$-128, %al
	jne	LBB0_10
## %bb.1:
	movq	%rbx, %rdi
	movl	$509607936, %esi                ## imm = 0x1E600000
	movl	$-1360193021, %edx              ## imm = 0xAEED1A03
	callq	_ast_moutdwm
	movq	%rbx, %rdi
	movl	$509608068, %esi                ## imm = 0x1E600084
	movl	$65536, %edx                    ## imm = 0x10000
	callq	_ast_moutdwm
	movq	%rbx, %rdi
	movl	$509608072, %esi                ## imm = 0x1E600088
	xorl	%edx, %edx
	callq	_ast_moutdwm
	movq	%rbx, %rdi
	movl	$510533632, %esi                ## imm = 0x1E6E2000
	movl	$378054824, %edx                ## imm = 0x1688A8A8
	callq	_ast_moutdwm
	movq	%rbx, %rdi
	movl	$61444, %esi                    ## imm = 0xF004
	movl	$510525440, %edx                ## imm = 0x1E6E0000
	callq	_ast_write32
	movq	%rbx, %rdi
	movl	$61440, %esi                    ## imm = 0xF000
	movl	$1, %edx
	callq	_ast_write32
	movq	%rbx, %rdi
	movl	$73728, %esi                    ## imm = 0x12000
	movl	$378054824, %edx                ## imm = 0x1688A8A8
	callq	_ast_write32
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movl	$73728, %esi                    ## imm = 0x12000
	callq	_ast_read32
	cmpl	$1, %eax
	jne	LBB0_2
## %bb.3:
	movq	%rbx, %rdi
	movl	$65536, %esi                    ## imm = 0x10000
	movl	$-60816631, %edx                ## imm = 0xFC600309
	callq	_ast_write32
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movl	$65536, %esi                    ## imm = 0x10000
	callq	_ast_read32
	cmpl	$1, %eax
	jne	LBB0_4
## %bb.5:
	movq	%rbx, %rdi
	movl	$73736, %esi                    ## imm = 0x12008
	callq	_ast_read32
	orl	$115, %eax
	movq	%rbx, %rdi
	movl	$73736, %esi                    ## imm = 0x12008
	movl	%eax, %edx
	callq	_ast_write32
	movq	%rbx, %rdi
	movl	$510533776, %esi                ## imm = 0x1E6E2090
	movl	$536870912, %edx                ## imm = 0x20000000
	callq	_ast_moutdwm
	movq	%rbx, %rdi
	movl	$510533780, %esi                ## imm = 0x1E6E2094
	callq	_ast_mindwm
	orl	$16384, %eax                    ## imm = 0x4000
	movq	%rbx, %rdi
	movl	$510533780, %esi                ## imm = 0x1E6E2094
	movl	%eax, %edx
	callq	_ast_moutdwm
	movq	%rbx, %rdi
	movl	$510533744, %esi                ## imm = 0x1E6E2070
	callq	_ast_mindwm
	testl	$8388608, %eax                  ## imm = 0x800000
	je	LBB0_7
## %bb.6:
	movq	%rbx, %rdi
	movl	$510533756, %esi                ## imm = 0x1E6E207C
	movl	$8388608, %edx                  ## imm = 0x800000
	callq	_ast_moutdwm
	movl	$100, %edi
	callq	_mdelay
	movq	%rbx, %rdi
	movl	$510533744, %esi                ## imm = 0x1E6E2070
	movl	$8388608, %edx                  ## imm = 0x800000
	callq	_ast_moutdwm
LBB0_7:
	movq	%rbx, %rdi
	callq	_ast_dram_init_2500
	testl	%eax, %eax
	jne	LBB0_9
## %bb.8:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
LBB0_9:
	movq	%rbx, %rdi
	movl	$510533696, %esi                ## imm = 0x1E6E2040
	callq	_ast_mindwm
	orl	$64, %eax
	movq	%rbx, %rdi
	movl	$510533696, %esi                ## imm = 0x1E6E2040
	movl	%eax, %edx
	callq	_ast_moutdwm
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %esi
	movq	%rbx, %rdi
	movl	$208, %edx
	movl	$255, %ecx
	callq	_ast_get_index_reg_mask
	testb	$64, %al
	je	LBB0_10
## %bb.11:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AST_IO_CRTC_PORT,4,2           ## @AST_IO_CRTC_PORT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"DRAM init failed !\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ast_post_chip_2500             ; -- Begin function ast_post_chip_2500
	.p2align	2
_ast_post_chip_2500:                    ; @ast_post_chip_2500
	.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
	ldr	x19, [x0]
Lloh0:
	adrp	x21, _AST_IO_CRTC_PORT@GOTPAGE
Lloh1:
	ldr	x21, [x21, _AST_IO_CRTC_PORT@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	mov	w2, #208
	mov	w3, #255
	bl	_ast_get_index_reg_mask
	tbnz	w0, #7, LBB0_10
; %bb.1:
	mov	w22, #8256
	movk	w22, #7790, lsl #16
	mov	w20, #8192
	movk	w20, #1, lsl #16
	mov	x0, x19
	mov	w1, #509607936
	mov	w2, #6659
	movk	w2, #44781, lsl #16
	bl	_ast_moutdwm
	mov	w23, #132
	movk	w23, #7776, lsl #16
	mov	x0, x19
	mov	w1, #132
	movk	w1, #7776, lsl #16
	mov	w2, #65536
	bl	_ast_moutdwm
	add	w1, w23, #4
	mov	x0, x19
	mov	w2, #0
	bl	_ast_moutdwm
	sub	w1, w22, #64
	mov	x0, x19
	mov	w2, #43176
	movk	w2, #5768, lsl #16
	bl	_ast_moutdwm
	mov	x0, x19
	mov	w1, #61444
	mov	w2, #510525440
	bl	_ast_write32
	mov	x0, x19
	mov	w1, #61440
	mov	w2, #1
	bl	_ast_write32
	mov	x0, x19
	mov	w1, #8192
	movk	w1, #1, lsl #16
	mov	w2, #43176
	movk	w2, #5768, lsl #16
	bl	_ast_write32
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	w1, #8192
	movk	w1, #1, lsl #16
	bl	_ast_read32
	cmp	w0, #1
	b.ne	LBB0_2
; %bb.3:
	mov	x0, x19
	mov	w1, #65536
	mov	w2, #777
	movk	w2, #64608, lsl #16
	bl	_ast_write32
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	w1, #65536
	bl	_ast_read32
	cmp	w0, #1
	b.ne	LBB0_4
; %bb.5:
	add	w20, w20, #8
	mov	x0, x19
	mov	x1, x20
	bl	_ast_read32
	mov	w8, #115
	orr	w2, w0, w8
	mov	x0, x19
	mov	x1, x20
	bl	_ast_write32
	add	w1, w22, #80
	mov	x0, x19
	mov	w2, #536870912
	bl	_ast_moutdwm
	add	w20, w22, #84
	mov	x0, x19
	mov	x1, x20
	bl	_ast_mindwm
	orr	w2, w0, #0x4000
	mov	x0, x19
	mov	x1, x20
	bl	_ast_moutdwm
	add	w20, w22, #48
	mov	x0, x19
	mov	x1, x20
	bl	_ast_mindwm
	tbz	w0, #23, LBB0_7
; %bb.6:
	add	w1, w22, #60
	mov	x0, x19
	mov	w2, #8388608
	bl	_ast_moutdwm
	mov	w0, #100
	bl	_mdelay
	mov	x0, x19
	mov	x1, x20
	mov	w2, #8388608
	bl	_ast_moutdwm
LBB0_7:
	mov	x0, x19
	bl	_ast_dram_init_2500
	cbnz	w0, LBB0_9
; %bb.8:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
LBB0_9:
	mov	x0, x19
	mov	w1, #8256
	movk	w1, #7790, lsl #16
	bl	_ast_mindwm
	orr	w2, w0, #0x40
	mov	x0, x19
	mov	w1, #8256
	movk	w1, #7790, lsl #16
	bl	_ast_moutdwm
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x21]
	mov	x0, x19
	mov	w2, #208
	mov	w3, #255
	bl	_ast_get_index_reg_mask
	tbz	w0, #6, LBB0_10
; %bb.11:
	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
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_AST_IO_CRTC_PORT,4,2           ; @AST_IO_CRTC_PORT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"DRAM init failed !\n"

.subsections_via_symbols
