	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function shader_arb_destroy
_shader_arb_destroy:                    ## @shader_arb_destroy
	.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	%rdi, %r14
	movq	16(%rdi), %r15
	movl	8(%rdi), %edi
	callq	_shader_is_pshader_version
	movq	(%r14), %r13
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	testq	%r13, %r13
	je	LBB0_14
## %bb.2:
	cmpq	$0, (%r13)
	je	LBB0_13
## %bb.3:
	movq	%r15, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_context_acquire
	cmpq	$0, (%r13)
	je	LBB0_12
## %bb.4:
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	$16, %ebx
	xorl	%r15d, %r15d
	leaq	L_.str(%rip), %r12
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r13), %rsi
	addq	%rbx, %rsi
	movl	$1, %edi
	callq	_glDeleteProgramsARB
	movl	%eax, %edi
	callq	_GL_EXTCALL
	movq	%r12, %rdi
	callq	_checkGLcall
	incq	%r15
	addq	$24, %rbx
	cmpq	(%r13), %r15
	jb	LBB0_5
	jmp	LBB0_11
LBB0_6:
	testq	%r13, %r13
	je	LBB0_14
## %bb.7:
	cmpq	$0, (%r13)
	je	LBB0_13
## %bb.8:
	movq	%r15, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_context_acquire
	cmpq	$0, (%r13)
	je	LBB0_12
## %bb.9:
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	$16, %r15d
	xorl	%ebx, %ebx
	leaq	L_.str(%rip), %r12
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r13), %rsi
	addq	%r15, %rsi
	movl	$1, %edi
	callq	_glDeleteProgramsARB
	movl	%eax, %edi
	callq	_GL_EXTCALL
	movq	%r12, %rdi
	callq	_checkGLcall
	incq	%rbx
	addq	$24, %r15
	cmpq	(%r13), %rbx
	jb	LBB0_10
LBB0_11:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
LBB0_12:
	movq	%rax, %rdi
	callq	_context_release
LBB0_13:
	movq	8(%r13), %rdi
	callq	_heap_free
	movq	%r13, %rdi
	callq	_heap_free
	movq	$0, (%r14)
LBB0_14:
	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	"GL_EXTCALL(glDeleteProgramsARB(1, &shader_data->gl_shaders[i].prgId))"

	.no_dead_strip	_shader_arb_destroy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function shader_arb_destroy
_shader_arb_destroy:                    ; @shader_arb_destroy
	.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	x19, x0
	ldr	x21, [x0, #16]
	ldr	w0, [x0, #8]
	bl	_shader_is_pshader_version
	ldr	x20, [x19]
	cbz	x0, LBB0_6
; %bb.1:
	cbz	x20, LBB0_13
; %bb.2:
	ldr	x8, [x20]
	cbz	x8, LBB0_12
; %bb.3:
	mov	x0, x21
	mov	x1, #0
	mov	w2, #0
	bl	_context_acquire
	mov	x21, x0
	ldr	x8, [x20]
	cbz	x8, LBB0_11
; %bb.4:
	mov	x23, #0
	mov	w24, #16
Lloh0:
	adrp	x22, l_.str@PAGE
Lloh1:
	add	x22, x22, l_.str@PAGEOFF
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #8]
	add	x1, x8, x24
	mov	w0, #1
	bl	_glDeleteProgramsARB
	bl	_GL_EXTCALL
	mov	x0, x22
	bl	_checkGLcall
	add	x23, x23, #1
	ldr	x8, [x20]
	add	x24, x24, #24
	cmp	x23, x8
	b.lo	LBB0_5
	b	LBB0_11
LBB0_6:
	cbz	x20, LBB0_13
; %bb.7:
	ldr	x8, [x20]
	cbz	x8, LBB0_12
; %bb.8:
	mov	x0, x21
	mov	x1, #0
	mov	w2, #0
	bl	_context_acquire
	mov	x21, x0
	ldr	x8, [x20]
	cbz	x8, LBB0_11
; %bb.9:
	mov	x23, #0
	mov	w24, #16
Lloh2:
	adrp	x22, l_.str@PAGE
Lloh3:
	add	x22, x22, l_.str@PAGEOFF
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #8]
	add	x1, x8, x24
	mov	w0, #1
	bl	_glDeleteProgramsARB
	bl	_GL_EXTCALL
	mov	x0, x22
	bl	_checkGLcall
	add	x23, x23, #1
	ldr	x8, [x20]
	add	x24, x24, #24
	cmp	x23, x8
	b.lo	LBB0_10
LBB0_11:
	mov	x0, x21
	bl	_context_release
LBB0_12:
	ldr	x0, [x20, #8]
	bl	_heap_free
	mov	x0, x20
	bl	_heap_free
	str	xzr, [x19]
LBB0_13:
	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
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"GL_EXTCALL(glDeleteProgramsARB(1, &shader_data->gl_shaders[i].prgId))"

	.no_dead_strip	_shader_arb_destroy
.subsections_via_symbols
