	.file	"extr_be_ai_chat.c_BotLoadChatMessage.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"chat message too long\n"
.LC1:
	.string	"%cv%ld%c"
.LC2:
	.string	"%cr%s%c"
.LC3:
	.string	"unknown message component %s\n"
.LC4:
	.string	";"
.LC5:
	.string	","
	.text
	.p2align 4
	.globl	BotLoadChatMessage
	.type	BotLoadChatMessage, @function
BotLoadChatMessage:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	lea	r13, .LC2[rip]
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rsi
	sub	rsp, 56
	.cfi_def_cfa_offset 112
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	mov	r12, rsp
	mov	BYTE PTR [rsi], 0
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L7:
	cmp	rax, QWORD PTR TT_NAME[rip]
	jne	.L9
	mov	rdi, rbx
	call	strlen@PLT
	movsx	rdx, DWORD PTR MAX_MESSAGE_SIZE[rip]
	lea	rcx, 7[rax]
	cmp	rcx, rdx
	ja	.L10
	mov	edx, DWORD PTR ESCAPE_CHAR[rip]
	mov	rcx, QWORD PTR 8[rsp]
	lea	rdi, [rbx+rax]
	mov	rsi, r13
	mov	r8d, edx
	call	sprintf@PLT
.L6:
	lea	rsi, .LC4[rip]
	mov	rdi, rbp
	call	PC_CheckTokenString@PLT
	test	rax, rax
	jne	.L11
	lea	rsi, .LC5[rip]
	mov	rdi, rbp
	call	PC_ExpectTokenString@PLT
	test	eax, eax
	je	.L19
.L12:
	mov	rsi, r12
	mov	rdi, rbp
	call	PC_ExpectAnyToken@PLT
	test	eax, eax
	je	.L19
	mov	rax, QWORD PTR [rsp]
	cmp	rax, QWORD PTR TT_STRING[rip]
	je	.L21
	cmp	rax, QWORD PTR TT_NUMBER[rip]
	jne	.L7
	mov	edx, DWORD PTR 16[rsp]
	test	DWORD PTR TT_INTEGER[rip], edx
	je	.L7
	mov	rdi, rbx
	call	strlen@PLT
	movsx	rdx, DWORD PTR MAX_MESSAGE_SIZE[rip]
	lea	rcx, 7[rax]
	cmp	rcx, rdx
	ja	.L10
	mov	edx, DWORD PTR ESCAPE_CHAR[rip]
	mov	rcx, QWORD PTR 24[rsp]
	lea	rdi, [rbx+rax]
	lea	rsi, .LC1[rip]
	mov	r8d, edx
	call	sprintf@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L21:
	mov	rdi, QWORD PTR 8[rsp]
	call	StripDoubleQuotes@PLT
	mov	rdi, rbx
	call	strlen@PLT
	mov	r15, QWORD PTR 8[rsp]
	mov	r14, rax
	mov	rdi, r15
	call	strlen@PLT
	lea	rdx, 1[r14+rax]
	movsx	rax, DWORD PTR MAX_MESSAGE_SIZE[rip]
	cmp	rdx, rax
	ja	.L10
	mov	rsi, r15
	mov	rdi, rbx
	call	strcat@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L9:
	mov	rdx, QWORD PTR 8[rsp]
	lea	rsi, .LC3[rip]
	mov	rdi, rbp
	xor	eax, eax
	call	SourceError@PLT
.L19:
	mov	eax, DWORD PTR qfalse[rip]
