	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function find_glsl_pshader
_find_glsl_pshader:                     ## @find_glsl_pshader
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -64(%rbp)                  ## 8-byte Spill
	movq	%r8, %r15
	movq	%rcx, %rbx
	movq	%rdx, %r12
	movq	%rsi, %r13
	movq	%rdi, -88(%rbp)                 ## 8-byte Spill
	movq	(%rcx), %r14
	testq	%r14, %r14
	jne	LBB0_4
## %bb.1:
	movl	$24, %edi
	callq	_heap_alloc_zero
	movq	%rax, %r14
	movq	%rax, (%rbx)
	testq	%rax, %rax
	je	LBB0_2
LBB0_4:
	movq	%r13, -80(%rbp)                 ## 8-byte Spill
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	16(%r14), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	cmpq	$0, (%r14)
	je	LBB0_11
## %bb.5:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	leaq	4(%rax), %r13
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	leaq	4(%r13), %rdi
	movq	%r15, %rsi
	movl	$16, %edx
	callq	_memcmp
	testl	%eax, %eax
	je	LBB0_7
## %bb.10:                              ##   in Loop: Header=BB0_6 Depth=1
	incq	%rbx
	addq	$24, %r13
	cmpq	(%r14), %rbx
	jb	LBB0_6
LBB0_11:
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	leaq	L_.str.1(%rip), %rdi
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rsi
	callq	_TRACE
	movq	(%r14), %rax
	movq	8(%r14), %rbx
	cmpq	%rax, %rbx
	jne	LBB0_18
## %bb.12:
	testq	%rbx, %rbx
	je	LBB0_14
## %bb.13:
	movq	%rbx, %rsi
	shrq	%rsi
	movl	$1, %edi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_max
	movl	%eax, %r13d
	addq	%rbx, %r13
	movq	16(%r14), %rdi
	leal	(,%r13,8), %eax
	leal	(%rax,%rax,2), %esi
	callq	_heap_realloc
	movslq	%r13d, %rcx
	testq	%rax, %rax
	je	LBB0_16
LBB0_17:
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%rax, 16(%r14)
	movq	%rcx, 8(%r14)
	movq	(%r14), %rax
	movq	-56(%rbp), %r12                 ## 8-byte Reload
LBB0_18:
	leaq	(%rax,%rax,2), %rax
	movups	(%r15), %xmm0
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movups	%xmm0, 8(%rcx,%rax,8)
	movq	(%r14), %rax
	leaq	(%rax,%rax,2), %rax
	leaq	(%rcx,%rax,8), %r13
	addq	$4, %r13
	movq	%r13, %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movq	8(%r15), %rax
	testq	%rax, %rax
	cmovneq	%r13, %rax
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	movl	(%r15), %esi
	movq	%r12, %rdi
	callq	_pixelshader_update_resource_types
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_string_buffer_clear
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rsi
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movq	%r12, %rcx
	movq	%r15, %r8
	movq	%r13, %r9
	callq	_shader_glsl_generate_pshader
	movq	(%r14), %rcx
	leaq	1(%rcx), %rdx
	movq	%rdx, (%r14)
	leaq	(%rcx,%rcx,2), %rcx
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movl	%eax, (%rdx,%rcx,8)
	jmp	LBB0_19
LBB0_7:
	cmpq	$0, 8(%r15)
	je	LBB0_9
## %bb.8:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	%r13, (%rax)
LBB0_9:
	movl	-4(%r13), %eax
	jmp	LBB0_19
LBB0_2:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_3
LBB0_14:
	movl	$24, %edi
	callq	_heap_alloc
	movl	$1, %ecx
	testq	%rax, %rax
	jne	LBB0_17
LBB0_16:
	leaq	L_.str.2(%rip), %rdi
LBB0_3:
	callq	_ERR
	xorl	%eax, %eax
LBB0_19:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to allocate backend data.\n"

