	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ChopBrushes                    ## -- Begin function ChopBrushes
	.p2align	4, 0x90
_ChopBrushes:                           ## @ChopBrushes
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_Log_Print
	movq	%rbx, %rdi
	callq	_CountBrushList
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_Log_Print
	leaq	L_.str.2(%rip), %rdi
	xorl	%esi, %esi
	xorl	%eax, %eax
	callq	_qprintf
	testq	%rbx, %rbx
	je	LBB0_40
## %bb.1:
	movq	%rbx, %rax
	movq	_cancelconversion@GOTPCREL(%rip), %r14
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	xorl	%r15d, %r15d
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_3 Depth 2
                                        ##     Child Loop BB0_6 Depth 2
                                        ##       Child Loop BB0_10 Depth 3
	movq	%rax, %rcx
	.p2align	4, 0x90
LBB0_3:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%rcx, %r13
	movq	(%rcx), %rcx
	testq	%rcx, %rcx
	jne	LBB0_3
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_6 Depth=2
	movq	%r15, (%rbx)
LBB0_5:                                 ##   in Loop: Header=BB0_6 Depth=2
	movq	%rbx, %r15
	testq	%rax, %rax
	je	LBB0_38
LBB0_6:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_10 Depth 3
	movq	%rax, %rbx
	movq	(%rax), %rax
	cmpq	$0, (%r14)
	jne	LBB0_4
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=2
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	%rax, %r12
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	jne	LBB0_10
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=2
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, (%rbx)
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	incl	%esi
	leaq	L_.str.3(%rip), %rdi
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	xorl	%eax, %eax
	callq	_qprintf
	movq	_cancelconversion@GOTPCREL(%rip), %r14
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_10 Depth=3
	movq	(%r12), %r12
	testq	%r12, %r12
	je	LBB0_8
LBB0_10:                                ##   Parent Loop BB0_2 Depth=1
                                        ##     Parent Loop BB0_6 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_BrushesDisjoint
	testq	%rax, %rax
	jne	LBB0_9
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=3
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_BrushGE
	movq	%rbx, %rdi
	movq	%r12, %rsi
	testq	%rax, %rax
	je	LBB0_16
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=3
	callq	_SubtractBrush
	cmpq	%rbx, %rax
	je	LBB0_9
## %bb.13:                              ##   in Loop: Header=BB0_10 Depth=3
	movq	%rax, %r15
	testq	%rax, %rax
	je	LBB0_31
## %bb.14:                              ##   in Loop: Header=BB0_10 Depth=3
	movq	%r15, %rdi
	callq	_CountBrushList
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_BrushGE
	testq	%rax, %rax
	jne	LBB0_18
## %bb.15:                              ##   in Loop: Header=BB0_10 Depth=3
	movl	$999999, %eax                   ## imm = 0xF423F
	movb	$1, %sil
	movb	$1, %cl
	xorl	%r14d, %r14d
	jmp	LBB0_21
LBB0_16:                                ##   in Loop: Header=BB0_10 Depth=3
	callq	_BrushGE
	testq	%rax, %rax
	je	LBB0_9
## %bb.17:                              ##   in Loop: Header=BB0_10 Depth=3
	movl	$999999, -60(%rbp)              ## 4-byte Folded Spill
                                        ## imm = 0xF423F
	xorl	%r15d, %r15d
LBB0_18:                                ##   in Loop: Header=BB0_10 Depth=3
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_SubtractBrush
	cmpq	%r12, %rax
	je	LBB0_9
## %bb.19:                              ##   in Loop: Header=BB0_10 Depth=3
	movq	%rax, %r14
	testq	%rax, %rax
	je	LBB0_32
## %bb.20:                              ##   in Loop: Header=BB0_10 Depth=3
	movq	%r14, %rdi
	callq	_CountBrushList
	testq	%r15, %r15
	setne	%cl
	xorl	%esi, %esi
LBB0_21:                                ##   in Loop: Header=BB0_10 Depth=3
	movl	-60(%rbp), %edx                 ## 4-byte Reload
	cmpl	$2, %edx
	jl	LBB0_27
## %bb.22:                              ##   in Loop: Header=BB0_10 Depth=3
	cmpl	$2, %eax
	jl	LBB0_27
## %bb.23:                              ##   in Loop: Header=BB0_10 Depth=3
	testb	%sil, %sil
	jne	LBB0_25
## %bb.24:                              ##   in Loop: Header=BB0_10 Depth=3
	movq	%r14, %rdi
	movl	%ecx, %r14d
	callq	_FreeBrushList
	movl	%r14d, %ecx
