	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function add_pattern
_add_pattern:                           ## @add_pattern
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rsi, %rsi
	je	LBB0_1
## %bb.2:
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	_patterns@GOTPCREL(%rip), %r12
	movl	(%r12), %ecx
	movq	_pattern_sz@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	jne	LBB0_4
## %bb.3:
	movq	_pattern@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	movl	%ecx, %edx
	addl	%edx, %edx
	addl	%ecx, %ecx
	incl	%ecx
	movl	%ecx, (%rax)
	leal	4(,%rdx,4), %esi
	callq	_grep_realloc
	movq	%rax, (%rbx)
LBB0_4:
	cmpb	$10, -1(%r14,%r15)
	leaq	-1(%r15), %rbx
	cmovneq	%r15, %rbx
	leaq	1(%rbx), %rdi
	callq	_grep_malloc
	movq	_pattern@GOTPCREL(%rip), %r15
	movq	(%r15), %rcx
	movslq	(%r12), %rdx
	shlq	$4, %rdx
	movq	%rax, (%rcx,%rdx)
	movq	(%r15), %rax
	movq	(%rax,%rdx), %rdi
	movq	%r14, %rsi
	movq	%rbx, %rdx
	callq	_memcpy
	movq	(%r15), %rax
	movslq	(%r12), %rcx
	shlq	$4, %rcx
	movq	%rbx, 8(%rax,%rcx)
	movq	(%rax,%rcx), %rax
	movb	$0, (%rax,%rbx)
	incl	(%r12)
	jmp	LBB0_5
LBB0_1:
	movq	_matchall@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
LBB0_5:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_matchall,4,2                   ## @matchall
	.comm	_patterns,4,2                   ## @patterns
	.comm	_pattern_sz,4,2                 ## @pattern_sz
	.comm	_pattern,8,3                    ## @pattern
	.no_dead_strip	_add_pattern
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function add_pattern
_add_pattern:                           ; @add_pattern
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	cbz	x1, LBB0_4
; %bb.1:
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x21, _patterns@GOTPAGE
Lloh1:
	ldr	x21, [x21, _patterns@GOTPAGEOFF]
	ldr	w8, [x21]
Lloh2:
	adrp	x9, _pattern_sz@GOTPAGE
Lloh3:
	ldr	x9, [x9, _pattern_sz@GOTPAGEOFF]
	ldr	w10, [x9]
Lloh4:
	adrp	x22, _pattern@GOTPAGE
Lloh5:
	ldr	x22, [x22, _pattern@GOTPAGEOFF]
	cmp	w8, w10
	b.ne	LBB0_3
; %bb.2:
	ldr	x0, [x22]
	mov	w10, #1
	bfi	w10, w8, #1, #31
	str	w10, [x9]
	lsl	w1, w10, #2
	bl	_grep_realloc
	str	x0, [x22]
LBB0_3:
	sub	x8, x20, #1
	ldrb	w9, [x19, x8]
	cmp	w9, #10
	csel	x20, x8, x20, eq
	add	x0, x20, #1
	bl	_grep_malloc
	ldr	x8, [x22]
	ldrsw	x9, [x21]
	lsl	x9, x9, #4
	str	x0, [x8, x9]
	ldr	x8, [x22]
	ldr	x0, [x8, x9]
	mov	x1, x19
	mov	x2, x20
	bl	_memcpy
	ldr	x8, [x22]
	ldrsw	x9, [x21]
	add	x8, x8, x9, lsl #4
	str	x20, [x8, #8]
	ldr	x8, [x8]
	strb	wzr, [x8, x20]
	ldr	w8, [x21]
	add	w8, w8, #1
	str	w8, [x21]
	b	LBB0_5
LBB0_4:
Lloh6:
	adrp	x8, _matchall@GOTPAGE
Lloh7:
	ldr	x8, [x8, _matchall@GOTPAGEOFF]
	mov	w9, #1
Lloh8:
	str	w9, [x8]
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotStr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_matchall,4,2                   ; @matchall
	.comm	_patterns,4,2                   ; @patterns
	.comm	_pattern_sz,4,2                 ; @pattern_sz
	.comm	_pattern,8,3                    ; @pattern
	.no_dead_strip	_add_pattern
.subsections_via_symbols
