	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_read_history                   ## -- Begin function read_history
	.p2align	4, 0x90
_read_history:                          ## @read_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_h@GOTPCREL(%rip), %r14
	cmpq	$0, (%r14)
	je	LBB0_3
## %bb.1:
	movq	_e@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_3
## %bb.2:
	testq	%rbx, %rbx
	jne	LBB0_5
	jmp	LBB0_4
LBB0_3:
	xorl	%eax, %eax
	callq	_rl_initialize
	testq	%rbx, %rbx
	jne	LBB0_5
LBB0_4:
	xorl	%eax, %eax
	callq	__default_history_file
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_12
LBB0_5:
	movq	_errno@GOTPCREL(%rip), %r15
	movl	$0, (%r15)
	movq	(%r14), %rdi
	movq	_H_LOAD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-32(%rbp), %rsi
	movq	%rbx, %rcx
	xorl	%eax, %eax
	callq	_history
	cmpl	$-1, %eax
	je	LBB0_8
## %bb.6:
	movq	(%r14), %rdi
	movq	_H_GETSIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-32(%rbp), %rsi
	xorl	%eax, %eax
	callq	_history
	testl	%eax, %eax
	je	LBB0_10
## %bb.7:
	movq	_history_length@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	jmp	LBB0_11
LBB0_8:
	movl	(%r15), %eax
	testl	%eax, %eax
	jne	LBB0_14
## %bb.9:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_10:
	movq	-32(%rbp), %rax
	movq	_history_length@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
LBB0_11:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	sarq	$63, %rax
	andl	(%rcx), %eax
	jmp	LBB0_14
LBB0_12:
	movq	_errno@GOTPCREL(%rip), %rax
LBB0_13:
	movl	(%rax), %eax
LBB0_14:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$8, %rsp
	popq	%rbx
	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
	.comm	_H_LOAD,4,2                     ## @H_LOAD
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_H_GETSIZE,4,2                  ## @H_GETSIZE
	.comm	_history_length,8,3             ## @history_length
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_read_history                   ; -- Begin function read_history
	.p2align	2
_read_history:                          ; @read_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	x19, x0
Lloh0:
	adrp	x20, _h@GOTPAGE
Lloh1:
	ldr	x20, [x20, _h@GOTPAGEOFF]
	ldr	x8, [x20]
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	x19, LBB0_4
; %bb.3:
	bl	__default_history_file
	mov	x19, x0
	cbz	x0, LBB0_10
LBB0_4:
Lloh5:
	adrp	x21, _errno@GOTPAGE
Lloh6:
	ldr	x21, [x21, _errno@GOTPAGEOFF]
	str	wzr, [x21]
	ldr	x0, [x20]
Lloh7:
	adrp	x8, _H_LOAD@GOTPAGE
Lloh8:
	ldr	x8, [x8, _H_LOAD@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
	str	x19, [sp]
	add	x1, sp, #8
	bl	_history
	cmn	w0, #1
	b.eq	LBB0_7
; %bb.5:
	ldr	x0, [x20]
Lloh10:
	adrp	x8, _H_GETSIZE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _H_GETSIZE@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
	add	x1, sp, #8
	bl	_history
	cbz	w0, LBB0_8
; %bb.6:
Lloh13:
	adrp	x8, _history_length@GOTPAGE
Lloh14:
	ldr	x8, [x8, _history_length@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	b	LBB0_9
LBB0_7:
	ldr	w8, [x21]
Lloh16:
	adrp	x9, _EINVAL@GOTPAGE
Lloh17:
	ldr	x9, [x9, _EINVAL@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	cmp	w8, #0
	csel	w0, w9, w8, eq
	b	LBB0_11
LBB0_8:
	ldr	x8, [sp, #8]
Lloh19:
	adrp	x9, _history_length@GOTPAGE
Lloh20:
	ldr	x9, [x9, _history_length@GOTPAGEOFF]
Lloh21:
	str	x8, [x9]
LBB0_9:
Lloh22:
	adrp	x9, _EINVAL@GOTPAGE
Lloh23:
	ldr	x9, [x9, _EINVAL@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	asr	x8, x8, #63
	and	w0, w8, w9
	b	LBB0_11
LBB0_10:
Lloh25:
	adrp	x8, _errno@GOTPAGE
Lloh26:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh27:
	ldr	w0, [x8]
LBB0_11:
	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 AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotStr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_h,8,3                          ; @h
	.comm	_e,8,3                          ; @e
	.comm	_errno,4,2                      ; @errno
	.comm	_H_LOAD,4,2                     ; @H_LOAD
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_H_GETSIZE,4,2                  ; @H_GETSIZE
	.comm	_history_length,8,3             ; @history_length
.subsections_via_symbols
