	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function r300_gpu_init
_r300_gpu_init:                         ## @r300_gpu_init
	.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	(%rdi), %rax
	movq	_CHIP_R300@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.1:
	movq	16(%rbx), %rcx
	cmpl	$16708, (%rcx)                  ## imm = 0x4144
	jne	LBB0_2
LBB0_3:
	movq	_CHIP_R350@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.4:
	movq	16(%rbx), %rax
	cmpl	$16712, (%rax)                  ## imm = 0x4148
	jne	LBB0_2
LBB0_5:
	movq	_R300_PIPE_COUNT_RV350@GOTPCREL(%rip), %rax
	movl	$1, %ecx
	jmp	LBB0_6
LBB0_2:
	movq	_R300_PIPE_COUNT_R300@GOTPCREL(%rip), %rax
	movl	$2, %ecx
LBB0_6:
	movl	%ecx, 8(%rbx)
	movl	$1, 12(%rbx)
	movq	_R300_ENABLE_TILING@GOTPCREL(%rip), %rcx
	movq	_R300_TILE_SIZE_16@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	orl	(%rcx), %esi
	orl	(%rax), %esi
	movq	_R300_GB_TILE_CONFIG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_WREG32
	movq	%rbx, %rdi
	callq	_r100_gui_wait_for_idle
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	leaq	L_.str(%rip), %rdi
	callq	_pr_warn
LBB0_8:
	movq	_R300_DST_PIPE_CONFIG@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	callq	_RREG32
	movl	(%r14), %edi
	movq	_R300_PIPE_AUTO_CONFIG@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, %esi
	callq	_WREG32
	movq	_R300_RB2D_DSTCACHE_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_R300_DC_AUTOFLUSH_ENABLE@GOTPCREL(%rip), %rax
	movq	_R300_DC_DC_DISABLE_IGNORE_PE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	callq	_WREG32
	movq	%rbx, %rdi
	callq	_r100_gui_wait_for_idle
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	leaq	L_.str(%rip), %rdi
	callq	_pr_warn
LBB0_10:
	movq	%rbx, %rdi
	callq	_r300_mc_wait_for_idle
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	leaq	L_.str.1(%rip), %rdi
	callq	_pr_warn
LBB0_12:
	movl	8(%rbx), %esi
	movl	12(%rbx), %edx
	leaq	L_.str.2(%rip), %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_DRM_INFO                       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_CHIP_R300,8,3                  ## @CHIP_R300
	.comm	_CHIP_R350,8,3                  ## @CHIP_R350
	.comm	_R300_ENABLE_TILING,4,2         ## @R300_ENABLE_TILING
	.comm	_R300_TILE_SIZE_16,4,2          ## @R300_TILE_SIZE_16
	.comm	_R300_PIPE_COUNT_R300,4,2       ## @R300_PIPE_COUNT_R300
	.comm	_R300_PIPE_COUNT_R420_3P,4,2    ## @R300_PIPE_COUNT_R420_3P
	.comm	_R300_PIPE_COUNT_R420,4,2       ## @R300_PIPE_COUNT_R420
	.comm	_R300_PIPE_COUNT_RV350,4,2      ## @R300_PIPE_COUNT_RV350
	.comm	_R300_GB_TILE_CONFIG,4,2        ## @R300_GB_TILE_CONFIG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to wait GUI idle while programming pipes. Bad things might happen.\n"

	.comm	_R300_DST_PIPE_CONFIG,4,2       ## @R300_DST_PIPE_CONFIG
	.comm	_R300_PIPE_AUTO_CONFIG,4,2      ## @R300_PIPE_AUTO_CONFIG
	.comm	_R300_RB2D_DSTCACHE_MODE,4,2    ## @R300_RB2D_DSTCACHE_MODE
	.comm	_R300_DC_AUTOFLUSH_ENABLE,4,2   ## @R300_DC_AUTOFLUSH_ENABLE
	.comm	_R300_DC_DC_DISABLE_IGNORE_PE,4,2 ## @R300_DC_DC_DISABLE_IGNORE_PE
L_.str.1:                               ## @.str.1
	.asciz	"Failed to wait MC idle while programming pipes. Bad things might happen.\n"

L_.str.2:                               ## @.str.2
	.asciz	"radeon: %d quad pipes, %d Z pipes initialized\n"

	.no_dead_strip	_r300_gpu_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function r300_gpu_init
