	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function find_event
_find_event:                            ## @find_event
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r13
	testq	%rcx, %rcx
	movq	%rdx, %r15
	cmoveq	%rcx, %r15
	cmovneq	%rcx, %rbx
	movq	%rbx, %rdi
	callq	_strlen
	leaq	3(%rax), %rdi
	callq	_malloc_or_die
	movq	%rax, %r14
	leaq	L_.str(%rip), %rsi
	movq	%rax, %rdi
	movq	%rbx, %rdx
	callq	_sprintf
	movq	_REG_ICASE@GOTPCREL(%rip), %rax
	movq	_REG_NOSUB@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	leaq	-44(%rbp), %rdi
	movq	%r14, %rsi
	callq	_regcomp
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_free
	movl	$-1, %r12d
	testl	%ebx, %ebx
	jne	LBB0_13
## %bb.1:
	movq	_REG_NOSUB@GOTPCREL(%rip), %r14
	testq	%r15, %r15
	je	LBB0_4
## %bb.2:
	movq	%r15, %rdi
	callq	_strlen
	leaq	3(%rax), %rdi
	callq	_malloc_or_die
	movq	%rax, %rbx
	leaq	L_.str(%rip), %rsi
	movq	%rax, %rdi
	movq	%r15, %rdx
	callq	_sprintf
	movl	(%r14), %edx
	movq	_REG_ICASE@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	leaq	-48(%rbp), %rdi
	movq	%rbx, %rsi
	callq	_regcomp
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_free
	testl	%r14d, %r14d
	je	LBB0_4
## %bb.3:
	leaq	-44(%rbp), %rdi
	callq	_regfree
	jmp	LBB0_13
LBB0_4:
	cmpl	$0, (%r13)
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	jle	LBB0_5
## %bb.6:
	testq	%r15, %r15
	leaq	-48(%rbp), %rbx
	cmoveq	%r15, %rbx
	xorl	%r12d, %r12d
	xorl	%r15d, %r15d
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=1
	incq	%r12
	movslq	(%r13), %rax
	cmpq	%rax, %r12
	jge	LBB0_10
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r13), %rax
	movq	(%rax,%r12,8), %r14
	movq	%r14, %rdi
	movq	%rbx, %rsi
	leaq	-44(%rbp), %rdx
	callq	_event_match
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	callq	_add_event
	movl	$1, %r15d
	jmp	LBB0_9
LBB0_5:
	xorl	%r15d, %r15d
LBB0_10:
	leaq	-44(%rbp), %rdi
	callq	_regfree
	cmpq	$0, -56(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_12
## %bb.11:
	leaq	-48(%rbp), %rdi
	callq	_regfree
LBB0_12:
	xorl	%r12d, %r12d
	cmpl	$1, %r15d
	sbbl	%r12d, %r12d
LBB0_13:
	movl	%r12d, %eax
	addq	$24, %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	"^%s$"

	.comm	_REG_ICASE,4,2                  ## @REG_ICASE
	.comm	_REG_NOSUB,4,2                  ## @REG_NOSUB
	.no_dead_strip	_find_event
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function find_event
_find_event:                            ; @find_event
	.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	x20, x1
	mov	x21, x0
	cmp	x3, #0
	csel	x19, xzr, x2, eq
	csel	x22, x2, x3, eq
	mov	x0, x22
	bl	_strlen
	add	x0, x0, #3
	bl	_malloc_or_die
	mov	x23, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x22
	bl	_sprintf
Lloh2:
	adrp	x24, _REG_ICASE@GOTPAGE
Lloh3:
	ldr	x24, [x24, _REG_ICASE@GOTPAGEOFF]
	ldr	w8, [x24]
Lloh4:
	adrp	x25, _REG_NOSUB@GOTPAGE
Lloh5:
	ldr	x25, [x25, _REG_NOSUB@GOTPAGEOFF]
	ldr	w9, [x25]
	orr	w2, w9, w8
	add	x0, sp, #12
	mov	x1, x23
	bl	_regcomp
	mov	x22, x0
	mov	x0, x23
	bl	_free
	cbz	w22, LBB0_2
; %bb.1:
	mov	w0, #-1
	b	LBB0_14
LBB0_2:
	cbz	x19, LBB0_5
; %bb.3:
	mov	x0, x19
	bl	_strlen
	add	x0, x0, #3
	bl	_malloc_or_die
	mov	x22, x0
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	bl	_sprintf
	ldr	w8, [x24]
	ldr	w9, [x25]
	orr	w2, w9, w8
	add	x0, sp, #8
	mov	x1, x22
	bl	_regcomp
	mov	x23, x0
	mov	x0, x22
	bl	_free
	cbz	w23, LBB0_5
; %bb.4:
	add	x0, sp, #12
	bl	_regfree
	mov	w0, #-1
	b	LBB0_14
LBB0_5:
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.6:
	mov	x25, #0
	mov	w24, #0
	add	x8, sp, #8
	cmp	x19, #0
	csel	x22, xzr, x8, eq
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	add	x25, x25, #1
	ldrsw	x8, [x21]
	cmp	x25, x8
	b.ge	LBB0_11
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21, #8]
	ldr	x23, [x8, x25, lsl #3]
	add	x2, sp, #12
	mov	x0, x23
	mov	x1, x22
	bl	_event_match
	cbz	x0, LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	x0, x20
	mov	x1, x23
	bl	_add_event
	mov	w24, #1
	b	LBB0_7
LBB0_10:
	mov	w24, #0
LBB0_11:
	add	x0, sp, #12
	bl	_regfree
	cbz	x19, LBB0_13
; %bb.12:
	add	x0, sp, #8
	bl	_regfree
LBB0_13:
	cmp	w24, #0
	csetm	w0, eq
LBB0_14:
	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
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"^%s$"

	.comm	_REG_ICASE,4,2                  ; @REG_ICASE
	.comm	_REG_NOSUB,4,2                  ; @REG_NOSUB
	.no_dead_strip	_find_event
.subsections_via_symbols
