	.file	"76699664.c"
	.intel_syntax noprefix
	.text
	.globl	buf
	.bss
	.align 16
	.type	buf, @object
	.size	buf, 16
buf:
	.zero	16
	.globl	in
	.align 4
	.type	in, @object
	.size	in, 4
in:
	.zero	4
	.globl	out
	.align 4
	.type	out, @object
	.size	out, 4
out:
	.zero	4
	.globl	mutexs
	.align 32
	.type	mutexs, @object
	.size	mutexs, 9600
mutexs:
	.zero	9600
	.globl	buf_mutex
	.align 32
	.type	buf_mutex, @object
	.size	buf_mutex, 96
buf_mutex:
	.zero	96
	.globl	buf_full
	.align 32
	.type	buf_full, @object
	.size	buf_full, 96
buf_full:
	.zero	96
	.globl	buf_empty
	.align 32
	.type	buf_empty, @object
	.size	buf_empty, 96
buf_empty:
	.zero	96
	.text
	.globl	sema_init
	.type	sema_init, @function
sema_init:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	DWORD PTR -12[rbp], esi
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR -12[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 8
	mov	esi, 0
	mov	rdi, rax
	call	pthread_mutex_init@PLT
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 48
	mov	esi, 0
	mov	rdi, rax
	call	pthread_cond_init@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	sema_init, .-sema_init
	.globl	sema_wait
	.type	sema_wait, @function
sema_wait:
.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]
	add	rax, 8
	mov	rdi, rax
	call	pthread_mutex_lock@PLT
	jmp	.L3
.L4:
	mov	rax, QWORD PTR -8[rbp]
	lea	rdx, 8[rax]
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 48
	mov	rsi, rdx
	mov	rdi, rax
	call	pthread_cond_wait@PLT
.L3:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	jle	.L4
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	lea	edx, -1[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 8
	mov	rdi, rax
	call	pthread_mutex_unlock@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	sema_wait, .-sema_wait
	.globl	sema_signal
	.type	sema_signal, @function
sema_signal:
.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]
	add	rax, 8
	mov	rdi, rax
	call	pthread_mutex_lock@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 48
	mov	rdi, rax
	call	pthread_cond_signal@PLT
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 8
	mov	rdi, rax
	call	pthread_mutex_unlock@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	sema_signal, .-sema_signal
	.globl	get_item
	.type	get_item, @function
