	.file	"367823.c"
	.intel_syntax noprefix
	.text
	.globl	buffer
	.bss
	.align 32
	.type	buffer, @object
	.size	buffer, 40
buffer:
	.zero	40
	.globl	count
	.align 4
	.type	count, @object
	.size	count, 4
count:
	.zero	4
	.globl	fill_ptr
	.align 4
	.type	fill_ptr, @object
	.size	fill_ptr, 4
fill_ptr:
	.zero	4
	.globl	use_ptr
	.align 4
	.type	use_ptr, @object
	.size	use_ptr, 4
use_ptr:
	.zero	4
	.globl	loops
	.data
	.align 4
	.type	loops, @object
	.size	loops, 4
loops:
	.long	100
	.text
	.globl	put
	.type	put, @function
put:
.LFB6:
	.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 -4[rbp], edi
	mov	eax, DWORD PTR fill_ptr[rip]
	cdqe
	lea	rcx, 0[0+rax*4]
	lea	rdx, buffer[rip]
	mov	eax, DWORD PTR -4[rbp]
	mov	DWORD PTR [rcx+rdx], eax
	mov	eax, DWORD PTR fill_ptr[rip]
	lea	ecx, 1[rax]
	movsx	rax, ecx
	imul	rax, rax, 1717986919
	shr	rax, 32
	sar	eax, 2
	mov	esi, ecx
	sar	esi, 31
	sub	eax, esi
	mov	edx, eax
	mov	eax, edx
	sal	eax, 2
	add	eax, edx
	add	eax, eax
	sub	ecx, eax
	mov	edx, ecx
	mov	DWORD PTR fill_ptr[rip], edx
	mov	eax, DWORD PTR count[rip]
	add	eax, 1
	mov	DWORD PTR count[rip], eax
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	put, .-put
	.globl	get
	.type	get, @function
