	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function stbtt_FlattenCurves
LCPI0_0:
	.long	128                             ## 0x80
	.long	128                             ## 0x80
	.long	128                             ## 0x80
	.long	128                             ## 0x80
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_stbtt_FlattenCurves:                   ## @stbtt_FlattenCurves
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %rbx
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	movd	%xmm0, -48(%rbp)                ## 4-byte Folded Spill
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movl	$0, -44(%rbp)
	testl	%esi, %esi
	jle	LBB0_26
## %bb.1:
	movl	%esi, %r15d
	cmpl	$9, %esi
	jae	LBB0_3
## %bb.2:
	xorl	%eax, %eax
	xorl	%edi, %edi
	jmp	LBB0_6
LBB0_3:
	movl	%r15d, %eax
	andl	$7, %eax
	testq	%rax, %rax
	movl	$8, %ecx
	cmovneq	%rax, %rcx
	movq	%r15, %rax
	subq	%rcx, %rax
	pxor	%xmm0, %xmm0
	movdqa	LCPI0_0(%rip), %xmm2            ## xmm2 = [128,128,128,128]
	movq	%rax, %rcx
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	pxor	%xmm1, %xmm1
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movd	(%rdx), %xmm3                   ## xmm3 = mem[0],zero,zero,zero
	pinsrd	$1, 20(%rdx), %xmm3
	pinsrd	$2, 40(%rdx), %xmm3
	pinsrd	$3, 60(%rdx), %xmm3
	movd	80(%rdx), %xmm4                 ## xmm4 = mem[0],zero,zero,zero
	pinsrd	$1, 100(%rdx), %xmm4
	pinsrd	$2, 120(%rdx), %xmm4
	pinsrd	$3, 140(%rdx), %xmm4
	pcmpeqd	%xmm2, %xmm3
	psubd	%xmm3, %xmm0
	pcmpeqd	%xmm2, %xmm4
	psubd	%xmm4, %xmm1
	addq	$160, %rdx
	addq	$-8, %rcx
	jne	LBB0_4
## %bb.5:
	paddd	%xmm0, %xmm1
	pshufd	$238, %xmm1, %xmm0              ## xmm0 = xmm1[2,3,2,3]
	paddd	%xmm1, %xmm0
	pshufd	$85, %xmm0, %xmm1               ## xmm1 = xmm0[1,1,1,1]
	paddd	%xmm0, %xmm1
	movd	%xmm1, %edi
LBB0_6:
	movss	-48(%rbp), %xmm0                ## 4-byte Reload
                                        ## xmm0 = mem[0],zero,zero,zero
	mulss	%xmm0, %xmm0
	movss	%xmm0, -48(%rbp)                ## 4-byte Spill
	leaq	(%rax,%rax,4), %rcx
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	leaq	(%rdx,%rcx,4), %rcx
	movq	%r15, %rdx
	subq	%rax, %rdx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%eax, %eax
	cmpl	$128, (%rcx)
	sete	%al
	addl	%eax, %edi
	addq	$20, %rcx
	decq	%rdx
	jne	LBB0_7
## %bb.8:
	movl	%edi, (%rbx)
	testl	%edi, %edi
	je	LBB0_27
## %bb.9:
	shll	$2, %edi
	callq	_malloc
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	testq	%rax, %rax
	je	LBB0_26
## %bb.10:
	movq	%rbx, -88(%rbp)                 ## 8-byte Spill
	addq	$16, -64(%rbp)                  ## 8-byte Folded Spill
	xorl	%eax, %eax
	movb	$1, %r12b
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	movq	%r15, -96(%rbp)                 ## 8-byte Spill
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_24:                                ##   in Loop: Header=BB0_11 Depth=1
	movl	-44(%rbp), %eax
	subl	%r14d, %eax
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rcx
	movslq	%r12d, %rdx
	movl	%eax, (%rcx,%rdx,4)
	movb	$1, %al
	testb	$1, -76(%rbp)                   ## 1-byte Folded Reload
	movl	$0, %r12d
	movq	-96(%rbp), %r15                 ## 8-byte Reload
	je	LBB0_28
