	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ast_post_gpu                   ## -- Begin function ast_post_gpu
	.p2align	4, 0x90
_ast_post_gpu:                          ## @ast_post_gpu
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	(%rdi), %rbx
	movq	24(%rbx), %rax
	movl	(%rax), %edi
	leaq	-20(%rbp), %rdx
	movl	$4, %esi
	callq	_pci_read_config_dword
	movl	-20(%rbp), %edx
	orl	$3, %edx
	movl	%edx, -20(%rbp)
	movq	24(%rbx), %rax
	movl	(%rax), %edi
	movl	$4, %esi
	callq	_pci_write_config_dword
	movq	%r14, %rdi
	callq	_ast_enable_vga
	movq	%rbx, %rdi
	callq	_ast_open_key
	movq	%r14, %rdi
	callq	_ast_enable_mmio
	movq	%r14, %rdi
	callq	_ast_set_def_ext_reg
	movq	(%rbx), %rax
	movq	_ast_use_p2a@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.1:
	movq	8(%rbx), %rax
	movq	_AST2500@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.2:
	movq	%r14, %rdi
	callq	_ast_post_chip_2500
	jmp	LBB0_7
LBB0_8:
	movq	16(%rbx), %rax
	movq	_AST_TX_NONE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_10
## %bb.9:
	movq	_AST_IO_CRTC_PORT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$163, %edx
	movl	$207, %ecx
	movl	$128, %r8d
	callq	_ast_set_index_reg_mask
	jmp	LBB0_10
LBB0_3:
	movq	_AST2300@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_5
## %bb.4:
	movq	_AST2400@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_5
## %bb.6:
	movq	%r14, %rdi
	callq	_ast_init_dram_reg
	jmp	LBB0_7
LBB0_5:
	movq	%r14, %rdi
	callq	_ast_post_chip_2300
LBB0_7:
	movq	%r14, %rdi
	callq	_ast_init_3rdtx
LBB0_10:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ast_use_p2a,8,3                ## @ast_use_p2a
	.comm	_AST2500,8,3                    ## @AST2500
	.comm	_AST2300,8,3                    ## @AST2300
	.comm	_AST2400,8,3                    ## @AST2400
	.comm	_AST_TX_NONE,8,3                ## @AST_TX_NONE
	.comm	_AST_IO_CRTC_PORT,4,2           ## @AST_IO_CRTC_PORT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ast_post_gpu                   ; -- Begin function ast_post_gpu
	.p2align	2
_ast_post_gpu:                          ; @ast_post_gpu
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
	ldr	x20, [x0]
	ldr	x8, [x20, #24]
	ldr	w0, [x8]
	add	x2, sp, #12
	mov	w1, #4
	bl	_pci_read_config_dword
	ldr	w8, [sp, #12]
	orr	w2, w8, #0x3
	str	w2, [sp, #12]
	ldr	x8, [x20, #24]
	ldr	w0, [x8]
	mov	w1, #4
	bl	_pci_write_config_dword
	mov	x0, x19
	bl	_ast_enable_vga
	mov	x0, x20
	bl	_ast_open_key
	mov	x0, x19
	bl	_ast_enable_mmio
	mov	x0, x19
	bl	_ast_set_def_ext_reg
	ldr	x8, [x20]
Lloh0:
	adrp	x9, _ast_use_p2a@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ast_use_p2a@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.1:
	ldr	x8, [x20, #8]
Lloh3:
	adrp	x9, _AST2500@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AST2500@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.2:
	mov	x0, x19
	bl	_ast_post_chip_2500
	b	LBB0_8
LBB0_3:
	ldr	x8, [x20, #16]
Lloh6:
	adrp	x9, _AST_TX_NONE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _AST_TX_NONE@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_9
; %bb.4:
Lloh9:
	adrp	x8, _AST_IO_CRTC_PORT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AST_IO_CRTC_PORT@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #163
	mov	w3, #207
	mov	w4, #128
	bl	_ast_set_index_reg_mask
	b	LBB0_9
LBB0_5:
Lloh12:
	adrp	x9, _AST2300@GOTPAGE
Lloh13:
	ldr	x9, [x9, _AST2300@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
Lloh15:
	adrp	x10, _AST2400@GOTPAGE
Lloh16:
	ldr	x10, [x10, _AST2400@GOTPAGEOFF]
Lloh17:
	ldr	x10, [x10]
	cmp	x8, x9
	mov	x0, x19
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_7
; %bb.6:
	bl	_ast_post_chip_2300
	b	LBB0_8
LBB0_7:
	bl	_ast_init_dram_reg
LBB0_8:
	mov	x0, x19
	bl	_ast_init_3rdtx
LBB0_9:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_ast_use_p2a,8,3                ; @ast_use_p2a
	.comm	_AST2500,8,3                    ; @AST2500
	.comm	_AST2300,8,3                    ; @AST2300
	.comm	_AST2400,8,3                    ; @AST2400
	.comm	_AST_TX_NONE,8,3                ; @AST_TX_NONE
	.comm	_AST_IO_CRTC_PORT,4,2           ; @AST_IO_CRTC_PORT
.subsections_via_symbols
