	.file	"extr_soundv.c_VS_StoreLightmap.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"storing lightmaps...\n"
	.text
	.p2align 4
	.globl	VS_StoreLightmap
	.type	VS_StoreLightmap, @function
VS_StoreLightmap:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	lea	rdi, .LC0[rip]
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	call	_printf@PLT
	xor	eax, eax
	call	VS_FixLightmapEdges@PLT
	mov	esi, DWORD PTR numDrawSurfaces[rip]
	test	esi, esi
	jle	.L1
	xor	ebp, ebp
	.p2align 4,,10
	.p2align 3
.L7:
	mov	rax, QWORD PTR lsurfaceTest[rip]
	cmp	QWORD PTR [rax+rbp*8], 0
	je	.L3
	mov	rdx, QWORD PTR drawSurfaces[rip]
	lea	rax, 0[rbp+rbp*4]
	lea	r12, [rdx+rax*4]
	mov	ecx, DWORD PTR [r12]
	test	ecx, ecx
	js	.L3
	mov	edx, DWORD PTR 4[r12]
	xor	ebx, ebx
	test	edx, edx
	jle	.L3
	.p2align 4,,10
	.p2align 3
.L4:
	mov	eax, DWORD PTR 8[r12]
	xor	r13d, r13d
	test	eax, eax
	jle	.L6
	.p2align 4,,10
	.p2align 3
.L5:
	mov	eax, DWORD PTR [r12]
	imul	eax, DWORD PTR LIGHTMAP_HEIGHT[rip]
	add	eax, DWORD PTR 12[r12]
	mov	rdi, QWORD PTR lightFloats[rip]
	add	eax, ebx
	imul	eax, DWORD PTR LIGHTMAP_WIDTH[rip]
	add	eax, DWORD PTR 16[r12]
	add	eax, r13d
	mov	esi, DWORD PTR lightAmbientColor[rip]
	add	r13d, 1
	lea	r14d, [rax+rax*2]
	movsx	r14, r14d
	sal	r14, 2
	add	rdi, r14
	mov	rdx, rdi
	call	VectorAdd@PLT
	mov	rsi, QWORD PTR lightBytes[rip]
	mov	rdi, QWORD PTR lightFloats[rip]
	add	rsi, r14
	add	rdi, r14
	call	ColorToBytes@PLT
	cmp	DWORD PTR 8[r12], r13d
	jg	.L5
.L6:
	add	ebx, 1
	cmp	DWORD PTR 4[r12], ebx
	jg	.L4
.L3:
	add	rbp, 1
	cmp	DWORD PTR numDrawSurfaces[rip], ebp
	jg	.L7
.L1:
	pop	rbx
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	VS_StoreLightmap, .-VS_StoreLightmap
	.comm	numDrawSurfaces,4,4
	.comm	lsurfaceTest,8,8
	.comm	lightFloats,8,8
	.comm	lightBytes,8,8
	.comm	lightAmbientColor,4,4
	.comm	drawSurfaces,8,8
	.comm	LIGHTMAP_WIDTH,4,4
	.comm	LIGHTMAP_HEIGHT,4,4
	.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_soundv.c_VS_StoreLightmap.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"storing lightmaps...\012\000"
	.text
	.align	2
	.global	VS_StoreLightmap
	.syntax unified
	.arm
	.fpu softvfp
	.type	VS_StoreLightmap, %function
VS_StoreLightmap:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r0, .L17
	sub	sp, sp, #12
	bl	_printf
	bl	VS_FixLightmapEdges
	ldr	r3, .L17+4
	ldr	r3, [r3]
	cmp	r3, #0
	ble	.L1
	mov	r3, #0
	ldr	r10, .L17+8
	ldr	fp, .L17+12
	ldr	r7, .L17+16
	str	r3, [sp, #4]
.L7:
	ldr	r3, .L17+20
	ldr	r2, [sp, #4]
	ldr	r3, [r3]
	ldr	r3, [r3, r2, lsl #2]
	cmp	r3, #0
	beq	.L3
	ldr	r3, .L17+24
	ldr	r5, [r3]
	add	r3, r2, r2, lsl #2
	ldr	r2, [r5, r3, lsl #2]
	add	r5, r5, r3, lsl #2
	cmp	r2, #0
	blt	.L3
	ldr	r3, [r5, #4]
	cmp	r3, #0
	ble	.L3
	mov	r6, #0
	ldr	r2, [r5, #8]
	ldr	r8, .L17+28
.L4:
	cmp	r2, #0
	movgt	r9, #0
	ble	.L6
.L5:
	ldr	r1, [r10]
	ldr	r3, [r5, #12]
	ldr	r4, [r5]
	ldr	r2, [fp]
	mla	r4, r1, r4, r3
	ldr	r3, [r5, #16]
	add	r4, r4, r6
	mla	r4, r2, r4, r3
	ldr	r2, [r7]
	add	r4, r4, r9
	ldr	r3, .L17+32
	add	r4, r4, r4, lsl #1
	add	r2, r2, r4, lsl #2
	mov	r0, r2
	ldr	r1, [r3]
	bl	VectorAdd
	ldr	r1, [r8]
	ldr	r0, [r7]
	lsl	r4, r4, #2
	add	r1, r1, r4
	add	r0, r0, r4
	bl	ColorToBytes
	ldr	r2, [r5, #8]
	add	r9, r9, #1
	cmp	r2, r9
	bgt	.L5
	ldr	r3, [r5, #4]
.L6:
	add	r6, r6, #1
	cmp	r3, r6
	bgt	.L4
.L3:
	ldr	r3, .L17+4
	ldr	r2, [sp, #4]
	ldr	r3, [r3]
	add	r2, r2, #1
	cmp	r3, r2
	str	r2, [sp, #4]
	bgt	.L7
.L1:
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L18:
	.align	2
.L17:
	.word	.LC0
	.word	numDrawSurfaces
	.word	LIGHTMAP_HEIGHT
	.word	LIGHTMAP_WIDTH
	.word	lightFloats
	.word	lsurfaceTest
	.word	drawSurfaces
	.word	lightBytes
	.word	lightAmbientColor
	.size	VS_StoreLightmap, .-VS_StoreLightmap
	.comm	numDrawSurfaces,4,4
	.comm	lsurfaceTest,4,4
	.comm	lightFloats,4,4
	.comm	lightBytes,4,4
	.comm	lightAmbientColor,4,4
	.comm	drawSurfaces,4,4
	.comm	LIGHTMAP_WIDTH,4,4
	.comm	LIGHTMAP_HEIGHT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
