	.file	"951275.c"
	.intel_syntax noprefix
	.text
	.data
	.align 4
	.type	iTThreads, @object
	.size	iTThreads, 4
iTThreads:
	.long	2
	.align 4
	.type	iRThreads, @object
	.size	iRThreads, 4
iRThreads:
	.long	1
	.local	data1Value
	.comm	data1Value,4,4
	.local	data2Value
	.comm	data2Value,4,4
	.globl	data1Lock
	.bss
	.align 8
	.type	data1Lock, @object
	.size	data1Lock, 8
data1Lock:
	.zero	8
	.globl	data2Lock
	.align 8
	.type	data2Lock, @object
	.size	data2Lock, 8
data2Lock:
	.zero	8
	.text
	.globl	funcA
	.type	funcA, @function
funcA:
.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	rax, QWORD PTR data1Lock[rip]
	mov	rdi, rax
	call	pthread_mutex_lock@PLT
	mov	DWORD PTR data1Value[rip], 1
	mov	rax, QWORD PTR data1Lock[rip]
	mov	rdi, rax
	call	pthread_mutex_unlock@PLT
	mov	rax, QWORD PTR data2Lock[rip]
	mov	rdi, rax
	call	pthread_mutex_lock@PLT
	mov	eax, DWORD PTR data1Value[rip]
	add	eax, 1
	mov	DWORD PTR data2Value[rip], eax
	mov	rax, QWORD PTR data2Lock[rip]
	mov	rdi, rax
	call	pthread_mutex_unlock@PLT
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	funcA, .-funcA
	.section	.rodata
.LC0:
	.string	"Bug found!\n"
	.text
	.globl	funcB
	.type	funcB, @function
funcB:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -8[rbp], -1
	mov	DWORD PTR -4[rbp], -1
	mov	rax, QWORD PTR data1Lock[rip]
	mov	rdi, rax
	call	pthread_mutex_lock@PLT
	mov	eax, DWORD PTR data1Value[rip]
	test	eax, eax
	jne	.L4
	mov	rax, QWORD PTR data1Lock[rip]
	mov	rdi, rax
	call	pthread_mutex_unlock@PLT
	mov	eax, 0
	jmp	.L5
.L4:
	mov	eax, DWORD PTR data1Value[rip]
	mov	DWORD PTR -8[rbp], eax
	mov	rax, QWORD PTR data1Lock[rip]
	mov	rdi, rax
	call	pthread_mutex_unlock@PLT
	mov	rax, QWORD PTR data2Lock[rip]
	mov	rdi, rax
	call	pthread_mutex_lock@PLT
	mov	eax, DWORD PTR data2Value[rip]
	mov	DWORD PTR -4[rbp], eax
	mov	rax, QWORD PTR data2Lock[rip]
	mov	rdi, rax
	call	pthread_mutex_unlock@PLT
	mov	eax, DWORD PTR -8[rbp]
	add	eax, 1
	cmp	DWORD PTR -4[rbp], eax
	je	.L6
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 11
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
.L7:
	mov	eax, 0
	call	__VERIFIER_error@PLT
.L6:
	mov	eax, 0
.L5:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	funcB, .-funcB
	.section	.rodata
.LC1:
	.string	"./twostage <param1> <param2>\n"
.LC2:
	.string	"%d"
.LC3:
	.string	"pthread_mutex_init error: %d\n"
	.align 8
.LC4:
	.string	"Error [%d] found creating 2stage thread.\n"
	.align 8
.LC5:
	.string	"Error [%d] found creating read thread.\n"
