	.file	"338996.c"
	.intel_syntax noprefix
	.text
	.globl	__cs_mlock
	.bss
	.align 4
	.type	__cs_mlock, @object
	.size	__cs_mlock, 4
__cs_mlock:
	.zero	4
	.globl	lock
	.align 4
	.type	lock, @object
	.size	lock, 4
lock:
	.zero	4
	.text
	.globl	treader
	.type	treader, @function
treader:
.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
	lea	rdi, __cs_mlock[rip]
	mov	eax, 0
	call	__cs_mutex_lock@PLT
	mov	eax, 0
	call	sc_fence@PLT
	mov	eax, DWORD PTR lock[rip]
	mov	edx, DWORD PTR -8[rbp]
	mov	esi, edx
	mov	edi, eax
	mov	eax, 0
	call	rlx_read_ps@PLT
	mov	eax, DWORD PTR -8[rbp]
	lea	edx, -1[rax]
	mov	eax, DWORD PTR lock[rip]
	mov	esi, edx
	mov	edi, eax
	mov	eax, 0
	call	rlx_write_ps@PLT
	mov	eax, 0
	call	sc_fence@PLT
	lea	rdi, __cs_mlock[rip]
	mov	eax, 0
	call	__cs_mutex_unlock@PLT
	mov	DWORD PTR -12[rbp], 0
	mov	DWORD PTR -20[rbp], 0
	jmp	.L2
.L11:
	cmp	DWORD PTR -8[rbp], 0
	jg	.L14
	lea	rdi, __cs_mlock[rip]
	mov	eax, 0
	call	__cs_mutex_lock@PLT
	mov	eax, 0
	call	sc_fence@PLT
	mov	eax, DWORD PTR lock[rip]
	mov	edx, DWORD PTR -4[rbp]
	mov	esi, edx
	mov	edi, eax
	mov	eax, 0
	call	rlx_read_ps@PLT
	mov	eax, DWORD PTR -4[rbp]
	lea	edx, 1[rax]
	mov	eax, DWORD PTR lock[rip]
	mov	esi, edx
	mov	edi, eax
	mov	eax, 0
	call	rlx_write_ps@PLT
	mov	eax, 0
	call	sc_fence@PLT
	lea	rdi, __cs_mlock[rip]
	mov	eax, 0
	call	__cs_mutex_unlock@PLT
	mov	DWORD PTR -12[rbp], 0
	mov	DWORD PTR -16[rbp], 0
	jmp	.L4
.L8:
	mov	eax, DWORD PTR lock[rip]
	mov	edx, DWORD PTR -4[rbp]
	mov	esi, edx
	mov	edi, eax
	mov	eax, 0
	call	rlx_read_ps@PLT
	cmp	DWORD PTR -4[rbp], 0
	jg	.L5
	mov	edi, 0
	mov	eax, 0
	call	__CPROVER_assert@PLT
	jmp	.L13
.L5:
	mov	DWORD PTR -12[rbp], 1
	jmp	.L7
.L13:
	add	DWORD PTR -16[rbp], 1
.L4:
	cmp	DWORD PTR -16[rbp], 2
	jle	.L8
.L7:
	cmp	DWORD PTR -12[rbp], 1
	jne	.L9
	lea	rdi, __cs_mlock[rip]
	mov	eax, 0
	call	__cs_mutex_lock@PLT
	mov	eax, 0
	call	sc_fence@PLT
	mov	eax, DWORD PTR lock[rip]
	mov	edx, DWORD PTR -8[rbp]
	mov	esi, edx
	mov	edi, eax
	mov	eax, 0
	call	rlx_read_ps@PLT
	mov	eax, DWORD PTR -8[rbp]
	lea	edx, -1[rax]
	mov	eax, DWORD PTR lock[rip]
	mov	esi, edx
	mov	edi, eax
	mov	eax, 0
	call	rlx_write_ps@PLT
	mov	eax, 0
	call	sc_fence@PLT
	lea	rdi, __cs_mlock[rip]
	mov	eax, 0
	call	__cs_mutex_unlock@PLT
