	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function r100_cs_track_texture_check
_r100_cs_track_texture_check:           ## @r100_cs_track_texture_check
	.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
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movl	(%rsi), %eax
	testl	%eax, %eax
	je	LBB0_38
## %bb.1:
	movq	%rsi, %r8
	xorl	%ebx, %ebx
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_27:                                ##   in Loop: Header=BB0_2 Depth=1
	movslq	8(%rsi,%r15), %rax
	imulq	%rax, %r12
	movl	28(%rsi,%r15), %esi
	cmpl	$2, %esi
	jae	LBB0_29
## %bb.28:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
LBB0_35:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	callq	_radeon_bo_size
	cmpq	%rax, %r12
	ja	LBB0_40
## %bb.36:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	movl	(%r8), %eax
LBB0_37:                                ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	movl	%eax, %ecx
	cmpq	%rcx, %rbx
	jae	LBB0_38
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_6 Depth 2
	movq	8(%r8), %rsi
	leaq	(%rbx,%rbx,2), %r15
	shlq	$5, %r15
	cmpl	$0, 88(%rsi,%r15)
	je	LBB0_37
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$0, 80(%rsi,%r15)
	jne	LBB0_37
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	72(%rsi,%r15), %rax
	testq	%rax, %rax
	je	LBB0_9
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	xorl	%r13d, %r13d
	xorl	%r12d, %r12d
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_25:                                ##   in Loop: Header=BB0_6 Depth=2
	imull	%r9d, %ebx
LBB0_26:                                ##   in Loop: Header=BB0_6 Depth=2
	imull	%r12d, %ebx
	movq	-80(%rbp), %r12                 ## 8-byte Reload
	addq	%rbx, %r12
	incl	%r13d
	cmpl	(%rsi,%r15), %r13d
	ja	LBB0_27
LBB0_6:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpq	$0, 64(%rsi,%r15)
	je	LBB0_13
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=2
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rdi
	movl	4(%rsi,%r15), %eax
	movq	_CHIP_R300@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rdi
	jge	LBB0_11
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=2
	movl	$1, %ebx
	movl	%r13d, %ecx
	shll	%cl, %ebx
	cltd
	idivl	8(%rsi,%r15)
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_6 Depth=2
	movl	12(%rsi,%r15), %r9d
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rdi
	movq	_CHIP_RV515@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdi
	jl	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_6 Depth=2
	orl	16(%rsi,%r15), %r9d
LBB0_15:                                ##   in Loop: Header=BB0_6 Depth=2
	movl	%r13d, %ecx
	shrl	%cl, %r9d
	cmpq	$0, 56(%rsi,%r15)
	je	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_6 Depth=2
	movl	%r9d, %edi
	callq	_roundup_pow_of_two
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	movl	%eax, %r9d
	movq	8(%r8), %rsi
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rdi
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_6 Depth=2
	movl	$1, %ebx
	movl	%r13d, %ecx
	shll	%cl, %ebx
LBB0_12:                                ##   in Loop: Header=BB0_6 Depth=2
	cltd
	idivl	%ebx
	movl	%eax, %r9d
LBB0_17:                                ##   in Loop: Header=BB0_6 Depth=2
	movl	20(%rsi,%r15), %ebx
	movq	_CHIP_RV515@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdi
	jl	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_6 Depth=2
	orl	24(%rsi,%r15), %ebx
LBB0_19:                                ##   in Loop: Header=BB0_6 Depth=2
	movl	$1, %r14d
	movl	%r13d, %ecx
	shll	%cl, %r14d
	shrl	%cl, %ebx
	cmpq	$0, 48(%rsi,%r15)
	movq	%r12, -80(%rbp)                 ## 8-byte Spill
	je	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_6 Depth=2
	movl	%ebx, %edi
	movl	%r9d, %ebx
	callq	_roundup_pow_of_two
	movl	%ebx, %r9d
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	movl	%eax, %ebx
	movq	8(%r8), %rsi
LBB0_21:                                ##   in Loop: Header=BB0_6 Depth=2
	movl	$1, %r12d
	cmpl	$1, 28(%rsi,%r15)
	jne	LBB0_23
## %bb.22:                              ##   in Loop: Header=BB0_6 Depth=2
	movzbl	32(%rsi,%r15), %ecx
	movl	$1, %eax
	shll	%cl, %eax
	cltd
	idivl	%r14d
	movl	%eax, %r12d
	testl	%eax, %eax
	movl	$1, %eax
	cmovel	%eax, %r12d
