	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_raspitexutil_build_shader_program ## -- Begin function raspitexutil_build_shader_program
	.p2align	4, 0x90
_raspitexutil_build_shader_program:     ## @raspitexutil_build_shader_program
	.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	$1048, %rsp                     ## imm = 0x418
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movl	$0, -1080(%rbp)
	callq	_vcos_assert
	movq	64(%r12), %rdi
	callq	_vcos_assert
	movq	56(%r12), %rdi
	callq	_vcos_assert
	cmpq	$0, 64(%r12)
	je	LBB0_9
## %bb.1:
	leaq	56(%r12), %r14
	cmpq	$0, (%r14)
	je	LBB0_9
## %bb.2:
	leaq	64(%r12), %r15
	xorps	%xmm0, %xmm0
	movups	%xmm0, 32(%r12)
	movq	_GL_VERTEX_SHADER@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_glCreateShader
	movq	%rax, 32(%r12)
	movq	%rax, %rdi
	movl	$1, %esi
	movq	%r15, %rdx
	xorl	%ecx, %ecx
	callq	_glShaderSource
	movq	32(%r12), %rdi
	callq	_glCompileShader
	movq	32(%r12), %rdi
	movq	_GL_COMPILE_STATUS@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	leaq	-1076(%rbp), %rdx
	callq	_glGetShaderiv
	cmpl	$0, -1076(%rbp)
	je	LBB0_3
## %bb.4:
	movq	_GL_FRAGMENT_SHADER@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_glCreateShader
	movq	%rax, 40(%r12)
	movq	%rax, %rdi
	movl	$1, %esi
	movq	%r14, %rdx
	xorl	%ecx, %ecx
	callq	_glShaderSource
	movq	40(%r12), %rdi
	callq	_glCompileShader
	movq	40(%r12), %rdi
	movl	(%rbx), %esi
	leaq	-1076(%rbp), %rdx
	callq	_glGetShaderiv
	cmpl	$0, -1076(%rbp)
	je	LBB0_5
## %bb.10:
	xorl	%eax, %eax
	callq	_glCreateProgram
	movl	%eax, 48(%r12)
	movq	32(%r12), %rsi
	movl	%eax, %edi
	callq	_glAttachShader
	movl	48(%r12), %edi
	movq	40(%r12), %rsi
	callq	_glAttachShader
	movl	48(%r12), %edi
	callq	_glLinkProgram
	movl	48(%r12), %edi
	movq	_GL_LINK_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-1076(%rbp), %rdx
	callq	_glGetProgramiv
	cmpl	$0, -1076(%rbp)
	je	LBB0_26
## %bb.11:
	movq	_SHADER_MAX_ATTRIBUTES@GOTPCREL(%rip), %r15
	cmpl	$0, (%r15)
	jle	LBB0_17
## %bb.12:
	xorl	%ebx, %ebx
	leaq	L_.str.3(%rip), %r14
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rax
	movq	(%rax,%rbx,8), %rsi
	testq	%rsi, %rsi
	je	LBB0_17
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	movl	48(%r12), %edi
	callq	_glGetAttribLocation
	movq	8(%r12), %rcx
	movl	%eax, (%rcx,%rbx,4)
	cmpl	$-1, %eax
	je	LBB0_15
## %bb.16:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	(%r12), %rcx
	movq	(%rcx,%rbx,8), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_vcos_log_trace
	incq	%rbx
	movslq	(%r15), %rax
	cmpq	%rax, %rbx
	jl	LBB0_13
LBB0_17:
	movq	_SHADER_MAX_UNIFORMS@GOTPCREL(%rip), %r13
	cmpl	$0, (%r13)
	jle	LBB0_18
## %bb.19:
	xorl	%r14d, %r14d
	leaq	L_.str.5(%rip), %r15
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_20:                                ## =>This Inner Loop Header: Depth=1
	movq	16(%r12), %rax
	movq	(%rax,%rbx,8), %rsi
	testq	%rsi, %rsi
	je	LBB0_24
## %bb.21:                              ##   in Loop: Header=BB0_20 Depth=1
	movl	48(%r12), %edi
	callq	_glGetUniformLocation
	movq	24(%r12), %rcx
	movl	%eax, (%rcx,%rbx,4)
	cmpl	$-1, %eax
	je	LBB0_22
