	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function checkdig
_checkdig:                              ## @checkdig
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movb	(%rdi), %al
	xorl	%ecx, %ecx
	cmpb	$77, %al
	sete	%cl
	leal	(%rcx,%rcx,2), %r15d
	xorl	%r12d, %r12d
	testb	%al, %al
	je	LBB0_7
## %bb.1:
	movl	%esi, %r14d
	cmpl	$2, %esi
	jb	LBB0_7
## %bb.2:
	movq	%rdi, %rbx
	xorl	%r13d, %r13d
	cmpb	$77, %al
	sete	%r13b
	incq	%rbx
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movzbl	%al, %edi
	callq	_isdigit
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	testb	$1, %r13b
	leal	1(%r13), %eax
	movsbl	-1(%rbx), %ecx
	leal	-48(%r12,%rcx), %edx
	cmovnel	%r12d, %edx
	leal	-48(%r15,%rcx), %ecx
	cmovel	%r15d, %ecx
	decl	%r14d
	movl	%edx, %r12d
	movl	%ecx, %r15d
	movl	%eax, %r13d
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movzbl	(%rbx), %eax
	testb	%al, %al
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	cmpl	$1, %r14d
	ja	LBB0_3
LBB0_7:
	leal	(%r15,%r15,2), %ecx
	addl	%r12d, %ecx
	movl	$3435973837, %eax               ## imm = 0xCCCCCCCD
	imulq	%rcx, %rax
	shrq	$35, %rax
	addl	%eax, %eax
	leal	(%rax,%rax,4), %eax
	subl	%eax, %ecx
	movl	$10, %eax
	subl	%ecx, %eax
	testl	%ecx, %ecx
	cmovel	%ecx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_checkdig
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function checkdig
_checkdig:                              ; @checkdig
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	ldrb	w8, [x0]
	mov	w9, #3
	cmp	w8, #77
	csel	w21, w9, wzr, eq
	cmp	w8, #0
	ccmp	w1, #2, #0, ne
	b.hs	LBB0_3
; %bb.1:
	mov	w20, #0
LBB0_2:
	add	w8, w21, w21, lsl #1
	add	w8, w8, w20
	mov	w9, #52429
	movk	w9, #52428, lsl #16
	umull	x9, w8, w9
	lsr	x9, x9, #35
	mov	w10, #10
	msub	w8, w9, w10, w8
	sub	w9, w10, w8
	cmp	w8, #0
	csel	w0, wzr, w9, eq
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_3:
	mov	x19, x1
	mov	w20, #0
	cmp	w8, #77
	cset	w23, eq
	add	x22, x0, #1
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldrb	w8, [x22], #1
	cmp	w8, #0
	ccmp	w19, #1, #0, ne
	b.ls	LBB0_2
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	and	w0, w8, #0xff
	bl	_isdigit
	cbz	x0, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	tst	w23, #0x1
	add	w23, w23, #1
	ldursb	w8, [x22, #-1]
	add	w9, w21, w8
	sub	w9, w9, #48
	add	w8, w20, w8
	sub	w8, w8, #48
	csel	w20, w8, w20, eq
	csel	w21, w21, w9, eq
	sub	w19, w19, #1
	b	LBB0_4
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_checkdig
.subsections_via_symbols
