	.file	"862043.c"
	.intel_syntax noprefix
	.text
	.globl	cria_filhos
	.type	cria_filhos, @function
cria_filhos:
.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	DWORD PTR -8[rbp], 0
	jmp	.L2
.L6:
	call	fork@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	jns	.L3
	mov	eax, -1
	jmp	.L4
.L3:
	cmp	DWORD PTR -4[rbp], 0
	jne	.L5
	mov	eax, DWORD PTR -8[rbp]
	add	eax, 1
	jmp	.L4
.L5:
	add	DWORD PTR -8[rbp], 1
.L2:
	mov	eax, DWORD PTR -8[rbp]
	cmp	eax, DWORD PTR -20[rbp]
	jl	.L6
	mov	eax, 0
.L4:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	cria_filhos, .-cria_filhos
	.section	.rodata
.LC0:
	.string	"%s"
	.text
	.globl	imprimirMsg
	.type	imprimirMsg, @function
imprimirMsg:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	imprimirMsg, .-imprimirMsg
	.section	.rodata
	.align 8
.LC1:
	.string	"Incorrect size for sems_init_values!!! "
.LC2:
	.string	"/sem_ex08"
.LC3:
	.string	"%s%d"
	.align 8
.LC4:
	.string	"sem_open() failed for %s!!!\n%s\n"
.LC5:
	.string	"fork() failed!!! "
.LC6:
	.string	" S"
.LC7:
	.string	" -> O valor do sem_S: %d\n"
.LC8:
	.string	" C"
.LC9:
	.string	" -> O valor do sem_C: %d\n"
.LC10:
	.string	"Filho terminou com erro! "
.LC11:
	.string	"sem_close() failed on %s\n%s\n"
