	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function make_shader_program
_make_shader_program:                   ## @make_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
	pushq	%rax
	movl	$8216, %eax                     ## imm = 0x2018
	callq	____chkstk_darwin
	subq	%rax, %rsp
	popq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %rsi
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_GL_VERTEX_SHADER@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_make_shader
	testl	%eax, %eax
	je	LBB0_8
## %bb.1:
	movl	%eax, %r15d
	movq	_GL_FRAGMENT_SHADER@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_make_shader
	testl	%eax, %eax
	je	LBB0_6
## %bb.2:
	movl	%eax, %r14d
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_glCreateProgram
	testl	%eax, %eax
	je	LBB0_9
## %bb.3:
	movl	%eax, %ebx
	movl	%eax, %edi
	movl	%r15d, %esi
	callq	_glAttachShader
	movl	%ebx, %edi
	movl	%r14d, %esi
	callq	_glAttachShader
	movl	%ebx, %edi
	callq	_glLinkProgram
	movq	_GL_LINK_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-8248(%rbp), %rdx
	movl	%ebx, %edi
	callq	_glGetProgramiv
	movq	-8248(%rbp), %rax
	movq	_GL_TRUE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.4:
	movl	%ebx, %r12d
	jmp	LBB0_9
LBB0_8:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_fprintf
	jmp	LBB0_9
LBB0_6:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_fprintf
	jmp	LBB0_7
LBB0_5:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_fprintf
	leaq	-8252(%rbp), %rdx
	leaq	-8240(%rbp), %r13
	movl	%ebx, %edi
	movl	$8192, %esi                     ## imm = 0x2000
	movq	%r13, %rcx
	callq	_glGetProgramInfoLog
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movq	%r13, %rdx
	xorl	%eax, %eax
	callq	_fprintf
	movl	%ebx, %edi
	callq	_glDeleteProgram
	movl	%r14d, %edi
	callq	_glDeleteShader
LBB0_7:
	movl	%r15d, %edi
	callq	_glDeleteShader
LBB0_9:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_11
## %bb.10:
	movl	%r12d, %eax
	addq	$8216, %rsp                     ## imm = 0x2018
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_GL_VERTEX_SHADER,4,2           ## @GL_VERTEX_SHADER
	.comm	_GL_FRAGMENT_SHADER,4,2         ## @GL_FRAGMENT_SHADER
	.comm	_GL_LINK_STATUS,4,2             ## @GL_LINK_STATUS
	.comm	_GL_TRUE,8,3                    ## @GL_TRUE
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ERROR, failed to link shader program\n"

L_.str.1:                               ## @.str.1
	.asciz	"ERROR: \n%s\n\n"

L_.str.2:                               ## @.str.2
	.asciz	"ERROR: Unable to load fragment shader\n"

L_.str.3:                               ## @.str.3
	.asciz	"ERROR: Unable to load vertex shader\n"

	.no_dead_strip	_make_shader_program
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function make_shader_program
_make_shader_program:                   ; @make_shader_program
	.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	w9, #8224
Lloh0:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh1:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	sub	sp, sp, #2, lsl #12             ; =8192
	sub	sp, sp, #32
	mov	x20, x1
	mov	x1, x0
Lloh2:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh3:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
Lloh5:
	adrp	x8, _GL_VERTEX_SHADER@GOTPAGE
Lloh6:
	ldr	x8, [x8, _GL_VERTEX_SHADER@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	bl	_make_shader
	cbz	w0, LBB0_5
; %bb.1:
	mov	x19, x0
Lloh8:
	adrp	x8, _GL_FRAGMENT_SHADER@GOTPAGE
Lloh9:
	ldr	x8, [x8, _GL_FRAGMENT_SHADER@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_make_shader
	cbz	w0, LBB0_6
; %bb.2:
	mov	x21, x0
	bl	_glCreateProgram
	mov	x20, x0
	cbz	w0, LBB0_9
; %bb.3:
	mov	x0, x20
	mov	x1, x19
	bl	_glAttachShader
	mov	x0, x20
	mov	x1, x21
	bl	_glAttachShader
	mov	x0, x20
	bl	_glLinkProgram
Lloh11:
	adrp	x8, _GL_LINK_STATUS@GOTPAGE
Lloh12:
	ldr	x8, [x8, _GL_LINK_STATUS@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	add	x2, sp, #16
	mov	x0, x20
	bl	_glGetProgramiv
	ldr	x8, [sp, #16]
Lloh14:
	adrp	x9, _GL_TRUE@GOTPAGE
Lloh15:
	ldr	x9, [x9, _GL_TRUE@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_9
; %bb.4:
Lloh17:
	adrp	x22, _stderr@GOTPAGE
Lloh18:
	ldr	x22, [x22, _stderr@GOTPAGEOFF]
	ldr	w0, [x22]
Lloh19:
	adrp	x1, l_.str@PAGE
Lloh20:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fprintf
	add	x23, sp, #24
	add	x2, sp, #12
	add	x3, sp, #24
	mov	x0, x20
	mov	w1, #8192
	bl	_glGetProgramInfoLog
	ldr	w0, [x22]
	str	x23, [sp]
Lloh21:
	adrp	x1, l_.str.1@PAGE
Lloh22:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_fprintf
	mov	x0, x20
	bl	_glDeleteProgram
	mov	x0, x21
	bl	_glDeleteShader
	b	LBB0_7
LBB0_5:
Lloh23:
	adrp	x8, _stderr@GOTPAGE
Lloh24:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
Lloh26:
	adrp	x1, l_.str.3@PAGE
Lloh27:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_fprintf
	b	LBB0_8
LBB0_6:
Lloh28:
	adrp	x8, _stderr@GOTPAGE
Lloh29:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh30:
	ldr	w0, [x8]
Lloh31:
	adrp	x1, l_.str.2@PAGE
Lloh32:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_fprintf
LBB0_7:
	mov	x0, x19
	bl	_glDeleteShader
LBB0_8:
	mov	w20, #0
LBB0_9:
	ldur	x8, [x29, #-56]
Lloh33:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh34:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh35:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_11
; %bb.10:
	mov	x0, x20
	add	sp, sp, #2, lsl #12             ; =8192
	add	sp, sp, #32
	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
LBB0_11:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_GL_VERTEX_SHADER,4,2           ; @GL_VERTEX_SHADER
	.comm	_GL_FRAGMENT_SHADER,4,2         ; @GL_FRAGMENT_SHADER
	.comm	_GL_LINK_STATUS,4,2             ; @GL_LINK_STATUS
	.comm	_GL_TRUE,8,3                    ; @GL_TRUE
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ERROR, failed to link shader program\n"

l_.str.1:                               ; @.str.1
	.asciz	"ERROR: \n%s\n\n"

l_.str.2:                               ; @.str.2
	.asciz	"ERROR: Unable to load fragment shader\n"

l_.str.3:                               ; @.str.3
	.asciz	"ERROR: Unable to load vertex shader\n"

	.no_dead_strip	_make_shader_program
.subsections_via_symbols
