	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function validate_gl_shader_rec
_validate_gl_shader_rec:                ## @validate_gl_shader_rec
	.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	$104, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r12
	movq	%rsi, -136(%rbp)                ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	leaq	_validate_gl_shader_rec.shader_reloc_offsets(%rip), %rbx
	movq	%rbx, %rdi
	callq	_ARRAY_SIZE
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movq	%rbx, %rdi
	callq	_ARRAY_SIZE
                                        ## kill: def $eax killed $eax def $rax
	addl	$8, %eax
	shlq	$3, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -88(%rbp)                 ## 8-byte Spill
	movl	(%r12), %edi
	movl	%edi, %eax
	andl	$7, %eax
	movl	$8, %r15d
	cmovnel	%eax, %r15d
	callq	_gl_shader_rec_size
	movl	%eax, %r13d
	movq	%rbx, %rdi
	callq	_ARRAY_SIZE
	movl	%eax, %r14d
	movl	%r15d, -112(%rbp)               ## 4-byte Spill
	addl	%r15d, %r14d
	movq	-136(%rbp), %r15                ## 8-byte Reload
	leal	(,%r14,4), %ebx
	movl	(%r15), %eax
	movl	%eax, %edx
	subl	%ebx, %edx
	jge	LBB0_3
## %bb.1:
	leaq	L_.str(%rip), %rdi
	xorl	%ebx, %ebx
	movl	%r14d, %esi
LBB0_2:
	movl	%eax, %edx
	jmp	LBB0_5
LBB0_3:
	movq	%r12, -120(%rbp)                ## 8-byte Spill
	movq	8(%r15), %r12
	movslq	%ebx, %rax
	leaq	(%r12,%rax,4), %rsi
	movq	%rsi, 8(%r15)
	movl	%edx, (%r15)
	cmpl	%edx, %r13d
	jle	LBB0_10
## %bb.4:
	leaq	L_.str.1(%rip), %rdi
	xorl	%ebx, %ebx
	movl	%r13d, %esi
LBB0_5:
	xorl	%eax, %eax
	callq	_DRM_DEBUG
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_7:
	subl	(%rax), %ebx
LBB0_8:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_54
## %bb.9:
	movl	%ebx, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	64(%r15), %rdi
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	movq	%rsi, -80(%rbp)                 ## 8-byte Spill
	movl	%r13d, %edx
	callq	_memcpy
	movslq	%r13d, %rax
	shlq	$2, %rax
	addq	%rax, 8(%r15)
	movl	%r13d, %edi
	movl	$16, %esi
	callq	_roundup
	subl	%r13d, %eax
	xorl	%edi, %edi
	cmpl	%ebx, %eax
	setg	%dil
	callq	_BUG_ON
	movl	%r13d, %edi
	movl	$16, %esi
	callq	_roundup
	cltq
	addq	%rax, 64(%r15)
	subl	%r13d, (%r15)
	movl	-56(%rbp), %ebx                 ## 4-byte Reload
	testl	%ebx, %ebx
	movq	-88(%rbp), %r13                 ## 8-byte Reload
	jle	LBB0_15
## %bb.11:
	movl	16(%r15), %eax
	movl	%ebx, %ecx
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movslq	(%r12,%rdx,4), %rsi
	cmpl	%eax, %esi
	jg	LBB0_25
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	56(%r15), %rdi
	movq	(%rdi,%rsi,8), %rsi
	movq	%rsi, (%r13,%rdx,8)
	testq	%rsi, %rsi
	je	LBB0_42
## %bb.14:                              ##   in Loop: Header=BB0_12 Depth=1
	incq	%rdx
	cmpq	%rdx, %rcx
	jne	LBB0_12
LBB0_15:
	cmpl	%r14d, %ebx
	jge	LBB0_19
## %bb.16:
	movslq	-56(%rbp), %rbx                 ## 4-byte Folded Reload
	movslq	%r14d, %r14
	.p2align	4, 0x90
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r12,%rbx,4), %esi
	movq	%r15, %rdi
	callq	_vc4_use_bo
	movq	%rax, (%r13,%rbx,8)
	testq	%rax, %rax
	je	LBB0_42
## %bb.18:                              ##   in Loop: Header=BB0_17 Depth=1
	incq	%rbx
	cmpq	%rbx, %r14
	jne	LBB0_17
