	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gl2_create_fbo_texture
_gl2_create_fbo_texture:                ## @gl2_create_fbo_texture
	.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	%rcx, -64(%rbp)                 ## 8-byte Spill
	movl	%edx, %ebx
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r12
	movl	$0, -44(%rbp)
	xorl	%eax, %eax
	callq	_config_get_ptr
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	cmpq	$0, 8(%rax)
	movq	_GL_NEAREST@GOTPCREL(%rip), %rax
	cmovneq	_GL_LINEAR@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	movq	_GL_NEAREST_MIPMAP_NEAREST@GOTPCREL(%rip), %rax
	cmovneq	_GL_LINEAR_MIPMAP_LINEAR@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	addl	$2, %ebx
	movq	16(%r12), %rax
	movl	8(%r12), %edi
	movl	%ebx, %esi
	callq	*(%rax)
	movl	%eax, %r15d
	testl	%eax, %eax
	cmoveq	%r14, %r13
	movl	%ebx, %r14d
	movq	16(%r12), %rax
	movl	8(%r12), %edi
	leaq	-44(%rbp), %rdx
	movl	%ebx, %esi
	callq	*16(%rax)
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	movl	-44(%rbp), %eax
	testl	%r15d, %r15d
	je	LBB0_4
## %bb.2:
	testl	%eax, %eax
	movq	_GL_LINEAR_MIPMAP_LINEAR@GOTPCREL(%rip), %rax
	jne	LBB0_6
## %bb.3:
	movq	_GL_NEAREST_MIPMAP_NEAREST@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_4:
	testl	%eax, %eax
	movq	_GL_LINEAR@GOTPCREL(%rip), %rax
	jne	LBB0_6
## %bb.5:
	movq	_GL_NEAREST@GOTPCREL(%rip), %rax
LBB0_6:
	movq	(%rax), %r13
LBB0_7:
	movq	%r13, %rdi
	callq	_gl2_min_filter_to_mag
	movq	%rax, %rbx
	movq	16(%r12), %rax
	movl	8(%r12), %edi
	movl	%r14d, %esi
	callq	*8(%rax)
	movl	%eax, %edi
	callq	_gl2_wrap_type_to_enum
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%rax, %rsi
	movq	%rbx, %rdx
	movq	%r13, %rcx
	callq	_gl_bind_texture
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	16(%rbx), %rax
	movq	-80(%rbp), %r15                 ## 8-byte Reload
	movl	%r15d, %r14d
	cmpl	$0, (%rax,%r14,8)
	je	LBB0_12
## %bb.8:
	cmpq	$0, 24(%rbx)
	jne	LBB0_11
## %bb.9:
	leaq	L_.str(%rip), %rdi
	callq	_RARCH_ERR
	cmpq	$0, 24(%rbx)
	je	LBB0_10
LBB0_11:
	leaq	L_.str.1(%rip), %rdi
	movl	%r15d, %esi
	callq	_RARCH_LOG
	movq	_GL_TEXTURE_2D@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_GL_RGBA32F@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	(%r12), %rax
	movl	(%rax,%r14,8), %r8d
	movl	4(%rax,%r14,8), %ecx
	movq	_GL_RGBA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_GL_FLOAT@GOTPCREL(%rip), %rsi
	jmp	LBB0_21
LBB0_12:
	cmpl	$0, 4(%rax,%r14,8)
	je	LBB0_20
## %bb.13:
	cmpq	$0, 8(%rbx)
	jne	LBB0_15
## %bb.14:
	leaq	L_.str.2(%rip), %rdi
	callq	_RARCH_ERR
LBB0_15:
	xorl	%eax, %eax
	jmp	LBB0_16
LBB0_10:
	movq	16(%rbx), %rax
	cmpl	$0, 4(%rax,%r14,8)
	sete	%al
LBB0_16:
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	cmpq	$0, (%rcx)
	jne	LBB0_20
## %bb.17:
	testb	%al, %al
	jne	LBB0_20
## %bb.18:
	cmpq	$0, 8(%rbx)
	je	LBB0_20
