	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_draw_wavefront                 ## -- Begin function draw_wavefront
	.p2align	4, 0x90
_draw_wavefront:                        ## @draw_wavefront
	.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
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movl	(%rdi), %eax
	testl	%eax, %eax
	jle	LBB0_15
## %bb.1:
	movq	%rdi, %r15
	movl	$8, %ebx
	xorl	%r12d, %r12d
	movq	_VBO_TEXTURE@GOTPCREL(%rip), %r14
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	callq	_glDisableClientState
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_GL_TRIANGLES@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	-4(%r13,%rbx), %edx
	xorl	%esi, %esi
	callq	_glDrawArrays
	movl	(%r15), %eax
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=1
	incq	%r12
	movslq	%eax, %rcx
	addq	$16, %rbx
	cmpq	%rcx, %r12
	jge	LBB0_15
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %r13
	movl	-8(%r13,%rbx), %esi
	cmpl	$-1, %esi
	je	LBB0_14
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_GL_TEXTURE_2D@GOTPCREL(%rip), %rax
	testl	%esi, %esi
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_GL_TEXTURE_EXTERNAL_OES@GOTPCREL(%rip), %rax
	movl	-44(%rbp), %esi                 ## 4-byte Reload
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	(%rax), %edi
	callq	_glBindTexture
	movq	(%r13,%rbx), %rax
	movq	_VBO_VERTEX@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %rsi
	testq	%rsi, %rsi
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_GL_ARRAY_BUFFER@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_glBindBuffer
	movq	_GL_FLOAT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$3, %edi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_glVertexPointer
	movq	(%r13,%rbx), %rax
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_VBO_NORMAL@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	$0, (%rax,%rcx,8)
	movq	_GL_NORMAL_ARRAY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	callq	_glEnableClientState
	movq	_GL_ARRAY_BUFFER@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%r13,%rbx), %rax
	movq	_VBO_NORMAL@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %rsi
	callq	_glBindBuffer
	movq	_GL_FLOAT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_glNormalPointer
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	callq	_glDisableClientState
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r13,%rbx), %rax
	movq	(%r14), %rcx
	cmpq	$0, (%rax,%rcx,8)
	movq	_GL_TEXTURE_COORD_ARRAY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	callq	_glEnableClientState
	movq	_GL_ARRAY_BUFFER@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%r13,%rbx), %rax
	movq	(%r14), %rcx
	movq	(%rax,%rcx,8), %rsi
	callq	_glBindBuffer
	movq	_GL_FLOAT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$2, %edi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_glTexCoordPointer
	jmp	LBB0_13
LBB0_15:
	movq	_GL_ARRAY_BUFFER@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_glBindBuffer
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GL_TEXTURE_2D,4,2              ## @GL_TEXTURE_2D
	.comm	_GL_TEXTURE_EXTERNAL_OES,4,2    ## @GL_TEXTURE_EXTERNAL_OES
	.comm	_VBO_VERTEX,8,3                 ## @VBO_VERTEX
	.comm	_GL_ARRAY_BUFFER,4,2            ## @GL_ARRAY_BUFFER
	.comm	_GL_FLOAT,4,2                   ## @GL_FLOAT
	.comm	_VBO_NORMAL,8,3                 ## @VBO_NORMAL
	.comm	_GL_NORMAL_ARRAY,4,2            ## @GL_NORMAL_ARRAY
	.comm	_VBO_TEXTURE,8,3                ## @VBO_TEXTURE
	.comm	_GL_TEXTURE_COORD_ARRAY,4,2     ## @GL_TEXTURE_COORD_ARRAY
	.comm	_GL_TRIANGLES,4,2               ## @GL_TRIANGLES
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_draw_wavefront                 ; -- Begin function draw_wavefront
	.p2align	2
_draw_wavefront:                        ; @draw_wavefront
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	ldr	w8, [x0]
Lloh0:
	adrp	x21, _GL_ARRAY_BUFFER@GOTPAGE
Lloh1:
	ldr	x21, [x21, _GL_ARRAY_BUFFER@GOTPAGEOFF]
	cmp	w8, #1
	b.lt	LBB0_13
; %bb.1:
	mov	x19, x1
	mov	x20, x0
	mov	x22, #0
	mov	x23, #0
Lloh2:
	adrp	x27, _VBO_NORMAL@GOTPAGE
Lloh3:
	ldr	x27, [x27, _VBO_NORMAL@GOTPAGEOFF]
Lloh4:
	adrp	x24, _VBO_TEXTURE@GOTPAGE
Lloh5:
	ldr	x24, [x24, _VBO_TEXTURE@GOTPAGEOFF]
Lloh6:
	adrp	x28, _GL_FLOAT@GOTPAGE
