	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function look_ahead
LCPI0_0:
	.byte	10                              ## 0xa
	.byte	10                              ## 0xa
	.byte	10                              ## 0xa
	.byte	10                              ## 0xa
	.space	1
	.space	1
	.space	1
	.space	1
	.space	1
	.space	1
	.space	1
	.space	1
	.space	1
	.space	1
	.space	1
	.space	1
LCPI0_1:
	.long	1                               ## 0x1
	.long	1                               ## 0x1
	.long	1                               ## 0x1
	.long	1                               ## 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_look_ahead:                            ## @look_ahead
	.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	%rsi, %r14
	movq	(%rcx), %r13
	movq	(%rdi), %rbx
	testq	%rbx, %rbx
	je	LBB0_4
## %bb.1:
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movl	(%rdx), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	$-1, %r12
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %r15
	movq	(%r14), %rdx
	addq	%r13, %rdx
	movq	%rbx, %rdi
	movq	%r13, %rsi
	leaq	-80(%rbp), %rcx
	xorl	%r8d, %r8d
	callq	_patmatch
	movq	-80(%rbp), %rcx
	cmpq	%r12, %rcx
	cmovlq	%rcx, %r12
	testq	%r15, %r15
	cmovsq	%rcx, %r12
	orq	-72(%rbp), %rcx
	cmovsq	%r15, %r12
	testl	%eax, %eax
	cmoveq	%r15, %r12
	movq	(%rbx), %rbx
	testq	%rbx, %rbx
	jne	LBB0_2
## %bb.3:
	testq	%r12, %r12
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	-56(%rbp), %r11                 ## 8-byte Reload
	js	LBB0_4
## %bb.5:
	incq	%r12
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	leaq	(%r12,%r13), %rax
	decq	%rax
	cmpq	%rax, %r13
	jae	LBB0_21
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	leaq	-1(%r12), %rsi
	cmpb	$10, -2(%r13,%r12)
	movq	%rsi, %r12
	jne	LBB0_6
## %bb.8:
	leaq	(%rsi,%r13), %r9
	cmpq	$8, %rsi
	jae	LBB0_10
## %bb.9:
	movq	%r13, %rdx
	jmp	LBB0_18
LBB0_4:
	addq	(%r14), %r13
	movq	%r13, (%rcx)
	movq	$0, (%r14)
	movl	$1, %eax
	jmp	LBB0_20
LBB0_21:
	movq	%rax, %r9
	jmp	LBB0_19
LBB0_10:
	movq	%rsi, %rdx
	andq	$-8, %rdx
	movd	%edi, %xmm0
	leaq	-8(%rdx), %rdi
	movq	%rdi, %r8
	shrq	$3, %r8
	incq	%r8
	testq	%rdi, %rdi
	je	LBB0_11
## %bb.12:
	movq	%r8, %rdi
	andq	$-2, %rdi
	pxor	%xmm1, %xmm1
	xorl	%ebx, %ebx
	movdqa	LCPI0_0(%rip), %xmm2            ## xmm2 = <10,10,10,10,u,u,u,u,u,u,u,u,u,u,u,u>
	movdqa	LCPI0_1(%rip), %xmm3            ## xmm3 = [1,1,1,1]
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movd	(%r13,%rbx), %xmm4              ## xmm4 = mem[0],zero,zero,zero
	movd	4(%r13,%rbx), %xmm5             ## xmm5 = mem[0],zero,zero,zero
	pcmpeqb	%xmm2, %xmm4
	pmovzxbd	%xmm4, %xmm4                    ## xmm4 = xmm4[0],zero,zero,zero,xmm4[1],zero,zero,zero,xmm4[2],zero,zero,zero,xmm4[3],zero,zero,zero
	pand	%xmm3, %xmm4
	paddd	%xmm0, %xmm4
	pcmpeqb	%xmm2, %xmm5
	pmovzxbd	%xmm5, %xmm5                    ## xmm5 = xmm5[0],zero,zero,zero,xmm5[1],zero,zero,zero,xmm5[2],zero,zero,zero,xmm5[3],zero,zero,zero
	pand	%xmm3, %xmm5
	paddd	%xmm1, %xmm5
	movd	8(%r13,%rbx), %xmm0             ## xmm0 = mem[0],zero,zero,zero
	movd	12(%r13,%rbx), %xmm1            ## xmm1 = mem[0],zero,zero,zero
	pcmpeqb	%xmm2, %xmm0
	pmovzxbd	%xmm0, %xmm0                    ## xmm0 = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero
	pand	%xmm3, %xmm0
	paddd	%xmm4, %xmm0
	pcmpeqb	%xmm2, %xmm1
	pmovzxbd	%xmm1, %xmm1                    ## xmm1 = xmm1[0],zero,zero,zero,xmm1[1],zero,zero,zero,xmm1[2],zero,zero,zero,xmm1[3],zero,zero,zero
	pand	%xmm3, %xmm1
	paddd	%xmm5, %xmm1
	addq	$16, %rbx
	addq	$-2, %rdi
	jne	LBB0_13
