	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_history_search                 ## -- Begin function history_search
	.p2align	4, 0x90
_history_search:                        ## @history_search
	.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, %r15d
	movq	%rdi, %rbx
	movq	_h@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	movq	_H_CURR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-48(%rbp), %rsi
	xorl	%eax, %eax
	callq	_history
	movl	$-1, %ecx
	testl	%eax, %eax
	jne	LBB0_8
## %bb.1:
	movl	-48(%rbp), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	_H_PREV@GOTPCREL(%rip), %r14
	leaq	-48(%rbp), %r13
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r12), %edi
	movl	(%rax), %edx
	movq	%r13, %rsi
	xorl	%eax, %eax
	callq	_history
	testl	%eax, %eax
	jne	LBB0_7
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	-44(%rbp), %edi
	movq	%rbx, %rsi
	callq	_strstr
	testq	%rax, %rax
	jne	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %rax
	testl	%r15d, %r15d
	jns	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_H_NEXT@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_3:
	subl	-44(%rbp), %eax
	movl	%eax, %ecx
	jmp	LBB0_8
LBB0_7:
	movl	(%r12), %edi
	movq	_H_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-48(%rbp), %rsi
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	xorl	%eax, %eax
	callq	_history
	movl	$-1, %ecx
LBB0_8:
	movl	%ecx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_h,4,2                          ## @h
	.comm	_H_CURR,4,2                     ## @H_CURR
	.comm	_H_NEXT,4,2                     ## @H_NEXT
	.comm	_H_PREV,4,2                     ## @H_PREV
	.comm	_H_SET,4,2                      ## @H_SET
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_history_search                 ; -- Begin function history_search
	.p2align	2
_history_search:                        ; @history_search
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x21, _h@GOTPAGE
Lloh1:
	ldr	x21, [x21, _h@GOTPAGEOFF]
	ldr	w0, [x21]
Lloh2:
	adrp	x8, _H_CURR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _H_CURR@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	add	x1, sp, #8
	bl	_history
	cbnz	w0, LBB0_5
; %bb.1:
	ldr	w22, [sp, #8]
Lloh5:
	adrp	x23, _H_NEXT@GOTPAGE
Lloh6:
	ldr	x23, [x23, _H_NEXT@GOTPAGEOFF]
Lloh7:
	adrp	x24, _H_PREV@GOTPAGE
Lloh8:
	ldr	x24, [x24, _H_PREV@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [sp, #12]
	mov	x1, x20
	bl	_strstr
	cbnz	x0, LBB0_7
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x21]
	cmp	w19, #0
	csel	x8, x23, x24, lt
	ldr	w2, [x8]
	add	x1, sp, #8
	bl	_history
	cbz	w0, LBB0_2
; %bb.4:
	ldr	w0, [x21]
Lloh9:
	adrp	x8, _H_SET@GOTPAGE
Lloh10:
	ldr	x8, [x8, _H_SET@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	str	x22, [sp]
	add	x1, sp, #8
	bl	_history
LBB0_5:
	mov	w0, #-1
LBB0_6:
	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
	add	sp, sp, #80
	ret
LBB0_7:
	ldr	w8, [sp, #12]
	sub	w0, w0, w8
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_h,4,2                          ; @h
	.comm	_H_CURR,4,2                     ; @H_CURR
	.comm	_H_NEXT,4,2                     ; @H_NEXT
	.comm	_H_PREV,4,2                     ; @H_PREV
	.comm	_H_SET,4,2                      ; @H_SET
.subsections_via_symbols
