	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function str_to_event
_str_to_event:                          ## @str_to_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
	movl	%esi, -60(%rbp)                 ## 4-byte Spill
	movq	%rdi, %rbx
	movq	_hist@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	movq	_H_FIRST@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	xorl	%r15d, %r15d
	leaq	-48(%rbp), %rsi
	xorl	%eax, %eax
	callq	_history
	movl	%eax, %r12d
	movsbl	(%rbx), %eax
	cmpl	$43, %eax
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	je	LBB0_3
## %bb.1:
	cmpl	$45, %eax
	jne	LBB0_4
## %bb.2:
	movl	$1, %r15d
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
LBB0_3:
	incq	%rbx
LBB0_4:
	movq	%rbx, %rdi
	callq	_is_number
	testq	%rax, %rax
	je	LBB0_19
## %bb.5:
	movq	%rbx, %rdi
	callq	_atoi
	movl	%eax, %ebx
	testl	%r15d, %r15d
	je	LBB0_13
## %bb.6:
	cmpl	$-1, %r12d
	sete	%al
	je	LBB0_11
## %bb.7:
	testl	%ebx, %ebx
	je	LBB0_11
## %bb.8:
	decl	%ebx
	movq	_H_NEXT@GOTPCREL(%rip), %r15
	leaq	-48(%rbp), %r14
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %edi
	movl	(%r15), %edx
	movq	%r14, %rsi
	xorl	%eax, %eax
	callq	_history
	subl	$1, %ebx
	setb	%cl
	cmpl	$-1, %eax
	sete	%al
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	testb	%cl, %cl
	je	LBB0_9
LBB0_11:
	testb	%al, %al
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_22
## %bb.12:
	movl	(%r13), %edi
	movq	_H_LAST@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	jmp	LBB0_17
LBB0_19:
	movl	(%r13), %edi
	movq	_H_PREV_STR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-48(%rbp), %rsi
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rcx
	xorl	%eax, %eax
	callq	_history
	cmpl	$-1, %eax
	jne	LBB0_22
## %bb.20:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_21
LBB0_13:
	movl	(%r13), %edi
	movq	_H_NEXT_EVENT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-48(%rbp), %rsi
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_history
	cmpl	$-1, %eax
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	jne	LBB0_22
## %bb.14:
	movl	(%r13), %edi
	cmpl	$0, -60(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_16
## %bb.15:
	movq	_H_LAST@GOTPCREL(%rip), %r14
LBB0_16:
	movl	(%r14), %edx
LBB0_17:
	leaq	-48(%rbp), %rsi
	xorl	%eax, %eax
	callq	_history
	cmpl	$-1, %eax
	jne	LBB0_22
## %bb.18:
	leaq	L_.str(%rip), %rdi
LBB0_21:
	movq	%rbx, %rsi
	callq	_error
LBB0_22:
	movl	-48(%rbp), %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_hist,4,2                       ## @hist
	.comm	_H_FIRST,4,2                    ## @H_FIRST
	.comm	_H_NEXT,4,2                     ## @H_NEXT
	.comm	_H_LAST,4,2                     ## @H_LAST
	.comm	_H_NEXT_EVENT,4,2               ## @H_NEXT_EVENT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"history number %s not found (internal error)"

	.comm	_H_PREV_STR,4,2                 ## @H_PREV_STR
L_.str.1:                               ## @.str.1
	.asciz	"history pattern not found: %s"

	.no_dead_strip	_str_to_event
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function str_to_event
_str_to_event:                          ; @str_to_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	x19, x0
Lloh0:
	adrp	x23, _hist@GOTPAGE
Lloh1:
	ldr	x23, [x23, _hist@GOTPAGEOFF]
	ldr	w0, [x23]
Lloh2:
	adrp	x24, _H_FIRST@GOTPAGE
Lloh3:
	ldr	x24, [x24, _H_FIRST@GOTPAGEOFF]
	ldr	w2, [x24]
	add	x1, sp, #8
	bl	_history
	mov	x21, x0
	mov	w25, #0
	ldrsb	w8, [x19]
	cmp	w8, #43
	b.eq	LBB0_3
; %bb.1:
	mov	x22, x19
	cmp	w8, #45
	b.ne	LBB0_4
; %bb.2:
	mov	w25, #1
LBB0_3:
	add	x22, x19, #1
LBB0_4:
	mov	x0, x22
	bl	_is_number
	cbz	x0, LBB0_11
; %bb.5:
	mov	x0, x22
	bl	_atoi
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w25, LBB0_13
; %bb.6:
	cmn	w21, #1
	cset	w8, eq
	ccmp	w0, #0, #4, ne
	b.eq	LBB0_9
; %bb.7:
	sub	w20, w0, #1
Lloh4:
	adrp	x21, _H_NEXT@GOTPAGE
Lloh5:
	ldr	x21, [x21, _H_NEXT@GOTPAGEOFF]
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x23]
	ldr	w2, [x21]
	add	x1, sp, #8
	bl	_history
	cmn	w0, #1
	cset	w8, eq
	ccmp	w20, #0, #4, ne
	sub	w20, w20, #1
	b.ne	LBB0_8
LBB0_9:
	cbz	w8, LBB0_18
; %bb.10:
	ldr	w0, [x23]
Lloh6:
	adrp	x8, _H_LAST@GOTPAGE
Lloh7:
	ldr	x8, [x8, _H_LAST@GOTPAGEOFF]
	b	LBB0_15
LBB0_11:
	ldr	w0, [x23]
Lloh8:
	adrp	x8, _H_PREV_STR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _H_PREV_STR@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	str	x19, [sp]
	add	x1, sp, #8
	bl	_history
	cmn	w0, #1
	b.ne	LBB0_18
; %bb.12:
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_17
LBB0_13:
	ldr	w8, [x23]
Lloh13:
	adrp	x9, _H_NEXT_EVENT@GOTPAGE
Lloh14:
	ldr	x9, [x9, _H_NEXT_EVENT@GOTPAGEOFF]
Lloh15:
	ldr	w2, [x9]
	str	x0, [sp]
	add	x1, sp, #8
	mov	x0, x8
	bl	_history
	cmn	w0, #1
	b.ne	LBB0_18
; %bb.14:
	ldr	w0, [x23]
Lloh16:
	adrp	x8, _H_LAST@GOTPAGE
Lloh17:
	ldr	x8, [x8, _H_LAST@GOTPAGEOFF]
	cmp	w20, #0
	csel	x8, x8, x24, eq
LBB0_15:
	ldr	w2, [x8]
	add	x1, sp, #8
	bl	_history
	cmn	w0, #1
	b.ne	LBB0_18
; %bb.16:
Lloh18:
	adrp	x0, l_.str@PAGE
Lloh19:
	add	x0, x0, l_.str@PAGEOFF
LBB0_17:
	mov	x1, x19
	bl	_error
LBB0_18:
	ldr	w0, [sp, #8]
	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	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_hist,4,2                       ; @hist
	.comm	_H_FIRST,4,2                    ; @H_FIRST
	.comm	_H_NEXT,4,2                     ; @H_NEXT
	.comm	_H_LAST,4,2                     ; @H_LAST
	.comm	_H_NEXT_EVENT,4,2               ; @H_NEXT_EVENT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"history number %s not found (internal error)"

	.comm	_H_PREV_STR,4,2                 ; @H_PREV_STR
l_.str.1:                               ; @.str.1
	.asciz	"history pattern not found: %s"

	.no_dead_strip	_str_to_event
.subsections_via_symbols
