	.file	"extr_csg.c_BSPBrushWindings.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	BSPBrushWindings
	.type	BSPBrushWindings, @function
BSPBrushWindings:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	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
	sub	rsp, 16
	.cfi_def_cfa_offset 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	eax, DWORD PTR [rdi]
	test	eax, eax
	jle	.L1
	mov	rcx, QWORD PTR 8[rdi]
	mov	r14, rdi
	xor	ebp, ebp
	mov	r12, rsp
	.p2align 4,,10
	.p2align 3
.L8:
	mov	r13, rbp
	mov	rax, QWORD PTR mapplanes[rip]
	xor	ebx, ebx
	sal	r13, 4
	mov	rdx, QWORD PTR [rcx+r13]
	lea	rax, [rax+rdx*8]
	mov	edi, DWORD PTR 4[rax]
	mov	esi, DWORD PTR [rax]
	call	BaseWindingForPlane@PLT
	mov	edx, DWORD PTR [r14]
	mov	rcx, QWORD PTR 8[r14]
	mov	QWORD PTR [rsp], rax
	test	edx, edx
	jg	.L5
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L7:
	cmp	ebp, ebx
	je	.L6
	mov	rax, rbx
	mov	rdx, QWORD PTR mapplanes[rip]
	mov	rdi, r12
	sal	rax, 4
	mov	rax, QWORD PTR [rcx+rax]
	xor	ecx, ecx
	xor	rax, 1
	lea	rax, [rdx+rax*8]
	mov	edx, DWORD PTR [rax]
	mov	esi, DWORD PTR 4[rax]
	call	ChopWindingInPlace@PLT
	mov	rcx, QWORD PTR 8[r14]
	mov	rax, QWORD PTR [rsp]
	mov	edx, DWORD PTR [r14]
.L6:
	add	rbx, 1
	cmp	edx, ebx
	jle	.L4
.L5:
	test	rax, rax
	jne	.L7
.L4:
	add	rbp, 1
	mov	QWORD PTR 8[rcx+r13], rax
	cmp	edx, ebp
	jg	.L8
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L14
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	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
.L14:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	BSPBrushWindings, .-BSPBrushWindings
	.comm	mapplanes,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_csg.c_BSPBrushWindings.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	BSPBrushWindings
	.syntax unified
	.arm
	.fpu softvfp
	.type	BSPBrushWindings, %function
BSPBrushWindings:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r3, [r0]
	ldr	r2, .L16
	sub	sp, sp, #8
	cmp	r3, #0
	ldr	r2, [r2]
	str	r2, [sp, #4]
	mov	r2,#0
	ble	.L1
	mov	r5, r0
	mov	r6, #0
	ldr	r2, [r0, #4]
	ldr	r7, .L16+4
.L9:
	ldr	r3, [r7]
	ldr	r2, [r2, r6, lsl #3]
	lsl	r8, r6, #3
	add	r1, r3, r2, lsl #3
	ldr	r0, [r1, #4]
	ldr	r1, [r3, r2, lsl #3]
	bl	BaseWindingForPlane
	ldr	r3, [r5]
	str	r0, [sp]
	cmp	r3, #0
	ble	.L14
	mov	r4, #0
	ldr	r2, [r5, #4]
	b	.L5
.L8:
	cmp	r6, r4
	beq	.L6
	ldr	r3, [r2, r4, lsl #3]
	ldr	r2, [r7]
	eor	r3, r3, #1
	add	r1, r2, r3, lsl #3
	mov	r0, sp
	ldr	r2, [r2, r3, lsl #3]
	ldr	r1, [r1, #4]
	mov	r3, #0
	bl	ChopWindingInPlace
	ldr	r2, [r5, #4]
	ldr	r0, [sp]
	ldr	r3, [r5]
.L6:
	add	r4, r4, #1
	cmp	r3, r4
	ble	.L7
.L5:
	cmp	r0, #0
	bne	.L8
.L7:
	add	r6, r6, #1
	add	r8, r2, r8
	cmp	r6, r3
	str	r0, [r8, #4]
	blt	.L9
.L1:
	ldr	r3, .L16
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L15
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L14:
	ldr	r3, [r5, #4]
	add	r8, r3, r8
	str	r0, [r8, #4]
	b	.L1
.L15:
	bl	__stack_chk_fail
.L17:
	.align	2
.L16:
	.word	.LC0
	.word	mapplanes
	.size	BSPBrushWindings, .-BSPBrushWindings
	.comm	mapplanes,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
