	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_stripsuffix                    ## -- Begin function stripsuffix
	.p2align	4, 0x90
_stripsuffix:                           ## @stripsuffix
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdx, %rdx
	je	LBB0_9
## %bb.1:
	movq	%rdx, %r12
	movq	%rsi, %r15
	movq	%rdi, %rbx
	xorl	%esi, %esi
	callq	_strchr
	movslq	%eax, %r14
	subq	%r12, %r14
	cmpq	%rbx, %r14
	jbe	LBB0_9
## %bb.2:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_strcmp
	testq	%rax, %rax
	jne	LBB0_9
## %bb.3:
	leaq	-36(%rbp), %r15
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movq	_MB_LEN_MAX@GOTPCREL(%rip), %r12
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	addq	%rax, %rbx
	cmpq	%r14, %rbx
	jae	LBB0_7
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %esi
	movq	%rbx, %rdi
	movq	%r15, %rdx
	callq	_mbrlen
	cmpq	$-2, %rax
	jb	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movl	$1, %eax
	jmp	LBB0_6
LBB0_7:
	jne	LBB0_9
## %bb.8:
	movb	$0, (%r14)
LBB0_9:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.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	_stripsuffix                    ; -- Begin function stripsuffix
	.p2align	2
_stripsuffix:                           ; @stripsuffix
	.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
	cbz	x2, LBB0_9
; %bb.1:
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	mov	w1, #0
	bl	_strchr
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x8, w0
	sub	x20, x8, x20
	cmp	x20, x19
	b.ls	LBB0_9
; %bb.2:
	mov	x0, x21
	mov	x1, x20
	bl	_strcmp
	cbnz	x0, LBB0_9
; %bb.3:
	add	x0, sp, #12
	mov	w1, #0
	mov	w2, #4
	bl	_memset
Lloh0:
	adrp	x21, _MB_LEN_MAX@GOTPAGE
Lloh1:
	ldr	x21, [x21, _MB_LEN_MAX@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x19, x19, x0
	cmp	x19, x20
	b.hs	LBB0_7
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x21]
	add	x2, sp, #12
	mov	x0, x19
	bl	_mbrlen
	cmn	x0, #2
	b.lo	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x0, sp, #12
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	mov	w0, #1
	b	LBB0_4
LBB0_7:
	b.ne	LBB0_9
; %bb.8:
	strb	wzr, [x20]
LBB0_9:
	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 AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_MB_LEN_MAX,4,2                 ; @MB_LEN_MAX
.subsections_via_symbols
