	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_regexp_match_next              ## -- Begin function regexp_match_next
	.p2align	4, 0x90
_regexp_match_next:                     ## @regexp_match_next
	.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	%r8, %r12
	movq	%rcx, %rbx
	movl	%edx, %r15d
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	movq	%rsi, %rdi
	callq	_regexp_from_jsdisp
	movq	%rax, %r13
	movq	_REM_CHECK_GLOBAL@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_2
## %bb.1:
	movq	(%r13), %rax
	movq	_REG_GLOB@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_9
LBB0_2:
	movq	%rbx, %rdi
	callq	_jsstr_flatten
	testq	%rax, %rax
	je	LBB0_19
## %bb.3:
	movq	%rax, %r14
	movq	_REM_ALLOC_RESULT@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_6
## %bb.4:
	movq	(%r13), %rdi
	xorl	%esi, %esi
	movq	%r14, %rdx
	callq	_alloc_match_state
	testq	%rax, %rax
	je	LBB0_19
## %bb.5:
	movq	%rax, (%r12)
LBB0_6:
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	callq	_heap_pool_mark
	movq	_REM_NO_PARENS@GOTPCREL(%rip), %rcx
	testl	%r15d, (%rcx)
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	je	LBB0_12
## %bb.7:
	movq	(%r13), %rdi
	movq	%r12, %rsi
	xorl	%edx, %edx
	callq	_alloc_match_state
	testq	%rax, %rax
	je	LBB0_18
## %bb.8:
	movq	%rax, %rdx
	movq	%r12, %rdi
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movl	4(%rax), %ecx
	movl	%ecx, 4(%rdx)
	movl	(%rax), %eax
	movl	%eax, (%rdx)
	movq	%rdx, %r12
	jmp	LBB0_13
LBB0_9:
	movq	_REM_ALLOC_RESULT@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_11
## %bb.10:
	movq	$0, (%r12)
LBB0_11:
	movq	_S_FALSE@GOTPCREL(%rip), %rax
	jmp	LBB0_20
LBB0_12:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	(%rbx), %rax
	movq	%r12, %rdi
	movq	%rax, %r12
LBB0_13:
	movq	%r13, %rsi
	movl	%r15d, %edx
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	%r14, %r8
	movq	%r12, %r9
	callq	_do_regexp_match_next
	movq	%rax, %rbx
	movq	_REM_NO_PARENS@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_15
## %bb.14:
	movl	4(%r12), %eax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rcx
	movl	%eax, 4(%rcx)
	movl	(%r12), %eax
	movl	%eax, (%rcx)
LBB0_15:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_heap_pool_clear
	movq	_S_OK@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	je	LBB0_21
## %bb.16:
	movq	_REM_ALLOC_RESULT@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_21
## %bb.17:
	movq	%r12, %rdi
	callq	_heap_free
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	$0, (%rax)
	jmp	LBB0_21
LBB0_18:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_heap_pool_clear
LBB0_19:
	movq	_E_OUTOFMEMORY@GOTPCREL(%rip), %rax
LBB0_20:
	movq	(%rax), %rbx
LBB0_21:
	movq	%rbx, %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_REM_CHECK_GLOBAL,4,2           ## @REM_CHECK_GLOBAL
	.comm	_REG_GLOB,4,2                   ## @REG_GLOB
	.comm	_REM_ALLOC_RESULT,4,2           ## @REM_ALLOC_RESULT
	.comm	_S_FALSE,8,3                    ## @S_FALSE
	.comm	_E_OUTOFMEMORY,8,3              ## @E_OUTOFMEMORY
	.comm	_REM_NO_PARENS,4,2              ## @REM_NO_PARENS
	.comm	_S_OK,8,3                       ## @S_OK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_regexp_match_next              ; -- Begin function regexp_match_next
	.p2align	2
_regexp_match_next:                     ; @regexp_match_next
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x4
	mov	x21, x3
	mov	x20, x2
	mov	x22, x0
	mov	x0, x1
	bl	_regexp_from_jsdisp
	mov	x23, x0
