	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gl2_load_texture_image
_gl2_load_texture_image:                ## @gl2_load_texture_image
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -72(%rbp)                  ## 8-byte Spill
	movl	%r8d, -44(%rbp)                 ## 4-byte Spill
	movl	%ecx, %r12d
	movq	%rdx, %r15
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movl	%edi, %ebx
	movq	%rdx, -56(%rbp)
	movq	_GL_CAPS_TEX_STORAGE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_gl_check_capability
	movq	%rax, %r13
	movq	_GL_BGRA_EXT@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	leaq	-56(%rbp), %rdi
	callq	_gl2_size_format
	movq	-56(%rbp), %rdx
	testq	%r13, %r13
	je	LBB0_3
## %bb.1:
	cmpq	%r15, %r14
	je	LBB0_3
## %bb.2:
	movl	%ebx, %edi
	movl	$1, %esi
	movl	%r12d, %ecx
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	callq	_glTexStorage2D
	jmp	LBB0_4
LBB0_3:
	movl	24(%rbp), %eax
	movl	16(%rbp), %r10d
	subq	$8, %rsp
	movl	%ebx, %edi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movl	%r12d, %ecx
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	movq	-72(%rbp), %r9                  ## 8-byte Reload
	pushq	32(%rbp)
	pushq	%rax
	pushq	%r10
	callq	_glTexImage2D
	addq	$32, %rsp
LBB0_4:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GL_CAPS_TEX_STORAGE,4,2        ## @GL_CAPS_TEX_STORAGE
	.comm	_GL_BGRA_EXT,8,3                ## @GL_BGRA_EXT
	.comm	_GL_CAPS_GLES3_SUPPORTED,4,2    ## @GL_CAPS_GLES3_SUPPORTED
	.comm	_GL_CAPS_TEX_STORAGE_EXT,4,2    ## @GL_CAPS_TEX_STORAGE_EXT
	.no_dead_strip	_gl2_load_texture_image
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gl2_load_texture_image
_gl2_load_texture_image:                ; @gl2_load_texture_image
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x20, x7
	mov	x22, x6
	mov	x23, x5
	mov	x19, x4
	mov	x21, x3
	mov	x26, x2
	mov	x25, x1
	mov	x24, x0
	str	x2, [sp, #8]
Lloh0:
	adrp	x8, _GL_CAPS_TEX_STORAGE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GL_CAPS_TEX_STORAGE@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_gl_check_capability
	mov	x27, x0
Lloh3:
	adrp	x8, _GL_BGRA_EXT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GL_BGRA_EXT@GOTPAGEOFF]
Lloh5:
	ldr	x28, [x8]
	add	x0, sp, #8
	bl	_gl2_size_format
	ldr	x2, [sp, #8]
	cmp	x27, #0
	ccmp	x28, x26, #4, ne
	b.ne	LBB0_2
; %bb.1:
	ldr	x8, [x29, #16]
	str	x8, [sp]
	mov	x0, x24
	mov	x1, x25
	mov	x3, x21
	mov	x4, x19
	mov	x5, x23
	mov	x6, x22
	mov	x7, x20
	bl	_glTexImage2D
	b	LBB0_3
LBB0_2:
	mov	x0, x24
	mov	w1, #1
	mov	x3, x21
	mov	x4, x19
	bl	_glTexStorage2D
LBB0_3:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_GL_CAPS_TEX_STORAGE,4,2        ; @GL_CAPS_TEX_STORAGE
	.comm	_GL_BGRA_EXT,8,3                ; @GL_BGRA_EXT
	.comm	_GL_CAPS_GLES3_SUPPORTED,4,2    ; @GL_CAPS_GLES3_SUPPORTED
	.comm	_GL_CAPS_TEX_STORAGE_EXT,4,2    ; @GL_CAPS_TEX_STORAGE_EXT
	.no_dead_strip	_gl2_load_texture_image
.subsections_via_symbols