.LC12:
	.string	"sem_unlink() failed on %s\n%s\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r12
	push	rbx
	sub	rsp, 96
	.cfi_offset 12, -24
	.cfi_offset 3, -32
	mov	DWORD PTR -100[rbp], edi
	mov	QWORD PTR -112[rbp], rsi
	mov	rsi, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rsi
	xor	esi, esi
	mov	rsi, rsp
	mov	r12, rsi
	mov	DWORD PTR -76[rbp], 2
	mov	DWORD PTR -72[rbp], 2
	mov	esi, DWORD PTR -72[rbp]
	movsx	rsi, esi
	sub	rsi, 1
	mov	QWORD PTR -64[rbp], rsi
	mov	esi, DWORD PTR -72[rbp]
	movsx	rsi, esi
	mov	rax, rsi
	mov	edx, 0
	imul	rdi, rdx, 200
	imul	rsi, rax, 0
	add	rsi, rdi
	mov	edi, 200
	mul	rdi
	add	rsi, rdx
	mov	rdx, rsi
	mov	eax, DWORD PTR -72[rbp]
	cdqe
	mov	rcx, rax
	mov	ebx, 0
	imul	rdx, rbx, 200
	imul	rax, rcx, 0
	lea	rsi, [rdx+rax]
	mov	eax, 200
	mul	rcx
	lea	rcx, [rsi+rdx]
	mov	rdx, rcx
	mov	eax, DWORD PTR -72[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	add	rdx, rax
	mov	eax, 16
	sub	rax, 1
	add	rax, rdx
	mov	ebx, 16
	mov	edx, 0
	div	rbx
	imul	rax, rax, 16
	mov	rcx, rax
	and	rcx, -4096
	mov	rdx, rsp
	sub	rdx, rcx
.L9:
	cmp	rsp, rdx
	je	.L10
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	jmp	.L9
.L10:
	mov	rdx, rax
	and	edx, 4095
	sub	rsp, rdx
	mov	rdx, rax
	and	edx, 4095
	test	rdx, rdx
	je	.L11
	and	eax, 4095
	sub	rax, 8
	add	rax, rsp
	or	QWORD PTR [rax], 0
.L11:
	mov	rax, rsp
	add	rax, 0
	mov	QWORD PTR -56[rbp], rax
	mov	DWORD PTR -32[rbp], 1
	mov	DWORD PTR -28[rbp], 0
	cmp	DWORD PTR -72[rbp], 2
	je	.L12
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L12:
	mov	eax, DWORD PTR -72[rbp]
	cdqe
	sub	rax, 1
	mov	QWORD PTR -48[rbp], rax
	mov	eax, DWORD PTR -72[rbp]
	cdqe
	mov	r10, rax
	mov	r11d, 0
	mov	eax, DWORD PTR -72[rbp]
	cdqe
	mov	r8, rax
	mov	r9d, 0
	mov	eax, DWORD PTR -72[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	eax, 16
	sub	rax, 1
	add	rax, rdx
	mov	ebx, 16
	mov	edx, 0
	div	rbx
	imul	rax, rax, 16
	mov	rcx, rax
	and	rcx, -4096
	mov	rdx, rsp
	sub	rdx, rcx
.L13:
	cmp	rsp, rdx
	je	.L14
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	jmp	.L13
.L14:
	mov	rdx, rax
	and	edx, 4095
	sub	rsp, rdx
	mov	rdx, rax
	and	edx, 4095
	test	rdx, rdx
	je	.L15
	and	eax, 4095
	sub	rax, 8
	add	rax, rsp
	or	QWORD PTR [rax], 0
.L15:
	mov	rax, rsp
	add	rax, 7
	shr	rax, 3
	sal	rax, 3
	mov	QWORD PTR -40[rbp], rax
	mov	DWORD PTR -80[rbp], 0
	jmp	.L16
.L18:
	mov	eax, DWORD PTR -80[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	add	rax, rdx
	mov	rdx, QWORD PTR -56[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR -80[rbp]
	mov	r8d, edx
	lea	rcx, .LC2[rip]
	lea	rdx, .LC3[rip]
	mov	esi, 25
	mov	rdi, rax
	mov	eax, 0
	call	snprintf@PLT
	mov	eax, DWORD PTR -80[rbp]
	cdqe
	mov	edx, DWORD PTR -32[rbp+rax*4]
	mov	eax, DWORD PTR -80[rbp]
	movsx	rcx, eax
	mov	rax, rcx
	sal	rax, 2
	add	rax, rcx
	lea	rcx, 0[0+rax*4]
	add	rax, rcx
	mov	rcx, QWORD PTR -56[rbp]
	add	rax, rcx
	mov	ecx, edx
	mov	edx, 420
	mov	esi, 192
	mov	rdi, rax
	mov	eax, 0
	call	sem_open@PLT
	mov	rdx, QWORD PTR -40[rbp]
	mov	ecx, DWORD PTR -80[rbp]
	movsx	rcx, ecx
	mov	QWORD PTR [rdx+rcx*8], rax
	mov	rax, QWORD PTR -40[rbp]
	mov	edx, DWORD PTR -80[rbp]
	movsx	rdx, edx
	mov	rax, QWORD PTR [rax+rdx*8]
	test	rax, rax
	jne	.L17
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rcx, rax
	mov	eax, DWORD PTR -80[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	add	rax, rdx
	mov	rdx, QWORD PTR -56[rbp]
	add	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L17:
	add	DWORD PTR -80[rbp], 1
.L16:
	mov	eax, DWORD PTR -80[rbp]
	cmp	eax, DWORD PTR -72[rbp]
	jl	.L18
	mov	eax, DWORD PTR -76[rbp]
	mov	edi, eax
	call	cria_filhos
	mov	DWORD PTR -68[rbp], eax
	cmp	DWORD PTR -68[rbp], -1
	jne	.L19
	lea	rdi, .LC5[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L19:
	cmp	DWORD PTR -68[rbp], 1
	jne	.L20
	mov	DWORD PTR -80[rbp], 0
	jmp	.L21
.L23:
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	sem_wait@PLT
	lea	rdi, .LC6[rip]
	call	imprimirMsg
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR [rax]
	lea	rdx, -84[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	sem_getvalue@PLT
	mov	eax, DWORD PTR -84[rbp]
	mov	esi, eax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -84[rbp]
	test	eax, eax
	jne	.L22
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	rdi, rax
	call	sem_post@PLT
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	rdi, rax
	call	sem_post@PLT
.L22:
	add	DWORD PTR -80[rbp], 1
.L21:
	cmp	DWORD PTR -80[rbp], 29
	jle	.L23
	mov	edi, 0
	call	exit@PLT
.L20:
	cmp	DWORD PTR -68[rbp], 2
	jne	.L24
	mov	DWORD PTR -80[rbp], 0
	jmp	.L25
.L27:
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	rdi, rax
	call	sem_wait@PLT
	lea	rdi, .LC8[rip]
	call	imprimirMsg
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 8[rax]
	lea	rdx, -84[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	sem_getvalue@PLT
	mov	eax, DWORD PTR -84[rbp]
	mov	esi, eax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -84[rbp]
	test	eax, eax
	jne	.L26
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	sem_post@PLT
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	sem_post@PLT
.L26:
	add	DWORD PTR -80[rbp], 1
.L25:
	cmp	DWORD PTR -80[rbp], 29
	jle	.L27
	mov	edi, 0
	call	exit@PLT
.L24:
	cmp	DWORD PTR -68[rbp], 0
	jne	.L28
	mov	DWORD PTR -80[rbp], 0
	jmp	.L29
.L31:
	lea	rax, -84[rbp]
	mov	rdi, rax
	call	wait@PLT
	mov	eax, DWORD PTR -84[rbp]
	sar	eax, 8
	movzx	eax, al
	test	eax, eax
	je	.L30
	lea	rdi, .LC10[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L30:
	add	DWORD PTR -80[rbp], 1
.L29:
	mov	eax, DWORD PTR -80[rbp]
	cmp	eax, DWORD PTR -76[rbp]
	jl	.L31
.L28:
	mov	DWORD PTR -80[rbp], 0
	jmp	.L32
.L34:
	mov	rax, QWORD PTR -40[rbp]
	mov	edx, DWORD PTR -80[rbp]
	movsx	rdx, edx
	mov	rax, QWORD PTR [rax+rdx*8]
	mov	rdi, rax
	call	sem_close@PLT
	test	eax, eax
	jns	.L33
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rcx, rax
	mov	eax, DWORD PTR -80[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	add	rax, rdx
	mov	rdx, QWORD PTR -56[rbp]
	add	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC11[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L33:
	add	DWORD PTR -80[rbp], 1
.L32:
	mov	eax, DWORD PTR -80[rbp]
	cmp	eax, DWORD PTR -72[rbp]
	jl	.L34
	cmp	DWORD PTR -68[rbp], 0
	jne	.L35
	mov	DWORD PTR -80[rbp], 0
	jmp	.L36
.L38:
	mov	eax, DWORD PTR -80[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	add	rax, rdx
	mov	rdx, QWORD PTR -56[rbp]
	add	rax, rdx
	mov	rdi, rax
	call	sem_unlink@PLT
	test	eax, eax
	jns	.L37
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rcx, rax
	mov	eax, DWORD PTR -80[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	add	rax, rdx
	mov	rdx, QWORD PTR -56[rbp]
	add	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC12[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L37:
	add	DWORD PTR -80[rbp], 1
.L36:
	mov	eax, DWORD PTR -80[rbp]
	cmp	eax, DWORD PTR -72[rbp]
	jl	.L38
.L35:
	mov	eax, 0
	mov	rsp, r12
	mov	rbx, QWORD PTR -24[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L40
	call	__stack_chk_fail@PLT
.L40:
	lea	rsp, -16[rbp]
	pop	rbx
	pop	r12
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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	"862043.c"
	.text
	.align	2
	.global	cria_filhos
	.syntax unified
	.arm
	.fpu softvfp
	.type	cria_filhos, %function
cria_filhos:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L2
.L6:
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bge	.L3
	mvn	r3, #0
	b	.L4
.L3:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L5
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	b	.L4
.L5:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L2:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	blt	.L6
	mov	r3, #0
.L4:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	cria_filhos, .-cria_filhos
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%s\000"
	.text
	.align	2
	.global	imprimirMsg
	.syntax unified
	.arm
	.fpu softvfp
	.type	imprimirMsg, %function
imprimirMsg:
	@ 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, [fp, #-8]
	ldr	r0, .L8
	bl	printf
	ldr	r3, .L8+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L9:
	.align	2
.L8:
	.word	.LC0
	.word	stdout
	.size	imprimirMsg, .-imprimirMsg
	.section	.rodata
	.align	2
.LC1:
	.ascii	"Incorrect size for sems_init_values!!! \000"
	.align	2
.LC2:
	.ascii	"/sem_ex08\000"
	.align	2
.LC3:
	.ascii	"%s%d\000"
	.align	2
.LC4:
	.ascii	"sem_open() failed for %s!!!\012%s\012\000"
	.align	2
.LC5:
	.ascii	"fork() failed!!! \000"
	.align	2
.LC6:
	.ascii	" S\000"
	.align	2
.LC7:
	.ascii	" -> O valor do sem_S: %d\012\000"
	.align	2
.LC8:
	.ascii	" C\000"
	.align	2
.LC9:
	.ascii	" -> O valor do sem_C: %d\012\000"
	.align	2
.LC10:
	.ascii	"Filho terminou com erro! \000"
	.align	2
.LC11:
	.ascii	"sem_close() failed on %s\012%s\012\000"
	.align	2
.LC12:
	.ascii	"sem_unlink() failed on %s\012%s\012\000"
	.align	2
.LC13:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 56
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, fp, lr}
	add	fp, sp, #24
	sub	sp, sp, #68
	str	r0, [fp, #-80]
	str	r1, [fp, #-84]
	ldr	r3, .L37
	ldr	r3, [r3]
	str	r3, [fp, #-32]
	mov	r3,#0
	mov	r3, sp
	mov	r8, r3
	mov	r3, #2
	str	r3, [fp, #-68]
	mov	r3, #2
	str	r3, [fp, #-64]
	ldr	r3, [fp, #-64]
	sub	r3, r3, #1
	str	r3, [fp, #-60]
	ldr	r3, [fp, #-64]
	mov	r0, r3
	mov	r1, #0
	mov	r2, r0
	mov	r3, r1
	adds	r4, r2, r2
	adc	r5, r3, r3
	mov	r2, r4
	mov	r3, r5
	adds	r2, r2, r0
	adc	r3, r3, r1
	mov	r4, #0
	mov	r5, #0
	lsl	r5, r3, #3
	orr	r5, r5, r2, lsr #29
	lsl	r4, r2, #3
	mov	r2, r4
	mov	r3, r5
	adds	r2, r2, r0
	adc	r3, r3, r1
	mov	r0, #0
	mov	r1, #0
	lsl	r1, r3, #3
	orr	r1, r1, r2, lsr #29
	lsl	r0, r2, #3
	mov	r2, r0
	mov	r3, r1
	ldr	r3, [fp, #-64]
	mov	r0, r3
	mov	r1, #0
	mov	r2, r0
	mov	r3, r1
	adds	r6, r2, r2
	adc	r7, r3, r3
	mov	r2, r6
	mov	r3, r7
	adds	r2, r2, r0
	adc	r3, r3, r1
	mov	r4, #0
	mov	r5, #0
	lsl	r5, r3, #3
	orr	r5, r5, r2, lsr #29
	lsl	r4, r2, #3
	mov	r2, r4
	mov	r3, r5
	adds	r2, r2, r0
	adc	r3, r3, r1
	mov	r0, #0
	mov	r1, #0
	lsl	r1, r3, #3
	orr	r1, r1, r2, lsr #29
	lsl	r0, r2, #3
	mov	r2, r0
	mov	r3, r1
	ldr	r2, [fp, #-64]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	add	r3, r3, #7
	lsr	r3, r3, #3
	lsl	r3, r3, #3
	sub	sp, sp, r3
	add	r3, sp, #8
	add	r3, r3, #0
	str	r3, [fp, #-56]
	mov	r3, #1
	str	r3, [fp, #-40]
	mov	r3, #0
	str	r3, [fp, #-36]
	ldr	r3, [fp, #-64]
	cmp	r3, #2
	beq	.L11
	ldr	r0, .L37+4
	bl	perror
	mov	r0, #1
	bl	exit
.L11:
	ldr	r3, [fp, #-64]
	sub	r3, r3, #1
	str	r3, [fp, #-52]
	ldr	r3, [fp, #-64]
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #5
	orr	r3, r3, r0, lsr #27
	lsl	r2, r0, #5
	ldr	r3, [fp, #-64]
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #5
	orr	r3, r3, r0, lsr #27
	lsl	r2, r0, #5
	ldr	r3, [fp, #-64]
	lsl	r3, r3, #2
	add	r3, r3, #7
	lsr	r3, r3, #3
	lsl	r3, r3, #3
	sub	sp, sp, r3
	add	r3, sp, #8
	add	r3, r3, #3
	lsr	r3, r3, #2
	lsl	r3, r3, #2
	str	r3, [fp, #-48]
	mov	r3, #0
	str	r3, [fp, #-72]
	b	.L12
.L14:
	ldr	r2, [fp, #-72]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	ldr	r2, [fp, #-56]
	add	r0, r2, r3
	ldr	r3, [fp, #-72]
	str	r3, [sp]
	ldr	r3, .L37+8
	ldr	r2, .L37+12
	mov	r1, #25
	bl	snprintf
	ldr	r2, [fp, #-72]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	ldr	r2, [fp, #-56]
	add	r0, r2, r3
	ldr	r3, [fp, #-72]
	lsl	r3, r3, #2
	sub	r2, fp, #28
	add	r3, r2, r3
	ldr	r3, [r3, #-12]
	mov	r2, #420
	mov	r1, #192
	bl	sem_open
	mov	r1, r0
	ldr	r3, [fp, #-48]
	ldr	r2, [fp, #-72]
	str	r1, [r3, r2, lsl #2]
	ldr	r3, [fp, #-48]
	ldr	r2, [fp, #-72]
	ldr	r3, [r3, r2, lsl #2]
	cmp	r3, #0
	bne	.L13
	ldr	r3, .L37+16
	ldr	r4, [r3]
	ldr	r2, [fp, #-72]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	ldr	r2, [fp, #-56]
	add	r5, r2, r3
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r5
	ldr	r1, .L37+20
	mov	r0, r4
	bl	fprintf
	mov	r0, #1
	bl	exit
.L13:
	ldr	r3, [fp, #-72]
	add	r3, r3, #1
	str	r3, [fp, #-72]
.L12:
	ldr	r2, [fp, #-72]
	ldr	r3, [fp, #-64]
	cmp	r2, r3
	blt	.L14
	ldr	r0, [fp, #-68]
	bl	cria_filhos
	str	r0, [fp, #-44]
	ldr	r3, [fp, #-44]
	cmn	r3, #1
	bne	.L15
	ldr	r0, .L37+24
	bl	perror
	mov	r0, #1
	bl	exit
.L15:
	ldr	r3, [fp, #-44]
	cmp	r3, #1
	bne	.L16
	mov	r3, #0
	str	r3, [fp, #-72]
	b	.L17
.L19:
	ldr	r3, [fp, #-48]
	ldr	r3, [r3]
	mov	r0, r3
	bl	sem_wait
	ldr	r0, .L37+28
	bl	imprimirMsg
	ldr	r3, [fp, #-48]
	ldr	r3, [r3]
	sub	r2, fp, #76
	mov	r1, r2
	mov	r0, r3
	bl	sem_getvalue
	ldr	r3, [fp, #-76]
	mov	r1, r3
	ldr	r0, .L37+32
	bl	printf
	ldr	r3, [fp, #-76]
	cmp	r3, #0
	bne	.L18
	ldr	r3, [fp, #-48]
	ldr	r3, [r3, #4]
	mov	r0, r3
	bl	sem_post
	ldr	r3, [fp, #-48]
	ldr	r3, [r3, #4]
	mov	r0, r3
	bl	sem_post
.L18:
	ldr	r3, [fp, #-72]
	add	r3, r3, #1
	str	r3, [fp, #-72]
.L17:
	ldr	r3, [fp, #-72]
	cmp	r3, #29
	ble	.L19
	mov	r0, #0
	bl	exit
.L16:
	ldr	r3, [fp, #-44]
	cmp	r3, #2
	bne	.L20
	mov	r3, #0
	str	r3, [fp, #-72]
	b	.L21
.L23:
	ldr	r3, [fp, #-48]
	ldr	r3, [r3, #4]
	mov	r0, r3
	bl	sem_wait
	ldr	r0, .L37+36
	bl	imprimirMsg
	ldr	r3, [fp, #-48]
	ldr	r3, [r3, #4]
	sub	r2, fp, #76
	mov	r1, r2
	mov	r0, r3
	bl	sem_getvalue
	ldr	r3, [fp, #-76]
	mov	r1, r3
	ldr	r0, .L37+40
	bl	printf
	ldr	r3, [fp, #-76]
	cmp	r3, #0
	bne	.L22
	ldr	r3, [fp, #-48]
	ldr	r3, [r3]
	mov	r0, r3
	bl	sem_post
	ldr	r3, [fp, #-48]
	ldr	r3, [r3]
	mov	r0, r3
	bl	sem_post
.L22:
	ldr	r3, [fp, #-72]
	add	r3, r3, #1
	str	r3, [fp, #-72]
.L21:
	ldr	r3, [fp, #-72]
	cmp	r3, #29
	ble	.L23
	mov	r0, #0
	bl	exit
.L20:
	ldr	r3, [fp, #-44]
	cmp	r3, #0
	bne	.L24
	mov	r3, #0
	str	r3, [fp, #-72]
	b	.L25
.L27:
	sub	r3, fp, #76
	mov	r0, r3
	bl	wait
	ldr	r3, [fp, #-76]
	asr	r3, r3, #8
	and	r3, r3, #255
	cmp	r3, #0
	beq	.L26
	ldr	r0, .L37+44
	bl	perror
	mov	r0, #1
	bl	exit
.L26:
	ldr	r3, [fp, #-72]
	add	r3, r3, #1
	str	r3, [fp, #-72]
.L25:
	ldr	r2, [fp, #-72]
	ldr	r3, [fp, #-68]
	cmp	r2, r3
	blt	.L27
.L24:
	mov	r3, #0
	str	r3, [fp, #-72]
	b	.L28
.L30:
	ldr	r3, [fp, #-48]
	ldr	r2, [fp, #-72]
	ldr	r3, [r3, r2, lsl #2]
	mov	r0, r3
	bl	sem_close
	mov	r3, r0
	cmp	r3, #0
	bge	.L29
	ldr	r3, .L37+16
	ldr	r4, [r3]
	ldr	r2, [fp, #-72]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	ldr	r2, [fp, #-56]
	add	r5, r2, r3
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r5
	ldr	r1, .L37+48
	mov	r0, r4
	bl	fprintf
	mov	r0, #1
	bl	exit
.L29:
	ldr	r3, [fp, #-72]
	add	r3, r3, #1
	str	r3, [fp, #-72]
.L28:
	ldr	r2, [fp, #-72]
	ldr	r3, [fp, #-64]
	cmp	r2, r3
	blt	.L30
	ldr	r3, [fp, #-44]
	cmp	r3, #0
	bne	.L31
	mov	r3, #0
	str	r3, [fp, #-72]
	b	.L32
.L34:
	ldr	r2, [fp, #-72]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	ldr	r2, [fp, #-56]
	add	r3, r2, r3
	mov	r0, r3
	bl	sem_unlink
	mov	r3, r0
	cmp	r3, #0
	bge	.L33
	ldr	r3, .L37+16
	ldr	r4, [r3]
	ldr	r2, [fp, #-72]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	ldr	r2, [fp, #-56]
	add	r5, r2, r3
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r5
	ldr	r1, .L37+52
	mov	r0, r4
	bl	fprintf
	mov	r0, #1
	bl	exit
.L33:
	ldr	r3, [fp, #-72]
	add	r3, r3, #1
	str	r3, [fp, #-72]
.L32:
	ldr	r2, [fp, #-72]
	ldr	r3, [fp, #-64]
	cmp	r2, r3
	blt	.L34
.L31:
	mov	r3, #0
	mov	sp, r8
	ldr	r2, .L37
	ldr	r1, [r2]
	ldr	r2, [fp, #-32]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L36
	bl	__stack_chk_fail
.L36:
	mov	r0, r3
	sub	sp, fp, #24
	@ sp needed
	pop	{r4, r5, r6, r7, r8, fp, pc}
.L38:
	.align	2
.L37:
	.word	.LC13
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	stderr
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
