	.file	"568232.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	printMessage
	.type	printMessage, @function
printMessage:
.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	printMessage, .-printMessage
	.section	.rodata
.LC1:
	.string	"Error at sem_wait()!"
	.text
	.globl	__semWAIT
	.type	__semWAIT, @function
__semWAIT:
.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	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	sem_wait@PLT
	cmp	eax, -1
	jne	.L10
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L10:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	__semWAIT, .-__semWAIT
	.section	.rodata
.LC2:
	.string	"Error at sem_post()!"
	.text
	.globl	__semPOST
	.type	__semPOST, @function
__semPOST:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	sem_post@PLT
	cmp	eax, -1
	jne	.L13
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L13:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	__semPOST, .-__semPOST
	.section	.rodata
.LC3:
	.string	"PROCESS #%s: buy_chips()\n"
	.text
	.globl	buy_chips
	.type	buy_chips, @function
buy_chips:
.LFB10:
	.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	QWORD PTR -16[rbp], rsi
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	__semPOST
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	__semPOST
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	buy_chips, .-buy_chips
	.section	.rodata
.LC4:
	.string	"PROCESS #%s: buy_beer()\n"
	.text
	.globl	buy_beer
	.type	buy_beer, @function
buy_beer:
.LFB11:
	.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	QWORD PTR -16[rbp], rsi
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	__semPOST
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	__semPOST
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	buy_beer, .-buy_beer
	.section	.rodata
.LC5:
	.string	"PROCESS #%s: eat_and_drink()\n"
	.text
	.globl	eat_and_drink
	.type	eat_and_drink, @function
eat_and_drink:
.LFB12:
	.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, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	eat_and_drink, .-eat_and_drink
	.section	.rodata
.LC6:
	.string	"Exerc\303\255cio 09"
.LC7:
	.string	"Error at sem_open()!\n"
.LC8:
	.string	"1"
.LC9:
	.string	"2"
.LC10:
	.string	"Error at sem_close()!\n"
.LC11:
	.string	"Error at sem_unlink()!\n"
