	.file	"12488.c"
	.intel_syntax noprefix
	.text
	.globl	pid
	.bss
	.align 4
	.type	pid, @object
	.size	pid, 4
pid:
	.zero	4
	.globl	buffer
	.align 32
	.type	buffer, @object
	.size	buffer, 128
buffer:
	.zero	128
	.section	.rodata
.LC0:
	.string	"error en linea %d: %s"
	.text
	.globl	error
	.type	error, @function
error:
.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, 160
	mov	DWORD PTR -148[rbp], edi
	mov	QWORD PTR -160[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -144[rbp], 0
	mov	QWORD PTR -136[rbp], 0
	mov	QWORD PTR -128[rbp], 0
	mov	QWORD PTR -120[rbp], 0
	mov	QWORD PTR -112[rbp], 0
	mov	QWORD PTR -104[rbp], 0
	mov	QWORD PTR -96[rbp], 0
	mov	QWORD PTR -88[rbp], 0
	mov	QWORD PTR -80[rbp], 0
	mov	QWORD PTR -72[rbp], 0
	mov	QWORD PTR -64[rbp], 0
	mov	QWORD PTR -56[rbp], 0
	mov	QWORD PTR -48[rbp], 0
	mov	QWORD PTR -40[rbp], 0
	mov	QWORD PTR -32[rbp], 0
	mov	QWORD PTR -24[rbp], 0
	mov	rcx, QWORD PTR -160[rbp]
	mov	edx, DWORD PTR -148[rbp]
	lea	rax, -144[rbp]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -144[rbp]
	mov	rdi, rax
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
	.cfi_endproc
.LFE6:
	.size	error, .-error
	.section	.rodata
.LC1:
	.string	"write"
	.text
	.globl	my_write
	.type	my_write, @function
my_write:
.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	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -24[rbp], edx
	mov	DWORD PTR -36[rbp], ecx
	mov	eax, DWORD PTR -24[rbp]
	movsx	rdx, eax
	mov	rcx, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	jns	.L4
	mov	eax, DWORD PTR -36[rbp]
	lea	rsi, .LC1[rip]
	mov	edi, eax
	call	error
.L4:
	mov	eax, DWORD PTR -4[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	my_write, .-my_write
	.section	.rodata
	.align 8
.LC2:
	.string	"Usage: ./acertar_N A B C ...J \nSe aceptan entre 1 y 10 argumentos, y cada uno es un entero entre 0 y 9\n\nSe obtiene un valor aleatorio para cada argumento y se devuelve el n\303\272mero de coincidencias."
	.text
	.globl	usage
	.type	usage, @function
usage:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	DWORD PTR -4[rbp], edi
	lea	rsi, .LC2[rip]
	lea	rdi, buffer[rip]
	mov	eax, 0
	call	sprintf@PLT
	mov	eax, DWORD PTR -4[rbp]
	lea	rsi, buffer[rip]
	mov	edi, eax
	call	error
	mov	edi, 1
	call	exit@PLT
	.cfi_endproc
.LFE8:
	.size	usage, .-usage
	.section	.rodata
.LC3:
	.string	"fork\n"
.LC4:
	.string	"acertar_1"
.LC5:
	.string	"./acertar_1"
.LC6:
	.string	"exec\n"
.LC7:
	.string	"waitpid\n"
	.align 8
.LC8:
	.string	"PID=%d, Hijos acabados en exit=%d, num. aciertos=%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB9:
	.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	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -36[rbp], 1
	jle	.L8
	cmp	DWORD PTR -36[rbp], 11
	jle	.L9
.L8:
	mov	edi, 41
	call	usage
.L9:
	mov	DWORD PTR -24[rbp], 1
	jmp	.L10
.L14:
	call	fork@PLT
	mov	DWORD PTR pid[rip], eax
	mov	eax, DWORD PTR pid[rip]
	cmp	eax, -1
	je	.L11
	test	eax, eax
	je	.L12
	jmp	.L13
.L11:
	lea	rsi, .LC3[rip]
	mov	edi, 47
	call	error
.L12:
	mov	eax, DWORD PTR -24[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	ecx, 0
	mov	rdx, rax
	lea	rsi, .LC4[rip]
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	execlp@PLT
	lea	rsi, .LC6[rip]
	mov	edi, 50
	call	error
.L13:
	add	DWORD PTR -24[rbp], 1
.L10:
	mov	eax, DWORD PTR -24[rbp]
	cmp	eax, DWORD PTR -36[rbp]
	jl	.L14
	mov	DWORD PTR -20[rbp], 0
	mov	DWORD PTR -16[rbp], 0
	mov	DWORD PTR -24[rbp], 1
	jmp	.L15
.L18:
	lea	rax, -28[rbp]
	mov	edx, 0
	mov	rsi, rax
	mov	edi, -1
	call	waitpid@PLT
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], 0
	jns	.L16
	lea	rsi, .LC7[rip]
	mov	edi, 63
	call	error
.L16:
	mov	eax, DWORD PTR -28[rbp]
	and	eax, 127
	test	eax, eax
	jne	.L17
	add	DWORD PTR -16[rbp], 1
	mov	eax, DWORD PTR -28[rbp]
	sar	eax, 8
	movzx	eax, al
	add	DWORD PTR -20[rbp], eax
.L17:
	add	DWORD PTR -24[rbp], 1
.L15:
	mov	eax, DWORD PTR -24[rbp]
	cmp	eax, DWORD PTR -36[rbp]
	jl	.L18
	call	getpid@PLT
	mov	edx, eax
	mov	ecx, DWORD PTR -20[rbp]
	mov	eax, DWORD PTR -16[rbp]
	mov	r8d, ecx
	mov	ecx, eax
	lea	rsi, .LC8[rip]
	lea	rdi, buffer[rip]
	mov	eax, 0
	call	sprintf@PLT
	lea	rdi, buffer[rip]
	call	strlen@PLT
	mov	ecx, 71
	mov	edx, eax
	lea	rsi, buffer[rip]
	mov	edi, 1
	call	my_write
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.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	"12488.c"
	.text
	.comm	pid,4,4
	.global	buffer
	.bss
	.align	2
	.type	buffer, %object
	.size	buffer, 128
buffer:
	.space	128
	.section	.rodata
	.align	2
.LC0:
	.ascii	"error en linea %d: %s\000"
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	error
	.syntax unified
	.arm
	.fpu softvfp
	.type	error, %function
error:
	@ args = 0, pretend = 0, frame = 144
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #144
	str	r0, [fp, #-144]
	str	r1, [fp, #-148]
	ldr	r3, .L3
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-136]
	sub	r3, fp, #132
	mov	r2, #124
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r0, fp, #136
	ldr	r3, [fp, #-148]
	ldr	r2, [fp, #-144]
	ldr	r1, .L3+4
	bl	sprintf
	sub	r3, fp, #136
	mov	r0, r3
	bl	perror
	mov	r0, #1
	bl	exit
.L4:
	.align	2
.L3:
	.word	.LC1
	.word	.LC0
	.size	error, .-error
	.section	.rodata
	.align	2
.LC2:
	.ascii	"write\000"
	.text
	.align	2
	.global	my_write
	.syntax unified
	.arm
	.fpu softvfp
	.type	my_write, %function
my_write:
	@ args = 0, pretend = 0, frame = 24
	@ 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]
	str	r2, [fp, #-24]
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-24]
	mov	r2, r3
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	write
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bge	.L6
	ldr	r1, .L8
	ldr	r0, [fp, #-28]
	bl	error
.L6:
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L9:
	.align	2
.L8:
	.word	.LC2
	.size	my_write, .-my_write
	.section	.rodata
	.align	2
.LC3:
	.ascii	"Usage: ./acertar_N A B C ...J \012Se aceptan entre "
	.ascii	"1 y 10 argumentos, y cada uno es un entero entre 0 "
	.ascii	"y 9\012\012Se obtiene un valor aleatorio para cada "
	.ascii	"argumento y se devuelve el n\303\272mero de coincid"
	.ascii	"encias.\000"
	.text
	.align	2
	.global	usage
	.syntax unified
	.arm
	.fpu softvfp
	.type	usage, %function
usage:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r1, .L11
	ldr	r0, .L11+4
	bl	sprintf
	ldr	r1, .L11+4
	ldr	r0, [fp, #-8]
	bl	error
	mov	r0, #1
	bl	exit
.L12:
	.align	2
.L11:
	.word	.LC3
	.word	buffer
	.size	usage, .-usage
	.section	.rodata
	.align	2
.LC4:
	.ascii	"fork\012\000"
	.align	2
.LC5:
	.ascii	"acertar_1\000"
	.align	2
.LC6:
	.ascii	"./acertar_1\000"
	.align	2
.LC7:
	.ascii	"exec\012\000"
	.align	2
.LC8:
	.ascii	"waitpid\012\000"
	.align	2
.LC9:
	.ascii	"PID=%d, Hijos acabados en exit=%d, num. aciertos=%d"
	.ascii	"\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 = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	str	r0, [fp, #-32]
	str	r1, [fp, #-36]
	ldr	r3, .L27
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-32]
	cmp	r3, #1
	ble	.L14
	ldr	r3, [fp, #-32]
	cmp	r3, #11
	ble	.L15
.L14:
	mov	r0, #41
	bl	usage
.L15:
	mov	r3, #1
	str	r3, [fp, #-24]
	b	.L16
.L20:
	bl	fork
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L27+4
	str	r2, [r3]
	ldr	r3, .L27+4
	ldr	r3, [r3]
	cmn	r3, #1
	beq	.L17
	cmp	r3, #0
	beq	.L18
	b	.L19
.L17:
	ldr	r1, .L27+8
	mov	r0, #47
	bl	error
.L18:
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-36]
	add	r3, r2, r3
	ldr	r2, [r3]
	mov	r3, #0
	ldr	r1, .L27+12
	ldr	r0, .L27+16
	bl	execlp
	ldr	r1, .L27+20
	mov	r0, #50
	bl	error
.L19:
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L16:
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-32]
	cmp	r2, r3
	blt	.L20
	mov	r3, #0
	str	r3, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-16]
	mov	r3, #1
	str	r3, [fp, #-24]
	b	.L21
.L24:
	sub	r3, fp, #28
	mov	r2, #0
	mov	r1, r3
	mvn	r0, #0
	bl	waitpid
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bge	.L22
	ldr	r1, .L27+24
	mov	r0, #63
	bl	error
.L22:
	ldr	r3, [fp, #-28]
	and	r3, r3, #127
	cmp	r3, #0
	bne	.L23
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-28]
	asr	r3, r3, #8
	and	r3, r3, #255
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	str	r3, [fp, #-20]
.L23:
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L21:
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-32]
	cmp	r2, r3
	blt	.L24
	bl	getpid
	mov	r2, r0
	ldr	r3, [fp, #-20]
	str	r3, [sp]
	ldr	r3, [fp, #-16]
	ldr	r1, .L27+28
	ldr	r0, .L27+32
	bl	sprintf
	ldr	r0, .L27+32
	bl	strlen
	mov	r3, r0
	mov	r2, r3
	mov	r3, #71
	ldr	r1, .L27+32
	mov	r0, #1
	bl	my_write
	mov	r3, #0
	ldr	r2, .L27
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L26
	bl	__stack_chk_fail
.L26:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L28:
	.align	2
.L27:
	.word	.LC10
	.word	pid
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	buffer
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
