	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function draw_indirect
_draw_indirect:                         ## @draw_indirect
	.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	%ecx, %r12d
	movq	(%rdi), %rax
	movq	(%rax), %rax
	movq	_ARB_DRAW_INDIRECT@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpl	$0, (%rax,%rcx,4)
	je	LBB0_10
## %bb.1:
	movq	%rdx, %rbx
	movq	%rsi, %r15
	movq	8(%rdx), %rax
	movq	_GL_DRAW_INDIRECT_BUFFER@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	movl	(%rax), %esi
	callq	_glBindBuffer
	movl	%eax, %edi
	callq	_GL_EXTCALL
	movq	(%rbx), %r14
	testl	%r12d, %r12d
	je	LBB0_8
## %bb.2:
	cmpl	$2, %r12d
	jne	LBB0_3
## %bb.4:
	movq	_GL_UNSIGNED_SHORT@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_10:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_FIXME                          ## TAILCALL
LBB0_8:
	movl	(%r15), %edi
	movq	%r14, %rsi
	callq	_glDrawArraysIndirect
	jmp	LBB0_9
LBB0_3:
	movq	_GL_UNSIGNED_INT@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %ebx
	movq	8(%r15), %rsi
	testq	%rsi, %rsi
	je	LBB0_7
## %bb.6:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_FIXME
LBB0_7:
	movl	(%r15), %edi
	movl	%ebx, %esi
	movq	%r14, %rdx
	callq	_glDrawElementsIndirect
LBB0_9:
	movl	%eax, %edi
	callq	_GL_EXTCALL
	movl	(%r13), %edi
	xorl	%esi, %esi
	callq	_glBindBuffer
	movl	%eax, %edi
	callq	_GL_EXTCALL
	leaq	L_.str.2(%rip), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_checkGLcall                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ARB_DRAW_INDIRECT,8,3          ## @ARB_DRAW_INDIRECT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"OpenGL implementation does not support indirect draws.\n"

	.comm	_GL_DRAW_INDIRECT_BUFFER,4,2    ## @GL_DRAW_INDIRECT_BUFFER
	.comm	_GL_UNSIGNED_SHORT,4,2          ## @GL_UNSIGNED_SHORT
	.comm	_GL_UNSIGNED_INT,4,2            ## @GL_UNSIGNED_INT
L_.str.1:                               ## @.str.1
	.asciz	"Ignoring index offset %u.\n"

L_.str.2:                               ## @.str.2
	.asciz	"draw indirect"

	.no_dead_strip	_draw_indirect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function draw_indirect
_draw_indirect:                         ; @draw_indirect
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	ldr	x8, [x0]
	ldr	x8, [x8]
Lloh0:
	adrp	x9, _ARB_DRAW_INDIRECT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ARB_DRAW_INDIRECT@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	ldr	w8, [x8, x9, lsl #2]
	cbz	w8, LBB0_5
; %bb.1:
	mov	x20, x3
	mov	x21, x2
	mov	x19, x1
	ldr	x8, [x2, #8]
Lloh3:
	adrp	x22, _GL_DRAW_INDIRECT_BUFFER@GOTPAGE
Lloh4:
	ldr	x22, [x22, _GL_DRAW_INDIRECT_BUFFER@GOTPAGEOFF]
	ldr	w0, [x22]
	ldr	w1, [x8]
	bl	_glBindBuffer
	bl	_GL_EXTCALL
	ldr	x21, [x21]
	cbz	w20, LBB0_6
; %bb.2:
Lloh5:
	adrp	x8, _GL_UNSIGNED_SHORT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _GL_UNSIGNED_SHORT@GOTPAGEOFF]
Lloh7:
	adrp	x9, _GL_UNSIGNED_INT@GOTPAGE
Lloh8:
	ldr	x9, [x9, _GL_UNSIGNED_INT@GOTPAGEOFF]
	cmp	w20, #2
	csel	x8, x8, x9, eq
	ldr	w20, [x8]
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_4
; %bb.3:
	str	x8, [sp]
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_FIXME
LBB0_4:
	ldr	w0, [x19]
	mov	x1, x20
	mov	x2, x21
	bl	_glDrawElementsIndirect
	b	LBB0_7
LBB0_5:
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	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
	add	sp, sp, #64
	b	_FIXME
LBB0_6:
	ldr	w0, [x19]
	mov	x1, x21
	bl	_glDrawArraysIndirect
LBB0_7:
	bl	_GL_EXTCALL
	ldr	w0, [x22]
	mov	w1, #0
	bl	_glBindBuffer
	bl	_GL_EXTCALL
Lloh13:
	adrp	x0, l_.str.2@PAGE
Lloh14:
	add	x0, x0, l_.str.2@PAGEOFF
	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
	add	sp, sp, #64
	b	_checkGLcall
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_ARB_DRAW_INDIRECT,8,3          ; @ARB_DRAW_INDIRECT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"OpenGL implementation does not support indirect draws.\n"

	.comm	_GL_DRAW_INDIRECT_BUFFER,4,2    ; @GL_DRAW_INDIRECT_BUFFER
	.comm	_GL_UNSIGNED_SHORT,4,2          ; @GL_UNSIGNED_SHORT
	.comm	_GL_UNSIGNED_INT,4,2            ; @GL_UNSIGNED_INT
l_.str.1:                               ; @.str.1
	.asciz	"Ignoring index offset %u.\n"

l_.str.2:                               ; @.str.2
	.asciz	"draw indirect"

	.no_dead_strip	_draw_indirect
.subsections_via_symbols
