	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_count_char                     ## -- Begin function count_char
	.p2align	4, 0x90
_count_char:                            ## @count_char
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	testl	%esi, %esi
	jle	LBB0_1
## %bb.2:
	movl	%esi, %r9d
	cmpl	$4, %esi
	jae	LBB0_4
## %bb.3:
	xorl	%esi, %esi
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_1:
	xorl	%eax, %eax
	popq	%rbp
	retq
LBB0_4:
	movl	%r9d, %esi
	andl	$-4, %esi
	movq	%rdx, %xmm0
	pshufd	$68, %xmm0, %xmm1               ## xmm1 = xmm0[0,1,0,1]
	leaq	-4(%rsi), %rax
	movq	%rax, %r8
	shrq	$2, %r8
	incq	%r8
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%r8, %rcx
	andq	$-2, %rcx
	pxor	%xmm0, %xmm0
	xorl	%eax, %eax
	pxor	%xmm2, %xmm2
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movdqu	(%rdi,%rax,8), %xmm3
	movdqu	16(%rdi,%rax,8), %xmm4
	movdqu	32(%rdi,%rax,8), %xmm5
	movdqu	48(%rdi,%rax,8), %xmm6
	pcmpeqq	%xmm1, %xmm3
	pshufd	$232, %xmm3, %xmm3              ## xmm3 = xmm3[0,2,2,3]
	psubd	%xmm3, %xmm0
	pcmpeqq	%xmm1, %xmm4
	pshufd	$232, %xmm4, %xmm3              ## xmm3 = xmm4[0,2,2,3]
	psubd	%xmm3, %xmm2
	pcmpeqq	%xmm1, %xmm5
	pshufd	$232, %xmm5, %xmm3              ## xmm3 = xmm5[0,2,2,3]
	psubd	%xmm3, %xmm0
	pcmpeqq	%xmm1, %xmm6
	pshufd	$232, %xmm6, %xmm3              ## xmm3 = xmm6[0,2,2,3]
	psubd	%xmm3, %xmm2
	addq	$8, %rax
	addq	$-2, %rcx
	jne	LBB0_7
## %bb.8:
	testb	$1, %r8b
	je	LBB0_10
LBB0_9:
	movdqu	(%rdi,%rax,8), %xmm3
	movdqu	16(%rdi,%rax,8), %xmm4
	pcmpeqq	%xmm1, %xmm3
	pshufd	$232, %xmm3, %xmm3              ## xmm3 = xmm3[0,2,2,3]
	psubd	%xmm3, %xmm0
	pcmpeqq	%xmm1, %xmm4
	pshufd	$232, %xmm4, %xmm1              ## xmm1 = xmm4[0,2,2,3]
	psubd	%xmm1, %xmm2
LBB0_10:
	paddd	%xmm2, %xmm0
	pshufd	$85, %xmm0, %xmm1               ## xmm1 = xmm0[1,1,1,1]
	paddd	%xmm0, %xmm1
	movd	%xmm1, %eax
	cmpq	%r9, %rsi
	je	LBB0_12
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	xorl	%ecx, %ecx
	cmpq	%rdx, (%rdi,%rsi,8)
	sete	%cl
	addl	%ecx, %eax
	incq	%rsi
	cmpq	%rsi, %r9
	jne	LBB0_11
LBB0_12:
	popq	%rbp
	retq
LBB0_5:
	pxor	%xmm0, %xmm0
	xorl	%eax, %eax
	pxor	%xmm2, %xmm2
	testb	$1, %r8b
	jne	LBB0_9
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_count_char                     ; -- Begin function count_char
	.p2align	2
_count_char:                            ; @count_char
	.cfi_startproc
; %bb.0:
	cmp	w1, #1
	b.lt	LBB0_3
; %bb.1:
	mov	w9, w1
	cmp	w1, #8
	b.hs	LBB0_4
; %bb.2:
	mov	x10, #0
	mov	w8, #0
	b	LBB0_7
LBB0_3:
	mov	w0, #0
	ret
LBB0_4:
	and	x10, x9, #0xfffffff8
	dup.2d	v1, x2
	movi.2d	v0, #0000000000000000
	add	x8, x0, #32
	mov	x11, x10
	movi.2d	v2, #0000000000000000
	movi.2d	v3, #0000000000000000
	movi.2d	v4, #0000000000000000
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldp	q5, q6, [x8, #-32]
	ldp	q7, q16, [x8], #64
	cmeq.2d	v5, v5, v1
	xtn.2s	v5, v5
	cmeq.2d	v6, v6, v1
	xtn.2s	v6, v6
	cmeq.2d	v7, v7, v1
	xtn.2s	v7, v7
	cmeq.2d	v16, v16, v1
	xtn.2s	v16, v16
	sub.2s	v0, v0, v5
	sub.2s	v2, v2, v6
	sub.2s	v3, v3, v7
	sub.2s	v4, v4, v16
	subs	x11, x11, #8
	b.ne	LBB0_5
; %bb.6:
	add.2s	v0, v2, v0
	add.2s	v0, v3, v0
	add.2s	v0, v4, v0
	addp.2s	v0, v0, v0
	fmov	w8, s0
	cmp	x10, x9
	b.eq	LBB0_9
LBB0_7:
	add	x11, x0, x10, lsl #3
	sub	x9, x9, x10
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x11], #8
	cmp	x10, x2
	cinc	w8, w8, eq
	subs	x9, x9, #1
	b.ne	LBB0_8
LBB0_9:
	mov	x0, x8
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
