	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_r420_pipes_init                ## -- Begin function r420_pipes_init
	.p2align	4, 0x90
_r420_pipes_init:                       ## @r420_pipes_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, %r14
	movq	_R300_GA_ENHANCE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_R300_GA_DEADLOCK_CNTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_R300_GA_FASTSYNC_CNTL@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	orl	$12, %esi
	callq	_WREG32
	movq	%r14, %rdi
	callq	_r100_gui_wait_for_idle
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_pr_warn
LBB0_2:
	movq	_R400_GB_PIPE_SELECT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_RREG32
                                        ## kill: def $eax killed $eax def $rax
	movq	24(%r14), %rcx
	movl	(%rcx), %ecx
	cmpl	$24143, %ecx                    ## imm = 0x5E4F
	je	LBB0_4
## %bb.3:
	cmpl	$24140, %ecx                    ## imm = 0x5E4C
	jne	LBB0_5
LBB0_4:
	movl	$1, (%r14)
	jmp	LBB0_6
LBB0_5:
	shrl	$12, %eax
	andl	$3, %eax
	leal	1(%rax), %ecx
	movl	%ecx, (%r14)
	decl	%eax
	cmpl	$2, %eax
	ja	LBB0_6
## %bb.7:
	cltq
	leaq	l_switch.table.r420_pipes_init(%rip), %rdx
	movl	(%rdx,%rax,4), %ebx
	jmp	LBB0_8
LBB0_6:
	movl	$1, %ecx
	xorl	%ebx, %ebx
LBB0_8:
	movq	_R500_SU_REG_DEST@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$-1, %esi
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %esi
	notl	%esi
	callq	_WREG32
	movq	_R300_TILE_SIZE_16@GOTPCREL(%rip), %rax
	movq	_R300_ENABLE_TILING@GOTPCREL(%rip), %rcx
	orl	(%rax), %ebx
	orl	(%rcx), %ebx
	movq	_R300_GB_TILE_CONFIG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%ebx, %esi
	callq	_WREG32
	movq	%r14, %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	_R300_DST_PIPE_CONFIG@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_RREG32
	movl	(%rbx), %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), %ebx
	movl	%ebx, %edi
	callq	_RREG32
	movq	_R300_DC_AUTOFLUSH_ENABLE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_R300_DC_DC_DISABLE_IGNORE_PE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_WREG32
	movq	%r14, %rdi
	callq	_r100_gui_wait_for_idle
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	leaq	L_.str(%rip), %rdi
	callq	_pr_warn
LBB0_12:
	movq	8(%r14), %rax
	movq	_CHIP_RV530@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_15
## %bb.13:
	movq	_RV530_GB_PIPE_SELECT2@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_RREG32
	notl	%eax
	testb	$3, %al
	jne	LBB0_15
## %bb.14:
	movl	$2, 16(%r14)
	movl	$2, %edx
	jmp	LBB0_16
LBB0_15:
	movl	$1, 16(%r14)
	movl	$1, %edx
LBB0_16:
	movl	(%r14), %esi
	leaq	L_.str.1(%rip), %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_DRM_INFO                       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_R300_GA_ENHANCE,4,2            ## @R300_GA_ENHANCE
	.comm	_R300_GA_DEADLOCK_CNTL,4,2      ## @R300_GA_DEADLOCK_CNTL
	.comm	_R300_GA_FASTSYNC_CNTL,4,2      ## @R300_GA_FASTSYNC_CNTL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to wait GUI idle while programming pipes. Bad things might happen.\n"

	.comm	_R400_GB_PIPE_SELECT,4,2        ## @R400_GB_PIPE_SELECT
	.comm	_R500_SU_REG_DEST,4,2           ## @R500_SU_REG_DEST
	.comm	_R300_TILE_SIZE_16,4,2          ## @R300_TILE_SIZE_16
	.comm	_R300_ENABLE_TILING,4,2         ## @R300_ENABLE_TILING
	.comm	_R300_GB_TILE_CONFIG,4,2        ## @R300_GB_TILE_CONFIG
	.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
	.comm	_CHIP_RV530,8,3                 ## @CHIP_RV530
	.comm	_RV530_GB_PIPE_SELECT2,4,2      ## @RV530_GB_PIPE_SELECT2
