	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gl_core_fence_iterate
_gl_core_fence_iterate:                 ## @gl_core_fence_iterate
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movl	(%rdi), %eax
	movq	_GL_CORE_NUM_FENCES@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jae	LBB0_2
## %bb.1:
	movq	_GL_SCISSOR_TEST@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_glEnable
	xorl	%edi, %edi
	xorl	%esi, %esi
	movl	$1, %edx
	movl	$1, %ecx
	callq	_glScissor
	movq	_GL_TRUE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%ecx, %edi
	movl	%ecx, %esi
	movl	%ecx, %edx
	callq	_glColorMask
	movq	_GL_COLOR_BUFFER_BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_glClear
	movl	(%r15), %edi
	callq	_glDisable
	movq	_GL_SYNC_GPU_COMMANDS_COMPLETE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_glFenceSync
	movq	8(%rbx), %rcx
	movl	(%rbx), %edx
	leal	1(%rdx), %esi
	movl	%esi, (%rbx)
	movl	%eax, (%rcx,%rdx,4)
	movl	(%rbx), %eax
LBB0_2:
	cmpl	%r14d, %eax
	jbe	LBB0_5
## %bb.3:
	movq	_GL_SYNC_FLUSH_COMMANDS_BIT@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%rbx), %rax
	movl	(%rax), %edi
	movl	(%r15), %esi
	movl	$1000000000, %edx               ## imm = 0x3B9ACA00
	callq	_glClientWaitSync
	movq	8(%rbx), %rax
	movl	(%rax), %edi
	callq	_glDeleteSync
	movl	(%rbx), %eax
	leal	-1(%rax), %ecx
	movl	%ecx, (%rbx)
	movq	8(%rbx), %rdi
	leaq	4(%rdi), %rsi
	leal	-4(,%rax,4), %edx
	callq	_memmove
	cmpl	%r14d, (%rbx)
	ja	LBB0_4
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GL_CORE_NUM_FENCES,4,2         ## @GL_CORE_NUM_FENCES
	.comm	_GL_SCISSOR_TEST,4,2            ## @GL_SCISSOR_TEST
	.comm	_GL_TRUE,4,2                    ## @GL_TRUE
	.comm	_GL_COLOR_BUFFER_BIT,4,2        ## @GL_COLOR_BUFFER_BIT
	.comm	_GL_SYNC_GPU_COMMANDS_COMPLETE,4,2 ## @GL_SYNC_GPU_COMMANDS_COMPLETE
	.comm	_GL_SYNC_FLUSH_COMMANDS_BIT,4,2 ## @GL_SYNC_FLUSH_COMMANDS_BIT
	.no_dead_strip	_gl_core_fence_iterate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gl_core_fence_iterate
_gl_core_fence_iterate:                 ; @gl_core_fence_iterate
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x1
	mov	x20, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _GL_CORE_NUM_FENCES@GOTPAGE
Lloh1:
	ldr	x9, [x9, _GL_CORE_NUM_FENCES@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, w9
	b.hs	LBB0_2
; %bb.1:
Lloh3:
	adrp	x21, _GL_SCISSOR_TEST@GOTPAGE
Lloh4:
	ldr	x21, [x21, _GL_SCISSOR_TEST@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_glEnable
	mov	w0, #0
	mov	w1, #0
	mov	w2, #1
	mov	w3, #1
	bl	_glScissor
Lloh5:
	adrp	x8, _GL_TRUE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _GL_TRUE@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	mov	x1, x0
	mov	x2, x0
	mov	x3, x0
	bl	_glColorMask
Lloh8:
	adrp	x8, _GL_COLOR_BUFFER_BIT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _GL_COLOR_BUFFER_BIT@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	bl	_glClear
	ldr	w0, [x21]
	bl	_glDisable
Lloh11:
	adrp	x8, _GL_SYNC_GPU_COMMANDS_COMPLETE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _GL_SYNC_GPU_COMMANDS_COMPLETE@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_glFenceSync
	ldr	x8, [x20, #8]
	ldr	w9, [x20]
	add	w10, w9, #1
	str	w10, [x20]
	str	w0, [x8, x9, lsl #2]
	ldr	w8, [x20]
LBB0_2:
	cmp	w8, w19
	b.ls	LBB0_5
; %bb.3:
Lloh14:
	adrp	x21, _GL_SYNC_FLUSH_COMMANDS_BIT@GOTPAGE
Lloh15:
	ldr	x21, [x21, _GL_SYNC_FLUSH_COMMANDS_BIT@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #8]
	ldr	w0, [x8]
	ldr	w1, [x21]
	mov	w2, #51712
	movk	w2, #15258, lsl #16
	bl	_glClientWaitSync
	ldr	x8, [x20, #8]
	ldr	w0, [x8]
	bl	_glDeleteSync
	ldr	w8, [x20]
	sub	w8, w8, #1
	str	w8, [x20]
	ldr	x0, [x20, #8]
	add	x1, x0, #4
	lsl	w2, w8, #2
	bl	_memmove
	ldr	w8, [x20]
	cmp	w8, w19
	b.hi	LBB0_4
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_GL_CORE_NUM_FENCES,4,2         ; @GL_CORE_NUM_FENCES
	.comm	_GL_SCISSOR_TEST,4,2            ; @GL_SCISSOR_TEST
	.comm	_GL_TRUE,4,2                    ; @GL_TRUE
	.comm	_GL_COLOR_BUFFER_BIT,4,2        ; @GL_COLOR_BUFFER_BIT
	.comm	_GL_SYNC_GPU_COMMANDS_COMPLETE,4,2 ; @GL_SYNC_GPU_COMMANDS_COMPLETE
	.comm	_GL_SYNC_FLUSH_COMMANDS_BIT,4,2 ; @GL_SYNC_FLUSH_COMMANDS_BIT
	.no_dead_strip	_gl_core_fence_iterate
.subsections_via_symbols
