	.file	"369015.c"
	.intel_syntax noprefix
	.text
	.globl	wait
	.type	wait, @function
wait:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	nop
.L2:
	mov	rax, QWORD PTR -40[rbp]
	lea	rdx, 4[rax]
	mov	eax, 1
	xchg	al, BYTE PTR [rdx]
	test	al, al
	jne	.L2
	nop
.L3:
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -20[rbp], eax
	mov	eax, DWORD PTR -20[rbp]
	test	eax, eax
	jle	.L3
	mov	rax, QWORD PTR -40[rbp]
	lock sub	DWORD PTR [rax], 1
	mov	rax, QWORD PTR -40[rbp]
	add	rax, 4
	mov	edx, 0
	xchg	dl, BYTE PTR [rax]
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L5
	call	__stack_chk_fail@PLT
.L5:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	wait, .-wait
	.globl	signal
	.type	signal, @function
signal:
.LFB1:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	lock add	DWORD PTR [rax], 1
	mov	eax, 0
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	signal, .-signal
	.globl	init
	.type	init, @function
init:
.LFB2:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	DWORD PTR -44[rbp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR -16[rbp], rax
	mov	eax, DWORD PTR -44[rbp]
	mov	DWORD PTR -20[rbp], eax
	mov	eax, DWORD PTR -20[rbp]
	mov	edx, eax
	mov	rax, QWORD PTR -16[rbp]
	mov	DWORD PTR [rax], edx
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	init, .-init
	.globl	queue_mutex
	.bss
	.align 8
	.type	queue_mutex, @object
	.size	queue_mutex, 8
queue_mutex:
	.zero	8
	.globl	reader_mutex
	.type	reader_mutex, @object
	.size	reader_mutex, 1
reader_mutex:
	.zero	1
	.globl	writer_mutex
	.type	writer_mutex, @object
	.size	writer_mutex, 1
writer_mutex:
	.zero	1
	.globl	resource
	.data
	.align 4
	.type	resource, @object
	.size	resource, 4
resource:
	.long	1
	.globl	readers
	.bss
	.align 4
	.type	readers, @object
	.size	readers, 4
readers:
	.zero	4
	.section	.rodata
	.align 8
.LC0:
	.string	"Reader %d reads resource as %d\n"
	.text
	.globl	reader
	.type	reader, @function
reader:
.LFB3:
	.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
	lea	rdi, queue_mutex[rip]
	call	wait
	nop
.L12:
	mov	eax, 1
	xchg	al, BYTE PTR reader_mutex[rip]
	test	al, al
	jne	.L12
	mov	eax, DWORD PTR readers[rip]
	test	eax, eax
	jne	.L13
	nop
.L14:
	mov	eax, 1
	xchg	al, BYTE PTR writer_mutex[rip]
	test	al, al
	jne	.L14
.L13:
	mov	eax, DWORD PTR readers[rip]
	add	eax, 1
	mov	DWORD PTR readers[rip], eax
	lea	rdi, queue_mutex[rip]
	call	signal
	mov	eax, 0
	xchg	al, BYTE PTR reader_mutex[rip]
	mov	edx, DWORD PTR resource[rip]
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	nop
.L15:
	mov	eax, 1
	xchg	al, BYTE PTR reader_mutex[rip]
	test	al, al
	jne	.L15
	mov	eax, DWORD PTR readers[rip]
	sub	eax, 1
	mov	DWORD PTR readers[rip], eax
	mov	eax, DWORD PTR readers[rip]
	test	eax, eax
	jne	.L16
	mov	eax, 0
	xchg	al, BYTE PTR writer_mutex[rip]
.L16:
	mov	eax, 0
	xchg	al, BYTE PTR reader_mutex[rip]
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	reader, .-reader
	.section	.rodata
	.align 8
.LC2:
	.string	"Writer %d modifies resource as %d\n"
	.text
	.globl	writer
	.type	writer, @function
writer:
.LFB4:
	.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
	lea	rdi, queue_mutex[rip]
	call	wait
	nop
.L19:
	mov	eax, 1
	xchg	al, BYTE PTR writer_mutex[rip]
	test	al, al
	jne	.L19
	lea	rdi, queue_mutex[rip]
	call	signal
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, eax
	mov	rax, QWORD PTR .LC1[rip]
	movapd	xmm1, xmm0
	movq	xmm0, rax
	call	pow@PLT
	cvttsd2si	eax, xmm0
	mov	DWORD PTR resource[rip], eax
	mov	edx, DWORD PTR resource[rip]
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	xchg	al, BYTE PTR writer_mutex[rip]
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.size	writer, .-writer
	.globl	main
	.type	main, @function
main:
.LFB5:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 240
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	esi, 1
	lea	rdi, queue_mutex[rip]
	call	init
	mov	DWORD PTR -224[rbp], 1
	mov	DWORD PTR -220[rbp], 2
	mov	DWORD PTR -216[rbp], 3
	mov	DWORD PTR -212[rbp], 4
	mov	DWORD PTR -208[rbp], 5
	mov	DWORD PTR -204[rbp], 6
	mov	DWORD PTR -200[rbp], 7
	mov	DWORD PTR -196[rbp], 8
	mov	DWORD PTR -192[rbp], 9
	mov	DWORD PTR -188[rbp], 10
	mov	DWORD PTR -232[rbp], 0
	jmp	.L22
.L23:
	lea	rdx, -224[rbp]
	mov	eax, DWORD PTR -232[rbp]
	cdqe
	sal	rax, 2
	add	rdx, rax
	lea	rcx, -176[rbp]
	mov	eax, DWORD PTR -232[rbp]
	cdqe
	sal	rax, 3
	add	rax, rcx
	mov	rcx, rdx
	lea	rdx, reader[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	lea	rdx, -224[rbp]
	mov	eax, DWORD PTR -232[rbp]
	cdqe
	sal	rax, 2
	add	rdx, rax
	lea	rcx, -96[rbp]
	mov	eax, DWORD PTR -232[rbp]
	cdqe
	sal	rax, 3
	add	rax, rcx
	mov	rcx, rdx
	lea	rdx, writer[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	add	DWORD PTR -232[rbp], 1
.L22:
	cmp	DWORD PTR -232[rbp], 9
	jle	.L23
	mov	DWORD PTR -228[rbp], 0
	jmp	.L24
.L25:
	mov	eax, DWORD PTR -228[rbp]
	cdqe
	mov	rax, QWORD PTR -176[rbp+rax*8]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	mov	eax, DWORD PTR -228[rbp]
	cdqe
	mov	rax, QWORD PTR -96[rbp+rax*8]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	add	DWORD PTR -228[rbp], 1
.L24:
	cmp	DWORD PTR -228[rbp], 9
	jle	.L25
	mov	eax, 0
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L27
	call	__stack_chk_fail@PLT
.L27:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE5:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC1:
	.long	0
	.long	1073741824
	.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	"369015.c"
	.text
	.global	__sync_val_compare_and_swap_1
	.global	__sync_synchronize
	.global	__sync_fetch_and_sub_4
	.section	.rodata
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	wait
	.syntax unified
	.arm
	.fpu softvfp
	.type	wait, %function
wait:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #24
	str	r0, [fp, #-32]
	ldr	r3, .L7
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	nop
.L3:
	ldr	r3, [fp, #-32]
	add	r5, r3, #4
	ldrb	r3, [r5]
.L2:
	mov	r4, r3
	lsl	r3, r4, #24
	asr	r3, r3, #24
	mov	r2, #1
	mov	r1, r3
	mov	r0, r5
	bl	__sync_val_compare_and_swap_1
	mov	r3, r0
	and	r1, r3, #255
	and	r2, r4, #255
	cmp	r1, r2
	moveq	r2, #1
	movne	r2, #0
	cmp	r2, #0
	beq	.L2
	and	r3, r4, #255
	cmp	r3, #0
	bne	.L3
	nop
.L4:
	ldr	r3, [fp, #-32]
	str	r3, [fp, #-20]
	ldr	r4, [fp, #-20]
	bl	__sync_synchronize
	ldr	r4, [r4]
	bl	__sync_synchronize
	mov	r3, r4
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	ble	.L4
	ldr	r3, [fp, #-32]
	mov	r1, #1
	mov	r0, r3
	bl	__sync_fetch_and_sub_4
	ldr	r3, [fp, #-32]
	add	r4, r3, #4
	bl	__sync_synchronize
	mov	r3, #0
	strb	r3, [r4]
	bl	__sync_synchronize
	mov	r3, #0
	ldr	r2, .L7
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L6
	bl	__stack_chk_fail
.L6:
	mov	r0, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L8:
	.align	2
.L7:
	.word	.LC1
	.size	wait, .-wait
	.global	__sync_fetch_and_add_4
	.align	2
	.global	signal
	.syntax unified
	.arm
	.fpu softvfp
	.type	signal, %function
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]
	mov	r1, #1
	mov	r0, r3
	bl	__sync_fetch_and_add_4
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	signal, .-signal
	.section	.rodata
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	init
	.syntax unified
	.arm
	.fpu softvfp
	.type	init, %function
init:
	@ 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]
	str	r1, [fp, #-28]
	ldr	r3, .L14
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-24]
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-28]
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	mov	r2, r3
	ldr	r3, [fp, #-12]
	str	r2, [r3]
	mov	r3, #0
	ldr	r2, .L14
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L13
	bl	__stack_chk_fail
.L13:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L15:
	.align	2
.L14:
	.word	.LC2
	.size	init, .-init
	.comm	queue_mutex,8,4
	.global	reader_mutex
	.bss
	.align	2
	.type	reader_mutex, %object
	.size	reader_mutex, 1
reader_mutex:
	.space	1
	.global	writer_mutex
	.align	2
	.type	writer_mutex, %object
	.size	writer_mutex, 1
writer_mutex:
	.space	1
	.global	resource
	.data
	.align	2
	.type	resource, %object
	.size	resource, 4
resource:
	.word	1
	.global	readers
	.bss
	.align	2
	.type	readers, %object
	.size	readers, 4
readers:
	.space	4
	.section	.rodata
	.align	2
.LC3:
	.ascii	"Reader %d reads resource as %d\012\000"
	.text
	.align	2
	.global	reader
	.syntax unified
	.arm
	.fpu softvfp
	.type	reader, %function
reader:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #8
	str	r0, [fp, #-16]
	ldr	r0, .L26
	bl	wait
	nop
.L18:
	ldr	r5, .L26+4
	ldrb	r3, [r5]
.L17:
	mov	r4, r3
	lsl	r3, r4, #24
	asr	r3, r3, #24
	mov	r2, #1
	mov	r1, r3
	mov	r0, r5
	bl	__sync_val_compare_and_swap_1
	mov	r3, r0
	and	r1, r3, #255
	and	r2, r4, #255
	cmp	r1, r2
	moveq	r2, #1
	movne	r2, #0
	cmp	r2, #0
	beq	.L17
	and	r3, r4, #255
	cmp	r3, #0
	bne	.L18
	ldr	r3, .L26+8
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L19
	nop
.L21:
	ldr	r5, .L26+12
	ldrb	r3, [r5]
.L20:
	mov	r4, r3
	lsl	r3, r4, #24
	asr	r3, r3, #24
	mov	r2, #1
	mov	r1, r3
	mov	r0, r5
	bl	__sync_val_compare_and_swap_1
	mov	r3, r0
	and	r1, r3, #255
	and	r2, r4, #255
	cmp	r1, r2
	moveq	r2, #1
	movne	r2, #0
	cmp	r2, #0
	beq	.L20
	and	r3, r4, #255
	cmp	r3, #0
	bne	.L21
.L19:
	ldr	r3, .L26+8
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L26+8
	str	r3, [r2]
	ldr	r0, .L26
	bl	signal
	ldr	r4, .L26+4
	bl	__sync_synchronize
	mov	r3, #0
	strb	r3, [r4]
	bl	__sync_synchronize
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	ldr	r2, .L26+16
	ldr	r2, [r2]
	mov	r1, r3
	ldr	r0, .L26+20
	bl	printf
	nop
.L23:
	ldr	r5, .L26+4
	ldrb	r3, [r5]
.L22:
	mov	r4, r3
	lsl	r3, r4, #24
	asr	r3, r3, #24
	mov	r2, #1
	mov	r1, r3
	mov	r0, r5
	bl	__sync_val_compare_and_swap_1
	mov	r3, r0
	and	r1, r3, #255
	and	r2, r4, #255
	cmp	r1, r2
	moveq	r2, #1
	movne	r2, #0
	cmp	r2, #0
	beq	.L22
	and	r3, r4, #255
	cmp	r3, #0
	bne	.L23
	ldr	r3, .L26+8
	ldr	r3, [r3]
	sub	r3, r3, #1
	ldr	r2, .L26+8
	str	r3, [r2]
	ldr	r3, .L26+8
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L24
	ldr	r4, .L26+12
	bl	__sync_synchronize
	mov	r3, #0
	strb	r3, [r4]
	bl	__sync_synchronize
.L24:
	ldr	r4, .L26+4
	bl	__sync_synchronize
	mov	r3, #0
	strb	r3, [r4]
	bl	__sync_synchronize
	ldr	r3, [fp, #-16]
	mov	r0, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L27:
	.align	2
.L26:
	.word	queue_mutex
	.word	reader_mutex
	.word	readers
	.word	writer_mutex
	.word	resource
	.word	.LC3
	.size	reader, .-reader
	.global	__aeabi_i2d
	.global	__aeabi_d2iz
	.section	.rodata
	.align	2
.LC4:
	.ascii	"Writer %d modifies resource as %d\012\000"
	.text
	.align	2
	.global	writer
	.syntax unified
	.arm
	.fpu softvfp
	.type	writer, %function
writer:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #8
	str	r0, [fp, #-16]
	ldr	r0, .L32
	bl	wait
	nop
.L30:
	ldr	r5, .L32+4
	ldrb	r3, [r5]
.L29:
	mov	r4, r3
	lsl	r3, r4, #24
	asr	r3, r3, #24
	mov	r2, #1
	mov	r1, r3
	mov	r0, r5
	bl	__sync_val_compare_and_swap_1
	mov	r3, r0
	and	r1, r3, #255
	and	r2, r4, #255
	cmp	r1, r2
	moveq	r2, #1
	movne	r2, #0
	cmp	r2, #0
	beq	.L29
	and	r3, r4, #255
	cmp	r3, #0
	bne	.L30
	ldr	r0, .L32
	bl	signal
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r2, r0
	mov	r3, r1
	mov	r0, #0
	mov	r1, #1073741824
	bl	pow
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	__aeabi_d2iz
	mov	r3, r0
	ldr	r2, .L32+8
	str	r3, [r2]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	ldr	r2, .L32+8
	ldr	r2, [r2]
	mov	r1, r3
	ldr	r0, .L32+12
	bl	printf
	ldr	r4, .L32+4
	bl	__sync_synchronize
	mov	r3, #0
	strb	r3, [r4]
	bl	__sync_synchronize
	ldr	r3, [fp, #-16]
	mov	r0, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L33:
	.align	2
.L32:
	.word	queue_mutex
	.word	writer_mutex
	.word	resource
	.word	.LC4
	.size	writer, .-writer
	.section	.rodata
	.align	2
.LC0:
	.word	1
	.word	2
	.word	3
	.word	4
	.word	5
	.word	6
	.word	7
	.word	8
	.word	9
	.word	10
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 136
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #136
	ldr	r3, .L41
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r1, #1
	ldr	r0, .L41+4
	bl	init
	ldr	r3, .L41+8
	sub	ip, fp, #48
	mov	lr, r3
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldm	lr, {r0, r1}
	stm	ip, {r0, r1}
	mov	r3, #0
	str	r3, [fp, #-136]
	b	.L35
.L36:
	sub	r2, fp, #128
	ldr	r3, [fp, #-136]
	lsl	r3, r3, #2
	add	r0, r2, r3
	sub	r2, fp, #48
	ldr	r3, [fp, #-136]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, .L41+12
	mov	r1, #0
	bl	pthread_create
	sub	r2, fp, #88
	ldr	r3, [fp, #-136]
	lsl	r3, r3, #2
	add	r0, r2, r3
	sub	r2, fp, #48
	ldr	r3, [fp, #-136]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, .L41+16
	mov	r1, #0
	bl	pthread_create
	ldr	r3, [fp, #-136]
	add	r3, r3, #1
	str	r3, [fp, #-136]
.L35:
	ldr	r3, [fp, #-136]
	cmp	r3, #9
	ble	.L36
	mov	r3, #0
	str	r3, [fp, #-132]
	b	.L37
.L38:
	ldr	r3, [fp, #-132]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-124]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	ldr	r3, [fp, #-132]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-84]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	ldr	r3, [fp, #-132]
	add	r3, r3, #1
	str	r3, [fp, #-132]
.L37:
	ldr	r3, [fp, #-132]
	cmp	r3, #9
	ble	.L38
	mov	r3, #0
	ldr	r2, .L41
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L40
	bl	__stack_chk_fail
.L40:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L42:
	.align	2
.L41:
	.word	.LC5
	.word	queue_mutex
	.word	.LC0
	.word	reader
	.word	writer
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
