	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function si_setup_rb
_si_setup_rb:                           ## @si_setup_rb
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
                                        ## kill: def $ecx killed $ecx def $rcx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
                                        ## kill: def $edx killed $edx def $rdx
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	movl	$0, %r12d
	movl	%esi, -48(%rbp)                 ## 4-byte Spill
	testl	%esi, %esi
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	jle	LBB0_6
## %bb.1:
	xorl	%ebx, %ebx
	movq	_TAHITI_RB_BITMAP_WIDTH_PER_SH@GOTPCREL(%rip), %rdi
	xorl	%r12d, %r12d
	xorl	%esi, %esi
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	incl	%esi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	addl	%edx, %ebx
	cmpl	-48(%rbp), %esi                 ## 4-byte Folded Reload
	je	LBB0_6
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	testl	%edx, %edx
	jle	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%r15d, %r15d
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	.p2align	4, 0x90
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%r12d, %r14d
	movq	%rdi, %r12
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rdi
	movl	%r15d, %edx
	callq	_si_select_se_sh
	movq	%r13, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	movl	%r13d, %edx
	callq	_si_get_rb_disabled
	movq	%r12, %rdi
	movl	%r14d, %r12d
	leal	(%rbx,%r15), %ecx
	imull	(%rdi), %ecx
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %eax
	orl	%eax, %r12d
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	incl	%r15d
	cmpl	%r15d, %r13d
	jne	LBB0_4
	jmp	LBB0_5
LBB0_6:
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	movl	$-1, %esi
	movl	$-1, %edx
	callq	_si_select_se_sh
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	imull	-48(%rbp), %edx                 ## 4-byte Folded Reload
	testl	%edx, %edx
	movl	$0, %ebx
	jle	LBB0_13
## %bb.7:
	leal	-1(%rdx), %ecx
	movl	%edx, %eax
	andl	$3, %eax
	cmpl	$3, %ecx
	jae	LBB0_9
## %bb.8:
	movl	$1, %ecx
	xorl	%ebx, %ebx
	jmp	LBB0_11
LBB0_9:
	andl	$-4, %edx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	testl	%r12d, %ecx
	movl	$0, %esi
	cmovel	%ecx, %esi
	orl	%ebx, %esi
	leal	(%rcx,%rcx), %edi
	testl	%r12d, %edi
	cmovnel	%r8d, %edi
	orl	%esi, %edi
	leal	(,%rcx,4), %esi
	testl	%r12d, %esi
	cmovnel	%r8d, %esi
	leal	(,%rcx,8), %ebx
	testl	%r12d, %ebx
	cmovnel	%r8d, %ebx
	orl	%esi, %ebx
	orl	%edi, %ebx
	shll	$4, %ecx
	addl	$-4, %edx
	jne	LBB0_10
LBB0_11:
	testl	%eax, %eax
	je	LBB0_13
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	testl	%r12d, %ecx
	movl	$0, %edx
	cmovel	%ecx, %edx
	orl	%edx, %ebx
	addl	%ecx, %ecx
	decl	%eax
	jne	LBB0_12
LBB0_13:
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movl	%ebx, (%r14)
	cmpl	$0, -48(%rbp)                   ## 4-byte Folded Reload
	jle	LBB0_32
## %bb.14:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	%eax, %r13d
	andl	$-2, %r13d
	addl	%eax, %eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	xorl	%r12d, %r12d
	movl	$2, %r15d
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_30:                                ##   in Loop: Header=BB0_15 Depth=1
	addl	%ecx, %eax
	addl	%eax, %eax
	movl	%eax, %ecx
	shll	%cl, %r10d
	orl	%r10d, %esi
	sarl	$2, %edi
	movl	%edi, -44(%rbp)                 ## 4-byte Spill
LBB0_31:                                ##   in Loop: Header=BB0_15 Depth=1
	movq	_PA_SC_RASTER_CONFIG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_WREG32
	incl	%r12d
	addl	-56(%rbp), %r15d                ## 4-byte Folded Reload
	cmpl	-48(%rbp), %r12d                ## 4-byte Folded Reload
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_32
LBB0_15:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_19 Depth 2
	movq	%r14, %rdi
	movl	%r12d, %esi
	movl	$-1, %edx
	callq	_si_select_se_sh
	movq	-64(%rbp), %r11                 ## 8-byte Reload
	xorl	%esi, %esi
	testl	%r11d, %r11d
	jle	LBB0_31
