	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_r6xx_remap_render_backend      ## -- Begin function r6xx_remap_render_backend
	.p2align	4, 0x90
_r6xx_remap_render_backend:             ## @r6xx_remap_render_backend
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %ebx
	movl	%edx, %r15d
	movl	$255, %eax
	movl	%r15d, %ecx
	shll	%cl, %eax
	movl	%esi, %ecx
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movzbl	%al, %r14d
	orl	%r8d, %r14d
	cmpb	$-1, %r14b
	cmovel	%r8d, %r14d
	movl	$1, %r12d
	movl	$1, %r13d
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %r13d
	movl	%r14d, %edi
	callq	_r600_count_pipe_bits
	subl	%eax, %ebx
	xorl	%edi, %edi
	cmpl	%ebx, %r13d
	setl	%dil
	callq	_BUG_ON
	movl	%r13d, %eax
	cltd
	idivl	%ebx
                                        ## kill: def $eax killed $eax def $rax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rsi
	movq	_CHIP_RV740@GOTPCREL(%rip), %rdi
	xorl	%ecx, %ecx
	cmpq	(%rdi), %rsi
	setg	%bl
	testl	%r15d, %r15d
	je	LBB0_1
## %bb.2:
	movb	%bl, %cl
	leal	(%rcx,%rcx), %r8d
	addl	$2, %r8d
	leal	-1(%r15), %ecx
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %r12d
	leal	-1(%rax), %ecx
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movl	%eax, %r9d
	andl	$7, %r9d
	movl	%eax, %ecx
	andl	$-8, %ecx
	movl	%ecx, -52(%rbp)                 ## 4-byte Spill
	xorl	%r13d, %r13d
	xorl	%edi, %edi
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_3 Depth=1
	movl	%r8d, %ecx
	shll	%cl, %edi
	addl	%r15d, %r11d
	orl	%edi, %r11d
	decl	%edx
	movl	%r11d, %edi
LBB0_14:                                ##   in Loop: Header=BB0_3 Depth=1
	sarl	%r12d
	incl	%r13d
	cmpl	%r15d, %r13d
	je	LBB0_15
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_7 Depth 2
                                        ##     Child Loop BB0_10 Depth 2
	testl	%r14d, %r12d
	jne	LBB0_14
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%r13d, %r11d
	notl	%r11d
	testl	%eax, %eax
	je	LBB0_11
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	leal	(%r11,%r15), %ebx
	cmpl	$7, -48(%rbp)                   ## 4-byte Folded Reload
	jb	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	-52(%rbp), %r10d                ## 4-byte Reload
	.p2align	4, 0x90
LBB0_7:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%r8d, %ecx
	shll	%cl, %edi
	orl	%ebx, %edi
	shll	%cl, %edi
	orl	%ebx, %edi
	shll	%cl, %edi
	orl	%ebx, %edi
	shll	%cl, %edi
	orl	%ebx, %edi
	shll	%cl, %edi
	orl	%ebx, %edi
	shll	%cl, %edi
	orl	%ebx, %edi
	shll	%cl, %edi
	orl	%ebx, %edi
	shll	%cl, %edi
	orl	%ebx, %edi
	addl	$-8, %r10d
	jne	LBB0_7
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	testl	%r9d, %r9d
	je	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%r9d, %esi
	.p2align	4, 0x90
LBB0_10:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%r8d, %ecx
	shll	%cl, %edi
	orl	%ebx, %edi
	decl	%esi
	jne	LBB0_10
LBB0_11:                                ##   in Loop: Header=BB0_3 Depth=1
	testl	%edx, %edx
	jne	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_3 Depth=1
	xorl	%edx, %edx
	jmp	LBB0_14
LBB0_1:
	xorl	%edi, %edi
LBB0_15:
	movl	%edi, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CHIP_RV740,8,3                 ## @CHIP_RV740
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_r6xx_remap_render_backend      ; -- Begin function r6xx_remap_render_backend
	.p2align	2
_r6xx_remap_render_backend:             ; @r6xx_remap_render_backend
	.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
	mov	x21, x3
	mov	x19, x2
	mov	x22, x0
	mov	w8, #255
	lsl	w9, w8, w2
	and	w9, w9, #0xff
	orr	w9, w9, w4
	bics	wzr, w8, w9
	csel	w20, w4, w9, eq
	mov	w23, #1
	lsl	w24, w23, w1
	mov	x0, x20
	bl	_r600_count_pipe_bits
	sub	w21, w21, w0
	cmp	w24, w21
	cset	w0, lt
	bl	_BUG_ON
Lloh0:
	adrp	x8, _CHIP_RV740@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CHIP_RV740@GOTPAGEOFF]
	ldr	x9, [x22]
Lloh2:
	ldr	x8, [x8]
	cmp	x9, x8
	mov	w8, #2
	mov	w9, #4
	csel	w8, w9, w8, gt
	cbz	w19, LBB0_8
; %bb.1:
	mov	w9, #0
	mov	w0, #0
	sdiv	w10, w24, w21
	msub	w11, w10, w21, w24
	sub	w12, w19, #1
	lsl	w12, w23, w12
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	lsl	w13, w0, w8
	mvn	w14, w9
	add	w14, w14, w19
	orr	w13, w13, w14
	sub	w14, w11, #1
	cmp	w11, #0
	csel	w11, wzr, w14, eq
	csel	w0, w0, w13, eq
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	asr	w12, w12, #1
	add	w9, w9, #1
	cmp	w9, w19
	b.eq	LBB0_9
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
	tst	w12, w20
	b.ne	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	cbz	w10, LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	mvn	w13, w9
	add	w13, w13, w19
	mov	x14, x10
LBB0_7:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	lsl	w15, w0, w8
	orr	w0, w15, w13
	subs	w14, w14, #1
	b.ne	LBB0_7
	b	LBB0_2
LBB0_8:
	mov	w0, #0
LBB0_9:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_CHIP_RV740,8,3                 ; @CHIP_RV740
.subsections_via_symbols
