	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_WriteBSP                       ## -- Begin function WriteBSP
	.p2align	4, 0x90
_WriteBSP:                              ## @WriteBSP
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_c_nofaces@GOTPCREL(%rip), %r14
	movl	$0, (%r14)
	movq	_c_facenodes@GOTPCREL(%rip), %r13
	movl	$0, (%r13)
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_qprintf
	movq	_numfaces@GOTPCREL(%rip), %r12
	movl	(%r12), %r15d
	movq	%rbx, %rdi
	callq	_EmitDrawNode_r
	movq	_dmodels@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	_nummodels@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movl	%eax, (%rcx,%rdx,4)
	movq	%rbx, %rdi
	callq	_EmitAreaPortals
	movl	(%r13), %esi
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_qprintf
	movl	(%r14), %esi
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_qprintf
	movl	(%r12), %esi
	subl	%r15d, %esi
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_qprintf                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_c_nofaces,4,2                  ## @c_nofaces
	.comm	_c_facenodes,4,2                ## @c_facenodes
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"--- WriteBSP ---\n"

	.comm	_numfaces,4,2                   ## @numfaces
	.comm	_dmodels,8,3                    ## @dmodels
	.comm	_nummodels,8,3                  ## @nummodels
L_.str.1:                               ## @.str.1
	.asciz	"%5i nodes with faces\n"

L_.str.2:                               ## @.str.2
	.asciz	"%5i nodes without faces\n"

L_.str.3:                               ## @.str.3
	.asciz	"%5i faces\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_WriteBSP                       ; -- Begin function WriteBSP
	.p2align	2
_WriteBSP:                              ; @WriteBSP
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x0
Lloh0:
	adrp	x20, _c_nofaces@GOTPAGE
Lloh1:
	ldr	x20, [x20, _c_nofaces@GOTPAGEOFF]
	str	wzr, [x20]
Lloh2:
	adrp	x21, _c_facenodes@GOTPAGE
Lloh3:
	ldr	x21, [x21, _c_facenodes@GOTPAGEOFF]
	str	wzr, [x21]
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	bl	_qprintf
Lloh6:
	adrp	x22, _numfaces@GOTPAGE
Lloh7:
	ldr	x22, [x22, _numfaces@GOTPAGEOFF]
	ldr	w23, [x22]
	mov	x0, x19
	bl	_EmitDrawNode_r
Lloh8:
	adrp	x8, _dmodels@GOTPAGE
Lloh9:
	ldr	x8, [x8, _dmodels@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
Lloh11:
	adrp	x9, _nummodels@GOTPAGE
Lloh12:
	ldr	x9, [x9, _nummodels@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	str	w0, [x8, x9, lsl #2]
	mov	x0, x19
	bl	_EmitAreaPortals
	ldr	w8, [x21]
	str	x8, [sp]
Lloh14:
	adrp	x0, l_.str.1@PAGE
Lloh15:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_qprintf
	ldr	w8, [x20]
	str	x8, [sp]
Lloh16:
	adrp	x0, l_.str.2@PAGE
Lloh17:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_qprintf
	ldr	w8, [x22]
	sub	w8, w8, w23
	str	x8, [sp]
Lloh18:
	adrp	x0, l_.str.3@PAGE
Lloh19:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_qprintf
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_c_nofaces,4,2                  ; @c_nofaces
	.comm	_c_facenodes,4,2                ; @c_facenodes
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"--- WriteBSP ---\n"

	.comm	_numfaces,4,2                   ; @numfaces
	.comm	_dmodels,8,3                    ; @dmodels
	.comm	_nummodels,8,3                  ; @nummodels
l_.str.1:                               ; @.str.1
	.asciz	"%5i nodes with faces\n"

l_.str.2:                               ; @.str.2
	.asciz	"%5i nodes without faces\n"

l_.str.3:                               ; @.str.3
	.asciz	"%5i faces\n"

.subsections_via_symbols
