	.file	"417618.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"serveur de tchat tcp port 5678"
.LC1:
	.string	"pb socket : %s\n"
.LC2:
	.string	"pb bind : %s\n"
.LC3:
	.string	"pb listen : %s\n"
.LC4:
	.string	"pb accept : %s\n"
.LC5:
	.string	"pb read : %s\n"
.LC6:
	.string	"msg provenant du client\302\240:%s\n"
.LC7:
	.string	"a+"
.LC8:
	.string	"votre message : "
.LC9:
	.string	"pb write : %s\n"
	.text
	.globl	main
	.type	main, @function
main:
.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, 352
	mov	DWORD PTR -340[rbp], edi
	mov	QWORD PTR -352[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	WORD PTR -304[rbp], 2
	mov	edi, 5678
	call	htons@PLT
	mov	WORD PTR -302[rbp], ax
	mov	edi, 0
	call	htonl@PLT
	mov	DWORD PTR -300[rbp], eax
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	edx, 6
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -320[rbp], eax
	cmp	DWORD PTR -320[rbp], -1
	jne	.L2
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	exit@PLT
.L2:
	lea	rcx, -304[rbp]
	mov	eax, DWORD PTR -320[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	bind@PLT
	mov	DWORD PTR -316[rbp], eax
	cmp	DWORD PTR -316[rbp], -1
	jne	.L3
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	exit@PLT
.L3:
	mov	eax, DWORD PTR -320[rbp]
	mov	esi, 10
	mov	edi, eax
	call	listen@PLT
	mov	DWORD PTR -316[rbp], eax
	cmp	DWORD PTR -316[rbp], -1
	jne	.L4
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	exit@PLT
.L4:
	mov	DWORD PTR -324[rbp], 16
	lea	rdx, -324[rbp]
	lea	rcx, -288[rbp]
	mov	eax, DWORD PTR -320[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	accept@PLT
	mov	DWORD PTR -312[rbp], eax
	cmp	DWORD PTR -312[rbp], -1
	jne	.L5
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rsi, rax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	exit@PLT
.L5:
	call	fork@PLT
	mov	DWORD PTR -308[rbp], eax
	cmp	DWORD PTR -308[rbp], 0
	jne	.L6
.L8:
	lea	rax, -272[rbp]
	mov	edx, 255
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	lea	rcx, -272[rbp]
	mov	eax, DWORD PTR -312[rbp]
	mov	edx, 255
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -316[rbp], eax
	cmp	DWORD PTR -316[rbp], -1
	jne	.L7
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	exit@PLT
.L7:
	lea	rax, -272[rbp]
	mov	rsi, rax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -272[rbp]
	mov	rsi, rax
	lea	rdi, .LC7[rip]
	call	strcmp@PLT
	test	eax, eax
	jne	.L8
	call	getppid@PLT
	mov	esi, 15
	mov	edi, eax
	call	kill@PLT
	mov	eax, DWORD PTR -312[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -320[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L12
	jmp	.L13
.L6:
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -272[rbp]
	mov	rdi, rax
	mov	eax, 0
	call	gets@PLT
	lea	rax, -272[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rcx, -272[rbp]
	mov	eax, DWORD PTR -312[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	DWORD PTR -316[rbp], eax
	cmp	DWORD PTR -316[rbp], -1
	jne	.L6
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rsi, rax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	exit@PLT
.L13:
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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	"417618.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"serveur de tchat tcp port 5678\000"
	.align	2
.LC1:
	.ascii	"pb socket : %s\012\000"
	.align	2
.LC2:
	.ascii	"pb bind : %s\012\000"
	.align	2
.LC3:
	.ascii	"pb listen : %s\012\000"
	.align	2
.LC4:
	.ascii	"pb accept : %s\012\000"
	.align	2
.LC5:
	.ascii	"pb read : %s\012\000"
	.align	2
.LC6:
	.ascii	"msg provenant du client\302\240:%s\012\000"
	.align	2
.LC7:
	.ascii	"a+\000"
	.align	2
.LC8:
	.ascii	"votre message : \000"
	.align	2
.LC9:
	.ascii	"pb write : %s\012\000"
	.align	2
.LC10:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 320
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #320
	str	r0, [fp, #-320]
	str	r1, [fp, #-324]
	ldr	r3, .L14
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #4
	sub	r3, r3, #292
	mov	r2, #2
	strh	r2, [r3]	@ movhi
	ldr	r0, .L14+4
	bl	htons
	mov	r3, r0
	mov	r2, r3
	sub	r3, fp, #4
	sub	r3, r3, #292
	strh	r2, [r3, #2]	@ movhi
	mov	r0, #0
	bl	htonl
	mov	r3, r0
	str	r3, [fp, #-292]
	ldr	r0, .L14+8
	bl	puts
	mov	r2, #6
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-312]
	ldr	r3, [fp, #-312]
	cmn	r3, #1
	bne	.L2
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L14+12
	bl	printf
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	exit
.L2:
	sub	r3, fp, #296
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-312]
	bl	bind
	str	r0, [fp, #-308]
	ldr	r3, [fp, #-308]
	cmn	r3, #1
	bne	.L3
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L14+16
	bl	printf
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	exit
.L3:
	mov	r1, #10
	ldr	r0, [fp, #-312]
	bl	listen
	str	r0, [fp, #-308]
	ldr	r3, [fp, #-308]
	cmn	r3, #1
	bne	.L4
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L14+20
	bl	printf
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	exit
.L4:
	mov	r3, #16
	str	r3, [fp, #-316]
	sub	r2, fp, #316
	sub	r3, fp, #280
	mov	r1, r3
	ldr	r0, [fp, #-312]
	bl	accept
	str	r0, [fp, #-304]
	ldr	r3, [fp, #-304]
	cmn	r3, #1
	bne	.L5
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L14+24
	bl	printf
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	exit
.L5:
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-300]
	ldr	r3, [fp, #-300]
	cmp	r3, #0
	bne	.L6
.L8:
	sub	r3, fp, #264
	mov	r2, #255
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r3, fp, #264
	mov	r2, #255
	mov	r1, r3
	ldr	r0, [fp, #-304]
	bl	read
	str	r0, [fp, #-308]
	ldr	r3, [fp, #-308]
	cmn	r3, #1
	bne	.L7
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L14+28
	bl	printf
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	exit
.L7:
	sub	r3, fp, #264
	mov	r1, r3
	ldr	r0, .L14+32
	bl	printf
	sub	r3, fp, #264
	mov	r1, r3
	ldr	r0, .L14+36
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L8
	bl	getppid
	mov	r3, r0
	mov	r1, #15
	mov	r0, r3
	bl	kill
	ldr	r0, [fp, #-304]
	bl	close
	ldr	r0, [fp, #-312]
	bl	close
	mov	r3, #0
	ldr	r2, .L14
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L12
	b	.L13
.L6:
	ldr	r0, .L14+40
	bl	printf
	sub	r3, fp, #264
	mov	r0, r3
	bl	gets
	sub	r3, fp, #264
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r3, fp, #264
	mov	r1, r3
	ldr	r0, [fp, #-304]
	bl	write
	str	r0, [fp, #-308]
	ldr	r3, [fp, #-308]
	cmn	r3, #1
	bne	.L6
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L14+44
	bl	printf
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	exit
.L13:
	bl	__stack_chk_fail
.L12:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L15:
	.align	2
.L14:
	.word	.LC10
	.word	5678
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
