	.file	"extr_gl-helpers.c_gl_copy_texture.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"glCopyImageSubData"
.LC1:
	.string	"glCopyImageSubDataNV"
.LC2:
	.string	"gl_copy_texture failed"
	.text
	.p2align 4
	.globl	gl_copy_texture
	.type	gl_copy_texture, @function
gl_copy_texture:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r11, rdi
	mov	r10, r8
	mov	rdi, rsi
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	mov	esi, edx
	mov	edx, ecx
	mov	ecx, r9d
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	mov	rax, QWORD PTR [r11]
	cmp	rax, QWORD PTR COPY_TYPE_ARB[rip]
	mov	r8d, DWORD PTR 32[rsp]
	mov	r9d, DWORD PTR 40[rsp]
	mov	ebx, DWORD PTR 48[rsp]
	je	.L8
	cmp	rax, QWORD PTR COPY_TYPE_NV[rip]
	je	.L9
	xor	r12d, r12d
	cmp	rax, QWORD PTR COPY_TYPE_FBO_BLIT[rip]
	je	.L10
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	sub	rsp, 8
	.cfi_def_cfa_offset 40
	mov	r11d, DWORD PTR 4[r10]
	push	1
	.cfi_def_cfa_offset 48
	push	rbx
	.cfi_def_cfa_offset 56
	push	r9
	.cfi_def_cfa_offset 64
	xor	r9d, r9d
	push	0
	.cfi_def_cfa_offset 72
	push	rdx
	.cfi_def_cfa_offset 80
	xor	edx, edx
	push	rsi
	.cfi_def_cfa_offset 88
	mov	esi, DWORD PTR [r10]
	push	0
	.cfi_def_cfa_offset 96
	mov	eax, DWORD PTR [rdi]
	push	rax
	.cfi_def_cfa_offset 104
	mov	eax, DWORD PTR 4[rdi]
	mov	edi, r11d
	push	rax
	.cfi_def_cfa_offset 112
	call	glCopyImageSubData@PLT
	add	rsp, 88
	.cfi_def_cfa_offset 24
	lea	rdi, .LC0[rip]
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	gl_success@PLT
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_def_cfa_offset 32
	sub	rsp, 8
	.cfi_def_cfa_offset 40
	mov	r11d, DWORD PTR 4[r10]
	push	1
	.cfi_def_cfa_offset 48
	push	rbx
	.cfi_def_cfa_offset 56
	push	r9
	.cfi_def_cfa_offset 64
	xor	r9d, r9d
	push	0
	.cfi_def_cfa_offset 72
	push	rdx
	.cfi_def_cfa_offset 80
	xor	edx, edx
	push	rsi
	.cfi_def_cfa_offset 88
	mov	esi, DWORD PTR [r10]
	push	0
	.cfi_def_cfa_offset 96
	mov	eax, DWORD PTR [rdi]
	push	rax
	.cfi_def_cfa_offset 104
	mov	eax, DWORD PTR 4[rdi]
	mov	edi, r11d
	push	rax
	.cfi_def_cfa_offset 112
	call	glCopyImageSubDataNV@PLT
	add	rsp, 88
	.cfi_def_cfa_offset 24
	lea	rdi, .LC1[rip]
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	gl_success@PLT
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_def_cfa_offset 32
	push	rbx
	.cfi_def_cfa_offset 40
	push	r9
	.cfi_def_cfa_offset 48
	mov	r9d, r8d
	mov	r8d, ecx
	mov	rcx, r10
	call	gl_copy_fbo@PLT
	mov	r12d, eax
	pop	rax
	.cfi_def_cfa_offset 40
	pop	rdx
	.cfi_def_cfa_offset 32
	test	r12d, r12d
	jne	.L1
	mov	edi, DWORD PTR LOG_ERROR[rip]
	lea	rsi, .LC2[rip]
	call	blog@PLT
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	gl_copy_texture, .-gl_copy_texture
	.comm	LOG_ERROR,4,4
	.comm	COPY_TYPE_NV,8,8
	.comm	COPY_TYPE_FBO_BLIT,8,8
	.comm	COPY_TYPE_ARB,8,8
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_gl-helpers.c_gl_copy_texture.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"glCopyImageSubData\000"
	.align	2