Lloh7:
	ldr	x28, [x28, _GL_FLOAT@GOTPAGEOFF]
	b	LBB0_5
LBB0_2:                                 ;   in Loop: Header=BB0_5 Depth=1
	bl	_glDisableClientState
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
Lloh8:
	adrp	x8, _GL_TRIANGLES@GOTPAGE
Lloh9:
	ldr	x8, [x8, _GL_TRIANGLES@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	add	x8, x25, x22
	ldr	w2, [x8, #4]
	mov	w1, #0
	bl	_glDrawArrays
	ldr	w8, [x20]
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x23, x23, #1
	add	x22, x22, #16
	cmp	x23, w8, sxtw
	b.ge	LBB0_13
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x25, [x20, #8]
	ldr	w9, [x25, x22]
	cmn	w9, #1
	b.eq	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	cmp	w9, #0
	csel	w1, w9, w19, ne
Lloh11:
	adrp	x8, _GL_TEXTURE_2D@GOTPAGE
Lloh12:
	ldr	x8, [x8, _GL_TEXTURE_2D@GOTPAGEOFF]
Lloh13:
	adrp	x9, _GL_TEXTURE_EXTERNAL_OES@GOTPAGE
Lloh14:
	ldr	x9, [x9, _GL_TEXTURE_EXTERNAL_OES@GOTPAGEOFF]
	csel	x8, x8, x9, ne
	ldr	w0, [x8]
	bl	_glBindTexture
	add	x26, x25, x22
	ldr	x8, [x26, #8]
Lloh15:
	adrp	x9, _VBO_VERTEX@GOTPAGE
Lloh16:
	ldr	x9, [x9, _VBO_VERTEX@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	ldr	x1, [x8, x9, lsl #3]
	cbz	x1, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [x21]
	bl	_glBindBuffer
	ldr	w1, [x28]
	mov	w0, #3
	mov	w2, #0
	mov	x3, #0
	bl	_glVertexPointer
	ldr	x8, [x26, #8]
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x9, [x27]
	ldr	x8, [x8, x9, lsl #3]
Lloh18:
	adrp	x9, _GL_NORMAL_ARRAY@GOTPAGE
Lloh19:
	ldr	x9, [x9, _GL_NORMAL_ARRAY@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x9]
	cbz	x8, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	bl	_glEnableClientState
	ldr	w0, [x21]
	ldr	x8, [x26, #8]
	ldr	x9, [x27]
	ldr	x1, [x8, x9, lsl #3]
	bl	_glBindBuffer
	ldr	w0, [x28]
	mov	w1, #0
	mov	x2, #0
	bl	_glNormalPointer
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_5 Depth=1
	bl	_glDisableClientState
LBB0_11:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x26, #8]
	ldr	x9, [x24]
	ldr	x8, [x8, x9, lsl #3]
Lloh21:
	adrp	x9, _GL_TEXTURE_COORD_ARRAY@GOTPAGE
Lloh22:
	ldr	x9, [x9, _GL_TEXTURE_COORD_ARRAY@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x9]
	cbz	x8, LBB0_2
; %bb.12:                               ;   in Loop: Header=BB0_5 Depth=1
	bl	_glEnableClientState
	ldr	w0, [x21]
	ldr	x8, [x26, #8]
	ldr	x9, [x24]
	ldr	x1, [x8, x9, lsl #3]
	bl	_glBindBuffer
	ldr	w1, [x28]
	mov	w0, #2
	mov	w2, #0
	mov	x3, #0
	bl	_glTexCoordPointer
	b	LBB0_3
LBB0_13:
	ldr	w0, [x21]
	mov	x1, #0
	bl	_glBindBuffer
	mov	w0, #0
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_GL_TEXTURE_2D,4,2              ; @GL_TEXTURE_2D
	.comm	_GL_TEXTURE_EXTERNAL_OES,4,2    ; @GL_TEXTURE_EXTERNAL_OES
	.comm	_VBO_VERTEX,8,3                 ; @VBO_VERTEX
	.comm	_GL_ARRAY_BUFFER,4,2            ; @GL_ARRAY_BUFFER
	.comm	_GL_FLOAT,4,2                   ; @GL_FLOAT
	.comm	_VBO_NORMAL,8,3                 ; @VBO_NORMAL
	.comm	_GL_NORMAL_ARRAY,4,2            ; @GL_NORMAL_ARRAY
	.comm	_VBO_TEXTURE,8,3                ; @VBO_TEXTURE
	.comm	_GL_TEXTURE_COORD_ARRAY,4,2     ; @GL_TEXTURE_COORD_ARRAY
	.comm	_GL_TRIANGLES,4,2               ; @GL_TRIANGLES
.subsections_via_symbols