LBB0_25:                                ##   in Loop: Header=BB0_10 Depth=3
	testb	%cl, %cl
	je	LBB0_9
## %bb.26:                              ##   in Loop: Header=BB0_10 Depth=3
	movq	%r15, %rdi
	callq	_FreeBrushList
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_27:                                ##   in Loop: Header=BB0_2 Depth=1
	cmpl	%eax, %edx
	jge	LBB0_33
## %bb.28:                              ##   in Loop: Header=BB0_2 Depth=1
	testb	%sil, %sil
	jne	LBB0_30
## %bb.29:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %rdi
	callq	_FreeBrushList
LBB0_30:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_AddBrushListToTail
LBB0_31:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %r12
	jmp	LBB0_36
LBB0_32:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %rdi
	callq	_FreeBrushList
	jmp	LBB0_36
LBB0_33:                                ##   in Loop: Header=BB0_2 Depth=1
	testb	%cl, %cl
	je	LBB0_35
## %bb.34:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %rdi
	callq	_FreeBrushList
LBB0_35:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_AddBrushListToTail
	.p2align	4, 0x90
LBB0_36:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_cancelconversion@GOTPCREL(%rip), %r14
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_CullList
	testq	%rax, %rax
	jne	LBB0_2
LBB0_40:
	xorl	%ebx, %ebx
	jmp	LBB0_41
LBB0_38:
	cmpq	$0, (%r14)
	jne	LBB0_41
## %bb.39:
	leaq	L_.str.4(%rip), %rdi
	xorl	%eax, %eax
	callq	_qprintf
	leaq	L_.str.5(%rip), %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_Log_Write
LBB0_41:
	movq	%rbx, %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"-------- Brush CSG ---------\n"

L_.str.1:                               ## @.str.1
	.asciz	"%6d original brushes\n"

L_.str.2:                               ## @.str.2
	.asciz	"%6d output brushes"

	.comm	_cancelconversion,8,3           ## @cancelconversion
L_.str.3:                               ## @.str.3
	.asciz	"\r%6d"

L_.str.4:                               ## @.str.4
	.asciz	"\n"

L_.str.5:                               ## @.str.5
	.asciz	"%6d output brushes\r\n"

	.comm	_startbrush,8,3                 ## @startbrush
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ChopBrushes                    ; -- Begin function ChopBrushes
	.p2align	2
_ChopBrushes:                           ; @ChopBrushes
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x22, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_Log_Print
	mov	x0, x22
	bl	_CountBrushList
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_Log_Print
	str	xzr, [sp]
Lloh4:
	adrp	x0, l_.str.2@PAGE
Lloh5:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_qprintf
	cbz	x22, LBB0_35