.LC1:
	.ascii	"glCopyImageSubDataNV\000"
	.align	2
.LC2:
	.ascii	"gl_copy_texture failed\000"
	.text
	.align	2
	.global	gl_copy_texture
	.syntax unified
	.arm
	.fpu softvfp
	.type	gl_copy_texture, %function
gl_copy_texture:
	@ args = 20, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	ip, .L12
	ldr	lr, [r0]
	ldr	ip, [ip]
	sub	sp, sp, #48
	cmp	lr, ip
	mov	ip, r3
	add	r3, sp, #76
	mov	r0, r1
	ldm	r3, {r3, r5, r6, r7}
	mov	r1, r2
	ldr	r4, [sp, #72]
	beq	.L9
	ldr	r2, .L12+4
	ldr	r2, [r2]
	cmp	lr, r2
	beq	.L10
	ldr	r2, .L12+8
	ldr	r2, [r2]
	cmp	lr, r2
	movne	r4, #0
	beq	.L11
.L1:
	mov	r0, r4
	add	sp, sp, #48
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L9:
	mov	r2, #0
	mov	r8, #1
	str	r7, [sp, #36]
	str	r6, [sp, #32]
	ldr	lr, [r0]
	ldr	r0, [r0, #4]
	str	ip, [sp, #24]
	str	r1, [sp, #20]
	str	r5, [sp]
	str	r8, [sp, #40]
	str	r2, [sp, #28]
	str	r2, [sp, #16]
	str	r2, [sp, #4]
	str	lr, [sp, #12]
	str	r0, [sp, #8]
	ldr	r1, [r4]
	ldr	r0, [r4, #4]
	bl	glCopyImageSubData
	ldr	r0, .L12+12
	add	sp, sp, #48
	@ sp needed
	pop	{r4, r5, r6, r7, r8, lr}
	b	gl_success
.L10:
	mov	r2, #0
	mov	r8, #1
	str	r7, [sp, #36]
	str	r6, [sp, #32]
	ldr	lr, [r0]
	ldr	r0, [r0, #4]
	str	ip, [sp, #24]
	str	r1, [sp, #20]
	str	r5, [sp]
	str	r8, [sp, #40]
	str	r2, [sp, #28]
	str	r2, [sp, #16]
	str	r2, [sp, #4]
	str	lr, [sp, #12]
	str	r0, [sp, #8]
	ldr	r1, [r4]
	ldr	r0, [r4, #4]
	bl	glCopyImageSubDataNV
	ldr	r0, .L12+16
	add	sp, sp, #48
	@ sp needed
	pop	{r4, r5, r6, r7, r8, lr}
	b	gl_success
.L11:
	stm	sp, {r3, r5, r6, r7}
	mov	r2, ip
	mov	r3, r4
	bl	gl_copy_fbo
	subs	r4, r0, #0
	bne	.L1
	ldr	r3, .L12+20
	ldr	r1, .L12+24
	ldr	r0, [r3]
	bl	blog
	b	.L1
.L13:
	.align	2
.L12:
	.word	COPY_TYPE_ARB
	.word	COPY_TYPE_NV
	.word	COPY_TYPE_FBO_BLIT
	.word	.LC0
	.word	.LC1
	.word	LOG_ERROR
	.word	.LC2
	.size	gl_copy_texture, .-gl_copy_texture
	.comm	LOG_ERROR,4,4
	.comm	COPY_TYPE_NV,4,4
	.comm	COPY_TYPE_FBO_BLIT,4,4
	.comm	COPY_TYPE_ARB,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
