	.file	"239575.c"
	.intel_syntax noprefix
	.text
	.type	_gettid, @function
_gettid:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	edi, 186
	mov	eax, 0
	call	syscall@PLT
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	_gettid, .-_gettid
	.section	.rodata
	.align 16
	.type	alphabet, @object
	.size	alphabet, 27
alphabet:
	.string	"abcdefghijklmnopqrstuvwxyz"
	.local	pipefd
	.comm	pipefd,16,16
	.text
	.type	_sleep_msec, @function
_sleep_msec:
.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, 48
	mov	DWORD PTR -36[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	eax, DWORD PTR -36[rbp]
	mov	eax, eax
	imul	rax, rax, 274877907
	shr	rax, 32
	shr	eax, 6
	mov	eax, eax
	mov	QWORD PTR -32[rbp], rax
	mov	edx, DWORD PTR -36[rbp]
	mov	eax, edx
	imul	rax, rax, 274877907
	shr	rax, 32
	shr	eax, 6
	imul	ecx, eax, 1000
	mov	eax, edx
	sub	eax, ecx
	mov	eax, eax
	imul	rax, rax, 1000000
	mov	QWORD PTR -24[rbp], rax
	lea	rax, -32[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	nanosleep@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L4
	call	__stack_chk_fail@PLT
.L4:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	_sleep_msec, .-_sleep_msec
	.section	.rodata
	.align 8
.LC0:
	.string	"_reader(): thread_id=%ld tid=%d\n"
.LC1:
	.string	"Thread %ld poll on fd=%d\n"
.LC2:
	.string	"Retry poll() on EINTR"
.LC3:
	.string	"Thread %ld after poll: n=%d\n"
.LC4:
	.string	"the_stack_data/239575.c"
.LC5:
	.string	"n == 1"
.LC6:
	.string	"Thread %ld reading:  %zu\n"
.LC7:
	.string	"count=%zu\n"
.LC8:
	.string	"count == sizeof(alphabet)"
.LC9:
	.string	"strcmp(buf, alphabet) == 0"
	.text
	.type	_reader, @function
_reader:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 112
	mov	QWORD PTR -104[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -104[rbp]
	mov	QWORD PTR -72[rbp], rax
	mov	eax, 0
	call	_gettid
	mov	edx, eax
	mov	rax, QWORD PTR -72[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	QWORD PTR -80[rbp], 0
	jmp	.L6
.L14:
	mov	rax, QWORD PTR -72[rbp]
	lea	rdx, 0[0+rax*8]
	lea	rax, pipefd[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	DWORD PTR -56[rbp], eax
	mov	WORD PTR -52[rbp], 1
	call	__errno_location@PLT
	mov	DWORD PTR [rax], 0
	mov	edx, DWORD PTR -56[rbp]
	mov	rax, QWORD PTR -72[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L7
.L9:
	lea	rdi, .LC2[rip]
	call	puts@PLT
.L7:
	lea	rax, -56[rbp]
	mov	edx, -1
	mov	esi, 1
	mov	rdi, rax
	call	poll@PLT
	mov	DWORD PTR -84[rbp], eax
	cmp	DWORD PTR -84[rbp], -1
	jne	.L8
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	eax, 4
	je	.L9
.L8:
	mov	edx, DWORD PTR -84[rbp]
	mov	rax, QWORD PTR -72[rbp]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	cmp	DWORD PTR -84[rbp], 1
	je	.L10
	lea	rcx, __PRETTY_FUNCTION__.2[rip]
	mov	edx, 67
	lea	rsi, .LC4[rip]
	lea	rdi, .LC5[rip]
	call	__assert_fail@PLT
.L10:
	mov	rdx, QWORD PTR -80[rbp]
	mov	rax, QWORD PTR -72[rbp]
	mov	rsi, rax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -72[rbp]
	lea	rdx, 0[0+rax*8]
	lea	rax, pipefd[rip]
	mov	eax, DWORD PTR [rdx+rax]
	lea	rcx, -48[rbp]
	mov	edx, 27
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	QWORD PTR -64[rbp], rax
	cmp	QWORD PTR -64[rbp], 27
	je	.L11
	mov	rax, QWORD PTR -64[rbp]
	mov	rsi, rax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
.L11:
	cmp	QWORD PTR -64[rbp], 27
	je	.L12
	lea	rcx, __PRETTY_FUNCTION__.2[rip]
	mov	edx, 74
	lea	rsi, .LC4[rip]
	lea	rdi, .LC8[rip]
	call	__assert_fail@PLT
.L12:
	lea	rax, -48[rbp]
	lea	rsi, alphabet[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L13
	lea	rcx, __PRETTY_FUNCTION__.2[rip]
	mov	edx, 75
	lea	rsi, .LC4[rip]
	lea	rdi, .LC9[rip]
	call	__assert_fail@PLT
.L13:
	add	QWORD PTR -80[rbp], 1
.L6:
	cmp	QWORD PTR -80[rbp], 0
	je	.L14
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	_reader, .-_reader
	.section	.rodata
	.align 8
.LC10:
	.string	"write to thread %ld: %zu fd=%d\n"
.LC11:
	.string	"n=%zu\n"
.LC12:
	.string	"n == sizeof(alphabet)"
	.text
	.type	_writer, @function
_writer:
.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, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR -16[rbp], rax
	mov	QWORD PTR -24[rbp], 0
	jmp	.L18
.L21:
	mov	rax, QWORD PTR -16[rbp]
	lea	rdx, 0[0+rax*8]
	lea	rax, pipefd[rip+4]
	mov	ecx, DWORD PTR [rdx+rax]
	mov	rdx, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rax
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -16[rbp]
	lea	rdx, 0[0+rax*8]
	lea	rax, pipefd[rip+4]
	mov	eax, DWORD PTR [rdx+rax]
	mov	edx, 27
	lea	rsi, alphabet[rip]
	mov	edi, eax
	call	write@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 27
	je	.L19
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rax
	lea	rdi, .LC11[rip]
	mov	eax, 0
	call	printf@PLT
.L19:
	cmp	QWORD PTR -8[rbp], 27
	je	.L20
	lea	rcx, __PRETTY_FUNCTION__.1[rip]
	mov	edx, 97
	lea	rsi, .LC4[rip]
	lea	rdi, .LC12[rip]
	call	__assert_fail@PLT
.L20:
	add	QWORD PTR -24[rbp], 1
.L18:
	cmp	QWORD PTR -24[rbp], 0
	je	.L21
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	_writer, .-_writer
	.section	.rodata
.LC13:
	.string	"pipe(pipefd[0]) == 0"
.LC14:
	.string	"pipe(pipefd[1]) == 0"
.LC15:
	.string	"pipefd[0]=%d:%d\n"
	.align 8
.LC16:
	.string	"pthread_create(&reader[0], NULL, _reader, (void*)0) == 0"
	.align 8
.LC17:
	.string	"pthread_create(&reader[1], NULL, _reader, (void*)1) == 0"
	.align 8
.LC18:
	.string	"pthread_create(&writer, NULL, _writer, (void*)0) == 0"
	.align 8
.LC19:
	.string	"pthread_join(writer, NULL) == 0"
	.align 8
.LC20:
	.string	"pthread_join(reader[0], NULL) == 0"
.LC21:
	.string	"===  after join reader 0"
.LC22:
	.string	"close(pipefd[0][0]) == 0"
.LC23:
	.string	"close(pipefd[0][1]) == 0"
.LC24:
	.string	"=== passed test (%s)\n"
	.text
	.globl	main
	.type	main, @function
main:
.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, 64
	mov	DWORD PTR -52[rbp], edi
	mov	QWORD PTR -64[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdi, pipefd[rip]
	call	pipe@PLT
	test	eax, eax
	je	.L24
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 108
	lea	rsi, .LC4[rip]
	lea	rdi, .LC13[rip]
	call	__assert_fail@PLT
.L24:
	lea	rdi, pipefd[rip+8]
	call	pipe@PLT
	test	eax, eax
	je	.L25
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 109
	lea	rsi, .LC4[rip]
	lea	rdi, .LC14[rip]
	call	__assert_fail@PLT
.L25:
	mov	edx, DWORD PTR pipefd[rip+4]
	mov	eax, DWORD PTR pipefd[rip]
	mov	esi, eax
	lea	rdi, .LC15[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -32[rbp]
	mov	ecx, 0
	lea	rdx, _reader[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	test	eax, eax
	je	.L26
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 113
	lea	rsi, .LC4[rip]
	lea	rdi, .LC16[rip]
	call	__assert_fail@PLT
.L26:
	lea	rax, -32[rbp]
	add	rax, 8
	mov	ecx, 1
	lea	rdx, _reader[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	test	eax, eax
	je	.L27
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 114
	lea	rsi, .LC4[rip]
	lea	rdi, .LC17[rip]
	call	__assert_fail@PLT
.L27:
	mov	edi, 1000
	call	_sleep_msec
	lea	rax, -40[rbp]
	mov	ecx, 0
	lea	rdx, _writer[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	test	eax, eax
	je	.L28
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 116
	lea	rsi, .LC4[rip]
	lea	rdi, .LC18[rip]
	call	__assert_fail@PLT
.L28:
	mov	rax, QWORD PTR -40[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	test	eax, eax
	je	.L29
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 118
	lea	rsi, .LC4[rip]
	lea	rdi, .LC19[rip]
	call	__assert_fail@PLT
.L29:
	mov	rax, QWORD PTR -32[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	test	eax, eax
	je	.L30
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 119
	lea	rsi, .LC4[rip]
	lea	rdi, .LC20[rip]
	call	__assert_fail@PLT
.L30:
	lea	rdi, .LC21[rip]
	call	puts@PLT
	mov	eax, DWORD PTR pipefd[rip]
	mov	edi, eax
	call	close@PLT
	test	eax, eax
	je	.L31
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 122
	lea	rsi, .LC4[rip]
	lea	rdi, .LC22[rip]
	call	__assert_fail@PLT
.L31:
	mov	eax, DWORD PTR pipefd[rip+4]
	mov	edi, eax
	call	close@PLT
	test	eax, eax
	je	.L32
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 123
	lea	rsi, .LC4[rip]
	lea	rdi, .LC23[rip]
	call	__assert_fail@PLT
.L32:
	mov	rax, QWORD PTR -64[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC24[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L34
	call	__stack_chk_fail@PLT
.L34:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	main, .-main
	.section	.rodata
	.align 8
	.type	__PRETTY_FUNCTION__.2, @object
	.size	__PRETTY_FUNCTION__.2, 8
__PRETTY_FUNCTION__.2:
	.string	"_reader"
	.align 8
	.type	__PRETTY_FUNCTION__.1, @object
	.size	__PRETTY_FUNCTION__.1, 8
__PRETTY_FUNCTION__.1:
	.string	"_writer"
	.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	"239575.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	_gettid, %function
_gettid:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	mov	r0, #224
	bl	syscall
	mov	r3, r0
	mov	r0, r3
	pop	{fp, pc}
	.size	_gettid, .-_gettid
	.section	.rodata
	.align	2
	.type	alphabet, %object
	.size	alphabet, 27
alphabet:
	.ascii	"abcdefghijklmnopqrstuvwxyz\000"
	.local	pipefd
	.comm	pipefd,16,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	_sleep_msec, %function
_sleep_msec:
	@ 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]
	ldr	r3, .L5
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-24]
	ldr	r2, .L5+4
	umull	r1, r3, r2, r3
	lsr	r3, r3, #6
	str	r3, [fp, #-16]
	ldr	r1, [fp, #-24]
	ldr	r3, .L5+4
	umull	r2, r3, r1, r3
	lsr	r2, r3, #6
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #3
	sub	r2, r1, r3
	mov	r1, r2
	lsl	r1, r1, #5
	sub	r1, r1, r2
	lsl	r3, r1, #6
	sub	r3, r3, r1
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #6
	str	r3, [fp, #-12]
	sub	r3, fp, #16
	mov	r1, #0
	mov	r0, r3
	bl	nanosleep
	nop
	ldr	r3, .L5
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L4
	bl	__stack_chk_fail
.L4:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L6:
	.align	2
.L5:
	.word	.LC0
	.word	274877907
	.size	_sleep_msec, .-_sleep_msec
	.section	.rodata
	.align	2
.LC1:
	.ascii	"_reader(): thread_id=%ld tid=%d\012\000"
	.align	2
.LC2:
	.ascii	"Thread %ld poll on fd=%d\012\000"
	.align	2
.LC3:
	.ascii	"Retry poll() on EINTR\000"
	.align	2
.LC4:
	.ascii	"Thread %ld after poll: n=%d\012\000"
	.align	2
.LC5:
	.ascii	"the_stack_data/239575.c\000"
	.align	2
.LC6:
	.ascii	"n == 1\000"
	.align	2
.LC7:
	.ascii	"Thread %ld reading:  %zu\012\000"
	.align	2
.LC8:
	.ascii	"count=%zu\012\000"
	.align	2
.LC9:
	.ascii	"count == sizeof(alphabet)\000"
	.align	2
.LC10:
	.ascii	"strcmp(buf, alphabet) == 0\000"
	.align	2
.LC11:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	_reader, %function
_reader:
	@ args = 0, pretend = 0, frame = 64
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #64
	str	r0, [fp, #-64]
	ldr	r3, .L19
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-64]
	str	r3, [fp, #-56]
	bl	_gettid
	mov	r3, r0
	mov	r2, r3
	ldr	r1, [fp, #-56]
	ldr	r0, .L19+4
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-60]
	b	.L8
.L16:
	ldr	r2, .L19+8
	ldr	r3, [fp, #-56]
	ldr	r3, [r2, r3, lsl #3]
	str	r3, [fp, #-44]
	mov	r3, #1
	strh	r3, [fp, #-40]	@ movhi
	bl	__errno_location
	mov	r3, r0
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-44]
	mov	r2, r3
	ldr	r1, [fp, #-56]
	ldr	r0, .L19+12
	bl	printf
	b	.L9
.L11:
	ldr	r0, .L19+16
	bl	puts
.L9:
	sub	r3, fp, #44
	mvn	r2, #0
	mov	r1, #1
	mov	r0, r3
	bl	poll
	str	r0, [fp, #-52]
	ldr	r3, [fp, #-52]
	cmn	r3, #1
	bne	.L10
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #4
	beq	.L11
.L10:
	ldr	r2, [fp, #-52]
	ldr	r1, [fp, #-56]
	ldr	r0, .L19+20
	bl	printf
	ldr	r3, [fp, #-52]
	cmp	r3, #1
	beq	.L12
	ldr	r3, .L19+24
	mov	r2, #67
	ldr	r1, .L19+28
	ldr	r0, .L19+32
	bl	__assert_fail
.L12:
	ldr	r2, [fp, #-60]
	ldr	r1, [fp, #-56]
	ldr	r0, .L19+36
	bl	printf
	ldr	r2, .L19+8
	ldr	r3, [fp, #-56]
	ldr	r3, [r2, r3, lsl #3]
	sub	r1, fp, #36
	mov	r2, #27
	mov	r0, r3
	bl	read
	str	r0, [fp, #-48]
	ldr	r3, [fp, #-48]
	cmp	r3, #27
	beq	.L13
	ldr	r1, [fp, #-48]
	ldr	r0, .L19+40
	bl	printf
.L13:
	ldr	r3, [fp, #-48]
	cmp	r3, #27
	beq	.L14
	ldr	r3, .L19+24
	mov	r2, #74
	ldr	r1, .L19+28
	ldr	r0, .L19+44
	bl	__assert_fail
.L14:
	sub	r3, fp, #36
	ldr	r1, .L19+48
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L15
	ldr	r3, .L19+24
	mov	r2, #75
	ldr	r1, .L19+28
	ldr	r0, .L19+52
	bl	__assert_fail
.L15:
	ldr	r3, [fp, #-60]
	add	r3, r3, #1
	str	r3, [fp, #-60]
.L8:
	ldr	r3, [fp, #-60]
	cmp	r3, #0
	beq	.L16
	mov	r3, #0
	ldr	r2, .L19
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L18
	bl	__stack_chk_fail
.L18:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L20:
	.align	2
.L19:
	.word	.LC11
	.word	.LC1
	.word	pipefd
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	__PRETTY_FUNCTION__.6461
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	alphabet
	.word	.LC10
	.size	_reader, .-_reader
	.section	.rodata
	.align	2
.LC12:
	.ascii	"write to thread %ld: %zu fd=%d\012\000"
	.align	2
.LC13:
	.ascii	"n=%zu\012\000"
	.align	2
.LC14:
	.ascii	"n == sizeof(alphabet)\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	_writer, %function
_writer:
	@ 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]
	ldr	r3, [fp, #-24]
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L22
.L25:
	ldr	r2, .L27
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-16]
	ldr	r1, [fp, #-12]
	ldr	r0, .L27+4
	bl	printf
	ldr	r2, .L27
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3, #4]
	mov	r2, #27
	ldr	r1, .L27+8
	mov	r0, r3
	bl	write
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #27
	beq	.L23
	ldr	r1, [fp, #-8]
	ldr	r0, .L27+12
	bl	printf
.L23:
	ldr	r3, [fp, #-8]
	cmp	r3, #27
	beq	.L24
	ldr	r3, .L27+16
	mov	r2, #97
	ldr	r1, .L27+20
	ldr	r0, .L27+24
	bl	__assert_fail
.L24:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L22:
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	beq	.L25
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L28:
	.align	2
.L27:
	.word	pipefd
	.word	.LC12
	.word	alphabet
	.word	.LC13
	.word	__PRETTY_FUNCTION__.6472
	.word	.LC5
	.word	.LC14
	.size	_writer, .-_writer
	.section	.rodata
	.align	2
.LC15:
	.ascii	"pipe(pipefd[0]) == 0\000"
	.align	2
.LC16:
	.ascii	"pipe(pipefd[1]) == 0\000"
	.align	2
.LC17:
	.ascii	"pipefd[0]=%d:%d\012\000"
	.align	2
.LC18:
	.ascii	"pthread_create(&reader[0], NULL, _reader, (void*)0)"
	.ascii	" == 0\000"
	.align	2
.LC19:
	.ascii	"pthread_create(&reader[1], NULL, _reader, (void*)1)"
	.ascii	" == 0\000"
	.align	2
.LC20:
	.ascii	"pthread_create(&writer, NULL, _writer, (void*)0) =="
	.ascii	" 0\000"
	.align	2
.LC21:
	.ascii	"pthread_join(writer, NULL) == 0\000"
	.align	2
.LC22:
	.ascii	"pthread_join(reader[0], NULL) == 0\000"
	.align	2
.LC23:
	.ascii	"===  after join reader 0\000"
	.align	2
.LC24:
	.ascii	"close(pipefd[0][0]) == 0\000"
	.align	2
.LC25:
	.ascii	"close(pipefd[0][1]) == 0\000"
	.align	2
.LC26:
	.ascii	"=== passed test (%s)\012\000"
	.align	2
.LC27:
	.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
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r3, .L41
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, .L41+4
	bl	pipe
	mov	r3, r0
	cmp	r3, #0
	beq	.L30
	ldr	r3, .L41+8
	mov	r2, #108
	ldr	r1, .L41+12
	ldr	r0, .L41+16
	bl	__assert_fail
.L30:
	ldr	r0, .L41+20
	bl	pipe
	mov	r3, r0
	cmp	r3, #0
	beq	.L31
	ldr	r3, .L41+8
	mov	r2, #109
	ldr	r1, .L41+12
	ldr	r0, .L41+24
	bl	__assert_fail
.L31:
	ldr	r3, .L41+4
	ldr	r3, [r3]
	ldr	r2, .L41+4
	ldr	r2, [r2, #4]
	mov	r1, r3
	ldr	r0, .L41+28
	bl	printf
	sub	r0, fp, #16
	mov	r3, #0
	ldr	r2, .L41+32
	mov	r1, #0
	bl	pthread_create
	mov	r3, r0
	cmp	r3, #0
	beq	.L32
	ldr	r3, .L41+8
	mov	r2, #113
	ldr	r1, .L41+12
	ldr	r0, .L41+36
	bl	__assert_fail
.L32:
	sub	r3, fp, #16
	add	r0, r3, #4
	mov	r3, #1
	ldr	r2, .L41+32
	mov	r1, #0
	bl	pthread_create
	mov	r3, r0
	cmp	r3, #0
	beq	.L33
	ldr	r3, .L41+8
	mov	r2, #114
	ldr	r1, .L41+12
	ldr	r0, .L41+40
	bl	__assert_fail
.L33:
	mov	r0, #1000
	bl	_sleep_msec
	sub	r0, fp, #20
	mov	r3, #0
	ldr	r2, .L41+44
	mov	r1, #0
	bl	pthread_create
	mov	r3, r0
	cmp	r3, #0
	beq	.L34
	ldr	r3, .L41+8
	mov	r2, #116
	ldr	r1, .L41+12
	ldr	r0, .L41+48
	bl	__assert_fail
.L34:
	ldr	r3, [fp, #-20]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	mov	r3, r0
	cmp	r3, #0
	beq	.L35
	ldr	r3, .L41+8
	mov	r2, #118
	ldr	r1, .L41+12
	ldr	r0, .L41+52
	bl	__assert_fail
.L35:
	ldr	r3, [fp, #-16]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	mov	r3, r0
	cmp	r3, #0
	beq	.L36
	ldr	r3, .L41+8
	mov	r2, #119
	ldr	r1, .L41+12
	ldr	r0, .L41+56
	bl	__assert_fail
.L36:
	ldr	r0, .L41+60
	bl	puts
	ldr	r3, .L41+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	close
	mov	r3, r0
	cmp	r3, #0
	beq	.L37
	ldr	r3, .L41+8
	mov	r2, #122
	ldr	r1, .L41+12
	ldr	r0, .L41+64
	bl	__assert_fail
.L37:
	ldr	r3, .L41+4
	ldr	r3, [r3, #4]
	mov	r0, r3
	bl	close
	mov	r3, r0
	cmp	r3, #0
	beq	.L38
	ldr	r3, .L41+8
	mov	r2, #123
	ldr	r1, .L41+12
	ldr	r0, .L41+68
	bl	__assert_fail
.L38:
	ldr	r3, [fp, #-28]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L41+72
	bl	printf
	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	.LC27
	.word	pipefd
	.word	__PRETTY_FUNCTION__.6482
	.word	.LC5
	.word	.LC15
	.word	pipefd+8
	.word	.LC16
	.word	.LC17
	.word	_reader
	.word	.LC18
	.word	.LC19
	.word	_writer
	.word	.LC20
	.word	.LC21
	.word	.LC22
	.word	.LC23
	.word	.LC24
	.word	.LC25
	.word	.LC26
	.size	main, .-main
	.section	.rodata
	.align	2
	.type	__PRETTY_FUNCTION__.6461, %object
	.size	__PRETTY_FUNCTION__.6461, 8
__PRETTY_FUNCTION__.6461:
	.ascii	"_reader\000"
	.align	2
	.type	__PRETTY_FUNCTION__.6472, %object
	.size	__PRETTY_FUNCTION__.6472, 8
__PRETTY_FUNCTION__.6472:
	.ascii	"_writer\000"
	.align	2
	.type	__PRETTY_FUNCTION__.6482, %object
	.size	__PRETTY_FUNCTION__.6482, 5
__PRETTY_FUNCTION__.6482:
	.ascii	"main\000"
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