L_.str.1:                               ## @.str.1
	.asciz	"No matching GL shader found for shader %p, compiling a new shader.\n"

L_.str.2:                               ## @.str.2
	.asciz	"Out of memory\n"

	.no_dead_strip	_find_glsl_pshader
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function find_glsl_pshader
_find_glsl_pshader:                     ; @find_glsl_pshader
	.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	x25, x5
	mov	x19, x4
	mov	x20, x3
	mov	x22, x2
	mov	x23, x1
	mov	x24, x0
	ldr	x21, [x3]
	cbnz	x21, LBB0_2
; %bb.1:
	mov	w0, #24
	bl	_heap_alloc_zero
	mov	x21, x0
	str	x0, [x20]
	cbz	x0, LBB0_14
LBB0_2:
	ldr	x26, [x21, #16]
	ldr	x8, [x21]
	cbz	x8, LBB0_6
; %bb.3:
	mov	x28, #0
	add	x27, x26, #4
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	add	x0, x27, #4
	mov	x1, x19
	mov	w2, #16
	bl	_memcmp
	cbz	w0, LBB0_11
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x28, x28, #1
	ldr	x8, [x21]
	add	x27, x27, #24
	cmp	x28, x8
	b.lo	LBB0_4
LBB0_6:
Lloh0:
	adrp	x0, l_.str.1@PAGE
Lloh1:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x20
	bl	_TRACE
	ldp	x8, x27, [x21]
	cmp	x27, x8
	b.ne	LBB0_10
; %bb.7:
	cbz	x27, LBB0_15
; %bb.8:
	lsr	x1, x27, #1
	mov	w0, #1
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_max
	add	x27, x27, w0, uxtw
	ldr	x0, [x21, #16]
	add	w8, w27, w27, lsl #1
	lsl	w1, w8, #3
	bl	_heap_realloc
	mov	x26, x0
	sxtw	x8, w27
	cbz	x26, LBB0_16
LBB0_9:
	stp	x8, x26, [x21, #8]
	ldr	x8, [x21]
LBB0_10:
	mov	w28, #24
	madd	x8, x8, x28, x26
	ldr	q0, [x19]
	stur	q0, [x8, #8]
	ldr	x8, [x21]
	madd	x8, x8, x28, x26
	add	x27, x8, #4
	mov	x0, x27
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	ldr	x8, [x19, #8]
	cmp	x8, #0
	csel	x8, xzr, x27, eq
	str	x8, [x25]
	ldr	w1, [x19]
	mov	x0, x20
	bl	_pixelshader_update_resource_types
	mov	x0, x23
	bl	_string_buffer_clear
	mov	x0, x24
	mov	x1, x23
	mov	x2, x22
	mov	x3, x20
	mov	x4, x19
	mov	x5, x27
	bl	_shader_glsl_generate_pshader
	ldr	x8, [x21]
	add	x9, x8, #1
	str	x9, [x21]
	mul	x8, x8, x28
	str	w0, [x26, x8]
	b	LBB0_18
LBB0_11:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_13
; %bb.12:
	str	x27, [x25]
LBB0_13:
	ldur	w0, [x27, #-4]
	b	LBB0_18
LBB0_14:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_17
LBB0_15:
	mov	w0, #24
	bl	_heap_alloc
	mov	x26, x0
	mov	w8, #1
	cbnz	x26, LBB0_9
LBB0_16:
Lloh4:
	adrp	x0, l_.str.2@PAGE
Lloh5:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_17:
	bl	_ERR
	mov	w0, #0
LBB0_18:
	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
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to allocate backend data.\n"

l_.str.1:                               ; @.str.1
	.asciz	"No matching GL shader found for shader %p, compiling a new shader.\n"

l_.str.2:                               ; @.str.2
	.asciz	"Out of memory\n"

	.no_dead_strip	_find_glsl_pshader
.subsections_via_symbols
