	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Cbuf_InsertText                ## -- Begin function Cbuf_InsertText
	.p2align	4, 0x90
_Cbuf_InsertText:                       ## @Cbuf_InsertText
	.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
	movq	%rdi, %r14
	callq	_strlen
	movl	%eax, %r13d
	movq	_cmd_text@GOTPCREL(%rip), %r15
	movl	(%r15), %ecx
	leal	(%rcx,%r13), %eax
	incl	%eax
	cmpl	4(%r15), %eax
	jle	LBB0_1
## %bb.7:
	leaq	L_.str(%rip), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_Com_Printf                     ## TAILCALL
LBB0_1:
	leal	1(%r13), %r12d
	testl	%ecx, %ecx
	jle	LBB0_6
## %bb.2:
	movq	%rcx, %rax
	testb	$1, %cl
	je	LBB0_4
## %bb.3:
	leaq	-1(%rcx), %rax
	movq	8(%r15), %rdx
	movb	-1(%rdx,%rcx), %sil
	leal	(%rcx,%r13), %edi
	movslq	%edi, %rdi
	movb	%sil, (%rdx,%rdi)
LBB0_4:
	cmpl	$1, %ecx
	je	LBB0_6
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	leaq	-1(%rax), %rcx
	movq	8(%r15), %rdx
	movzbl	-1(%rdx,%rax), %ebx
	leal	(%rax,%r13), %esi
	movslq	%esi, %rsi
	movb	%bl, (%rdx,%rsi)
	movq	8(%r15), %rdx
	movzbl	-2(%rdx,%rax), %ebx
	addq	$-2, %rax
	leal	(%rcx,%r13), %esi
	movslq	%esi, %rsi
	movb	%bl, (%rdx,%rsi)
	cmpq	$1, %rcx
	ja	LBB0_5
LBB0_6:
	movq	8(%r15), %rdi
	movq	%r14, %rsi
	movl	%r13d, %edx
	callq	_Com_Memcpy
	movq	8(%r15), %rax
	movslq	%r13d, %rcx
	movb	$10, (%rax,%rcx)
	addl	%r12d, (%r15)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_cmd_text,16,3                  ## @cmd_text
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Cbuf_InsertText overflowed\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Cbuf_InsertText                ; -- Begin function Cbuf_InsertText
	.p2align	2
_Cbuf_InsertText:                       ; @Cbuf_InsertText
	.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
	mov	x20, x0
	bl	_strlen
	add	w21, w0, #1
Lloh0:
	adrp	x22, _cmd_text@GOTPAGE
Lloh1:
	ldr	x22, [x22, _cmd_text@GOTPAGEOFF]
	ldp	w8, w9, [x22]
	add	w10, w21, w8
	cmp	w10, w9
	b.le	LBB0_2
; %bb.1:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	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	_Com_Printf
LBB0_2:
	mov	x19, x0
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.3:
	mov	w9, w19
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x22, #8]
	add	x11, x10, x8
	ldurb	w11, [x11, #-1]
	add	w12, w9, w8
	strb	w11, [x10, w12, sxtw]
	subs	x8, x8, #1
	b.hi	LBB0_4
LBB0_5:
	ldr	x0, [x22, #8]
	mov	x1, x20
	mov	x2, x19
	bl	_Com_Memcpy
	ldr	x8, [x22, #8]
	mov	w9, #10
	strb	w9, [x8, w19, sxtw]
	ldr	w8, [x22]
	add	w8, w8, w21
	str	w8, [x22]
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_cmd_text,16,3                  ; @cmd_text
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Cbuf_InsertText overflowed\n"

.subsections_via_symbols
