	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gl2_add_lut
_gl2_add_lut:                           ## @gl2_add_lut
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -88(%rbp)                  ## 8-byte Spill
	movl	%r8d, -44(%rbp)                 ## 4-byte Spill
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movl	%edx, %r14d
	movl	%esi, %r13d
	movq	%rdi, %r15
	movq	_TEXTURE_FILTER_LINEAR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -80(%rbp)
	movq	$0, -64(%rbp)
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_video_driver_supports_rgba
	movl	%eax, -56(%rbp)
	leaq	-80(%rbp), %rdi
	movq	%r15, %rsi
	callq	_image_texture_load
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	leaq	L_.str.1(%rip), %rdi
	movq	%r15, %rsi
	callq	_RARCH_LOG
	movq	_RARCH_FILTER_NEAREST@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	movq	_TEXTURE_FILTER_NEAREST@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmovel	%eax, %ebx
	testl	%r13d, %r13d
	je	LBB0_7
## %bb.3:
	cmpl	%eax, %ebx
	jne	LBB0_5
## %bb.4:
	movq	_TEXTURE_FILTER_MIPMAP_NEAREST@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_1:
	leaq	L_.str(%rip), %rdi
	movq	%r15, %rsi
	callq	_RARCH_ERR
	jmp	LBB0_8
LBB0_5:
	movq	_TEXTURE_FILTER_MIPMAP_LINEAR@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %ebx
LBB0_7:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx,%rax,4), %edi
	movq	-64(%rbp), %r8
	movq	-72(%rbp), %r9
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	movl	%ebx, %edx
	movl	$4, %ecx
	pushq	$4
	pushq	-80(%rbp)
	callq	_gl_load_texture_data
	addq	$16, %rsp
	leaq	-80(%rbp), %rdi
	callq	_image_texture_free
	movl	$1, %r12d
LBB0_8:
	movl	%r12d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TEXTURE_FILTER_LINEAR,4,2      ## @TEXTURE_FILTER_LINEAR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[GL]: Failed to load texture image from: \"%s\"\n"

L_.str.1:                               ## @.str.1
	.asciz	"[GL]: Loaded texture image from: \"%s\" ...\n"

	.comm	_RARCH_FILTER_NEAREST,4,2       ## @RARCH_FILTER_NEAREST
	.comm	_TEXTURE_FILTER_NEAREST,4,2     ## @TEXTURE_FILTER_NEAREST
	.comm	_TEXTURE_FILTER_MIPMAP_NEAREST,4,2 ## @TEXTURE_FILTER_MIPMAP_NEAREST
	.comm	_TEXTURE_FILTER_MIPMAP_LINEAR,4,2 ## @TEXTURE_FILTER_MIPMAP_LINEAR
	.no_dead_strip	_gl2_add_lut
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gl2_add_lut
_gl2_add_lut:                           ; @gl2_add_lut
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	mov	x20, x5
	mov	x21, x4
	mov	x19, x3
	mov	x23, x2
	mov	x22, x1
	mov	x24, x0
Lloh0:
	adrp	x8, _TEXTURE_FILTER_LINEAR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TEXTURE_FILTER_LINEAR@GOTPAGEOFF]
Lloh2:
	ldr	w25, [x8]
	stp	xzr, xzr, [sp, #8]
	str	xzr, [sp]
	bl	_video_driver_supports_rgba
	str	w0, [sp, #24]
	mov	x0, sp
	mov	x1, x24
	bl	_image_texture_load
	cbz	w0, LBB0_4
; %bb.1:
Lloh3:
	adrp	x0, l_.str.1@PAGE
Lloh4:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x24
	bl	_RARCH_LOG
Lloh5:
	adrp	x8, _RARCH_FILTER_NEAREST@GOTPAGE
Lloh6:
	ldr	x8, [x8, _RARCH_FILTER_NEAREST@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x8]
Lloh8:
	adrp	x8, _TEXTURE_FILTER_NEAREST@GOTPAGE
Lloh9:
	ldr	x8, [x8, _TEXTURE_FILTER_NEAREST@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	cmp	w9, w23
	csel	w2, w8, w25, eq
	cbz	w22, LBB0_7
; %bb.2:
	cmp	w2, w8
	b.ne	LBB0_5
; %bb.3:
Lloh11:
	adrp	x8, _TEXTURE_FILTER_MIPMAP_NEAREST@GOTPAGE
Lloh12:
	ldr	x8, [x8, _TEXTURE_FILTER_MIPMAP_NEAREST@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:
Lloh13:
	adrp	x0, l_.str@PAGE
Lloh14:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x24
	bl	_RARCH_ERR
	mov	w0, #0
	b	LBB0_8
LBB0_5:
Lloh15:
	adrp	x8, _TEXTURE_FILTER_MIPMAP_LINEAR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _TEXTURE_FILTER_MIPMAP_LINEAR@GOTPAGEOFF]
LBB0_6:
	ldr	w2, [x8]
LBB0_7:
	ldr	w0, [x20, w21, uxtw #2]
	ldp	x5, x4, [sp, #8]
	ldr	x6, [sp]
	mov	x1, x19
	mov	w3, #4
	mov	w7, #4
	bl	_gl_load_texture_data
	mov	x0, sp
	bl	_image_texture_free
	mov	w0, #1
LBB0_8:
	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
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_TEXTURE_FILTER_LINEAR,4,2      ; @TEXTURE_FILTER_LINEAR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[GL]: Failed to load texture image from: \"%s\"\n"

l_.str.1:                               ; @.str.1
	.asciz	"[GL]: Loaded texture image from: \"%s\" ...\n"

	.comm	_RARCH_FILTER_NEAREST,4,2       ; @RARCH_FILTER_NEAREST
	.comm	_TEXTURE_FILTER_NEAREST,4,2     ; @TEXTURE_FILTER_NEAREST
	.comm	_TEXTURE_FILTER_MIPMAP_NEAREST,4,2 ; @TEXTURE_FILTER_MIPMAP_NEAREST
	.comm	_TEXTURE_FILTER_MIPMAP_LINEAR,4,2 ; @TEXTURE_FILTER_MIPMAP_LINEAR
	.no_dead_strip	_gl2_add_lut
.subsections_via_symbols