.LC6:
	.string	"pthread join error: %d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	push	r14
	push	r13
	push	r12
	push	rbx
	sub	rsp, 104
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	mov	DWORD PTR -100[rbp], edi
	mov	QWORD PTR -112[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	mov	rax, rsp
	mov	rbx, rax
	cmp	DWORD PTR -100[rbp], 1
	je	.L9
	cmp	DWORD PTR -100[rbp], 3
	je	.L10
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 29
	mov	esi, 1
	lea	rdi, .LC1[rip]
	call	fwrite@PLT
	mov	edi, -1
	call	exit@PLT
.L10:
	mov	rax, QWORD PTR -112[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rdx, iTThreads[rip]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_sscanf@PLT
	mov	rax, QWORD PTR -112[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	lea	rdx, iRThreads[rip]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_sscanf@PLT
.L9:
	mov	edi, 40
	call	malloc@PLT
	mov	QWORD PTR data1Lock[rip], rax
	mov	edi, 40
	call	malloc@PLT
	mov	QWORD PTR data2Lock[rip], rax
	mov	rax, QWORD PTR data1Lock[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_mutex_init@PLT
	mov	DWORD PTR -92[rbp], eax
	cmp	DWORD PTR -92[rbp], 0
	je	.L11
	mov	rax, QWORD PTR stderr[rip]
	mov	edx, DWORD PTR -92[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, -1
	call	exit@PLT
.L11:
	mov	rax, QWORD PTR data2Lock[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_mutex_init@PLT
	mov	DWORD PTR -92[rbp], eax
	cmp	DWORD PTR -92[rbp], 0
	je	.L12
	mov	rax, QWORD PTR stderr[rip]
	mov	edx, DWORD PTR -92[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, -1
	call	exit@PLT
.L12:
	mov	eax, DWORD PTR iTThreads[rip]
	movsx	rdx, eax
	sub	rdx, 1
	mov	QWORD PTR -88[rbp], rdx
	movsx	rdx, eax
	mov	QWORD PTR -128[rbp], rdx
	mov	QWORD PTR -120[rbp], 0
	movsx	rdx, eax
	mov	QWORD PTR -144[rbp], rdx
	mov	QWORD PTR -136[rbp], 0
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	eax, 16
	sub	rax, 1
	add	rax, rdx
	mov	ecx, 16
	mov	edx, 0
	div	rcx
	imul	rax, rax, 16
	mov	rcx, rax
	and	rcx, -4096
	mov	rdx, rsp
	sub	rdx, rcx
.L13:
	cmp	rsp, rdx
	je	.L14
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	jmp	.L13
.L14:
	mov	rdx, rax
	and	edx, 4095
	sub	rsp, rdx
	mov	rdx, rax
	and	edx, 4095
	test	rdx, rdx
	je	.L15
	and	eax, 4095
	sub	rax, 8
	add	rax, rsp
	or	QWORD PTR [rax], 0
.L15:
	mov	rax, rsp
	add	rax, 7
	shr	rax, 3
	sal	rax, 3
	mov	QWORD PTR -80[rbp], rax
	mov	eax, DWORD PTR iRThreads[rip]
	movsx	rdx, eax
	sub	rdx, 1
	mov	QWORD PTR -72[rbp], rdx
	movsx	rdx, eax
	mov	r14, rdx
	mov	r15d, 0
	movsx	rdx, eax
	mov	r12, rdx
	mov	r13d, 0
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	eax, 16
	sub	rax, 1
	add	rax, rdx
	mov	ecx, 16
	mov	edx, 0
	div	rcx
	imul	rax, rax, 16
	mov	rcx, rax
	and	rcx, -4096
	mov	rdx, rsp
	sub	rdx, rcx
.L16:
	cmp	rsp, rdx
	je	.L17
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	jmp	.L16
.L17:
	mov	rdx, rax
	and	edx, 4095
	sub	rsp, rdx
	mov	rdx, rax
	and	edx, 4095
	test	rdx, rdx
	je	.L18
	and	eax, 4095
	sub	rax, 8
	add	rax, rsp
	or	QWORD PTR [rax], 0
.L18:
	mov	rax, rsp
	add	rax, 7
	shr	rax, 3
	sal	rax, 3
	mov	QWORD PTR -64[rbp], rax
	mov	DWORD PTR -96[rbp], 0
	jmp	.L19
.L21:
	mov	eax, DWORD PTR -96[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -80[rbp]
	add	rax, rdx
	mov	ecx, 0
	lea	rdx, funcA[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	mov	DWORD PTR -92[rbp], eax
	cmp	DWORD PTR -92[rbp], 0
	je	.L20
	mov	rax, QWORD PTR stderr[rip]
	mov	edx, DWORD PTR -92[rbp]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, -1
	call	exit@PLT
.L20:
	add	DWORD PTR -96[rbp], 1
.L19:
	mov	eax, DWORD PTR iTThreads[rip]
	cmp	DWORD PTR -96[rbp], eax
	jl	.L21
	mov	DWORD PTR -96[rbp], 0
	jmp	.L22
.L24:
	mov	eax, DWORD PTR -96[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -64[rbp]
	add	rax, rdx
	mov	ecx, 0
	lea	rdx, funcB[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	mov	DWORD PTR -92[rbp], eax
	cmp	DWORD PTR -92[rbp], 0
	je	.L23
	mov	rax, QWORD PTR stderr[rip]
	mov	edx, DWORD PTR -92[rbp]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, -1
	call	exit@PLT
.L23:
	add	DWORD PTR -96[rbp], 1
.L22:
	mov	eax, DWORD PTR iRThreads[rip]
	cmp	DWORD PTR -96[rbp], eax
	jl	.L24
	mov	DWORD PTR -96[rbp], 0
	jmp	.L25
.L27:
	mov	rax, QWORD PTR -80[rbp]
	mov	edx, DWORD PTR -96[rbp]
	movsx	rdx, edx
	mov	rax, QWORD PTR [rax+rdx*8]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	mov	DWORD PTR -92[rbp], eax
	cmp	DWORD PTR -92[rbp], 0
	je	.L26
	mov	rax, QWORD PTR stderr[rip]
	mov	edx, DWORD PTR -92[rbp]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, -1
	call	exit@PLT
.L26:
	add	DWORD PTR -96[rbp], 1
.L25:
	mov	eax, DWORD PTR iTThreads[rip]
	cmp	DWORD PTR -96[rbp], eax
	jl	.L27
	mov	DWORD PTR -96[rbp], 0
	jmp	.L28
.L30:
	mov	rax, QWORD PTR -64[rbp]
	mov	edx, DWORD PTR -96[rbp]
	movsx	rdx, edx
	mov	rax, QWORD PTR [rax+rdx*8]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	mov	DWORD PTR -92[rbp], eax
	cmp	DWORD PTR -92[rbp], 0
	je	.L29
	mov	rax, QWORD PTR stderr[rip]
	mov	edx, DWORD PTR -92[rbp]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, -1
	call	exit@PLT
.L29:
	add	DWORD PTR -96[rbp], 1
.L28:
	mov	eax, DWORD PTR iRThreads[rip]
	cmp	DWORD PTR -96[rbp], eax
	jl	.L30
	mov	eax, 0
	mov	rsp, rbx
	mov	rbx, QWORD PTR -56[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L32
	call	__stack_chk_fail@PLT
.L32:
	lea	rsp, -40[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC7:
	.string	"Got error %d from pthread_mutex_lock.\n"
	.text
	.globl	lock
	.type	lock, @function
lock:
.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	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	pthread_mutex_lock@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	je	.L35
	mov	rax, QWORD PTR stderr[rip]
	mov	edx, DWORD PTR -4[rbp]
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, -1
	call	exit@PLT
.L35:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	lock, .-lock
	.section	.rodata
	.align 8
.LC8:
	.string	"Got error %d from pthread_mutex_unlock.\n"
	.text
	.globl	unlock
	.type	unlock, @function
unlock:
.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	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	pthread_mutex_unlock@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	je	.L38
	mov	rax, QWORD PTR stderr[rip]
	mov	edx, DWORD PTR -4[rbp]
	lea	rsi, .LC8[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, -1
	call	exit@PLT
.L38:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	unlock, .-unlock
	.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	"951275.c"
	.text
	.data
	.align	2
	.type	iTThreads, %object
	.size	iTThreads, 4
iTThreads:
	.word	2
	.align	2
	.type	iRThreads, %object
	.size	iRThreads, 4
iRThreads:
	.word	1
	.local	data1Value
	.comm	data1Value,4,4
	.local	data2Value
	.comm	data2Value,4,4
	.comm	data1Lock,4,4
	.comm	data2Lock,4,4
	.text
	.align	2
	.global	funcA
	.syntax unified
	.arm
	.fpu softvfp
	.type	funcA, %function
funcA:
	@ 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, .L3
	ldr	r3, [r3]
	mov	r0, r3
	bl	pthread_mutex_lock
	ldr	r3, .L3+4
	mov	r2, #1
	str	r2, [r3]
	ldr	r3, .L3
	ldr	r3, [r3]
	mov	r0, r3
	bl	pthread_mutex_unlock
	ldr	r3, .L3+8
	ldr	r3, [r3]
	mov	r0, r3
	bl	pthread_mutex_lock
	ldr	r3, .L3+4
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L3+12
	str	r3, [r2]
	ldr	r3, .L3+8
	ldr	r3, [r3]
	mov	r0, r3
	bl	pthread_mutex_unlock
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L4:
	.align	2
.L3:
	.word	data1Lock
	.word	data1Value
	.word	data2Lock
	.word	data2Value
	.size	funcA, .-funcA
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Bug found!\012\000"
	.text
	.align	2
	.global	funcB
	.syntax unified
	.arm
	.fpu softvfp
	.type	funcB, %function
funcB:
	@ 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]
	mvn	r3, #0
	str	r3, [fp, #-12]
	mvn	r3, #0
	str	r3, [fp, #-8]
	ldr	r3, .L10
	ldr	r3, [r3]
	mov	r0, r3
	bl	pthread_mutex_lock
	ldr	r3, .L10+4
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L6
	ldr	r3, .L10
	ldr	r3, [r3]
	mov	r0, r3
	bl	pthread_mutex_unlock
	mov	r3, #0
	b	.L7
.L6:
	ldr	r3, .L10+4
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	ldr	r3, .L10
	ldr	r3, [r3]
	mov	r0, r3
	bl	pthread_mutex_unlock
	ldr	r3, .L10+8
	ldr	r3, [r3]
	mov	r0, r3
	bl	pthread_mutex_lock
	ldr	r3, .L10+12
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	ldr	r3, .L10+8
	ldr	r3, [r3]
	mov	r0, r3
	bl	pthread_mutex_unlock
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	beq	.L8
	ldr	r3, .L10+16
	ldr	r3, [r3]
	mov	r2, #11
	mov	r1, #1
	ldr	r0, .L10+20
	bl	fwrite
.L9:
	bl	__VERIFIER_error
.L8:
	mov	r3, #0
.L7:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L11:
	.align	2
.L10:
	.word	data1Lock
	.word	data1Value
	.word	data2Lock
	.word	data2Value
	.word	stderr
	.word	.LC0
	.size	funcB, .-funcB
	.section	.rodata
	.align	2
.LC1:
	.ascii	"./twostage <param1> <param2>\012\000"
	.align	2
.LC2:
	.ascii	"%d\000"
	.align	2
.LC3:
	.ascii	"pthread_mutex_init error: %d\012\000"
	.align	2
.LC4:
	.ascii	"Error [%d] found creating 2stage thread.\012\000"
	.align	2
.LC5:
	.ascii	"Error [%d] found creating read thread.\012\000"
	.align	2
.LC6:
	.ascii	"pthread join error: %d\012\000"
	.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 = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #44
	str	r0, [fp, #-48]
	str	r1, [fp, #-52]
	ldr	r3, .L31
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, sp
	mov	r4, r3
	ldr	r3, [fp, #-48]
	cmp	r3, #1
	beq	.L13
	ldr	r3, [fp, #-48]
	cmp	r3, #3
	beq	.L14
	ldr	r3, .L31+4
	ldr	r3, [r3]
	mov	r2, #29
	mov	r1, #1
	ldr	r0, .L31+8
	bl	fwrite
	mvn	r0, #0
	bl	exit
.L14:
	ldr	r3, [fp, #-52]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r2, .L31+12
	ldr	r1, .L31+16
	mov	r0, r3
	bl	__isoc99_sscanf
	ldr	r3, [fp, #-52]
	add	r3, r3, #8
	ldr	r3, [r3]
	ldr	r2, .L31+20
	ldr	r1, .L31+16
	mov	r0, r3
	bl	__isoc99_sscanf
.L13:
	mov	r0, #24
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L31+24
	str	r2, [r3]
	mov	r0, #24
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L31+28
	str	r2, [r3]
	ldr	r3, .L31+24
	ldr	r3, [r3]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_mutex_init
	str	r0, [fp, #-36]
	ldr	r3, [fp, #-36]
	cmp	r3, #0
	beq	.L15
	ldr	r3, .L31+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-36]
	ldr	r1, .L31+32
	mov	r0, r3
	bl	fprintf
	mvn	r0, #0
	bl	exit
.L15:
	ldr	r3, .L31+28
	ldr	r3, [r3]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_mutex_init
	str	r0, [fp, #-36]
	ldr	r3, [fp, #-36]
	cmp	r3, #0
	beq	.L16
	ldr	r3, .L31+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-36]
	ldr	r1, .L31+32
	mov	r0, r3
	bl	fprintf
	mvn	r0, #0
	bl	exit
.L16:
	ldr	r3, .L31+12
	ldr	ip, [r3]
	sub	r3, ip, #1
	str	r3, [fp, #-32]
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #5
	orr	r3, r3, r0, lsr #27
	lsl	r2, r0, #5
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #5
	orr	r3, r3, r0, lsr #27
	lsl	r2, r0, #5
	mov	r3, ip
	lsl	r3, r3, #2
	add	r3, r3, #7
	lsr	r3, r3, #3
	lsl	r3, r3, #3
	sub	sp, sp, r3
	mov	r3, sp
	add	r3, r3, #3
	lsr	r3, r3, #2
	lsl	r3, r3, #2
	str	r3, [fp, #-28]
	ldr	r3, .L31+20
	ldr	ip, [r3]
	sub	r3, ip, #1
	str	r3, [fp, #-24]
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #5
	orr	r3, r3, r0, lsr #27
	lsl	r2, r0, #5
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #5
	orr	r3, r3, r0, lsr #27
	lsl	r2, r0, #5
	mov	r3, ip
	lsl	r3, r3, #2
	add	r3, r3, #7
	lsr	r3, r3, #3
	lsl	r3, r3, #3
	sub	sp, sp, r3
	mov	r3, sp
	add	r3, r3, #3
	lsr	r3, r3, #2
	lsl	r3, r3, #2
	str	r3, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-40]
	b	.L17
.L19:
	ldr	r3, [fp, #-40]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-28]
	add	r0, r2, r3
	mov	r3, #0
	ldr	r2, .L31+36
	mov	r1, #0
	bl	pthread_create
	str	r0, [fp, #-36]
	ldr	r3, [fp, #-36]
	cmp	r3, #0
	beq	.L18
	ldr	r3, .L31+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-36]
	ldr	r1, .L31+40
	mov	r0, r3
	bl	fprintf
	mvn	r0, #0
	bl	exit
.L18:
	ldr	r3, [fp, #-40]
	add	r3, r3, #1
	str	r3, [fp, #-40]
.L17:
	ldr	r3, .L31+12
	ldr	r3, [r3]
	ldr	r2, [fp, #-40]
	cmp	r2, r3
	blt	.L19
	mov	r3, #0
	str	r3, [fp, #-40]
	b	.L20
.L22:
	ldr	r3, [fp, #-40]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r0, r2, r3
	mov	r3, #0
	ldr	r2, .L31+44
	mov	r1, #0
	bl	pthread_create
	str	r0, [fp, #-36]
	ldr	r3, [fp, #-36]
	cmp	r3, #0
	beq	.L21
	ldr	r3, .L31+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-36]
	ldr	r1, .L31+48
	mov	r0, r3
	bl	fprintf
	mvn	r0, #0
	bl	exit
.L21:
	ldr	r3, [fp, #-40]
	add	r3, r3, #1
	str	r3, [fp, #-40]
.L20:
	ldr	r3, .L31+20
	ldr	r3, [r3]
	ldr	r2, [fp, #-40]
	cmp	r2, r3
	blt	.L22
	mov	r3, #0
	str	r3, [fp, #-40]
	b	.L23
.L25:
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-40]
	ldr	r3, [r3, r2, lsl #2]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	str	r0, [fp, #-36]
	ldr	r3, [fp, #-36]
	cmp	r3, #0
	beq	.L24
	ldr	r3, .L31+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-36]
	ldr	r1, .L31+52
	mov	r0, r3
	bl	fprintf
	mvn	r0, #0
	bl	exit
.L24:
	ldr	r3, [fp, #-40]
	add	r3, r3, #1
	str	r3, [fp, #-40]
.L23:
	ldr	r3, .L31+12
	ldr	r3, [r3]
	ldr	r2, [fp, #-40]
	cmp	r2, r3
	blt	.L25
	mov	r3, #0
	str	r3, [fp, #-40]
	b	.L26
.L28:
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-40]
	ldr	r3, [r3, r2, lsl #2]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	str	r0, [fp, #-36]
	ldr	r3, [fp, #-36]
	cmp	r3, #0
	beq	.L27
	ldr	r3, .L31+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-36]
	ldr	r1, .L31+52
	mov	r0, r3
	bl	fprintf
	mvn	r0, #0
	bl	exit
.L27:
	ldr	r3, [fp, #-40]
	add	r3, r3, #1
	str	r3, [fp, #-40]
.L26:
	ldr	r3, .L31+20
	ldr	r3, [r3]
	ldr	r2, [fp, #-40]
	cmp	r2, r3
	blt	.L28
	mov	r3, #0
	mov	sp, r4
	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	.LC7
	.word	stderr
	.word	.LC1
	.word	iTThreads
	.word	.LC2
	.word	iRThreads
	.word	data1Lock
	.word	data2Lock
	.word	.LC3
	.word	funcA
	.word	.LC4
	.word	funcB
	.word	.LC5
	.word	.LC6
	.size	main, .-main
	.section	.rodata
	.align	2
.LC8:
	.ascii	"Got error %d from pthread_mutex_lock.\012\000"
	.text
	.align	2
	.global	lock
	.syntax unified
	.arm
	.fpu softvfp
	.type	lock, %function
lock:
	@ 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]
	ldr	r0, [fp, #-16]
	bl	pthread_mutex_lock
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L35
	ldr	r3, .L36
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	ldr	r1, .L36+4
	mov	r0, r3
	bl	fprintf
	mvn	r0, #0
	bl	exit
.L35:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L37:
	.align	2
.L36:
	.word	stderr
	.word	.LC8
	.size	lock, .-lock
	.section	.rodata
	.align	2
.LC9:
	.ascii	"Got error %d from pthread_mutex_unlock.\012\000"
	.text
	.align	2
	.global	unlock
	.syntax unified
	.arm
	.fpu softvfp
	.type	unlock, %function
unlock:
	@ 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]
	ldr	r0, [fp, #-16]
	bl	pthread_mutex_unlock
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L40
	ldr	r3, .L41
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	ldr	r1, .L41+4
	mov	r0, r3
	bl	fprintf
	mvn	r0, #0
	bl	exit
.L40:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L42:
	.align	2
.L41:
	.word	stderr
	.word	.LC9
	.size	unlock, .-unlock
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