## %bb.16:                              ##   in Loop: Header=BB0_15 Depth=1
	movq	_RASTER_CONFIG_RB_MAP_3@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	_RASTER_CONFIG_RB_MAP_0@GOTPCREL(%rip), %rax
	movl	(%rax), %r10d
	movq	_RASTER_CONFIG_RB_MAP_2@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	cmpl	$1, %r11d
	jne	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_15 Depth=1
	xorl	%eax, %eax
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
LBB0_26:                                ##   in Loop: Header=BB0_15 Depth=1
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	testb	$1, %r11b
	je	LBB0_31
## %bb.27:                              ##   in Loop: Header=BB0_15 Depth=1
	movl	%r12d, %ecx
	imull	%r11d, %ecx
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movl	%edi, %edx
	andl	$3, %edx
	cmpl	$1, %edx
	je	LBB0_30
## %bb.28:                              ##   in Loop: Header=BB0_15 Depth=1
	movl	%r9d, %r10d
	cmpl	$2, %edx
	je	LBB0_30
## %bb.29:                              ##   in Loop: Header=BB0_15 Depth=1
	movl	%r8d, %r10d
	jmp	LBB0_30
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_15 Depth=1
	xorl	%esi, %esi
	movl	%r15d, %edx
	xorl	%eax, %eax
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	jmp	LBB0_19
	.p2align	4, 0x90
LBB0_25:                                ##   in Loop: Header=BB0_19 Depth=2
	movl	%edx, %ecx
	shll	%cl, %edi
	orl	%edi, %esi
	sarl	$4, %ebx
	addl	$2, %eax
	addl	$4, %edx
	cmpl	%eax, %r13d
	je	LBB0_26
LBB0_19:                                ##   Parent Loop BB0_15 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%ebx, %ecx
	andl	$3, %ecx
	movl	%r10d, %edi
	cmpl	$1, %ecx
	je	LBB0_22
## %bb.20:                              ##   in Loop: Header=BB0_19 Depth=2
	movl	%r9d, %edi
	cmpl	$2, %ecx
	je	LBB0_22
## %bb.21:                              ##   in Loop: Header=BB0_19 Depth=2
	movl	%r8d, %edi
LBB0_22:                                ##   in Loop: Header=BB0_19 Depth=2
	leal	-2(%rdx), %ecx
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %edi
	orl	%edi, %esi
	movl	%ebx, %ecx
	shrl	$2, %ecx
	andl	$3, %ecx
	movl	%r10d, %edi
	cmpl	$1, %ecx
	je	LBB0_25
## %bb.23:                              ##   in Loop: Header=BB0_19 Depth=2
	movl	%r9d, %edi
	cmpl	$2, %ecx
	je	LBB0_25
## %bb.24:                              ##   in Loop: Header=BB0_19 Depth=2
	movl	%r8d, %edi
	jmp	LBB0_25
LBB0_32:
	movq	%r14, %rdi
	movl	$-1, %esi
	movl	$-1, %edx
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_si_select_se_sh                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_TAHITI_RB_BITMAP_WIDTH_PER_SH,4,2 ## @TAHITI_RB_BITMAP_WIDTH_PER_SH
	.comm	_RASTER_CONFIG_RB_MAP_0,4,2     ## @RASTER_CONFIG_RB_MAP_0
	.comm	_RASTER_CONFIG_RB_MAP_3,4,2     ## @RASTER_CONFIG_RB_MAP_3
	.comm	_RASTER_CONFIG_RB_MAP_2,4,2     ## @RASTER_CONFIG_RB_MAP_2
	.comm	_PA_SC_RASTER_CONFIG,4,2        ## @PA_SC_RASTER_CONFIG
	.no_dead_strip	_si_setup_rb
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function si_setup_rb
_si_setup_rb:                           ; @si_setup_rb
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x22, x3
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	cmp	w1, #1
	b.lt	LBB0_6
; %bb.1:
	mov	w26, #0
	mov	w25, #0
	mov	w23, #0
Lloh0:
	adrp	x27, _TAHITI_RB_BITMAP_WIDTH_PER_SH@GOTPAGE