.L9:
	add	DWORD PTR -20[rbp], 1
.L2:
	cmp	DWORD PTR -20[rbp], 1
	jle	.L11
	jmp	.L10
.L14:
	nop
.L10:
	mov	eax, DWORD PTR lock[rip]
	add	eax, 1
	mov	DWORD PTR lock[rip], eax
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	treader, .-treader
	.globl	twriter
	.type	twriter, @function
twriter:
.LFB1:
	.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
	lea	rdi, __cs_mlock[rip]
	mov	eax, 0
	call	__cs_mutex_lock@PLT
	mov	eax, 0
	call	sc_fence@PLT
	mov	eax, DWORD PTR lock[rip]
	mov	edx, DWORD PTR -8[rbp]
	mov	esi, edx
	mov	edi, eax
	mov	eax, 0
	call	rlx_read_ps@PLT
	mov	eax, DWORD PTR -8[rbp]
	lea	edx, -1048576[rax]
	mov	eax, DWORD PTR lock[rip]
	mov	esi, edx
	mov	edi, eax
	mov	eax, 0
	call	rlx_write_ps@PLT
	mov	eax, 0
	call	sc_fence@PLT
	lea	rdi, __cs_mlock[rip]
	mov	eax, 0
	call	__cs_mutex_unlock@PLT
	mov	DWORD PTR -12[rbp], 0
	mov	DWORD PTR -20[rbp], 0
	jmp	.L16
.L25:
	cmp	DWORD PTR -8[rbp], 1048576
	je	.L28
	lea	rdi, __cs_mlock[rip]
	mov	eax, 0
	call	__cs_mutex_lock@PLT
	mov	eax, 0
	call	sc_fence@PLT
	mov	eax, DWORD PTR lock[rip]
	mov	edx, DWORD PTR -4[rbp]
	mov	esi, edx
	mov	edi, eax
	mov	eax, 0
	call	rlx_read_ps@PLT
	mov	eax, DWORD PTR -4[rbp]
	lea	edx, 1048576[rax]
	mov	eax, DWORD PTR lock[rip]
	mov	esi, edx
	mov	edi, eax
	mov	eax, 0
	call	rlx_write_ps@PLT
	mov	eax, 0
	call	sc_fence@PLT
	lea	rdi, __cs_mlock[rip]
	mov	eax, 0
	call	__cs_mutex_unlock@PLT
	mov	DWORD PTR -12[rbp], 0
	mov	DWORD PTR -16[rbp], 0
	jmp	.L18
.L22:
	mov	eax, DWORD PTR lock[rip]
	mov	edx, DWORD PTR -4[rbp]
	mov	esi, edx
	mov	edi, eax
	mov	eax, 0
	call	rlx_read_ps@PLT
	cmp	DWORD PTR -4[rbp], 1048576
	je	.L19
	mov	edi, 0
	mov	eax, 0
	call	__CPROVER_assert@PLT
	jmp	.L27
.L19:
	mov	DWORD PTR -12[rbp], 1
	jmp	.L21
.L27:
	add	DWORD PTR -16[rbp], 1
.L18:
	cmp	DWORD PTR -16[rbp], 2
	jle	.L22
.L21:
	cmp	DWORD PTR -12[rbp], 1
	jne	.L23
	lea	rdi, __cs_mlock[rip]
	mov	eax, 0
	call	__cs_mutex_lock@PLT
	mov	eax, 0
	call	sc_fence@PLT
	mov	eax, DWORD PTR lock[rip]
	mov	edx, DWORD PTR -8[rbp]
	mov	esi, edx
	mov	edi, eax
	mov	eax, 0
	call	rlx_read_ps@PLT
	mov	eax, DWORD PTR -8[rbp]
	lea	edx, -1048576[rax]
	mov	eax, DWORD PTR lock[rip]
	mov	esi, edx
	mov	edi, eax
	mov	eax, 0
	call	rlx_write_ps@PLT
	mov	eax, 0
	call	sc_fence@PLT
	lea	rdi, __cs_mlock[rip]
	mov	eax, 0
	call	__cs_mutex_unlock@PLT
