	.file	"64916.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"creation de la memoire partage\n"
.LC1:
	.string	"attachement \n"
.LC2:
	.string	"detachement \n"
.LC3:
	.string	"%d "
.LC4:
	.string	"\n"
	.align 8
.LC5:
	.string	"destruction de la memoire partagee\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, 32
	mov	edi, 0
	call	time@PLT
	mov	edi, eax
	call	srand@PLT
	mov	edx, 950
	mov	esi, 1204
	mov	edi, 0
	call	shmget@PLT
	mov	DWORD PTR -24[rbp], eax
	cmp	DWORD PTR -24[rbp], -1
	jne	.L2
	lea	rdi, .LC0[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	call	fork@PLT
	mov	DWORD PTR -20[rbp], eax
	cmp	DWORD PTR -20[rbp], 0
	jne	.L3
	mov	edi, 1
	call	sleep@PLT
	mov	edi, 0
	call	time@PLT
	mov	edi, eax
	call	srand@PLT
	mov	eax, DWORD PTR -24[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	shmat@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], -1
	jne	.L4
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	edi, 2
	call	exit@PLT
.L4:
	mov	DWORD PTR -28[rbp], 25
	jmp	.L5
.L6:
	call	rand@PLT
	mov	edx, DWORD PTR -28[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*4]
	mov	rdx, QWORD PTR -8[rbp]
	add	rcx, rdx
	movsx	rdx, eax
	imul	rdx, rdx, 1374389535
	shr	rdx, 32
	sar	edx, 5
	mov	esi, eax
	sar	esi, 31
	sub	edx, esi
	imul	esi, edx, 100
	sub	eax, esi
	mov	edx, eax
	mov	DWORD PTR [rcx], edx
	add	DWORD PTR -28[rbp], 1
.L5:
	cmp	DWORD PTR -28[rbp], 49
	jle	.L6
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 300
	mov	DWORD PTR [rax], 1
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	shmdt@PLT
	cmp	eax, -1
	jne	.L7
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	edi, 3
	call	exit@PLT
.L7:
	mov	edi, 0
	call	exit@PLT
.L3:
	mov	eax, DWORD PTR -24[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	shmat@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], -1
	jne	.L8
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	edi, 2
	call	exit@PLT
.L8:
	mov	DWORD PTR -28[rbp], 0
	jmp	.L9
.L10:
	call	rand@PLT
	mov	edx, DWORD PTR -28[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*4]
	mov	rdx, QWORD PTR -16[rbp]
	add	rcx, rdx
	movsx	rdx, eax
	imul	rdx, rdx, 1374389535
	shr	rdx, 32
	sar	edx, 5
	mov	esi, eax
	sar	esi, 31
	sub	edx, esi
	imul	esi, edx, 100
	sub	eax, esi
	mov	edx, eax
	mov	DWORD PTR [rcx], edx
	add	DWORD PTR -28[rbp], 1
.L9:
	cmp	DWORD PTR -28[rbp], 24
	jle	.L10
	nop
.L11:
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 300
	mov	eax, DWORD PTR [rax]
	cmp	eax, 1
	jne	.L11
	mov	DWORD PTR -28[rbp], 50
	jmp	.L12
.L13:
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	sal	rax, 2
	lea	rdx, -200[rax]
	mov	rax, QWORD PTR -16[rbp]
	add	rax, rdx
	mov	ecx, DWORD PTR [rax]
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	sal	rax, 2
	lea	rdx, -100[rax]
	mov	rax, QWORD PTR -16[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rsi, 0[0+rax*4]
	mov	rax, QWORD PTR -16[rbp]
	add	rax, rsi
	add	edx, ecx
	mov	DWORD PTR [rax], edx
	add	DWORD PTR -28[rbp], 1
.L12:
	cmp	DWORD PTR -28[rbp], 74
	jle	.L13
	mov	DWORD PTR -28[rbp], 0
	jmp	.L14
.L16:
	mov	edx, DWORD PTR -28[rbp]
	movsx	rax, edx
	imul	rax, rax, 1717986919
	shr	rax, 32
	sar	eax
	mov	ecx, edx
	sar	ecx, 31
	sub	eax, ecx
	mov	ecx, eax
	sal	ecx, 2
	add	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	test	eax, eax
	jne	.L15
	mov	edi, 10
	call	putchar@PLT
.L15:
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -16[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -28[rbp], 1
.L14:
	cmp	DWORD PTR -28[rbp], 24
	jle	.L16
	lea	rdi, .LC4[rip]
	call	puts@PLT
	mov	DWORD PTR -28[rbp], 25
	jmp	.L17
.L19:
	mov	edx, DWORD PTR -28[rbp]
	movsx	rax, edx
	imul	rax, rax, 1717986919
	shr	rax, 32
	sar	eax
	mov	ecx, edx
	sar	ecx, 31
	sub	eax, ecx
	mov	ecx, eax
	sal	ecx, 2
	add	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	test	eax, eax
	jne	.L18
	mov	edi, 10
	call	putchar@PLT
.L18:
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -16[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -28[rbp], 1
.L17:
	cmp	DWORD PTR -28[rbp], 49
	jle	.L19
	lea	rdi, .LC4[rip]
	call	puts@PLT
	mov	DWORD PTR -28[rbp], 50
	jmp	.L20
.L22:
	mov	edx, DWORD PTR -28[rbp]
	movsx	rax, edx
	imul	rax, rax, 1717986919
	shr	rax, 32
	sar	eax
	mov	ecx, edx
	sar	ecx, 31
	sub	eax, ecx
	mov	ecx, eax
	sal	ecx, 2
	add	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	test	eax, eax
	jne	.L21
	mov	edi, 10
	call	putchar@PLT
.L21:
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -16[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -28[rbp], 1
.L20:
	cmp	DWORD PTR -28[rbp], 74
	jle	.L22
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	shmdt@PLT
	cmp	eax, -1
	jne	.L23
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	edi, 3
	call	exit@PLT
.L23:
	mov	eax, DWORD PTR -24[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	shmctl@PLT
	cmp	eax, -1
	jne	.L24
	lea	rdi, .LC5[rip]
	call	perror@PLT
	mov	edi, 4
	call	exit@PLT
.L24:
	mov	eax, 0
	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	"64916.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"creation de la memoire partage\012\000"
	.align	2
.LC1:
	.ascii	"attachement \012\000"
	.align	2
.LC2:
	.ascii	"detachement \012\000"
	.align	2
.LC3:
	.ascii	"%d \000"
	.align	2
.LC4:
	.ascii	"\012\000"
	.align	2
.LC5:
	.ascii	"destruction de la memoire partagee\012\000"
	.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
	mov	r0, #0
	bl	time
	mov	r3, r0
	mov	r0, r3
	bl	srand
	ldr	r2, .L26
	ldr	r1, .L26+4
	mov	r0, #0
	bl	shmget
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmn	r3, #1
	bne	.L2
	ldr	r0, .L26+8
	bl	perror
	mov	r0, #1
	bl	exit
.L2:
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L3
	mov	r0, #1
	bl	sleep
	mov	r0, #0
	bl	time
	mov	r3, r0
	mov	r0, r3
	bl	srand
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-20]
	bl	shmat
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	bne	.L4
	ldr	r0, .L26+12
	bl	perror
	mov	r0, #2
	bl	exit
.L4:
	mov	r3, #25
	str	r3, [fp, #-24]
	b	.L5
.L6:
	bl	rand
	mov	r1, r0
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-8]
	add	r0, r2, r3
	ldr	r3, .L26+16
	smull	r2, r3, r1, r3
	asr	r2, r3, #5
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	sub	r2, r1, r3
	str	r2, [r0]
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L5:
	ldr	r3, [fp, #-24]
	cmp	r3, #49
	ble	.L6
	ldr	r3, [fp, #-8]
	add	r3, r3, #300
	mov	r2, #1
	str	r2, [r3]
	ldr	r0, [fp, #-8]
	bl	shmdt
	mov	r3, r0
	cmn	r3, #1
	bne	.L7
	ldr	r0, .L26+20
	bl	perror
	mov	r0, #3
	bl	exit
.L7:
	mov	r0, #0
	bl	exit
.L3:
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-20]
	bl	shmat
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmn	r3, #1
	bne	.L8
	ldr	r0, .L26+12
	bl	perror
	mov	r0, #2
	bl	exit
.L8:
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L9
.L10:
	bl	rand
	mov	r1, r0
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-12]
	add	r0, r2, r3
	ldr	r3, .L26+16
	smull	r2, r3, r1, r3
	asr	r2, r3, #5
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	sub	r2, r1, r3
	str	r2, [r0]
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L9:
	ldr	r3, [fp, #-24]
	cmp	r3, #24
	ble	.L10
	nop
.L11:
	ldr	r3, [fp, #-12]
	add	r3, r3, #300
	ldr	r3, [r3]
	cmp	r3, #1
	bne	.L11
	mov	r3, #50
	str	r3, [fp, #-24]
	b	.L12
.L13:
	ldr	r3, [fp, #-24]
	sub	r3, r3, #-1073741774
	lsl	r3, r3, #2
	ldr	r2, [fp, #-12]
	add	r3, r2, r3
	ldr	r1, [r3]
	ldr	r3, [fp, #-24]
	sub	r3, r3, #-1073741799
	lsl	r3, r3, #2
	ldr	r2, [fp, #-12]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	ldr	r0, [fp, #-12]
	add	r3, r0, r3
	add	r2, r1, r2
	str	r2, [r3]
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L12:
	ldr	r3, [fp, #-24]
	cmp	r3, #74
	ble	.L13
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L14
.L16:
	ldr	r1, [fp, #-24]
	ldr	r3, .L26+24
	smull	r2, r3, r1, r3
	asr	r2, r3, #1
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	sub	r2, r1, r3
	cmp	r2, #0
	bne	.L15
	mov	r0, #10
	bl	putchar
.L15:
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-12]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L26+28
	bl	printf
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L14:
	ldr	r3, [fp, #-24]
	cmp	r3, #24
	ble	.L16
	ldr	r0, .L26+32
	bl	puts
	mov	r3, #25
	str	r3, [fp, #-24]
	b	.L17
.L19:
	ldr	r1, [fp, #-24]
	ldr	r3, .L26+24
	smull	r2, r3, r1, r3
	asr	r2, r3, #1
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	sub	r2, r1, r3
	cmp	r2, #0
	bne	.L18
	mov	r0, #10
	bl	putchar
.L18:
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-12]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L26+28
	bl	printf
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L17:
	ldr	r3, [fp, #-24]
	cmp	r3, #49
	ble	.L19
	ldr	r0, .L26+32
	bl	puts
	mov	r3, #50
	str	r3, [fp, #-24]
	b	.L20
.L22:
	ldr	r1, [fp, #-24]
	ldr	r3, .L26+24
	smull	r2, r3, r1, r3
	asr	r2, r3, #1
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	sub	r2, r1, r3
	cmp	r2, #0
	bne	.L21
	mov	r0, #10
	bl	putchar
.L21:
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-12]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L26+28
	bl	printf
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L20:
	ldr	r3, [fp, #-24]
	cmp	r3, #74
	ble	.L22
	ldr	r0, [fp, #-12]
	bl	shmdt
	mov	r3, r0
	cmn	r3, #1
	bne	.L23
	ldr	r0, .L26+20
	bl	perror
	mov	r0, #3
	bl	exit
.L23:
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-20]
	bl	shmctl
	mov	r3, r0
	cmn	r3, #1
	bne	.L24
	ldr	r0, .L26+36
	bl	perror
	mov	r0, #4
	bl	exit
.L24:
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L27:
	.align	2
.L26:
	.word	950
	.word	1204
	.word	.LC0
	.word	.LC1
	.word	1374389535
	.word	.LC2
	.word	1717986919
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
