	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_append_history                 ## -- Begin function append_history
	.p2align	4, 0x90
_append_history:                        ## @append_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	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movl	%edi, %r14d
	movq	_h@GOTPCREL(%rip), %r12
	cmpq	$0, (%r12)
	je	LBB0_2
## %bb.1:
	movq	_e@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_2
## %bb.3:
	testq	%rbx, %rbx
	jne	LBB0_6
	jmp	LBB0_4
LBB0_2:
	xorl	%eax, %eax
	callq	_rl_initialize
	testq	%rbx, %rbx
	jne	LBB0_6
LBB0_4:
	xorl	%eax, %eax
	callq	__default_history_file
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_5
LBB0_6:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_fopen
	testq	%rax, %rax
	je	LBB0_5
## %bb.7:
	movq	%rax, %r15
	movq	(%r12), %rdi
	movq	_H_NSAVE_FP@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movslq	%r14d, %rcx
	leaq	-36(%rbp), %rsi
	movq	%r15, %r8
	callq	_history
	cmpl	$-1, %eax
	je	LBB0_8
## %bb.11:
	movq	%r15, %rdi
	callq	_fclose
	xorl	%ebx, %ebx
	jmp	LBB0_12
LBB0_5:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_12
LBB0_8:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	testl	%ebx, %ebx
	jne	LBB0_10
## %bb.9:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_10:
	movq	%r15, %rdi
	callq	_fclose
LBB0_12:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_h,8,3                          ## @h
	.comm	_e,8,3                          ## @e
	.comm	_errno,4,2                      ## @errno
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"a"

	.comm	_H_NSAVE_FP,4,2                 ## @H_NSAVE_FP
	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_append_history                 ; -- Begin function append_history
	.p2align	2
_append_history:                        ; @append_history
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x21, _h@GOTPAGE
Lloh1:
	ldr	x21, [x21, _h@GOTPAGEOFF]
	ldr	x8, [x21]
Lloh2:
	adrp	x9, _e@GOTPAGE
Lloh3:
	ldr	x9, [x9, _e@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, #0
	ccmp	x9, #0, #4, ne
	b.ne	LBB0_2
; %bb.1:
	bl	_rl_initialize
LBB0_2:
	cbnz	x20, LBB0_4
; %bb.3:
	bl	__default_history_file
	mov	x20, x0
	cbz	x0, LBB0_7
LBB0_4:
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_fopen
	cbz	x0, LBB0_7
; %bb.5:
	mov	x20, x0
	ldr	x0, [x21]
Lloh7:
	adrp	x8, _H_NSAVE_FP@GOTPAGE
Lloh8:
	ldr	x8, [x8, _H_NSAVE_FP@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
	sxtw	x3, w19
	add	x1, sp, #12
	mov	x4, x20
	bl	_history
	cmn	w0, #1
	b.eq	LBB0_8
; %bb.6:
	mov	x0, x20
	bl	_fclose
	mov	w19, #0
	b	LBB0_9
LBB0_7:
Lloh10:
	adrp	x8, _errno@GOTPAGE
Lloh11:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh12:
	ldr	w19, [x8]
	b	LBB0_9
LBB0_8:
Lloh13:
	adrp	x8, _errno@GOTPAGE
Lloh14:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
Lloh16:
	adrp	x9, _EINVAL@GOTPAGE
Lloh17:
	ldr	x9, [x9, _EINVAL@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	cmp	w8, #0
	csel	w19, w9, w8, eq
	mov	x0, x20
	bl	_fclose
LBB0_9:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_h,8,3                          ; @h
	.comm	_e,8,3                          ; @e
	.comm	_errno,4,2                      ; @errno
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"a"

	.comm	_H_NSAVE_FP,4,2                 ; @H_NSAVE_FP
	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
