	.file	"544052.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"%d\n"
.LC1:
	.string	"Output to stream failed.\n"
	.text
	.globl	write_data
	.type	write_data, @function
write_data:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -4[rbp], 0
	jmp	.L2
.L3:
	mov	edx, DWORD PTR -4[rbp]
	mov	rax, QWORD PTR -24[rbp]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	add	DWORD PTR -4[rbp], 1
.L2:
	cmp	DWORD PTR -4[rbp], 99
	jle	.L3
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	ferror@PLT
	test	eax, eax
	je	.L5
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 25
	mov	esi, 1
	lea	rdi, .LC1[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L5:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	write_data, .-write_data
	.section	.rodata
.LC2:
	.string	"fscanf"
.LC3:
	.string	"Test FAILED!"
	.text
	.globl	read_data
	.type	read_data, @function
read_data:
.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -12[rbp], 0
	jmp	.L7
.L11:
	lea	rdx, -16[rbp]
	mov	rax, QWORD PTR -24[rbp]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_fscanf@PLT
	cmp	eax, 1
	jne	.L8
	mov	eax, DWORD PTR -16[rbp]
	cmp	DWORD PTR -12[rbp], eax
	je	.L9
.L8:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	ferror@PLT
	test	eax, eax
	je	.L10
	lea	rdi, .LC2[rip]
	call	perror@PLT
.L10:
	lea	rdi, .LC3[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L9:
	add	DWORD PTR -12[rbp], 1
.L7:
	cmp	DWORD PTR -12[rbp], 99
	jle	.L11
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	read_data, .-read_data
	.section	.rodata
.LC4:
	.string	"w"
.LC5:
	.string	"/bin/cat >tstpopen.tmp"
.LC6:
	.string	"popen"
.LC7:
	.string	"the_stack_data/544052.c"
.LC8:
	.string	"%s: %d\n"
.LC9:
	.string	"writing pclose returned %d\n"
.LC10:
	.string	"r"
.LC11:
	.string	"/bin/cat tstpopen.tmp"
.LC12:
	.string	"tstpopen.tmp"
.LC13:
	.string	"reading pclose returned %d\n"
.LC14:
	.string	"Test succeeded."
	.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
	sub	rsp, 32
	lea	rsi, .LC4[rip]
	lea	rdi, .LC5[rip]
	call	popen@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	jne	.L14
	lea	rdi, .LC6[rip]
	call	perror@PLT
	lea	rdi, .LC3[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L14:
	mov	edx, 48
	lea	rsi, .LC7[rip]
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	write_data
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	pclose@PLT
	mov	DWORD PTR -24[rbp], eax
	mov	eax, DWORD PTR -24[rbp]
	mov	esi, eax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rsi, .LC10[rip]
	lea	rdi, .LC11[rip]
	call	popen@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L15
	lea	rdi, .LC12[rip]
	call	perror@PLT
	lea	rdi, .LC3[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L15:
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	read_data
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	pclose@PLT
	mov	DWORD PTR -20[rbp], eax
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, eax
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -24[rbp]
	or	eax, DWORD PTR -20[rbp]
	test	eax, eax
	je	.L16
	lea	rax, .LC3[rip]
	jmp	.L17
.L16:
	lea	rax, .LC14[rip]
.L17:
	mov	rdi, rax
	call	puts@PLT
	mov	eax, DWORD PTR -24[rbp]
	or	eax, DWORD PTR -20[rbp]
	mov	edi, eax
	call	exit@PLT
	.cfi_endproc
.LFE8:
	.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	"544052.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%d\012\000"
	.align	2
.LC1:
	.ascii	"Output to stream failed.\012\000"
	.text
	.align	2
	.global	write_data
	.syntax unified
	.arm
	.fpu softvfp
	.type	write_data, %function
write_data:
	@ 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]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L2
.L3:
	ldr	r2, [fp, #-8]
	ldr	r1, .L6
	ldr	r0, [fp, #-16]
	bl	fprintf
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L2:
	ldr	r3, [fp, #-8]
	cmp	r3, #99
	ble	.L3
	ldr	r0, [fp, #-16]
	bl	ferror
	mov	r3, r0
	cmp	r3, #0
	beq	.L5
	ldr	r3, .L6+4
	ldr	r3, [r3]
	mov	r2, #25
	mov	r1, #1
	ldr	r0, .L6+8
	bl	fwrite
	mov	r0, #1
	bl	exit
.L5:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L7:
	.align	2
.L6:
	.word	.LC0
	.word	stderr
	.word	.LC1
	.size	write_data, .-write_data
	.section	.rodata
	.align	2
.LC2:
	.ascii	"fscanf\000"
	.align	2
.LC3:
	.ascii	"Test FAILED!\000"
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	read_data
	.syntax unified
	.arm
	.fpu softvfp
	.type	read_data, %function
read_data:
	@ 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, .L15
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L9
.L13:
	sub	r3, fp, #16
	mov	r2, r3
	ldr	r1, .L15+4
	ldr	r0, [fp, #-24]
	bl	__isoc99_fscanf
	mov	r3, r0
	cmp	r3, #1
	bne	.L10
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	beq	.L11
.L10:
	ldr	r0, [fp, #-24]
	bl	ferror
	mov	r3, r0
	cmp	r3, #0
	beq	.L12
	ldr	r0, .L15+8
	bl	perror
.L12:
	ldr	r0, .L15+12
	bl	puts
	mov	r0, #1
	bl	exit
.L11:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L9:
	ldr	r3, [fp, #-12]
	cmp	r3, #99
	ble	.L13
	nop
	ldr	r3, .L15
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L14
	bl	__stack_chk_fail
.L14:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L16:
	.align	2
.L15:
	.word	.LC4
	.word	.LC0
	.word	.LC2
	.word	.LC3
	.size	read_data, .-read_data
	.section	.rodata
	.align	2
.LC5:
	.ascii	"w\000"
	.align	2
.LC6:
	.ascii	"/bin/cat >tstpopen.tmp\000"
	.align	2
.LC7:
	.ascii	"popen\000"
	.align	2
.LC8:
	.ascii	"the_stack_data/544052.c\000"
	.align	2
.LC9:
	.ascii	"%s: %d\012\000"
	.align	2
.LC10:
	.ascii	"writing pclose returned %d\012\000"
	.align	2
.LC11:
	.ascii	"r\000"
	.align	2
.LC12:
	.ascii	"/bin/cat tstpopen.tmp\000"
	.align	2
.LC13:
	.ascii	"tstpopen.tmp\000"
	.align	2
.LC14:
	.ascii	"reading pclose returned %d\012\000"
	.align	2
.LC15:
	.ascii	"Test succeeded.\000"
	.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	r1, .L22
	ldr	r0, .L22+4
	bl	popen
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L18
	ldr	r0, .L22+8
	bl	perror
	ldr	r0, .L22+12
	bl	puts
	mov	r0, #1
	bl	exit
.L18:
	mov	r2, #48
	ldr	r1, .L22+16
	ldr	r0, .L22+20
	bl	printf
	ldr	r0, [fp, #-20]
	bl	write_data
	ldr	r0, [fp, #-20]
	bl	pclose
	str	r0, [fp, #-16]
	ldr	r1, [fp, #-16]
	ldr	r0, .L22+24
	bl	printf
	ldr	r1, .L22+28
	ldr	r0, .L22+32
	bl	popen
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L19
	ldr	r0, .L22+36
	bl	perror
	ldr	r0, .L22+12
	bl	puts
	mov	r0, #1
	bl	exit
.L19:
	ldr	r0, [fp, #-12]
	bl	read_data
	ldr	r0, [fp, #-12]
	bl	pclose
	str	r0, [fp, #-8]
	ldr	r1, [fp, #-8]
	ldr	r0, .L22+40
	bl	printf
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-8]
	orr	r3, r2, r3
	cmp	r3, #0
	beq	.L20
	ldr	r3, .L22+12
	b	.L21
.L20:
	ldr	r3, .L22+44
.L21:
	mov	r0, r3
	bl	puts
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-8]
	orr	r3, r2, r3
	mov	r0, r3
	bl	exit
.L23:
	.align	2
.L22:
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC3
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