LBB0_19:
	movq	_VC4_SHADER_FLAG_FS_SINGLE_THREAD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%ebx, %ebx
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	andl	(%rcx), %eax
	sete	%bl
	movq	(%r13), %r14
	leaq	4(%r14), %rdi
	callq	_to_vc4_bo
	movq	8(%rax), %rax
	cmpl	%ebx, (%rax)
	jne	LBB0_23
## %bb.20:
	movq	8(%r13), %rdi
	addq	$4, %rdi
	callq	_to_vc4_bo
	movq	8(%rax), %rax
	cmpl	$0, (%rax)
	jne	LBB0_22
## %bb.21:
	movq	16(%r13), %rdi
	addq	$4, %rdi
	callq	_to_vc4_bo
	movq	8(%rax), %rax
	cmpl	$0, (%rax)
	je	LBB0_26
LBB0_22:
	leaq	L_.str.4(%rip), %rdi
	jmp	LBB0_24
LBB0_23:
	leaq	L_.str.3(%rip), %rdi
LBB0_24:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_DRM_DEBUG
	jmp	LBB0_6
LBB0_25:
	leaq	L_.str.2(%rip), %rdi
	xorl	%ebx, %ebx
                                        ## kill: def $esi killed $esi killed $rsi
	xorl	%eax, %eax
	callq	_DRM_DEBUG
	jmp	LBB0_6
LBB0_26:
	movl	-56(%rbp), %esi                 ## 4-byte Reload
	testl	%esi, %esi
	jle	LBB0_43
## %bb.27:
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %eax
	movl	(%r14), %ecx
	addl	%eax, %ecx
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movl	%ecx, 4(%rdx)
	testl	%eax, %eax
	je	LBB0_29
LBB0_28:
	leaq	L_.str.5(%rip), %rdi
	jmp	LBB0_24
LBB0_29:
	movl	%esi, %eax
	movq	%rax, -128(%rbp)                ## 8-byte Spill
	movl	$4, %r13d
	xorl	%ebx, %ebx
LBB0_30:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_34 Depth 2
                                        ##     Child Loop BB0_38 Depth 2
	addq	$4, %r14
	movq	%r14, %rdi
	callq	_to_vc4_bo
	movq	8(%rax), %r12
	testq	%r12, %r12
	je	LBB0_42
## %bb.31:                              ##   in Loop: Header=BB0_30 Depth=1
	movq	8(%r12), %rax
	cmpq	24(%r15), %rax
	jg	LBB0_53
## %bb.32:                              ##   in Loop: Header=BB0_30 Depth=1
	movq	%r13, -96(%rbp)                 ## 8-byte Spill
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	32(%r15), %rcx
	movq	40(%r15), %rdi
	movslq	16(%r12), %rax
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	leaq	(%rcx,%rax,4), %rsi
	movl	20(%r12), %edx
	movq	%rsi, -104(%rbp)                ## 8-byte Spill
	callq	_memcpy
	cmpl	$0, 16(%r12)
	jle	LBB0_36
## %bb.33:                              ##   in Loop: Header=BB0_30 Depth=1
	xorl	%r13d, %r13d
	cmpq	$2, -64(%rbp)                   ## 8-byte Folded Reload
	sete	%r13b
	xorl	%ebx, %ebx
	xorl	%r14d, %r14d
LBB0_34:                                ##   Parent Loop BB0_30 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	40(%r12), %rdx
	addq	%rbx, %rdx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax,%rbx), %ecx
	movq	%r15, %rdi
	movq	-104(%rbp), %rsi                ## 8-byte Reload
	movl	%r13d, %r8d
	callq	_reloc_tex
	testl	%eax, %eax
	je	LBB0_42
## %bb.35:                              ##   in Loop: Header=BB0_34 Depth=2
	incq	%r14
	movslq	16(%r12), %rax
	addq	$4, %rbx
	cmpq	%rax, %r14
	jl	LBB0_34
LBB0_36:                                ##   in Loop: Header=BB0_30 Depth=1
	cmpl	$0, 24(%r12)
	jle	LBB0_39
## %bb.37:                              ##   in Loop: Header=BB0_30 Depth=1
	movq	32(%r12), %rcx
	movq	40(%r15), %rax
	xorl	%edx, %edx
	movq	-88(%rbp), %r13                 ## 8-byte Reload
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
LBB0_38:                                ##   Parent Loop BB0_30 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movslq	(%rcx,%rdx,4), %rsi
	movl	48(%r15), %edi
	movl	%edi, (%rax,%rsi,4)
	incq	%rdx
	movslq	24(%r12), %rsi
	cmpq	%rsi, %rdx
	jl	LBB0_38
	jmp	LBB0_40