get_item:
.LFB9:
	.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 out[rip]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, buf[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR out[rip]
	add	eax, 1
	cdq
	shr	edx, 30
	add	eax, edx
	and	eax, 3
	sub	eax, edx
	mov	DWORD PTR out[rip], eax
	mov	eax, DWORD PTR -4[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	get_item, .-get_item
	.globl	put_item
	.type	put_item, @function
put_item:
.LFB10:
	.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 in[rip]
	cdqe
	lea	rcx, 0[0+rax*4]
	lea	rdx, buf[rip]
	mov	eax, DWORD PTR -4[rbp]
	mov	DWORD PTR [rcx+rdx], eax
	mov	eax, DWORD PTR in[rip]
	add	eax, 1
	cdq
	shr	edx, 30
	add	eax, edx
	and	eax, 3
	sub	eax, edx
	mov	DWORD PTR in[rip], eax
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	put_item, .-put_item
	.section	.rodata
.LC0:
	.string	"thread %d item:%d\n"
	.text
	.globl	ring
	.type	ring, @function
ring:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -16[rbp], eax
	cmp	DWORD PTR -16[rbp], 0
	jne	.L10
	lea	rdi, buf_empty[rip]
	call	sema_wait
	lea	rdi, buf_mutex[rip]
	call	sema_wait
	mov	eax, DWORD PTR -16[rbp]
	add	eax, 1
	mov	DWORD PTR -12[rbp], eax
	mov	eax, DWORD PTR -12[rbp]
	mov	edi, eax
	call	put_item
	lea	rdi, buf_mutex[rip]
	call	sema_signal
	lea	rdi, buf_full[rip]
	call	sema_signal
	mov	eax, DWORD PTR -16[rbp]
	lea	edx, 1[rax]
	movsx	rax, edx
	imul	rax, rax, 1374389535
	shr	rax, 32
	sar	eax, 5
	mov	ecx, edx
	sar	ecx, 31
	sub	eax, ecx
	imul	ecx, eax, 100
	mov	eax, edx
	sub	eax, ecx
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 5
	lea	rdx, mutexs[rip]
	add	rax, rdx
	mov	rdi, rax
	call	sema_signal
	mov	eax, DWORD PTR -16[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 5
	lea	rdx, mutexs[rip]
	add	rax, rdx
	mov	rdi, rax
	call	sema_wait
	lea	rdi, buf_full[rip]
	call	sema_wait
	lea	rdi, buf_mutex[rip]
	call	sema_wait
	mov	eax, 0
	call	get_item
	mov	DWORD PTR -12[rbp], eax
	mov	eax, DWORD PTR -16[rbp]
	lea	ecx, 1[rax]
	mov	eax, DWORD PTR -12[rbp]
	mov	edx, eax
	mov	esi, ecx
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, buf_mutex[rip]
	call	sema_signal
	lea	rdi, buf_empty[rip]
	call	sema_signal
	mov	eax, DWORD PTR -16[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 5
	lea	rdx, mutexs[rip]
	add	rax, rdx
	mov	rdi, rax
	call	sema_signal
	jmp	.L11
.L10:
	mov	eax, DWORD PTR -16[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 5
	lea	rdx, mutexs[rip]
	add	rax, rdx
	mov	rdi, rax
	call	sema_wait
	lea	rdi, buf_full[rip]
	call	sema_wait
	lea	rdi, buf_mutex[rip]
	call	sema_wait
	mov	eax, 0
	call	get_item
	mov	DWORD PTR -12[rbp], eax
	mov	eax, DWORD PTR -16[rbp]
	lea	ecx, 1[rax]
	mov	eax, DWORD PTR -12[rbp]
	mov	edx, eax
	mov	esi, ecx
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -12[rbp], 1
	mov	eax, DWORD PTR -12[rbp]
	mov	edi, eax
	call	put_item
	lea	rdi, buf_mutex[rip]
	call	sema_signal
	lea	rdi, buf_full[rip]
	call	sema_signal
	mov	eax, DWORD PTR -16[rbp]
	lea	edx, 1[rax]
	movsx	rax, edx
	imul	rax, rax, 1374389535
	shr	rax, 32
	sar	eax, 5
	mov	ecx, edx
	sar	ecx, 31
	sub	eax, ecx
	imul	ecx, eax, 100
	mov	eax, edx
	sub	eax, ecx
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 5
	lea	rdx, mutexs[rip]
	add	rax, rdx
	mov	rdi, rax
	call	sema_signal
.L11:
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	ring, .-ring
	.globl	main
	.type	main, @function
main:
.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, 1232
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	esi, 1
	lea	rdi, buf_mutex[rip]
	call	sema_init
	mov	esi, 0
	lea	rdi, buf_full[rip]
	call	sema_init
	mov	esi, 3
	lea	rdi, buf_empty[rip]
	call	sema_init
	mov	DWORD PTR -1220[rbp], 0
	jmp	.L14
.L15:
	mov	eax, DWORD PTR -1220[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 5
	lea	rdx, mutexs[rip]
	add	rax, rdx
	mov	esi, 0
	mov	rdi, rax
	call	sema_init
	add	DWORD PTR -1220[rbp], 1
.L14:
	cmp	DWORD PTR -1220[rbp], 99
	jle	.L15
	mov	DWORD PTR -1220[rbp], 0
	jmp	.L16
.L17:
	mov	eax, DWORD PTR -1220[rbp]
	cdqe
	mov	edx, DWORD PTR -1220[rbp]
	mov	DWORD PTR -1216[rbp+rax*4], edx
	lea	rdx, -1216[rbp]
	mov	eax, DWORD PTR -1220[rbp]
	cdqe
	sal	rax, 2
	add	rdx, rax
	lea	rcx, -816[rbp]
	mov	eax, DWORD PTR -1220[rbp]
	cdqe
	sal	rax, 3
	add	rax, rcx
	mov	rcx, rdx
	lea	rdx, ring[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	add	DWORD PTR -1220[rbp], 1
.L16:
	cmp	DWORD PTR -1220[rbp], 99
	jle	.L17
	mov	rax, QWORD PTR -816[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.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	"76699664.c"
	.text
	.global	buf
	.bss
	.align	2
	.type	buf, %object
	.size	buf, 16
buf:
	.space	16
	.global	in
	.align	2
	.type	in, %object
	.size	in, 4
in:
	.space	4
	.global	out
	.align	2
	.type	out, %object
	.size	out, 4
out:
	.space	4
	.comm	mutexs,8000,8
	.comm	buf_mutex,80,8
	.comm	buf_full,80,8
	.comm	buf_empty,80,8
	.text
	.align	2
	.global	sema_init
	.syntax unified
	.arm
	.fpu softvfp
	.type	sema_init, %function
sema_init:
	@ 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	r3, [fp, #-8]
	ldr	r2, [fp, #-12]
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	add	r3, r3, #4
	mov	r1, #0
	mov	r0, r3
	bl	pthread_mutex_init
	ldr	r3, [fp, #-8]
	add	r3, r3, #32
	mov	r1, #0
	mov	r0, r3
	bl	pthread_cond_init
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	sema_init, .-sema_init
	.align	2
	.global	sema_wait
	.syntax unified
	.arm
	.fpu softvfp
	.type	sema_wait, %function
sema_wait:
	@ 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	r3, [fp, #-8]
	add	r3, r3, #4
	mov	r0, r3
	bl	pthread_mutex_lock
	b	.L3
.L4:
	ldr	r3, [fp, #-8]
	add	r2, r3, #32
	ldr	r3, [fp, #-8]
	add	r3, r3, #4
	mov	r1, r3
	mov	r0, r2
	bl	pthread_cond_wait
.L3:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	cmp	r3, #0
	ble	.L4
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	sub	r2, r3, #1
	ldr	r3, [fp, #-8]
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	add	r3, r3, #4
	mov	r0, r3
	bl	pthread_mutex_unlock
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	sema_wait, .-sema_wait
	.align	2
	.global	sema_signal
	.syntax unified
	.arm
	.fpu softvfp
	.type	sema_signal, %function
sema_signal:
	@ 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	r3, [fp, #-8]
	add	r3, r3, #4
	mov	r0, r3
	bl	pthread_mutex_lock
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r3, [fp, #-8]
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	add	r3, r3, #32
	mov	r0, r3
	bl	pthread_cond_signal
	ldr	r3, [fp, #-8]
	add	r3, r3, #4
	mov	r0, r3
	bl	pthread_mutex_unlock
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	sema_signal, .-sema_signal
	.align	2
	.global	get_item
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_item, %function
get_item:
	@ 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, .L8
	ldr	r3, [r3]
	ldr	r2, .L8+4
	ldr	r3, [r2, r3, lsl #2]
	str	r3, [fp, #-8]
	ldr	r3, .L8
	ldr	r3, [r3]
	add	r3, r3, #1
	rsbs	r2, r3, #0
	and	r3, r3, #3
	and	r2, r2, #3
	rsbpl	r3, r2, #0
	ldr	r2, .L8
	str	r3, [r2]
	ldr	r3, [fp, #-8]
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L9:
	.align	2
.L8:
	.word	out
	.word	buf
	.size	get_item, .-get_item
	.align	2
	.global	put_item
	.syntax unified
	.arm
	.fpu softvfp
	.type	put_item, %function
put_item:
	@ 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, .L11
	ldr	r3, [r3]
	ldr	r1, .L11+4
	ldr	r2, [fp, #-8]
	str	r2, [r1, r3, lsl #2]
	ldr	r3, .L11
	ldr	r3, [r3]
	add	r3, r3, #1
	rsbs	r2, r3, #0
	and	r3, r3, #3
	and	r2, r2, #3
	rsbpl	r3, r2, #0
	ldr	r2, .L11
	str	r3, [r2]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L12:
	.align	2
.L11:
	.word	in
	.word	buf
	.size	put_item, .-put_item
	.section	.rodata
	.align	2
.LC0:
	.ascii	"thread %d item:%d\012\000"
	.text
	.align	2
	.global	ring
	.syntax unified
	.arm
	.fpu softvfp
	.type	ring, %function
ring:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-24]
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L14
	ldr	r0, .L17
	bl	sema_wait
	ldr	r0, .L17+4
	bl	sema_wait
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-8]
	ldr	r0, [fp, #-8]
	bl	put_item
	ldr	r0, .L17+4
	bl	sema_signal
	ldr	r0, .L17+8
	bl	sema_signal
	ldr	r3, [fp, #-12]
	add	r1, r3, #1
	ldr	r3, .L17+12
	smull	r2, r3, r1, r3
	asr	r2, r3, #5
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	sub	r2, r1, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #4
	ldr	r2, .L17+16
	add	r3, r3, r2
	mov	r0, r3
	bl	sema_signal
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #4
	ldr	r2, .L17+16
	add	r3, r3, r2
	mov	r0, r3
	bl	sema_wait
	ldr	r0, .L17+8
	bl	sema_wait
	ldr	r0, .L17+4
	bl	sema_wait
	bl	get_item
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	ldr	r2, [fp, #-8]
	mov	r1, r3
	ldr	r0, .L17+20
	bl	printf
	ldr	r0, .L17+4
	bl	sema_signal
	ldr	r0, .L17
	bl	sema_signal
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #4
	ldr	r2, .L17+16
	add	r3, r3, r2
	mov	r0, r3
	bl	sema_signal
	b	.L15
.L14:
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #4
	ldr	r2, .L17+16
	add	r3, r3, r2
	mov	r0, r3
	bl	sema_wait
	ldr	r0, .L17+8
	bl	sema_wait
	ldr	r0, .L17+4
	bl	sema_wait
	bl	get_item
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	ldr	r2, [fp, #-8]
	mov	r1, r3
	ldr	r0, .L17+20
	bl	printf
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
	ldr	r0, [fp, #-8]
	bl	put_item
	ldr	r0, .L17+4
	bl	sema_signal
	ldr	r0, .L17+8
	bl	sema_signal
	ldr	r3, [fp, #-12]
	add	r1, r3, #1
	ldr	r3, .L17+12
	smull	r2, r3, r1, r3
	asr	r2, r3, #5
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	sub	r2, r1, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #4
	ldr	r2, .L17+16
	add	r3, r3, r2
	mov	r0, r3
	bl	sema_signal
.L15:
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L18:
	.align	2
.L17:
	.word	buf_empty
	.word	buf_mutex
	.word	buf_full
	.word	1374389535
	.word	mutexs
	.word	.LC0
	.size	ring, .-ring
	.section	.rodata
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 808
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #808
	ldr	r3, .L26
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r1, #1
	ldr	r0, .L26+4
	bl	sema_init
	mov	r1, #0
	ldr	r0, .L26+8
	bl	sema_init
	mov	r1, #3
	ldr	r0, .L26+12
	bl	sema_init
	mov	r3, #0
	str	r3, [fp, #-812]
	b	.L20
.L21:
	ldr	r2, [fp, #-812]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #4
	ldr	r2, .L26+16
	add	r3, r3, r2
	mov	r1, #0
	mov	r0, r3
	bl	sema_init
	ldr	r3, [fp, #-812]
	add	r3, r3, #1
	str	r3, [fp, #-812]
.L20:
	ldr	r3, [fp, #-812]
	cmp	r3, #99
	ble	.L21
	mov	r3, #0
	str	r3, [fp, #-812]
	b	.L22
.L23:
	ldr	r3, [fp, #-812]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [fp, #-812]
	str	r2, [r3, #-404]
	sub	r2, fp, #808
	ldr	r3, [fp, #-812]
	lsl	r3, r3, #2
	add	r0, r2, r3
	sub	r2, fp, #408
	ldr	r3, [fp, #-812]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, .L26+20
	mov	r1, #0
	bl	pthread_create
	ldr	r3, [fp, #-812]
	add	r3, r3, #1
	str	r3, [fp, #-812]
.L22:
	ldr	r3, [fp, #-812]
	cmp	r3, #99
	ble	.L23
	ldr	r3, [fp, #-808]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	mov	r3, #0
	ldr	r2, .L26
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L25
	bl	__stack_chk_fail
.L25:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L27:
	.align	2
.L26:
	.word	.LC1
	.word	buf_mutex
	.word	buf_full
	.word	buf_empty
	.word	mutexs
	.word	ring
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