## %bb.19:
	leaq	L_.str.3(%rip), %rdi
	movl	%r15d, %esi
	callq	_RARCH_LOG
	movq	_GL_TEXTURE_2D@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_GL_SRGB8_ALPHA8@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	(%r12), %rax
	movl	(%rax,%r14,8), %r8d
	movl	4(%rax,%r14,8), %ecx
	movq	_GL_RGBA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_GL_UNSIGNED_BYTE@GOTPCREL(%rip), %rsi
	jmp	LBB0_21
LBB0_20:
	movq	_GL_TEXTURE_2D@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_RARCH_GL_INTERNAL_FORMAT32@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	(%r12), %rax
	movl	(%rax,%r14,8), %r8d
	movl	4(%rax,%r14,8), %ecx
	movq	_RARCH_GL_TEXTURE_TYPE32@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_RARCH_GL_FORMAT32@GOTPCREL(%rip), %rsi
LBB0_21:
	movl	(%rsi), %ebx
	subq	$8, %rsp
	xorl	%esi, %esi
	xorl	%r9d, %r9d
	pushq	$0
	pushq	%rbx
	pushq	%rax
	callq	_gl2_load_texture_image
	addq	$32, %rsp
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GL_LINEAR,8,3                  ## @GL_LINEAR
	.comm	_GL_NEAREST,8,3                 ## @GL_NEAREST
	.comm	_GL_LINEAR_MIPMAP_LINEAR,8,3    ## @GL_LINEAR_MIPMAP_LINEAR
	.comm	_GL_NEAREST_MIPMAP_NEAREST,8,3  ## @GL_NEAREST_MIPMAP_NEAREST
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[GL]: Floating-point FBO was requested, but is not supported. Falling back to UNORM. Result may band/clip/etc.!\n"

L_.str.1:                               ## @.str.1
	.asciz	"[GL]: FBO pass #%d is floating-point.\n"

	.comm	_GL_TEXTURE_2D,4,2              ## @GL_TEXTURE_2D
	.comm	_GL_RGBA32F,4,2                 ## @GL_RGBA32F
	.comm	_GL_RGBA,4,2                    ## @GL_RGBA
	.comm	_GL_FLOAT,4,2                   ## @GL_FLOAT
L_.str.2:                               ## @.str.2
	.asciz	"[GL]: sRGB FBO was requested, but it is not supported. Falling back to UNORM. Result may have banding!\n"