get:
.LFB7:
	.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 use_ptr[rip]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, buffer[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR use_ptr[rip]
	lea	ecx, 1[rax]
	movsx	rax, ecx
	imul	rax, rax, 1717986919
	shr	rax, 32
	sar	eax, 2
	mov	esi, ecx
	sar	esi, 31
	sub	eax, esi
	mov	edx, eax
	mov	eax, edx
	sal	eax, 2
	add	eax, edx
	add	eax, eax
	sub	ecx, eax
	mov	edx, ecx
	mov	DWORD PTR use_ptr[rip], edx
	mov	eax, DWORD PTR count[rip]
	sub	eax, 1
	mov	DWORD PTR count[rip], eax
	mov	eax, DWORD PTR -4[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	get, .-get
	.globl	empty
	.bss
	.align 32
	.type	empty, @object
	.size	empty, 48
empty:
	.zero	48
	.globl	fill
	.align 32
	.type	fill, @object
	.size	fill, 48
fill:
	.zero	48
	.globl	mutex
	.align 32
	.type	mutex, @object
	.size	mutex, 40
mutex:
	.zero	40
	.section	.rodata
.LC0:
	.string	"the_stack_data/367823.c"
.LC1:
	.string	"count < MAX"
.LC2:
	.string	"put: %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 -4[rbp], 0
	jmp	.L5
.L9:
	lea	rdi, mutex[rip]
	call	pthread_mutex_lock@PLT
	jmp	.L6
.L7:
	lea	rsi, mutex[rip]
	lea	rdi, empty[rip]
	call	pthread_cond_wait@PLT
.L6:
	mov	eax, DWORD PTR count[rip]
	cmp	eax, 10
	je	.L7
	mov	eax, DWORD PTR count[rip]
	cmp	eax, 9
	jle	.L8
	lea	rcx, __PRETTY_FUNCTION__.1[rip]
	mov	edx, 51
	lea	rsi, .LC0[rip]
	lea	rdi, .LC1[rip]
	call	__assert_fail@PLT
.L8:
	mov	eax, DWORD PTR -4[rbp]
	mov	edi, eax
	call	put
	lea	rdi, fill[rip]
	call	pthread_cond_signal@PLT
	lea	rdi, mutex[rip]
	call	pthread_mutex_unlock@PLT
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -4[rbp], 1
.L5:
	mov	eax, DWORD PTR loops[rip]
	cmp	DWORD PTR -4[rbp], eax
	jl	.L9
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	producer, .-producer
	.section	.rodata
.LC3:
	.string	"count > 0"
.LC4:
	.string	"%s: %d\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
	jmp	.L11
.L15:
	lea	rdi, mutex[rip]
	call	pthread_mutex_lock@PLT
	jmp	.L12
.L13:
	lea	rsi, mutex[rip]
	lea	rdi, fill[rip]
	call	pthread_cond_wait@PLT
.L12:
	mov	eax, DWORD PTR count[rip]
	test	eax, eax
	je	.L13
	mov	eax, DWORD PTR count[rip]
	test	eax, eax
	jg	.L14
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 70
	lea	rsi, .LC0[rip]
	lea	rdi, .LC3[rip]
	call	__assert_fail@PLT
.L14:
	mov	eax, 0
	call	get
	mov	DWORD PTR -4[rbp], eax
	lea	rdi, empty[rip]
	call	pthread_cond_signal@PLT
	lea	rdi, mutex[rip]
	call	pthread_mutex_unlock@PLT
	mov	edx, DWORD PTR -4[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -8[rbp], 1
.L11:
	mov	eax, DWORD PTR loops[rip]
	cmp	DWORD PTR -8[rbp], eax
	jl	.L15
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	consumer, .-consumer
	.section	.rodata
.LC5:
	.string	"consumer 1"
	.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, 32
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	esi, 0
	lea	rdi, empty[rip]
	call	pthread_cond_init@PLT
	mov	esi, 0
	lea	rdi, fill[rip]
	call	pthread_cond_init@PLT
	mov	esi, 0
	lea	rdi, mutex[rip]
	call	pthread_mutex_init@PLT
	mov	DWORD PTR -28[rbp], 100
	lea	rax, -24[rbp]
	mov	ecx, 0
	lea	rdx, producer[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	lea	rax, -16[rbp]
	lea	rcx, .LC5[rip]
	lea	rdx, consumer[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	mov	edi, 0
	call	exit@PLT
	.cfi_endproc
.LFE10:
	.size	main, .-main
	.section	.rodata
	.align 8
	.type	__PRETTY_FUNCTION__.1, @object
	.size	__PRETTY_FUNCTION__.1, 9
__PRETTY_FUNCTION__.1:
	.string	"producer"
	.align 8
	.type	__PRETTY_FUNCTION__.0, @object
	.size	__PRETTY_FUNCTION__.0, 9
__PRETTY_FUNCTION__.0:
	.string	"consumer"
	.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	"367823.c"
	.text
	.comm	buffer,40,4
	.global	count
	.bss
	.align	2
	.type	count, %object
	.size	count, 4
count:
	.space	4
	.global	fill_ptr
	.align	2
	.type	fill_ptr, %object
	.size	fill_ptr, 4
fill_ptr:
	.space	4
	.global	use_ptr
	.align	2
	.type	use_ptr, %object
	.size	use_ptr, 4
use_ptr:
	.space	4
	.global	loops
	.data
	.align	2
	.type	loops, %object
	.size	loops, 4
loops:
	.word	100
	.text
	.align	2
	.global	put
	.syntax unified
	.arm
	.fpu softvfp
	.type	put, %function
put:
	@ 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
	str	r0, [fp, #-8]
	ldr	r3, .L2
	ldr	r3, [r3]
	ldr	r1, .L2+4
	ldr	r2, [fp, #-8]
	str	r2, [r1, r3, lsl #2]
	ldr	r3, .L2
	ldr	r3, [r3]
	add	r1, r3, #1
	ldr	r3, .L2+8
	smull	r2, r3, r1, r3
	asr	r2, r3, #2
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #1
	sub	r2, r1, r3
	ldr	r3, .L2
	str	r2, [r3]
	ldr	r3, .L2+12
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L2+12
	str	r3, [r2]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L3:
	.align	2
.L2:
	.word	fill_ptr
	.word	buffer
	.word	1717986919
	.word	count
	.size	put, .-put
	.align	2
	.global	get
	.syntax unified
	.arm
	.fpu softvfp
	.type	get, %function
get:
	@ 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
	ldr	r3, .L6
	ldr	r3, [r3]
	ldr	r2, .L6+4
	ldr	r3, [r2, r3, lsl #2]
	str	r3, [fp, #-8]
	ldr	r3, .L6
	ldr	r3, [r3]
	add	r1, r3, #1
	ldr	r3, .L6+8
	smull	r2, r3, r1, r3
	asr	r2, r3, #2
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #1
	sub	r2, r1, r3
	ldr	r3, .L6
	str	r2, [r3]
	ldr	r3, .L6+12
	ldr	r3, [r3]
	sub	r3, r3, #1
	ldr	r2, .L6+12
	str	r3, [r2]
	ldr	r3, [fp, #-8]
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L7:
	.align	2
.L6:
	.word	use_ptr
	.word	buffer
	.word	1717986919
	.word	count
	.size	get, .-get
	.comm	empty,48,8
	.comm	fill,48,8
	.comm	mutex,24,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"the_stack_data/367823.c\000"
	.align	2
.LC1:
	.ascii	"count < MAX\000"
	.align	2
.LC2:
	.ascii	"put: %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, #-8]
	b	.L9
.L13:
	ldr	r0, .L14
	bl	pthread_mutex_lock
	b	.L10
.L11:
	ldr	r1, .L14
	ldr	r0, .L14+4
	bl	pthread_cond_wait
.L10:
	ldr	r3, .L14+8
	ldr	r3, [r3]
	cmp	r3, #10
	beq	.L11
	ldr	r3, .L14+8
	ldr	r3, [r3]
	cmp	r3, #9
	ble	.L12
	ldr	r3, .L14+12
	mov	r2, #51
	ldr	r1, .L14+16
	ldr	r0, .L14+20
	bl	__assert_fail
.L12:
	ldr	r0, [fp, #-8]
	bl	put
	ldr	r0, .L14+24
	bl	pthread_cond_signal
	ldr	r0, .L14
	bl	pthread_mutex_unlock
	ldr	r1, [fp, #-8]
	ldr	r0, .L14+28
	bl	printf
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L9:
	ldr	r3, .L14+32
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	blt	.L13
	nop
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L15:
	.align	2
.L14:
	.word	mutex
	.word	empty
	.word	count
	.word	__PRETTY_FUNCTION__.5652
	.word	.LC0
	.word	.LC1
	.word	fill
	.word	.LC2
	.word	loops
	.size	producer, .-producer
	.section	.rodata
	.align	2
.LC3:
	.ascii	"count > 0\000"
	.align	2
.LC4:
	.ascii	"%s: %d\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]
	b	.L17
.L21:
	ldr	r0, .L22
	bl	pthread_mutex_lock
	b	.L18
.L19:
	ldr	r1, .L22
	ldr	r0, .L22+4
	bl	pthread_cond_wait
.L18:
	ldr	r3, .L22+8
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L19
	ldr	r3, .L22+8
	ldr	r3, [r3]
	cmp	r3, #0
	bgt	.L20
	ldr	r3, .L22+12
	mov	r2, #70
	ldr	r1, .L22+16
	ldr	r0, .L22+20
	bl	__assert_fail
.L20:
	bl	get
	str	r0, [fp, #-8]
	ldr	r0, .L22+24
	bl	pthread_cond_signal
	ldr	r0, .L22
	bl	pthread_mutex_unlock
	ldr	r2, [fp, #-8]
	ldr	r1, [fp, #-16]
	ldr	r0, .L22+28
	bl	printf
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L17:
	ldr	r3, .L22+32
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	blt	.L21
	nop
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L23:
	.align	2
.L22:
	.word	mutex
	.word	fill
	.word	count
	.word	__PRETTY_FUNCTION__.5663
	.word	.LC0
	.word	.LC3
	.word	empty
	.word	.LC4
	.word	loops
	.size	consumer, .-consumer
	.section	.rodata
	.align	2
.LC5:
	.ascii	"consumer 1\000"
	.align	2
.LC6:
	.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, .L26
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r1, #0
	ldr	r0, .L26+4
	bl	pthread_cond_init
	mov	r1, #0
	ldr	r0, .L26+8
	bl	pthread_cond_init
	mov	r1, #0
	ldr	r0, .L26+12
	bl	pthread_mutex_init
	mov	r3, #100
	str	r3, [fp, #-12]
	sub	r0, fp, #20
	mov	r3, #0
	ldr	r2, .L26+16
	mov	r1, #0
	bl	pthread_create
	sub	r0, fp, #16
	ldr	r3, .L26+20
	ldr	r2, .L26+24
	mov	r1, #0
	bl	pthread_create
	ldr	r3, [fp, #-20]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	ldr	r3, [fp, #-16]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	mov	r0, #0
	bl	exit
.L27:
	.align	2
.L26:
	.word	.LC6
	.word	empty
	.word	fill
	.word	mutex
	.word	producer
	.word	.LC5
	.word	consumer
	.size	main, .-main
	.section	.rodata
	.align	2
	.type	__PRETTY_FUNCTION__.5652, %object
	.size	__PRETTY_FUNCTION__.5652, 9
__PRETTY_FUNCTION__.5652:
	.ascii	"producer\000"
	.align	2
	.type	__PRETTY_FUNCTION__.5663, %object
	.size	__PRETTY_FUNCTION__.5663, 9
__PRETTY_FUNCTION__.5663:
	.ascii	"consumer\000"
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
