	.file	"extr_cmd.c_Cbuf_InsertText.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Cbuf_InsertText overflowed\n"
	.text
	.p2align 4
	.globl	Cbuf_InsertText
	.type	Cbuf_InsertText, @function
Cbuf_InsertText:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	call	strlen@PLT
	movsx	r9, DWORD PTR cmd_text[rip]
	lea	ebx, 1[rax]
	mov	edx, eax
	lea	eax, [r9+rbx]
	cmp	eax, DWORD PTR cmd_text[rip+4]
	jg	.L8
	mov	eax, r9d
	sub	eax, 1
	js	.L3
	movsx	rcx, eax
	sub	r9, 2
	mov	eax, eax
	movsx	r11, edx
	sub	r9, rax
	.p2align 4,,10
	.p2align 3
.L4:
	mov	r8, QWORD PTR cmd_text[rip+8]
	movzx	r10d, BYTE PTR [r8+rcx]
	add	r8, rcx
	sub	rcx, 1
	mov	BYTE PTR 1[r8+r11], r10b
	cmp	rcx, r9
	jne	.L4
.L3:
	mov	rdi, QWORD PTR cmd_text[rip+8]
	mov	rsi, rbp
	call	Com_Memcpy@PLT
	mov	rdx, QWORD PTR cmd_text[rip+8]
	movsx	rax, ebx
	mov	BYTE PTR -1[rdx+rax], 10
	add	DWORD PTR cmd_text[rip], ebx
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	add	rsp, 8
	.cfi_def_cfa_offset 24
	lea	rdi, .LC0[rip]
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	jmp	Com_Printf@PLT
	.cfi_endproc
.LFE0:
	.size	Cbuf_InsertText, .-Cbuf_InsertText
	.comm	cmd_text,16,16
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_cmd.c_Cbuf_InsertText.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Cbuf_InsertText overflowed\012\000"
	.text
	.align	2
	.global	Cbuf_InsertText
	.syntax unified
	.arm
	.fpu softvfp
	.type	Cbuf_InsertText, %function
Cbuf_InsertText:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r7, r0
	bl	strlen
	ldr	r4, .L9
	add	r6, r0, #1
	ldr	r3, [r4]
	ldr	r2, [r4, #4]
	add	r1, r3, r6
	cmp	r1, r2
	bgt	.L8
	subs	r3, r3, #1
	mov	r5, r0
	bmi	.L3
.L4:
	ldr	lr, [r4, #8]
	add	ip, lr, r5
	add	ip, ip, r3
	ldrb	lr, [lr, r3]	@ zero_extendqisi2
	sub	r3, r3, #1
	cmn	r3, #1
	strb	lr, [ip, #1]
	bne	.L4
.L3:
	mov	r2, r5
	mov	r1, r7
	ldr	r0, [r4, #8]
	bl	Com_Memcpy
	mov	r2, #10
	ldr	r3, [r4, #8]
	strb	r2, [r3, r5]
	ldr	r3, [r4]
	add	r6, r3, r6
	str	r6, [r4]
	pop	{r4, r5, r6, r7, r8, pc}
.L8:
	ldr	r0, .L9+4
	pop	{r4, r5, r6, r7, r8, lr}
	b	Com_Printf
.L10:
	.align	2
.L9:
	.word	cmd_text
	.word	.LC0
	.size	Cbuf_InsertText, .-Cbuf_InsertText
	.comm	cmd_text,12,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
