	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gl2_create_fbo_targets
_gl2_create_fbo_targets:                ## @gl2_create_fbo_targets
	.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
	movq	%rsi, %r13
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	_GL_TEXTURE_2D@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_glBindTexture
	movl	(%r13), %edi
	movq	8(%r13), %rsi
	callq	_gl2_gen_fb
	cmpl	$0, (%r13)
	je	LBB0_7
## %bb.1:
	xorl	%ebx, %ebx
	movq	_RARCH_GL_FRAMEBUFFER@GOTPCREL(%rip), %r15
	movq	_RARCH_GL_COLOR_ATTACHMENT0@GOTPCREL(%rip), %r14
	movq	_RARCH_GL_FRAMEBUFFER_COMPLETE@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r13), %rax
	movq	(%rax,%rbx,8), %rdi
	callq	_gl2_bind_fb
	movl	(%r15), %edi
	movl	(%r14), %esi
	movq	_GL_TEXTURE_2D@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	16(%r13), %rax
	movq	(%rax,%rbx,8), %rcx
	xorl	%r8d, %r8d
	callq	_gl2_fb_texture_2d
	movl	(%r15), %edi
	callq	_gl2_check_fb_status
	cmpq	(%r12), %rax
	jne	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	movl	(%r13), %eax
	cmpq	%rax, %rbx
	jb	LBB0_3
LBB0_7:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	cmpq	$0, 8(%rbx)
	je	LBB0_8
## %bb.9:
	movl	$1, %r15d
	movl	$1, %edi
	movq	%rbx, %rsi
	callq	_gl2_gen_fb
	movq	(%rbx), %rdi
	callq	_gl2_bind_fb
	movq	_RARCH_GL_FRAMEBUFFER@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movq	_RARCH_GL_COLOR_ATTACHMENT0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_GL_TEXTURE_2D@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	8(%rbx), %rcx
	xorl	%r8d, %r8d
	callq	_gl2_fb_texture_2d
	movl	(%r14), %edi
	callq	_gl2_check_fb_status
	movq	_RARCH_GL_FRAMEBUFFER_COMPLETE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.10:
	xorps	%xmm0, %xmm0
	xorps	%xmm1, %xmm1
	xorps	%xmm2, %xmm2
	xorps	%xmm3, %xmm3
	callq	_glClearColor
	movq	_GL_COLOR_BUFFER_BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_glClear
	jmp	LBB0_11
LBB0_4:
	movl	(%r13), %edi
	movq	8(%r13), %rsi
	callq	_gl2_delete_fb
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	cmpq	$0, (%rsi)
	je	LBB0_6
## %bb.5:
	movl	$1, %edi
	callq	_gl2_delete_fb
LBB0_6:
	leaq	L_.str(%rip), %rdi
	callq	_RARCH_ERR
	xorl	%r15d, %r15d
	jmp	LBB0_11
LBB0_8:
	movl	$1, %r15d
LBB0_11:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GL_TEXTURE_2D,4,2              ## @GL_TEXTURE_2D
	.comm	_RARCH_GL_FRAMEBUFFER,4,2       ## @RARCH_GL_FRAMEBUFFER
	.comm	_RARCH_GL_COLOR_ATTACHMENT0,4,2 ## @RARCH_GL_COLOR_ATTACHMENT0
	.comm	_RARCH_GL_FRAMEBUFFER_COMPLETE,8,3 ## @RARCH_GL_FRAMEBUFFER_COMPLETE
	.comm	_GL_COLOR_BUFFER_BIT,4,2        ## @GL_COLOR_BUFFER_BIT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[GL]: Failed to set up frame buffer objects. Multi-pass shading will not work.\n"

	.no_dead_strip	_gl2_create_fbo_targets
.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_targets
_gl2_create_fbo_targets:                ; @gl2_create_fbo_targets
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, x1
	mov	x19, x0
Lloh0:
	adrp	x21, _GL_TEXTURE_2D@GOTPAGE
