	.file	"extr_be_aas_route.c_AAS_WriteRouteCache.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"maps/%s.rcd"
.LC1:
	.string	"Unable to open file: %s\n"
.LC2:
	.string	"\nroute cache written to %s\n"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC3:
	.string	"written %d bytes of routing cache\n"
	.text
	.p2align 4
	.globl	AAS_WriteRouteCache
	.type	AAS_WriteRouteCache, @function
AAS_WriteRouteCache:
.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, 120
	.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
	movsx	rax, DWORD PTR MAX_QPATH[rip]
	mov	rcx, rsp
	mov	QWORD PTR -152[rbp], rsp
	mov	r8, rax
	add	rax, 15
	mov	rdx, rax
	and	rax, -4096
	sub	rcx, rax
	and	rdx, -16
	mov	rax, rcx
	cmp	rsp, rax
	je	.L3
.L58:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L58
.L3:
	mov	rax, rdx
	and	eax, 4095
	sub	rsp, rax
	test	rax, rax
	jne	.L59
.L4:
	mov	edx, DWORD PTR aasworld[rip]
	mov	QWORD PTR -144[rbp], rsp
	test	edx, edx
	jle	.L28
	mov	rax, QWORD PTR aasworld[rip+24]
	lea	ecx, -1[rdx]
	xor	r12d, r12d
	lea	rdx, 8[rax]
	lea	rcx, [rdx+rcx*8]
	.p2align 4,,10
	.p2align 3
.L8:
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	je	.L6
	.p2align 4,,10
	.p2align 3
.L7:
	mov	rax, QWORD PTR 24[rax]
	add	r12d, 1
	test	rax, rax
	jne	.L7
.L6:
	mov	rax, rdx
	cmp	rcx, rdx
	je	.L5
	add	rdx, 8
	jmp	.L8
.L28:
	xor	r12d, r12d
.L5:
	mov	eax, DWORD PTR aasworld[rip+4]
	test	eax, eax
	jle	.L29
	mov	r9, QWORD PTR aasworld[rip+16]
	lea	edi, -1[rax]
	xor	esi, esi
	xor	ebx, ebx
	mov	r10, QWORD PTR aasworld[rip+8]
	.p2align 4,,10
	.p2align 3
.L14:
	mov	edx, DWORD PTR [r9+rsi*4]
	test	edx, edx
	jle	.L10
	mov	rax, QWORD PTR [r10+rsi*8]
	lea	ecx, -1[rdx]
	lea	rdx, 8[rax]
	lea	rcx, [rdx+rcx*8]
	.p2align 4,,10
	.p2align 3
.L13:
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	je	.L11
	.p2align 4,,10
	.p2align 3
.L12:
	mov	rax, QWORD PTR 24[rax]
	add	ebx, 1
	test	rax, rax
	jne	.L12
.L11:
	mov	rax, rdx
	cmp	rdx, rcx
	je	.L10
	add	rdx, 8
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L10:
	lea	rax, 1[rsi]
	cmp	rsi, rdi
	je	.L9
	mov	rsi, rax
	jmp	.L14
.L29:
	xor	ebx, ebx
