	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ClipSidesIntoTree              ## -- Begin function ClipSidesIntoTree
	.p2align	4, 0x90
_ClipSidesIntoTree:                     ## @ClipSidesIntoTree
	.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
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rbx
	leaq	L_.str(%rip), %rdi
	callq	_qprintf
	movq	(%rbx), %rcx
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	16(%rcx), %rcx
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	testq	%rcx, %rcx
	je	LBB0_16
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$0, (%rcx)
	jle	LBB0_15
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	xorl	%r15d, %r15d
	xorl	%r14d, %r14d
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_4 Depth=2
	incq	%r14
	movslq	(%rcx), %rax
	addq	$40, %r15
	cmpq	%rax, %r14
	jge	LBB0_15
LBB0_4:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	8(%rcx), %r12
	movq	24(%r12,%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_14
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=2
	leaq	(%r12,%r15), %rbx
	callq	_CopyWinding
	movq	$0, 8(%r12,%r15)
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx), %edx
	movq	%rax, %rdi
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rsi
	callq	_ClipSideIntoTree_r
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	8(%r12,%r15), %rbx
	testq	%rbx, %rbx
	je	LBB0_14
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=2
	movq	32(%r12,%r15), %r13
	testq	%r13, %r13
	je	LBB0_14
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=2
	movq	_SURF_NODRAW@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r13)
	jne	LBB0_14
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=2
	cmpq	$0, 8(%r13)
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=2
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	24(%rax), %rbx
LBB0_10:                                ##   in Loop: Header=BB0_4 Depth=2
	cmpq	$0, 16(%r12,%r15)
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_4 Depth=2
	leaq	L_.str.1(%rip), %rdi
	callq	_Error
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
LBB0_12:                                ##   in Loop: Header=BB0_4 Depth=2
	movq	%rcx, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	%rbx, %rdx
	callq	_DrawSurfaceForSide
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	_CONTENTS_FOG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%r13)
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_4 Depth=2
	movq	%rbx, %rdi
	callq	_ReverseWinding
	movq	%rax, %rbx
	movl	$40, %edi
	callq	_malloc
	movups	(%r12,%r15), %xmm0
	movups	16(%r12,%r15), %xmm1
	movups	%xmm0, (%rax)
	movups	%xmm1, 16(%rax)
	movq	32(%r12,%r15), %rcx
	movq	%rcx, 32(%rax)
	movq	%rbx, 8(%rax)
	xorb	$1, (%rax)
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%rax, %rsi
	movq	%rbx, %rdx
	callq	_DrawSurfaceForSide
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	jmp	LBB0_14
LBB0_16:
	addq	$24, %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	"----- ClipSidesIntoTree -----\n"

	.comm	_SURF_NODRAW,4,2                ## @SURF_NODRAW
L_.str.1:                               ## @.str.1
	.asciz	"monkey tried to create draw surface for brush bevel"

	.comm	_CONTENTS_FOG,4,2               ## @CONTENTS_FOG
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ClipSidesIntoTree              ; -- Begin function ClipSidesIntoTree
	.p2align	2
_ClipSidesIntoTree:                     ; @ClipSidesIntoTree
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_qprintf
	ldr	x20, [x20]
	cbz	x20, LBB0_16
; %bb.1:
Lloh2:
	adrp	x24, _SURF_NODRAW@GOTPAGE
Lloh3:
	ldr	x24, [x24, _SURF_NODRAW@GOTPAGEOFF]
Lloh4:
	adrp	x25, _CONTENTS_FOG@GOTPAGE
Lloh5:
	ldr	x25, [x25, _CONTENTS_FOG@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x20, [x20, #16]
	cbz	x20, LBB0_16
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x26, #0
	mov	x27, #0
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=2
	add	x27, x27, #1
	ldrsw	x8, [x20]
	add	x26, x26, #40
	cmp	x27, x8
	b.ge	LBB0_2
LBB0_6:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x28, [x20, #8]
	add	x22, x28, x26
	ldr	x0, [x22, #24]
	cbz	x0, LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	bl	_CopyWinding
	str	xzr, [x22, #8]
	ldr	w2, [x19]
	mov	x1, x22
	bl	_ClipSideIntoTree_r
	ldr	x23, [x22, #8]
	cbz	x23, LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=2
	add	x8, x28, x26
	ldr	x21, [x8, #32]
	cbz	x21, LBB0_5
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=2
	ldr	w8, [x21]
	ldr	w9, [x24]
	tst	w9, w8
	b.ne	LBB0_5
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=2
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_6 Depth=2
	ldr	x23, [x22, #24]
LBB0_12:                                ;   in Loop: Header=BB0_6 Depth=2
	add	x8, x28, x26
	ldr	x8, [x8, #16]
	cbz	x8, LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_6 Depth=2
Lloh6:
	adrp	x0, l_.str.1@PAGE
Lloh7:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_Error
LBB0_14:                                ;   in Loop: Header=BB0_6 Depth=2
	mov	x0, x20
	mov	x1, x22
	mov	x2, x23
	bl	_DrawSurfaceForSide
	ldr	w8, [x21, #4]
	ldr	w9, [x25]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.15:                               ;   in Loop: Header=BB0_6 Depth=2
	mov	x0, x23
	bl	_ReverseWinding
	mov	x22, x0
	mov	w0, #40
	bl	_malloc
	mov	x1, x0
	add	x8, x28, x26
	ldr	x9, [x8, #32]
	ldp	q1, q0, [x8]
	stp	q1, q0, [x0]
	str	x9, [x0, #32]
	str	x22, [x0, #8]
	ldr	w8, [x0]
	eor	w8, w8, #0x1
	str	w8, [x0]
	mov	x0, x20
	mov	x2, x22
	bl	_DrawSurfaceForSide
	b	LBB0_5
LBB0_16:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"----- ClipSidesIntoTree -----\n"

	.comm	_SURF_NODRAW,4,2                ; @SURF_NODRAW
l_.str.1:                               ; @.str.1
	.asciz	"monkey tried to create draw surface for brush bevel"

	.comm	_CONTENTS_FOG,4,2               ; @CONTENTS_FOG
.subsections_via_symbols
