	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function attempt_line_merge
_attempt_line_merge:                    ## @attempt_line_merge
	.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	%rdx, %r10
	movq	_FALSE@GOTPCREL(%rip), %r12
	movq	(%r12), %r9
	movq	8(%rdi), %r14
	movslq	%esi, %rsi
	movl	(%rdi), %ebx
	leal	(%rsi,%rbx), %eax
	decl	%eax
	shlq	$4, %rsi
	leaq	(%r14,%rsi), %r15
	cltd
	idivl	%ebx
                                        ## kill: def $edx killed $edx def $rdx
	testq	%rcx, %rcx
	je	LBB0_5
## %bb.1:
	movq	(%r15), %r11
	movq	_POINTTYPE_CORNER@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r11
	jne	LBB0_2
## %bb.3:
	movq	_POINTTYPE_CURVE_START@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_2:
	movq	_POINTTYPE_CURVE_MIDDLE@GOTPCREL(%rip), %rax
LBB0_4:
	movq	(%rax), %rax
	movq	%rax, (%r15)
LBB0_5:
	cmpl	$1, %ebx
	jg	LBB0_7
## %bb.6:
	movq	(%r12), %rbx
	jmp	LBB0_16
LBB0_7:
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movslq	%edx, %r13
	shlq	$4, %r13
	leaq	(%r14,%r13), %rax
	addq	$8, %rax
	movq	%r10, %rbx
	movq	%r8, -88(%rbp)                  ## 8-byte Spill
	leaq	8(%r14,%rsi), %r12
	leaq	-44(%rbp), %rdi
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rax, %rsi
	movq	%r12, %rdx
	movq	%r9, -96(%rbp)                  ## 8-byte Spill
	callq	_unit_vec2
	leaq	-48(%rbp), %rdi
	movq	%r12, %rsi
	movq	%rbx, %r12
	movq	%rbx, %rdx
	callq	_unit_vec2
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edx
	leaq	-44(%rbp), %rdi
	leaq	-48(%rbp), %rsi
	callq	_is_direction_similar
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
	testq	%rax, %rax
	je	LBB0_16
## %bb.8:
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movl	(%rdi), %eax
	leal	-1(%rax), %ecx
	movl	%ecx, (%rdi)
	movq	(%r15), %rdx
	movq	_POINTTYPE_CURVE_END@GOTPCREL(%rip), %r8
	movq	(%r8), %rsi
	addq	%r13, %r14
	cmpq	%rsi, %rdx
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	jne	LBB0_9
## %bb.10:
	movq	%rdx, (%r14)
	movq	(%r8), %rsi
	testq	%rbx, %rbx
	jne	LBB0_12
	jmp	LBB0_14
LBB0_9:
	movq	(%r14), %rdx
	testq	%rbx, %rbx
	je	LBB0_14
LBB0_12:
	cmpq	%rsi, %rdx
	jne	LBB0_14
## %bb.13:
	movq	_POINTTYPE_CURVE_MIDDLE@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	%rdx, (%r14)
LBB0_14:
	movq	_TRUE@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rbx
	cmpl	$3, %eax
	jl	LBB0_16
## %bb.15:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	addl	%ecx, %eax
	decl	%eax
	cltd
	idivl	%ecx
	movq	8(%rdi), %rax
	movslq	%edx, %rcx
	shlq	$4, %rcx
	leaq	(%rax,%rcx), %rsi
	addq	$8, %rsi
	leaq	-44(%rbp), %rdi
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdx
	callq	_unit_vec2
	leaq	-48(%rbp), %rdi
	movq	%r14, %rsi
	movq	%r12, %rdx
	callq	_unit_vec2
LBB0_16:
	movq	%rbx, %rax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FALSE,8,3                      ## @FALSE
	.comm	_POINTTYPE_CORNER,8,3           ## @POINTTYPE_CORNER
	.comm	_POINTTYPE_CURVE_MIDDLE,8,3     ## @POINTTYPE_CURVE_MIDDLE
	.comm	_POINTTYPE_CURVE_START,8,3      ## @POINTTYPE_CURVE_START
	.comm	_POINTTYPE_CURVE_END,8,3        ## @POINTTYPE_CURVE_END
	.comm	_TRUE,8,3                       ## @TRUE
	.no_dead_strip	_attempt_line_merge
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function attempt_line_merge
_attempt_line_merge:                    ; @attempt_line_merge
	.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	x24, x4
	mov	x23, x3
	mov	x19, x2
                                        ; kill: def $w1 killed $w1 def $x1
	mov	x20, x0
	ldr	x8, [x0, #8]
Lloh0:
	adrp	x9, _FALSE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _FALSE@GOTPAGEOFF]
	ldr	x21, [x9]
	add	x28, x8, w1, sxtw #4
	ldr	w10, [x0]
	cbz	x3, LBB0_2