## %bb.14:
	testb	$1, %r8b
	je	LBB0_16
LBB0_15:
	movd	(%r13,%rbx), %xmm2              ## xmm2 = mem[0],zero,zero,zero
	movd	4(%r13,%rbx), %xmm3             ## xmm3 = mem[0],zero,zero,zero
	movdqa	LCPI0_0(%rip), %xmm4            ## xmm4 = <10,10,10,10,u,u,u,u,u,u,u,u,u,u,u,u>
	pcmpeqb	%xmm4, %xmm2
	pmovzxbd	%xmm2, %xmm2                    ## xmm2 = xmm2[0],zero,zero,zero,xmm2[1],zero,zero,zero,xmm2[2],zero,zero,zero,xmm2[3],zero,zero,zero
	movdqa	LCPI0_1(%rip), %xmm5            ## xmm5 = [1,1,1,1]
	pand	%xmm5, %xmm2
	paddd	%xmm2, %xmm0
	pcmpeqb	%xmm4, %xmm3
	pmovzxbd	%xmm3, %xmm2                    ## xmm2 = xmm3[0],zero,zero,zero,xmm3[1],zero,zero,zero,xmm3[2],zero,zero,zero,xmm3[3],zero,zero,zero
	pand	%xmm5, %xmm2
	paddd	%xmm2, %xmm1
LBB0_16:
	paddd	%xmm1, %xmm0
	pshufd	$238, %xmm0, %xmm1              ## xmm1 = xmm0[2,3,2,3]
	paddd	%xmm0, %xmm1
	pshufd	$85, %xmm1, %xmm0               ## xmm0 = xmm1[1,1,1,1]
	paddd	%xmm1, %xmm0
	movd	%xmm0, %edi
	cmpq	%rdx, %rsi
	je	LBB0_19
## %bb.17:
	addq	%r13, %rdx
	.p2align	4, 0x90
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	xorl	%esi, %esi
	cmpb	$10, (%rdx)
	sete	%sil
	addl	%esi, %edi
	incq	%rdx
	cmpq	%rdx, %r9
	jne	LBB0_18
LBB0_19:
	subq	%r9, %r13
	addq	%r13, (%r14)
	movq	%rax, (%rcx)
	movl	%edi, (%r11)
	xorl	%eax, %eax
LBB0_20:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	pxor	%xmm1, %xmm1
	xorl	%ebx, %ebx
	testb	$1, %r8b
	jne	LBB0_15
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_look_ahead
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function look_ahead
_look_ahead:                            ; @look_ahead
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x19, x3
	mov	x20, x1
	ldr	x22, [x3]
	ldr	x23, [x0]
	cbz	x23, LBB0_9
; %bb.1:
	mov	x21, x2
	ldr	w24, [x2]
	mov	x25, #-1
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20]
	add	x2, x22, x8
	mov	x3, sp
	mov	x0, x23
	mov	x1, x22
	mov	w4, #0
	bl	_patmatch
	ldp	x8, x9, [sp]
	cmp	x8, x25
	ccmp	x25, #0, #8, ge
	csel	x10, x8, x25, lt
	cmp	x9, #0
	ccmp	x8, #0, #8, ge
	ccmp	w0, #0, #4, ge
	csel	x25, x25, x10, eq
	ldr	x23, [x23]
	cbnz	x23, LBB0_2
