	.file	"816756.c"
	.intel_syntax noprefix
	.text
	.globl	producers
	.bss
	.align 8
	.type	producers, @object
	.size	producers, 8
producers:
	.zero	8
	.globl	consumers
	.align 8
	.type	consumers, @object
	.size	consumers, 8
consumers:
	.zero	8
	.globl	mutex
	.align 32
	.type	mutex, @object
	.size	mutex, 32
mutex:
	.zero	32
	.globl	empty
	.align 32
	.type	empty, @object
	.size	empty, 32
empty:
	.zero	32
	.globl	fill
	.align 32
	.type	fill, @object
	.size	fill, 32
fill:
	.zero	32
	.globl	prnt
	.align 32
	.type	prnt, @object
	.size	prnt, 32
prnt:
	.zero	32
	.globl	buf
	.align 8
	.type	buf, @object
	.size	buf, 8
buf:
	.zero	8
	.globl	buf_pos
	.data
	.align 4
	.type	buf_pos, @object
	.size	buf_pos, 4
buf_pos:
	.long	-1
	.globl	nproducers
	.bss
	.align 4
	.type	nproducers, @object
	.size	nproducers, 4
nproducers:
	.zero	4
	.globl	nconsumers
	.align 4
	.type	nconsumers, @object
	.size	nconsumers, 4
nconsumers:
	.zero	4
	.globl	buf_len
	.align 4
	.type	buf_len, @object
	.size	buf_len, 4
buf_len:
	.zero	4
	.section	.rodata
.LC0:
	.string	"Producer %d produced %d \n"
	.text
	.globl	produce
	.type	produce, @function
produce:
.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	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -8[rbp], 0
	call	rand@PLT
	mov	edx, eax
	movsx	rax, edx
	imul	rax, rax, 1717986919
	shr	rax, 32
	sar	eax, 4
	mov	esi, edx
	sar	esi, 31
	sub	eax, esi
	mov	ecx, eax
	mov	eax, ecx
	sal	eax, 2
	add	eax, ecx
	sal	eax, 3
	mov	ecx, edx
	sub	ecx, eax
	lea	eax, 1[rcx]
	mov	DWORD PTR -4[rbp], eax
	jmp	.L2
.L4:
	add	DWORD PTR -8[rbp], 1
.L2:
	mov	rdx, QWORD PTR producers[rip]
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	pthread_equal@PLT
	test	eax, eax
	jne	.L3
	mov	eax, DWORD PTR nproducers[rip]
	cmp	DWORD PTR -8[rbp], eax
	jl	.L4