LBB0_11:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_14 Depth 2
	testb	$1, %al
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	movl	-44(%rbp), %edi
	shll	$2, %edi
	callq	_malloc
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_25
LBB0_13:                                ##   in Loop: Header=BB0_11 Depth=1
	movl	%r12d, -76(%rbp)                ## 4-byte Spill
	movl	$0, -44(%rbp)
	movl	$-1, %r12d
	pxor	%xmm1, %xmm1
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	xorps	%xmm0, %xmm0
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_22:                                ##   in Loop: Header=BB0_14 Depth=2
	movl	(%r13), %edx
	movl	-4(%r13), %ecx
	movd	-12(%r13), %xmm2                ## xmm2 = mem[0],zero,zero,zero
	movd	-8(%r13), %xmm3                 ## xmm3 = mem[0],zero,zero,zero
	movq	%rbx, %rdi
	leaq	-44(%rbp), %rsi
	movd	-48(%rbp), %xmm4                ## 4-byte Folded Reload
                                        ## xmm4 = mem[0],zero,zero,zero
	xorl	%r8d, %r8d
	callq	_stbtt__tesselate_curve
	movss	-12(%r13), %xmm0                ## xmm0 = mem[0],zero,zero,zero
	movd	-8(%r13), %xmm1                 ## xmm1 = mem[0],zero,zero,zero
LBB0_23:                                ##   in Loop: Header=BB0_14 Depth=2
	addq	$20, %r13
	decq	%r15
	je	LBB0_24
LBB0_14:                                ##   Parent Loop BB0_11 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	-16(%r13), %eax
	cmpl	$130, %eax
	je	LBB0_22
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=2
	cmpl	$129, %eax
	je	LBB0_20
## %bb.16:                              ##   in Loop: Header=BB0_14 Depth=2
	cmpl	$128, %eax
	jne	LBB0_23
## %bb.17:                              ##   in Loop: Header=BB0_14 Depth=2
	testl	%r12d, %r12d
	js	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_14 Depth=2
	movl	-44(%rbp), %eax
	subl	%r14d, %eax
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rcx
	movl	%r12d, %edx
	movl	%eax, (%rcx,%rdx,4)
LBB0_19:                                ##   in Loop: Header=BB0_14 Depth=2
	incl	%r12d
	movl	-44(%rbp), %r14d
	movss	-12(%r13), %xmm0                ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, -56(%rbp)                ## 4-byte Spill
	movss	-8(%r13), %xmm1                 ## xmm1 = mem[0],zero,zero,zero
	movss	%xmm1, -52(%rbp)                ## 4-byte Spill
	leal	1(%r14), %eax
	movl	%eax, -44(%rbp)
	movq	%rbx, %rdi
	movl	%r14d, %esi
	jmp	LBB0_21
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_14 Depth=2
	movss	-12(%r13), %xmm0                ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, -56(%rbp)                ## 4-byte Spill
	movss	-8(%r13), %xmm1                 ## xmm1 = mem[0],zero,zero,zero
	movss	%xmm1, -52(%rbp)                ## 4-byte Spill
	movl	-44(%rbp), %esi
	leal	1(%rsi), %eax
	movl	%eax, -44(%rbp)
	movq	%rbx, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
LBB0_21:                                ##   in Loop: Header=BB0_14 Depth=2
	callq	_stbtt__add_point
	movss	-56(%rbp), %xmm0                ## 4-byte Reload
                                        ## xmm0 = mem[0],zero,zero,zero
	movd	-52(%rbp), %xmm1                ## 4-byte Folded Reload
                                        ## xmm1 = mem[0],zero,zero,zero
	jmp	LBB0_23
LBB0_25:
	xorl	%edi, %edi
	callq	_free
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	(%rbx), %rdi
	callq	_free
	movq	$0, (%rbx)
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
LBB0_26:
	movl	$0, (%rbx)
LBB0_27:
	xorl	%ebx, %ebx
