	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gl_load_texture_data
_gl_load_texture_data:                  ## @gl_load_texture_data
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, -48(%rbp)                 ## 4-byte Spill
	movl	%r8d, -44(%rbp)                 ## 4-byte Spill
	movl	%ecx, -52(%rbp)                 ## 4-byte Spill
	movl	%edx, %r15d
	movl	%esi, %ebx
	movl	%edi, %r12d
	movl	24(%rbp), %eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movq	16(%rbp), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	callq	_video_driver_supports_rgba
	movl	%eax, %r13d
	movl	%ebx, %edi
	callq	_gl2_wrap_type_to_enum
	movl	%eax, %r14d
	movq	_GL_CAPS_MIPMAP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_gl_check_capability
	testl	%eax, %eax
	je	LBB0_1
## %bb.3:
	cmpl	$128, %r15d
	je	LBB0_2
## %bb.4:
	cmpl	$129, %r15d
	je	LBB0_8
## %bb.5:
	cmpl	$130, %r15d
	jne	LBB0_9
## %bb.6:
	movq	_GL_LINEAR_MIPMAP_NEAREST@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_GL_LINEAR@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_1:
	andl	$-2, %r15d
	cmpl	$128, %r15d
	jne	LBB0_9
LBB0_2:
	movq	_GL_NEAREST@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_9:
	movq	_GL_LINEAR@GOTPCREL(%rip), %rax
LBB0_10:
	movl	(%rax), %ecx
	xorl	%r15d, %r15d
	movl	%ecx, %edx
	jmp	LBB0_11
LBB0_8:
	movq	_GL_NEAREST_MIPMAP_NEAREST@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_GL_NEAREST@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %edx
	movb	$1, %r15b
LBB0_11:
	movl	%r12d, %edi
	movl	%r14d, %esi
	callq	_gl_bind_texture
	movq	_GL_UNPACK_ALIGNMENT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	callq	_glPixelStorei
	testl	%r13d, %r13d
	sete	%dl
	movq	_GL_TEXTURE_2D@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movq	_GL_RGBA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_RARCH_GL_INTERNAL_FORMAT32@GOTPCREL(%rip), %r9
	cmpl	$4, -56(%rbp)                   ## 4-byte Folded Reload
	sete	%bl
	jne	LBB0_12
## %bb.13:
	movq	_RARCH_GL_FORMAT32@GOTPCREL(%rip), %rsi
	jmp	LBB0_14
LBB0_12:
	movq	_GL_UNSIGNED_SHORT_4_4_4_4@GOTPCREL(%rip), %rsi
LBB0_14:
	movl	-48(%rbp), %r8d                 ## 4-byte Reload
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movq	-64(%rbp), %r10                 ## 8-byte Reload
	testb	%dl, %bl
	movl	(%r9), %edx
	cmovel	%eax, %edx
	movq	_RARCH_GL_TEXTURE_TYPE32@GOTPCREL(%rip), %rbx
	cmovnel	(%rbx), %eax
	movl	(%rsi), %ebx
	subq	$8, %rsp
	xorl	%esi, %esi
	xorl	%r9d, %r9d
	pushq	%r10
	pushq	%rbx
	pushq	%rax
	callq	_glTexImage2D
	addq	$32, %rsp
	testb	%r15b, %r15b
	je	LBB0_15
## %bb.16:
	movl	(%r14), %edi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_glGenerateMipmap               ## TAILCALL
LBB0_15:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GL_CAPS_MIPMAP,4,2             ## @GL_CAPS_MIPMAP
	.comm	_GL_LINEAR_MIPMAP_NEAREST,4,2   ## @GL_LINEAR_MIPMAP_NEAREST
	.comm	_GL_LINEAR,4,2                  ## @GL_LINEAR
	.comm	_GL_NEAREST_MIPMAP_NEAREST,4,2  ## @GL_NEAREST_MIPMAP_NEAREST
	.comm	_GL_NEAREST,4,2                 ## @GL_NEAREST
	.comm	_GL_UNPACK_ALIGNMENT,4,2        ## @GL_UNPACK_ALIGNMENT
	.comm	_GL_TEXTURE_2D,4,2              ## @GL_TEXTURE_2D
	.comm	_GL_RGBA,4,2                    ## @GL_RGBA
	.comm	_RARCH_GL_INTERNAL_FORMAT32,4,2 ## @RARCH_GL_INTERNAL_FORMAT32
	.comm	_RARCH_GL_TEXTURE_TYPE32,4,2    ## @RARCH_GL_TEXTURE_TYPE32
	.comm	_RARCH_GL_FORMAT32,4,2          ## @RARCH_GL_FORMAT32
	.comm	_GL_UNSIGNED_SHORT_4_4_4_4,4,2  ## @GL_UNSIGNED_SHORT_4_4_4_4
	.no_dead_strip	_gl_load_texture_data
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gl_load_texture_data
_gl_load_texture_data:                  ; @gl_load_texture_data
	.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	x22, x7
	mov	x21, x6
	mov	x19, x5
	mov	x20, x4
	mov	x23, x3
	mov	x27, x2
	mov	x26, x1
	mov	x25, x0
	bl	_video_driver_supports_rgba
	mov	x24, x0
	mov	x0, x26
	bl	_gl2_wrap_type_to_enum
	mov	x26, x0
Lloh0:
	adrp	x8, _GL_CAPS_MIPMAP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GL_CAPS_MIPMAP@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_gl_check_capability
	cbz	w0, LBB0_5
; %bb.1:
	cmp	w27, #128
	b.eq	LBB0_6
