	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fmthist                        ## -- Begin function fmthist
	.p2align	4, 0x90
_fmthist:                               ## @fmthist
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpl	$82, %edi
	je	LBB0_3
## %bb.1:
	cmpl	$104, %edi
	jne	LBB0_11
## %bb.2:
	movl	8(%rsi), %esi
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_6
LBB0_3:
	movq	_HistLit@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_7
## %bb.4:
	movl	4(%rsi), %eax
	testl	%eax, %eax
	je	LBB0_7
## %bb.5:
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
LBB0_6:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_xasprintf                      ## TAILCALL
LBB0_11:
	movl	$1, %edi
	callq	_xmalloc
	movq	%rax, %r15
	movb	$0, (%rax)
	jmp	LBB0_12
LBB0_7:
	movq	%rsi, %rdi
	callq	_sprlex
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_Strlen
                                        ## kill: def $eax killed $eax def $rax
	movq	_MB_LEN_MAX@GOTPCREL(%rip), %rcx
	imull	(%rcx), %eax
	leal	1(%rax), %edi
	callq	_xmalloc
	movq	%rax, %r15
	movb	(%r14), %al
	movq	%r15, %r12
	testb	%al, %al
	je	LBB0_10
## %bb.8:
	movq	%r14, %rbx
	incq	%rbx
	movq	%r15, %r12
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movsbl	%al, %esi
	movq	%r12, %rdi
	callq	_one_wctomb
	cltq
	addq	%rax, %r12
	movzbl	(%rbx), %eax
	incq	%rbx
	testb	%al, %al
	jne	LBB0_9
LBB0_10:
	movb	$0, (%r12)
	movq	%r14, %rdi
	callq	_xfree
LBB0_12:
	movq	%r15, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%6d"

	.comm	_HistLit,4,2                    ## @HistLit
L_.str.1:                               ## @.str.1
	.asciz	"%S"

	.comm	_MB_LEN_MAX,4,2                 ## @MB_LEN_MAX
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fmthist                        ; -- Begin function fmthist
	.p2align	2
_fmthist:                               ; @fmthist
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	cmp	w0, #82
	b.eq	LBB0_3
; %bb.1:
	cmp	w0, #104
	b.ne	LBB0_7
; %bb.2:
	ldr	w1, [x1, #8]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_6
LBB0_3:
Lloh2:
	adrp	x8, _HistLit@GOTPAGE
Lloh3:
	ldr	x8, [x8, _HistLit@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cbz	w8, LBB0_8
; %bb.4:
	ldr	w8, [x1, #4]
	cbz	w8, LBB0_8
; %bb.5:
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x8
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_xasprintf
LBB0_7:
	mov	w0, #1
	bl	_xmalloc
	mov	x20, x0
	strb	wzr, [x0]
	b	LBB0_12
LBB0_8:
	mov	x0, x1
	bl	_sprlex
	mov	x19, x0
	bl	_Strlen
Lloh7:
	adrp	x8, _MB_LEN_MAX@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MB_LEN_MAX@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	orr	w9, wzr, #0x1
	madd	w0, w8, w0, w9
	bl	_xmalloc
	mov	x20, x0
	ldrb	w8, [x19]
	mov	x21, x0
	cbz	w8, LBB0_11
; %bb.9:
	add	x22, x19, #1
	mov	x21, x20
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	sxtb	w1, w8
	mov	x0, x21
	bl	_one_wctomb
	add	x21, x21, w0, sxtw
	ldrb	w8, [x22], #1
	cbnz	w8, LBB0_10
LBB0_11:
	strb	wzr, [x21]
	mov	x0, x19
	bl	_xfree
LBB0_12:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%6d"

	.comm	_HistLit,4,2                    ; @HistLit
l_.str.1:                               ; @.str.1
	.asciz	"%S"

	.comm	_MB_LEN_MAX,4,2                 ; @MB_LEN_MAX
.subsections_via_symbols