.L9:
	mov	r15, QWORD PTR -144[rbp]
	mov	ecx, DWORD PTR aasworld[rip+40]
	mov	esi, r8d
	lea	rdx, .LC0[rip]
	mov	rdi, r15
	call	Com_sprintf@PLT
	lea	rsi, -116[rbp]
	mov	edx, DWORD PTR FS_WRITE[rip]
	mov	rdi, r15
	call	[QWORD PTR botimport[rip+24]]
	mov	esi, DWORD PTR -116[rbp]
	test	esi, esi
	je	.L60
	mov	eax, DWORD PTR RCID[rip]
	mov	rdi, QWORD PTR aasworld[rip+32]
	mov	DWORD PTR -60[rbp], eax
	mov	eax, DWORD PTR RCVERSION[rip]
	mov	DWORD PTR -64[rbp], eax
	mov	rax, QWORD PTR aasworld[rip]
	mov	QWORD PTR -112[rbp], rax
	mov	eax, DWORD PTR aasworld[rip]
	lea	esi, 0[0+rax*4]
	call	CRC_ProcessString@PLT
	mov	rdi, QWORD PTR aasworld[rip+16]
	mov	QWORD PTR -72[rbp], rax
	mov	eax, DWORD PTR aasworld[rip+4]
	lea	esi, 0[0+rax*4]
	call	CRC_ProcessString@PLT
	mov	DWORD PTR -104[rbp], r12d
	mov	edx, DWORD PTR -116[rbp]
	lea	rdi, -112[rbp]
	mov	QWORD PTR -80[rbp], rax
	mov	esi, 56
	mov	DWORD PTR -100[rbp], ebx
	call	[QWORD PTR botimport[rip+16]]
	mov	ecx, DWORD PTR aasworld[rip]
	test	ecx, ecx
	jle	.L31
	xor	ebx, ebx
	xor	r15d, r15d
	lea	r12, aasworld[rip]
.L20:
	mov	rax, QWORD PTR aasworld[rip+24]
	mov	r13, QWORD PTR [rax+rbx*8]
	test	r13, r13
	je	.L18
	.p2align 4,,10
	.p2align 3
.L19:
	mov	esi, DWORD PTR 16[r13]
	mov	rdi, r13
	mov	edx, DWORD PTR -116[rbp]
	call	[QWORD PTR botimport[rip+16]]
	add	r15d, DWORD PTR 16[r13]
	mov	r13, QWORD PTR 24[r13]
	test	r13, r13
	jne	.L19
.L18:
	add	rbx, 1
	cmp	DWORD PTR [r12], ebx
	jg	.L20
.L17:
	mov	edx, DWORD PTR aasworld[rip+4]
	test	edx, edx
	jle	.L21
	mov	QWORD PTR -136[rbp], 0
.L26:
	mov	rax, QWORD PTR aasworld[rip+16]
	mov	rcx, QWORD PTR -136[rbp]
	lea	r12, [rax+rcx*4]
	mov	eax, DWORD PTR [r12]
	test	eax, eax
	jle	.L22
	lea	r13, 0[0+rcx*8]
	xor	ebx, ebx
	.p2align 4,,10
	.p2align 3
.L25:
	mov	rax, QWORD PTR aasworld[rip+8]
	mov	rax, QWORD PTR [rax+r13]
	mov	r14, QWORD PTR [rax+rbx*8]
	test	r14, r14
	je	.L23
	.p2align 4,,10
	.p2align 3
.L24:
	mov	esi, DWORD PTR 16[r14]
	mov	rdi, r14
	mov	edx, DWORD PTR -116[rbp]
	call	[QWORD PTR botimport[rip+16]]
	add	r15d, DWORD PTR 16[r14]
	mov	r14, QWORD PTR 24[r14]
	test	r14, r14
	jne	.L24
.L23:
	add	rbx, 1
	cmp	DWORD PTR [r12], ebx
	jg	.L25
.L22:
	add	QWORD PTR -136[rbp], 1
	mov	rax, QWORD PTR -136[rbp]
	cmp	DWORD PTR aasworld[rip+4], eax
	jg	.L26
.L21:
	mov	edi, DWORD PTR -116[rbp]
	call	[QWORD PTR botimport[rip+8]]
	mov	edx, DWORD PTR -144[rbp]
	mov	edi, DWORD PTR PRT_MESSAGE[rip]
	lea	rsi, .LC2[rip]
	call	[QWORD PTR botimport[rip]]
	mov	edi, DWORD PTR PRT_MESSAGE[rip]
	mov	edx, r15d
	lea	rsi, .LC3[rip]
	call	[QWORD PTR botimport[rip]]
	mov	rsp, QWORD PTR -152[rbp]
.L1:
	mov	rax, QWORD PTR -56[rbp]
	xor	rax, QWORD PTR fs:40
	jne	.L61
	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
.L60:
	.cfi_restore_state
	mov	rsi, QWORD PTR -144[rbp]
	lea	rdi, .LC1[rip]
	call	AAS_Error@PLT
	mov	rsp, QWORD PTR -152[rbp]
	jmp	.L1