.L3:
	lea	rdi, prnt[rip]
	call	sem_wait@PLT
	mov	eax, DWORD PTR -8[rbp]
	lea	ecx, 1[rax]
	mov	eax, DWORD PTR -4[rbp]
	mov	edx, eax
	mov	esi, ecx
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, prnt[rip]
	call	sem_post@PLT
	mov	eax, DWORD PTR -4[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	produce, .-produce
	.section	.rodata
.LC1:
	.string	"\nConsumer %d consumed %d \n"
	.text
	.globl	consume
	.type	consume, @function
consume:
.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, 32
	mov	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -4[rbp], 0
	jmp	.L7
.L9:
	add	DWORD PTR -4[rbp], 1
.L7:
	mov	rdx, QWORD PTR consumers[rip]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR -32[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	pthread_equal@PLT
	test	eax, eax
	jne	.L8
	mov	eax, DWORD PTR nconsumers[rip]
	cmp	DWORD PTR -4[rbp], eax
	jl	.L9
.L8:
	lea	rdi, prnt[rip]
	call	sem_wait@PLT
	mov	eax, DWORD PTR -4[rbp]
	lea	ecx, 1[rax]
	mov	eax, DWORD PTR -20[rbp]
	mov	edx, eax
	mov	esi, ecx
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, prnt[rip]
	call	sem_post@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	consume, .-consume
	.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, 32
	mov	QWORD PTR -24[rbp], rdi
.L11:
	call	pthread_self@PLT
	mov	rdi, rax
	call	produce
	mov	DWORD PTR -4[rbp], eax
	lea	rdi, empty[rip]
	call	sem_wait@PLT
	lea	rdi, mutex[rip]
	call	sem_wait@PLT
	mov	eax, DWORD PTR buf_pos[rip]
	add	eax, 1
	mov	DWORD PTR buf_pos[rip], eax
	mov	rdx, QWORD PTR buf[rip]
	mov	eax, DWORD PTR buf_pos[rip]
	cdqe
	sal	rax, 2
	add	rdx, rax
	mov	eax, DWORD PTR -4[rbp]
	mov	DWORD PTR [rdx], eax
	lea	rdi, mutex[rip]
	call	sem_post@PLT
	lea	rdi, fill[rip]
	call	sem_post@PLT
	call	rand@PLT
	movsx	rdx, eax
	imul	rdx, rdx, -1840700269
	shr	rdx, 32
	add	edx, eax
	sar	edx, 2
	mov	ecx, eax
	sar	ecx, 31
	sub	edx, ecx
	mov	ecx, edx
	sal	ecx, 3
	sub	ecx, edx
	sub	eax, ecx
	mov	edx, eax
	lea	eax, 1[rdx]
	mov	edi, eax
	call	sleep@PLT
	jmp	.L11
	.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, 32
	mov	QWORD PTR -24[rbp], rdi
.L13:
	lea	rdi, fill[rip]
	call	sem_wait@PLT
	lea	rdi, mutex[rip]
	call	sem_wait@PLT
	mov	rdx, QWORD PTR buf[rip]
	mov	eax, DWORD PTR buf_pos[rip]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -4[rbp], eax
	call	pthread_self@PLT
	mov	rdx, rax
	mov	eax, DWORD PTR -4[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	consume
	mov	eax, DWORD PTR buf_pos[rip]
	sub	eax, 1
	mov	DWORD PTR buf_pos[rip], eax
	lea	rdi, mutex[rip]
	call	sem_post@PLT
	lea	rdi, empty[rip]
	call	sem_post@PLT
	call	rand@PLT
	mov	ecx, eax
	movsx	rax, ecx
	imul	rax, rax, 780903145
	shr	rax, 32
	sar	eax
	mov	esi, ecx
	sar	esi, 31
	sub	eax, esi
	mov	edx, eax
	mov	eax, edx
	sal	eax, 2
	add	eax, edx
	add	eax, eax
	add	eax, edx
	sub	ecx, eax
	mov	edx, ecx
	lea	eax, 1[rdx]
	mov	edi, eax
	call	sleep@PLT
	jmp	.L13
	.cfi_endproc
.LFE9:
	.size	consumer, .-consumer
	.section	.rodata
	.align 8
.LC2:
	.string	"\n------------------------------------------------------------------------------------------"
	.align 8
.LC3:
	.string	"                           SOLUTION TO PRODUCER CONSUMER PROBLEM                              "
	.align 8
.LC4:
	.string	"------------------------------------------------------------------------------------------\n"
	.align 8
.LC5:
	.string	"What is total number of producers :"
.LC6:
	.string	"%d"
	.align 8
.LC7:
	.string	"What is total number of Consumers :"
.LC8:
	.string	"What is the buffer length :"
	.align 8
.LC9:
	.string	"                                           ANSWER                                           "
	.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
	sub	rsp, 16
	mov	edi, 0
	call	time@PLT
	mov	edi, eax
	call	srand@PLT
	mov	edx, 1
	mov	esi, 0
	lea	rdi, mutex[rip]
	call	sem_init@PLT
	mov	edx, 0
	mov	esi, 0
	lea	rdi, fill[rip]
	call	sem_init@PLT
	mov	edx, 1
	mov	esi, 0
	lea	rdi, prnt[rip]
	call	sem_init@PLT
	lea	rdi, .LC2[rip]
	call	puts@PLT
	lea	rdi, .LC3[rip]
	call	puts@PLT
	lea	rdi, .LC4[rip]
	call	puts@PLT
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rsi, nproducers[rip]
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR nproducers[rip]
	cdqe
	sal	rax, 3
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR producers[rip], rax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rsi, nconsumers[rip]
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR nconsumers[rip]
	cdqe
	sal	rax, 3
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR consumers[rip], rax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rsi, buf_len[rip]
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	lea	rdi, .LC2[rip]
	call	puts@PLT
	lea	rdi, .LC9[rip]
	call	puts@PLT
	lea	rdi, .LC4[rip]
	call	puts@PLT
	mov	eax, DWORD PTR buf_len[rip]
	cdqe
	sal	rax, 2
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR buf[rip], rax
	mov	eax, DWORD PTR buf_len[rip]
	mov	edx, eax
	mov	esi, 0
	lea	rdi, empty[rip]
	call	sem_init@PLT
	mov	DWORD PTR -16[rbp], 0
	jmp	.L15
.L16:
	mov	rdx, QWORD PTR producers[rip]
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	ecx, 0
	lea	rdx, producer[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	add	DWORD PTR -16[rbp], 1
.L15:
	mov	eax, DWORD PTR nproducers[rip]
	cmp	DWORD PTR -16[rbp], eax
	jl	.L16
	mov	DWORD PTR -12[rbp], 0
	jmp	.L17
.L18:
	mov	rdx, QWORD PTR consumers[rip]
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	ecx, 0
	lea	rdx, consumer[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	add	DWORD PTR -12[rbp], 1
.L17:
	mov	eax, DWORD PTR nconsumers[rip]
	cmp	DWORD PTR -12[rbp], eax
	jl	.L18
	mov	DWORD PTR -8[rbp], 0
	jmp	.L19
.L20:
	mov	rdx, QWORD PTR producers[rip]
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	add	DWORD PTR -8[rbp], 1
.L19:
	mov	eax, DWORD PTR nproducers[rip]
	cmp	DWORD PTR -8[rbp], eax
	jl	.L20
	mov	DWORD PTR -4[rbp], 0
	jmp	.L21
.L22:
	mov	rdx, QWORD PTR consumers[rip]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	add	DWORD PTR -4[rbp], 1
.L21:
	mov	eax, DWORD PTR nconsumers[rip]
	cmp	DWORD PTR -4[rbp], eax
	jl	.L22
	mov	eax, 0
	leave
	.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	"816756.c"
	.text
	.comm	producers,4,4
	.comm	consumers,4,4
	.comm	mutex,16,4
	.comm	empty,16,4
	.comm	fill,16,4
	.comm	prnt,16,4
	.comm	buf,4,4
	.global	buf_pos
	.data
	.align	2
	.type	buf_pos, %object
	.size	buf_pos, 4
buf_pos:
	.word	-1
	.comm	nproducers,4,4
	.comm	nconsumers,4,4
	.comm	buf_len,4,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Producer %d produced %d \012\000"
	.text
	.align	2
	.global	produce
	.syntax unified
	.arm
	.fpu softvfp
	.type	produce, %function
produce:
	@ 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]
	bl	rand
	mov	r1, r0
	ldr	r3, .L6
	smull	r2, r3, r1, r3
	asr	r2, r3, #4
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #3
	sub	r2, r1, r3
	add	r3, r2, #1
	str	r3, [fp, #-8]
	b	.L2
.L4:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L2:
	ldr	r3, .L6+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r1, [fp, #-16]
	mov	r0, r3
	bl	pthread_equal
	mov	r3, r0
	cmp	r3, #0
	bne	.L3
	ldr	r3, .L6+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	blt	.L4
.L3:
	ldr	r0, .L6+12
	bl	sem_wait
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	ldr	r2, [fp, #-8]
	mov	r1, r3
	ldr	r0, .L6+16
	bl	printf
	ldr	r0, .L6+12
	bl	sem_post
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L7:
	.align	2
.L6:
	.word	1717986919
	.word	producers
	.word	nproducers
	.word	prnt
	.word	.LC0
	.size	produce, .-produce
	.section	.rodata
	.align	2
.LC1:
	.ascii	"\012Consumer %d consumed %d \012\000"
	.text
	.align	2
	.global	consume
	.syntax unified
	.arm
	.fpu softvfp
	.type	consume, %function
consume:
	@ 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]
	str	r1, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L9
.L11:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L9:
	ldr	r3, .L12
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r1, [fp, #-20]
	mov	r0, r3
	bl	pthread_equal
	mov	r3, r0
	cmp	r3, #0
	bne	.L10
	ldr	r3, .L12+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	blt	.L11
.L10:
	ldr	r0, .L12+8
	bl	sem_wait
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	ldr	r2, [fp, #-16]
	mov	r1, r3
	ldr	r0, .L12+12
	bl	printf
	ldr	r0, .L12+8
	bl	sem_post
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L13:
	.align	2
.L12:
	.word	consumers
	.word	nconsumers
	.word	prnt
	.word	.LC1
	.size	consume, .-consume
	.align	2
	.global	producer
	.syntax unified
	.arm
	.fpu softvfp
	.type	producer, %function
producer:
	@ 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]
.L15:
	bl	pthread_self
	mov	r3, r0
	mov	r0, r3
	bl	produce
	str	r0, [fp, #-8]
	ldr	r0, .L16
	bl	sem_wait
	ldr	r0, .L16+4
	bl	sem_wait
	ldr	r3, .L16+8
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L16+8
	str	r3, [r2]
	ldr	r3, .L16+12
	ldr	r2, [r3]
	ldr	r3, .L16+8
	ldr	r3, [r3]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [fp, #-8]
	str	r2, [r3]
	ldr	r0, .L16+4
	bl	sem_post
	ldr	r0, .L16+16
	bl	sem_post
	bl	rand
	mov	r2, r0
	ldr	r3, .L16+20
	smull	r1, r3, r2, r3
	add	r3, r3, r2
	asr	r1, r3, #2
	asr	r3, r2, #31
	sub	r1, r1, r3
	mov	r3, r1
	lsl	r3, r3, #3
	sub	r3, r3, r1
	sub	r1, r2, r3
	add	r3, r1, #1
	mov	r0, r3
	bl	sleep
	b	.L15
.L17:
	.align	2
.L16:
	.word	empty
	.word	mutex
	.word	buf_pos
	.word	buf
	.word	fill
	.word	-1840700269
	.size	producer, .-producer
	.align	2
	.global	consumer
	.syntax unified
	.arm
	.fpu softvfp
	.type	consumer, %function
consumer:
	@ 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]
.L19:
	ldr	r0, .L20
	bl	sem_wait
	ldr	r0, .L20+4
	bl	sem_wait
	ldr	r3, .L20+8
	ldr	r2, [r3]
	ldr	r3, .L20+12
	ldr	r3, [r3]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	bl	pthread_self
	mov	r3, r0
	mov	r1, r3
	ldr	r0, [fp, #-8]
	bl	consume
	ldr	r3, .L20+12
	ldr	r3, [r3]
	sub	r3, r3, #1
	ldr	r2, .L20+12
	str	r3, [r2]
	ldr	r0, .L20+4
	bl	sem_post
	ldr	r0, .L20+16
	bl	sem_post
	bl	rand
	mov	r1, r0
	ldr	r3, .L20+20
	smull	r2, r3, r1, r3
	asr	r2, r3, #1
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	sub	r2, r1, r3
	add	r3, r2, #1
	mov	r0, r3
	bl	sleep
	b	.L19
.L21:
	.align	2
.L20:
	.word	fill
	.word	mutex
	.word	buf
	.word	buf_pos
	.word	empty
	.word	780903145
	.size	consumer, .-consumer
	.section	.rodata
	.align	2
.LC2:
	.ascii	"\012-----------------------------------------------"
	.ascii	"-------------------------------------------\000"
	.align	2
.LC3:
	.ascii	"                           SOLUTION TO PRODUCER CON"
	.ascii	"SUMER PROBLEM                              \000"
	.align	2
.LC4:
	.ascii	"---------------------------------------------------"
	.ascii	"---------------------------------------\012\000"
	.align	2
.LC5:
	.ascii	"What is total number of producers :\000"
	.align	2
.LC6:
	.ascii	"%d\000"
	.align	2
.LC7:
	.ascii	"What is total number of Consumers :\000"
	.align	2
.LC8:
	.ascii	"What is the buffer length :\000"
	.align	2
.LC9:
	.ascii	"                                           ANSWER  "
	.ascii	"                                         \000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	mov	r0, #0
	bl	time
	mov	r3, r0
	mov	r0, r3
	bl	srand
	mov	r2, #1
	mov	r1, #0
	ldr	r0, .L32
	bl	sem_init
	mov	r2, #0
	mov	r1, #0
	ldr	r0, .L32+4
	bl	sem_init
	mov	r2, #1
	mov	r1, #0
	ldr	r0, .L32+8
	bl	sem_init
	ldr	r0, .L32+12
	bl	puts
	ldr	r0, .L32+16
	bl	puts
	ldr	r0, .L32+20
	bl	puts
	ldr	r0, .L32+24
	bl	printf
	ldr	r1, .L32+28
	ldr	r0, .L32+32
	bl	__isoc99_scanf
	ldr	r3, .L32+28
	ldr	r3, [r3]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L32+36
	str	r2, [r3]
	ldr	r0, .L32+40
	bl	printf
	ldr	r1, .L32+44
	ldr	r0, .L32+32
	bl	__isoc99_scanf
	ldr	r3, .L32+44
	ldr	r3, [r3]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L32+48
	str	r2, [r3]
	ldr	r0, .L32+52
	bl	printf
	ldr	r1, .L32+56
	ldr	r0, .L32+32
	bl	__isoc99_scanf
	ldr	r0, .L32+12
	bl	puts
	ldr	r0, .L32+60
	bl	puts
	ldr	r0, .L32+20
	bl	puts
	ldr	r3, .L32+56
	ldr	r3, [r3]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L32+64
	str	r2, [r3]
	ldr	r3, .L32+56
	ldr	r3, [r3]
	mov	r2, r3
	mov	r1, #0
	ldr	r0, .L32+68
	bl	sem_init
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L23
.L24:
	ldr	r3, .L32+36
	ldr	r2, [r3]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	add	r0, r2, r3
	mov	r3, #0
	ldr	r2, .L32+72
	mov	r1, #0
	bl	pthread_create
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L23:
	ldr	r3, .L32+28
	ldr	r3, [r3]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	blt	.L24
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L25
.L26:
	ldr	r3, .L32+48
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	add	r0, r2, r3
	mov	r3, #0
	ldr	r2, .L32+76
	mov	r1, #0
	bl	pthread_create
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L25:
	ldr	r3, .L32+44
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	blt	.L26
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L27
.L28:
	ldr	r3, .L32+36
	ldr	r2, [r3]
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L27:
	ldr	r3, .L32+28
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	blt	.L28
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L29
.L30:
	ldr	r3, .L32+48
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L29:
	ldr	r3, .L32+44
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	blt	.L30
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L33:
	.align	2
.L32:
	.word	mutex
	.word	fill
	.word	prnt
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	nproducers
	.word	.LC6
	.word	producers
	.word	.LC7
	.word	nconsumers
	.word	consumers
	.word	.LC8
	.word	buf_len
	.word	.LC9
	.word	buf
	.word	empty
	.word	producer
	.word	consumer
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