Lloh1:
	ldr	x21, [x21, _GL_TEXTURE_2D@GOTPAGEOFF]
	ldr	w0, [x21]
	mov	w1, #0
	bl	_glBindTexture
	ldr	w0, [x20]
	ldr	x1, [x20, #8]
	bl	_gl2_gen_fb
	ldr	w8, [x20]
Lloh2:
	adrp	x23, _RARCH_GL_FRAMEBUFFER@GOTPAGE
Lloh3:
	ldr	x23, [x23, _RARCH_GL_FRAMEBUFFER@GOTPAGEOFF]
Lloh4:
	adrp	x24, _RARCH_GL_COLOR_ATTACHMENT0@GOTPAGE
Lloh5:
	ldr	x24, [x24, _RARCH_GL_COLOR_ATTACHMENT0@GOTPAGEOFF]
Lloh6:
	adrp	x22, _RARCH_GL_FRAMEBUFFER_COMPLETE@GOTPAGE
Lloh7:
	ldr	x22, [x22, _RARCH_GL_FRAMEBUFFER_COMPLETE@GOTPAGEOFF]
	cbz	w8, LBB0_4
; %bb.1:
	mov	x25, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #8]
	lsl	x26, x25, #3
	ldr	x0, [x8, x26]
	bl	_gl2_bind_fb
	ldr	w0, [x23]
	ldr	w1, [x24]
	ldr	w2, [x21]
	ldr	x8, [x20, #16]
	ldr	x3, [x8, x26]
	mov	w4, #0
	bl	_gl2_fb_texture_2d
	ldr	w0, [x23]
	bl	_gl2_check_fb_status
	ldr	x8, [x22]
	cmp	x0, x8
	b.ne	LBB0_8
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x25, x25, #1
	ldr	w8, [x20]
	cmp	x25, x8
	b.lo	LBB0_2
LBB0_4:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_7
; %bb.5:
	mov	w0, #1
	mov	x1, x19
	bl	_gl2_gen_fb
	ldr	x0, [x19]
	bl	_gl2_bind_fb
	ldr	w0, [x23]
	ldr	w1, [x24]
	ldr	w2, [x21]
	ldr	x3, [x19, #8]
	mov	w4, #0
	bl	_gl2_fb_texture_2d
	ldr	w0, [x23]
	bl	_gl2_check_fb_status
	ldr	x8, [x22]
	cmp	x0, x8
	b.ne	LBB0_8
; %bb.6:
	movi	d0, #0000000000000000
	movi	d1, #0000000000000000
	movi	d2, #0000000000000000
	movi	d3, #0000000000000000
	bl	_glClearColor
Lloh8:
	adrp	x8, _GL_COLOR_BUFFER_BIT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _GL_COLOR_BUFFER_BIT@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	bl	_glClear
LBB0_7:
	mov	w0, #1
	b	LBB0_11
LBB0_8:
	ldr	w0, [x20]
	ldr	x1, [x20, #8]
	bl	_gl2_delete_fb
	ldr	x8, [x19]
	cbz	x8, LBB0_10
; %bb.9:
	mov	w0, #1
	mov	x1, x19
	bl	_gl2_delete_fb
LBB0_10:
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	bl	_RARCH_ERR
	mov	w0, #0
LBB0_11:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_GL_TEXTURE_2D,4,2              ; @GL_TEXTURE_2D
	.comm	_RARCH_GL_FRAMEBUFFER,4,2       ; @RARCH_GL_FRAMEBUFFER
	.comm	_RARCH_GL_COLOR_ATTACHMENT0,4,2 ; @RARCH_GL_COLOR_ATTACHMENT0
	.comm	_RARCH_GL_FRAMEBUFFER_COMPLETE,8,3 ; @RARCH_GL_FRAMEBUFFER_COMPLETE
	.comm	_GL_COLOR_BUFFER_BIT,4,2        ; @GL_COLOR_BUFFER_BIT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[GL]: Failed to set up frame buffer objects. Multi-pass shading will not work.\n"

	.no_dead_strip	_gl2_create_fbo_targets
.subsections_via_symbols