.L1:
	mov	rbx, QWORD PTR 40[rsp]
	xor	rbx, QWORD PTR fs:40
	jne	.L22
	add	rsp, 56
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	lea	rsi, .LC0[rip]
	mov	rdi, rbp
	xor	eax, eax
	call	SourceError@PLT
	mov	eax, DWORD PTR qfalse[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L11:
	mov	eax, DWORD PTR qtrue[rip]
	jmp	.L1
.L22:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	BotLoadChatMessage, .-BotLoadChatMessage
	.comm	qtrue,4,4
	.comm	qfalse,4,4
	.comm	TT_STRING,8,8
	.comm	TT_NUMBER,8,8
	.comm	TT_NAME,8,8
	.comm	TT_INTEGER,4,4
	.comm	MAX_MESSAGE_SIZE,4,4
	.comm	ESCAPE_CHAR,4,4
	.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_be_ai_chat.c_BotLoadChatMessage.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"chat message too long\012\000"
	.align	2
.LC1:
	.ascii	"%cv%ld%c\000"
	.align	2
.LC2:
	.ascii	"%cr%s%c\000"
	.align	2
.LC3:
	.ascii	"unknown message component %s\012\000"
	.align	2
.LC4:
	.ascii	";\000"
	.align	2
.LC5:
	.ascii	",\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	BotLoadChatMessage
	.syntax unified
	.arm
	.fpu softvfp
	.type	BotLoadChatMessage, %function
BotLoadChatMessage:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	r3, #0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r2, .L23
	sub	sp, sp, #44
	ldr	r2, [r2]
	str	r2, [sp, #36]
	mov	r2,#0
	mov	r5, r1
	mov	r4, r0
	ldr	r6, .L23+4
	ldr	r8, .L23+8
	ldr	r10, .L23+12
	ldr	r7, .L23+16
	ldr	r9, .L23+20
	ldr	fp, .L23+24
	strb	r3, [r1]
	b	.L12
.L7:
	ldr	r2, [r10]
	cmp	r3, r2
	bne	.L9
	mov	r0, r5
	bl	strlen
	ldr	r3, [r7]
	add	r2, r0, #7
	cmp	r2, r3
	bhi	.L10
	ldr	r2, [r9]
	mov	r1, fp
	ldr	r3, [sp, #24]
	add	r0, r5, r0
	str	r2, [sp]
	bl	sprintf
.L6:
	mov	r0, r4
	ldr	r1, .L23+28
	bl	PC_CheckTokenString
	cmp	r0, #0
	bne	.L11
	mov	r0, r4
	ldr	r1, .L23+32
	bl	PC_ExpectTokenString
	cmp	r0, #0
	beq	.L19
.L12:
	mov	r0, r4
	add	r1, sp, #20
	bl	PC_ExpectAnyToken
	cmp	r0, #0
	beq	.L19
	ldr	r3, [sp, #20]
	ldr	r2, [r6]
	cmp	r3, r2
	beq	.L21
	ldr	r2, [r8]
	cmp	r3, r2
	bne	.L7
	ldr	r2, .L23+36
	ldr	r1, [sp, #28]
	ldr	r2, [r2]
	tst	r1, r2
	beq	.L7
	mov	r0, r5
	bl	strlen
	ldr	r3, [r7]
	add	r2, r0, #7
	cmp	r2, r3
	bhi	.L10
	ldr	r2, [r9]
	ldr	r3, [sp, #32]
	ldr	r1, .L23+40
	add	r0, r5, r0
	str	r2, [sp]
	bl	sprintf
	b	.L6
.L21:
	ldr	r0, [sp, #24]
	bl	StripDoubleQuotes
	mov	r0, r5
	bl	strlen
	ldr	r1, [sp, #24]
	str	r0, [sp, #12]
	mov	r0, r1
	str	r1, [sp, #8]
	bl	strlen
	ldr	r3, [sp, #12]
	ldr	ip, [r7]
	add	r2, r3, r0
	add	r2, r2, #1
	cmp	r2, ip
	ldr	r1, [sp, #8]
	bhi	.L10
	add	r2, r0, #1
	add	r0, r5, r3
	bl	memcpy
	b	.L6
.L9:
	mov	r0, r4
	ldr	r2, [sp, #24]
	ldr	r1, .L23+44
	bl	SourceError
.L19:
	ldr	r3, .L23+48
	ldr	r0, [r3]
.L1:
	ldr	r3, .L23
	ldr	r2, [r3]
	ldr	r3, [sp, #36]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L22
	add	sp, sp, #44
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L10:
	mov	r0, r4
	ldr	r1, .L23+52
	bl	SourceError
	ldr	r3, .L23+48
	ldr	r0, [r3]
	b	.L1
.L11:
	ldr	r3, .L23+56
	ldr	r0, [r3]
	b	.L1
.L22:
	bl	__stack_chk_fail
.L24:
	.align	2
.L23:
	.word	.LC6
	.word	TT_STRING
	.word	TT_NUMBER
	.word	TT_NAME
	.word	MAX_MESSAGE_SIZE
	.word	ESCAPE_CHAR
	.word	.LC2
	.word	.LC4
	.word	.LC5
	.word	TT_INTEGER
	.word	.LC1
	.word	.LC3
	.word	qfalse
	.word	.LC0
	.word	qtrue
	.size	BotLoadChatMessage, .-BotLoadChatMessage
	.comm	qtrue,4,4
	.comm	qfalse,4,4
	.comm	TT_STRING,4,4
	.comm	TT_NUMBER,4,4
	.comm	TT_NAME,4,4
	.comm	TT_INTEGER,4,4
	.comm	MAX_MESSAGE_SIZE,4,4
	.comm	ESCAPE_CHAR,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