; %bb.1:
	ldr	x11, [x28]
Lloh2:
	adrp	x12, _POINTTYPE_CORNER@GOTPAGE
Lloh3:
	ldr	x12, [x12, _POINTTYPE_CORNER@GOTPAGEOFF]
Lloh4:
	ldr	x12, [x12]
Lloh5:
	adrp	x13, _POINTTYPE_CURVE_MIDDLE@GOTPAGE
Lloh6:
	ldr	x13, [x13, _POINTTYPE_CURVE_MIDDLE@GOTPAGEOFF]
Lloh7:
	adrp	x14, _POINTTYPE_CURVE_START@GOTPAGE
Lloh8:
	ldr	x14, [x14, _POINTTYPE_CURVE_START@GOTPAGEOFF]
	cmp	x11, x12
	csel	x11, x14, x13, eq
	ldr	x11, [x11]
	str	x11, [x28]
LBB0_2:
	cmp	w10, #1
	b.gt	LBB0_4
; %bb.3:
	ldr	x21, [x9]
	b	LBB0_12
LBB0_4:
	add	w9, w1, w10
	sub	w9, w9, #1
	sdiv	w11, w9, w10
	msub	w9, w11, w10, w9
	sxtw	x26, w9
	sxtw	x9, w1
	add	x27, x8, x26, lsl #4
	add	x22, x27, #8
	add	x8, x8, x9, lsl #4
	add	x25, x8, #8
	add	x0, sp, #8
	mov	x1, x22
	mov	x2, x25
	bl	_unit_vec2
	add	x0, sp, #12
	mov	x1, x25
	mov	x2, x19
	bl	_unit_vec2
	ldr	w2, [x24]
	add	x0, sp, #8
	add	x1, sp, #12
	bl	_is_direction_similar
	cbz	x0, LBB0_12
; %bb.5:
	ldr	w9, [x20]
	sub	w8, w9, #1
	str	w8, [x20]
	ldr	x10, [x28]
Lloh9:
	adrp	x12, _POINTTYPE_CURVE_END@GOTPAGE
Lloh10:
	ldr	x12, [x12, _POINTTYPE_CURVE_END@GOTPAGEOFF]
	ldr	x11, [x12]
	cmp	x10, x11
	b.ne	LBB0_7
; %bb.6:
	str	x10, [x27]
	ldr	x11, [x12]
	cbnz	x23, LBB0_8
	b	LBB0_10
LBB0_7:
	ldr	x10, [x27]
	cbz	x23, LBB0_10
LBB0_8:
	cmp	x10, x11
	b.ne	LBB0_10
; %bb.9:
Lloh11:
	adrp	x10, _POINTTYPE_CURVE_MIDDLE@GOTPAGE
Lloh12:
	ldr	x10, [x10, _POINTTYPE_CURVE_MIDDLE@GOTPAGEOFF]
Lloh13:
	ldr	x10, [x10]
	str	x10, [x27]
LBB0_10:
Lloh14:
	adrp	x10, _TRUE@GOTPAGE
Lloh15:
	ldr	x10, [x10, _TRUE@GOTPAGEOFF]
Lloh16:
	ldr	x21, [x10]
	cmp	w9, #3
	b.lt	LBB0_12
; %bb.11:
	add	w9, w26, w8
	sub	w9, w9, #1
	sdiv	w10, w9, w8
	msub	w8, w10, w8, w9
	ldr	x9, [x20, #8]
	add	x8, x9, w8, sxtw #4
	add	x1, x8, #8
	add	x0, sp, #8
	mov	x2, x22
	bl	_unit_vec2
	add	x0, sp, #12
	mov	x1, x22
	mov	x2, x19
	bl	_unit_vec2
LBB0_12:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_FALSE,8,3                      ; @FALSE
	.comm	_POINTTYPE_CORNER,8,3           ; @POINTTYPE_CORNER
	.comm	_POINTTYPE_CURVE_MIDDLE,8,3     ; @POINTTYPE_CURVE_MIDDLE
	.comm	_POINTTYPE_CURVE_START,8,3      ; @POINTTYPE_CURVE_START
	.comm	_POINTTYPE_CURVE_END,8,3        ; @POINTTYPE_CURVE_END
	.comm	_TRUE,8,3                       ; @TRUE
	.no_dead_strip	_attempt_line_merge
.subsections_via_symbols
