	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function monitor_expect_regexp
_monitor_expect_regexp:                 ## @monitor_expect_regexp
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movq	%rsi, %rbx
	movq	%rdi, %r14
	leaq	L_.str(%rip), %rdi
	callq	_monitor_debug
	testq	%rbx, %rbx
	jne	LBB0_2
## %bb.1:
	movq	_TARGET_BUF_SIZE@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_alloca
	movq	%rax, %rbx
	movl	(%r15), %r15d
LBB0_2:
	movslq	%r15d, %r13
	movl	%r13d, %eax
	shrl	$31, %eax
	addl	%r13d, %eax
	sarl	%eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movslq	%eax, %r15
	addq	%rbx, %r15
	movq	%rbx, %r12
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	_timeout@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_readchar
	movb	%al, (%r12)
	incq	%r12
	movl	%r12d, %edx
	subl	%ebx, %edx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	xorl	%ecx, %ecx
	movl	%edx, %r8d
	xorl	%r9d, %r9d
	callq	_re_search
	testl	%eax, %eax
	jns	LBB0_6
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rax
	subq	%rbx, %rax
	cmpq	%r13, %rax
	jl	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_memcpy
	movq	%r15, %r12
	jmp	LBB0_5
LBB0_6:
	movl	$1, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MON Expecting regexp\n"

	.comm	_TARGET_BUF_SIZE,4,2            ## @TARGET_BUF_SIZE
	.comm	_timeout,4,2                    ## @timeout
	.no_dead_strip	_monitor_expect_regexp
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function monitor_expect_regexp
_monitor_expect_regexp:                 ; @monitor_expect_regexp
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x21, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_monitor_debug
	cbnz	x20, LBB0_2
; %bb.1:
Lloh2:
	adrp	x21, _TARGET_BUF_SIZE@GOTPAGE
Lloh3:
	ldr	x21, [x21, _TARGET_BUF_SIZE@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_alloca
	mov	x20, x0
	ldr	w21, [x21]
LBB0_2:
	sxtw	x23, w21
	cmp	w21, #0
	cinc	w8, w21, lt
	asr	w21, w8, #1
	add	x22, x20, w21, sxtw
Lloh4:
	adrp	x24, _timeout@GOTPAGE
Lloh5:
	ldr	x24, [x24, _timeout@GOTPAGEOFF]
	mov	x25, x20
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x24]
	bl	_readchar
	strb	w0, [x25], #1
	sub	w2, w25, w20
	mov	x0, x19
	mov	x1, x20
	mov	w3, #0
	mov	x4, x2
	mov	x5, #0
	bl	_re_search
	tbz	w0, #31, LBB0_6
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	sub	x8, x25, x20
	cmp	x8, x23
	b.lt	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x20
	mov	x1, x22
	mov	x2, x21
	bl	_memcpy
	mov	x25, x22
	b	LBB0_3
LBB0_6:
	mov	w0, #1
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MON Expecting regexp\n"

	.comm	_TARGET_BUF_SIZE,4,2            ; @TARGET_BUF_SIZE
	.comm	_timeout,4,2                    ; @timeout
	.no_dead_strip	_monitor_expect_regexp
.subsections_via_symbols