_r300_gpu_init:                         ; @r300_gpu_init
	.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
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _CHIP_R300@GOTPAGE
Lloh1:
	ldr	x9, [x9, _CHIP_R300@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	ldr	x9, [x19, #16]
	ldr	w9, [x9]
	mov	w10, #16708
	cmp	w9, w10
	b.ne	LBB0_5
LBB0_2:
Lloh3:
	adrp	x9, _CHIP_R350@GOTPAGE
Lloh4:
	ldr	x9, [x9, _CHIP_R350@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.3:
	ldr	x8, [x19, #16]
	ldr	w8, [x8]
	mov	w9, #16712
	cmp	w8, w9
	b.ne	LBB0_5
LBB0_4:
Lloh6:
	adrp	x8, _R300_PIPE_COUNT_RV350@GOTPAGE
Lloh7:
	ldr	x8, [x8, _R300_PIPE_COUNT_RV350@GOTPAGEOFF]
	mov	w9, #1
	b	LBB0_6
LBB0_5:
Lloh8:
	adrp	x8, _R300_PIPE_COUNT_R300@GOTPAGE
Lloh9:
	ldr	x8, [x8, _R300_PIPE_COUNT_R300@GOTPAGEOFF]
	mov	w9, #2
LBB0_6:
	mov	w10, #1
	stp	w9, w10, [x19, #8]
Lloh10:
	adrp	x9, _R300_ENABLE_TILING@GOTPAGE
Lloh11:
	ldr	x9, [x9, _R300_ENABLE_TILING@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
Lloh13:
	adrp	x10, _R300_TILE_SIZE_16@GOTPAGE
Lloh14:
	ldr	x10, [x10, _R300_TILE_SIZE_16@GOTPAGEOFF]
Lloh15:
	ldr	w10, [x10]
	orr	w9, w10, w9
	ldr	w8, [x8]
	orr	w1, w9, w8
Lloh16:
	adrp	x8, _R300_GB_TILE_CONFIG@GOTPAGE
Lloh17:
	ldr	x8, [x8, _R300_GB_TILE_CONFIG@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	bl	_WREG32
	mov	x0, x19
	bl	_r100_gui_wait_for_idle
	cbz	x0, LBB0_8
; %bb.7:
Lloh19:
	adrp	x0, l_.str@PAGE
Lloh20:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_warn
LBB0_8:
Lloh21:
	adrp	x20, _R300_DST_PIPE_CONFIG@GOTPAGE
Lloh22:
	ldr	x20, [x20, _R300_DST_PIPE_CONFIG@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_RREG32
	ldr	w8, [x20]
Lloh23:
	adrp	x9, _R300_PIPE_AUTO_CONFIG@GOTPAGE
Lloh24:
	ldr	x9, [x9, _R300_PIPE_AUTO_CONFIG@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	orr	w1, w9, w0
	mov	x0, x8
	bl	_WREG32
Lloh26:
	adrp	x8, _R300_RB2D_DSTCACHE_MODE@GOTPAGE
Lloh27:
	ldr	x8, [x8, _R300_RB2D_DSTCACHE_MODE@GOTPAGEOFF]
Lloh28:
	adrp	x9, _R300_DC_AUTOFLUSH_ENABLE@GOTPAGE
Lloh29:
	ldr	x9, [x9, _R300_DC_AUTOFLUSH_ENABLE@GOTPAGEOFF]
Lloh30:
	ldr	w0, [x8]
Lloh31:
	ldr	w8, [x9]
Lloh32:
	adrp	x9, _R300_DC_DC_DISABLE_IGNORE_PE@GOTPAGE
Lloh33:
	ldr	x9, [x9, _R300_DC_DC_DISABLE_IGNORE_PE@GOTPAGEOFF]
Lloh34:
	ldr	w9, [x9]
	orr	w1, w9, w8
	bl	_WREG32
	mov	x0, x19
	bl	_r100_gui_wait_for_idle
	cbz	x0, LBB0_10
; %bb.9:
Lloh35:
	adrp	x0, l_.str@PAGE
Lloh36:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_warn
LBB0_10:
	mov	x0, x19
	bl	_r300_mc_wait_for_idle
	cbz	x0, LBB0_12
; %bb.11:
Lloh37:
	adrp	x0, l_.str.1@PAGE
Lloh38:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_warn
LBB0_12:
	ldp	w1, w2, [x19, #8]
Lloh39:
	adrp	x0, l_.str.2@PAGE
Lloh40:
	add	x0, x0, l_.str.2@PAGEOFF
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_DRM_INFO
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh30
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpAdd	Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.comm	_CHIP_R300,8,3                  ; @CHIP_R300
	.comm	_CHIP_R350,8,3                  ; @CHIP_R350
	.comm	_R300_ENABLE_TILING,4,2         ; @R300_ENABLE_TILING
	.comm	_R300_TILE_SIZE_16,4,2          ; @R300_TILE_SIZE_16
	.comm	_R300_PIPE_COUNT_R300,4,2       ; @R300_PIPE_COUNT_R300
	.comm	_R300_PIPE_COUNT_R420_3P,4,2    ; @R300_PIPE_COUNT_R420_3P
	.comm	_R300_PIPE_COUNT_R420,4,2       ; @R300_PIPE_COUNT_R420
	.comm	_R300_PIPE_COUNT_RV350,4,2      ; @R300_PIPE_COUNT_RV350
	.comm	_R300_GB_TILE_CONFIG,4,2        ; @R300_GB_TILE_CONFIG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to wait GUI idle while programming pipes. Bad things might happen.\n"

	.comm	_R300_DST_PIPE_CONFIG,4,2       ; @R300_DST_PIPE_CONFIG
	.comm	_R300_PIPE_AUTO_CONFIG,4,2      ; @R300_PIPE_AUTO_CONFIG
	.comm	_R300_RB2D_DSTCACHE_MODE,4,2    ; @R300_RB2D_DSTCACHE_MODE
	.comm	_R300_DC_AUTOFLUSH_ENABLE,4,2   ; @R300_DC_AUTOFLUSH_ENABLE
	.comm	_R300_DC_DC_DISABLE_IGNORE_PE,4,2 ; @R300_DC_DC_DISABLE_IGNORE_PE
l_.str.1:                               ; @.str.1
	.asciz	"Failed to wait MC idle while programming pipes. Bad things might happen.\n"

l_.str.2:                               ; @.str.2
	.asciz	"radeon: %d quad pipes, %d Z pipes initialized\n"

	.no_dead_strip	_r300_gpu_init
.subsections_via_symbols