.LC12:
	.string	"Error: %s\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB13:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 224
	mov	DWORD PTR -212[rbp], edi
	mov	QWORD PTR -224[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	movabs	rax, 6868905635762488659
	movabs	rdx, 357829265475
	mov	QWORD PTR -176[rbp], rax
	mov	QWORD PTR -168[rbp], rdx
	mov	QWORD PTR -160[rbp], 0
	mov	QWORD PTR -152[rbp], 0
	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
	movabs	rax, 6868905635762488659
	mov	edx, 1380271426
	mov	QWORD PTR -96[rbp], rax
	mov	QWORD PTR -88[rbp], rdx
	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	DWORD PTR -200[rbp], 0
	mov	DWORD PTR -196[rbp], 0
	lea	rdi, .LC6[rip]
	call	puts@PLT
	mov	DWORD PTR -208[rbp], 0
	jmp	.L18
.L20:
	mov	eax, DWORD PTR -208[rbp]
	cdqe
	mov	edx, DWORD PTR -200[rbp+rax*4]
	lea	rsi, -176[rbp]
	mov	eax, DWORD PTR -208[rbp]
	movsx	rcx, eax
	mov	rax, rcx
	sal	rax, 2
	add	rax, rcx
	sal	rax, 4
	add	rax, rsi
	mov	ecx, edx
	mov	edx, 420
	mov	esi, 192
	mov	rdi, rax
	mov	eax, 0
	call	sem_open@PLT
	mov	edx, DWORD PTR -208[rbp]
	movsx	rdx, edx
	mov	QWORD PTR -192[rbp+rdx*8], rax
	mov	eax, DWORD PTR -208[rbp]
	cdqe
	mov	rax, QWORD PTR -192[rbp+rax*8]
	test	rax, rax
	jne	.L19
	lea	rdi, .LC7[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L19:
	add	DWORD PTR -208[rbp], 1
.L18:
	cmp	DWORD PTR -208[rbp], 1
	jle	.L20
	mov	edi, 2
	call	cria_filhos
	mov	DWORD PTR -204[rbp], eax
	cmp	DWORD PTR -204[rbp], 1
	jne	.L21
	mov	rax, QWORD PTR -192[rbp]
	mov	rsi, rax
	lea	rdi, .LC8[rip]
	call	buy_chips
	mov	rax, QWORD PTR -192[rbp]
	mov	rdi, rax
	call	__semWAIT
	mov	rax, QWORD PTR -184[rbp]
	mov	rdi, rax
	call	__semWAIT
	lea	rdi, .LC8[rip]
	call	eat_and_drink
	mov	edi, 0
	call	exit@PLT
.L21:
	cmp	DWORD PTR -204[rbp], 2
	jne	.L22
	mov	rax, QWORD PTR -184[rbp]
	mov	rsi, rax
	lea	rdi, .LC9[rip]
	call	buy_beer
	mov	rax, QWORD PTR -192[rbp]
	mov	rdi, rax
	call	__semWAIT
	mov	rax, QWORD PTR -184[rbp]
	mov	rdi, rax
	call	__semWAIT
	lea	rdi, .LC9[rip]
	call	eat_and_drink
	mov	edi, 0
	call	exit@PLT
.L22:
	mov	DWORD PTR -208[rbp], 0
	jmp	.L23
.L24:
	mov	edi, 0
	call	wait@PLT
	add	DWORD PTR -208[rbp], 1
.L23:
	cmp	DWORD PTR -208[rbp], 1
	jle	.L24
	mov	DWORD PTR -208[rbp], 0
	jmp	.L25
.L27:
	mov	eax, DWORD PTR -208[rbp]
	cdqe
	mov	rax, QWORD PTR -192[rbp+rax*8]
	mov	rdi, rax
	call	sem_close@PLT
	cmp	eax, -1
	jne	.L26
	lea	rdi, .LC10[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L26:
	add	DWORD PTR -208[rbp], 1
.L25:
	cmp	DWORD PTR -208[rbp], 1
	jle	.L27
	mov	DWORD PTR -208[rbp], 0
	jmp	.L28
.L30:
	lea	rcx, -176[rbp]
	mov	eax, DWORD PTR -208[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 4
	add	rax, rcx
	mov	rdi, rax
	call	sem_unlink@PLT
	cmp	eax, -1
	jne	.L29
	lea	rdi, .LC11[rip]
	call	perror@PLT
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rsi, rax
	lea	rdi, .LC12[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L29:
	add	DWORD PTR -208[rbp], 1
.L28:
	cmp	DWORD PTR -208[rbp], 1
	jle	.L30
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L32
	call	__stack_chk_fail@PLT
.L32:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.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	"568232.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
.LC1:
	.ascii	"%s\000"
	.text
	.align	2
	.global	printMessage
	.syntax unified
	.arm
	.fpu softvfp
	.type	printMessage, %function
printMessage:
	@ 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	.LC1
	.word	stdout
	.size	printMessage, .-printMessage
	.section	.rodata
	.align	2
.LC2:
	.ascii	"Error at sem_wait()!\000"
	.text
	.align	2
	.global	__semWAIT
	.syntax unified
	.arm
	.fpu softvfp
	.type	__semWAIT, %function
__semWAIT:
	@ 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	r0, [fp, #-8]
	bl	sem_wait
	mov	r3, r0
	cmn	r3, #1
	bne	.L12
	ldr	r0, .L13
	bl	perror
	mov	r0, #1
	bl	exit
.L12:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L14:
	.align	2
.L13:
	.word	.LC2
	.size	__semWAIT, .-__semWAIT
	.section	.rodata
	.align	2
.LC3:
	.ascii	"Error at sem_post()!\000"
	.text
	.align	2
	.global	__semPOST
	.syntax unified
	.arm
	.fpu softvfp
	.type	__semPOST, %function
__semPOST:
	@ 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	r0, [fp, #-8]
	bl	sem_post
	mov	r3, r0
	cmn	r3, #1
	bne	.L17
	ldr	r0, .L18
	bl	perror
	mov	r0, #1
	bl	exit
.L17:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L19:
	.align	2
.L18:
	.word	.LC3
	.size	__semPOST, .-__semPOST
	.section	.rodata
	.align	2
.LC4:
	.ascii	"PROCESS #%s: buy_chips()\012\000"
	.text
	.align	2
	.global	buy_chips
	.syntax unified
	.arm
	.fpu softvfp
	.type	buy_chips, %function
buy_chips:
	@ 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]
	str	r1, [fp, #-12]
	ldr	r1, [fp, #-8]
	ldr	r0, .L21
	bl	printf
	ldr	r0, [fp, #-12]
	bl	__semPOST
	ldr	r0, [fp, #-12]
	bl	__semPOST
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L22:
	.align	2
.L21:
	.word	.LC4
	.size	buy_chips, .-buy_chips
	.section	.rodata
	.align	2
.LC5:
	.ascii	"PROCESS #%s: buy_beer()\012\000"
	.text
	.align	2
	.global	buy_beer
	.syntax unified
	.arm
	.fpu softvfp
	.type	buy_beer, %function
buy_beer:
	@ 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]
	str	r1, [fp, #-12]
	ldr	r1, [fp, #-8]
	ldr	r0, .L24
	bl	printf
	ldr	r0, [fp, #-12]
	bl	__semPOST
	ldr	r0, [fp, #-12]
	bl	__semPOST
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L25:
	.align	2
.L24:
	.word	.LC5
	.size	buy_beer, .-buy_beer
	.section	.rodata
	.align	2
.LC6:
	.ascii	"PROCESS #%s: eat_and_drink()\012\000"
	.text
	.align	2
	.global	eat_and_drink
	.syntax unified
	.arm
	.fpu softvfp
	.type	eat_and_drink, %function
eat_and_drink:
	@ 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, .L27
	bl	printf
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L28:
	.align	2
.L27:
	.word	.LC6
	.size	eat_and_drink, .-eat_and_drink
	.section	.rodata
	.align	2
.LC7:
	.ascii	"Exerc\303\255cio 09\000"
	.align	2
.LC8:
	.ascii	"Error at sem_open()!\012\000"
	.align	2
.LC9:
	.ascii	"1\000"
	.align	2
.LC10:
	.ascii	"2\000"
	.align	2
.LC11:
	.ascii	"Error at sem_close()!\012\000"
	.align	2
.LC12:
	.ascii	"Error at sem_unlink()!\012\000"
	.align	2
.LC13:
	.ascii	"Error: %s\012\000"
	.align	2
.LC0:
	.ascii	"SEM_HAS_CHIPS\000"
	.space	66
	.ascii	"SEM_HAS_BEER\000"
	.space	67
	.align	2
.LC14:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 200
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #200
	str	r0, [fp, #-200]
	str	r1, [fp, #-204]
	ldr	r3, .L45
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r2, .L45+4
	sub	r3, fp, #168
	mov	r1, r2
	mov	r2, #160
	mov	r0, r3
	bl	memcpy
	mov	r3, #0
	str	r3, [fp, #-184]
	mov	r3, #0
	str	r3, [fp, #-180]
	ldr	r0, .L45+8
	bl	puts
	mov	r3, #0
	str	r3, [fp, #-192]
	b	.L30
.L32:
	sub	r1, fp, #168
	ldr	r2, [fp, #-192]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #4
	add	r0, r1, r3
	ldr	r3, [fp, #-192]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-180]
	mov	r2, #420
	mov	r1, #192
	bl	sem_open
	mov	r2, r0
	ldr	r3, [fp, #-192]
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	str	r2, [r3, #-172]
	ldr	r3, [fp, #-192]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-172]
	cmp	r3, #0
	bne	.L31
	ldr	r0, .L45+12
	bl	perror
	mov	r0, #1
	bl	exit
.L31:
	ldr	r3, [fp, #-192]
	add	r3, r3, #1
	str	r3, [fp, #-192]
.L30:
	ldr	r3, [fp, #-192]
	cmp	r3, #1
	ble	.L32
	mov	r0, #2
	bl	cria_filhos
	str	r0, [fp, #-188]
	ldr	r3, [fp, #-188]
	cmp	r3, #1
	bne	.L33
	ldr	r3, [fp, #-176]
	mov	r1, r3
	ldr	r0, .L45+16
	bl	buy_chips
	ldr	r3, [fp, #-176]
	mov	r0, r3
	bl	__semWAIT
	ldr	r3, [fp, #-172]
	mov	r0, r3
	bl	__semWAIT
	ldr	r0, .L45+16
	bl	eat_and_drink
	mov	r0, #0
	bl	exit
.L33:
	ldr	r3, [fp, #-188]
	cmp	r3, #2
	bne	.L34
	ldr	r3, [fp, #-172]
	mov	r1, r3
	ldr	r0, .L45+20
	bl	buy_beer
	ldr	r3, [fp, #-176]
	mov	r0, r3
	bl	__semWAIT
	ldr	r3, [fp, #-172]
	mov	r0, r3
	bl	__semWAIT
	ldr	r0, .L45+20
	bl	eat_and_drink
	mov	r0, #0
	bl	exit
.L34:
	mov	r3, #0
	str	r3, [fp, #-192]
	b	.L35
.L36:
	mov	r0, #0
	bl	wait
	ldr	r3, [fp, #-192]
	add	r3, r3, #1
	str	r3, [fp, #-192]
.L35:
	ldr	r3, [fp, #-192]
	cmp	r3, #1
	ble	.L36
	mov	r3, #0
	str	r3, [fp, #-192]
	b	.L37
.L39:
	ldr	r3, [fp, #-192]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-172]
	mov	r0, r3
	bl	sem_close
	mov	r3, r0
	cmn	r3, #1
	bne	.L38
	ldr	r0, .L45+24
	bl	perror
	mov	r0, #1
	bl	exit
.L38:
	ldr	r3, [fp, #-192]
	add	r3, r3, #1
	str	r3, [fp, #-192]
.L37:
	ldr	r3, [fp, #-192]
	cmp	r3, #1
	ble	.L39
	mov	r3, #0
	str	r3, [fp, #-192]
	b	.L40
.L42:
	sub	r1, fp, #168
	ldr	r2, [fp, #-192]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #4
	add	r3, r1, r3
	mov	r0, r3
	bl	sem_unlink
	mov	r3, r0
	cmn	r3, #1
	bne	.L41
	ldr	r0, .L45+28
	bl	perror
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L45+32
	bl	printf
	mov	r0, #1
	bl	exit
.L41:
	ldr	r3, [fp, #-192]
	add	r3, r3, #1
	str	r3, [fp, #-192]
.L40:
	ldr	r3, [fp, #-192]
	cmp	r3, #1
	ble	.L42
	mov	r3, #0
	ldr	r2, .L45
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L44
	bl	__stack_chk_fail
.L44:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L46:
	.align	2
.L45:
	.word	.LC14
	.word	.LC0
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