Lloh1:
	ldr	x27, [x27, _TAHITI_RB_BITMAP_WIDTH_PER_SH@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	w23, w23, #1
	add	w26, w26, w20
	cmp	w23, w21
	b.eq	LBB0_7
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
	cmp	w20, #1
	b.lt	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w24, #0
LBB0_5:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x19
	mov	x1, x23
	mov	x2, x24
	bl	_si_select_se_sh
	mov	x0, x19
	mov	x1, x22
	mov	x2, x20
	bl	_si_get_rb_disabled
	add	w8, w26, w24
	ldr	w9, [x27]
	mul	w8, w9, w8
	lsl	w8, w0, w8
	orr	w25, w8, w25
	add	w24, w24, #1
	cmp	w20, w24
	b.ne	LBB0_5
	b	LBB0_2
LBB0_6:
	mov	w25, #0
LBB0_7:
	mov	x0, x19
	mov	w1, #-1
	mov	w2, #-1
	bl	_si_select_se_sh
	mul	w8, w22, w21
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.8:
	mov	w23, #0
	mov	w9, #1
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	tst	w9, w25
	csel	w10, w9, wzr, eq
	orr	w23, w10, w23
	lsl	w9, w9, #1
	subs	w8, w8, #1
	b.ne	LBB0_9
	b	LBB0_11
LBB0_10:
	mov	w23, #0
LBB0_11:
	str	w23, [x19]
	cmp	w21, #1
	b.lt	LBB0_18
; %bb.12:
	mov	w24, #0
	mov	w22, #0
	lsl	w25, w20, #1
Lloh2:
	adrp	x27, _RASTER_CONFIG_RB_MAP_0@GOTPAGE
Lloh3:
	ldr	x27, [x27, _RASTER_CONFIG_RB_MAP_0@GOTPAGEOFF]
Lloh4:
	adrp	x28, _RASTER_CONFIG_RB_MAP_2@GOTPAGE
Lloh5:
	ldr	x28, [x28, _RASTER_CONFIG_RB_MAP_2@GOTPAGEOFF]
Lloh6:
	adrp	x26, _PA_SC_RASTER_CONFIG@GOTPAGE
Lloh7:
	ldr	x26, [x26, _PA_SC_RASTER_CONFIG@GOTPAGEOFF]
	b	LBB0_15
LBB0_13:                                ;   in Loop: Header=BB0_15 Depth=1
	mov	w1, #0
LBB0_14:                                ;   in Loop: Header=BB0_15 Depth=1
	ldr	w0, [x26]
	bl	_WREG32
	add	w22, w22, #1
	add	w24, w24, w25
	cmp	w22, w21
	b.eq	LBB0_18
LBB0_15:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_17 Depth 2
	mov	x0, x19
	mov	x1, x22
	mov	w2, #-1
	bl	_si_select_se_sh
	cmp	w20, #1
	b.lt	LBB0_13
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	mov	w1, #0
Lloh8:
	adrp	x8, _RASTER_CONFIG_RB_MAP_3@GOTPAGE
Lloh9:
	ldr	x8, [x8, _RASTER_CONFIG_RB_MAP_3@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	ldr	w9, [x27]
	mov	x10, x20
	mov	x11, x24
	ldr	w12, [x28]
LBB0_17:                                ;   Parent Loop BB0_15 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	and	w13, w23, #0x3
	cmp	w13, #2
	csel	w14, w12, w8, ne
	cmp	w13, #1
	csel	w13, w9, w14, eq
	lsl	w13, w13, w11
	orr	w1, w13, w1
	asr	w23, w23, #2
	add	w11, w11, #2
	subs	w10, w10, #1
	b.ne	LBB0_17
	b	LBB0_14
LBB0_18:
	mov	x0, x19
	mov	w1, #-1
	mov	w2, #-1
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_si_select_se_sh
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_TAHITI_RB_BITMAP_WIDTH_PER_SH,4,2 ; @TAHITI_RB_BITMAP_WIDTH_PER_SH
	.comm	_RASTER_CONFIG_RB_MAP_0,4,2     ; @RASTER_CONFIG_RB_MAP_0
	.comm	_RASTER_CONFIG_RB_MAP_3,4,2     ; @RASTER_CONFIG_RB_MAP_3
	.comm	_RASTER_CONFIG_RB_MAP_2,4,2     ; @RASTER_CONFIG_RB_MAP_2
	.comm	_PA_SC_RASTER_CONFIG,4,2        ; @PA_SC_RASTER_CONFIG
	.no_dead_strip	_si_setup_rb
.subsections_via_symbols
