	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gl2_renderchain_copy_frame
_gl2_renderchain_copy_frame:            ## @gl2_renderchain_copy_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, %r15d
	movl	%r8d, %r12d
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rbx
	movl	16(%rbp), %r13d
	movq	_GL_UNPACK_ALIGNMENT@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	%r13d, %edi
	callq	_video_pixel_get_alignment
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_glPixelStorei
	movq	24(%rbx), %rcx
	cmpq	$2, %rcx
	jne	LBB0_3
## %bb.1:
	cmpl	$0, 52(%rbx)
	je	LBB0_2
LBB0_3:
	movq	_GL_UNPACK_ROW_LENGTH@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r13d, %eax
	cmpq	%rcx, %rax
	jb	LBB0_4
## %bb.5:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
	movl	%eax, %esi
	jmp	LBB0_6
LBB0_4:
	xorl	%esi, %esi
LBB0_6:
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_glPixelStorei
	movq	-48(%rbp), %r10                 ## 8-byte Reload
	jmp	LBB0_7
LBB0_2:
	leaq	48(%rbx), %rdi
	movq	32(%rbx), %rsi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movl	%r12d, %ecx
	movl	%r15d, %r8d
	movl	%r13d, %r9d
	callq	_video_frame_convert_rgb16_to_rgb32
	movq	32(%rbx), %r10
LBB0_7:
	movq	_GL_TEXTURE_2D@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	40(%rbx), %eax
	movl	44(%rbx), %ebx
	subq	$8, %rsp
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movl	%r12d, %r8d
	movl	%r15d, %r9d
	pushq	%r10
	pushq	%rax
	pushq	%rbx
	callq	_glTexSubImage2D
	addq	$32, %rsp
	movq	_GL_UNPACK_ROW_LENGTH@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_glPixelStorei                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_GL_UNPACK_ALIGNMENT,4,2        ## @GL_UNPACK_ALIGNMENT
	.comm	_GL_UNPACK_ROW_LENGTH,4,2       ## @GL_UNPACK_ROW_LENGTH
	.comm	_GL_TEXTURE_2D,4,2              ## @GL_TEXTURE_2D
	.comm	_EGL_NO_IMAGE_KHR,8,3           ## @EGL_NO_IMAGE_KHR
	.comm	_GL_READ_WRITE,4,2              ## @GL_READ_WRITE
	.comm	_GL_TEXTURE_REFERENCE_BUFFER_SCE,4,2 ## @GL_TEXTURE_REFERENCE_BUFFER_SCE
	.no_dead_strip	_gl2_renderchain_copy_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gl2_renderchain_copy_frame
_gl2_renderchain_copy_frame:            ; @gl2_renderchain_copy_frame
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x23, x6
	mov	x19, x5
	mov	x20, x4
	mov	x22, x3
	mov	x21, x0
Lloh0:
	adrp	x8, _GL_UNPACK_ALIGNMENT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GL_UNPACK_ALIGNMENT@GOTPAGEOFF]
Lloh2:
	ldr	w24, [x8]
	mov	x0, x6
	bl	_video_pixel_get_alignment
	mov	x1, x0
	mov	x0, x24
	bl	_glPixelStorei
	ldr	x8, [x21, #24]
Lloh3:
	adrp	x24, _GL_UNPACK_ROW_LENGTH@GOTPAGE
Lloh4:
	ldr	x24, [x24, _GL_UNPACK_ROW_LENGTH@GOTPAGEOFF]
	cmp	x8, #2
	b.ne	LBB0_2
; %bb.1:
	ldr	w9, [x21, #52]
	cbz	w9, LBB0_3
LBB0_2:
	ldr	w0, [x24]
	mov	w9, w23
	udiv	x1, x9, x8
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_glPixelStorei
	b	LBB0_4
LBB0_3:
	add	x0, x21, #48
	ldr	x1, [x21, #32]
	mov	x2, x22
	mov	x3, x20
	mov	x4, x19
	mov	x5, x23
	bl	_video_frame_convert_rgb16_to_rgb32
	ldr	x22, [x21, #32]
LBB0_4:
Lloh5:
	adrp	x8, _GL_TEXTURE_2D@GOTPAGE
Lloh6:
	ldr	x8, [x8, _GL_TEXTURE_2D@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	ldp	w7, w6, [x21, #40]
	str	x22, [sp]
	mov	w1, #0
	mov	w2, #0
	mov	w3, #0
	mov	x4, x20
	mov	x5, x19
	bl	_glTexSubImage2D
	ldr	w0, [x24]
	mov	w1, #0
	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
	add	sp, sp, #80
	b	_glPixelStorei
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_GL_UNPACK_ALIGNMENT,4,2        ; @GL_UNPACK_ALIGNMENT
	.comm	_GL_UNPACK_ROW_LENGTH,4,2       ; @GL_UNPACK_ROW_LENGTH
	.comm	_GL_TEXTURE_2D,4,2              ; @GL_TEXTURE_2D
	.comm	_EGL_NO_IMAGE_KHR,8,3           ; @EGL_NO_IMAGE_KHR
	.comm	_GL_READ_WRITE,4,2              ; @GL_READ_WRITE
	.comm	_GL_TEXTURE_REFERENCE_BUFFER_SCE,4,2 ; @GL_TEXTURE_REFERENCE_BUFFER_SCE
	.no_dead_strip	_gl2_renderchain_copy_frame
.subsections_via_symbols