; %bb.2:
	cmp	w27, #129
	b.eq	LBB0_9
; %bb.3:
	cmp	w27, #130
	b.ne	LBB0_7
; %bb.4:
Lloh3:
	adrp	x8, _GL_LINEAR_MIPMAP_NEAREST@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GL_LINEAR_MIPMAP_NEAREST@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x8]
Lloh6:
	adrp	x8, _GL_LINEAR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GL_LINEAR@GOTPAGEOFF]
	b	LBB0_10
LBB0_5:
	and	w8, w27, #0xfffffffe
	cmp	w8, #128
	b.ne	LBB0_7
LBB0_6:
	mov	w27, #0
Lloh8:
	adrp	x8, _GL_NEAREST@GOTPAGE
Lloh9:
	ldr	x8, [x8, _GL_NEAREST@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
	mov	w27, #0
Lloh10:
	adrp	x8, _GL_LINEAR@GOTPAGE
Lloh11:
	ldr	x8, [x8, _GL_LINEAR@GOTPAGEOFF]
LBB0_8:
	ldr	w3, [x8]
	mov	x2, x3
	b	LBB0_11
LBB0_9:
Lloh12:
	adrp	x8, _GL_NEAREST_MIPMAP_NEAREST@GOTPAGE
Lloh13:
	ldr	x8, [x8, _GL_NEAREST_MIPMAP_NEAREST@GOTPAGEOFF]
Lloh14:
	ldr	w3, [x8]
Lloh15:
	adrp	x8, _GL_NEAREST@GOTPAGE
Lloh16:
	ldr	x8, [x8, _GL_NEAREST@GOTPAGEOFF]
LBB0_10:
	ldr	w2, [x8]
	mov	w27, #1
LBB0_11:
	mov	x0, x25
	mov	x1, x26
	bl	_gl_bind_texture
Lloh17:
	adrp	x8, _GL_UNPACK_ALIGNMENT@GOTPAGE
Lloh18:
	ldr	x8, [x8, _GL_UNPACK_ALIGNMENT@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	mov	x1, x23
	bl	_glPixelStorei
	cmp	w24, #0
	cset	w8, eq
	cmp	w22, #4
	cset	w9, eq
Lloh20:
	adrp	x22, _GL_TEXTURE_2D@GOTPAGE
Lloh21:
	ldr	x22, [x22, _GL_TEXTURE_2D@GOTPAGEOFF]
	ldr	w0, [x22]
Lloh22:
	adrp	x10, _GL_RGBA@GOTPAGE
Lloh23:
	ldr	x10, [x10, _GL_RGBA@GOTPAGEOFF]
Lloh24:
	ldr	w10, [x10]
Lloh25:
	adrp	x11, _RARCH_GL_INTERNAL_FORMAT32@GOTPAGE
Lloh26:
	ldr	x11, [x11, _RARCH_GL_INTERNAL_FORMAT32@GOTPAGEOFF]
Lloh27:
	ldr	w11, [x11]
Lloh28:
	adrp	x12, _RARCH_GL_FORMAT32@GOTPAGE
Lloh29:
	ldr	x12, [x12, _RARCH_GL_FORMAT32@GOTPAGEOFF]
Lloh30:
	adrp	x13, _GL_UNSIGNED_SHORT_4_4_4_4@GOTPAGE
Lloh31:
	ldr	x13, [x13, _GL_UNSIGNED_SHORT_4_4_4_4@GOTPAGEOFF]
	csel	x12, x12, x13, eq
	tst	w9, w8
	csel	w2, w11, w10, ne
Lloh32:
	adrp	x8, _RARCH_GL_TEXTURE_TYPE32@GOTPAGE
Lloh33:
	ldr	x8, [x8, _RARCH_GL_TEXTURE_TYPE32@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	csel	w6, w8, w10, ne
	ldr	w7, [x12]
	str	x21, [sp]
	mov	w1, #0
	mov	x3, x20
	mov	x4, x19
	mov	w5, #0
	bl	_glTexImage2D
	cbz	w27, LBB0_13
; %bb.12:
	ldr	w0, [x22]
	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
	b	_glGenerateMipmap
LBB0_13:
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_GL_CAPS_MIPMAP,4,2             ; @GL_CAPS_MIPMAP
	.comm	_GL_LINEAR_MIPMAP_NEAREST,4,2   ; @GL_LINEAR_MIPMAP_NEAREST
	.comm	_GL_LINEAR,4,2                  ; @GL_LINEAR
	.comm	_GL_NEAREST_MIPMAP_NEAREST,4,2  ; @GL_NEAREST_MIPMAP_NEAREST
	.comm	_GL_NEAREST,4,2                 ; @GL_NEAREST
	.comm	_GL_UNPACK_ALIGNMENT,4,2        ; @GL_UNPACK_ALIGNMENT
	.comm	_GL_TEXTURE_2D,4,2              ; @GL_TEXTURE_2D
	.comm	_GL_RGBA,4,2                    ; @GL_RGBA
	.comm	_RARCH_GL_INTERNAL_FORMAT32,4,2 ; @RARCH_GL_INTERNAL_FORMAT32
	.comm	_RARCH_GL_TEXTURE_TYPE32,4,2    ; @RARCH_GL_TEXTURE_TYPE32
	.comm	_RARCH_GL_FORMAT32,4,2          ; @RARCH_GL_FORMAT32
	.comm	_GL_UNSIGNED_SHORT_4_4_4_4,4,2  ; @GL_UNSIGNED_SHORT_4_4_4_4
	.no_dead_strip	_gl_load_texture_data
.subsections_via_symbols
