	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rechist                        ## -- Begin function rechist
	.p2align	4, 0x90
_rechist:                               ## @rechist
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MAXPATHLEN@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	testq	%r13, %r13
	jne	LBB0_2
## %bb.1:
	testl	%r14d, %r14d
	je	LBB0_28
LBB0_2:
	movq	%rbx, -96(%rbp)                 ## 8-byte Spill
	movq	_STRsavehist@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	callq	_varval
	movq	_STRNULL@GOTPCREL(%rip), %rbx
	cmpq	(%rbx), %rax
	jne	LBB0_5
## %bb.3:
	movl	$129, %edi
	callq	_varval
	cmpq	(%rbx), %rax
	jne	LBB0_5
## %bb.4:
	movq	_STRmaxint@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
LBB0_5:
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	testq	%r13, %r13
	je	LBB0_6
## %bb.9:
	movq	_G_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_globone
	jmp	LBB0_10
LBB0_6:
	movq	_STRhistfile@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_varval
	cmpq	(%rbx), %rax
	je	LBB0_7
## %bb.8:
	movq	%rax, %rdi
	callq	_Strsave
	jmp	LBB0_10
LBB0_7:
	movq	_STRhome@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_varval
	movq	_STRtildothist@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	addq	$4, %rsi
	movq	%rax, %rdi
	callq	_Strspl
LBB0_10:
	movq	%rax, %r13
	movq	_xfree@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	callq	_cleanup_push
	movq	_didfds@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%ecx, -52(%rbp)                 ## 4-byte Spill
	movl	$0, (%rax)
	movq	(%r14), %rdi
	callq	_adrof
	testq	%rax, %rax
	je	LBB0_22
