	.file	"59158.c"
	.intel_syntax noprefix
	.text
	.globl	queue
	.bss
	.align 32
	.type	queue, @object
	.size	queue, 1024
queue:
	.zero	1024
	.globl	mutex
	.align 32
	.type	mutex, @object
	.size	mutex, 40
mutex:
	.zero	40
	.globl	producer_cond
	.align 32
	.type	producer_cond, @object
	.size	producer_cond, 48
producer_cond:
	.zero	48
	.globl	consumer_cond
	.align 32
	.type	consumer_cond, @object
	.size	consumer_cond, 48
consumer_cond:
	.zero	48
	.globl	num_occupied
	.align 4
	.type	num_occupied, @object
	.size	num_occupied, 4
num_occupied:
	.zero	4
	.globl	read_index
	.align 4
	.type	read_index, @object
	.size	read_index, 4
read_index:
	.zero	4
	.globl	write_index
	.align 4
	.type	write_index, @object
	.size	write_index, 4
write_index:
	.zero	4
	.text
	.globl	random_int_in_range
	.type	random_int_in_range, @function
random_int_in_range:
.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	DWORD PTR -4[rbp], edi
	mov	DWORD PTR -8[rbp], esi
	mov	QWORD PTR -16[rbp], rdx
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	rand_r@PLT
	mov	edx, DWORD PTR -8[rbp]
	sub	edx, DWORD PTR -4[rbp]
	lea	ecx, 1[rdx]
	cdq
	idiv	ecx
	mov	eax, DWORD PTR -4[rbp]
	add	eax, edx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	random_int_in_range, .-random_int_in_range
	.section	.rodata
.LC0:
	.string	"%d + %d"
	.align 8
