	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gl2_set_texture_frame
_gl2_set_texture_frame:                 ## @gl2_set_texture_frame
	.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
	movss	%xmm0, -48(%rbp)                ## 4-byte Spill
	movl	%r8d, %r13d
	movl	%ecx, %r12d
	movq	%rsi, %r15
	movq	%rdi, %rbx
	xorl	%eax, %eax
	callq	_config_get_ptr
	testq	%rbx, %rbx
	je	LBB0_7
## %bb.1:
	movq	%rax, %r14
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_gl2_context_bind_hw_render
	cmpq	$0, (%r14)
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movl	%r13d, -44(%rbp)                ## 4-byte Spill
	jne	LBB0_2
## %bb.3:
	movq	_TEXTURE_FILTER_NEAREST@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_7:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	_TEXTURE_FILTER_LINEAR@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %r13d
	movl	24(%rbx), %r14d
	testl	%r14d, %r14d
	jne	LBB0_6
## %bb.5:
	leaq	24(%rbx), %r14
	movl	$1, %edi
	movq	%r14, %rsi
	callq	_glGenTextures
	movl	(%r14), %r14d
LBB0_6:
	movq	_RARCH_WRAP_EDGE@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	leal	(,%r12,4), %edi
	callq	_video_pixel_get_alignment
	movl	%r14d, %edi
	movl	%r15d, %esi
	movl	%r13d, %edx
	movl	%eax, %ecx
	movl	%r12d, %r8d
	movl	-44(%rbp), %r9d                 ## 4-byte Reload
	pushq	$4
	pushq	-56(%rbp)                       ## 8-byte Folded Reload
	callq	_gl_load_texture_data
	addq	$16, %rsp
	movss	-48(%rbp), %xmm0                ## 4-byte Reload
                                        ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, (%rbx)
	movq	_GL_TEXTURE_2D@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	8(%rbx), %rax
	movq	16(%rbx), %rcx
	movl	(%rcx,%rax,4), %esi
	callq	_glBindTexture
	movq	%rbx, %rdi
	movl	$1, %esi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_gl2_context_bind_hw_render     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_TEXTURE_FILTER_LINEAR,4,2      ## @TEXTURE_FILTER_LINEAR
	.comm	_TEXTURE_FILTER_NEAREST,4,2     ## @TEXTURE_FILTER_NEAREST
	.comm	_RARCH_WRAP_EDGE,4,2            ## @RARCH_WRAP_EDGE
	.comm	_GL_TEXTURE_2D,4,2              ## @GL_TEXTURE_2D
	.no_dead_strip	_gl2_set_texture_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gl2_set_texture_frame
_gl2_set_texture_frame:                 ; @gl2_set_texture_frame
	.cfi_startproc
; %bb.0:
	stp	d9, d8, [sp, #-96]!             ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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 b8, -88
	.cfi_offset b9, -96
	fmov	s8, s0
	mov	x20, x4
	mov	x22, x3
	mov	x21, x1
	mov	x19, x0
	bl	_config_get_ptr
	cbz	x19, LBB0_4
; %bb.1:
	mov	x23, x0
	mov	x0, x19
	mov	w1, #0
	bl	_gl2_context_bind_hw_render
	ldr	x8, [x23]
Lloh0:
	adrp	x9, _TEXTURE_FILTER_LINEAR@GOTPAGE
Lloh1:
	ldr	x9, [x9, _TEXTURE_FILTER_LINEAR@GOTPAGEOFF]
Lloh2:
	adrp	x10, _TEXTURE_FILTER_NEAREST@GOTPAGE
Lloh3:
	ldr	x10, [x10, _TEXTURE_FILTER_NEAREST@GOTPAGEOFF]
	cmp	x8, #0
	csel	x8, x10, x9, eq
	ldr	w23, [x8]
	mov	x25, x19
	ldr	w24, [x25, #24]!
	cbnz	w24, LBB0_3
; %bb.2:
	mov	w0, #1
	mov	x1, x25
	bl	_glGenTextures
	ldr	w24, [x25]
LBB0_3:
Lloh4:
	adrp	x8, _RARCH_WRAP_EDGE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _RARCH_WRAP_EDGE@GOTPAGEOFF]
Lloh6:
	ldr	w25, [x8]
	lsl	w0, w22, #2
	bl	_video_pixel_get_alignment
	mov	x3, x0
	mov	x0, x24
	mov	x1, x25
	mov	x2, x23
	mov	x4, x22
	mov	x5, x20
	mov	x6, x21
	mov	w7, #4
	bl	_gl_load_texture_data
Lloh7:
	adrp	x8, _GL_TEXTURE_2D@GOTPAGE
Lloh8:
	ldr	x8, [x8, _GL_TEXTURE_2D@GOTPAGEOFF]
	str	s8, [x19]
Lloh9:
	ldr	w0, [x8]
	ldp	x9, x8, [x19, #8]
	ldr	w1, [x8, x9, lsl #2]
	bl	_glBindTexture
	mov	x0, x19
	mov	w1, #1
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp], #96               ; 16-byte Folded Reload
	b	_gl2_context_bind_hw_render
LBB0_4:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp], #96               ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_TEXTURE_FILTER_LINEAR,4,2      ; @TEXTURE_FILTER_LINEAR
	.comm	_TEXTURE_FILTER_NEAREST,4,2     ; @TEXTURE_FILTER_NEAREST
	.comm	_RARCH_WRAP_EDGE,4,2            ; @RARCH_WRAP_EDGE
	.comm	_GL_TEXTURE_2D,4,2              ; @GL_TEXTURE_2D
	.no_dead_strip	_gl2_set_texture_frame
.subsections_via_symbols