## %bb.11:
	movq	%rax, %rbx
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_22
## %bb.12:
	movq	8(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_22
## %bb.13:
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	movq	%r12, -80(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	movq	_STRlock@GOTPCREL(%rip), %r13
	xorl	%r15d, %r15d
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movq	_STRmerge@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_eq
	cmpq	$1, %rax
	sbbl	$-1, %r12d
	movq	(%rbx), %rax
	movq	8(%rax,%r14), %rdi
	movl	(%r13), %esi
	callq	_eq
	cmpq	$1, %rax
	sbbl	$-1, %r15d
	movq	(%rbx), %rax
	movq	16(%rax,%r14), %rdi
	addq	$8, %r14
	testq	%rdi, %rdi
	jne	LBB0_14
## %bb.15:
	testl	%r12d, %r12d
	movq	-80(%rbp), %r12                 ## 8-byte Reload
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	je	LBB0_22
## %bb.16:
	testl	%r15d, %r15d
	je	LBB0_19
## %bb.17:
	movq	%r13, %rdi
	callq	_short2str
	movl	%eax, %edi
	callq	_strsave
	movq	%rax, %rbx
	movq	_xfree@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	callq	_cleanup_push
	movq	%rbx, %rdi
	movl	$100, %esi
	callq	_dot_lock
	testq	%rax, %rax
	jne	LBB0_19
## %bb.18:
	movq	_dotlock_cleanup@GOTPCREL(%rip), %rsi
	movq	%rbx, %rdi
	callq	_cleanup_push
LBB0_19:
	callq	_getexit
	xorl	%eax, %eax
	callq	_setexit
	testq	%rax, %rax
	je	LBB0_21
## %bb.20:
	movq	%r13, %rdi
	movl	$1, %esi
	callq	_loadhist
LBB0_21:
	callq	_resexit
LBB0_22:
	xorl	%eax, %eax
	callq	_randsuf
	movq	%rax, %rbx
	leaq	L_.str(%rip), %rdx
	movq	%r12, %rdi
	movq	-96(%rbp), %rsi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	movq	%r13, %rcx
	movq	%rax, %r8
	callq	_xsnprintf
	movq	%rbx, %rdi
	callq	_xfree
	movq	%r12, %rdi
	movl	$384, %esi                      ## imm = 0x180
	callq	_xcreat
	cmpl	$-1, %eax
	je	LBB0_23
## %bb.24:
	movl	%eax, %ebx
	movq	%r13, %rdi
	callq	_short2str
	leaq	-64(%rbp), %rsi
	movl	%eax, %edi
	callq	_stat
	cmpl	$-1, %eax
	je	LBB0_26
## %bb.25:
	movl	-60(%rbp), %edx
	movl	-56(%rbp), %esi
	movl	%ebx, %edi
	callq	_fchown
	movl	%eax, %edi
	callq	_TCSH_IGNORE
	movl	-64(%rbp), %esi
	movl	%ebx, %edi
	callq	_fchmod
	movl	%eax, %edi
	callq	_TCSH_IGNORE
LBB0_26:
	movq	_SHOUT@GOTPCREL(%rip), %r14
	movl	(%r14), %r15d
	movl	%ebx, (%r14)
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, _rechist.dumphist+16(%rip)
	leaq	_rechist.dumphist(%rip), %rdi
	xorl	%esi, %esi
	callq	_dohist
	movl	%ebx, %edi
	callq	_xclose
	movl	%r15d, (%r14)
	movq	_didfds@GOTPCREL(%rip), %rax
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, (%rax)
	movq	%r13, %rdi
	callq	_short2str
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_rename
	jmp	LBB0_27
LBB0_23:
	movq	_didfds@GOTPCREL(%rip), %rax
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, (%rax)
LBB0_27:
	movq	%r13, %rdi
	callq	_cleanup_until
LBB0_28:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_30
## %bb.29:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_30:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAXPATHLEN,4,2                 ## @MAXPATHLEN
	.section	__DATA,__data
	.p2align	4                               ## @rechist.dumphist
_rechist.dumphist:
	.quad	129
	.quad	128
	.quad	0
	.quad	0

	.comm	_STRsavehist,8,3                ## @STRsavehist
	.comm	_STRNULL,8,3                    ## @STRNULL
	.comm	_STRmaxint,8,3                  ## @STRmaxint
	.comm	_STRhistfile,8,3                ## @STRhistfile
	.comm	_STRhome,8,3                    ## @STRhome
	.comm	_STRtildothist,8,3              ## @STRtildothist
	.comm	_G_ERROR,4,2                    ## @G_ERROR
	.comm	_didfds,4,2                     ## @didfds
	.comm	_STRmerge,4,2                   ## @STRmerge
	.comm	_STRlock,4,2                    ## @STRlock
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%S.%S"

	.comm	_SHOUT,4,2                      ## @SHOUT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rechist                        ; -- Begin function rechist
	.p2align	2
_rechist:                               ; @rechist
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #32
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x8, _MAXPATHLEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAXPATHLEN@GOTPAGEOFF]
Lloh5:
	ldr	w22, [x8]
	mov	x9, x22
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x22, #15
	and	x9, x9, #0x1fffffff0
	sub	x19, x8, x9
	mov	sp, x19
	cbnz	x0, LBB0_2
; %bb.1:
	cbz	w1, LBB0_27
LBB0_2:
Lloh8:
	adrp	x23, _STRsavehist@GOTPAGE
Lloh9:
	ldr	x23, [x23, _STRsavehist@GOTPAGEOFF]
	ldr	x0, [x23]
	bl	_varval
	mov	x20, x0
Lloh10:
	adrp	x24, _STRNULL@GOTPAGE
Lloh11:
	ldr	x24, [x24, _STRNULL@GOTPAGEOFF]
	ldr	x8, [x24]
	cmp	x0, x8
	b.eq	LBB0_5
; %bb.3:
	cbz	x21, LBB0_6
LBB0_4:
Lloh12:
	adrp	x8, _G_ERROR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _G_ERROR@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_globone
	b	LBB0_9
LBB0_5:
	mov	w0, #129
	bl	_varval
	ldr	x8, [x24]
Lloh15:
	adrp	x9, _STRmaxint@GOTPAGE
Lloh16:
	ldr	x9, [x9, _STRmaxint@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x0, x8
	csel	x20, x9, x0, eq
	cbnz	x21, LBB0_4
LBB0_6:
Lloh18:
	adrp	x8, _STRhistfile@GOTPAGE
Lloh19:
	ldr	x8, [x8, _STRhistfile@GOTPAGEOFF]
Lloh20:
	ldr	x0, [x8]
	bl	_varval
	ldr	x8, [x24]
	cmp	x0, x8
	b.eq	LBB0_8
; %bb.7:
	bl	_Strsave
	b	LBB0_9
LBB0_8:
Lloh21:
	adrp	x8, _STRhome@GOTPAGE
Lloh22:
	ldr	x8, [x8, _STRhome@GOTPAGEOFF]
Lloh23:
	ldr	x0, [x8]
	bl	_varval
Lloh24:
	adrp	x8, _STRtildothist@GOTPAGE
Lloh25:
	ldr	x8, [x8, _STRtildothist@GOTPAGEOFF]
Lloh26:
	ldr	x8, [x8]
	add	x1, x8, #4
	bl	_Strspl
LBB0_9:
	mov	x21, x0
Lloh27:
	adrp	x1, _xfree@GOTPAGE
Lloh28:
	ldr	x1, [x1, _xfree@GOTPAGEOFF]
	bl	_cleanup_push
Lloh29:
	adrp	x25, _didfds@GOTPAGE
Lloh30:
	ldr	x25, [x25, _didfds@GOTPAGEOFF]
	ldr	w28, [x25]
	str	wzr, [x25]
	ldr	x0, [x23]
	bl	_adrof
	cbz	x0, LBB0_21
; %bb.10:
	mov	x23, x0
	ldr	x8, [x0]
	cbz	x8, LBB0_21
; %bb.11:
	ldr	x0, [x8, #8]
	cbz	x0, LBB0_21
; %bb.12:
	stur	w28, [x29, #-108]               ; 4-byte Folded Spill
	mov	x28, #0
	mov	w26, #0
	mov	w27, #0
Lloh31:
	adrp	x24, _STRmerge@GOTPAGE
Lloh32:
	ldr	x24, [x24, _STRmerge@GOTPAGEOFF]
Lloh33:
	adrp	x25, _STRlock@GOTPAGE
Lloh34:
	ldr	x25, [x25, _STRlock@GOTPAGEOFF]
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x24]
	bl	_eq
	cmp	x0, #0
	cinc	w27, w27, ne
	ldr	x8, [x23]
	add	x8, x8, x28
	ldr	x0, [x8, #8]
	ldr	w1, [x25]
	bl	_eq
	cmp	x0, #0
	cinc	w26, w26, ne
	ldr	x8, [x23]
	add	x8, x8, x28
	ldr	x0, [x8, #16]
	add	x28, x28, #8
	cbnz	x0, LBB0_13
; %bb.14:
Lloh35:
	adrp	x25, _didfds@GOTPAGE
Lloh36:
	ldr	x25, [x25, _didfds@GOTPAGEOFF]
	ldur	w28, [x29, #-108]               ; 4-byte Folded Reload
	cbz	w27, LBB0_21
; %bb.15:
	cbz	w26, LBB0_18
; %bb.16:
	mov	x0, x21
	bl	_short2str
	bl	_strsave
	mov	x23, x0
Lloh37:
	adrp	x1, _xfree@GOTPAGE
Lloh38:
	ldr	x1, [x1, _xfree@GOTPAGEOFF]
	bl	_cleanup_push
	mov	x0, x23
	mov	w1, #100
	bl	_dot_lock
	cbnz	x0, LBB0_18
; %bb.17:
Lloh39:
	adrp	x1, _dotlock_cleanup@GOTPAGE
Lloh40:
	ldr	x1, [x1, _dotlock_cleanup@GOTPAGEOFF]
	mov	x0, x23
	bl	_cleanup_push
LBB0_18:
	bl	_getexit
	bl	_setexit
	cbz	x0, LBB0_20
; %bb.19:
	mov	x0, x21
	mov	w1, #1
	bl	_loadhist
LBB0_20:
	bl	_resexit
LBB0_21:
	bl	_randsuf
	mov	x23, x0
Lloh41:
	adrp	x2, l_.str@PAGE
Lloh42:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	mov	x1, x22
	mov	x3, x21
	mov	x4, x23
	bl	_xsnprintf
	mov	x0, x23
	bl	_xfree
	mov	x0, x19
	mov	w1, #384
	bl	_xcreat
	cmn	w0, #1
	b.eq	LBB0_25
; %bb.22:
	mov	x22, x0
	mov	x0, x21
	bl	_short2str
	sub	x1, x29, #104
	bl	_stat
	cmn	w0, #1
	b.eq	LBB0_24
; %bb.23:
	ldp	w2, w1, [x29, #-100]
	mov	x0, x22
	bl	_fchown
	bl	_TCSH_IGNORE
	ldur	w1, [x29, #-104]
	mov	x0, x22
	bl	_fchmod
	bl	_TCSH_IGNORE
LBB0_24:
Lloh43:
	adrp	x23, _SHOUT@GOTPAGE
Lloh44:
	ldr	x23, [x23, _SHOUT@GOTPAGEOFF]
	ldr	w24, [x23]
	str	w22, [x23]
Lloh45:
	adrp	x0, _rechist.dumphist@PAGE
Lloh46:
	add	x0, x0, _rechist.dumphist@PAGEOFF
	str	x20, [x0, #16]
	mov	x1, #0
	bl	_dohist
	mov	x0, x22
	bl	_xclose
	str	w24, [x23]
	str	w28, [x25]
	mov	x0, x21
	bl	_short2str
	mov	x1, x0
	mov	x0, x19
	bl	_rename
	b	LBB0_26
LBB0_25:
	str	w28, [x25]
LBB0_26:
	mov	x0, x21
	bl	_cleanup_until
LBB0_27:
	ldur	x8, [x29, #-88]
Lloh47:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh48:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh49:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_29
; %bb.28:
	sub	sp, x29, #80
	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
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_29:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh39, Lloh40
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpAdd	Lloh45, Lloh46
	.loh AdrpLdrGot	Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.cfi_endproc
                                        ; -- End function
	.comm	_MAXPATHLEN,4,2                 ; @MAXPATHLEN
	.section	__DATA,__data
	.p2align	3                               ; @rechist.dumphist
_rechist.dumphist:
	.quad	129
	.quad	128
	.quad	0
	.quad	0

	.comm	_STRsavehist,8,3                ; @STRsavehist
	.comm	_STRNULL,8,3                    ; @STRNULL
	.comm	_STRmaxint,8,3                  ; @STRmaxint
	.comm	_STRhistfile,8,3                ; @STRhistfile
	.comm	_STRhome,8,3                    ; @STRhome
	.comm	_STRtildothist,8,3              ; @STRtildothist
	.comm	_G_ERROR,4,2                    ; @G_ERROR
	.comm	_didfds,4,2                     ; @didfds
	.comm	_STRmerge,4,2                   ; @STRmerge
	.comm	_STRlock,4,2                    ; @STRlock
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%S.%S"

	.comm	_SHOUT,4,2                      ; @SHOUT
.subsections_via_symbols
