	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cleanstr
_cleanstr:                              ## @cleanstr
	.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
	movl	%esi, %r14d
	movq	%rdi, %r15
	leal	1(,%r14,4), %esi
	movq	_cleanstr.tmp(%rip), %rax
	cmpl	%esi, _cleanstr.tmplen(%rip)
	jge	LBB0_2
## %bb.1:
	movl	%esi, _cleanstr.tmplen(%rip)
	movq	%rax, %rdi
	callq	_realloc
	movq	%rax, _cleanstr.tmp(%rip)
LBB0_2:
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, -40(%rbp)
	testl	%r14d, %r14d
	jle	LBB0_8
## %bb.5:
	movl	%r14d, %r12d
	xorl	%ebx, %ebx
	leaq	-40(%rbp), %r14
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movzbl	(%r15,%rbx), %esi
	incq	%rbx
	movq	%r14, %rdi
	callq	_cleanchr
	cmpq	%rbx, %r12
	jne	LBB0_6
## %bb.7:
	movq	-40(%rbp), %rax
LBB0_8:
	movb	$0, (%rax)
	movq	_cleanstr.tmp(%rip), %rax
	jmp	LBB0_9
LBB0_3:
	movl	$0, _cleanstr.tmplen(%rip)
	leaq	L_.str(%rip), %rax
LBB0_9:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_cleanstr.tmp,8,3 ## @cleanstr.tmp
.zerofill __DATA,__bss,_cleanstr.tmplen,4,2 ## @cleanstr.tmplen
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"(mem alloc error)"

	.no_dead_strip	_cleanstr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cleanstr
_cleanstr:                              ; @cleanstr
	.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
	mov	x20, x1
	mov	x19, x0
	adrp	x22, _cleanstr.tmplen@PAGE
	ldr	w8, [x22, _cleanstr.tmplen@PAGEOFF]
	mov	w1, #1
	bfi	w1, w20, #2, #30
	adrp	x21, _cleanstr.tmp@PAGE
	ldr	x0, [x21, _cleanstr.tmp@PAGEOFF]
	cmp	w8, w1
	b.ge	LBB0_2
; %bb.1:
	str	w1, [x22, _cleanstr.tmplen@PAGEOFF]
	bl	_realloc
	str	x0, [x21, _cleanstr.tmp@PAGEOFF]
LBB0_2:
	cbz	x0, LBB0_8
; %bb.3:
	str	x0, [sp, #8]
	cmp	w20, #1
	b.lt	LBB0_7
; %bb.4:
	mov	w20, w20
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldrb	w1, [x19], #1
	add	x0, sp, #8
	bl	_cleanchr
	subs	x20, x20, #1
	b.ne	LBB0_5
; %bb.6:
	ldr	x0, [sp, #8]
LBB0_7:
	strb	wzr, [x0]
	ldr	x0, [x21, _cleanstr.tmp@PAGEOFF]
	b	LBB0_9
LBB0_8:
	str	wzr, [x22, _cleanstr.tmplen@PAGEOFF]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
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 AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_cleanstr.tmp,8,3 ; @cleanstr.tmp
.zerofill __DATA,__bss,_cleanstr.tmplen,4,2 ; @cleanstr.tmplen
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"(mem alloc error)"

	.no_dead_strip	_cleanstr
.subsections_via_symbols