Lloh0:
	adrp	x8, _REM_CHECK_GLOBAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _REM_CHECK_GLOBAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_2
; %bb.1:
	ldr	x8, [x23]
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _REG_GLOB@GOTPAGE
Lloh4:
	ldr	x9, [x9, _REG_GLOB@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_9
LBB0_2:
	mov	x0, x21
	bl	_jsstr_flatten
	cbz	x0, LBB0_19
; %bb.3:
	mov	x24, x0
Lloh6:
	adrp	x27, _REM_ALLOC_RESULT@GOTPAGE
Lloh7:
	ldr	x27, [x27, _REM_ALLOC_RESULT@GOTPAGEOFF]
	ldr	w8, [x27]
	tst	w8, w20
	b.eq	LBB0_6
; %bb.4:
	ldr	x0, [x23]
	mov	x1, #0
	mov	x2, x24
	bl	_alloc_match_state
	cbz	x0, LBB0_19
; %bb.5:
	str	x0, [x19]
LBB0_6:
	mov	x0, x22
	bl	_heap_pool_mark
	mov	x25, x0
Lloh8:
	adrp	x28, _REM_NO_PARENS@GOTPAGE
Lloh9:
	ldr	x28, [x28, _REM_NO_PARENS@GOTPAGEOFF]
	ldr	w8, [x28]
	tst	w8, w20
	b.eq	LBB0_12
; %bb.7:
	ldr	x0, [x23]
	mov	x1, x22
	mov	x2, #0
	bl	_alloc_match_state
	cbz	x0, LBB0_18
; %bb.8:
	mov	x26, x0
	ldr	x8, [x19]
	ldr	d0, [x8]
	str	d0, [x0]
	b	LBB0_13
LBB0_9:
Lloh10:
	adrp	x8, _REM_ALLOC_RESULT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _REM_ALLOC_RESULT@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_11
; %bb.10:
	str	xzr, [x19]
LBB0_11:
Lloh13:
	adrp	x8, _S_FALSE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _S_FALSE@GOTPAGEOFF]
	b	LBB0_20
LBB0_12:
	ldr	x26, [x19]
LBB0_13:
	mov	x0, x22
	mov	x1, x23
	mov	x2, x20
	mov	x3, x21
	mov	x4, x24
	mov	x5, x26
	bl	_do_regexp_match_next
	mov	x21, x0
	ldr	w8, [x28]
	tst	w8, w20
	b.eq	LBB0_15
; %bb.14:
	ldr	x8, [x19]
	ldr	d0, [x26]
	str	d0, [x8]
LBB0_15:
	mov	x0, x25
	bl	_heap_pool_clear
Lloh15:
	adrp	x8, _S_OK@GOTPAGE
Lloh16:
	ldr	x8, [x8, _S_OK@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
	cmp	x21, x8
	b.eq	LBB0_21
; %bb.16:
	ldr	w8, [x27]
	tst	w8, w20
	b.eq	LBB0_21
; %bb.17:
	mov	x0, x26
	bl	_heap_free
	str	xzr, [x19]
	b	LBB0_21
LBB0_18:
	mov	x0, x25
	bl	_heap_pool_clear
LBB0_19:
Lloh18:
	adrp	x8, _E_OUTOFMEMORY@GOTPAGE
Lloh19:
	ldr	x8, [x8, _E_OUTOFMEMORY@GOTPAGEOFF]
LBB0_20:
	ldr	x21, [x8]
LBB0_21:
	mov	x0, x21
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_REM_CHECK_GLOBAL,4,2           ; @REM_CHECK_GLOBAL
	.comm	_REG_GLOB,4,2                   ; @REG_GLOB
	.comm	_REM_ALLOC_RESULT,4,2           ; @REM_ALLOC_RESULT
	.comm	_S_FALSE,8,3                    ; @S_FALSE
	.comm	_E_OUTOFMEMORY,8,3              ; @E_OUTOFMEMORY
	.comm	_REM_NO_PARENS,4,2              ; @REM_NO_PARENS
	.comm	_S_OK,8,3                       ; @S_OK
.subsections_via_symbols
