	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_add_history                    ## -- Begin function add_history
	.p2align	4, 0x90
_add_history:                           ## @add_history
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	_h@GOTPCREL(%rip), %r14
	movq	(%r14), %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	(%r14), %rdi
LBB0_3:
	movq	_H_ENTER@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-24(%rbp), %rsi
	movq	%rbx, %rcx
	xorl	%eax, %eax
	callq	_history
	cmpl	$-1, %eax
	je	LBB0_7
## %bb.4:
	movq	(%r14), %rdi
	movq	_H_GETSIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-24(%rbp), %rsi
	xorl	%eax, %eax
	callq	_history
	movq	-24(%rbp), %rax
	movq	_history_length@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.5:
	movq	_history_base@GOTPCREL(%rip), %rax
	incl	(%rax)
	jmp	LBB0_7
LBB0_6:
	movq	_history_offset@GOTPCREL(%rip), %rdx
	incl	(%rdx)
	movq	%rax, (%rcx)
LBB0_7:
	xorl	%eax, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_h,8,3                          ## @h
	.comm	_e,8,3                          ## @e
	.comm	_H_ENTER,4,2                    ## @H_ENTER
	.comm	_H_GETSIZE,4,2                  ## @H_GETSIZE
	.comm	_history_length,8,3             ## @history_length
	.comm	_history_base,4,2               ## @history_base
	.comm	_history_offset,4,2             ## @history_offset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_add_history                    ; -- Begin function add_history
	.p2align	2
_add_history:                           ; @add_history
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x20, _h@GOTPAGE
Lloh1:
	ldr	x20, [x20, _h@GOTPAGEOFF]
	ldr	x0, [x20]
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, [x20]
LBB0_2:
Lloh5:
	adrp	x8, _H_ENTER@GOTPAGE
Lloh6:
	ldr	x8, [x8, _H_ENTER@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	str	x19, [sp]
	add	x1, sp, #8
	bl	_history
	cmn	w0, #1
	b.eq	LBB0_6
; %bb.3:
	ldr	x0, [x20]
Lloh8:
	adrp	x8, _H_GETSIZE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _H_GETSIZE@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	add	x1, sp, #8
	bl	_history
	ldr	x8, [sp, #8]
Lloh11:
	adrp	x9, _history_length@GOTPAGE
Lloh12:
	ldr	x9, [x9, _history_length@GOTPAGEOFF]
	ldr	x10, [x9]
	cmp	x8, x10
	b.ne	LBB0_5
; %bb.4:
Lloh13:
	adrp	x8, _history_base@GOTPAGE
Lloh14:
	ldr	x8, [x8, _history_base@GOTPAGEOFF]
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
	b	LBB0_6
LBB0_5:
Lloh15:
	adrp	x10, _history_offset@GOTPAGE
Lloh16:
	ldr	x10, [x10, _history_offset@GOTPAGEOFF]
	ldr	w11, [x10]
	add	w11, w11, #1
	str	w11, [x10]
	str	x8, [x9]
LBB0_6:
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_h,8,3                          ; @h
	.comm	_e,8,3                          ; @e
	.comm	_H_ENTER,4,2                    ; @H_ENTER
	.comm	_H_GETSIZE,4,2                  ; @H_GETSIZE
	.comm	_history_length,8,3             ; @history_length
	.comm	_history_base,4,2               ; @history_base
	.comm	_history_offset,4,2             ; @history_offset
.subsections_via_symbols