LBB0_39:                                ##   in Loop: Header=BB0_30 Depth=1
	movq	40(%r15), %rax
	movq	-88(%rbp), %r13                 ## 8-byte Reload
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
LBB0_40:                                ##   in Loop: Header=BB0_30 Depth=1
	movl	48(%r15), %ecx
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movq	-96(%rbp), %rsi                 ## 8-byte Reload
	movl	%ecx, 4(%rdx,%rsi)
	movq	8(%r12), %rcx
	shlq	$2, %rcx
	addq	%rcx, 32(%r15)
	movslq	20(%r12), %rcx
	addq	%rcx, %rax
	movq	%rax, 40(%r15)
	addl	%ecx, 48(%r15)
	incq	%rbx
	cmpq	-128(%rbp), %rbx                ## 8-byte Folded Reload
	je	LBB0_43
## %bb.41:                              ##   in Loop: Header=BB0_30 Depth=1
	movq	(%r13,%rbx,8), %r14
	leaq	_validate_gl_shader_rec.shader_reloc_offsets(%rip), %rax
	movslq	(%rax,%rbx,4), %r13
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax,%r13), %eax
	movl	(%r14), %ecx
	addl	%eax, %ecx
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movl	%ecx, (%rdx,%r13)
	testl	%eax, %eax
	je	LBB0_30
	jmp	LBB0_28
LBB0_42:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	jmp	LBB0_7
LBB0_43:
	movl	-112(%rbp), %eax                ## 4-byte Reload
	cmpl	$2, %eax
	movl	$1, %ecx
	cmovael	%eax, %ecx
	movq	%rcx, -96(%rbp)                 ## 8-byte Spill
	xorl	%r12d, %r12d
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_45
LBB0_44:                                ##   in Loop: Header=BB0_45 Depth=1
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	addl	(%rax), %r8d
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	%r8d, 36(%rax,%r12,8)
	incq	%r12
	xorl	%ebx, %ebx
	cmpq	%r12, -96(%rbp)                 ## 8-byte Folded Reload
	movq	-88(%rbp), %r13                 ## 8-byte Reload
	je	LBB0_8
LBB0_45:                                ## =>This Inner Loop Header: Depth=1
	leaq	_validate_gl_shader_rec.shader_reloc_offsets(%rip), %rdi
	callq	_ARRAY_SIZE
	addl	%r12d, %eax
	cltq
	movq	(%r13,%rax,8), %rcx
	movl	36(%r14,%r12,8), %eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movl	40(%r14,%r12,8), %eax
	movq	%rax, -112(%rbp)                ## 8-byte Spill
	movl	41(%r14,%r12,8), %r13d
	movl	52(%r15), %ebx
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	leaq	4(%rcx), %rdi
	movq	%rdi, -104(%rbp)                ## 8-byte Spill
	callq	_to_vc4_bo
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_max
	movl	%eax, 52(%r15)
	movq	-120(%rbp), %rax                ## 8-byte Reload
	testb	$8, (%rax)
	je	LBB0_47
## %bb.46:                              ##   in Loop: Header=BB0_45 Depth=1
	movl	100(%r14,%r12,4), %eax
	movl	$-256, %ecx
	andl	%ecx, %eax
	orl	%eax, %r13d
LBB0_47:                                ##   in Loop: Header=BB0_45 Depth=1
	movq	-112(%rbp), %rsi                ## 8-byte Reload
	leal	1(%rsi), %edx
	movq	-104(%rbp), %rax                ## 8-byte Reload
	movl	(%rax), %ecx
	movl	%ecx, %eax
	movl	-56(%rbp), %r8d                 ## 4-byte Reload
	subl	%r8d, %eax
	jl	LBB0_52
## %bb.48:                              ##   in Loop: Header=BB0_45 Depth=1
	cmpl	%esi, %eax
	jle	LBB0_52
## %bb.49:                              ##   in Loop: Header=BB0_45 Depth=1
	testl	%r13d, %r13d
	je	LBB0_44