; %bb.1:
	str	xzr, [sp, #8]                   ; 8-byte Folded Spill
	mov	x20, #0
Lloh6:
	adrp	x19, _cancelconversion@GOTPAGE
Lloh7:
	ldr	x19, [x19, _cancelconversion@GOTPAGEOFF]
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_3 Depth 2
                                        ;     Child Loop BB0_5 Depth 2
                                        ;       Child Loop BB0_9 Depth 3
	mov	x8, x22
LBB0_3:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x23, x8
	ldr	x8, [x8]
	cbnz	x8, LBB0_3
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=2
	str	x20, [x21]
	mov	x20, x21
	cbz	x22, LBB0_36
LBB0_5:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_9 Depth 3
	mov	x21, x22
	ldr	x22, [x22]
	ldr	x8, [x19]
	cbnz	x8, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=2
	mov	x24, x22
	cbnz	x22, LBB0_9
LBB0_7:                                 ;   in Loop: Header=BB0_5 Depth=2
	str	x20, [x21]
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	add	w8, w8, #1
	stp	x8, x8, [sp]                    ; 8-byte Folded Spill
Lloh8:
	adrp	x0, l_.str.3@PAGE
Lloh9:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_qprintf
	mov	x20, x21
	cbnz	x22, LBB0_5
	b	LBB0_36
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=3
	ldr	x24, [x24]
	cbz	x24, LBB0_7
LBB0_9:                                 ;   Parent Loop BB0_2 Depth=1
                                        ;     Parent Loop BB0_5 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	mov	x0, x21
	mov	x1, x24
	bl	_BrushesDisjoint
	cbnz	x0, LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=3
	mov	x0, x24
	mov	x1, x21
	bl	_BrushGE
	cbz	x0, LBB0_15
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=3
	mov	x0, x21
	mov	x1, x24
	bl	_SubtractBrush
	cmp	x0, x21
	b.eq	LBB0_8
; %bb.12:                               ;   in Loop: Header=BB0_9 Depth=3
	mov	x25, x0
	cbz	x0, LBB0_29
; %bb.13:                               ;   in Loop: Header=BB0_9 Depth=3
	mov	x0, x25
	bl	_CountBrushList
	mov	x26, x0
	mov	x0, x21
	mov	x1, x24
	bl	_BrushGE
	cbnz	x0, LBB0_17
; %bb.14:                               ;   in Loop: Header=BB0_9 Depth=3
	mov	x27, #0
	mov	w8, #1
	mov	w28, #1
	mov	w0, #16959
	movk	w0, #15, lsl #16
	cmp	w26, #2
	b.ge	LBB0_20
	b	LBB0_25
LBB0_15:                                ;   in Loop: Header=BB0_9 Depth=3
	mov	x0, x21
	mov	x1, x24
	bl	_BrushGE
	cbz	x0, LBB0_8
; %bb.16:                               ;   in Loop: Header=BB0_9 Depth=3
	mov	x25, #0
	mov	w26, #16959
	movk	w26, #15, lsl #16
LBB0_17:                                ;   in Loop: Header=BB0_9 Depth=3
	mov	x0, x24
	mov	x1, x21
	bl	_SubtractBrush
	cmp	x0, x24
	b.eq	LBB0_8
; %bb.18:                               ;   in Loop: Header=BB0_9 Depth=3
	mov	x27, x0
	cbz	x0, LBB0_30
; %bb.19:                               ;   in Loop: Header=BB0_9 Depth=3
	mov	x0, x27
	bl	_CountBrushList
	mov	w8, #0
	cmp	x25, #0
	cset	w28, ne
	cmp	w26, #2
	b.lt	LBB0_25
LBB0_20:                                ;   in Loop: Header=BB0_9 Depth=3
	cmp	w0, #2
	b.lt	LBB0_25
; %bb.21:                               ;   in Loop: Header=BB0_9 Depth=3
	tbnz	w8, #0, LBB0_23
; %bb.22:                               ;   in Loop: Header=BB0_9 Depth=3
	mov	x0, x27
	bl	_FreeBrushList
LBB0_23:                                ;   in Loop: Header=BB0_9 Depth=3
	cbz	w28, LBB0_8
; %bb.24:                               ;   in Loop: Header=BB0_9 Depth=3
	mov	x0, x25
	bl	_FreeBrushList
	b	LBB0_8
LBB0_25:                                ;   in Loop: Header=BB0_2 Depth=1
	cmp	w26, w0
	b.ge	LBB0_31
; %bb.26:                               ;   in Loop: Header=BB0_2 Depth=1
	tbnz	w8, #0, LBB0_28
; %bb.27:                               ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x27
	bl	_FreeBrushList
LBB0_28:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x25
	mov	x1, x23
	bl	_AddBrushListToTail
LBB0_29:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x24, x21
	b	LBB0_34
LBB0_30:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x25
	bl	_FreeBrushList
	b	LBB0_34
LBB0_31:                                ;   in Loop: Header=BB0_2 Depth=1
	cbz	w28, LBB0_33
; %bb.32:                               ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x25
	bl	_FreeBrushList
LBB0_33:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x27
	mov	x1, x23
	bl	_AddBrushListToTail
LBB0_34:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x21
	mov	x1, x24
	bl	_CullList
	mov	x22, x0
	cbnz	x0, LBB0_2
LBB0_35:
	mov	x21, #0
	b	LBB0_38
LBB0_36:
	ldr	x8, [x19]
	cbnz	x8, LBB0_38
; %bb.37:
Lloh10:
	adrp	x0, l_.str.4@PAGE
Lloh11:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_qprintf
Lloh12:
	adrp	x0, l_.str.5@PAGE
Lloh13:
	add	x0, x0, l_.str.5@PAGEOFF
	ldr	x1, [sp, #8]                    ; 8-byte Folded Reload
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_Log_Write
LBB0_38:
	mov	x0, x21
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"-------- Brush CSG ---------\n"

l_.str.1:                               ; @.str.1
	.asciz	"%6d original brushes\n"

l_.str.2:                               ; @.str.2
	.asciz	"%6d output brushes"

	.comm	_cancelconversion,8,3           ; @cancelconversion
l_.str.3:                               ; @.str.3
	.asciz	"\r%6d"

l_.str.4:                               ; @.str.4
	.asciz	"\n"

l_.str.5:                               ; @.str.5
	.asciz	"%6d output brushes\r\n"

	.comm	_startbrush,8,3                 ; @startbrush
.subsections_via_symbols