.LC1:
	.string	"Consumer[%d, %d]: %d + %d = %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
	push	rbx
	sub	rsp, 56
	.cfi_offset 3, -24
	mov	QWORD PTR -56[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	edi, 0
	call	time@PLT
	mov	ebx, eax
	call	pthread_self@PLT
	sal	rax, 16
	xor	eax, ebx
	mov	DWORD PTR -40[rbp], eax
	mov	DWORD PTR -28[rbp], 0
	jmp	.L4
.L7:
	lea	rdi, mutex[rip]
	call	pthread_mutex_lock@PLT
	jmp	.L5
.L6:
	lea	rsi, mutex[rip]
	lea	rdi, consumer_cond[rip]
	call	pthread_cond_wait@PLT
.L5:
	mov	eax, DWORD PTR num_occupied[rip]
	test	eax, eax
	jle	.L6
	mov	eax, DWORD PTR read_index[rip]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, queue[rip]
	mov	rax, QWORD PTR [rdx+rax]
	lea	rcx, -32[rbp]
	lea	rdx, -36[rbp]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_sscanf@PLT
	mov	edx, DWORD PTR -36[rbp]
	mov	eax, DWORD PTR -32[rbp]
	lea	edi, [rdx+rax]
	mov	esi, DWORD PTR -32[rbp]
	mov	ecx, DWORD PTR -36[rbp]
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR [rax]
	mov	edx, DWORD PTR -28[rbp]
	mov	r9d, edi
	mov	r8d, esi
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
	mov	eax, DWORD PTR read_index[rip]
	add	eax, 1
	cdq
	shr	edx, 25
	add	eax, edx
	and	eax, 127
	sub	eax, edx
	mov	DWORD PTR read_index[rip], eax
	mov	eax, DWORD PTR num_occupied[rip]
	sub	eax, 1
	mov	DWORD PTR num_occupied[rip], eax
	lea	rdi, producer_cond[rip]
	call	pthread_cond_signal@PLT
	lea	rdi, mutex[rip]
	call	pthread_mutex_unlock@PLT
	lea	rax, -40[rbp]
	mov	rdx, rax
	mov	esi, 500000
	mov	edi, 0
	call	random_int_in_range
	mov	edi, eax
	call	usleep@PLT
.L4:
	mov	eax, DWORD PTR -28[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -28[rbp], edx
	cmp	eax, 9
	jle	.L7
	mov	edi, 0
	call	pthread_exit@PLT
	.cfi_endproc
.LFE7:
	.size	consume, .-consume
	.section	.rodata
.LC2:
	.string	"Producer[%d, %d]: %s\n"
	.text
	.globl	produce
	.type	produce, @function
produce:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 56
	.cfi_offset 3, -24
	mov	QWORD PTR -56[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	edi, 0
	call	time@PLT
	mov	ebx, eax
	call	pthread_self@PLT
	sal	rax, 16
	xor	eax, ebx
	mov	DWORD PTR -40[rbp], eax
	mov	DWORD PTR -36[rbp], 0
	jmp	.L10
.L13:
	lea	rax, -40[rbp]
	mov	rdx, rax
	mov	esi, 9
	mov	edi, 0
	call	random_int_in_range
	mov	DWORD PTR -32[rbp], eax
	lea	rax, -40[rbp]
	mov	rdx, rax
	mov	esi, 9
	mov	edi, 0
	call	random_int_in_range
	mov	DWORD PTR -28[rbp], eax
	lea	rdi, mutex[rip]
	call	pthread_mutex_lock@PLT
	jmp	.L11
.L12:
	lea	rsi, mutex[rip]
	lea	rdi, producer_cond[rip]
	call	pthread_cond_wait@PLT
.L11:
	mov	eax, DWORD PTR num_occupied[rip]
	cmp	eax, 127
	jg	.L12
	mov	eax, DWORD PTR write_index[rip]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, queue[rip]
	mov	rax, QWORD PTR [rdx+rax]
	mov	ecx, DWORD PTR -28[rbp]
	mov	edx, DWORD PTR -32[rbp]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	mov	eax, DWORD PTR write_index[rip]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, queue[rip]
	mov	rcx, QWORD PTR [rdx+rax]
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR [rax]
	mov	edx, DWORD PTR -36[rbp]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
	mov	eax, DWORD PTR write_index[rip]
	add	eax, 1
	cdq
	shr	edx, 25
	add	eax, edx
	and	eax, 127
	sub	eax, edx
	mov	DWORD PTR write_index[rip], eax
	mov	eax, DWORD PTR num_occupied[rip]
	add	eax, 1
	mov	DWORD PTR num_occupied[rip], eax
	lea	rdi, consumer_cond[rip]
	call	pthread_cond_signal@PLT
	lea	rdi, mutex[rip]
	call	pthread_mutex_unlock@PLT
	lea	rax, -40[rbp]
	mov	rdx, rax
	mov	esi, 500000
	mov	edi, 0
	call	random_int_in_range
	mov	edi, eax
	call	usleep@PLT
.L10:
	mov	eax, DWORD PTR -36[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -36[rbp], edx
	cmp	eax, 9
	jle	.L13
	mov	edi, 0
	call	pthread_exit@PLT
	.cfi_endproc
.LFE8:
	.size	produce, .-produce
	.section	.rodata
	.align 8
.LC3:
	.string	"Error: Cannot create producer thread. %s.\n"
	.align 8
.LC4:
	.string	"Error: Cannot create consumer thread. %s.\n"
	.text
	.globl	main
	.type	main, @function
main:
.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, 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -32[rbp], 1
	mov	DWORD PTR -28[rbp], 2
	mov	DWORD PTR -24[rbp], 1
	mov	DWORD PTR -20[rbp], 2
	mov	DWORD PTR -60[rbp], 0
	jmp	.L16
.L17:
	mov	edi, 16
	call	malloc@PLT
	mov	rcx, rax
	mov	eax, DWORD PTR -60[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, queue[rip]
	mov	QWORD PTR [rdx+rax], rcx
	add	DWORD PTR -60[rbp], 1
.L16:
	cmp	DWORD PTR -60[rbp], 127
	jle	.L17
	lea	rdx, -32[rbp]
	lea	rax, -48[rbp]
	mov	rcx, rdx
	lea	rdx, produce[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	mov	DWORD PTR -52[rbp], eax
	cmp	DWORD PTR -52[rbp], 0
	je	.L18
	mov	eax, DWORD PTR -52[rbp]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 1
	jmp	.L25
.L18:
	lea	rax, -32[rbp]
	lea	rdx, 4[rax]
	lea	rax, -48[rbp]
	add	rax, 8
	mov	rcx, rdx
	lea	rdx, produce[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	mov	DWORD PTR -52[rbp], eax
	cmp	DWORD PTR -52[rbp], 0
	je	.L20
	mov	eax, DWORD PTR -52[rbp]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 1
	jmp	.L25
.L20:
	lea	rax, -32[rbp]
	lea	rdx, 8[rax]
	lea	rax, -48[rbp]
	add	rax, 16
	mov	rcx, rdx
	lea	rdx, consume[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	mov	DWORD PTR -52[rbp], eax
	cmp	DWORD PTR -52[rbp], 0
	je	.L21
	mov	eax, DWORD PTR -52[rbp]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 1
	jmp	.L25
.L21:
	lea	rax, -32[rbp]
	lea	rdx, 12[rax]
	lea	rax, -48[rbp]
	add	rax, 24
	mov	rcx, rdx
	lea	rdx, consume[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	mov	DWORD PTR -52[rbp], eax
	cmp	DWORD PTR -52[rbp], 0
	je	.L22
	mov	eax, DWORD PTR -52[rbp]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 1
	jmp	.L25
.L22:
	mov	DWORD PTR -56[rbp], 0
	jmp	.L23
.L24:
	mov	eax, DWORD PTR -56[rbp]
	cdqe
	mov	rax, QWORD PTR -48[rbp+rax*8]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	add	DWORD PTR -56[rbp], 1
.L23:
	cmp	DWORD PTR -56[rbp], 1
	jle	.L24
	mov	eax, 0
.L25:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L26
	call	__stack_chk_fail@PLT
.L26:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.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	"59158.c"
	.text
	.comm	queue,512,4
	.global	mutex
	.bss
	.align	2
	.type	mutex, %object
	.size	mutex, 24
mutex:
	.space	24
	.global	producer_cond
	.align	3
	.type	producer_cond, %object
	.size	producer_cond, 48
producer_cond:
	.space	48
	.global	consumer_cond
	.align	3
	.type	consumer_cond, %object
	.size	consumer_cond, 48
consumer_cond:
	.space	48
	.global	num_occupied
	.align	2
	.type	num_occupied, %object
	.size	num_occupied, 4
num_occupied:
	.space	4
	.global	read_index
	.align	2
	.type	read_index, %object
	.size	read_index, 4
read_index:
	.space	4
	.global	write_index
	.align	2
	.type	write_index, %object
	.size	write_index, 4
write_index:
	.space	4
	.global	__aeabi_idivmod
	.text
	.align	2
	.global	random_int_in_range
	.syntax unified
	.arm
	.fpu softvfp
	.type	random_int_in_range, %function
random_int_in_range:
	@ 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, #-8]
	str	r1, [fp, #-12]
	str	r2, [fp, #-16]
	ldr	r0, [fp, #-16]
	bl	rand_r
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-8]
	sub	r3, r2, r3
	add	r3, r3, #1
	mov	r1, r3
	bl	__aeabi_idivmod
	mov	r3, r1
	mov	r2, r3
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	random_int_in_range, .-random_int_in_range
	.section	.rodata
	.align	2
.LC1:
	.ascii	"%d + %d\000"
	.align	2
.LC2:
	.ascii	"Consumer[%d, %d]: %d + %d = %d\012\000"
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	consume
	.syntax unified
	.arm
	.fpu softvfp
	.type	consume, %function
consume:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #44
	str	r0, [fp, #-40]
	ldr	r3, .L9
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r0, #0
	bl	time
	mov	r4, r0
	bl	pthread_self
	mov	r3, r0
	lsl	r3, r3, #16
	eor	r3, r3, r4
	str	r3, [fp, #-32]
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L4
.L7:
	ldr	r0, .L9+4
	bl	pthread_mutex_lock
	b	.L5
.L6:
	ldr	r1, .L9+4
	ldr	r0, .L9+8
	bl	pthread_cond_wait
.L5:
	ldr	r3, .L9+12
	ldr	r3, [r3]
	cmp	r3, #0
	ble	.L6
	ldr	r3, .L9+16
	ldr	r3, [r3]
	ldr	r2, .L9+20
	ldr	r0, [r2, r3, lsl #2]
	sub	r3, fp, #24
	sub	r2, fp, #28
	ldr	r1, .L9+24
	bl	__isoc99_sscanf
	ldr	r3, [fp, #-40]
	ldr	r0, [r3]
	ldr	ip, [fp, #-28]
	ldr	r3, [fp, #-24]
	ldr	r1, [fp, #-28]
	ldr	r2, [fp, #-24]
	add	r2, r1, r2
	str	r2, [sp, #4]
	str	r3, [sp]
	mov	r3, ip
	ldr	r2, [fp, #-20]
	mov	r1, r0
	ldr	r0, .L9+28
	bl	printf
	ldr	r3, .L9+32
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	ldr	r3, .L9+16
	ldr	r3, [r3]
	add	r3, r3, #1
	rsbs	r2, r3, #0
	and	r3, r3, #127
	and	r2, r2, #127
	rsbpl	r3, r2, #0
	ldr	r2, .L9+16
	str	r3, [r2]
	ldr	r3, .L9+12
	ldr	r3, [r3]
	sub	r3, r3, #1
	ldr	r2, .L9+12
	str	r3, [r2]
	ldr	r0, .L9+36
	bl	pthread_cond_signal
	ldr	r0, .L9+4
	bl	pthread_mutex_unlock
	sub	r3, fp, #32
	mov	r2, r3
	ldr	r1, .L9+40
	mov	r0, #0
	bl	random_int_in_range
	mov	r3, r0
	mov	r0, r3
	bl	usleep
.L4:
	ldr	r3, [fp, #-20]
	add	r2, r3, #1
	str	r2, [fp, #-20]
	cmp	r3, #9
	ble	.L7
	mov	r0, #0
	bl	pthread_exit
.L10:
	.align	2
.L9:
	.word	.LC3
	.word	mutex
	.word	consumer_cond
	.word	num_occupied
	.word	read_index
	.word	queue
	.word	.LC1
	.word	.LC2
	.word	stdout
	.word	producer_cond
	.word	500000
	.size	consume, .-consume
	.section	.rodata
	.align	2
.LC4:
	.ascii	"Producer[%d, %d]: %s\012\000"
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	produce
	.syntax unified
	.arm
	.fpu softvfp
	.type	produce, %function
produce:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #36
	str	r0, [fp, #-40]
	ldr	r3, .L17
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r0, #0
	bl	time
	mov	r4, r0
	bl	pthread_self
	mov	r3, r0
	lsl	r3, r3, #16
	eor	r3, r3, r4
	str	r3, [fp, #-32]
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L12
.L15:
	sub	r3, fp, #32
	mov	r2, r3
	mov	r1, #9
	mov	r0, #0
	bl	random_int_in_range
	str	r0, [fp, #-24]
	sub	r3, fp, #32
	mov	r2, r3
	mov	r1, #9
	mov	r0, #0
	bl	random_int_in_range
	str	r0, [fp, #-20]
	ldr	r0, .L17+4
	bl	pthread_mutex_lock
	b	.L13
.L14:
	ldr	r1, .L17+4
	ldr	r0, .L17+8
	bl	pthread_cond_wait
.L13:
	ldr	r3, .L17+12
	ldr	r3, [r3]
	cmp	r3, #127
	bgt	.L14
	ldr	r3, .L17+16
	ldr	r3, [r3]
	ldr	r2, .L17+20
	ldr	r0, [r2, r3, lsl #2]
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-24]
	ldr	r1, .L17+24
	bl	sprintf
	ldr	r3, [fp, #-40]
	ldr	r1, [r3]
	ldr	r3, .L17+16
	ldr	r3, [r3]
	ldr	r2, .L17+20
	ldr	r3, [r2, r3, lsl #2]
	ldr	r2, [fp, #-28]
	ldr	r0, .L17+28
	bl	printf
	ldr	r3, .L17+32
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	ldr	r3, .L17+16
	ldr	r3, [r3]
	add	r3, r3, #1
	rsbs	r2, r3, #0
	and	r3, r3, #127
	and	r2, r2, #127
	rsbpl	r3, r2, #0
	ldr	r2, .L17+16
	str	r3, [r2]
	ldr	r3, .L17+12
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L17+12
	str	r3, [r2]
	ldr	r0, .L17+36
	bl	pthread_cond_signal
	ldr	r0, .L17+4
	bl	pthread_mutex_unlock
	sub	r3, fp, #32
	mov	r2, r3
	ldr	r1, .L17+40
	mov	r0, #0
	bl	random_int_in_range
	mov	r3, r0
	mov	r0, r3
	bl	usleep
.L12:
	ldr	r3, [fp, #-28]
	add	r2, r3, #1
	str	r2, [fp, #-28]
	cmp	r3, #9
	ble	.L15
	mov	r0, #0
	bl	pthread_exit
.L18:
	.align	2
.L17:
	.word	.LC5
	.word	mutex
	.word	producer_cond
	.word	num_occupied
	.word	write_index
	.word	queue
	.word	.LC1
	.word	.LC4
	.word	stdout
	.word	consumer_cond
	.word	500000
	.size	produce, .-produce
	.section	.rodata
	.align	2
.LC6:
	.ascii	"Error: Cannot create producer thread. %s.\012\000"
	.align	2
.LC7:
	.ascii	"Error: Cannot create consumer thread. %s.\012\000"
	.align	2
.LC0:
	.word	1
	.word	2
	.word	1
	.word	2
	.align	2
.LC8:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #44
	ldr	r3, .L31
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r3, .L31+4
	sub	ip, fp, #32
	ldm	r3, {r0, r1, r2, r3}
	stm	ip, {r0, r1, r2, r3}
	mov	r3, #0
	str	r3, [fp, #-52]
	b	.L20
.L21:
	mov	r0, #16
	bl	malloc
	mov	r3, r0
	mov	r1, r3
	ldr	r2, .L31+8
	ldr	r3, [fp, #-52]
	str	r1, [r2, r3, lsl #2]
	ldr	r3, [fp, #-52]
	add	r3, r3, #1
	str	r3, [fp, #-52]
.L20:
	ldr	r3, [fp, #-52]
	cmp	r3, #127
	ble	.L21
	sub	r3, fp, #32
	sub	r0, fp, #40
	ldr	r2, .L31+12
	mov	r1, #0
	bl	pthread_create
	str	r0, [fp, #-44]
	ldr	r3, [fp, #-44]
	cmp	r3, #0
	beq	.L22
	ldr	r3, .L31+16
	ldr	r4, [r3]
	ldr	r0, [fp, #-44]
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L31+20
	mov	r0, r4
	bl	fprintf
	mov	r3, #1
	b	.L29
.L22:
	sub	r3, fp, #32
	add	r2, r3, #4
	sub	r3, fp, #40
	add	r0, r3, #4
	mov	r3, r2
	ldr	r2, .L31+12
	mov	r1, #0
	bl	pthread_create
	str	r0, [fp, #-44]
	ldr	r3, [fp, #-44]
	cmp	r3, #0
	beq	.L24
	ldr	r3, .L31+16
	ldr	r4, [r3]
	ldr	r0, [fp, #-44]
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L31+20
	mov	r0, r4
	bl	fprintf
	mov	r3, #1
	b	.L29
.L24:
	sub	r3, fp, #32
	add	r2, r3, #8
	sub	r3, fp, #40
	add	r0, r3, #8
	mov	r3, r2
	ldr	r2, .L31+24
	mov	r1, #0
	bl	pthread_create
	str	r0, [fp, #-44]
	ldr	r3, [fp, #-44]
	cmp	r3, #0
	beq	.L25
	ldr	r3, .L31+16
	ldr	r4, [r3]
	ldr	r0, [fp, #-44]
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L31+28
	mov	r0, r4
	bl	fprintf
	mov	r3, #1
	b	.L29
.L25:
	sub	r3, fp, #32
	add	r2, r3, #12
	sub	r3, fp, #40
	add	r0, r3, #12
	mov	r3, r2
	ldr	r2, .L31+24
	mov	r1, #0
	bl	pthread_create
	str	r0, [fp, #-44]
	ldr	r3, [fp, #-44]
	cmp	r3, #0
	beq	.L26
	ldr	r3, .L31+16
	ldr	r4, [r3]
	ldr	r0, [fp, #-44]
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L31+28
	mov	r0, r4
	bl	fprintf
	mov	r3, #1
	b	.L29
.L26:
	mov	r3, #0
	str	r3, [fp, #-48]
	b	.L27
.L28:
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #2
	sub	r2, fp, #12
	add	r3, r2, r3
	ldr	r3, [r3, #-28]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	ldr	r3, [fp, #-48]
	add	r3, r3, #1
	str	r3, [fp, #-48]
.L27:
	ldr	r3, [fp, #-48]
	cmp	r3, #1
	ble	.L28
	mov	r3, #0
.L29:
	ldr	r2, .L31
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L30
	bl	__stack_chk_fail
.L30:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L32:
	.align	2
.L31:
	.word	.LC8
	.word	.LC0
	.word	queue
	.word	produce
	.word	stderr
	.word	.LC6
	.word	consume
	.word	.LC7
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
