	.file	"868407.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"%s\n"
.LC1:
	.string	"socket"
.LC2:
	.string	"bind"
.LC3:
	.string	"listen"
.LC4:
	.string	"accept"
.LC5:
	.string	"Session ouverte"
.LC6:
	.string	"read"
.LC7:
	.string	">Donne recue"
.LC8:
	.string	"Session ferme"
.LC9:
	.string	"write"
.LC10:
	.string	"Donees renvoye"
	.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, 1088
	mov	DWORD PTR -1076[rbp], edi
	mov	QWORD PTR -1088[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -1076[rbp], 2
	je	.L2
	mov	rax, QWORD PTR -1088[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	mov	rax, QWORD PTR -1088[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -1072[rbp], eax
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -1068[rbp], eax
	cmp	DWORD PTR -1068[rbp], 0
	jns	.L3
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L3:
	mov	WORD PTR -1056[rbp], 2
	mov	eax, DWORD PTR -1072[rbp]
	movzx	eax, ax
	mov	edi, eax
	call	htons@PLT
	mov	WORD PTR -1054[rbp], ax
	mov	edi, 0
	call	htonl@PLT
	mov	DWORD PTR -1052[rbp], eax
	lea	rcx, -1056[rbp]
	mov	eax, DWORD PTR -1068[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	bind@PLT
	test	eax, eax
	jns	.L4
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L4:
	mov	eax, DWORD PTR -1068[rbp]
	mov	esi, 8
	mov	edi, eax
	call	listen@PLT
	test	eax, eax
	jns	.L5
	lea	rdi, .LC3[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L5:
	mov	eax, DWORD PTR -1068[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	accept@PLT
	mov	DWORD PTR -1064[rbp], eax
	cmp	DWORD PTR -1064[rbp], 0
	jns	.L6
	lea	rdi, .LC4[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L6:
	lea	rdi, .LC5[rip]
	call	puts@PLT
.L11:
	lea	rax, -1040[rbp]
	mov	rsi, rax
	mov	eax, 0
	mov	edx, 128
	mov	rdi, rsi
	mov	rcx, rdx
	rep stosq
	lea	rcx, -1040[rbp]
	mov	eax, DWORD PTR -1064[rbp]
	mov	edx, 1024
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -1060[rbp], eax
	cmp	DWORD PTR -1060[rbp], 0
	jns	.L7
	lea	rdi, .LC6[rip]
	call	perror@PLT
.L7:
	lea	rdi, .LC7[rip]
	call	puts@PLT
	cmp	DWORD PTR -1060[rbp], 0
	jne	.L8
	lea	rdi, .LC8[rip]
	call	puts@PLT
	nop
	mov	eax, DWORD PTR -1064[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -1068[rbp]
	mov	edi, eax
	call	close@PLT
	lea	rdi, .LC8[rip]
	call	puts@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L13
	jmp	.L14
.L8:
	mov	eax, DWORD PTR -1060[rbp]
	movsx	rdx, eax
	lea	rcx, -1040[rbp]
	mov	eax, DWORD PTR -1064[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	test	rax, rax
	jns	.L10
	lea	rdi, .LC9[rip]
	call	perror@PLT
.L10:
	lea	rdi, .LC10[rip]
	call	puts@PLT
	jmp	.L11
.L14:
	call	__stack_chk_fail@PLT
.L13:
	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	"868407.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%s\012\000"
	.align	2
.LC1:
	.ascii	"socket\000"
	.align	2
.LC2:
	.ascii	"bind\000"
	.align	2
.LC3:
	.ascii	"listen\000"
	.align	2
.LC4:
	.ascii	"accept\000"
	.align	2
.LC5:
	.ascii	"Session ouverte\000"
	.align	2
.LC6:
	.ascii	"read\000"
	.align	2
.LC7:
	.ascii	">Donne recue\000"
	.align	2
.LC8:
	.ascii	"Session ferme\000"
	.align	2
.LC9:
	.ascii	"write\000"
	.align	2
.LC10:
	.ascii	"Donees renvoye\000"
	.align	2
.LC11:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 1072
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1072
	str	r0, [fp, #-1072]
	str	r1, [fp, #-1076]
	ldr	r3, .L15
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-1072]
	cmp	r3, #2
	beq	.L2
	ldr	r3, .L15+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-1076]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L15+8
	bl	fprintf
	mov	r0, #1
	bl	exit
.L2:
	ldr	r3, [fp, #-1076]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-1064]
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-1060]
	ldr	r3, [fp, #-1060]
	cmp	r3, #0
	bge	.L3
	ldr	r0, .L15+12
	bl	perror
	mov	r0, #1
	bl	exit
.L3:
	sub	r3, fp, #4
	sub	r3, r3, #1040
	sub	r3, r3, #4
	mov	r2, #2
	strh	r2, [r3]	@ movhi
	ldr	r3, [fp, #-1064]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	mov	r0, r3
	bl	htons
	mov	r3, r0
	mov	r2, r3
	sub	r3, fp, #4
	sub	r3, r3, #1040
	sub	r3, r3, #4
	strh	r2, [r3, #2]	@ movhi
	mov	r0, #0
	bl	htonl
	mov	r3, r0
	str	r3, [fp, #-1044]
	sub	r3, fp, #1040
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-1060]
	bl	bind
	mov	r3, r0
	cmp	r3, #0
	bge	.L4
	ldr	r0, .L15+16
	bl	perror
	mov	r0, #1
	bl	exit
.L4:
	mov	r1, #8
	ldr	r0, [fp, #-1060]
	bl	listen
	mov	r3, r0
	cmp	r3, #0
	bge	.L5
	ldr	r0, .L15+20
	bl	perror
	mov	r0, #1
	bl	exit
.L5:
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-1060]
	bl	accept
	str	r0, [fp, #-1056]
	ldr	r3, [fp, #-1056]
	cmp	r3, #0
	bge	.L6
	ldr	r0, .L15+24
	bl	perror
	mov	r0, #1
	bl	exit
.L6:
	ldr	r0, .L15+28
	bl	puts
.L11:
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	mov	r3, #1024
	mov	r2, r3
	mov	r1, #0
	bl	memset
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #1024
	mov	r1, r3
	ldr	r0, [fp, #-1056]
	bl	read
	str	r0, [fp, #-1052]
	ldr	r3, [fp, #-1052]
	cmp	r3, #0
	bge	.L7
	ldr	r0, .L15+32
	bl	perror
.L7:
	ldr	r0, .L15+36
	bl	puts
	ldr	r3, [fp, #-1052]
	cmp	r3, #0
	bne	.L8
	ldr	r0, .L15+40
	bl	puts
	nop
	ldr	r0, [fp, #-1056]
	bl	close
	ldr	r0, [fp, #-1060]
	bl	close
	ldr	r0, .L15+40
	bl	puts
	mov	r3, #0
	ldr	r2, .L15
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L13
	b	.L14
.L8:
	ldr	r2, [fp, #-1052]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, [fp, #-1056]
	bl	write
	mov	r3, r0
	cmp	r3, #0
	bge	.L10
	ldr	r0, .L15+44
	bl	perror
.L10:
	ldr	r0, .L15+48
	bl	puts
	b	.L11
.L14:
	bl	__stack_chk_fail
.L13:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L16:
	.align	2
.L15:
	.word	.LC11
	.word	stderr
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