; %bb.3:
	tbnz	x25, #63, LBB0_9
; %bb.4:
	add	x10, x25, #1
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x8, x10
	add	x10, x22, x10
	sub	x9, x10, #1
	cmp	x22, x9
	b.hs	LBB0_21
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldurb	w9, [x10, #-2]
	sub	x10, x8, #1
	cmp	w9, #10
	b.ne	LBB0_5
; %bb.7:
	add	x9, x22, x10
	cmp	x10, #8
	b.hs	LBB0_10
; %bb.8:
	mov	x12, x22
	b	LBB0_20
LBB0_9:
	ldr	x8, [x20]
	add	x8, x22, x8
	str	x8, [x19]
	str	xzr, [x20]
	mov	w0, #1
	b	LBB0_22
LBB0_10:
	cmp	x10, #16
	b.hs	LBB0_12
; %bb.11:
	mov	x11, #0
	b	LBB0_17
LBB0_12:
	and	x11, x10, #0xfffffffffffffff0
	movi.2d	v0, #0000000000000000
	movi.2d	v1, #0000000000000000
	mov.s	v1[0], w24
	movi.16b	v2, #10
	movi.4s	v3, #1
	mov	x12, x11
	mov	x13, x22
	movi.2d	v4, #0000000000000000
	movi.2d	v5, #0000000000000000
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	q6, [x13], #16
	cmeq.16b	v6, v6, v2
	ushll.8h	v7, v6, #0
	ushll.4s	v16, v7, #0
	and.16b	v16, v16, v3
	ushll2.4s	v7, v7, #0
	and.16b	v7, v7, v3
	ushll2.8h	v6, v6, #0
	ushll.4s	v17, v6, #0
	and.16b	v17, v17, v3
	ushll2.4s	v6, v6, #0
	and.16b	v6, v6, v3
	add.4s	v5, v5, v6
	add.4s	v4, v4, v17
	add.4s	v0, v0, v7
	add.4s	v1, v1, v16
	subs	x12, x12, #16
	b.ne	LBB0_13
; %bb.14:
	add.4s	v1, v1, v4
	add.4s	v0, v0, v5
	add.4s	v0, v1, v0
	addv.4s	s0, v0
	fmov	w24, s0
	cmp	x10, x11
	b.eq	LBB0_21
; %bb.15:
	tbnz	w10, #3, LBB0_17
; %bb.16:
	add	x12, x22, x11
	b	LBB0_20
LBB0_17:
	and	x13, x10, #0xfffffffffffffff8
	add	x12, x22, x13
	movi.2d	v0, #0000000000000000
	movi.2d	v1, #0000000000000000
	mov.s	v1[0], w24
	add	x14, x22, x11
	sub	x11, x11, x13
	movi.8b	v2, #10
	movi.4s	v3, #1
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	ldr	d4, [x14], #8
	cmeq.8b	v4, v4, v2
	ushll.8h	v4, v4, #0
	ushll.4s	v5, v4, #0
	and.16b	v5, v5, v3
	ushll2.4s	v4, v4, #0
	and.16b	v4, v4, v3
	add.4s	v0, v0, v4
	add.4s	v1, v1, v5
	adds	x11, x11, #8
	b.ne	LBB0_18
; %bb.19:
	add.4s	v0, v1, v0
	addv.4s	s0, v0
	fmov	w24, s0
	cmp	x10, x13
	b.eq	LBB0_21
LBB0_20:                                ; =>This Inner Loop Header: Depth=1
	ldrb	w10, [x12], #1
	cmp	w10, #10
	cinc	w24, w24, eq
	cmp	x9, x12
	b.ne	LBB0_20
LBB0_21:
	mov	w0, #0
	ldr	x10, [x20]
	sub	x9, x22, x9
	add	x9, x9, x10
	str	x9, [x20]
	add	x8, x22, x8
	sub	x8, x8, #1
	str	x8, [x19]
	str	w24, [x21]
LBB0_22:
	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
	add	sp, sp, #96
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_look_ahead
.subsections_via_symbols
