	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_replace_history_entry          ## -- Begin function replace_history_entry
	.p2align	4, 0x90
_replace_history_entry:                 ## @replace_history_entry
	.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	%edx, %r14d
	movq	%rsi, %rbx
	movl	%edi, %r13d
	movq	_h@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	movq	_e@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jne	LBB0_3
LBB0_2:
	xorl	%eax, %eax
	callq	_rl_initialize
	movq	(%r12), %rdi
LBB0_3:
	movq	_H_CURR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%r15d, %r15d
	leaq	-48(%rbp), %rsi
	xorl	%eax, %eax
	callq	_history
	testq	%rax, %rax
	jne	LBB0_12
## %bb.4:
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movl	%r14d, -56(%rbp)                ## 4-byte Spill
	movl	-48(%rbp), %r14d
	movq	(%r12), %rdi
	movq	_H_LAST@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%r15d, %r15d
	leaq	-48(%rbp), %rsi
	xorl	%eax, %eax
	callq	_history
	testq	%rax, %rax
	jne	LBB0_12
## %bb.5:
	movl	%r14d, -52(%rbp)                ## 4-byte Spill
	movl	$16, %edi
	callq	_el_malloc
	testq	%rax, %rax
	je	LBB0_11
## %bb.6:
	movq	%rax, %r15
	movq	(%r12), %rdi
	movq	_H_NEXT_EVDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %r8
	addq	$8, %r8
	leaq	-48(%rbp), %rsi
	movl	%r13d, %ecx
	xorl	%eax, %eax
	callq	_history
	testq	%rax, %rax
	je	LBB0_7
LBB0_10:
	movq	%r15, %rdi
	callq	_el_free
LBB0_11:
	xorl	%r15d, %r15d
LBB0_12:
	movq	%r15, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movl	-44(%rbp), %edi
	callq	_strdup
	movq	%rax, (%r15)
	testq	%rax, %rax
	je	LBB0_10
## %bb.8:
	movq	(%r12), %rdi
	movq	_H_REPLACE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-48(%rbp), %rsi
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movl	-56(%rbp), %r8d                 ## 4-byte Reload
	xorl	%eax, %eax
	callq	_history
	testq	%rax, %rax
	jne	LBB0_10
## %bb.9:
	movq	(%r12), %rdi
	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
	testq	%rax, %rax
	jne	LBB0_10
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_h,8,3                          ## @h
	.comm	_e,8,3                          ## @e
	.comm	_H_CURR,4,2                     ## @H_CURR
	.comm	_H_LAST,4,2                     ## @H_LAST
	.comm	_H_NEXT_EVDATA,4,2              ## @H_NEXT_EVDATA
	.comm	_H_REPLACE,4,2                  ## @H_REPLACE
	.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	_replace_history_entry          ; -- Begin function replace_history_entry
	.p2align	2
_replace_history_entry:                 ; @replace_history_entry
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x20, x2
	mov	x19, x1
	mov	x22, x0
Lloh0:
	adrp	x23, _h@GOTPAGE
Lloh1:
	ldr	x23, [x23, _h@GOTPAGEOFF]
	ldr	x0, [x23]
Lloh2:
	adrp	x8, _e@GOTPAGE
Lloh3:
	ldr	x8, [x8, _e@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cmp	x0, #0
	ccmp	x8, #0, #4, ne
	b.ne	LBB0_2
; %bb.1:
	bl	_rl_initialize
	ldr	x0, [x23]
LBB0_2:
Lloh5:
	adrp	x8, _H_CURR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _H_CURR@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	add	x1, sp, #24
	bl	_history
	cbnz	x0, LBB0_7
; %bb.3:
	ldr	w24, [sp, #24]
	ldr	x0, [x23]
Lloh8:
	adrp	x8, _H_LAST@GOTPAGE
Lloh9:
	ldr	x8, [x8, _H_LAST@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	add	x1, sp, #24
	bl	_history
	cbnz	x0, LBB0_7
; %bb.4:
	mov	w0, #16
	bl	_el_malloc
	mov	x21, x0
	cbz	x0, LBB0_8
; %bb.5:
	ldr	x0, [x23]
Lloh11:
	adrp	x8, _H_NEXT_EVDATA@GOTPAGE
Lloh12:
	ldr	x8, [x8, _H_NEXT_EVDATA@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	add	x8, x21, #8
	stp	x22, x8, [sp]
	add	x1, sp, #24
	bl	_history
	cbz	x0, LBB0_9
LBB0_6:
	mov	x0, x21
	bl	_el_free
LBB0_7:
	mov	x21, #0
LBB0_8:
	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
	add	sp, sp, #96
	ret
LBB0_9:
	ldr	w0, [sp, #28]
	bl	_strdup
	str	x0, [x21]
	cbz	x0, LBB0_6
; %bb.10:
	ldr	x0, [x23]
Lloh14:
	adrp	x8, _H_REPLACE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _H_REPLACE@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	stp	x19, x20, [sp]
	add	x1, sp, #24
	bl	_history
	cbnz	x0, LBB0_6
; %bb.11:
	ldr	x0, [x23]
Lloh17:
	adrp	x8, _H_SET@GOTPAGE
Lloh18:
	ldr	x8, [x8, _H_SET@GOTPAGEOFF]
Lloh19:
	ldr	w2, [x8]
	str	x24, [sp]
	add	x1, sp, #24
	bl	_history
	cbnz	x0, LBB0_6
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_h,8,3                          ; @h
	.comm	_e,8,3                          ; @e
	.comm	_H_CURR,4,2                     ; @H_CURR
	.comm	_H_LAST,4,2                     ; @H_LAST
	.comm	_H_NEXT_EVDATA,4,2              ; @H_NEXT_EVDATA
	.comm	_H_REPLACE,4,2                  ; @H_REPLACE
	.comm	_H_SET,4,2                      ; @H_SET
.subsections_via_symbols
