	.file	"306065.c"
	.intel_syntax noprefix
	.text
	.globl	empty
	.bss
	.align 4
	.type	empty, @object
	.size	empty, 4
empty:
	.zero	4
	.globl	full
	.align 4
	.type	full, @object
	.size	full, 4
full:
	.zero	4
	.globl	data
	.align 16
	.type	data, @object
	.size	data, 16
data:
	.zero	16
	.globl	mut
	.align 32
	.type	mut, @object
	.size	mut, 40
mut:
	.zero	40
	.globl	empty_cond
	.align 32
	.type	empty_cond, @object
	.size	empty_cond, 48
empty_cond:
	.zero	48
	.globl	full_cond
	.align 32
	.type	full_cond, @object
	.size	full_cond, 48
full_cond:
	.zero	48
	.section	.rodata
.LC0:
	.string	"Data not pushed"
	.text
	.globl	push_data
	.type	push_data, @function
push_data:
.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 -4[rbp], 0
	jmp	.L2
.L5:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, data[rip]
	mov	eax, DWORD PTR [rdx+rax]
	test	eax, eax
	jne	.L3
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rcx, 0[0+rax*4]
	lea	rdx, data[rip]
	mov	eax, DWORD PTR -20[rbp]
	mov	DWORD PTR [rcx+rdx], eax
	jmp	.L1
.L3:
	add	DWORD PTR -4[rbp], 1
.L2:
	cmp	DWORD PTR -4[rbp], 3
	jle	.L5
	lea	rdi, .LC0[rip]
	call	puts@PLT
.L1:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	push_data, .-push_data
	.globl	retrieve_data
	.type	retrieve_data, @function
retrieve_data:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -8[rbp], 0
	jmp	.L7
