	.file	"395226.c"
	.intel_syntax noprefix
	.text
	.globl	pais
	.section	.rodata
.LC0:
	.string	"Peru"
.LC1:
	.string	"Bolivia"
.LC2:
	.string	"Colombia"
	.section	.data.rel.local,"aw"
	.align 16
	.type	pais, @object
	.size	pais, 24
pais:
	.quad	.LC0
	.quad	.LC1
	.quad	.LC2
	.globl	exmut
	.bss
	.align 32
	.type	exmut, @object
	.size	exmut, 112
exmut:
	.zero	112
	.section	.rodata
	.align 8
.LC3:
	.string	"Error while receiving the message"
.LC4:
	.string	"Entra %s"
.LC5:
	.string	" - %s Sale\n"
	.align 8
.LC6:
	.string	"Error while sending the message"
	.text
	.globl	proceso
	.type	proceso, @function
proceso:
.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	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -8[rbp], 0
	jmp	.L2
.L5:
	mov	rdx, QWORD PTR exmut[rip]
	mov	rax, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR [rax]
	mov	r8d, 0
	mov	rcx, rdx
	mov	edx, 100
	lea	rsi, exmut[rip]
	mov	edi, eax
	call	msgrcv@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], -1
	jne	.L3
	lea	rdi, .LC3[rip]
	call	perror@PLT
	mov	edi, -1
	call	exit@PLT
.L3:
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, pais[rip]
	mov	rax, QWORD PTR [rdx+rax]
	mov	rsi, rax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
	call	rand@PLT
	movsx	rdx, eax
	imul	rdx, rdx, 1431655766
	shr	rdx, 32
	mov	ecx, eax
	sar	ecx, 31
	sub	edx, ecx
	mov	ecx, edx
	add	ecx, ecx
	add	ecx, edx
	sub	eax, ecx
	mov	edx, eax
	mov	eax, edx
	mov	edi, eax
	call	sleep@PLT
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, pais[rip]
	mov	rax, QWORD PTR [rdx+rax]
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR [rax]
	mov	ecx, 2048
	mov	edx, 100
	lea	rsi, exmut[rip]
	mov	edi, eax
	call	msgsnd@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], -1
	jne	.L4
	lea	rdi, .LC6[rip]
	call	perror@PLT
	mov	edi, -1
	call	exit@PLT
.L4:
	call	rand@PLT
	movsx	rdx, eax
	imul	rdx, rdx, 1431655766
	shr	rdx, 32
	mov	ecx, eax
	sar	ecx, 31
	sub	edx, ecx
	mov	ecx, edx
	add	ecx, ecx
	add	ecx, edx
	sub	eax, ecx
	mov	edx, eax
	mov	eax, edx
	mov	edi, eax
	call	sleep@PLT
	add	DWORD PTR -8[rbp], 1
.L2:
	cmp	DWORD PTR -8[rbp], 9
	jle	.L5
	mov	edi, 0
	call	exit@PLT
	.cfi_endproc
.LFE6:
	.size	proceso, .-proceso
	.section	.rodata
	.align 8
.LC7:
	.string	"Error en la memoria compartida\n"
.LC8:
	.string	"Error en el shmat\n"
	.align 8
.LC9:
	.string	"Ha ocurrido un error durante la creaci\303\263n de la llave"
	.align 8
.LC10:
	.string	"Ha ocurrido un error al inicializar la cola de mensajes"
	.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	QWORD PTR exmut[rip], 1
	mov	edx, 950
	mov	esi, 8
	mov	edi, 4660
	call	shmget@PLT
	mov	DWORD PTR -28[rbp], eax
	cmp	DWORD PTR -28[rbp], -1
	jne	.L7
	lea	rdi, .LC7[rip]
	call	perror@PLT
	mov	edi, -1
	call	exit@PLT
