	.file	"extr_map_q2.c_Q2_ParseBrush.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"nummapbrushes == MAX_MAPFILE_BRUSHES"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"}"
.LC2:
	.string	"MAX_MAPFILE_BRUSHSIDES"
.LC3:
	.string	"("
.LC4:
	.string	")"
	.section	.rodata.str1.8
	.align 8
.LC5:
	.string	"Entity %i, Brush %i: plane with no normal\n"
	.align 8
.LC6:
	.string	"Entity %i, Brush %i: duplicate plane\n"
	.align 8
.LC7:
	.string	"Entity %i, Brush %i: mirrored plane\n"
	.align 8
.LC8:
	.string	"Entity %i, Brush %i: origin brushes not allowed in world"
	.section	.rodata.str1.1
.LC10:
	.string	"%i %i %i"
.LC11:
	.string	"origin"
	.text
	.p2align 4
	.globl	Q2_ParseBrush
	.type	Q2_ParseBrush, @function
Q2_ParseBrush:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdi
	sub	rsp, 200
	.cfi_def_cfa_offset 256
	mov	QWORD PTR 24[rsp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 184[rsp], rax
	xor	eax, eax
	mov	rax, QWORD PTR nummapbrushes[rip]
	cmp	rax, QWORD PTR MAX_MAPFILE_BRUSHES[rip]
	jnb	.L67
.L2:
	mov	rdx, QWORD PTR mapbrushes[rip]
	lea	rcx, [rax+rax*4]
	lea	r12, 40[rsp]
	lea	r14, [rdx+rcx*8]
	mov	rdx, QWORD PTR nummapbrushsides[rip]
	lea	rcx, [rdx+rdx*4]
	mov	rdx, QWORD PTR brushsides[rip]
	lea	rdx, [rdx+rcx*4]
	mov	ecx, DWORD PTR num_entities[rip]
	mov	QWORD PTR 32[r14], rdx
	lea	edx, -1[rcx]
	mov	rcx, QWORD PTR 24[rsp]
	mov	DWORD PTR [r14], edx
	sub	rax, QWORD PTR 8[rcx]
	mov	DWORD PTR 4[r14], -1
	mov	QWORD PTR 24[r14], rax
	.p2align 4,,10
	.p2align 3
.L3:
	mov	rsi, r12
	mov	rdi, rbx
	call	PS_ReadToken@PLT
	test	eax, eax
	je	.L4
.L72:
	mov	edi, DWORD PTR 44[rsp]
	lea	rsi, .LC1[rip]
	call	strcmp@PLT
	test	eax, eax
	je	.L4
	mov	rax, QWORD PTR nummapbrushsides[rip]
	cmp	rax, QWORD PTR MAX_MAPFILE_BRUSHSIDES[rip]
	jnb	.L68
.L5:
	lea	rdx, [rax+rax*4]
	mov	rax, QWORD PTR brushsides[rip]
	lea	r13, [rax+rdx*4]
	lea	rax, 96[rsp]
	mov	QWORD PTR 16[rsp], rax
	mov	rbp, rax
	lea	rax, 132[rsp]
	mov	QWORD PTR 8[rsp], rax
.L6:
	xor	r15d, r15d
.L7:
	mov	rsi, r12
	mov	rdi, rbx
	call	PS_ExpectAnyToken@PLT
	mov	edi, DWORD PTR 44[rsp]
	call	atof@PLT
	mov	DWORD PTR 0[rbp+r15*4], eax
	add	r15, 1
	cmp	r15, 3
	jne	.L7
	lea	rsi, .LC4[rip]
	mov	rdi, rbx
	add	rbp, 12
	call	PS_ExpectTokenString@PLT
	cmp	QWORD PTR 8[rsp], rbp
	je	.L69
	lea	rsi, .LC3[rip]
	mov	rdi, rbx
	call	PS_ExpectTokenString@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L69:
	mov	rsi, r12
	mov	rdi, rbx
	call	PS_ExpectAnyToken@PLT
	mov	esi, DWORD PTR 44[rsp]
	mov	edi, DWORD PTR 56[rsp]
	call	strcpy@PLT
	mov	rsi, r12
	mov	rdi, rbx
	call	PS_ExpectAnyToken@PLT
	mov	edi, DWORD PTR 44[rsp]
	mov	rbp, QWORD PTR 80[rsp]
	call	atol@PLT
	mov	rsi, r12
	mov	rdi, rbx
	mov	QWORD PTR 0[rbp], rax
	call	PS_ExpectAnyToken@PLT
	mov	edi, DWORD PTR 44[rsp]
	mov	rbp, QWORD PTR 80[rsp]
	call	atol@PLT
	mov	rsi, r12
	mov	rdi, rbx
	mov	QWORD PTR 8[rbp], rax
	call	PS_ExpectAnyToken@PLT
	mov	edi, DWORD PTR 44[rsp]
	call	atol@PLT
	mov	rsi, r12
	mov	rdi, rbx
	mov	QWORD PTR 72[rsp], rax
	call	PS_ExpectAnyToken@PLT
	mov	edi, DWORD PTR 44[rsp]
	mov	rbp, QWORD PTR 64[rsp]
	call	atof@PLT
	mov	rsi, r12
	mov	rdi, rbx
	mov	QWORD PTR 0[rbp], rax
	call	PS_ExpectAnyToken@PLT
	mov	edi, DWORD PTR 44[rsp]
	mov	rbp, QWORD PTR 64[rsp]
	call	atof@PLT
	mov	edi, DWORD PTR 56[rsp]
	mov	QWORD PTR 8[rbp], rax
	call	FindMiptex@PLT
	mov	esi, DWORD PTR TT_NUMBER[rip]
	mov	rdi, rbx
	cdqe
	lea	rdx, [rax+rax*2]
	mov	rax, QWORD PTR textureref[rip]
	lea	rax, [rax+rdx*4]
	mov	edx, DWORD PTR [rax]
	mov	ecx, DWORD PTR 4[rax]
	mov	eax, DWORD PTR 8[rax]
	mov	DWORD PTR 52[rsp], ecx
	mov	rcx, r12
	mov	DWORD PTR 0[r13], eax
	mov	DWORD PTR 4[r13], edx
	mov	DWORD PTR 48[rsp], edx
	xor	edx, edx
	call	PS_CheckTokenType@PLT
	test	rax, rax
	jne	.L70
.L9:
	mov	esi, DWORD PTR 4[r13]
	mov	edx, DWORD PTR SURF_TRANS33[rip]
	or	edx, DWORD PTR SURF_TRANS66[rip]
	mov	eax, DWORD PTR 0[r13]
	test	edx, esi
	je	.L10
	or	eax, DWORD PTR CONTENTS_DETAIL[rip]
	mov	DWORD PTR 0[r13], eax
.L10:
	mov	edx, DWORD PTR CONTENTS_PLAYERCLIP[rip]
	mov	ecx, DWORD PTR CONTENTS_MONSTERCLIP[rip]
	or	ecx, edx
	test	ecx, eax
	je	.L11
	or	eax, DWORD PTR CONTENTS_DETAIL[rip]
	mov	DWORD PTR 0[r13], eax
.L11:
	cmp	QWORD PTR fulldetail[rip], 0
	je	.L12
	mov	edx, DWORD PTR CONTENTS_DETAIL[rip]
	not	edx
	and	eax, edx
	mov	DWORD PTR 0[r13], eax
.L12:
	mov	edx, DWORD PTR LAST_VISIBLE_CONTENTS[rip]
	sub	edx, 1
	or	edx, ecx
	or	edx, DWORD PTR CONTENTS_MIST[rip]
	test	edx, eax
	jne	.L13
	or	eax, DWORD PTR CONTENTS_SOLID[rip]
	mov	DWORD PTR 0[r13], eax
.L13:
	mov	eax, DWORD PTR SURF_HINT[rip]
	or	eax, DWORD PTR SURF_SKIP[rip]
	test	eax, esi
	je	.L14
	mov	eax, DWORD PTR CONTENTS_DETAIL[rip]
	mov	DWORD PTR 0[r13], 0
	not	eax
	and	esi, eax
	mov	DWORD PTR 4[r13], esi
.L14:
	mov	rdi, QWORD PTR 16[rsp]
	lea	rdx, 120[rsp]
	lea	rsi, 108[rsp]
	call	PlaneFromPoints@PLT
	movsx	r13, eax
	cmp	r13d, -1
	je	.L15
	movsx	rcx, DWORD PTR 8[r14]
	xor	ebp, ebp
	test	ecx, ecx
	jle	.L17
	mov	rdi, QWORD PTR 32[r14]
	mov	esi, r13d
	xor	ebp, ebp
	xor	esi, 1
	lea	rdx, 8[rdi]
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L19:
	cmp	eax, esi
	je	.L71
	add	ebp, 1
	add	rdx, 20
	cmp	ecx, ebp
	je	.L22
.L21:
	mov	eax, DWORD PTR [rdx]
	cmp	eax, r13d
	jne	.L19
	mov	rdx, QWORD PTR 24[r14]
	mov	esi, DWORD PTR [r14]
	lea	rdi, .LC6[rip]
	call	Log_Print@PLT
	movsx	rcx, DWORD PTR 8[r14]
.L17:
	cmp	ebp, ecx
	jne	.L3
	mov	rdi, QWORD PTR 32[r14]
	.p2align 4,,10
	.p2align 3
.L22:
	lea	rax, [rcx+rcx*4]
	mov	edx, DWORD PTR vec3_origin[rip]
	lea	rsi, 48[rsp]
	lea	rbp, [rdi+rax*4]
	mov	rax, QWORD PTR mapplanes[rip]
	mov	DWORD PTR 8[rbp], r13d
	lea	rdi, [rax+r13*4]
	call	TexinfoForBrushTexture@PLT
	mov	rdx, QWORD PTR nummapbrushsides[rip]
	mov	rsi, r12
	mov	rdi, rbx
	mov	rcx, QWORD PTR side_brushtextures[rip]
	movdqa	xmm1, XMMWORD PTR 48[rsp]
	mov	DWORD PTR 12[rbp], eax
	lea	rax, [rdx+rdx*4]
	add	rdx, 1
	lea	rax, [rcx+rax*8]
	movups	XMMWORD PTR [rax], xmm1
	movdqa	xmm2, XMMWORD PTR 64[rsp]
	mov	QWORD PTR nummapbrushsides[rip], rdx
	movups	XMMWORD PTR 16[rax], xmm2
	mov	rcx, QWORD PTR 80[rsp]
	mov	QWORD PTR 32[rax], rcx
	add	DWORD PTR 8[r14], 1
	call	PS_ReadToken@PLT
	test	eax, eax
	jne	.L72
.L4:
	mov	rdi, r14
	call	Q2_BrushContents@PLT
	cmp	QWORD PTR nodetail[rip], 0
	mov	DWORD PTR 12[r14], eax
	je	.L23
	test	DWORD PTR CONTENTS_DETAIL[rip], eax
	jne	.L65
.L23:
	cmp	QWORD PTR nowater[rip], 0
	je	.L25
	mov	edx, DWORD PTR CONTENTS_LAVA[rip]
	or	edx, DWORD PTR CONTENTS_SLIME[rip]
	or	edx, DWORD PTR CONTENTS_WATER[rip]
	test	edx, eax
	jne	.L65
.L25:
	mov	rdi, r14
	call	MakeBrushWindings@PLT
	mov	esi, DWORD PTR 12[r14]
	mov	eax, DWORD PTR CONTENTS_PLAYERCLIP[rip]
	or	eax, DWORD PTR CONTENTS_MONSTERCLIP[rip]
	test	eax, esi
	je	.L29
	mov	edx, DWORD PTR 8[r14]
	add	DWORD PTR c_clipbrushes[rip], 1
	test	edx, edx
	jle	.L29
	mov	rdi, QWORD PTR 32[r14]
	sub	edx, 1
	mov	ecx, DWORD PTR TEXINFO_NODE[rip]
	lea	rdx, [rdx+rdx*4]
	lea	rax, 12[rdi]
	lea	rdx, 32[rdi+rdx*4]
	.p2align 4,,10
	.p2align 3
.L30:
	mov	DWORD PTR [rax], ecx
	add	rax, 20
	cmp	rdx, rax
	jne	.L30
.L29:
	test	DWORD PTR CONTENTS_ORIGIN[rip], esi
	je	.L73
	cmp	DWORD PTR num_entities[rip], 1
	je	.L74
	xor	ebp, ebp
	mov	esi, DWORD PTR 16[r14]
	mov	edi, DWORD PTR 20[r14]
	lea	r12, 144[rsp]
	mov	rdx, rbp
	call	VectorAdd@PLT
	movsd	xmm0, QWORD PTR .LC9[rip]
	mov	rsi, rbp
	mov	rdi, rbp
	call	VectorScale@PLT
	mov	ecx, DWORD PTR 8[rbp]
	mov	edx, DWORD PTR 0[rbp]
	mov	rdi, r12
	mov	r8d, DWORD PTR ds:16
	lea	rsi, .LC10[rip]
	call	sprintf@PLT
	movsx	rdx, DWORD PTR [r14]
	mov	rax, QWORD PTR entities[rip]
	lea	rsi, .LC11[rip]
	lea	rdi, [rax+rdx*4]
	mov	rdx, r12
	call	SetKeyValue@PLT
	movsx	rdx, DWORD PTR [r14]
	mov	rax, QWORD PTR entities[rip]
	mov	rdi, rbp
	mov	esi, DWORD PTR [rax+rdx*4]
	call	VectorCopy@PLT
.L65:
	mov	DWORD PTR 8[r14], 0
.L1:
	mov	rax, QWORD PTR 184[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L75
	add	rsp, 200
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L70:
	.cfi_restore_state
	mov	eax, DWORD PTR 40[rsp]
	mov	esi, DWORD PTR TT_NUMBER[rip]
	mov	rcx, r12
	xor	edx, edx
	mov	rdi, rbx
	mov	DWORD PTR 0[r13], eax
	call	PS_ExpectTokenType@PLT
	mov	eax, DWORD PTR 40[rsp]
	mov	rcx, r12
	xor	edx, edx
	mov	esi, DWORD PTR TT_NUMBER[rip]
	mov	rdi, rbx
	mov	DWORD PTR 4[r13], eax
	mov	DWORD PTR 48[rsp], eax
	call	PS_ExpectTokenType@PLT
	mov	eax, DWORD PTR 40[rsp]
	mov	DWORD PTR 52[rsp], eax
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L68:
	lea	rdi, .LC2[rip]
	xor	eax, eax
	call	Error@PLT
	mov	rax, QWORD PTR nummapbrushsides[rip]
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L15:
	mov	rdx, QWORD PTR 24[r14]
	mov	esi, DWORD PTR [r14]
	lea	rdi, .LC5[rip]
	call	Log_Print@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L71:
	mov	rdx, QWORD PTR 24[r14]
	mov	esi, DWORD PTR [r14]
	lea	rdi, .LC7[rip]
	call	Log_Print@PLT
	movsx	rcx, DWORD PTR 8[r14]
	jmp	.L17
.L73:
	mov	rdi, r14
	call	AddBrushBevels@PLT
	mov	rax, QWORD PTR 24[rsp]
	add	QWORD PTR nummapbrushes[rip], 1
	add	DWORD PTR [rax], 1
	jmp	.L1
.L67:
	lea	rdi, .LC0[rip]
	xor	eax, eax
	call	Error@PLT
	mov	rax, QWORD PTR nummapbrushes[rip]
	jmp	.L2
.L74:
	mov	rdx, QWORD PTR 24[r14]
	mov	esi, DWORD PTR [r14]
	lea	rdi, .LC8[rip]
	xor	eax, eax
	call	Error@PLT
	jmp	.L1
.L75:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	Q2_ParseBrush, .-Q2_ParseBrush
	.comm	vec3_origin,4,4
	.comm	textureref,8,8
	.comm	side_brushtextures,8,8
	.comm	nummapbrushsides,8,8
	.comm	nummapbrushes,8,8
	.comm	num_entities,4,4
	.comm	nowater,8,8
	.comm	nodetail,8,8
	.comm	mapplanes,8,8
	.comm	mapbrushes,8,8
	.comm	fulldetail,8,8
	.comm	entities,8,8
	.comm	create_aas,8,8
	.comm	c_squattbrushes,4,4
	.comm	c_clipbrushes,4,4
	.comm	brushsides,8,8
	.comm	TT_NUMBER,4,4
	.comm	TEXINFO_NODE,4,4
	.comm	SURF_TRANS66,4,4
	.comm	SURF_TRANS33,4,4
	.comm	SURF_SKIP,4,4
	.comm	SURF_HINT,4,4
	.comm	SFL_TEXTURED,4,4
	.comm	MAX_MAPFILE_BRUSHSIDES,8,8
	.comm	MAX_MAPFILE_BRUSHES,8,8
	.comm	LAST_VISIBLE_CONTENTS,4,4
	.comm	CONTENTS_WATER,4,4
	.comm	CONTENTS_SOLID,4,4
	.comm	CONTENTS_SLIME,4,4
	.comm	CONTENTS_PLAYERCLIP,4,4
	.comm	CONTENTS_ORIGIN,4,4
	.comm	CONTENTS_MONSTERCLIP,4,4
	.comm	CONTENTS_MIST,4,4
	.comm	CONTENTS_LAVA,4,4
	.comm	CONTENTS_DETAIL,4,4
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC9:
	.long	0
	.long	1071644672
	.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_map_q2.c_Q2_ParseBrush.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"nummapbrushes == MAX_MAPFILE_BRUSHES\000"
	.align	2
.LC1:
	.ascii	"}\000"
	.align	2
.LC2:
	.ascii	"MAX_MAPFILE_BRUSHSIDES\000"
	.align	2
.LC3:
	.ascii	"(\000"
	.align	2
.LC4:
	.ascii	")\000"
	.align	2
.LC5:
	.ascii	"Entity %i, Brush %i: plane with no normal\012\000"
	.align	2
.LC6:
	.ascii	"Entity %i, Brush %i: duplicate plane\012\000"
	.align	2
.LC7:
	.ascii	"Entity %i, Brush %i: mirrored plane\012\000"
	.align	2
.LC8:
	.ascii	"Entity %i, Brush %i: origin brushes not allowed in "
	.ascii	"world\000"
	.align	2
.LC9:
	.ascii	"%i %i %i\000"
	.align	2
.LC10:
	.ascii	"origin\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC11:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	Q2_ParseBrush
	.syntax unified
	.arm
	.fpu softvfp
	.type	Q2_ParseBrush, %function
Q2_ParseBrush:
	@ args = 0, pretend = 0, frame = 120
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r2, .L83
	ldr	r3, .L83+4
	ldr	r2, [r2]
	ldr	r3, [r3]
	sub	sp, sp, #132
	cmp	r3, r2
	ldr	r2, .L83+8
	str	r1, [sp, #12]
	mov	r4, r0
	ldr	r2, [r2]
	str	r2, [sp, #124]
	mov	r2,#0
	bcs	.L75
.L2:
	mvn	r0, #0
	ldr	r1, .L83+12
	ldr	ip, .L83+16
	ldr	r5, [r1]
	ldr	r2, .L83+20
	ldr	r1, .L83+24
	ldr	lr, [ip]
	ldr	r2, [r2]
	ldr	ip, [r1]
	ldr	r1, [sp, #12]
	add	r2, r2, r2, lsl #2
	ldr	r1, [r1, #4]
	add	r8, r5, r3, lsl #5
	add	lr, lr, r2, lsl #2
	add	ip, ip, r0
	sub	r2, r3, r1
	str	lr, [r8, #28]
	ldr	fp, .L83+28
	str	ip, [r5, r3, lsl #5]
	lsl	r3, r3, #5
	str	r5, [sp, #20]
	str	r2, [r8, #24]
	str	r3, [sp, #16]
	str	r0, [r8, #4]
.L3:
	mov	r0, r4
	add	r1, sp, #24
	bl	PS_ReadToken
	cmp	r0, #0
	beq	.L4
	ldr	r1, .L83+32
	ldr	r0, [sp, #28]
	bl	strcmp
	cmp	r0, #0
	beq	.L4
	ldr	r3, .L83+20
	ldr	r6, [r3]
	ldr	r3, .L83+36
	ldr	r3, [r3]
	cmp	r6, r3
	bcs	.L76
.L5:
	ldr	r3, .L83+16
	add	r6, r6, r6, lsl #2
	ldr	r7, [r3]
	add	r5, sp, #56
	add	r3, r7, r6, lsl #2
	str	r3, [sp, #8]
.L6:
	mov	r10, r5
	mov	r9, #0
.L7:
	add	r1, sp, #24
	mov	r0, r4
	bl	PS_ExpectAnyToken
	ldr	r0, [sp, #28]
	bl	atof
	add	r9, r9, #1
	cmp	r9, #3
	str	r0, [r10], #4
	bne	.L7
	mov	r1, fp
	mov	r0, r4
	bl	PS_ExpectTokenString
	add	r5, r5, #12
	add	r3, sp, #92
	cmp	r3, r5
	beq	.L77
	mov	r0, r4
	ldr	r1, .L83+40
	bl	PS_ExpectTokenString
	b	.L6
.L77:
	add	r1, sp, #24
	mov	r0, r4
	bl	PS_ExpectAnyToken
	ldr	r1, [sp, #28]
	ldr	r0, [sp, #40]
	bl	strcpy
	add	r1, sp, #24
	mov	r0, r4
	bl	PS_ExpectAnyToken
	ldr	r0, [sp, #28]
	ldr	r5, [sp, #52]
	bl	atol
	add	r1, sp, #24
	str	r0, [r5]
	mov	r0, r4
	bl	PS_ExpectAnyToken
	ldr	r0, [sp, #28]
	ldr	r5, [sp, #52]
	bl	atol
	add	r1, sp, #24
	str	r0, [r5, #4]
	mov	r0, r4
	bl	PS_ExpectAnyToken
	ldr	r0, [sp, #28]
	bl	atol
	mov	r3, r0
	add	r1, sp, #24
	mov	r0, r4
	str	r3, [sp, #48]
	bl	PS_ExpectAnyToken
	ldr	r0, [sp, #28]
	ldr	r5, [sp, #44]
	bl	atof
	add	r1, sp, #24
	str	r0, [r5]
	mov	r0, r4
	bl	PS_ExpectAnyToken
	ldr	r0, [sp, #28]
	ldr	r5, [sp, #44]
	bl	atof
	mov	r3, r0
	ldr	r0, [sp, #40]
	str	r3, [r5, #4]
	bl	FindMiptex
	ldr	r3, .L83+44
	add	r0, r0, r0, lsl #1
	ldr	r2, [r3]
	ldr	r5, .L83+48
	add	r3, r2, r0, lsl #2
	ldr	ip, [r2, r0, lsl #2]
	ldmib	r3, {r2, r3}
	str	r2, [sp, #36]
	ldr	r2, [sp, #8]
	ldr	r1, [r5]
	mov	r0, r4
	str	r3, [r7, r6, lsl #2]
	str	ip, [r2, #4]
	add	r3, sp, #24
	mov	r2, #0
	str	ip, [sp, #32]
	bl	PS_CheckTokenType
	cmp	r0, #0
	bne	.L78
.L9:
	ldr	r3, .L83+52
	ldr	r2, .L83+56
	ldr	r1, [sp, #8]
	ldr	r2, [r2]
	ldr	r3, [r3]
	ldr	r0, [r1, #4]
	orr	r3, r3, r2
	tst	r3, r0
	ldrne	r3, .L83+60
	ldr	r2, [r7, r6, lsl #2]
	ldrne	r3, [r3]
	ldr	r1, .L83+64
	orrne	r2, r2, r3
	ldr	r3, .L83+68
	ldr	r1, [r1]
	ldr	r3, [r3]
	strne	r2, [r7, r6, lsl #2]
	orr	r1, r1, r3
	tst	r1, r2
	ldrne	r3, .L83+60
	ldr	ip, .L83+72
	ldrne	r3, [r3]
	ldr	ip, [ip]
	orrne	r2, r2, r3
	ldr	r3, .L83+76
	strne	r2, [r7, r6, lsl #2]
	ldr	r3, [r3]
	cmp	r3, #0
	ldrne	r3, .L83+60
	ldrne	r3, [r3]
	bicne	r2, r2, r3
	ldr	r3, .L83+80
	strne	r2, [r7, r6, lsl #2]
	ldr	r3, [r3]
	sub	r3, r3, #1
	orr	r3, r3, r1
	orr	r3, r3, ip
	tst	r3, r2
	ldreq	r3, .L83+84
	ldreq	r3, [r3]
	orreq	r2, r3, r2
	streq	r2, [r7, r6, lsl #2]
	ldr	r3, .L83+88
	ldr	r2, .L83+92
	ldr	r3, [r3]
	ldr	r2, [r2]
	orr	r3, r3, r2
	tst	r3, r0
	beq	.L14
	mov	r2, #0
	ldr	r3, .L83+60
	str	r2, [r7, r6, lsl #2]
	ldr	r3, [r3]
	bic	r0, r0, r3
	ldr	r3, [sp, #8]
	str	r0, [r3, #4]
.L14:
	add	r0, sp, #56
	add	r2, sp, #80
	add	r1, sp, #68
	bl	PlaneFromPoints
	cmn	r0, #1
	mov	r6, r0
	beq	.L15
	ldr	r1, [r8, #8]
	cmp	r1, #0
	movle	r5, #0
	ble	.L17
	ldr	ip, [r8, #28]
	mov	r5, #0
	mov	r2, ip
	eor	r0, r0, #1
	b	.L21
.L19:
	cmp	r3, r0
	beq	.L79
	add	r5, r5, #1
	cmp	r1, r5
	add	r2, r2, #20
	beq	.L22
.L21:
	ldr	r3, [r2, #8]
	cmp	r3, r6
	bne	.L19
	ldr	r1, [r8]
	ldr	r2, [r8, #24]
	ldr	r0, .L83+96
	bl	Log_Print
	ldr	r1, [r8, #8]
.L17:
	cmp	r5, r1
	bne	.L3
	ldr	ip, [r8, #28]
.L22:
	ldr	r3, .L83+100
	add	r1, r1, r1, lsl #2
	ldr	r0, [r3]
	ldr	r3, .L83+104
	add	r5, ip, r1, lsl #2
	ldr	r2, [r3]
	str	r6, [r5, #8]
	add	r0, r0, r6, lsl #2
	add	r1, sp, #32
	bl	TexinfoForBrushTexture
	ldr	r7, .L83+20
	ldr	r3, .L83+108
	ldr	r6, [r7]
	ldr	lr, [r3]
	add	r3, r6, r6, lsl #1
	add	lr, lr, r3, lsl #3
	add	ip, sp, #32
	str	r0, [r5, #12]
	ldmia	ip!, {r0, r1, r2, r3}
	stmia	lr!, {r0, r1, r2, r3}
	ldr	r3, [r8, #8]
	add	r6, r6, #1
	add	r3, r3, #1
	ldm	ip, {r0, r1}
	str	r6, [r7]
	stm	lr, {r0, r1}
	str	r3, [r8, #8]
	b	.L3
.L78:
	ldr	r2, [sp, #24]
	ldr	r1, [r5]
	add	r3, sp, #24
	str	r2, [r7, r6, lsl #2]
	mov	r0, r4
	mov	r2, #0
	bl	PS_ExpectTokenType
	ldr	ip, [sp, #24]
	ldr	r3, [sp, #8]
	mov	r2, #0
	str	ip, [r3, #4]
	mov	r0, r4
	add	r3, sp, #24
	ldr	r1, [r5]
	str	ip, [sp, #32]
	bl	PS_ExpectTokenType
	ldr	r3, [sp, #24]
	str	r3, [sp, #36]
	b	.L9
.L76:
	ldr	r0, .L83+112
	bl	Error
	ldr	r3, .L83+20
	ldr	r6, [r3]
	b	.L5
.L15:
	ldr	r2, [r8, #24]
	ldr	r1, [r8]
	ldr	r0, .L83+116
	bl	Log_Print
	b	.L3
.L79:
	ldr	r1, [r8]
	ldr	r2, [r8, #24]
	ldr	r0, .L83+120
	bl	Log_Print
	ldr	r1, [r8, #8]
	b	.L17
.L4:
	mov	r0, r8
	bl	Q2_BrushContents
	ldr	r3, .L83+124
	str	r0, [r8, #12]
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L23
	ldr	r3, .L83+60
	ldr	r3, [r3]
	tst	r0, r3
	bne	.L73
.L23:
	ldr	r3, .L83+128
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L25
	ldr	r3, .L83+132
	ldr	r1, .L83+136
	ldr	r2, .L83+140
	ldr	r3, [r3]
	ldr	r1, [r1]
	ldr	r2, [r2]
	orr	r3, r3, r1
	orr	r3, r3, r2
	tst	r3, r0
	bne	.L73
.L25:
	mov	r0, r8
	bl	MakeBrushWindings
	ldr	r3, .L83+64
	ldr	r2, .L83+68
	ldr	r3, [r3]
	ldr	r2, [r2]
	ldr	r0, [r8, #12]
	orr	r3, r3, r2
	tst	r3, r0
	beq	.L29
	ldr	r1, .L83+144
	ldr	r2, [r8, #8]
	ldr	r3, [r1]
	cmp	r2, #0
	add	r3, r3, #1
	str	r3, [r1]
	ble	.L29
	ldr	r1, .L83+148
	ldr	r3, [r8, #28]
	add	r2, r2, r2, lsl #2
	ldr	r1, [r1]
	add	r2, r3, r2, lsl #2
.L30:
	str	r1, [r3, #12]
	add	r3, r3, #20
	cmp	r2, r3
	bne	.L30
.L29:
	ldr	r3, .L83+152
	ldr	r3, [r3]
	tst	r0, r3
	beq	.L80
	ldr	r3, .L83+24
	ldr	r3, [r3]
	cmp	r3, #1
	beq	.L81
	mov	r4, #0
	ldr	r1, [r8, #16]
	mov	r2, r4
	ldr	r0, [r8, #20]
	bl	VectorAdd
	mov	r2, #0
	ldr	r3, .L83+156
	mov	r0, r4
	str	r4, [sp]
	bl	VectorScale
	ldm	r4, {r2, r3}
	ldr	r1, [r4, #8]
	add	r0, sp, #92
	str	r1, [sp]
	ldr	r1, .L83+160
	bl	sprintf
	ldr	r5, .L83+164
	ldr	r6, [sp, #20]
	ldr	r7, [sp, #16]
	ldr	r3, [r5]
	ldr	r0, [r6, r7]
	ldr	r1, .L83+168
	add	r2, sp, #92
	add	r0, r3, r0, lsl #2
	bl	SetKeyValue
	ldr	r3, [r5]
	ldr	r2, [r6, r7]
	mov	r0, r4
	ldr	r1, [r3, r2, lsl #2]
	bl	VectorCopy
	str	r4, [r8, #8]
.L1:
	ldr	r3, .L83+8
	ldr	r2, [r3]
	ldr	r3, [sp, #124]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L82
	add	sp, sp, #132
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L80:
	mov	r0, r8
	bl	AddBrushBevels
	ldr	r1, .L83+4
	ldr	r0, [sp, #12]
	ldr	r2, [r1]
	ldr	r3, [r0]
	add	r2, r2, #1
	add	r3, r3, #1
	str	r2, [r1]
	str	r3, [r0]
	b	.L1
.L73:
	mov	r3, #0
	str	r3, [r8, #8]
	b	.L1
.L75:
	ldr	r0, .L83+172
	bl	Error
	ldr	r3, .L83+4
	ldr	r3, [r3]
	b	.L2
.L81:
	ldr	r3, [sp, #20]
	ldr	r1, [sp, #16]
	ldr	r2, [r8, #24]
	ldr	r1, [r3, r1]
	ldr	r0, .L83+176
	bl	Error
	b	.L1
.L82:
	bl	__stack_chk_fail
.L84:
	.align	2
.L83:
	.word	MAX_MAPFILE_BRUSHES
	.word	nummapbrushes
	.word	.LC11
	.word	mapbrushes
	.word	brushsides
	.word	nummapbrushsides
	.word	num_entities
	.word	.LC4
	.word	.LC1
	.word	MAX_MAPFILE_BRUSHSIDES
	.word	.LC3
	.word	textureref
	.word	TT_NUMBER
	.word	SURF_TRANS33
	.word	SURF_TRANS66
	.word	CONTENTS_DETAIL
	.word	CONTENTS_PLAYERCLIP
	.word	CONTENTS_MONSTERCLIP
	.word	CONTENTS_MIST
	.word	fulldetail
	.word	LAST_VISIBLE_CONTENTS
	.word	CONTENTS_SOLID
	.word	SURF_HINT
	.word	SURF_SKIP
	.word	.LC6
	.word	mapplanes
	.word	vec3_origin
	.word	side_brushtextures
	.word	.LC2
	.word	.LC5
	.word	.LC7
	.word	nodetail
	.word	nowater
	.word	CONTENTS_LAVA
	.word	CONTENTS_SLIME
	.word	CONTENTS_WATER
	.word	c_clipbrushes
	.word	TEXINFO_NODE
	.word	CONTENTS_ORIGIN
	.word	1071644672
	.word	.LC9
	.word	entities
	.word	.LC10
	.word	.LC0
	.word	.LC8
	.size	Q2_ParseBrush, .-Q2_ParseBrush
	.comm	vec3_origin,4,4
	.comm	textureref,4,4
	.comm	side_brushtextures,4,4
	.comm	nummapbrushsides,4,4
	.comm	nummapbrushes,4,4
	.comm	num_entities,4,4
	.comm	nowater,4,4
	.comm	nodetail,4,4
	.comm	mapplanes,4,4
	.comm	mapbrushes,4,4
	.comm	fulldetail,4,4
	.comm	entities,4,4
	.comm	create_aas,4,4
	.comm	c_squattbrushes,4,4
	.comm	c_clipbrushes,4,4
	.comm	brushsides,4,4
	.comm	TT_NUMBER,4,4
	.comm	TEXINFO_NODE,4,4
	.comm	SURF_TRANS66,4,4
	.comm	SURF_TRANS33,4,4
	.comm	SURF_SKIP,4,4
	.comm	SURF_HINT,4,4
	.comm	SFL_TEXTURED,4,4
	.comm	MAX_MAPFILE_BRUSHSIDES,4,4
	.comm	MAX_MAPFILE_BRUSHES,4,4
	.comm	LAST_VISIBLE_CONTENTS,4,4
	.comm	CONTENTS_WATER,4,4
	.comm	CONTENTS_SOLID,4,4
	.comm	CONTENTS_SLIME,4,4
	.comm	CONTENTS_PLAYERCLIP,4,4
	.comm	CONTENTS_ORIGIN,4,4
	.comm	CONTENTS_MONSTERCLIP,4,4
	.comm	CONTENTS_MIST,4,4
	.comm	CONTENTS_LAVA,4,4
	.comm	CONTENTS_DETAIL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
