	.file	"388560.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"> Client disconnected."
.LC1:
	.string	"> Max message length: %d\n"
.LC2:
	.string	"\nFrom client: %s\nTo client: "
	.text
	.globl	start_chat
	.type	start_chat, @function
start_chat:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 320
	mov	DWORD PTR -308[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -296[rbp], 0
	mov	DWORD PTR -304[rbp], 16
.L7:
	lea	rax, -272[rbp]
	mov	rsi, rax
	mov	eax, 0
	mov	edx, 32
	mov	rdi, rsi
	mov	rcx, rdx
	rep stosq
	lea	rcx, -304[rbp]
	lea	rdx, -288[rbp]
	lea	rsi, -272[rbp]
	mov	eax, DWORD PTR -308[rbp]
	mov	r9, rcx
	mov	r8, rdx
	mov	ecx, 0
	mov	edx, 256
	mov	edi, eax
	call	recvfrom@PLT
	movzx	eax, BYTE PTR -272[rbp]
	cmp	al, 27
	jne	.L2
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -296[rbp]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -296[rbp], 0
	lea	rax, -272[rbp]
	mov	rsi, rax
	mov	eax, 0
	mov	edx, 32
	mov	rdi, rsi
	mov	rcx, rdx
	rep stosq
	jmp	.L3
.L2:
	lea	rax, -272[rbp]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -272[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	DWORD PTR -292[rbp], eax
	mov	eax, DWORD PTR -292[rbp]
	cmp	eax, DWORD PTR -296[rbp]
	jle	.L4
	mov	eax, DWORD PTR -292[rbp]
	mov	DWORD PTR -296[rbp], eax
.L4:
	lea	rax, -272[rbp]
	mov	rsi, rax
	mov	eax, 0
	mov	edx, 32
	mov	rdi, rsi
	mov	rcx, rdx
	rep stosq
	mov	DWORD PTR -300[rbp], 0
	jmp	.L5
.L6:
	add	DWORD PTR -300[rbp], 1
.L5:
	call	getchar@PLT
	mov	edx, eax
	mov	eax, DWORD PTR -300[rbp]
	cdqe
	mov	BYTE PTR -272[rbp+rax], dl
	mov	eax, DWORD PTR -300[rbp]
	cdqe
	movzx	eax, BYTE PTR -272[rbp+rax]
	cmp	al, 10
	jne	.L6
	mov	eax, DWORD PTR -304[rbp]
	mov	ecx, eax
	lea	rdx, -288[rbp]
	lea	rsi, -272[rbp]
	mov	eax, DWORD PTR -308[rbp]
	mov	r9d, ecx
	mov	r8, rdx
	mov	ecx, 0
	mov	edx, 256
	mov	edi, eax
	call	sendto@PLT
.L3:
	jmp	.L7
	.cfi_endproc
.LFE6:
	.size	start_chat, .-start_chat
	.section	.rodata
.LC3:
	.string	"> Socket creation failed."
	.align 8
.LC4:
	.string	"> Socket successfully created."
.LC5:
	.string	"> Socket bind failed."
.LC6:
	.string	"> Socket successfully binded."
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	edx, 0
	mov	esi, 2
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -36[rbp], eax
	cmp	DWORD PTR -36[rbp], -1
	jne	.L10
	lea	rdi, .LC3[rip]
	call	puts@PLT
	mov	edi, 0
	call	exit@PLT
.L10:
	lea	rdi, .LC4[rip]
	call	puts@PLT
	lea	rax, -32[rbp]
	mov	QWORD PTR [rax], 0
	mov	QWORD PTR 8[rax], 0
	mov	WORD PTR -32[rbp], 2
	mov	edi, 0
	call	htonl@PLT
	mov	DWORD PTR -28[rbp], eax
	mov	edi, 3000
	call	htons@PLT
	mov	WORD PTR -30[rbp], ax
	lea	rcx, -32[rbp]
	mov	eax, DWORD PTR -36[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	bind@PLT
	test	eax, eax
	je	.L11
	lea	rdi, .LC5[rip]
	call	puts@PLT
	mov	edi, 0
	call	exit@PLT
.L11:
	lea	rdi, .LC6[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -36[rbp]
	mov	edi, eax
	call	start_chat
	mov	eax, DWORD PTR -36[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"388560.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"> Client disconnected.\000"
	.align	2
.LC1:
	.ascii	"> Max message length: %d\012\000"
	.align	2
.LC2:
	.ascii	"\012From client: %s\012To client: \000"
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	start_chat
	.syntax unified
	.arm
	.fpu softvfp
	.type	start_chat, %function
start_chat:
	@ args = 0, pretend = 0, frame = 304
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #312
	str	r0, [fp, #-304]
	ldr	r3, .L9
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-288]
	mov	r3, #16
	str	r3, [fp, #-296]
.L7:
	sub	r3, fp, #264
	mov	r0, r3
	mov	r3, #256
	mov	r2, r3
	mov	r1, #0
	bl	memset
	sub	r1, fp, #264
	sub	r3, fp, #296
	str	r3, [sp, #4]
	sub	r3, fp, #280
	str	r3, [sp]
	mov	r3, #0
	mov	r2, #256
	ldr	r0, [fp, #-304]
	bl	recvfrom
	ldrb	r3, [fp, #-264]	@ zero_extendqisi2
	cmp	r3, #27
	bne	.L2
	ldr	r0, .L9+4
	bl	puts
	ldr	r1, [fp, #-288]
	ldr	r0, .L9+8
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-288]
	sub	r3, fp, #264
	mov	r0, r3
	mov	r3, #256
	mov	r2, r3
	mov	r1, #0
	bl	memset
	b	.L3
.L2:
	sub	r3, fp, #264
	mov	r1, r3
	ldr	r0, .L9+12
	bl	printf
	sub	r3, fp, #264
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	str	r3, [fp, #-284]
	ldr	r2, [fp, #-284]
	ldr	r3, [fp, #-288]
	cmp	r2, r3
	ble	.L4
	ldr	r3, [fp, #-284]
	str	r3, [fp, #-288]
.L4:
	sub	r3, fp, #264
	mov	r0, r3
	mov	r3, #256
	mov	r2, r3
	mov	r1, #0
	bl	memset
	mov	r3, #0
	str	r3, [fp, #-292]
	b	.L5
.L6:
	ldr	r3, [fp, #-292]
	add	r3, r3, #1
	str	r3, [fp, #-292]
.L5:
	bl	getchar
	mov	r3, r0
	and	r1, r3, #255
	sub	r2, fp, #264
	ldr	r3, [fp, #-292]
	add	r3, r2, r3
	mov	r2, r1
	strb	r2, [r3]
	sub	r2, fp, #264
	ldr	r3, [fp, #-292]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #10
	bne	.L6
	ldr	r3, [fp, #-296]
	sub	r1, fp, #264
	str	r3, [sp, #4]
	sub	r3, fp, #280
	str	r3, [sp]
	mov	r3, #0
	mov	r2, #256
	ldr	r0, [fp, #-304]
	bl	sendto
.L3:
	b	.L7
.L10:
	.align	2
.L9:
	.word	.LC3
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.size	start_chat, .-start_chat
	.section	.rodata
	.align	2
.LC4:
	.ascii	"> Socket creation failed.\000"
	.align	2
.LC5:
	.ascii	"> Socket successfully created.\000"
	.align	2
.LC6:
	.ascii	"> Socket bind failed.\000"
	.align	2
.LC7:
	.ascii	"> Socket successfully binded.\000"
	.align	2
.LC8:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	ldr	r3, .L16
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r2, #0
	mov	r1, #2
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmn	r3, #1
	bne	.L12
	ldr	r0, .L16+4
	bl	puts
	mov	r0, #0
	bl	exit
.L12:
	ldr	r0, .L16+8
	bl	puts
	sub	r3, fp, #24
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2]
	str	r3, [r2, #4]
	str	r3, [r2, #8]
	str	r3, [r2, #12]
	mov	r3, #2
	strh	r3, [fp, #-24]	@ movhi
	mov	r0, #0
	bl	htonl
	mov	r3, r0
	str	r3, [fp, #-20]
	ldr	r0, .L16+12
	bl	htons
	mov	r3, r0
	strh	r3, [fp, #-22]	@ movhi
	sub	r3, fp, #24
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-28]
	bl	bind
	mov	r3, r0
	cmp	r3, #0
	beq	.L13
	ldr	r0, .L16+16
	bl	puts
	mov	r0, #0
	bl	exit
.L13:
	ldr	r0, .L16+20
	bl	puts
	ldr	r0, [fp, #-28]
	bl	start_chat
	ldr	r0, [fp, #-28]
	bl	close
	mov	r3, #0
	ldr	r2, .L16
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L15
	bl	__stack_chk_fail
.L15:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L17:
	.align	2
.L16:
	.word	.LC8
	.word	.LC4
	.word	.LC5
	.word	3000
	.word	.LC6
	.word	.LC7
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