.L23:
	add	DWORD PTR -20[rbp], 1
.L16:
	cmp	DWORD PTR -20[rbp], 1
	jle	.L25
	jmp	.L24
.L28:
	nop
.L24:
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	twriter, .-twriter
	.globl	main
	.type	main, @function
main:
.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, 32
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	esi, 0
	lea	rdi, __cs_mlock[rip]
	mov	eax, 0
	call	__cs_mutex_init@PLT
	mov	DWORD PTR lock[rip], 1048576
	lea	rax, -32[rbp]
	mov	ecx, 0
	lea	rdx, treader[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	lea	rax, -24[rbp]
	mov	ecx, 0
	lea	rdx, twriter[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	lea	rax, -16[rbp]
	mov	ecx, 0
	lea	rdx, twriter[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	mov	eax, 0
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L31
	call	__stack_chk_fail@PLT
.L31:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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	"338996.c"
	.text
	.comm	__cs_mlock,4,4
	.comm	lock,4,4
	.align	2
	.global	treader
	.syntax unified
	.arm
	.fpu softvfp
	.type	treader, %function
treader:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-32]
	ldr	r0, .L15
	bl	__cs_mutex_lock
	bl	sc_fence
	ldr	r3, .L15+4
	ldr	r3, [r3]
	ldr	r1, [fp, #-12]
	mov	r0, r3
	bl	rlx_read_ps
	ldr	r3, .L15+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-12]
	sub	r3, r3, #1
	mov	r1, r3
	mov	r0, r2
	bl	rlx_write_ps
	bl	sc_fence
	ldr	r0, .L15
	bl	__cs_mutex_unlock
	mov	r3, #0
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L2
.L11:
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bgt	.L14
	ldr	r0, .L15
	bl	__cs_mutex_lock
	bl	sc_fence
	ldr	r3, .L15+4
	ldr	r3, [r3]
	ldr	r1, [fp, #-8]
	mov	r0, r3
	bl	rlx_read_ps
	ldr	r3, .L15+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	mov	r1, r3
	mov	r0, r2
	bl	rlx_write_ps
	bl	sc_fence
	ldr	r0, .L15
	bl	__cs_mutex_unlock
	mov	r3, #0
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L4
.L8:
	ldr	r3, .L15+4
	ldr	r3, [r3]
	ldr	r1, [fp, #-8]
	mov	r0, r3
	bl	rlx_read_ps
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bgt	.L5
	mov	r0, #0
	bl	__CPROVER_assert
	b	.L13
.L5:
	mov	r3, #1
	str	r3, [fp, #-16]
	b	.L7
.L13:
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L4:
	ldr	r3, [fp, #-20]
	cmp	r3, #2
	ble	.L8
.L7:
	ldr	r3, [fp, #-16]
	cmp	r3, #1
	bne	.L9
	ldr	r0, .L15
	bl	__cs_mutex_lock
	bl	sc_fence
	ldr	r3, .L15+4
	ldr	r3, [r3]
	ldr	r1, [fp, #-12]
	mov	r0, r3
	bl	rlx_read_ps
	ldr	r3, .L15+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-12]
	sub	r3, r3, #1
	mov	r1, r3
	mov	r0, r2
	bl	rlx_write_ps
	bl	sc_fence
	ldr	r0, .L15
	bl	__cs_mutex_unlock
.L9:
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L2:
	ldr	r3, [fp, #-24]
	cmp	r3, #1
	ble	.L11
	b	.L10
.L14:
	nop
.L10:
	ldr	r3, .L15+4
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L15+4
	str	r3, [r2]
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L16:
	.align	2
.L15:
	.word	__cs_mlock
	.word	lock
	.size	treader, .-treader
	.align	2
	.global	twriter
	.syntax unified
	.arm
	.fpu softvfp
	.type	twriter, %function
twriter:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-32]
	ldr	r0, .L31
	bl	__cs_mutex_lock
	bl	sc_fence
	ldr	r3, .L31+4
	ldr	r3, [r3]
	ldr	r1, [fp, #-12]
	mov	r0, r3
	bl	rlx_read_ps
	ldr	r3, .L31+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-12]
	sub	r3, r3, #1048576
	mov	r1, r3
	mov	r0, r2
	bl	rlx_write_ps
	bl	sc_fence
	ldr	r0, .L31
	bl	__cs_mutex_unlock
	mov	r3, #0
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L18
.L27:
	ldr	r3, [fp, #-12]
	cmp	r3, #1048576
	beq	.L30
	ldr	r0, .L31
	bl	__cs_mutex_lock
	bl	sc_fence
	ldr	r3, .L31+4
	ldr	r3, [r3]
	ldr	r1, [fp, #-8]
	mov	r0, r3
	bl	rlx_read_ps
	ldr	r3, .L31+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1048576
	mov	r1, r3
	mov	r0, r2
	bl	rlx_write_ps
	bl	sc_fence
	ldr	r0, .L31
	bl	__cs_mutex_unlock
	mov	r3, #0
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L20
.L24:
	ldr	r3, .L31+4
	ldr	r3, [r3]
	ldr	r1, [fp, #-8]
	mov	r0, r3
	bl	rlx_read_ps
	ldr	r3, [fp, #-8]
	cmp	r3, #1048576
	beq	.L21
	mov	r0, #0
	bl	__CPROVER_assert
	b	.L29
.L21:
	mov	r3, #1
	str	r3, [fp, #-16]
	b	.L23
.L29:
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L20:
	ldr	r3, [fp, #-20]
	cmp	r3, #2
	ble	.L24
.L23:
	ldr	r3, [fp, #-16]
	cmp	r3, #1
	bne	.L25
	ldr	r0, .L31
	bl	__cs_mutex_lock
	bl	sc_fence
	ldr	r3, .L31+4
	ldr	r3, [r3]
	ldr	r1, [fp, #-12]
	mov	r0, r3
	bl	rlx_read_ps
	ldr	r3, .L31+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-12]
	sub	r3, r3, #1048576
	mov	r1, r3
	mov	r0, r2
	bl	rlx_write_ps
	bl	sc_fence
	ldr	r0, .L31
	bl	__cs_mutex_unlock
.L25:
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L18:
	ldr	r3, [fp, #-24]
	cmp	r3, #1
	ble	.L27
	b	.L26
.L30:
	nop
.L26:
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L32:
	.align	2
.L31:
	.word	__cs_mlock
	.word	lock
	.size	twriter, .-twriter
	.section	.rodata
	.align	2
.LC0:
	.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, .L36
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r1, #0
	ldr	r0, .L36+4
	bl	__cs_mutex_init
	ldr	r3, .L36+8
	mov	r2, #1048576
	str	r2, [r3]
	sub	r0, fp, #20
	mov	r3, #0
	ldr	r2, .L36+12
	mov	r1, #0
	bl	pthread_create
	sub	r0, fp, #16
	mov	r3, #0
	ldr	r2, .L36+16
	mov	r1, #0
	bl	pthread_create
	sub	r0, fp, #12
	mov	r3, #0
	ldr	r2, .L36+16
	mov	r1, #0
	bl	pthread_create
	mov	r3, #0
	ldr	r2, .L36
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L35
	bl	__stack_chk_fail
.L35:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L37:
	.align	2
.L36:
	.word	.LC0
	.word	__cs_mlock
	.word	lock
	.word	treader
	.word	twriter
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