## %bb.23:                              ##   in Loop: Header=BB0_20 Depth=1
	movq	16(%r12), %rcx
	movq	(%rcx,%rbx,8), %rsi
	movq	%r15, %rdi
	movl	%eax, %edx
	callq	_vcos_log_trace
	incq	%rbx
	movslq	(%r13), %rax
	cmpq	%rax, %rbx
	jl	LBB0_20
	jmp	LBB0_24
LBB0_3:
	leaq	32(%r12), %rax
	movq	(%rax), %rdi
	jmp	LBB0_6
LBB0_5:
	movq	40(%r12), %rdi
LBB0_6:
	leaq	-1080(%rbp), %rdx
	leaq	-1072(%rbp), %r14
	movl	$1024, %esi                     ## imm = 0x400
	movq	%r14, %rcx
	callq	_glGetShaderInfoLog
LBB0_7:
	leaq	L_.str(%rip), %rdi
	movq	%r14, %rsi
LBB0_8:
	xorl	%eax, %eax
	callq	_vcos_log_error
LBB0_9:
	movq	_VCOS_FUNCTION@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	leaq	L_.str.6(%rip), %rdi
	xorl	%eax, %eax
	callq	_vcos_log_error
	movl	48(%r12), %edi
	callq	_glDeleteProgram
	movq	40(%r12), %rdi
	callq	_glDeleteShader
	movq	32(%r12), %rdi
	callq	_glDeleteShader
	movl	$-1, %r14d
LBB0_24:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_27
## %bb.25:
	movl	%r14d, %eax
	addq	$1048, %rsp                     ## imm = 0x418
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_26:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_vcos_log_error
	movl	48(%r12), %edi
	leaq	-1080(%rbp), %rdx
	leaq	-1072(%rbp), %r14
	movl	$1024, %esi                     ## imm = 0x400
	movq	%r14, %rcx
	callq	_glGetProgramInfoLog
	jmp	LBB0_7
LBB0_18:
	xorl	%r14d, %r14d
	jmp	LBB0_24
LBB0_15:
	movq	(%r12), %rax
	movq	(%rax,%rbx,8), %rsi
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_8
LBB0_22:
	movq	16(%r12), %rax
	movq	(%rax,%rbx,8), %rsi
	leaq	L_.str.4(%rip), %rdi
	jmp	LBB0_8
LBB0_27:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_GL_VERTEX_SHADER,4,2           ## @GL_VERTEX_SHADER
	.comm	_GL_COMPILE_STATUS,4,2          ## @GL_COMPILE_STATUS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Program info log %s"

	.comm	_GL_FRAGMENT_SHADER,4,2         ## @GL_FRAGMENT_SHADER
	.comm	_GL_LINK_STATUS,4,2             ## @GL_LINK_STATUS
L_.str.1:                               ## @.str.1
	.asciz	"Failed to link shader program"

	.comm	_SHADER_MAX_ATTRIBUTES,4,2      ## @SHADER_MAX_ATTRIBUTES
L_.str.2:                               ## @.str.2
	.asciz	"Failed to get location for attribute %s"

L_.str.3:                               ## @.str.3
	.asciz	"Attribute for %s is %d"

	.comm	_SHADER_MAX_UNIFORMS,4,2        ## @SHADER_MAX_UNIFORMS
L_.str.4:                               ## @.str.4
	.asciz	"Failed to get location for uniform %s"

L_.str.5:                               ## @.str.5
	.asciz	"Uniform for %s is %d"

L_.str.6:                               ## @.str.6
	.asciz	"%s: Failed to build shader program"

	.comm	_VCOS_FUNCTION,8,3              ## @VCOS_FUNCTION
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_raspitexutil_build_shader_program ; -- Begin function raspitexutil_build_shader_program
	.p2align	2
