	.file	"34283.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"shmfile"
.LC1:
	.string	"%d"
	.align 8
.LC2:
	.string	"Le SE n'a pas pu cr\303\251er la socket %d\n"
.LC3:
	.string	"127.0.0.1"
.LC4:
	.string	"bind error"
.LC5:
	.string	"listen\n"
.LC6:
	.string	"accept\n"
.LC7:
	.string	"errreur de cr\303\251ation du fils\n"
.LC8:
	.string	"indentit\303\251 du client %d\n"
.LC9:
	.string	"%s \n"
.LC10:
	.string	"Je suis le fils 1 "
.LC11:
	.string	"Fils 1 val a : %s \n"
.LC12:
	.string	"Je suis le fils 2 "
.LC13:
	.string	"Fils 2 val a : %s \n"
.LC14:
	.string	"Je suis le pere "
.LC15:
	.string	"Fils %d status : %d \n"
.LC16:
	.string	"FIls %d status : %d \n"
.LC17:
	.string	"Val final : %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
	add	rsp, -128
	mov	DWORD PTR -116[rbp], edi
	mov	QWORD PTR -128[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -100[rbp], eax
	mov	esi, 65
	lea	rdi, .LC0[rip]
	call	ftok@PLT
	mov	DWORD PTR -96[rbp], eax
	mov	eax, DWORD PTR -96[rbp]
	mov	edx, 950
	mov	esi, 1024
	mov	edi, eax
	call	shmget@PLT
	mov	DWORD PTR -92[rbp], eax
	mov	eax, DWORD PTR -92[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	shmat@PLT
	mov	QWORD PTR -72[rbp], rax
	mov	rax, QWORD PTR -72[rbp]
	mov	edx, 5
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	cmp	DWORD PTR -100[rbp], 0
	jns	.L2
	mov	eax, DWORD PTR -100[rbp]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, -1
	call	exit@PLT
.L2:
	lea	rax, -64[rbp]
	mov	edx, 16
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	WORD PTR -64[rbp], 2
	mov	edi, 56789
	call	htons@PLT
	mov	WORD PTR -62[rbp], ax
	lea	rax, -64[rbp]
	add	rax, 4
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	call	inet_aton@PLT
	lea	rcx, -64[rbp]
	mov	eax, DWORD PTR -100[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	bind@PLT
	test	eax, eax
	jns	.L3
	lea	rdi, .LC4[rip]
	call	puts@PLT
	mov	edi, -1
	call	exit@PLT
.L3:
	mov	eax, DWORD PTR -100[rbp]
	mov	esi, 50
	mov	edi, eax
	call	listen@PLT
	cmp	eax, -1
	jge	.L4
	lea	rdi, .LC5[rip]
	call	perror@PLT
.L4:
	mov	DWORD PTR -108[rbp], 16
.L15:
	lea	rdx, -108[rbp]
	lea	rcx, -48[rbp]
	mov	eax, DWORD PTR -100[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	accept@PLT
	mov	DWORD PTR -88[rbp], eax
	cmp	DWORD PTR -88[rbp], 0
	jns	.L5
	lea	rdi, .LC6[rip]
	call	perror@PLT
	mov	edi, -1
	call	exit@PLT
.L5:
	call	fork@PLT
	mov	DWORD PTR -84[rbp], eax
	cmp	DWORD PTR -84[rbp], 0
	jns	.L6
	lea	rdi, .LC7[rip]
	call	perror@PLT
.L6:
	cmp	DWORD PTR -84[rbp], 0
	jne	.L7
	movzx	eax, WORD PTR -46[rbp]
	movzx	eax, ax
	mov	esi, eax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L8
.L9:
	lea	rax, -18[rbp]
	mov	rsi, rax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
.L8:
	lea	rcx, -18[rbp]
	mov	eax, DWORD PTR -88[rbp]
	mov	edx, 10
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	test	rax, rax
	jne	.L9
	call	fork@PLT
	mov	DWORD PTR -80[rbp], eax
	cmp	DWORD PTR -80[rbp], 0
	jns	.L10
	lea	rdi, .LC7[rip]
	call	perror@PLT
.L10:
	cmp	DWORD PTR -80[rbp], 0
	jne	.L11
	lea	rdi, .LC10[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -72[rbp]
	mov	rdi, rax
	call	atoi@PLT
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -72[rbp]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	mov	rax, QWORD PTR -72[rbp]
	mov	rsi, rax
	lea	rdi, .LC11[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L15
.L11:
	mov	edi, 5
	call	sleep@PLT
	call	fork@PLT
	mov	DWORD PTR -76[rbp], eax
	cmp	DWORD PTR -76[rbp], 0
	jns	.L13
	lea	rdi, .LC7[rip]
	call	perror@PLT
.L13:
	cmp	DWORD PTR -76[rbp], 0
	jne	.L14
	lea	rdi, .LC12[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -72[rbp]
	mov	rdi, rax
	call	atoi@PLT
	lea	edx, 2[rax]
	mov	rax, QWORD PTR -72[rbp]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	mov	rax, QWORD PTR -72[rbp]
	mov	rsi, rax
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L15
.L14:
	lea	rdi, .LC14[rip]
	call	puts@PLT
	lea	rax, -104[rbp]
	mov	rdi, rax
	call	wait@PLT
	mov	DWORD PTR -80[rbp], eax
	mov	edx, DWORD PTR -104[rbp]
	mov	eax, DWORD PTR -80[rbp]
	mov	esi, eax
	lea	rdi, .LC15[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -104[rbp]
	mov	rdi, rax
	call	wait@PLT
	mov	DWORD PTR -76[rbp], eax
	mov	edx, DWORD PTR -104[rbp]
	mov	eax, DWORD PTR -76[rbp]
	mov	esi, eax
	lea	rdi, .LC16[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -72[rbp]
	mov	rsi, rax
	lea	rdi, .LC17[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L15
.L7:
	mov	rax, QWORD PTR -72[rbp]
	mov	rdi, rax
	call	shmdt@PLT
	mov	eax, DWORD PTR -92[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	shmctl@PLT
	mov	eax, DWORD PTR -88[rbp]
	mov	edi, eax
	call	close@PLT
	jmp	.L15
	.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	"34283.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"shmfile\000"
	.align	2
.LC1:
	.ascii	"%d\000"
	.align	2
.LC2:
	.ascii	"Le SE n'a pas pu cr\303\251er la socket %d\012\000"
	.align	2
.LC3:
	.ascii	"127.0.0.1\000"
	.align	2
.LC4:
	.ascii	"bind error\000"
	.align	2
.LC5:
	.ascii	"listen\012\000"
	.align	2
.LC6:
	.ascii	"accept\012\000"
	.align	2
.LC7:
	.ascii	"errreur de cr\303\251ation du fils\012\000"
	.align	2
.LC8:
	.ascii	"indentit\303\251 du client %d\012\000"
	.align	2
.LC9:
	.ascii	"%s \012\000"
	.align	2
.LC10:
	.ascii	"Je suis le fils 1 \000"
	.align	2
.LC11:
	.ascii	"Fils 1 val a : %s \012\000"
	.align	2
.LC12:
	.ascii	"Je suis le fils 2 \000"
	.align	2
.LC13:
	.ascii	"Fils 2 val a : %s \012\000"
	.align	2
.LC14:
	.ascii	"Je suis le pere \000"
	.align	2
.LC15:
	.ascii	"Fils %d status : %d \012\000"
	.align	2
.LC16:
	.ascii	"FIls %d status : %d \012\000"
	.align	2
.LC17:
	.ascii	"Val final : %s \012\000"
	.align	2
.LC18:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 96
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #96
	str	r0, [fp, #-96]
	str	r1, [fp, #-100]
	ldr	r3, .L17
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-84]
	mov	r1, #65
	ldr	r0, .L17+4
	bl	ftok
	str	r0, [fp, #-80]
	ldr	r2, .L17+8
	mov	r1, #1024
	ldr	r0, [fp, #-80]
	bl	shmget
	str	r0, [fp, #-76]
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-76]
	bl	shmat
	str	r0, [fp, #-72]
	mov	r2, #5
	ldr	r1, .L17+12
	ldr	r0, [fp, #-72]
	bl	sprintf
	ldr	r3, [fp, #-84]
	cmp	r3, #0
	bge	.L2
	ldr	r1, [fp, #-84]
	ldr	r0, .L17+16
	bl	printf
	mvn	r0, #0
	bl	exit
.L2:
	sub	r3, fp, #52
	mov	r2, #16
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #2
	strh	r3, [fp, #-52]	@ movhi
	ldr	r0, .L17+20
	bl	htons
	mov	r3, r0
	strh	r3, [fp, #-50]	@ movhi
	sub	r3, fp, #52
	add	r3, r3, #4
	mov	r1, r3
	ldr	r0, .L17+24
	bl	inet_aton
	sub	r3, fp, #52
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-84]
	bl	bind
	mov	r3, r0
	cmp	r3, #0
	bge	.L3
	ldr	r0, .L17+28
	bl	puts
	mvn	r0, #0
	bl	exit
.L3:
	mov	r1, #50
	ldr	r0, [fp, #-84]
	bl	listen
	mov	r3, r0
	cmn	r3, #1
	bge	.L4
	ldr	r0, .L17+32
	bl	perror
.L4:
	mov	r3, #16
	str	r3, [fp, #-92]
.L15:
	sub	r2, fp, #92
	sub	r3, fp, #36
	mov	r1, r3
	ldr	r0, [fp, #-84]
	bl	accept
	str	r0, [fp, #-68]
	ldr	r3, [fp, #-68]
	cmp	r3, #0
	bge	.L5
	ldr	r0, .L17+36
	bl	perror
	mvn	r0, #0
	bl	exit
.L5:
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-64]
	ldr	r3, [fp, #-64]
	cmp	r3, #0
	bge	.L6
	ldr	r0, .L17+40
	bl	perror
.L6:
	ldr	r3, [fp, #-64]
	cmp	r3, #0
	bne	.L7
	ldrh	r3, [fp, #-34]
	mov	r1, r3
	ldr	r0, .L17+44
	bl	printf
	b	.L8
.L9:
	sub	r3, fp, #20
	mov	r1, r3
	ldr	r0, .L17+48
	bl	printf
.L8:
	sub	r3, fp, #20
	mov	r2, #10
	mov	r1, r3
	ldr	r0, [fp, #-68]
	bl	read
	mov	r3, r0
	cmp	r3, #0
	bne	.L9
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-60]
	ldr	r3, [fp, #-60]
	cmp	r3, #0
	bge	.L10
	ldr	r0, .L17+40
	bl	perror
.L10:
	ldr	r3, [fp, #-60]
	cmp	r3, #0
	bne	.L11
	ldr	r0, .L17+52
	bl	puts
	ldr	r0, [fp, #-72]
	bl	atoi
	mov	r3, r0
	add	r3, r3, #1
	mov	r2, r3
	ldr	r1, .L17+12
	ldr	r0, [fp, #-72]
	bl	sprintf
	ldr	r1, [fp, #-72]
	ldr	r0, .L17+56
	bl	printf
	b	.L15
.L11:
	mov	r0, #5
	bl	sleep
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-56]
	ldr	r3, [fp, #-56]
	cmp	r3, #0
	bge	.L13
	ldr	r0, .L17+40
	bl	perror
.L13:
	ldr	r3, [fp, #-56]
	cmp	r3, #0
	bne	.L14
	ldr	r0, .L17+60
	bl	puts
	ldr	r0, [fp, #-72]
	bl	atoi
	mov	r3, r0
	add	r3, r3, #2
	mov	r2, r3
	ldr	r1, .L17+12
	ldr	r0, [fp, #-72]
	bl	sprintf
	ldr	r1, [fp, #-72]
	ldr	r0, .L17+64
	bl	printf
	b	.L15
.L14:
	ldr	r0, .L17+68
	bl	puts
	sub	r3, fp, #88
	mov	r0, r3
	bl	wait
	str	r0, [fp, #-60]
	ldr	r3, [fp, #-88]
	mov	r2, r3
	ldr	r1, [fp, #-60]
	ldr	r0, .L17+72
	bl	printf
	sub	r3, fp, #88
	mov	r0, r3
	bl	wait
	str	r0, [fp, #-56]
	ldr	r3, [fp, #-88]
	mov	r2, r3
	ldr	r1, [fp, #-56]
	ldr	r0, .L17+76
	bl	printf
	ldr	r1, [fp, #-72]
	ldr	r0, .L17+80
	bl	printf
	b	.L15
.L7:
	ldr	r0, [fp, #-72]
	bl	shmdt
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-76]
	bl	shmctl
	ldr	r0, [fp, #-68]
	bl	close
	b	.L15
.L18:
	.align	2
.L17:
	.word	.LC18
	.word	.LC0
	.word	950
	.word	.LC1
	.word	.LC2
	.word	56789
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.word	.LC17
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