.L7:
	mov	eax, DWORD PTR -28[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	shmat@PLT
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	eax, -1
	jne	.L8
	lea	rdi, .LC8[rip]
	call	perror@PLT
	mov	edi, -1
	call	exit@PLT
.L8:
	mov	esi, 1920
	mov	edi, 0
	call	msgget@PLT
	mov	rdx, QWORD PTR -16[rbp]
	mov	DWORD PTR [rdx], eax
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	eax, -1
	jne	.L9
	lea	rdi, .LC9[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L9:
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR [rax]
	mov	ecx, 0
	mov	edx, 0
	lea	rsi, exmut[rip]
	mov	edi, eax
	call	msgsnd@PLT
	mov	DWORD PTR -24[rbp], eax
	cmp	DWORD PTR -24[rbp], -1
	jne	.L10
	lea	rdi, .LC10[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L10:
	call	getpid@PLT
	mov	edi, eax
	call	srand@PLT
	mov	DWORD PTR -32[rbp], 0
	jmp	.L11
.L13:
	call	fork@PLT
	mov	DWORD PTR -20[rbp], eax
	cmp	DWORD PTR -20[rbp], 0
	jne	.L12
	mov	rdx, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR -32[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	proceso
.L12:
	add	DWORD PTR -32[rbp], 1
.L11:
	cmp	DWORD PTR -32[rbp], 2
	jle	.L13
	mov	DWORD PTR -32[rbp], 0
	jmp	.L14
.L15:
	lea	rax, -36[rbp]
	mov	rdi, rax
	call	wait@PLT
	mov	DWORD PTR -20[rbp], eax
	add	DWORD PTR -32[rbp], 1
.L14:
	cmp	DWORD PTR -32[rbp], 2
	jle	.L15
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	shmdt@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	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	"395226.c"
	.text
	.global	pais
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Peru\000"
	.align	2
.LC1:
	.ascii	"Bolivia\000"
	.align	2
.LC2:
	.ascii	"Colombia\000"
	.data
	.align	2
	.type	pais, %object
	.size	pais, 12
pais:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.comm	exmut,104,4
	.section	.rodata
	.align	2
.LC3:
	.ascii	"Error while receiving the message\000"
	.align	2
.LC4:
	.ascii	"Entra %s\000"
	.align	2
.LC5:
	.ascii	" - %s Sale\012\000"
	.align	2
.LC6:
	.ascii	"Error while sending the message\000"
	.text
	.align	2
	.global	proceso
	.syntax unified
	.arm
	.fpu softvfp
	.type	proceso, %function
proceso:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L2
.L5:
	ldr	r3, [fp, #-20]
	ldr	r0, [r3]
	ldr	r3, .L6
	ldr	r3, [r3]
	mov	r2, #0
	str	r2, [sp]
	mov	r2, #100
	ldr	r1, .L6
	bl	msgrcv
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	bne	.L3
	ldr	r0, .L6+4
	bl	perror
	mvn	r0, #0
	bl	exit
.L3:
	ldr	r2, .L6+8
	ldr	r3, [fp, #-16]
	ldr	r3, [r2, r3, lsl #2]
	mov	r1, r3
	ldr	r0, .L6+12
	bl	printf
	ldr	r3, .L6+16
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	bl	rand
	mov	r2, r0
	ldr	r3, .L6+20
	smull	r0, r1, r3, r2
	asr	r3, r2, #31
	sub	r1, r1, r3
	mov	r3, r1
	lsl	r3, r3, #1
	add	r3, r3, r1
	sub	r1, r2, r3
	mov	r3, r1
	mov	r0, r3
	bl	sleep
	ldr	r2, .L6+8
	ldr	r3, [fp, #-16]
	ldr	r3, [r2, r3, lsl #2]
	mov	r1, r3
	ldr	r0, .L6+24
	bl	printf
	ldr	r3, [fp, #-20]
	ldr	r0, [r3]
	mov	r3, #2048
	mov	r2, #100
	ldr	r1, .L6
	bl	msgsnd
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	bne	.L4
	ldr	r0, .L6+28
	bl	perror
	mvn	r0, #0
	bl	exit
.L4:
	bl	rand
	mov	r2, r0
	ldr	r3, .L6+20
	smull	r0, r1, r3, r2
	asr	r3, r2, #31
	sub	r1, r1, r3
	mov	r3, r1
	lsl	r3, r3, #1
	add	r3, r3, r1
	sub	r1, r2, r3
	mov	r3, r1
	mov	r0, r3
	bl	sleep
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L2:
	ldr	r3, [fp, #-12]
	cmp	r3, #9
	ble	.L5
	mov	r0, #0
	bl	exit
.L7:
	.align	2
.L6:
	.word	exmut
	.word	.LC3
	.word	pais
	.word	.LC4
	.word	stdout
	.word	1431655766
	.word	.LC5
	.word	.LC6
	.size	proceso, .-proceso
	.section	.rodata
	.align	2
.LC7:
	.ascii	"Error en la memoria compartida\012\000"
	.align	2
.LC8:
	.ascii	"Error en el shmat\012\000"
	.align	2
.LC9:
	.ascii	"Ha ocurrido un error durante la creaci\303\263n de "
	.ascii	"la llave\000"
	.align	2
.LC10:
	.ascii	"Ha ocurrido un error al inicializar la cola de mens"
	.ascii	"ajes\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 = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	ldr	r3, .L20
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L20+4
	mov	r2, #1
	str	r2, [r3]
	ldr	r2, .L20+8
	mov	r1, #4
	ldr	r0, .L20+12
	bl	shmget
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-24]
	cmn	r3, #1
	bne	.L9
	ldr	r0, .L20+16
	bl	perror
	mvn	r0, #0
	bl	exit
.L9:
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-24]
	bl	shmat
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	cmn	r3, #1
	bne	.L10
	ldr	r0, .L20+20
	bl	perror
	mvn	r0, #0
	bl	exit
.L10:
	mov	r1, #1920
	mov	r0, #0
	bl	msgget
	mov	r2, r0
	ldr	r3, [fp, #-20]
	str	r2, [r3]
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	cmn	r3, #1
	bne	.L11
	ldr	r0, .L20+24
	bl	perror
	mov	r0, #1
	bl	exit
.L11:
	ldr	r3, [fp, #-20]
	ldr	r0, [r3]
	mov	r3, #0
	mov	r2, #0
	ldr	r1, .L20+4
	bl	msgsnd
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmn	r3, #1
	bne	.L12
	ldr	r0, .L20+28
	bl	perror
	mov	r0, #1
	bl	exit
.L12:
	bl	getpid
	mov	r3, r0
	mov	r0, r3
	bl	srand
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L13
.L15:
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L14
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-28]
	bl	proceso
.L14:
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L13:
	ldr	r3, [fp, #-28]
	cmp	r3, #2
	ble	.L15
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L16
.L17:
	sub	r3, fp, #32
	mov	r0, r3
	bl	wait
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L16:
	ldr	r3, [fp, #-28]
	cmp	r3, #2
	ble	.L17
	ldr	r0, [fp, #-20]
	bl	shmdt
	mov	r3, #0
	ldr	r2, .L20
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L19
	bl	__stack_chk_fail
.L19:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L21:
	.align	2
.L20:
	.word	.LC11
	.word	exmut
	.word	950
	.word	4660
	.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