L_.str.3:                               ## @.str.3
	.asciz	"[GL]: FBO pass #%d is sRGB.\n"

	.comm	_GL_SRGB8_ALPHA8,4,2            ## @GL_SRGB8_ALPHA8
	.comm	_GL_UNSIGNED_BYTE,4,2           ## @GL_UNSIGNED_BYTE
	.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_SRGB_ALPHA_EXT,4,2          ## @GL_SRGB_ALPHA_EXT
	.no_dead_strip	_gl2_create_fbo_texture
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gl2_create_fbo_texture
_gl2_create_fbo_texture:                ; @gl2_create_fbo_texture
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x23, x3
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	str	wzr, [sp, #28]
	bl	_config_get_ptr
	str	x0, [sp, #16]                   ; 8-byte Folded Spill
	ldr	x8, [x0, #8]
Lloh0:
	adrp	x9, _GL_LINEAR@GOTPAGE
Lloh1:
	ldr	x9, [x9, _GL_LINEAR@GOTPAGEOFF]
Lloh2:
	adrp	x10, _GL_NEAREST@GOTPAGE
Lloh3:
	ldr	x10, [x10, _GL_NEAREST@GOTPAGEOFF]
	cmp	x8, #0
	csel	x8, x10, x9, eq
	ldr	x25, [x8]
Lloh4:
	adrp	x22, _GL_LINEAR_MIPMAP_LINEAR@GOTPAGE
Lloh5:
	ldr	x22, [x22, _GL_LINEAR_MIPMAP_LINEAR@GOTPAGEOFF]
Lloh6:
	adrp	x27, _GL_NEAREST_MIPMAP_NEAREST@GOTPAGE
Lloh7:
	ldr	x27, [x27, _GL_NEAREST_MIPMAP_NEAREST@GOTPAGEOFF]
	csel	x8, x27, x22, eq
	ldr	x28, [x8]
	add	w24, w20, #2
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	ldr	w0, [x19, #8]
	mov	x1, x24
	blr	x8
	mov	x26, x0
	cmp	w0, #0
	csel	x25, x25, x28, eq
	ldr	x8, [x19, #16]
	ldr	x8, [x8, #16]
	ldr	w0, [x19, #8]
	add	x2, sp, #28
	mov	x1, x24
	blr	x8
	cbz	x0, LBB0_5
; %bb.1:
	ldr	w8, [sp, #28]
	cmp	w8, #0
	cbz	w26, LBB0_3
; %bb.2:
	csel	x8, x27, x22, eq
	b	LBB0_4
LBB0_3:
Lloh8:
	adrp	x8, _GL_LINEAR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _GL_LINEAR@GOTPAGEOFF]
Lloh10:
	adrp	x9, _GL_NEAREST@GOTPAGE
Lloh11:
	ldr	x9, [x9, _GL_NEAREST@GOTPAGEOFF]
	csel	x8, x9, x8, eq
LBB0_4:
	ldr	x25, [x8]
LBB0_5:
	mov	x0, x25
	bl	_gl2_min_filter_to_mag
	mov	x26, x0
	ldr	x8, [x19, #16]
	ldr	x8, [x8, #8]
	ldr	w0, [x19, #8]
	mov	x1, x24
	blr	x8
	bl	_gl2_wrap_type_to_enum
	mov	x1, x0
	mov	x0, x23
	mov	x2, x26
	mov	x3, x25
	bl	_gl_bind_texture
	ldr	x8, [x21, #16]
	mov	w23, w20
	lsl	x9, x23, #3
	ldr	w9, [x8, x9]
	cbz	w9, LBB0_9
; %bb.6:
	ldr	x8, [x21, #24]
	cbnz	x8, LBB0_8
; %bb.7:
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	bl	_RARCH_ERR
	ldr	x8, [x21, #24]
	cbz	x8, LBB0_13
LBB0_8:
Lloh14:
	adrp	x0, l_.str.1@PAGE
Lloh15:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x20
	bl	_RARCH_LOG
Lloh16:
	adrp	x8, _GL_TEXTURE_2D@GOTPAGE
Lloh17:
	ldr	x8, [x8, _GL_TEXTURE_2D@GOTPAGEOFF]
Lloh18:
	adrp	x9, _GL_RGBA32F@GOTPAGE
Lloh19:
	ldr	x9, [x9, _GL_RGBA32F@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
Lloh21:
	ldr	w2, [x9]
	ldr	x8, [x19]
	add	x8, x8, x23, lsl #3
	ldp	w4, w3, [x8]
Lloh22:
	adrp	x8, _GL_RGBA@GOTPAGE
Lloh23:
	ldr	x8, [x8, _GL_RGBA@GOTPAGEOFF]
Lloh24:
	ldr	w6, [x8]
Lloh25:
	adrp	x8, _GL_FLOAT@GOTPAGE
Lloh26:
	ldr	x8, [x8, _GL_FLOAT@GOTPAGEOFF]
	b	LBB0_19
LBB0_9:
	add	x8, x8, x23, lsl #3
	ldr	w8, [x8, #4]
	cbz	w8, LBB0_18
; %bb.10:
	ldr	x8, [x21, #8]
	cbnz	x8, LBB0_12
; %bb.11:
Lloh27:
	adrp	x0, l_.str.2@PAGE
Lloh28:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_RARCH_ERR
LBB0_12:
	mov	w8, #0
	b	LBB0_14
LBB0_13:
	ldr	x8, [x21, #16]
	add	x8, x8, x23, lsl #3
	ldr	w8, [x8, #4]
	cmp	w8, #0
	cset	w8, eq
LBB0_14:
	ldr	x9, [sp, #16]                   ; 8-byte Folded Reload
	ldr	x9, [x9]
	cbnz	x9, LBB0_18
; %bb.15:
	tbnz	w8, #0, LBB0_18
; %bb.16:
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_18
; %bb.17:
Lloh29:
	adrp	x0, l_.str.3@PAGE
Lloh30:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x1, x20
	bl	_RARCH_LOG
Lloh31:
	adrp	x8, _GL_TEXTURE_2D@GOTPAGE
Lloh32:
	ldr	x8, [x8, _GL_TEXTURE_2D@GOTPAGEOFF]
Lloh33:
	adrp	x9, _GL_SRGB8_ALPHA8@GOTPAGE
Lloh34:
	ldr	x9, [x9, _GL_SRGB8_ALPHA8@GOTPAGEOFF]
Lloh35:
	ldr	w0, [x8]
Lloh36:
	ldr	w2, [x9]
	ldr	x8, [x19]
	add	x8, x8, x23, lsl #3
	ldp	w4, w3, [x8]
Lloh37:
	adrp	x8, _GL_RGBA@GOTPAGE
Lloh38:
	ldr	x8, [x8, _GL_RGBA@GOTPAGEOFF]
Lloh39:
	ldr	w6, [x8]
Lloh40:
	adrp	x8, _GL_UNSIGNED_BYTE@GOTPAGE
Lloh41:
	ldr	x8, [x8, _GL_UNSIGNED_BYTE@GOTPAGEOFF]
	b	LBB0_19
LBB0_18:
Lloh42:
	adrp	x8, _GL_TEXTURE_2D@GOTPAGE
Lloh43:
	ldr	x8, [x8, _GL_TEXTURE_2D@GOTPAGEOFF]
Lloh44:
	adrp	x9, _RARCH_GL_INTERNAL_FORMAT32@GOTPAGE
Lloh45:
	ldr	x9, [x9, _RARCH_GL_INTERNAL_FORMAT32@GOTPAGEOFF]
Lloh46:
	ldr	w0, [x8]
Lloh47:
	ldr	w2, [x9]
	ldr	x8, [x19]
	add	x8, x8, x23, lsl #3
	ldp	w4, w3, [x8]
Lloh48:
	adrp	x8, _RARCH_GL_TEXTURE_TYPE32@GOTPAGE
Lloh49:
	ldr	x8, [x8, _RARCH_GL_TEXTURE_TYPE32@GOTPAGEOFF]
Lloh50:
	ldr	w6, [x8]
Lloh51:
	adrp	x8, _RARCH_GL_FORMAT32@GOTPAGE
Lloh52:
	ldr	x8, [x8, _RARCH_GL_FORMAT32@GOTPAGEOFF]
LBB0_19:
	ldr	w7, [x8]
	str	xzr, [sp]
	mov	w1, #0
	mov	w5, #0
	bl	_gl2_load_texture_image
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh20
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh35
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh47
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh46
	.cfi_endproc
                                        ; -- End function
	.comm	_GL_LINEAR,8,3                  ; @GL_LINEAR
	.comm	_GL_NEAREST,8,3                 ; @GL_NEAREST
	.comm	_GL_LINEAR_MIPMAP_LINEAR,8,3    ; @GL_LINEAR_MIPMAP_LINEAR
	.comm	_GL_NEAREST_MIPMAP_NEAREST,8,3  ; @GL_NEAREST_MIPMAP_NEAREST
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[GL]: Floating-point FBO was requested, but is not supported. Falling back to UNORM. Result may band/clip/etc.!\n"

l_.str.1:                               ; @.str.1
	.asciz	"[GL]: FBO pass #%d is floating-point.\n"

	.comm	_GL_TEXTURE_2D,4,2              ; @GL_TEXTURE_2D
	.comm	_GL_RGBA32F,4,2                 ; @GL_RGBA32F
	.comm	_GL_RGBA,4,2                    ; @GL_RGBA
	.comm	_GL_FLOAT,4,2                   ; @GL_FLOAT
l_.str.2:                               ; @.str.2
	.asciz	"[GL]: sRGB FBO was requested, but it is not supported. Falling back to UNORM. Result may have banding!\n"

l_.str.3:                               ; @.str.3
	.asciz	"[GL]: FBO pass #%d is sRGB.\n"

	.comm	_GL_SRGB8_ALPHA8,4,2            ; @GL_SRGB8_ALPHA8
	.comm	_GL_UNSIGNED_BYTE,4,2           ; @GL_UNSIGNED_BYTE
	.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_SRGB_ALPHA_EXT,4,2          ; @GL_SRGB_ALPHA_EXT
	.no_dead_strip	_gl2_create_fbo_texture
.subsections_via_symbols
