	.file	"extr_r_data.c_R_PrecacheLevel.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	R_PrecacheLevel
	.type	R_PrecacheLevel, @function
R_PrecacheLevel:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	push	r14
	push	r13
	push	r12
	push	rbx
	sub	rsp, 40
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	cmp	QWORD PTR demoplayback[rip], 0
	je	.L33
.L1:
	mov	rax, QWORD PTR -56[rbp]
	xor	rax, QWORD PTR fs:40
	jne	.L34
	lea	rsp, -40[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L33:
	.cfi_restore_state
	mov	edi, DWORD PTR numflats[rip]
	call	alloca@PLT
	mov	edx, DWORD PTR numflats[rip]
	xor	esi, esi
	mov	rdi, rax
	mov	r12, rax
	call	memset@PLT
	mov	r10d, DWORD PTR numsectors[rip]
	test	r10d, r10d
	jle	.L3
	xor	eax, eax
	.p2align 4,,10
	.p2align 3
.L4:
	mov	rcx, QWORD PTR sectors[rip]
	mov	rdx, rax
	add	rax, 1
	sal	rdx, 4
	mov	rcx, QWORD PTR [rcx+rdx]
	mov	BYTE PTR [r12+rcx], 1
	mov	rcx, QWORD PTR sectors[rip]
	mov	rdx, QWORD PTR 8[rcx+rdx]
	mov	BYTE PTR [r12+rdx], 1
	cmp	DWORD PTR numsectors[rip], eax
	jg	.L4
.L3:
	mov	r9d, DWORD PTR numflats[rip]
	mov	QWORD PTR flatmemory[rip], 0
	test	r9d, r9d
	jle	.L5
	xor	ebx, ebx
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L6:
	add	rbx, 1
	cmp	DWORD PTR numflats[rip], ebx
	jle	.L5
.L7:
	cmp	BYTE PTR [r12+rbx], 0
	je	.L6
	mov	edi, DWORD PTR firstflat[rip]
	mov	rax, QWORD PTR lumpinfo[rip]
	mov	esi, DWORD PTR PU_CACHE[rip]
	add	edi, ebx
	add	rbx, 1
	movsx	rdx, edi
	mov	rax, QWORD PTR [rax+rdx*8]
	add	QWORD PTR flatmemory[rip], rax
	call	W_CacheLumpNum@PLT
	cmp	DWORD PTR numflats[rip], ebx
	jg	.L7
.L5:
	mov	edi, DWORD PTR numtextures[rip]
	call	alloca@PLT
	mov	edx, DWORD PTR numtextures[rip]
	xor	esi, esi
	mov	rdi, rax
	mov	r13, rax
	call	memset@PLT
	mov	r8d, DWORD PTR numsides[rip]
	test	r8d, r8d
	jle	.L8
	xor	eax, eax
	xor	edx, edx
	.p2align 4,,10
	.p2align 3
.L9:
	mov	rcx, QWORD PTR sides[rip]
	add	edx, 1
	mov	rcx, QWORD PTR [rcx+rax]
	mov	BYTE PTR 0[r13+rcx], 1
	mov	rcx, QWORD PTR sides[rip]
	mov	rcx, QWORD PTR 8[rcx+rax]
	mov	BYTE PTR 0[r13+rcx], 1
	mov	rcx, QWORD PTR sides[rip]
	mov	rcx, QWORD PTR 16[rcx+rax]
	add	rax, 24
	mov	BYTE PTR 0[r13+rcx], 1
	cmp	DWORD PTR numsides[rip], edx
	jg	.L9
.L8:
	mov	rax, QWORD PTR skytexture[rip]
	mov	BYTE PTR 0[r13+rax], 1
	mov	edi, DWORD PTR numtextures[rip]
	mov	QWORD PTR texturememory[rip], 0
	test	edi, edi
	jle	.L10
	xor	r14d, r14d
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L11:
	add	r14, 1
	cmp	DWORD PTR numtextures[rip], r14d
	jle	.L10
.L13:
	cmp	BYTE PTR 0[r13+r14], 0
	je	.L11
	mov	rax, QWORD PTR textures[rip]
	mov	r12, QWORD PTR [rax+r14*8]
	mov	esi, DWORD PTR [r12]
	test	esi, esi
	jle	.L11
	xor	ebx, ebx
	.p2align 4,,10
	.p2align 3
.L12:
	mov	rax, QWORD PTR 8[r12]
	mov	esi, DWORD PTR PU_CACHE[rip]
	movsx	rdx, DWORD PTR [rax+rbx*4]
	mov	rax, QWORD PTR lumpinfo[rip]
	add	rbx, 1
	mov	rdi, rdx
	mov	rax, QWORD PTR [rax+rdx*8]
	add	QWORD PTR texturememory[rip], rax
	call	W_CacheLumpNum@PLT
	cmp	DWORD PTR [r12], ebx
	jg	.L12
	add	r14, 1
	cmp	DWORD PTR numtextures[rip], r14d
	jg	.L13
.L10:
	mov	edi, DWORD PTR numsprites[rip]
	call	alloca@PLT
	mov	edx, DWORD PTR numsprites[rip]
	xor	esi, esi
	mov	rdi, rax
	mov	QWORD PTR -72[rbp], rax
	call	memset@PLT
	mov	rax, QWORD PTR thinkercap[rip+8]
	lea	rcx, thinkercap[rip]
	cmp	rax, rcx
	je	.L14
	.p2align 4,,10
	.p2align 3
.L16:
	mov	rdx, QWORD PTR [rax]
	cmp	rdx, QWORD PTR P_MobjThinker[rip]
	jne	.L15
	mov	rbx, QWORD PTR -72[rbp]
	mov	BYTE PTR [rbx+rdx], 1
.L15:
	mov	rax, QWORD PTR 8[rax]
	cmp	rax, rcx
	jne	.L16
.L14:
	mov	ecx, DWORD PTR numsprites[rip]
	mov	QWORD PTR spritememory[rip], 0
	test	ecx, ecx
	jle	.L1
	xor	r12d, r12d
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L17:
	add	r12, 1
	cmp	DWORD PTR numsprites[rip], r12d
	jle	.L1
.L20:
	mov	rax, QWORD PTR -72[rbp]
	cmp	BYTE PTR [rax+r12], 0
	je	.L17
	mov	rax, QWORD PTR sprites[rip]
	mov	r13, r12
	sal	r13, 4
	add	rax, r13
	mov	edx, DWORD PTR [rax]
	test	edx, edx
	jle	.L17
	xor	ebx, ebx
	.p2align 4,,10
	.p2align 3
.L19:
	mov	rax, QWORD PTR 8[rax]
	xor	r15d, r15d
	lea	r14, [rax+rbx*8]
	.p2align 4,,10
	.p2align 3
.L18:
	mov	rax, QWORD PTR [r14]
	mov	edi, DWORD PTR firstspritelump[rip]
	mov	esi, DWORD PTR PU_CACHE[rip]
	add	edi, DWORD PTR [rax+r15]
	mov	rax, QWORD PTR lumpinfo[rip]
	add	r15, 4
	movsx	rdx, edi
	mov	rax, QWORD PTR [rax+rdx*8]
	add	QWORD PTR spritememory[rip], rax
	call	W_CacheLumpNum@PLT
	cmp	r15, 32
	jne	.L18
	mov	rax, QWORD PTR sprites[rip]
	add	rbx, 1
	add	rax, r13
	cmp	DWORD PTR [rax], ebx
	jg	.L19
	jmp	.L17
.L34:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	R_PrecacheLevel, .-R_PrecacheLevel
	.comm	thinkercap,16,16
	.comm	textures,8,8
	.comm	texturememory,8,8
	.comm	sprites,8,8
	.comm	spritememory,8,8
	.comm	skytexture,8,8
	.comm	sides,8,8
	.comm	sectors,8,8
	.comm	numtextures,4,4
	.comm	numsprites,4,4
	.comm	numsides,4,4
	.comm	numsectors,4,4
	.comm	numflats,4,4
	.comm	lumpinfo,8,8
	.comm	flatmemory,8,8
	.comm	firstspritelump,4,4
	.comm	firstflat,4,4
	.comm	demoplayback,8,8
	.comm	P_MobjThinker,8,8
	.comm	PU_CACHE,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_r_data.c_R_PrecacheLevel.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	R_PrecacheLevel
	.syntax unified
	.arm
	.fpu softvfp
	.type	R_PrecacheLevel, %function
R_PrecacheLevel:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	add	fp, sp, #32
	sub	sp, sp, #28
	ldr	r3, .L44
	ldr	r2, .L44+4
	ldr	r1, [r3]
	ldr	r2, [r2]
	str	r2, [fp, #-40]
	mov	r2,#0
	cmp	r1, #0
	beq	.L42
.L1:
	ldr	r3, .L44+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L43
	sub	sp, fp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L42:
	ldr	r6, .L44+8
	ldr	r8, [r6]
	add	r3, r8, #7
	bic	r3, r3, #7
	sub	sp, sp, r3
	mov	r4, sp
	mov	r2, r8
	mov	r0, r4
	bl	memset
	ldr	r3, .L44+12
	ldr	lr, [r3]
	cmp	lr, #0
	ble	.L3
	mov	r1, #1
	ldr	r3, .L44+16
	ldr	r3, [r3]
	add	lr, r3, lr, lsl #3
.L4:
	ldm	r3, {r0, r2}
	add	r3, r3, #8
	cmp	lr, r3
	strb	r1, [r4, r0]
	strb	r1, [r4, r2]
	bne	.L4
.L3:
	mov	r5, #0
	ldr	r7, .L44+20
	cmp	r8, r5
	str	r5, [r7]
	ble	.L5
	ldr	r10, .L44+24
	ldr	r9, .L44+28
	ldr	r8, .L44+32
	sub	r4, r4, #1
	b	.L7
.L6:
	ldr	r3, [r6]
	add	r5, r5, #1
	cmp	r3, r5
	ble	.L5
.L7:
	ldrb	r3, [r4, #1]!	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L6
	ldr	r0, [r10]
	ldr	r3, [r9]
	add	r0, r5, r0
	ldr	r3, [r3, r0, lsl #2]
	ldr	r2, [r7]
	ldr	r1, [r8]
	add	r3, r3, r2
	str	r3, [r7]
	bl	W_CacheLumpNum
	ldr	r3, [r6]
	add	r5, r5, #1
	cmp	r3, r5
	bgt	.L7
.L5:
	ldr	r3, .L44+36
	mov	r1, #0
	ldr	r5, [r3]
	add	r3, r5, #7
	bic	r3, r3, #7
	sub	sp, sp, r3
	mov	r6, sp
	mov	r2, r5
	mov	r0, r6
	bl	memset
	ldr	r3, .L44+40
	lsr	r2, r6, #3
	ldr	r4, [r3]
	cmp	r4, #0
	ble	.L8
	mov	r1, #1
	ldr	r3, .L44+44
	add	r4, r4, r4, lsl r1
	ldr	r3, [r3]
	add	r4, r3, r4, lsl #2
.L9:
	ldr	lr, [r3]
	ldr	ip, [r3, #4]
	ldr	r0, [r3, #8]
	add	r3, r3, #12
	cmp	r4, r3
	strb	r1, [r6, lr]
	strb	r1, [r6, ip]
	strb	r1, [r6, r0]
	bne	.L9
.L8:
	mov	r7, #0
	mov	r0, #1
	ldr	r3, .L44+48
	ldr	r9, .L44+52
	ldr	r1, [r3]
	cmp	r5, r7
	strb	r0, [r1, r2, lsl #3]
	str	r7, [r9]
	ble	.L10
	ldr	r10, .L44+28
	ldr	r8, .L44+32
	sub	r6, r6, #1
	b	.L13
.L11:
	ldr	r3, .L44+36
	add	r7, r7, #1
	ldr	r3, [r3]
	cmp	r3, r7
	ble	.L10
.L13:
	ldrb	r3, [r6, #1]!	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L11
	ldr	r3, .L44+56
	ldr	r3, [r3]
	ldr	r5, [r3, r7, lsl #2]
	ldr	r3, [r5]
	cmp	r3, #0
	ble	.L11
	mov	r4, #0
.L12:
	ldr	r2, [r5, #4]
	ldr	r3, [r10]
	ldr	r0, [r2, r4, lsl #2]
	ldr	r2, [r9]
	ldr	r3, [r3, r0, lsl #2]
	ldr	r1, [r8]
	add	r3, r3, r2
	str	r3, [r9]
	bl	W_CacheLumpNum
	ldr	r3, [r5]
	add	r4, r4, #1
	cmp	r3, r4
	bgt	.L12
	b	.L11
.L10:
	ldr	r3, .L44+60
	mov	r1, #0
	ldr	r6, [r3]
	add	r3, r6, #7
	bic	r3, r3, #7
	sub	sp, sp, r3
	mov	r4, sp
	mov	r2, r6
	mov	r0, r4
	bl	memset
	ldr	ip, .L44+64
	ldr	r3, [ip, #4]
	cmp	r3, ip
	beq	.L14
	mov	r2, #1
	ldr	r1, .L44+68
	ldr	r0, [r1]
.L16:
	ldr	r1, [r3]
	ldr	r3, [r3, #4]
	cmp	r1, r0
	strbeq	r2, [r4, r0]
	cmp	r3, ip
	bne	.L16
.L14:
	mov	r3, #0
	ldr	r5, .L44+72
	cmp	r6, r3
	str	r3, [r5]
	ble	.L1
	str	r3, [fp, #-52]
	sub	r3, r4, #1
	ldr	r10, .L44+28
	ldr	r7, .L44+32
	ldr	r9, .L44+76
	str	r3, [fp, #-56]
	b	.L20
.L17:
	ldr	r3, .L44+60
	ldr	r2, [fp, #-52]
	ldr	r3, [r3]
	add	r2, r2, #1
	cmp	r3, r2
	str	r2, [fp, #-52]
	ble	.L1
.L20:
	ldr	r2, [fp, #-56]
	ldrb	r3, [r2, #1]!	@ zero_extendqisi2
	cmp	r3, #0
	str	r2, [fp, #-56]
	beq	.L17
	ldr	r3, .L44+80
	ldr	r2, [fp, #-52]
	ldr	r3, [r3]
	lsl	r1, r2, #3
	str	r1, [fp, #-48]
	ldr	r1, [r3, r2, lsl #3]
	add	r2, r3, r2, lsl #3
	cmp	r1, #0
	ble	.L17
	mov	r4, #0
	mov	r3, r2
.L19:
	mov	r8, #0
	ldr	r3, [r3, #4]
	add	r6, r3, r4, lsl #2
.L18:
	ldr	r3, [r6]
	ldr	r2, [r9]
	ldr	r0, [r3, r8]
	ldr	r3, [r10]
	add	r0, r0, r2
	ldr	r3, [r3, r0, lsl #2]
	ldr	r2, [r5]
	ldr	r1, [r7]
	add	r3, r3, r2
	add	r8, r8, #4
	str	r3, [r5]
	bl	W_CacheLumpNum
	cmp	r8, #32
	bne	.L18
	ldr	r3, .L44+80
	ldr	r1, [fp, #-48]
	ldr	r3, [r3]
	add	r4, r4, #1
	ldr	r2, [r3, r1]
	add	r3, r3, r1
	cmp	r2, r4
	bgt	.L19
	b	.L17
.L43:
	bl	__stack_chk_fail
.L45:
	.align	2
.L44:
	.word	demoplayback
	.word	.LC0
	.word	numflats
	.word	numsectors
	.word	sectors
	.word	flatmemory
	.word	firstflat
	.word	lumpinfo
	.word	PU_CACHE
	.word	numtextures
	.word	numsides
	.word	sides
	.word	skytexture
	.word	texturememory
	.word	textures
	.word	numsprites
	.word	thinkercap
	.word	P_MobjThinker
	.word	spritememory
	.word	firstspritelump
	.word	sprites
	.size	R_PrecacheLevel, .-R_PrecacheLevel
	.comm	thinkercap,8,4
	.comm	textures,4,4
	.comm	texturememory,4,4
	.comm	sprites,4,4
	.comm	spritememory,4,4
	.comm	skytexture,4,4
	.comm	sides,4,4
	.comm	sectors,4,4
	.comm	numtextures,4,4
	.comm	numsprites,4,4
	.comm	numsides,4,4
	.comm	numsectors,4,4
	.comm	numflats,4,4
	.comm	lumpinfo,4,4
	.comm	flatmemory,4,4
	.comm	firstspritelump,4,4
	.comm	firstflat,4,4
	.comm	demoplayback,4,4
	.comm	P_MobjThinker,4,4
	.comm	PU_CACHE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
