	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function find_glsl_hull_shader
_find_glsl_hull_shader:                 ## @find_glsl_hull_shader
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %r12
	movq	(%rdx), %rbx
	testq	%rbx, %rbx
	jne	LBB0_4
## %bb.1:
	movl	$16, %edi
	callq	_heap_alloc_zero
	movq	%rax, %rbx
	movq	%rax, (%r14)
	testq	%rax, %rax
	je	LBB0_2
LBB0_4:
	movl	(%rbx), %eax
	testl	%eax, %eax
	jle	LBB0_6
## %bb.5:
	movq	8(%rbx), %rbx
	xorl	%edi, %edi
	cmpl	$1, %eax
	sete	%dil
	callq	_assert
	movl	(%rbx), %eax
	jmp	LBB0_9
LBB0_6:
	leaq	L_.str.1(%rip), %rdi
	movq	%r14, %rsi
	callq	_TRACE
	xorl	%edi, %edi
	cmpq	$0, 8(%rbx)
	sete	%dil
	callq	_assert
	movl	$4, %edi
	callq	_heap_alloc
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movq	%rax, %r13
	movq	%rax, 8(%rbx)
	movl	$1, 4(%rbx)
	movq	%r15, %rdi
	callq	_string_buffer_clear
	movq	%r12, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_shader_glsl_generate_hull_shader
	movslq	(%rbx), %rcx
	leal	1(%rcx), %edx
	movl	%edx, (%rbx)
	movl	%eax, (%r13,%rcx,4)
	jmp	LBB0_9
LBB0_2:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_3
LBB0_7:
	leaq	L_.str.2(%rip), %rdi
LBB0_3:
	callq	_ERR
	xorl	%eax, %eax
LBB0_9:
	addq	$8, %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	"Failed to allocate GL shaders array.\n"

	.no_dead_strip	_find_glsl_hull_shader
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function find_glsl_hull_shader
_find_glsl_hull_shader:                 ; @find_glsl_hull_shader
	.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	x20, x2
	mov	x21, x1
	mov	x22, x0
	ldr	x19, [x2]
	cbnz	x19, LBB0_2
; %bb.1:
	mov	w0, #16
	bl	_heap_alloc_zero
	mov	x19, x0
	str	x0, [x20]
	cbz	x0, LBB0_6
LBB0_2:
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.3:
	ldr	x19, [x19, #8]
	cset	w0, eq
	bl	_assert
	ldr	w0, [x19]
	b	LBB0_9
LBB0_4:
Lloh0:
	adrp	x0, l_.str.1@PAGE
Lloh1:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x20
	bl	_TRACE
	ldr	x8, [x19, #8]
	cmp	x8, #0
	cset	w0, eq
	bl	_assert
	mov	w0, #4
	bl	_heap_alloc
	cbz	x0, LBB0_7
; %bb.5:
	mov	x23, x0
	str	x0, [x19, #8]
	mov	w8, #1
	str	w8, [x19, #4]
	mov	x0, x21
	bl	_string_buffer_clear
	mov	x0, x22
	mov	x1, x21
	mov	x2, x20
	bl	_shader_glsl_generate_hull_shader
	ldrsw	x8, [x19]
	add	w9, w8, #1
	str	w9, [x19]
	str	w0, [x23, x8, lsl #2]
	b	LBB0_9
LBB0_6:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_8
LBB0_7:
Lloh4:
	adrp	x0, l_.str.2@PAGE
Lloh5:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_8:
	bl	_ERR
	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 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	"Failed to allocate GL shaders array.\n"

	.no_dead_strip	_find_glsl_hull_shader
.subsections_via_symbols
