	.file	"404718.c"
	.intel_syntax noprefix
	.text
	.globl	p
	.bss
	.align 8
	.type	p, @object
	.size	p, 8
p:
	.zero	8
	.globl	c
	.align 8
	.type	c, @object
	.size	c, 8
c:
	.zero	8
	.globl	s
	.align 32
	.type	s, @object
	.size	s, 32
s:
	.zero	32
	.globl	full
	.align 32
	.type	full, @object
	.size	full, 32
full:
	.zero	32
	.globl	empty
	.align 32
	.type	empty, @object
	.size	empty, 32
empty:
	.zero	32
	.globl	arr
	.align 32
	.type	arr, @object
	.size	arr, 120
arr:
	.zero	120
	.globl	in
	.align 4
	.type	in, @object
	.size	in, 4
in:
	.zero	4
	.globl	item
	.align 4
	.type	item, @object
	.size	item, 4
item:
	.zero	4
	.section	.rodata
.LC0:
	.string	"Produced item is %d\n"
	.text
	.globl	add
	.type	add, @function
add:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	eax, DWORD PTR item[rip]
	add	eax, 1
	mov	DWORD PTR item[rip], eax
	mov	eax, DWORD PTR in[rip]
	lea	edx, 1[rax]
	mov	DWORD PTR in[rip], edx
	mov	edx, DWORD PTR item[rip]
	cdqe
	lea	rcx, 0[0+rax*4]
	lea	rax, arr[rip]
	mov	DWORD PTR [rcx+rax], edx
	mov	eax, DWORD PTR item[rip]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	add, .-add
	.section	.rodata
.LC1:
	.string	"Consumed item is %d\n"
	.text
	.globl	delete
	.type	delete, @function
delete:
.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	eax, DWORD PTR in[rip]
	sub	eax, 1
	mov	DWORD PTR in[rip], eax
	mov	eax, DWORD PTR in[rip]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, arr[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	delete, .-delete
	.globl	producer
	.type	producer, @function
producer:
.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], 0
.L4:
	lea	rdi, empty[rip]
	call	sem_wait@PLT
	lea	rdi, s[rip]
	call	sem_wait@PLT
	mov	eax, 0
	call	add
	lea	rdi, s[rip]
	call	sem_post@PLT
	mov	edi, 1
	call	sleep@PLT
	lea	rdi, full[rip]
	call	sem_post@PLT
	mov	edi, 1
	call	sleep@PLT
	jmp	.L4
	.cfi_endproc
.LFE8:
	.size	producer, .-producer
	.globl	consumer
	.type	consumer, @function
consumer:
.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	DWORD PTR -4[rbp], 0
.L6:
	lea	rdi, full[rip]
	call	sem_wait@PLT
	lea	rdi, s[rip]
	call	sem_wait@PLT
	mov	eax, 0
	call	delete
	lea	rdi, s[rip]
	call	sem_post@PLT
	mov	edi, 1
	call	sleep@PLT
	lea	rdi, empty[rip]
	call	sem_post@PLT
	mov	edi, 1
	call	sleep@PLT
	jmp	.L6
	.cfi_endproc
.LFE9:
	.size	consumer, .-consumer
	.section	.rodata
.LC2:
	.string	"PRODUCER-CONSUMER!!!"
.LC3:
	.string	"Exit"
	.text
	.globl	main
	.type	main, @function
main:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	lea	rdi, .LC2[rip]
	call	puts@PLT
	mov	edx, 1
	mov	esi, 0
	lea	rdi, s[rip]
	call	sem_init@PLT
	mov	edx, 10
	mov	esi, 0
	lea	rdi, empty[rip]
	call	sem_init@PLT
	mov	edx, 0
	mov	esi, 0
	lea	rdi, full[rip]
	call	sem_init@PLT
	mov	ecx, 0
	lea	rdx, producer[rip]
	mov	esi, 0
	lea	rdi, p[rip]
	call	pthread_create@PLT
	mov	ecx, 0
	lea	rdx, consumer[rip]
	mov	esi, 0
	lea	rdi, c[rip]
	call	pthread_create@PLT
	mov	rax, QWORD PTR c[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	mov	rax, QWORD PTR p[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	lea	rdi, .LC3[rip]
	call	puts@PLT
	mov	eax, 0
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.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	"404718.c"
	.text
	.comm	p,4,4
	.comm	c,4,4
	.comm	s,16,4
	.comm	full,16,4
	.comm	empty,16,4
	.global	arr
	.bss
	.align	2
	.type	arr, %object
	.size	arr, 120
arr:
	.space	120
	.global	in
	.align	2
	.type	in, %object
	.size	in, 4
in:
	.space	4
	.global	item
	.align	2
	.type	item, %object
	.size	item, 4
item:
	.space	4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Produced item is %d\012\000"
	.text
	.align	2
	.global	add
	.syntax unified
	.arm
	.fpu softvfp
	.type	add, %function
add:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L2
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L2
	str	r3, [r2]
	ldr	r3, .L2+4
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r1, .L2+4
	str	r2, [r1]
	ldr	r2, .L2
	ldr	r2, [r2]
	ldr	r1, .L2+8
	str	r2, [r1, r3, lsl #2]
	ldr	r3, .L2
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L2+12
	bl	printf
	nop
	pop	{fp, pc}
.L3:
	.align	2
.L2:
	.word	item
	.word	in
	.word	arr
	.word	.LC0
	.size	add, .-add
	.section	.rodata
	.align	2
.LC1:
	.ascii	"Consumed item is %d\012\000"
	.text
	.align	2
	.global	delete
	.syntax unified
	.arm
	.fpu softvfp
	.type	delete, %function
delete:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	ldr	r3, .L5
	ldr	r3, [r3]
	sub	r3, r3, #1
	ldr	r2, .L5
	str	r3, [r2]
	ldr	r3, .L5
	ldr	r3, [r3]
	ldr	r2, .L5+4
	ldr	r3, [r2, r3, lsl #2]
	str	r3, [fp, #-8]
	ldr	r1, [fp, #-8]
	ldr	r0, .L5+8
	bl	printf
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L6:
	.align	2
.L5:
	.word	in
	.word	arr
	.word	.LC1
	.size	delete, .-delete
	.align	2
	.global	producer
	.syntax unified
	.arm
	.fpu softvfp
	.type	producer, %function
producer:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	mov	r3, #0
	str	r3, [fp, #-8]
.L8:
	ldr	r0, .L9
	bl	sem_wait
	ldr	r0, .L9+4
	bl	sem_wait
	bl	add
	ldr	r0, .L9+4
	bl	sem_post
	mov	r0, #1
	bl	sleep
	ldr	r0, .L9+8
	bl	sem_post
	mov	r0, #1
	bl	sleep
	b	.L8
.L10:
	.align	2
.L9:
	.word	empty
	.word	s
	.word	full
	.size	producer, .-producer
	.align	2
	.global	consumer
	.syntax unified
	.arm
	.fpu softvfp
	.type	consumer, %function
consumer:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	mov	r3, #0
	str	r3, [fp, #-8]
.L12:
	ldr	r0, .L13
	bl	sem_wait
	ldr	r0, .L13+4
	bl	sem_wait
	bl	delete
	ldr	r0, .L13+4
	bl	sem_post
	mov	r0, #1
	bl	sleep
	ldr	r0, .L13+8
	bl	sem_post
	mov	r0, #1
	bl	sleep
	b	.L12
.L14:
	.align	2
.L13:
	.word	full
	.word	s
	.word	empty
	.size	consumer, .-consumer
	.section	.rodata
	.align	2
.LC2:
	.ascii	"PRODUCER-CONSUMER!!!\000"
	.align	2
.LC3:
	.ascii	"Exit\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r0, .L17
	bl	puts
	mov	r2, #1
	mov	r1, #0
	ldr	r0, .L17+4
	bl	sem_init
	mov	r2, #10
	mov	r1, #0
	ldr	r0, .L17+8
	bl	sem_init
	mov	r2, #0
	mov	r1, #0
	ldr	r0, .L17+12
	bl	sem_init
	mov	r3, #0
	ldr	r2, .L17+16
	mov	r1, #0
	ldr	r0, .L17+20
	bl	pthread_create
	mov	r3, #0
	ldr	r2, .L17+24
	mov	r1, #0
	ldr	r0, .L17+28
	bl	pthread_create
	ldr	r3, .L17+28
	ldr	r3, [r3]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	ldr	r3, .L17+20
	ldr	r3, [r3]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	ldr	r0, .L17+32
	bl	puts
	mov	r3, #0
	mov	r0, r3
	pop	{fp, pc}
.L18:
	.align	2
.L17:
	.word	.LC2
	.word	s
	.word	empty
	.word	full
	.word	producer
	.word	p
	.word	consumer
	.word	c
	.word	.LC3
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