LBB0_28:
	movq	%rbx, %rax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_stbtt_FlattenCurves
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stbtt_FlattenCurves
_stbtt_FlattenCurves:                   ; @stbtt_FlattenCurves
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	d11, d10, [sp, #16]             ; 16-byte Folded Spill
	stp	d9, d8, [sp, #32]               ; 16-byte Folded Spill
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	.cfi_offset b8, -104
	.cfi_offset b9, -112
	.cfi_offset b10, -120
	.cfi_offset b11, -128
	mov	x19, x3
	str	wzr, [sp, #12]
	cmp	w1, #1
	b.lt	LBB0_27
; %bb.1:
	mov	x20, x2
	fmov	s8, s0
	mov	x23, x0
	mov	w24, w1
	cmp	w1, #4
	b.hs	LBB0_3
; %bb.2:
	mov	x8, #0
	mov	w9, #0
	b	LBB0_6
LBB0_3:
	mov	w11, #0
	mov	w12, #0
	mov	w10, #0
	mov	w9, #0
	and	x8, x24, #0xfffffffc
	add	x13, x23, #40
	mov	x14, x8
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldur	w15, [x13, #-40]
	ldur	w16, [x13, #-20]
	ldr	w17, [x13]
	ldr	w0, [x13, #20]
	cmp	w15, #128
	cinc	w11, w11, eq
	cmp	w16, #128
	cinc	w12, w12, eq
	cmp	w17, #128
	cinc	w10, w10, eq
	cmp	w0, #128
	cinc	w9, w9, eq
	add	x13, x13, #80
	subs	x14, x14, #4
	b.ne	LBB0_4
; %bb.5:
	add	w11, w12, w11
	add	w10, w10, w11
	add	w9, w9, w10
	cmp	x8, x24
	b.eq	LBB0_8
LBB0_6:
	mov	w10, #20
	madd	x10, x8, x10, x23
	sub	x8, x24, x8
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x10], #20
	cmp	w11, #128
	cinc	w9, w9, eq
	subs	x8, x8, #1
	b.ne	LBB0_7
LBB0_8:
	str	w9, [x19]
	cbz	w9, LBB0_25
; %bb.9:
	lsl	w0, w9, #2
	bl	_malloc
	str	x0, [x20]
	cbz	x0, LBB0_27
; %bb.10:
	mov	w8, #0
	mov	w22, #0
	mov	x21, #0
	fmul	s8, s8, s8
	add	x23, x23, #8
	mov	w9, #1
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	mov	w9, #0
	ldr	w8, [sp, #12]
	sub	w8, w8, w22
	ldr	x10, [x20]
	str	w8, [x10, w26, sxtw #2]
	mov	w8, #1
	tbz	w25, #0, LBB0_28
LBB0_12:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_17 Depth 2
	mov	x25, x9
	tbz	w8, #0, LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	w8, [sp, #12]
	lsl	w0, w8, #2
	bl	_malloc
	mov	x21, x0
	cbz	x0, LBB0_26
LBB0_14:                                ;   in Loop: Header=BB0_12 Depth=1
	str	wzr, [sp, #12]
	mov	w26, #-1
	movi	d9, #0000000000000000
	mov	x27, x24
	mov	x28, x23
	movi	d10, #0000000000000000
	b	LBB0_17
LBB0_15:                                ;   in Loop: Header=BB0_17 Depth=2
	ldp	w3, w2, [x28, #4]
	ldp	s2, s3, [x28, #-4]
	add	x1, sp, #12
	mov	x0, x21
	fmov	s0, s10
	fmov	s1, s9
	fmov	s4, s8
	mov	w4, #0
	bl	_stbtt__tesselate_curve
	ldp	s10, s9, [x28, #-4]
LBB0_16:                                ;   in Loop: Header=BB0_17 Depth=2
	add	x28, x28, #20
	subs	x27, x27, #1
	b.eq	LBB0_11
LBB0_17:                                ;   Parent Loop BB0_12 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldur	w8, [x28, #-8]
	cmp	w8, #130
	b.eq	LBB0_15
; %bb.18:                               ;   in Loop: Header=BB0_17 Depth=2
	cmp	w8, #129
	b.eq	LBB0_23
; %bb.19:                               ;   in Loop: Header=BB0_17 Depth=2
	cmp	w8, #128
	b.ne	LBB0_16
; %bb.20:                               ;   in Loop: Header=BB0_17 Depth=2
	tbnz	w26, #31, LBB0_22
; %bb.21:                               ;   in Loop: Header=BB0_17 Depth=2
	ldr	w8, [sp, #12]
	sub	w8, w8, w22
	ldr	x9, [x20]
	str	w8, [x9, w26, uxtw #2]
LBB0_22:                                ;   in Loop: Header=BB0_17 Depth=2
	add	w26, w26, #1
	ldr	w22, [sp, #12]
	ldp	s10, s9, [x28, #-4]
	add	w8, w22, #1
	str	w8, [sp, #12]
	mov	x0, x21
	mov	x1, x22
	b	LBB0_24
LBB0_23:                                ;   in Loop: Header=BB0_17 Depth=2
	ldp	s10, s9, [x28, #-4]
	ldr	w1, [sp, #12]
	add	w8, w1, #1
	str	w8, [sp, #12]
	mov	x0, x21
LBB0_24:                                ;   in Loop: Header=BB0_17 Depth=2
	fmov	s0, s10
	fmov	s1, s9
	bl	_stbtt__add_point
	b	LBB0_16
LBB0_25:
	mov	x21, #0
	b	LBB0_28
LBB0_26:
	bl	_free
	ldr	x0, [x20]
	bl	_free
	str	xzr, [x20]
LBB0_27:
	mov	x21, #0
	str	wzr, [x19]
LBB0_28:
	mov	x0, x21
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #32]               ; 16-byte Folded Reload
	ldp	d11, d10, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_stbtt_FlattenCurves
.subsections_via_symbols
