	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_TestExpandBrushes              ## -- Begin function TestExpandBrushes
	.p2align	4, 0x90
_TestExpandBrushes:                     ## @TestExpandBrushes
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	leaq	L_.str.1(%rip), %rdi
	leaq	L_.str(%rip), %rbx
	movq	%rbx, %rsi
	callq	_Log_Print
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	callq	_fopen
	movq	%rax, %r14
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	leaq	L_.str.3(%rip), %rdi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_Error
LBB0_2:
	leaq	L_.str.4(%rip), %rdi
	movl	$27, %esi
	movl	$1, %edx
	movq	%r14, %rcx
	callq	_fwrite
	movq	_nummapbrushes@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_8
## %bb.3:
	xorl	%ebx, %ebx
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	$2, %esi
	movl	$1, %edx
	leaq	L_.str.8(%rip), %rdi
	movq	%rbx, %rcx
	callq	_fwrite
	movq	%rbx, %r14
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	incq	%rbx
	movq	_nummapbrushes@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpq	%rax, %rbx
	jge	LBB0_8
LBB0_4:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_6 Depth 2
	movq	_mapbrushes@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	movl	$2, %esi
	movl	$1, %edx
	leaq	L_.str.5(%rip), %rdi
	movq	%r14, %rcx
	callq	_fwrite
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rax
	shlq	$4, %rax
	cmpl	$0, (%r15,%rax)
	movq	%r14, %rbx
	movq	_mapplanes@GOTPCREL(%rip), %rdx
	jle	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	leaq	(%r15,%rax), %rcx
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	addq	%r15, %rax
	addq	$8, %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_6:                                 ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %r13
	movq	(%rdx), %rax
	movq	(%r13,%r15), %rcx
	shlq	$4, %rcx
	movq	%rbx, %r14
	movl	8(%rax,%rcx), %ebx
	movq	(%rax,%rcx), %rax
	movl	(%rax), %edi
	shll	$4, %edi
	callq	_fabs
	addl	%eax, %ebx
	movq	_mapplanes@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%r13,%r15), %rcx
	shlq	$4, %rcx
	movq	(%rax,%rcx), %rax
	movl	4(%rax), %edi
	shll	$4, %edi
	callq	_fabs
	addl	%eax, %ebx
	movq	_mapplanes@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%r13,%r15), %rcx
	shlq	$4, %rcx
	movq	(%rax,%rcx), %rax
	movl	8(%rax), %edi
	shll	$4, %edi
	callq	_fabs
	addl	%eax, %ebx
	movq	_mapplanes@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%r13,%r15), %rcx
	shlq	$4, %rcx
	movq	(%rax,%rcx), %rdi
	movl	%ebx, %esi
	movq	%r14, %rbx
	callq	_BaseWindingForPlane
	movq	%rax, %r14
	movq	(%rax), %rax
	movq	(%rax), %rax
	movl	(%rax), %edx
	movl	8(%rax), %ecx
	movl	16(%rax), %r8d
	movq	%rbx, %rdi
	leaq	L_.str.6(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movq	(%r14), %rax
	movq	8(%rax), %rax
	movl	(%rax), %edx
	movl	8(%rax), %ecx
	movl	16(%rax), %r8d
	movq	%rbx, %rdi
	leaq	L_.str.6(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movq	(%r14), %rax
	movq	16(%rax), %rax
	movl	(%rax), %edx
	movl	8(%rax), %ecx
	movl	16(%rax), %r8d
	movq	%rbx, %rdi
	leaq	L_.str.6(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movq	_texinfo@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	8(%r13,%r15), %rcx
	leaq	L_.str.7(%rip), %rsi
	movq	(%rax,%rcx,8), %rdx
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_fprintf
	movq	%r14, %rdi
	callq	_FreeWinding
	movq	_mapplanes@GOTPCREL(%rip), %rdx
	incq	%r12
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movslq	(%rax), %rax
	addq	$16, %r15
	cmpq	%rax, %r12
	jl	LBB0_6
	jmp	LBB0_7
LBB0_8:
	leaq	L_.str.8(%rip), %rdi
	movl	$2, %esi
	movl	$1, %edx
	movq	%r14, %rcx
	callq	_fwrite
	movq	%r14, %rdi
	callq	_fclose
	leaq	L_.str.9(%rip), %rdi
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_Error                          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"expanded.map"

L_.str.1:                               ## @.str.1
	.asciz	"writing %s\n"

L_.str.2:                               ## @.str.2
	.asciz	"wb"

L_.str.3:                               ## @.str.3
	.asciz	"Can't write %s\n"

L_.str.4:                               ## @.str.4
	.asciz	"{\n\"classname\" \"worldspawn\"\n"

	.comm	_nummapbrushes,4,2              ## @nummapbrushes
	.comm	_mapbrushes,8,3                 ## @mapbrushes
L_.str.5:                               ## @.str.5
	.asciz	"{\n"

	.comm	_mapplanes,8,3                  ## @mapplanes
L_.str.6:                               ## @.str.6
	.asciz	"( %i %i %i ) "

L_.str.7:                               ## @.str.7
	.asciz	"%s 0 0 0 1 1\n"

	.comm	_texinfo,8,3                    ## @texinfo
L_.str.8:                               ## @.str.8
	.asciz	"}\n"

L_.str.9:                               ## @.str.9
	.asciz	"can't proceed after expanding brushes"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_TestExpandBrushes              ; -- Begin function TestExpandBrushes
	.p2align	2
_TestExpandBrushes:                     ; @TestExpandBrushes
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
Lloh0:
	adrp	x0, l_.str.1@PAGE
Lloh1:
	add	x0, x0, l_.str.1@PAGEOFF
Lloh2:
	adrp	x20, l_.str@PAGE
Lloh3:
	add	x20, x20, l_.str@PAGEOFF
	mov	x1, x20
	bl	_Log_Print
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_fopen
	mov	x19, x0
	cbnz	x0, LBB0_2
; %bb.1:
	str	x20, [sp]
Lloh6:
	adrp	x0, l_.str.3@PAGE
Lloh7:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_Error
LBB0_2:
Lloh8:
	adrp	x0, l_.str.4@PAGE
Lloh9:
	add	x0, x0, l_.str.4@PAGEOFF
	mov	w1, #27
	mov	w2, #1
	mov	x3, x19
	bl	_fwrite
Lloh10:
	adrp	x8, _nummapbrushes@GOTPAGE
Lloh11:
	ldr	x8, [x8, _nummapbrushes@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.3:
	mov	x23, #0
Lloh13:
	adrp	x28, _mapplanes@GOTPAGE
Lloh14:
	ldr	x28, [x28, _mapplanes@GOTPAGEOFF]
Lloh15:
	adrp	x21, l_.str.6@PAGE
Lloh16:
	add	x21, x21, l_.str.6@PAGEOFF
Lloh17:
	adrp	x22, l_.str.7@PAGE
Lloh18:
	add	x22, x22, l_.str.7@PAGEOFF
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
Lloh19:
	adrp	x0, l_.str.8@PAGE
Lloh20:
	add	x0, x0, l_.str.8@PAGEOFF
	mov	w1, #2
	mov	w2, #1
	mov	x3, x19
	bl	_fwrite
	ldr	x23, [sp, #24]                  ; 8-byte Folded Reload
	add	x23, x23, #1
Lloh21:
	adrp	x8, _nummapbrushes@GOTPAGE
Lloh22:
	ldr	x8, [x8, _nummapbrushes@GOTPAGEOFF]
Lloh23:
	ldrsw	x8, [x8]
	cmp	x23, x8
	b.ge	LBB0_8
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
Lloh24:
	adrp	x8, _mapbrushes@GOTPAGE
Lloh25:
	ldr	x8, [x8, _mapbrushes@GOTPAGEOFF]
Lloh26:
	ldr	x20, [x8]
Lloh27:
	adrp	x0, l_.str.5@PAGE
Lloh28:
	add	x0, x0, l_.str.5@PAGEOFF
	mov	w1, #2
	mov	w2, #1
	mov	x3, x19
	bl	_fwrite
	str	x23, [sp, #24]                  ; 8-byte Folded Spill
	add	x20, x20, x23, lsl #4
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x25, #0
	mov	x23, #0
	add	x26, x20, #8
LBB0_7:                                 ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x26]
	ldr	x9, [x28]
	add	x27, x8, x25
	ldr	x8, [x27]
	add	x8, x9, x8, lsl #4
	ldr	w24, [x8, #8]
	ldr	x8, [x8]
	ldr	w8, [x8]
	lsl	w0, w8, #4
	bl	_fabs
	add	w24, w24, w0
	ldr	x8, [x28]
	ldr	x9, [x27]
	lsl	x9, x9, #4
	ldr	x8, [x8, x9]
	ldr	w8, [x8, #4]
	lsl	w0, w8, #4
	bl	_fabs
	add	w24, w24, w0
	ldr	x8, [x28]
	ldr	x9, [x27]
	lsl	x9, x9, #4
	ldr	x8, [x8, x9]
	ldr	w8, [x8, #8]
	lsl	w0, w8, #4
	bl	_fabs
	add	w1, w24, w0
	ldr	x8, [x28]
	ldr	x9, [x27]
	lsl	x9, x9, #4
	ldr	x0, [x8, x9]
	bl	_BaseWindingForPlane
	mov	x24, x0
	ldr	x8, [x0]
	ldr	x8, [x8]
	ldr	q0, [x8]
	ldr	x8, [x8, #16]
	str	x8, [sp, #16]
	str	q0, [sp]
	mov	x0, x19
	mov	x1, x21
	bl	_fprintf
	ldr	x8, [x24]
	ldr	x8, [x8, #8]
	ldr	q0, [x8]
	ldr	x8, [x8, #16]
	str	x8, [sp, #16]
	str	q0, [sp]
	mov	x0, x19
	mov	x1, x21
	bl	_fprintf
	ldr	x8, [x24]
	ldr	x8, [x8, #16]
	ldr	q0, [x8]
	ldr	x8, [x8, #16]
	str	x8, [sp, #16]
	str	q0, [sp]
	mov	x0, x19
	mov	x1, x21
	bl	_fprintf
Lloh29:
	adrp	x8, _texinfo@GOTPAGE
Lloh30:
	ldr	x8, [x8, _texinfo@GOTPAGEOFF]
Lloh31:
	ldr	x8, [x8]
	ldr	x9, [x27, #8]
	ldr	x8, [x8, x9, lsl #3]
	str	x8, [sp]
	mov	x0, x19
	mov	x1, x22
	bl	_fprintf
	mov	x0, x24
	bl	_FreeWinding
	add	x23, x23, #1
	ldrsw	x8, [x20]
	add	x25, x25, #16
	cmp	x23, x8
	b.lt	LBB0_7
	b	LBB0_4
LBB0_8:
Lloh32:
	adrp	x0, l_.str.8@PAGE
Lloh33:
	add	x0, x0, l_.str.8@PAGEOFF
	mov	w1, #2
	mov	w2, #1
	mov	x3, x19
	bl	_fwrite
	mov	x0, x19
	bl	_fclose
Lloh34:
	adrp	x0, l_.str.9@PAGE
Lloh35:
	add	x0, x0, l_.str.9@PAGEOFF
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	b	_Error
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"expanded.map"

l_.str.1:                               ; @.str.1
	.asciz	"writing %s\n"

l_.str.2:                               ; @.str.2
	.asciz	"wb"

l_.str.3:                               ; @.str.3
	.asciz	"Can't write %s\n"

l_.str.4:                               ; @.str.4
	.asciz	"{\n\"classname\" \"worldspawn\"\n"

	.comm	_nummapbrushes,4,2              ; @nummapbrushes
	.comm	_mapbrushes,8,3                 ; @mapbrushes
l_.str.5:                               ; @.str.5
	.asciz	"{\n"

	.comm	_mapplanes,8,3                  ; @mapplanes
l_.str.6:                               ; @.str.6
	.asciz	"( %i %i %i ) "

l_.str.7:                               ; @.str.7
	.asciz	"%s 0 0 0 1 1\n"

	.comm	_texinfo,8,3                    ; @texinfo
l_.str.8:                               ; @.str.8
	.asciz	"}\n"

l_.str.9:                               ; @.str.9
	.asciz	"can't proceed after expanding brushes"

.subsections_via_symbols