LBB0_23:                                ##   in Loop: Header=BB0_6 Depth=2
	movq	40(%rsi,%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_25
## %bb.24:                              ##   in Loop: Header=BB0_6 Depth=2
	movl	%r9d, %esi
	movl	%ebx, %edx
	callq	_r100_track_compress_size
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	movl	%eax, %ebx
	movq	8(%r8), %rsi
	jmp	LBB0_26
LBB0_29:                                ##   in Loop: Header=BB0_2 Depth=1
	jne	LBB0_33
## %bb.30:                              ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$0, 16(%r8)
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_34
## %bb.31:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r8, %rsi
	movl	%ebx, %edx
	callq	_r100_cs_track_cube
	testl	%eax, %eax
	je	LBB0_35
	jmp	LBB0_32
LBB0_34:                                ##   in Loop: Header=BB0_2 Depth=1
	addq	%r12, %r12
	leaq	(%r12,%r12,2), %r12
	jmp	LBB0_35
LBB0_38:
	xorl	%r15d, %r15d
	jmp	LBB0_39
LBB0_9:
	leaq	L_.str(%rip), %rdi
	xorl	%r15d, %r15d
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_DRM_ERROR
	jmp	LBB0_10
LBB0_40:
	movl	%ebx, %r14d
	movq	%r15, %rdi
	callq	_radeon_bo_size
	leaq	L_.str.2(%rip), %rdi
	xorl	%r15d, %r15d
	movl	%ebx, %esi
	movq	%r12, %rdx
	movq	%rax, %rcx
	xorl	%eax, %eax
	callq	_DRM_ERROR
	leaq	(%r14,%r14,2), %rdi
	shlq	$5, %rdi
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	addq	8(%rax), %rdi
	callq	_r100_cs_track_texture_print
	jmp	LBB0_10
LBB0_33:
	leaq	L_.str.1(%rip), %rdi
	xorl	%r15d, %r15d
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	xorl	%eax, %eax
	callq	_DRM_ERROR
LBB0_10:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
LBB0_39:
	movl	%r15d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_32:
	movl	%eax, %r15d
	jmp	LBB0_39
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"No texture bound to unit %u\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_CHIP_R300,8,3                  ## @CHIP_R300
	.comm	_CHIP_RV515,8,3                 ## @CHIP_RV515
L_.str.1:                               ## @.str.1
	.asciz	"Invalid texture coordinate type %u for unit %u\n"

L_.str.2:                               ## @.str.2
	.asciz	"Texture of unit %u needs %lu bytes but is %lu\n"

	.no_dead_strip	_r100_cs_track_texture_check
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function r100_cs_track_texture_check
_r100_cs_track_texture_check:           ; @r100_cs_track_texture_check
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	ldr	w9, [x1]
	cbz	w9, LBB0_33
; %bb.1:
	mov	x20, x1
	mov	x21, x0
	mov	x19, #0
	mov	w24, #96
Lloh0:
	adrp	x25, _CHIP_RV515@GOTPAGE
Lloh1:
	ldr	x25, [x25, _CHIP_RV515@GOTPAGEOFF]
	mov	w26, #1
	b	LBB0_6
LBB0_2:                                 ;   in Loop: Header=BB0_6 Depth=1
	madd	x8, x19, x24, x8
	ldrsw	x9, [x8, #8]
	mul	x22, x28, x9
	ldr	w1, [x8, #28]
	cmp	w1, #2
	b.hs	LBB0_29
LBB0_3:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	x23, [sp, #24]                  ; 8-byte Folded Reload
	mov	x0, x23
	bl	_radeon_bo_size
	cmp	x22, x0
	b.hi	LBB0_35
; %bb.4:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w9, [x20]
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x19, x19, #1
	cmp	x19, w9, uxtw
	b.hs	LBB0_33
LBB0_6:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_12 Depth 2
	ldr	x8, [x20, #8]
	madd	x10, x19, x24, x8
	ldr	w10, [x10, #88]
	cbz	w10, LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	madd	x10, x19, x24, x8
	ldr	x10, [x10, #80]
	cbnz	x10, LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	madd	x9, x19, x24, x8
	ldr	x9, [x9, #72]
	cbz	x9, LBB0_34
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	str	x9, [sp, #24]                   ; 8-byte Folded Spill
	mov	w22, #0
	mov	x28, #0
	b	LBB0_12
LBB0_10:                                ;   in Loop: Header=BB0_12 Depth=2
	mul	w0, w2, w23
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=2
	mul	w9, w0, w27
	add	x28, x28, x9
	add	w22, w22, #1
	mul	x9, x19, x24
	ldr	w9, [x8, x9]
	cmp	w22, w9
	b.hi	LBB0_2
LBB0_12:                                ;   Parent Loop BB0_6 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	madd	x9, x19, x24, x8
	ldr	x9, [x9, #64]
	lsl	w27, w26, w22
	cbz	x9, LBB0_16
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=2
	ldr	x9, [x21]
Lloh2:
	adrp	x10, _CHIP_R300@GOTPAGE
Lloh3:
	ldr	x10, [x10, _CHIP_R300@GOTPAGEOFF]
Lloh4:
	ldr	x11, [x10]
	madd	x10, x19, x24, x8
	ldr	w10, [x10, #4]
	cmp	x9, x11
	b.ge	LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_12 Depth=2
	madd	x11, x19, x24, x8
	ldr	w11, [x11, #8]
	sdiv	w10, w10, w11
LBB0_15:                                ;   in Loop: Header=BB0_12 Depth=2
	sdiv	w23, w10, w27
	b	LBB0_20
LBB0_16:                                ;   in Loop: Header=BB0_12 Depth=2
	madd	x9, x19, x24, x8
	ldr	w10, [x9, #12]
	ldr	x9, [x21]
	ldr	x11, [x25]
	cmp	x9, x11
	b.lt	LBB0_18
; %bb.17:                               ;   in Loop: Header=BB0_12 Depth=2
	madd	x11, x19, x24, x8
	ldr	w11, [x11, #16]
	orr	w10, w11, w10
LBB0_18:                                ;   in Loop: Header=BB0_12 Depth=2
	lsr	w23, w10, w22
	madd	x10, x19, x24, x8
	ldr	x10, [x10, #56]
	cbz	x10, LBB0_20
; %bb.19:                               ;   in Loop: Header=BB0_12 Depth=2
	mov	x0, x23
	bl	_roundup_pow_of_two
	mov	x23, x0
	ldr	x8, [x20, #8]
	ldr	x9, [x21]
LBB0_20:                                ;   in Loop: Header=BB0_12 Depth=2
	madd	x10, x19, x24, x8
	ldr	w10, [x10, #20]
	ldr	x11, [x25]
	cmp	x9, x11
	b.lt	LBB0_22
; %bb.21:                               ;   in Loop: Header=BB0_12 Depth=2
	madd	x9, x19, x24, x8
	ldr	w9, [x9, #24]
	orr	w10, w9, w10
LBB0_22:                                ;   in Loop: Header=BB0_12 Depth=2
	lsr	w2, w10, w22
	madd	x9, x19, x24, x8
	ldr	x9, [x9, #48]
	cbz	x9, LBB0_24
; %bb.23:                               ;   in Loop: Header=BB0_12 Depth=2
	mov	x0, x2
	bl	_roundup_pow_of_two
	mov	x2, x0
	ldr	x8, [x20, #8]
LBB0_24:                                ;   in Loop: Header=BB0_12 Depth=2
	madd	x9, x19, x24, x8
	ldr	w9, [x9, #28]
	cmp	w9, #1
	b.ne	LBB0_26
; %bb.25:                               ;   in Loop: Header=BB0_12 Depth=2
	madd	x9, x19, x24, x8
	ldr	w9, [x9, #32]
	lsl	w9, w26, w9
	sdiv	w9, w9, w27
	cmp	w9, #0
	csinc	w27, w9, wzr, ne
	b	LBB0_27
LBB0_26:                                ;   in Loop: Header=BB0_12 Depth=2
	mov	w27, #1
LBB0_27:                                ;   in Loop: Header=BB0_12 Depth=2
	madd	x9, x19, x24, x8
	ldr	x0, [x9, #40]
	cbz	x0, LBB0_10
; %bb.28:                               ;   in Loop: Header=BB0_12 Depth=2
	mov	x1, x23
	bl	_r100_track_compress_size
	ldr	x8, [x20, #8]
	b	LBB0_11
LBB0_29:                                ;   in Loop: Header=BB0_6 Depth=1
	b.ne	LBB0_36
; %bb.30:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x20, #16]
	cbz	w8, LBB0_32
; %bb.31:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	bl	_r100_cs_track_cube
	cbz	w0, LBB0_3
	b	LBB0_39
LBB0_32:                                ;   in Loop: Header=BB0_6 Depth=1
	add	x8, x22, x22, lsl #1
	lsl	x22, x8, #1
	b	LBB0_3
LBB0_33:
	mov	w0, #0
	b	LBB0_39
LBB0_34:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	b	LBB0_37
LBB0_35:
	and	x21, x19, #0xffffffff
	mov	x0, x23
	bl	_radeon_bo_size
	stp	x22, x0, [sp]
Lloh7:
	adrp	x0, l_.str.2@PAGE
Lloh8:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x19
	bl	_DRM_ERROR
	ldr	x8, [x20, #8]
	mov	w9, #96
	madd	x0, x21, x9, x8
	bl	_r100_cs_track_texture_print
	b	LBB0_38
LBB0_36:
	str	x19, [sp]
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_37:
	bl	_DRM_ERROR
LBB0_38:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_39:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No texture bound to unit %u\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_CHIP_R300,8,3                  ; @CHIP_R300
	.comm	_CHIP_RV515,8,3                 ; @CHIP_RV515
l_.str.1:                               ; @.str.1
	.asciz	"Invalid texture coordinate type %u for unit %u\n"

l_.str.2:                               ; @.str.2
	.asciz	"Texture of unit %u needs %lu bytes but is %lu\n"

	.no_dead_strip	_r100_cs_track_texture_check
.subsections_via_symbols