## %bb.50:                              ##   in Loop: Header=BB0_45 Depth=1
	subl	%edx, %eax
	cltd
	idivl	%r13d
	movq	-120(%rbp), %rcx                ## 8-byte Reload
	movl	4(%rcx), %esi
	cmpl	%eax, %esi
	jle	LBB0_44
## %bb.51:
	leaq	L_.str.8(%rip), %rdi
	xorl	%ebx, %ebx
	jmp	LBB0_2
LBB0_52:
	leaq	L_.str.7(%rip), %rdi
	xorl	%ebx, %ebx
	movl	%r8d, %esi
	xorl	%eax, %eax
	callq	_DRM_DEBUG
	jmp	LBB0_6
LBB0_53:
	leaq	L_.str.6(%rip), %rdi
	jmp	LBB0_24
LBB0_54:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	2                               ## @validate_gl_shader_rec.shader_reloc_offsets
_validate_gl_shader_rec.shader_reloc_offsets:
	.long	4                               ## 0x4
	.long	16                              ## 0x10
	.long	28                              ## 0x1c

	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"overflowed shader recs reading %d handles from %d bytes left\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"overflowed shader recs copying %db packet from %d bytes left\n"

L_.str.2:                               ## @.str.2
	.asciz	"Shader handle %d too big\n"

	.comm	_VC4_SHADER_FLAG_FS_SINGLE_THREAD,4,2 ## @VC4_SHADER_FLAG_FS_SINGLE_THREAD
L_.str.3:                               ## @.str.3
	.asciz	"Thread mode of CL and FS do not match\n"

L_.str.4:                               ## @.str.4
	.asciz	"cs and vs cannot be threaded\n"

L_.str.5:                               ## @.str.5
	.asciz	"Shaders must be at offset 0 of the BO.\n"

L_.str.6:                               ## @.str.6
	.asciz	"Uniforms src buffer overflow\n"

L_.str.7:                               ## @.str.7
	.asciz	"BO offset overflow (%d + %d > %zu)\n"

L_.str.8:                               ## @.str.8
	.asciz	"primitives use index %d out of supplied %d\n"

	.no_dead_strip	_validate_gl_shader_rec
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function validate_gl_shader_rec
_validate_gl_shader_rec:                ; @validate_gl_shader_rec
	.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
	sub	sp, sp, #80
	mov	x19, x2
	mov	x20, x1
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x23, _validate_gl_shader_rec.shader_reloc_offsets@PAGE
Lloh4:
	add	x23, x23, _validate_gl_shader_rec.shader_reloc_offsets@PAGEOFF
	mov	x0, x23
	bl	_ARRAY_SIZE
	mov	x24, x0
	mov	x0, x23
	bl	_ARRAY_SIZE
	add	w8, w0, #8
	lsl	x8, x8, #3
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0xffffffff0
	sub	x26, x9, x8
	mov	sp, x26
	ldr	w0, [x19]
	ands	w8, w0, #0x7
	mov	w9, #8
	csel	w27, w9, w8, eq
	bl	_gl_shader_rec_size
	mov	x25, x0
	mov	x0, x23
	bl	_ARRAY_SIZE
	add	w28, w27, w0
	lsl	w21, w28, #2
	ldr	w9, [x20]
	subs	w8, w9, w21
	b.ge	LBB0_2