_raspitexutil_build_shader_program:     ; @raspitexutil_build_shader_program
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [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 w27, -56
	.cfi_offset w28, -64
	sub	sp, sp, #1056
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	str	wzr, [sp, #16]
	bl	_vcos_assert
	mov	x21, x19
	ldr	x0, [x21, #64]!
	bl	_vcos_assert
	mov	x20, x19
	ldr	x0, [x20, #56]!
	bl	_vcos_assert
	ldr	x8, [x21]
	cbz	x8, LBB0_20
; %bb.1:
	ldr	x8, [x20]
	cbz	x8, LBB0_20
; %bb.2:
	mov	x22, x19
	stp	xzr, xzr, [x22, #32]!
Lloh3:
	adrp	x8, _GL_VERTEX_SHADER@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GL_VERTEX_SHADER@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_glCreateShader
	str	x0, [x22]
	mov	w1, #1
	mov	x2, x21
	mov	x3, #0
	bl	_glShaderSource
	ldr	x0, [x22]
	bl	_glCompileShader
	ldr	x0, [x22]
Lloh6:
	adrp	x21, _GL_COMPILE_STATUS@GOTPAGE
Lloh7:
	ldr	x21, [x21, _GL_COMPILE_STATUS@GOTPAGEOFF]
	ldr	w1, [x21]
	add	x2, sp, #20
	bl	_glGetShaderiv
	ldr	w8, [sp, #20]
	cbz	w8, LBB0_15
; %bb.3:
Lloh8:
	adrp	x8, _GL_FRAGMENT_SHADER@GOTPAGE
Lloh9:
	ldr	x8, [x8, _GL_FRAGMENT_SHADER@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	bl	_glCreateShader
	str	x0, [x19, #40]
	mov	w1, #1
	mov	x2, x20
	mov	x3, #0
	bl	_glShaderSource
	ldr	x0, [x19, #40]
	bl	_glCompileShader
	ldr	x0, [x19, #40]
	ldr	w1, [x21]
	add	x2, sp, #20
	bl	_glGetShaderiv
	ldr	w8, [sp, #20]
	cbz	w8, LBB0_16
; %bb.4:
	bl	_glCreateProgram
	str	w0, [x19, #48]
	ldr	x1, [x19, #32]
	bl	_glAttachShader
	ldr	w0, [x19, #48]
	ldr	x1, [x19, #40]
	bl	_glAttachShader
	ldr	w0, [x19, #48]
	bl	_glLinkProgram
	ldr	w0, [x19, #48]
Lloh11:
	adrp	x8, _GL_LINK_STATUS@GOTPAGE
Lloh12:
	ldr	x8, [x8, _GL_LINK_STATUS@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	add	x2, sp, #20
	bl	_glGetProgramiv
	ldr	w8, [sp, #20]
	cbz	w8, LBB0_23
; %bb.5:
Lloh14:
	adrp	x21, _SHADER_MAX_ATTRIBUTES@GOTPAGE
Lloh15:
	ldr	x21, [x21, _SHADER_MAX_ATTRIBUTES@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.6:
	mov	x22, #0
Lloh16:
	adrp	x20, l_.str.3@PAGE
Lloh17:
	add	x20, x20, l_.str.3@PAGEOFF
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19]
	ldr	x1, [x8, x22, lsl #3]
	cbz	x1, LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w0, [x19, #48]
	bl	_glGetAttribLocation
	ldr	x8, [x19, #8]
	str	w0, [x8, x22, lsl #2]
	cmn	w0, #1
	b.eq	LBB0_25
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x2, x0
	ldr	x8, [x19]
	ldr	x1, [x8, x22, lsl #3]
	mov	x0, x20
	bl	_vcos_log_trace
	add	x22, x22, #1
	ldrsw	x8, [x21]
	cmp	x22, x8
	b.lt	LBB0_7
LBB0_10:
Lloh18:
	adrp	x21, _SHADER_MAX_UNIFORMS@GOTPAGE
Lloh19:
	ldr	x21, [x21, _SHADER_MAX_UNIFORMS@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_24
; %bb.11:
	mov	x22, #0
Lloh20:
	adrp	x20, l_.str.5@PAGE
Lloh21:
	add	x20, x20, l_.str.5@PAGEOFF
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #16]
	ldr	x1, [x8, x22, lsl #3]
	cbz	x1, LBB0_24
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	w0, [x19, #48]
	bl	_glGetUniformLocation
	ldr	x8, [x19, #24]
	str	w0, [x8, x22, lsl #2]
	cmn	w0, #1
	b.eq	LBB0_26
; %bb.14:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	x2, x0
	ldr	x8, [x19, #16]
	ldr	x1, [x8, x22, lsl #3]
	mov	x0, x20
	bl	_vcos_log_trace
	mov	w0, #0
	add	x22, x22, #1
	ldrsw	x8, [x21]
	cmp	x22, x8
	b.lt	LBB0_12
	b	LBB0_21
LBB0_15:
	ldr	x0, [x22]
	b	LBB0_17
LBB0_16:
	ldr	x0, [x19, #40]
LBB0_17:
	add	x20, sp, #24
	add	x2, sp, #16
	add	x3, sp, #24
	mov	w1, #1024
	bl	_glGetShaderInfoLog
LBB0_18:
	str	x20, [sp]
Lloh22:
	adrp	x0, l_.str@PAGE
Lloh23:
	add	x0, x0, l_.str@PAGEOFF
LBB0_19:
	bl	_vcos_log_error
LBB0_20:
Lloh24:
	adrp	x8, _VCOS_FUNCTION@GOTPAGE
Lloh25:
	ldr	x8, [x8, _VCOS_FUNCTION@GOTPAGEOFF]
Lloh26:
	ldr	x8, [x8]
	str	x8, [sp]
Lloh27:
	adrp	x0, l_.str.6@PAGE
Lloh28:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_vcos_log_error
	ldr	w0, [x19, #48]
	bl	_glDeleteProgram
	ldr	x0, [x19, #40]
	bl	_glDeleteShader
	ldr	x0, [x19, #32]
	bl	_glDeleteShader
	mov	w0, #-1
LBB0_21:
	ldur	x8, [x29, #-56]
Lloh29:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh30:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh31:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_27
; %bb.22:
	add	sp, sp, #1056
	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	x28, x27, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_23:
Lloh32:
	adrp	x0, l_.str.1@PAGE
Lloh33:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_vcos_log_error
	ldr	w0, [x19, #48]
	add	x20, sp, #24
	add	x2, sp, #16
	add	x3, sp, #24
	mov	w1, #1024
	bl	_glGetProgramInfoLog
	b	LBB0_18
LBB0_24:
	mov	w0, #0
	b	LBB0_21
LBB0_25:
	ldr	x8, [x19]
	ldr	x8, [x8, x22, lsl #3]
	str	x8, [sp]
Lloh34:
	adrp	x0, l_.str.2@PAGE
Lloh35:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_19
LBB0_26:
	ldr	x8, [x19, #16]
	ldr	x8, [x8, x22, lsl #3]
	str	x8, [sp]
Lloh36:
	adrp	x0, l_.str.4@PAGE
Lloh37:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_19
LBB0_27:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_GL_VERTEX_SHADER,4,2           ; @GL_VERTEX_SHADER
	.comm	_GL_COMPILE_STATUS,4,2          ; @GL_COMPILE_STATUS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Program info log %s"

	.comm	_GL_FRAGMENT_SHADER,4,2         ; @GL_FRAGMENT_SHADER
	.comm	_GL_LINK_STATUS,4,2             ; @GL_LINK_STATUS
l_.str.1:                               ; @.str.1
	.asciz	"Failed to link shader program"

	.comm	_SHADER_MAX_ATTRIBUTES,4,2      ; @SHADER_MAX_ATTRIBUTES
l_.str.2:                               ; @.str.2
	.asciz	"Failed to get location for attribute %s"

l_.str.3:                               ; @.str.3
	.asciz	"Attribute for %s is %d"

	.comm	_SHADER_MAX_UNIFORMS,4,2        ; @SHADER_MAX_UNIFORMS
l_.str.4:                               ; @.str.4
	.asciz	"Failed to get location for uniform %s"

l_.str.5:                               ; @.str.5
	.asciz	"Uniform for %s is %d"

l_.str.6:                               ; @.str.6
	.asciz	"%s: Failed to build shader program"

	.comm	_VCOS_FUNCTION,8,3              ; @VCOS_FUNCTION
.subsections_via_symbols
