	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_IntersectBrush                 ## -- Begin function IntersectBrush
	.p2align	4, 0x90
_IntersectBrush:                        ## @IntersectBrush
	.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
	xorl	%ebx, %ebx
	cmpl	$0, (%rsi)
	jle	LBB0_12
## %bb.1:
	movq	%rdi, %r14
	testq	%rdi, %rdi
	je	LBB0_12
## %bb.2:
	movq	%rsi, %r15
	movl	$1, %r12d
	leaq	-48(%rbp), %r13
	movq	%r14, %rbx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r15), %rax
	movl	-4(%rax,%r12,4), %esi
	movq	%rbx, %rdi
	leaq	-56(%rbp), %rdx
	movq	%r13, %rcx
	callq	_SplitBrush2
	cmpq	%r14, %rbx
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rbx, %rdi
	callq	_FreeBrush
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	-56(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	callq	_FreeBrush
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	-48(%rbp), %rbx
	movslq	(%r15), %rax
	cmpq	%rax, %r12
	jge	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%r12
	testq	%rbx, %rbx
	jne	LBB0_3
LBB0_9:
	cmpq	%r14, %rbx
	je	LBB0_10
## %bb.11:
	movq	$0, 8(%rbx)
	jmp	LBB0_12
LBB0_10:
	xorl	%ebx, %ebx
LBB0_12:
	movq	%rbx, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_IntersectBrush                 ; -- Begin function IntersectBrush
	.p2align	2
_IntersectBrush:                        ; @IntersectBrush
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	ldr	w8, [x1]
	cmp	w8, #1
	ccmp	x0, #0, #4, ge
	b.eq	LBB0_9
; %bb.1:
	mov	x20, x1
	mov	x19, x0
	mov	x22, #0
	mov	x21, x0
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x21, [sp]
	add	x22, x22, #1
	ldrsw	x8, [x20]
	cmp	x22, x8
	ccmp	x21, #0, #4, lt
	b.eq	LBB0_7
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #16]
	ldr	w1, [x8, x22, lsl #2]
	add	x2, sp, #8
	mov	x3, sp
	mov	x0, x21
	bl	_SplitBrush2
	cmp	x21, x19
	b.eq	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x21
	bl	_FreeBrush
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x0, [sp, #8]
	cbz	x0, LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	bl	_FreeBrush
	b	LBB0_2
LBB0_7:
	cmp	x21, x19
	b.eq	LBB0_9
; %bb.8:
	str	xzr, [x21, #8]
	b	LBB0_10
LBB0_9:
	mov	x21, #0
LBB0_10:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
