	.file	"extr_gl_raster_font.c_gl_raster_font_upload_atlas.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	gl_raster_font_upload_atlas, @function
gl_raster_font_upload_atlas:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12, QWORD PTR GL_LUMINANCE_ALPHA[rip]
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rax, QWORD PTR [rdi]
	mov	rbx, rdi
	mov	edi, DWORD PTR 8[rdi]
	lea	rsi, [rax+rax]
	call	calloc@PLT
	mov	rdi, QWORD PTR 16[rbx]
	mov	rbp, rax
	mov	eax, DWORD PTR [rdi]
	test	eax, eax
	je	.L2
	mov	r10, QWORD PTR 8[rdi]
	mov	rcx, QWORD PTR [rbx]
	xor	r9d, r9d
	.p2align 4,,10
	.p2align 3
.L4:
	mov	esi, DWORD PTR 4[rdi]
	mov	eax, esi
	imul	eax, r9d
	lea	r8, [r10+rax*4]
	mov	eax, r9d
	imul	rax, rcx
	lea	rdx, 0[rbp+rax*8]
	xor	eax, eax
	test	esi, esi
	je	.L6
	.p2align 4,,10
	.p2align 3
.L3:
	mov	DWORD PTR [rdx+rax*8], 255
	mov	esi, DWORD PTR [r8+rax*4]
	mov	DWORD PTR 4[rdx+rax*8], esi
	add	rax, 1
	cmp	DWORD PTR 4[rdi], eax
	ja	.L3
.L6:
	add	r9d, 1
	cmp	DWORD PTR [rdi], r9d
	ja	.L4
.L5:
	mov	eax, DWORD PTR GL_UNSIGNED_BYTE[rip]
	sub	rsp, 8
	.cfi_def_cfa_offset 40
	mov	r8d, DWORD PTR 8[rbx]
	xor	esi, esi
	push	rbp
	.cfi_def_cfa_offset 48
	mov	edi, DWORD PTR GL_TEXTURE_2D[rip]
	mov	rdx, r12
	xor	r9d, r9d
	push	rax
	.cfi_def_cfa_offset 56
	push	r12
	.cfi_def_cfa_offset 64
	call	glTexImage2D@PLT
	add	rsp, 32
	.cfi_def_cfa_offset 32
	mov	rdi, rbp
	call	free@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	eax, 1
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
.L2:
	.cfi_restore_state
	mov	rcx, QWORD PTR [rbx]
	jmp	.L5
	.cfi_endproc
.LFE0:
	.size	gl_raster_font_upload_atlas, .-gl_raster_font_upload_atlas
	.comm	RETRO_HW_CONTEXT_OPENGL,8,8
	.comm	GL_UNSIGNED_BYTE,4,4
	.comm	GL_TEXTURE_SWIZZLE_RGBA,4,4
	.comm	GL_TEXTURE_2D,4,4
	.comm	GL_RED,8,8
	.comm	GL_R8,8,8
	.comm	GL_ONE,8,8
	.comm	GL_LUMINANCE_ALPHA,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_raster_font.c_gl_raster_font_upload_atlas.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	gl_raster_font_upload_atlas, %function
gl_raster_font_upload_atlas:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldm	r0, {r8, r10}
	mov	r4, r0
	ldr	r3, .L16
	lsl	r1, r8, #1
	mov	r0, r10
	sub	sp, sp, #28
	ldr	r9, [r3]
	bl	calloc
	ldr	r5, [r4, #8]
	mov	r7, r0
	ldr	r1, [r5]
	cmp	r1, #0
	beq	.L2
	mov	r2, #0
	mov	r3, #255
	ldr	fp, [r5, #8]
	ldr	lr, [r5, #4]
	lsl	r0, r8, #3
	add	r4, r7, #4
.L5:
	mul	ip, r2, lr
	cmp	lr, #0
	add	ip, fp, ip, lsl #2
	sub	r6, r4, #4
	beq	.L3
	mov	r1, #0
.L4:
	str	r3, [r6, r1, lsl #3]
	ldr	lr, [ip], #4
	str	lr, [r4, r1, lsl #3]
	ldr	lr, [r5, #4]
	add	r1, r1, #1
	cmp	lr, r1
	bhi	.L4
	ldr	r1, [r5]
.L3:
	add	r2, r2, #1
	cmp	r1, r2
	add	r4, r4, r0
	bhi	.L5
.L2:
	mov	r1, #0
	ldr	r3, .L16+4
	str	r7, [sp, #16]
	ldr	ip, [r3]
	ldr	r0, .L16+8
	str	ip, [sp, #12]
	str	r1, [sp, #4]
	str	r9, [sp, #8]
	str	r10, [sp]
	mov	r3, r8
	mov	r2, r9
	ldr	r0, [r0]
	bl	glTexImage2D
	mov	r0, r7
	bl	free
	mov	r0, #1
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L17:
	.align	2
.L16:
	.word	GL_LUMINANCE_ALPHA
	.word	GL_UNSIGNED_BYTE
	.word	GL_TEXTURE_2D
	.size	gl_raster_font_upload_atlas, .-gl_raster_font_upload_atlas
	.comm	RETRO_HW_CONTEXT_OPENGL,4,4
	.comm	GL_UNSIGNED_BYTE,4,4
	.comm	GL_TEXTURE_SWIZZLE_RGBA,4,4
	.comm	GL_TEXTURE_2D,4,4
	.comm	GL_RED,4,4
	.comm	GL_R8,4,4
	.comm	GL_ONE,4,4
	.comm	GL_LUMINANCE_ALPHA,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