.L10:
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, data[rip]
	mov	eax, DWORD PTR [rdx+rax]
	test	eax, eax
	je	.L8
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, data[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, data[rip]
	mov	DWORD PTR [rdx+rax], 0
	mov	eax, DWORD PTR -4[rbp]
	jmp	.L9
.L8:
	add	DWORD PTR -8[rbp], 1
.L7:
	cmp	DWORD PTR -8[rbp], 3
	jle	.L10
	mov	eax, -1
.L9:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	retrieve_data, .-retrieve_data
	.section	.rodata
.LC1:
	.string	"Producer iteration %d\n"
.LC2:
	.string	"Empty==0, waiting..,"
.LC3:
	.string	"Total value produced %d\n"
	.text
	.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
	mov	DWORD PTR -8[rbp], 0
	mov	DWORD PTR -4[rbp], 1
	jmp	.L12
.L15:
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, mut[rip]
	call	pthread_mutex_lock@PLT
	jmp	.L13
.L14:
	lea	rdi, .LC2[rip]
	call	puts@PLT
	lea	rsi, mut[rip]
	lea	rdi, empty_cond[rip]
	call	pthread_cond_wait@PLT
.L13:
	mov	eax, DWORD PTR empty[rip]
	test	eax, eax
	je	.L14
	mov	eax, DWORD PTR empty[rip]
	sub	eax, 1
	mov	DWORD PTR empty[rip], eax
	mov	eax, DWORD PTR -4[rbp]
	mov	edi, eax
	call	push_data
	mov	eax, DWORD PTR -4[rbp]
	add	DWORD PTR -8[rbp], eax
	mov	eax, DWORD PTR full[rip]
	add	eax, 1
	mov	DWORD PTR full[rip], eax
	lea	rdi, full_cond[rip]
	call	pthread_cond_signal@PLT
	lea	rdi, mut[rip]
	call	pthread_mutex_unlock@PLT
	add	DWORD PTR -4[rbp], 1
.L12:
	cmp	DWORD PTR -4[rbp], 199
	jle	.L15
	mov	eax, DWORD PTR -8[rbp]
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 0
	call	pthread_exit@PLT
	.cfi_endproc
.LFE8:
	.size	producer, .-producer
	.section	.rodata
.LC4:
	.string	"New consumer running!"
.LC5:
	.string	"Full==0, waiting..,"
.LC6:
	.string	"Consumed %d of data\n"
	.text
	.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
	mov	DWORD PTR -8[rbp], 0
	lea	rdi, .LC4[rip]
	call	puts@PLT
	mov	DWORD PTR -4[rbp], 0
	jmp	.L17
.L20:
	lea	rdi, mut[rip]
	call	pthread_mutex_lock@PLT
	jmp	.L18
.L19:
	lea	rdi, .LC5[rip]
	call	puts@PLT
	lea	rsi, mut[rip]
	lea	rdi, full_cond[rip]
	call	pthread_cond_wait@PLT
.L18:
	mov	eax, DWORD PTR full[rip]
	test	eax, eax
	je	.L19
	mov	eax, DWORD PTR full[rip]
	sub	eax, 1
	mov	DWORD PTR full[rip], eax
	mov	eax, 0
	call	retrieve_data
	add	DWORD PTR -8[rbp], eax
	mov	eax, DWORD PTR empty[rip]
	add	eax, 1
	mov	DWORD PTR empty[rip], eax
	lea	rdi, empty_cond[rip]
	call	pthread_cond_signal@PLT
	lea	rdi, mut[rip]
	call	pthread_mutex_unlock@PLT
	add	DWORD PTR -4[rbp], 1
.L17:
	cmp	DWORD PTR -4[rbp], 48
	jle	.L20
	mov	eax, DWORD PTR -8[rbp]
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 0
	call	pthread_exit@PLT
	.cfi_endproc
.LFE9:
	.size	consumer, .-consumer
	.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, 32
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -16[rbp]
	mov	ecx, 0
	lea	rdx, producer[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	mov	DWORD PTR empty[rip], 4
	mov	DWORD PTR full[rip], 0
	mov	DWORD PTR -20[rbp], 0
	jmp	.L22
.L23:
	lea	rax, -16[rbp]
	mov	ecx, 0
	lea	rdx, consumer[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	add	DWORD PTR -20[rbp], 1
.L22:
	cmp	DWORD PTR -20[rbp], 3
	jle	.L23
	mov	edi, 0
	call	pthread_exit@PLT
	.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	"306065.c"
	.text
	.comm	empty,4,4
	.comm	full,4,4
	.global	data
	.bss
	.align	2
	.type	data, %object
	.size	data, 16
data:
	.space	16
	.global	mut
	.align	2
	.type	mut, %object
	.size	mut, 24
mut:
	.space	24
	.global	empty_cond
	.align	3
	.type	empty_cond, %object
	.size	empty_cond, 48
empty_cond:
	.space	48
	.global	full_cond
	.align	3
	.type	full_cond, %object
	.size	full_cond, 48
full_cond:
	.space	48
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Data not pushed\000"
	.text
	.align	2
	.global	push_data
	.syntax unified
	.arm
	.fpu softvfp
	.type	push_data, %function
push_data:
	@ 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, #-8]
	b	.L2
.L5:
	ldr	r2, .L6
	ldr	r3, [fp, #-8]
	ldr	r3, [r2, r3, lsl #2]
	cmp	r3, #0
	bne	.L3
	ldr	r1, .L6
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	str	r2, [r1, r3, lsl #2]
	b	.L1
.L3:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L2:
	ldr	r3, [fp, #-8]
	cmp	r3, #3
	ble	.L5
	ldr	r0, .L6+4
	bl	puts
.L1:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L7:
	.align	2
.L6:
	.word	data
	.word	.LC0
	.size	push_data, .-push_data
	.align	2
	.global	retrieve_data
	.syntax unified
	.arm
	.fpu softvfp
	.type	retrieve_data, %function
retrieve_data:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L9
.L12:
	ldr	r2, .L13
	ldr	r3, [fp, #-12]
	ldr	r3, [r2, r3, lsl #2]
	cmp	r3, #0
	beq	.L10
	ldr	r2, .L13
	ldr	r3, [fp, #-12]
	ldr	r3, [r2, r3, lsl #2]
	str	r3, [fp, #-8]
	ldr	r2, .L13
	ldr	r3, [fp, #-12]
	mov	r1, #0
	str	r1, [r2, r3, lsl #2]
	ldr	r3, [fp, #-8]
	b	.L11
.L10:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L9:
	ldr	r3, [fp, #-12]
	cmp	r3, #3
	ble	.L12
	mvn	r3, #0
.L11:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L14:
	.align	2
.L13:
	.word	data
	.size	retrieve_data, .-retrieve_data
	.section	.rodata
	.align	2
.LC1:
	.ascii	"Producer iteration %d\012\000"
	.align	2
.LC2:
	.ascii	"Empty==0, waiting..,\000"
	.align	2
.LC3:
	.ascii	"Total value produced %d\012\000"
	.text
	.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]
	mov	r3, #0
	str	r3, [fp, #-12]
	mov	r3, #1
	str	r3, [fp, #-8]
	b	.L16
.L19:
	ldr	r1, [fp, #-8]
	ldr	r0, .L20
	bl	printf
	ldr	r0, .L20+4
	bl	pthread_mutex_lock
	b	.L17
.L18:
	ldr	r0, .L20+8
	bl	puts
	ldr	r1, .L20+4
	ldr	r0, .L20+12
	bl	pthread_cond_wait
.L17:
	ldr	r3, .L20+16
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L18
	ldr	r3, .L20+16
	ldr	r3, [r3]
	sub	r3, r3, #1
	ldr	r2, .L20+16
	str	r3, [r2]
	ldr	r0, [fp, #-8]
	bl	push_data
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	str	r3, [fp, #-12]
	ldr	r3, .L20+20
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L20+20
	str	r3, [r2]
	ldr	r0, .L20+24
	bl	pthread_cond_signal
	ldr	r0, .L20+4
	bl	pthread_mutex_unlock
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L16:
	ldr	r3, [fp, #-8]
	cmp	r3, #199
	ble	.L19
	ldr	r1, [fp, #-12]
	ldr	r0, .L20+28
	bl	printf
	mov	r0, #0
	bl	pthread_exit
.L21:
	.align	2
.L20:
	.word	.LC1
	.word	mut
	.word	.LC2
	.word	empty_cond
	.word	empty
	.word	full
	.word	full_cond
	.word	.LC3
	.size	producer, .-producer
	.section	.rodata
	.align	2
.LC4:
	.ascii	"New consumer running!\000"
	.align	2
.LC5:
	.ascii	"Full==0, waiting..,\000"
	.align	2
.LC6:
	.ascii	"Consumed %d of data\012\000"
	.text
	.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]
	mov	r3, #0
	str	r3, [fp, #-12]
	ldr	r0, .L27
	bl	puts
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L23
.L26:
	ldr	r0, .L27+4
	bl	pthread_mutex_lock
	b	.L24
.L25:
	ldr	r0, .L27+8
	bl	puts
	ldr	r1, .L27+4
	ldr	r0, .L27+12
	bl	pthread_cond_wait
.L24:
	ldr	r3, .L27+16
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L25
	ldr	r3, .L27+16
	ldr	r3, [r3]
	sub	r3, r3, #1
	ldr	r2, .L27+16
	str	r3, [r2]
	bl	retrieve_data
	mov	r2, r0
	ldr	r3, [fp, #-12]
	add	r3, r3, r2
	str	r3, [fp, #-12]
	ldr	r3, .L27+20
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L27+20
	str	r3, [r2]
	ldr	r0, .L27+24
	bl	pthread_cond_signal
	ldr	r0, .L27+4
	bl	pthread_mutex_unlock
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L23:
	ldr	r3, [fp, #-8]
	cmp	r3, #48
	ble	.L26
	ldr	r1, [fp, #-12]
	ldr	r0, .L27+28
	bl	printf
	mov	r0, #0
	bl	pthread_exit
.L28:
	.align	2
.L27:
	.word	.LC4
	.word	mut
	.word	.LC5
	.word	full_cond
	.word	full
	.word	empty
	.word	empty_cond
	.word	.LC6
	.size	consumer, .-consumer
	.section	.rodata
	.align	2
.LC7:
	.word	__stack_chk_guard
	.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
	ldr	r3, .L33
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r0, fp, #16
	mov	r3, #0
	ldr	r2, .L33+4
	mov	r1, #0
	bl	pthread_create
	ldr	r3, .L33+8
	mov	r2, #4
	str	r2, [r3]
	ldr	r3, .L33+12
	mov	r2, #0
	str	r2, [r3]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L30
.L31:
	sub	r0, fp, #16
	mov	r3, #0
	ldr	r2, .L33+16
	mov	r1, #0
	bl	pthread_create
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L30:
	ldr	r3, [fp, #-12]
	cmp	r3, #3
	ble	.L31
	mov	r0, #0
	bl	pthread_exit
.L34:
	.align	2
.L33:
	.word	.LC7
	.word	producer
	.word	empty
	.word	full
	.word	consumer
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