; %bb.1:
	stp	x28, x9, [sp, #-16]!
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_4
LBB0_2:
	ldr	x22, [x20, #8]
	add	x1, x22, w21, sxtw #2
	str	x1, [x20, #8]
	str	w8, [x20]
	cmp	w25, w8
	b.le	LBB0_8
; %bb.3:
	stp	x25, x8, [sp, #-16]!
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_4:
	bl	_DRM_DEBUG
	add	sp, sp, #16
LBB0_5:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	ldur	x8, [x29, #-88]
Lloh14:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh15:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_50
; %bb.7:
	sub	sp, x29, #80
	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
	ret
LBB0_8:
	ldr	x0, [x20, #64]
	stp	x0, x1, [x29, #-104]            ; 16-byte Folded Spill
	mov	x2, x25
	bl	_memcpy
	ldr	x8, [x20, #8]
	add	x8, x8, w25, sxtw #2
	str	x8, [x20, #8]
	mov	x0, x25
	mov	w1, #16
	bl	_roundup
	sub	w8, w0, w25
	cmp	w8, w21
	cset	w0, gt
	bl	_BUG_ON
	mov	x0, x25
	mov	w1, #16
	bl	_roundup
	ldr	x8, [x20, #64]
	add	x8, x8, w0, sxtw
	str	x8, [x20, #64]
	ldr	w8, [x20]
	sub	w8, w8, w25
	str	w8, [x20]
	cmp	w24, #1
	b.lt	LBB0_13
; %bb.9:
	ldr	w8, [x20, #16]
	mov	w9, w24
	mov	x10, x22
	mov	x11, x26
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldrsw	x12, [x10]
	cmp	w12, w8
	b.gt	LBB0_22
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	x13, [x20, #56]
	ldr	x12, [x13, x12, lsl #3]
	str	x12, [x11]
	cbz	x12, LBB0_5
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=1
	add	x11, x11, #8
	add	x10, x10, #4
	subs	x9, x9, #1
	b.ne	LBB0_10
LBB0_13:
	cmp	w24, w28
	b.ge	LBB0_17
; %bb.14:
                                        ; kill: def $w28 killed $w28 killed $x28 def $x28
	sxtw	x8, w28
	add	x22, x22, w24, sxtw #2
	add	x21, x26, w24, sxtw #3
	sub	x25, x8, w24, sxtw
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x22]
	mov	x0, x20
	bl	_vc4_use_bo
	str	x0, [x21]
	cbz	x0, LBB0_5
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	add	x22, x22, #4
	add	x21, x21, #8
	subs	x25, x25, #1
	b.ne	LBB0_15
LBB0_17:
Lloh17:
	adrp	x8, _VC4_SHADER_FLAG_FS_SINGLE_THREAD@GOTPAGE
Lloh18:
	ldr	x8, [x8, _VC4_SHADER_FLAG_FS_SINGLE_THREAD@GOTPAGEOFF]
	ldur	x9, [x29, #-96]                 ; 8-byte Folded Reload
	ldr	w9, [x9]
Lloh19:
	ldr	w8, [x8]
	tst	w8, w9
	cset	w21, eq
	ldr	x22, [x26]
	add	x0, x22, #4
	bl	_to_vc4_bo
	ldr	x8, [x0, #8]
	ldr	w8, [x8]
	cmp	w8, w21
	b.ne	LBB0_21
; %bb.18:
	ldr	x8, [x26, #8]
	add	x0, x8, #4
	bl	_to_vc4_bo
	ldr	x8, [x0, #8]
	ldr	w8, [x8]
	cbnz	w8, LBB0_20
; %bb.19:
	ldr	x8, [x26, #16]
	add	x0, x8, #4
	bl	_to_vc4_bo
	ldr	x8, [x0, #8]
	ldr	w8, [x8]
	cbz	w8, LBB0_23
LBB0_20:
Lloh20:
	adrp	x0, l_.str.4@PAGE
Lloh21:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_DRM_DEBUG
	b	LBB0_5
LBB0_21:
Lloh22:
	adrp	x0, l_.str.3@PAGE
Lloh23:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_DRM_DEBUG
	b	LBB0_5
LBB0_22:
	str	x12, [sp, #-16]!
Lloh24:
	adrp	x0, l_.str.2@PAGE
Lloh25:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_4
LBB0_23:
	cmp	w24, #1
	ldur	x21, [x29, #-104]               ; 8-byte Folded Reload
	b.lt	LBB0_39
; %bb.24:
	ldur	x8, [x29, #-96]                 ; 8-byte Folded Reload
	ldr	w8, [x8, #4]
	ldr	w9, [x22]
	add	w9, w9, w8
	str	w9, [x21, #4]
	cbz	w8, LBB0_26
LBB0_25:
Lloh26:
	adrp	x0, l_.str.5@PAGE
Lloh27:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_DRM_DEBUG
	b	LBB0_5
LBB0_26:
	mov	x25, #0
	add	x9, x21, #4
	mov	w8, #4
	stp	x9, x8, [x29, #-144]            ; 16-byte Folded Spill
	mov	w8, w24
	stur	x8, [x29, #-152]                ; 8-byte Folded Spill
LBB0_27:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_31 Depth 2
                                        ;     Child Loop BB0_35 Depth 2
	add	x0, x22, #4
	bl	_to_vc4_bo
	ldr	x28, [x0, #8]
	cbz	x28, LBB0_5
; %bb.28:                               ;   in Loop: Header=BB0_27 Depth=1
	ldr	x8, [x28, #8]
	ldr	x9, [x20, #24]
	cmp	x8, x9
	b.gt	LBB0_49
; %bb.29:                               ;   in Loop: Header=BB0_27 Depth=1
	ldp	x9, x0, [x20, #32]
	ldp	w8, w2, [x28, #16]
                                        ; kill: def $w8 killed $w8 def $x8
	sxtw	x8, w8
	stur	x9, [x29, #-112]                ; 8-byte Folded Spill
	add	x1, x9, x8, lsl #2
	stp	x25, x1, [x29, #-128]           ; 16-byte Folded Spill
	bl	_memcpy
	ldr	w8, [x28, #16]
	cmp	w8, #1
	b.lt	LBB0_33
; %bb.30:                               ;   in Loop: Header=BB0_27 Depth=1
	mov	x22, #0
	mov	x24, #0
	ldur	x8, [x29, #-128]                ; 8-byte Folded Reload
	cmp	x8, #2
	cset	w25, eq
LBB0_31:                                ;   Parent Loop BB0_27 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x28, #40]
	add	x2, x8, x22
	ldp	x1, x8, [x29, #-120]            ; 16-byte Folded Reload
	ldr	w3, [x8, x22]
	mov	x0, x20
	mov	x4, x25
	bl	_reloc_tex
	cbz	w0, LBB0_5
; %bb.32:                               ;   in Loop: Header=BB0_31 Depth=2
	add	x24, x24, #1
	ldrsw	x8, [x28, #16]
	add	x22, x22, #4
	cmp	x24, x8
	b.lt	LBB0_31
LBB0_33:                                ;   in Loop: Header=BB0_27 Depth=1
	ldr	w8, [x28, #24]
	cmp	w8, #0
	b.le	LBB0_36
; %bb.34:                               ;   in Loop: Header=BB0_27 Depth=1
	mov	x9, #0
	ldr	x10, [x28, #32]
	ldr	x8, [x20, #40]
	ldur	x25, [x29, #-128]               ; 8-byte Folded Reload
LBB0_35:                                ;   Parent Loop BB0_27 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldrsw	x11, [x10, x9, lsl #2]
	ldr	w12, [x20, #48]
	str	w12, [x8, x11, lsl #2]
	add	x9, x9, #1
	ldrsw	x11, [x28, #24]
	cmp	x9, x11
	b.lt	LBB0_35
	b	LBB0_37
LBB0_36:                                ;   in Loop: Header=BB0_27 Depth=1
	ldr	x8, [x20, #40]
	ldur	x25, [x29, #-128]               ; 8-byte Folded Reload
LBB0_37:                                ;   in Loop: Header=BB0_27 Depth=1
	ldr	w9, [x20, #48]
	ldp	x10, x11, [x29, #-144]          ; 16-byte Folded Reload
	str	w9, [x10, x11]
	ldr	x9, [x28, #8]
	ldr	x10, [x20, #32]
	add	x9, x10, x9, lsl #2
	ldrsw	x10, [x28, #20]
	add	x8, x8, x10
	stp	x9, x8, [x20, #32]
	ldr	w8, [x20, #48]
	add	w8, w8, w10
	str	w8, [x20, #48]
	add	x25, x25, #1
	ldur	x8, [x29, #-152]                ; 8-byte Folded Reload
	cmp	x25, x8
	b.eq	LBB0_39
; %bb.38:                               ;   in Loop: Header=BB0_27 Depth=1
	ldr	x22, [x26, x25, lsl #3]
	ldrsw	x10, [x23, x25, lsl #2]
	ldur	x8, [x29, #-96]                 ; 8-byte Folded Reload
	ldr	w8, [x8, x10]
	ldr	w9, [x22]
	add	w9, w9, w8
	stur	x10, [x29, #-136]               ; 8-byte Folded Spill
	str	w9, [x21, x10]
	cbz	w8, LBB0_27
	b	LBB0_25
LBB0_39:
	mov	x22, #0
	cmp	w27, #1
	csinc	w8, w27, wzr, hi
	stur	x8, [x29, #-120]                ; 8-byte Folded Spill
	mov	w28, #36
	b	LBB0_41
LBB0_40:                                ;   in Loop: Header=BB0_41 Depth=1
	mov	w0, #0
	ldur	x8, [x29, #-112]                ; 8-byte Folded Reload
	ldr	w8, [x8]
	add	w8, w8, w21
	ldur	x21, [x29, #-104]               ; 8-byte Folded Reload
	str	w8, [x21, x28]
	add	x22, x22, #1
	add	x28, x28, #8
	ldur	x8, [x29, #-120]                ; 8-byte Folded Reload
	cmp	x8, x22
	b.eq	LBB0_6
LBB0_41:                                ; =>This Inner Loop Header: Depth=1
Lloh28:
	adrp	x0, _validate_gl_shader_rec.shader_reloc_offsets@PAGE
Lloh29:
	add	x0, x0, _validate_gl_shader_rec.shader_reloc_offsets@PAGEOFF
	bl	_ARRAY_SIZE
	add	w8, w22, w0
	ldr	x9, [x26, w8, sxtw #3]
	ldur	x8, [x29, #-96]                 ; 8-byte Folded Reload
	add	x8, x8, x28
	ldp	w21, w27, [x8]
	ldur	w23, [x8, #5]
	ldr	w25, [x20, #52]
	stur	x9, [x29, #-112]                ; 8-byte Folded Spill
	add	x24, x9, #4
	mov	x0, x24
	bl	_to_vc4_bo
	ldr	w1, [x0]
	mov	x0, x25
	bl	_max
	str	w0, [x20, #52]
	ldrb	w8, [x19]
	tbz	w8, #3, LBB0_43
; %bb.42:                               ;   in Loop: Header=BB0_41 Depth=1
	ldur	x8, [x29, #-96]                 ; 8-byte Folded Reload
	add	x8, x8, x22, lsl #2
	ldr	w8, [x8, #100]
	and	w8, w8, #0xffffff00
	orr	w23, w8, w23
LBB0_43:                                ;   in Loop: Header=BB0_41 Depth=1
	add	w8, w27, #1
	ldr	w9, [x24]
	subs	w10, w9, w21
	b.lt	LBB0_48
; %bb.44:                               ;   in Loop: Header=BB0_41 Depth=1
	cmp	w10, w27
	b.le	LBB0_48
; %bb.45:                               ;   in Loop: Header=BB0_41 Depth=1
	cbz	w23, LBB0_40
; %bb.46:                               ;   in Loop: Header=BB0_41 Depth=1
	sub	w8, w10, w8
	sdiv	w9, w8, w23
	ldr	w8, [x19, #4]
	cmp	w8, w9
	b.le	LBB0_40
; %bb.47:
	stp	x8, x9, [sp, #-16]!
Lloh30:
	adrp	x0, l_.str.8@PAGE
Lloh31:
	add	x0, x0, l_.str.8@PAGEOFF
	b	LBB0_4
LBB0_48:
	sub	sp, sp, #32
	stp	x8, x9, [sp, #8]
	str	x21, [sp]
Lloh32:
	adrp	x0, l_.str.7@PAGE
Lloh33:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_DRM_DEBUG
	add	sp, sp, #32
	b	LBB0_5
LBB0_49:
Lloh34:
	adrp	x0, l_.str.6@PAGE
Lloh35:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_DRM_DEBUG
	b	LBB0_5
LBB0_50:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @validate_gl_shader_rec.shader_reloc_offsets
_validate_gl_shader_rec.shader_reloc_offsets:
	.long	4                               ; 0x4
	.long	16                              ; 0x10
	.long	28                              ; 0x1c

	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"overflowed shader recs reading %d handles from %d bytes left\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"overflowed shader recs copying %db packet from %d bytes left\n"

l_.str.2:                               ; @.str.2
	.asciz	"Shader handle %d too big\n"

	.comm	_VC4_SHADER_FLAG_FS_SINGLE_THREAD,4,2 ; @VC4_SHADER_FLAG_FS_SINGLE_THREAD
l_.str.3:                               ; @.str.3
	.asciz	"Thread mode of CL and FS do not match\n"

l_.str.4:                               ; @.str.4
	.asciz	"cs and vs cannot be threaded\n"

l_.str.5:                               ; @.str.5
	.asciz	"Shaders must be at offset 0 of the BO.\n"

l_.str.6:                               ; @.str.6
	.asciz	"Uniforms src buffer overflow\n"

l_.str.7:                               ; @.str.7
	.asciz	"BO offset overflow (%d + %d > %zu)\n"

l_.str.8:                               ; @.str.8
	.asciz	"primitives use index %d out of supplied %d\n"

	.no_dead_strip	_validate_gl_shader_rec
.subsections_via_symbols
