	.file	"277489.c"
	.intel_syntax noprefix
	.text
	.globl	data
	.bss
	.align 4
	.type	data, @object
	.size	data, 4
data:
	.zero	4
	.text
	.globl	worker
	.type	worker, @function
worker:
.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, 80
	mov	QWORD PTR -72[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -48[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_mutex_init@PLT
	mov	DWORD PTR -52[rbp], 0
	jmp	.L2
.L3:
	lea	rax, -48[rbp]
	mov	rdi, rax
	call	pthread_mutex_lock@PLT
	mov	eax, DWORD PTR data[rip]
	add	eax, 1
	mov	DWORD PTR data[rip], eax
	lea	rax, -48[rbp]
	mov	rdi, rax
	call	pthread_mutex_unlock@PLT
	add	DWORD PTR -52[rbp], 1
.L2:
	cmp	DWORD PTR -52[rbp], 499999
	jle	.L3
	lea	rax, -48[rbp]
	mov	rdi, rax
	call	pthread_mutex_destroy@PLT
	mov	eax, 0
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L5
	call	__stack_chk_fail@PLT
.L5:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	worker, .-worker
	.section	.rodata
.LC0:
	.string	"the_stack_data/277489.c"
	.align 8
.LC1:
	.string	"pthread_create(&id1, NULL, worker, NULL) == 0"
	.align 8
.LC2:
	.string	"pthread_create(&id2, NULL, worker, NULL) == 0"
.LC3:
	.string	"data is %d (in progress)\n"
.LC4:
	.string	"data_snapshot % 2 == 0"
.LC5:
	.string	"pthread_join(id1, NULL) == 0"
.LC6:
	.string	"pthread_join(id2, NULL) == 0"
.LC7:
	.string	"data is %d\n"
	.text
	.globl	main
	.type	main, @function
main:
.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -24[rbp]
	mov	ecx, 0
	lea	rdx, worker[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	test	eax, eax
	je	.L7
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 24
	lea	rsi, .LC0[rip]
	lea	rdi, .LC1[rip]
	call	__assert_fail@PLT
.L7:
	lea	rax, -16[rbp]
	mov	ecx, 0
	lea	rdx, worker[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	test	eax, eax
	je	.L8
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 25
	lea	rsi, .LC0[rip]
	lea	rdi, .LC2[rip]
	call	__assert_fail@PLT
.L8:
	mov	DWORD PTR -32[rbp], 0
	jmp	.L9
.L11:
	mov	eax, DWORD PTR data[rip]
	mov	DWORD PTR -28[rbp], eax
	mov	eax, DWORD PTR -28[rbp]
	and	eax, 1
	test	eax, eax
	jne	.L10
	mov	eax, DWORD PTR -28[rbp]
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -28[rbp]
	and	eax, 1
	test	eax, eax
	je	.L10
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 30
	lea	rsi, .LC0[rip]
	lea	rdi, .LC4[rip]
	call	__assert_fail@PLT
.L10:
	add	DWORD PTR -32[rbp], 1
.L9:
	cmp	DWORD PTR -32[rbp], 9999
	jle	.L11
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	test	eax, eax
	je	.L12
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 33
	lea	rsi, .LC0[rip]
	lea	rdi, .LC5[rip]
	call	__assert_fail@PLT
.L12:
	mov	rax, QWORD PTR -16[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	test	eax, eax
	je	.L13
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 34
	lea	rsi, .LC0[rip]
	lea	rdi, .LC6[rip]
	call	__assert_fail@PLT
.L13:
	mov	eax, DWORD PTR data[rip]
	mov	esi, eax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	main, .-main
	.section	.rodata
	.type	__PRETTY_FUNCTION__.0, @object
	.size	__PRETTY_FUNCTION__.0, 5
__PRETTY_FUNCTION__.0:
	.string	"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	"277489.c"
	.text
	.comm	data,4,4
	.section	.rodata
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	worker
	.syntax unified
	.arm
	.fpu softvfp
	.type	worker, %function
worker:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	str	r0, [fp, #-40]
	ldr	r3, .L6
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #32
	mov	r1, #0
	mov	r0, r3
	bl	pthread_mutex_init
	mov	r3, #0
	str	r3, [fp, #-36]
	b	.L2
.L3:
	sub	r3, fp, #32
	mov	r0, r3
	bl	pthread_mutex_lock
	ldr	r3, .L6+4
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L6+4
	str	r3, [r2]
	sub	r3, fp, #32
	mov	r0, r3
	bl	pthread_mutex_unlock
	ldr	r3, [fp, #-36]
	add	r3, r3, #1
	str	r3, [fp, #-36]
.L2:
	ldr	r3, [fp, #-36]
	ldr	r2, .L6+8
	cmp	r3, r2
	blt	.L3
	sub	r3, fp, #32
	mov	r0, r3
	bl	pthread_mutex_destroy
	mov	r3, #0
	ldr	r2, .L6
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L5
	bl	__stack_chk_fail
.L5:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L7:
	.align	2
.L6:
	.word	.LC0
	.word	data
	.word	500000
	.size	worker, .-worker
	.section	.rodata
	.align	2
.LC1:
	.ascii	"the_stack_data/277489.c\000"
	.align	2
.LC2:
	.ascii	"pthread_create(&id1, NULL, worker, NULL) == 0\000"
	.align	2
.LC3:
	.ascii	"pthread_create(&id2, NULL, worker, NULL) == 0\000"
	.align	2
.LC4:
	.ascii	"data is %d (in progress)\012\000"
	.align	2
.LC5:
	.ascii	"data_snapshot % 2 == 0\000"
	.align	2
.LC6:
	.ascii	"pthread_join(id1, NULL) == 0\000"
	.align	2
.LC7:
	.ascii	"pthread_join(id2, NULL) == 0\000"
	.align	2
.LC8:
	.ascii	"data is %d\012\000"
	.align	2
.LC9:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	ldr	r3, .L18
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r0, fp, #24
	mov	r3, #0
	ldr	r2, .L18+4
	mov	r1, #0
	bl	pthread_create
	mov	r3, r0
	cmp	r3, #0
	beq	.L9
	ldr	r3, .L18+8
	mov	r2, #24
	ldr	r1, .L18+12
	ldr	r0, .L18+16
	bl	__assert_fail
.L9:
	sub	r0, fp, #20
	mov	r3, #0
	ldr	r2, .L18+4
	mov	r1, #0
	bl	pthread_create
	mov	r3, r0
	cmp	r3, #0
	beq	.L10
	ldr	r3, .L18+8
	mov	r2, #25
	ldr	r1, .L18+12
	ldr	r0, .L18+20
	bl	__assert_fail
.L10:
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L11
.L13:
	ldr	r3, .L18+24
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	and	r3, r3, #1
	cmp	r3, #0
	bne	.L12
	ldr	r1, [fp, #-12]
	ldr	r0, .L18+28
	bl	printf
	ldr	r3, [fp, #-12]
	and	r3, r3, #1
	cmp	r3, #0
	beq	.L12
	ldr	r3, .L18+8
	mov	r2, #30
	ldr	r1, .L18+12
	ldr	r0, .L18+32
	bl	__assert_fail
.L12:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L11:
	ldr	r3, [fp, #-16]
	ldr	r2, .L18+36
	cmp	r3, r2
	ble	.L13
	ldr	r3, [fp, #-24]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	mov	r3, r0
	cmp	r3, #0
	beq	.L14
	ldr	r3, .L18+8
	mov	r2, #33
	ldr	r1, .L18+12
	ldr	r0, .L18+40
	bl	__assert_fail
.L14:
	ldr	r3, [fp, #-20]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	mov	r3, r0
	cmp	r3, #0
	beq	.L15
	ldr	r3, .L18+8
	mov	r2, #34
	ldr	r1, .L18+12
	ldr	r0, .L18+44
	bl	__assert_fail
.L15:
	ldr	r3, .L18+24
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L18+48
	bl	printf
	mov	r3, #0
	ldr	r2, .L18
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L17
	bl	__stack_chk_fail
.L17:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L19:
	.align	2
.L18:
	.word	.LC9
	.word	worker
	.word	__PRETTY_FUNCTION__.5645
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	data
	.word	.LC4
	.word	.LC5
	.word	9999
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.size	main, .-main
	.section	.rodata
	.align	2
	.type	__PRETTY_FUNCTION__.5645, %object
	.size	__PRETTY_FUNCTION__.5645, 5
__PRETTY_FUNCTION__.5645:
	.ascii	"main\000"
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