L_.str.1:                               ## @.str.1
	.asciz	"radeon: %d quad pipes, %d z pipes initialized.\n"

	.section	__TEXT,__const
	.p2align	2                               ## @switch.table.r420_pipes_init
l_switch.table.r420_pipes_init:
	.long	6                               ## 0x6
	.long	12                              ## 0xc
	.long	14                              ## 0xe

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_r420_pipes_init                ; -- Begin function r420_pipes_init
	.p2align	2
_r420_pipes_init:                       ; @r420_pipes_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
Lloh0:
	adrp	x8, _R300_GA_ENHANCE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _R300_GA_ENHANCE@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _R300_GA_DEADLOCK_CNTL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _R300_GA_DEADLOCK_CNTL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _R300_GA_FASTSYNC_CNTL@GOTPAGE
Lloh7:
	ldr	x9, [x9, _R300_GA_FASTSYNC_CNTL@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w8, w9
	orr	w1, w8, #0xc
	bl	_WREG32
	mov	x0, x19
	bl	_r100_gui_wait_for_idle
	cbz	x0, LBB0_2
; %bb.1:
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_warn
LBB0_2:
Lloh11:
	adrp	x8, _R400_GB_PIPE_SELECT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _R400_GB_PIPE_SELECT@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	bl	_RREG32
                                        ; kill: def $w0 killed $w0 def $x0
	ldr	x8, [x19, #24]
	ldr	w8, [x8]
	mov	w9, #24143
	cmp	w8, w9
	mov	w9, #24140
	ccmp	w8, w9, #4, ne
	b.ne	LBB0_4
; %bb.3:
	mov	w20, #0
	mov	w8, #1
	str	w8, [x19]
	b	LBB0_7
LBB0_4:
	ubfx	x9, x0, #12, #2
	add	w8, w9, #1
	str	w8, [x19]
	sub	x9, x9, #1
	cmp	w9, #2
	b.hi	LBB0_6
; %bb.5:
Lloh14:
	adrp	x10, l_switch.table.r420_pipes_init@PAGE
Lloh15:
	add	x10, x10, l_switch.table.r420_pipes_init@PAGEOFF
	ldr	w20, [x10, x9, lsl #2]
	b	LBB0_7
LBB0_6:
	mov	w20, #0
	mov	w8, #1
LBB0_7:
Lloh16:
	adrp	x9, _R500_SU_REG_DEST@GOTPAGE
Lloh17:
	ldr	x9, [x9, _R500_SU_REG_DEST@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x9]
	mov	w9, #-1
	lsl	w8, w9, w8
	mvn	w1, w8
	bl	_WREG32
Lloh19:
	adrp	x8, _R300_TILE_SIZE_16@GOTPAGE
Lloh20:
	ldr	x8, [x8, _R300_TILE_SIZE_16@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
Lloh22:
	adrp	x9, _R300_ENABLE_TILING@GOTPAGE
Lloh23:
	ldr	x9, [x9, _R300_ENABLE_TILING@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	orr	w8, w8, w20
	orr	w1, w8, w9
Lloh25:
	adrp	x8, _R300_GB_TILE_CONFIG@GOTPAGE
Lloh26:
	ldr	x8, [x8, _R300_GB_TILE_CONFIG@GOTPAGEOFF]
Lloh27:
	ldr	w0, [x8]
	bl	_WREG32
	mov	x0, x19
	bl	_r100_gui_wait_for_idle
	cbz	x0, LBB0_9
; %bb.8:
Lloh28:
	adrp	x0, l_.str@PAGE
Lloh29:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_warn
LBB0_9:
Lloh30:
	adrp	x20, _R300_DST_PIPE_CONFIG@GOTPAGE
Lloh31:
	ldr	x20, [x20, _R300_DST_PIPE_CONFIG@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_RREG32
	ldr	w8, [x20]
Lloh32:
	adrp	x9, _R300_PIPE_AUTO_CONFIG@GOTPAGE
Lloh33:
	ldr	x9, [x9, _R300_PIPE_AUTO_CONFIG@GOTPAGEOFF]
Lloh34:
	ldr	w9, [x9]
	orr	w1, w9, w0
	mov	x0, x8
	bl	_WREG32
Lloh35:
	adrp	x8, _R300_RB2D_DSTCACHE_MODE@GOTPAGE
Lloh36:
	ldr	x8, [x8, _R300_RB2D_DSTCACHE_MODE@GOTPAGEOFF]
Lloh37:
	ldr	w20, [x8]
	mov	x0, x20
	bl	_RREG32
Lloh38:
	adrp	x8, _R300_DC_AUTOFLUSH_ENABLE@GOTPAGE
Lloh39:
	ldr	x8, [x8, _R300_DC_AUTOFLUSH_ENABLE@GOTPAGEOFF]
Lloh40:
	ldr	w8, [x8]
	orr	w8, w8, w0
Lloh41:
	adrp	x9, _R300_DC_DC_DISABLE_IGNORE_PE@GOTPAGE
Lloh42:
	ldr	x9, [x9, _R300_DC_DC_DISABLE_IGNORE_PE@GOTPAGEOFF]
Lloh43:
	ldr	w9, [x9]
	orr	w1, w8, w9
	mov	x0, x20
	bl	_WREG32
	mov	x0, x19
	bl	_r100_gui_wait_for_idle
	cbz	x0, LBB0_11
; %bb.10:
Lloh44:
	adrp	x0, l_.str@PAGE
Lloh45:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_warn
LBB0_11:
	ldr	x8, [x19, #8]
Lloh46:
	adrp	x9, _CHIP_RV530@GOTPAGE
Lloh47:
	ldr	x9, [x9, _CHIP_RV530@GOTPAGEOFF]
Lloh48:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_14
; %bb.12:
Lloh49:
	adrp	x8, _RV530_GB_PIPE_SELECT2@GOTPAGE
Lloh50:
	ldr	x8, [x8, _RV530_GB_PIPE_SELECT2@GOTPAGEOFF]
Lloh51:
	ldr	w0, [x8]
	bl	_RREG32
	mvn	w8, w0
	tst	w8, #0x3
	b.ne	LBB0_14
; %bb.13:
	mov	w2, #2
	b	LBB0_15
LBB0_14:
	mov	w2, #1
LBB0_15:
	str	w2, [x19, #16]
	ldr	w1, [x19]
Lloh52:
	adrp	x0, l_.str.1@PAGE
Lloh53:
	add	x0, x0, l_.str.1@PAGEOFF
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_DRM_INFO
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpAdd	Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpAdd	Lloh52, Lloh53
	.cfi_endproc
                                        ; -- End function
	.comm	_R300_GA_ENHANCE,4,2            ; @R300_GA_ENHANCE
	.comm	_R300_GA_DEADLOCK_CNTL,4,2      ; @R300_GA_DEADLOCK_CNTL
	.comm	_R300_GA_FASTSYNC_CNTL,4,2      ; @R300_GA_FASTSYNC_CNTL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to wait GUI idle while programming pipes. Bad things might happen.\n"

	.comm	_R400_GB_PIPE_SELECT,4,2        ; @R400_GB_PIPE_SELECT
	.comm	_R500_SU_REG_DEST,4,2           ; @R500_SU_REG_DEST
	.comm	_R300_TILE_SIZE_16,4,2          ; @R300_TILE_SIZE_16
	.comm	_R300_ENABLE_TILING,4,2         ; @R300_ENABLE_TILING
	.comm	_R300_GB_TILE_CONFIG,4,2        ; @R300_GB_TILE_CONFIG
	.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
	.comm	_CHIP_RV530,8,3                 ; @CHIP_RV530
	.comm	_RV530_GB_PIPE_SELECT2,4,2      ; @RV530_GB_PIPE_SELECT2
l_.str.1:                               ; @.str.1
	.asciz	"radeon: %d quad pipes, %d z pipes initialized.\n"

	.section	__TEXT,__const
	.p2align	2                               ; @switch.table.r420_pipes_init
l_switch.table.r420_pipes_init:
	.long	6                               ; 0x6
	.long	12                              ; 0xc
	.long	14                              ; 0xe

.subsections_via_symbols