.L59:
	or	QWORD PTR -8[rsp+rax], 0
	jmp	.L4
.L31:
	xor	r15d, r15d
	jmp	.L17
.L61:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	AAS_WriteRouteCache, .-AAS_WriteRouteCache
	.comm	botimport,32,32
	.comm	aasworld,48,32
	.comm	RCVERSION,4,4
	.comm	RCID,4,4
	.comm	PRT_MESSAGE,4,4
	.comm	MAX_QPATH,4,4
	.comm	FS_WRITE,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_be_aas_route.c_AAS_WriteRouteCache.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"maps/%s.rcd\000"
	.align	2
.LC1:
	.ascii	"Unable to open file: %s\012\000"
	.align	2
.LC2:
	.ascii	"\012route cache written to %s\012\000"
	.align	2
.LC3:
	.ascii	"written %d bytes of routing cache\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	AAS_WriteRouteCache
	.syntax unified
	.arm
	.fpu softvfp
	.type	AAS_WriteRouteCache, %function
AAS_WriteRouteCache:
	@ args = 0, pretend = 0, frame = 64
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	add	fp, sp, #32
	sub	sp, sp, #68
	ldr	r3, .L54
	ldr	r7, .L54+4
	ldr	r1, [r3]
	ldr	r0, [r7]
	add	r3, r1, #7
	bic	r3, r3, #7
	str	sp, [fp, #-96]
	sub	sp, sp, r3
	ldr	r3, .L54+8
	cmp	r0, #0
	ldr	r3, [r3]
	str	r3, [fp, #-40]
	mov	r3,#0
	mov	r5, #0
	str	sp, [fp, #-92]
	ble	.L2
	ldr	r2, [r7, #16]
	sub	r2, r2, #4
	add	r0, r2, r0, lsl #2
.L5:
	ldr	r3, [r2, #4]!
	cmp	r3, #0
	beq	.L3
.L4:
	ldr	r3, [r3, #20]
	add	r5, r5, #1
	cmp	r3, #0
	bne	.L4
.L3:
	cmp	r2, r0
	bne	.L5
.L2:
	ldr	r6, [r7, #4]
	mov	r4, #0
	cmp	r6, #0
	ble	.L6
	ldr	ip, [r7, #12]
	ldr	lr, [r7, #8]
	sub	ip, ip, #4
	add	r6, ip, r6, lsl #2
.L11:
	ldr	r0, [ip, #4]!
	cmp	r0, #0
	ble	.L7
	ldr	r2, [lr]
	sub	r2, r2, #4
	add	r0, r2, r0, lsl #2
.L10:
	ldr	r3, [r2, #4]!
	cmp	r3, #0
	beq	.L8
.L9:
	ldr	r3, [r3, #20]
	add	r4, r4, #1
	cmp	r3, #0
	bne	.L9
.L8:
	cmp	r0, r2
	bne	.L10
.L7:
	cmp	ip, r6
	add	lr, lr, #4
	bne	.L11
.L6:
	ldr	r6, [fp, #-92]
	ldr	r3, [r7, #24]
	ldr	r2, .L54+12
	mov	r0, r6
	bl	Com_sprintf
	ldr	r10, .L54+16
	ldr	r2, .L54+20
	ldr	r3, [r10, #12]
	mov	r0, r6
	ldr	r2, [r2]
	sub	r1, fp, #84
	blx	r3
	ldr	r3, [fp, #-84]
	cmp	r3, #0
	beq	.L52
	ldr	r2, .L54+24
	ldr	r1, .L54+28
	ldr	r2, [r2]
	ldr	r3, [r7]
	ldr	r1, [r1]
	str	r2, [fp, #-44]
	ldr	r2, [r7, #4]
	str	r1, [fp, #-48]
	ldr	r0, [r7, #20]
	lsl	r1, r3, #2
	str	r2, [fp, #-76]
	str	r3, [fp, #-80]
	bl	CRC_ProcessString
	mov	r3, r0
	ldr	r1, [r7, #4]
	ldr	r0, [r7, #12]
	lsl	r1, r1, #2
	str	r3, [fp, #-52]
	bl	CRC_ProcessString
	ldr	r3, [r10, #8]
	str	r5, [fp, #-72]
	str	r0, [fp, #-56]
	mov	r1, #40
	ldr	r2, [fp, #-84]
	str	r4, [fp, #-68]
	sub	r0, fp, #80
	blx	r3
	ldr	r3, [r7]
	mov	r5, #0
	cmp	r3, #0
	ble	.L14
	mov	r6, r5
.L17:
	ldr	r3, [r7, #16]
	ldr	r4, [r3, r6, lsl #2]
	cmp	r4, #0
	beq	.L15
.L16:
	mov	r0, r4
	ldr	r3, [r10, #8]
	ldr	r1, [r4, #16]
	ldr	r2, [fp, #-84]
	blx	r3
	ldr	r3, [r4, #16]
	ldr	r4, [r4, #20]
	add	r5, r5, r3
	cmp	r4, #0
	bne	.L16
.L15:
	ldr	r3, [r7]
	add	r6, r6, #1
	cmp	r3, r6
	bgt	.L17
.L14:
	ldr	r3, [r7, #4]
	cmp	r3, #0
	ble	.L18
	mov	r3, #0
	str	r3, [fp, #-88]
.L23:
	ldr	r2, [fp, #-88]
	ldr	r8, [r7, #12]
	lsl	r9, r2, #2
	ldr	r3, [r8, r2, lsl #2]
	add	r8, r8, r2, lsl #2
	cmp	r3, #0
	ble	.L19
	mov	r6, #0
.L22:
	ldr	r2, [r7, #8]
	ldr	r2, [r2, r9]
	ldr	r4, [r2, r6, lsl #2]
	cmp	r4, #0
	beq	.L20
.L21:
	mov	r0, r4
	ldr	r3, [r10, #8]
	ldr	r1, [r4, #16]
	ldr	r2, [fp, #-84]
	blx	r3
	ldr	r3, [r4, #16]
	ldr	r4, [r4, #20]
	add	r5, r5, r3
	cmp	r4, #0
	bne	.L21
	ldr	r3, [r8]
.L20:
	add	r6, r6, #1
	cmp	r3, r6
	bgt	.L22
.L19:
	ldr	r2, [fp, #-88]
	ldr	r3, [r7, #4]
	add	r2, r2, #1
	cmp	r3, r2
	str	r2, [fp, #-88]
	bgt	.L23
.L18:
	ldr	r4, .L54+32
	ldr	r3, [r10, #4]
	ldr	r0, [fp, #-84]
	blx	r3
	ldr	r2, [fp, #-92]
	ldr	r3, [r10]
	ldr	r1, .L54+36
	ldr	r0, [r4]
	blx	r3
	mov	r2, r5
	ldr	r0, [r4]
	ldr	r3, [r10]
	ldr	r1, .L54+40
	blx	r3
	ldr	sp, [fp, #-96]
.L1:
	ldr	r3, .L54+8
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L53
	sub	sp, fp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L52:
	ldr	r1, [fp, #-92]
	ldr	r0, .L54+44
	bl	AAS_Error
	ldr	sp, [fp, #-96]
	b	.L1
.L53:
	bl	__stack_chk_fail
.L55:
	.align	2
.L54:
	.word	MAX_QPATH
	.word	aasworld
	.word	.LC4
	.word	.LC0
	.word	botimport
	.word	FS_WRITE
	.word	RCID
	.word	RCVERSION
	.word	PRT_MESSAGE
	.word	.LC2
	.word	.LC3
	.word	.LC1
	.size	AAS_WriteRouteCache, .-AAS_WriteRouteCache
	.comm	botimport,16,4
	.comm	aasworld,28,4
	.comm	RCVERSION,4,4
	.comm	RCID,4,4
	.comm	PRT_MESSAGE,4,4
	.comm	MAX_QPATH,4,4
	.comm	FS_WRITE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
