	.file	"184518800.c"
	.intel_syntax noprefix
	.text
	.data
	.align 4
	.type	g_num, @object
	.size	g_num, 4
g_num:
	.long	10
	.local	g_debug
	.comm	g_debug,4,4
	.section	.rodata
.LC0:
	.string	"dn:"
.LC1:
	.string	"the_stack_data/184518800.c"
.LC2:
	.string	"rv == 0 && \"c2p failed\""
.LC3:
	.string	"rv == 0 && \"p2c failed\""
.LC4:
	.string	"%d %d %d %d\n"
.LC5:
	.string	"c>hild"
.LC6:
	.string	"writing %d"
	.align 8
.LC7:
	.string	"c>len_to_wr=%d fdo=%d, buf='%s'\n"
.LC8:
	.string	"c>rv = %d, errno=%d\n"
.LC9:
	.string	"c>rv = %d, got: '%s'\n"
.LC10:
	.string	"p>arent %d\n"
.LC11:
	.string	"p>read> '%s' rv=%d\n"
.LC12:
	.string	"received %d"
.LC13:
	.string	"p>wrote> '%s', rv=%d\n"
.LC14:
	.string	"rv == len_to_wr"
	.text
	.globl	main
	.type	main, @function
main:
.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, 1072
	mov	DWORD PTR -1060[rbp], edi
	mov	QWORD PTR -1072[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	jmp	.L2
.L6:
	cmp	DWORD PTR -1044[rbp], 100
	je	.L3
	cmp	DWORD PTR -1044[rbp], 110
	je	.L4
	jmp	.L26
.L3:
	mov	DWORD PTR g_debug[rip], 1
	jmp	.L2
.L4:
	mov	rax, QWORD PTR optarg[rip]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR g_num[rip], eax
	jmp	.L2
.L26:
	call	abort@PLT
.L2:
	mov	rcx, QWORD PTR -1072[rbp]
	mov	eax, DWORD PTR -1060[rbp]
	lea	rdx, .LC0[rip]
	mov	rsi, rcx
	mov	edi, eax
	call	getopt@PLT
	mov	DWORD PTR -1044[rbp], eax
	cmp	DWORD PTR -1044[rbp], -1
	jne	.L6
	mov	rax, QWORD PTR stdout[rip]
	mov	esi, 0
	mov	rdi, rax
	call	setbuf@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	esi, 0
	mov	rdi, rax
	call	setbuf@PLT
	lea	rax, -1024[rbp]
	mov	rdi, rax
	call	pipe@PLT
	mov	DWORD PTR -1040[rbp], eax
	cmp	DWORD PTR -1040[rbp], 0
	je	.L7
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 40
	lea	rsi, .LC1[rip]
	lea	rdi, .LC2[rip]
	call	__assert_fail@PLT
.L7:
	lea	rax, -1016[rbp]
	mov	rdi, rax
	call	pipe@PLT
	mov	DWORD PTR -1040[rbp], eax
	cmp	DWORD PTR -1040[rbp], 0
	je	.L8
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 42
	lea	rsi, .LC1[rip]
	lea	rdi, .LC3[rip]
	call	__assert_fail@PLT
.L8:
	mov	eax, DWORD PTR g_debug[rip]
	test	eax, eax
	je	.L9
	mov	esi, DWORD PTR -1012[rbp]
	mov	ecx, DWORD PTR -1016[rbp]
	mov	edx, DWORD PTR -1020[rbp]
	mov	eax, DWORD PTR -1024[rbp]
	mov	r8d, esi
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
.L9:
	call	fork@PLT
	mov	DWORD PTR -1040[rbp], eax
	cmp	DWORD PTR -1040[rbp], 0
	jne	.L10
	mov	eax, DWORD PTR g_debug[rip]
	test	eax, eax
	je	.L11
	lea	rdi, .LC5[rip]
	call	puts@PLT
.L11:
	mov	eax, DWORD PTR -1020[rbp]
	mov	DWORD PTR -1036[rbp], eax
	mov	eax, DWORD PTR -1016[rbp]
	mov	DWORD PTR -1032[rbp], eax
	mov	DWORD PTR -1048[rbp], 0
	jmp	.L12
.L16:
	mov	edx, DWORD PTR -1048[rbp]
	lea	rax, -1008[rbp]
	mov	ecx, edx
	lea	rdx, .LC6[rip]
	mov	esi, 999
	mov	rdi, rax
	mov	eax, 0
	call	snprintf@PLT
	lea	rax, -1008[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	DWORD PTR -1028[rbp], eax
	mov	eax, DWORD PTR g_debug[rip]
	test	eax, eax
	je	.L13
	lea	rcx, -1008[rbp]
	mov	edx, DWORD PTR -1036[rbp]
	mov	eax, DWORD PTR -1028[rbp]
	mov	esi, eax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
.L13:
	mov	eax, DWORD PTR -1028[rbp]
	movsx	rdx, eax
	lea	rcx, -1008[rbp]
	mov	eax, DWORD PTR -1036[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	DWORD PTR -1040[rbp], eax
	mov	eax, DWORD PTR g_debug[rip]
	test	eax, eax
	je	.L14
	call	__errno_location@PLT
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -1040[rbp]
	mov	esi, eax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
.L14:
	lea	rcx, -1008[rbp]
	mov	eax, DWORD PTR -1032[rbp]
	mov	edx, 1000
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -1040[rbp], eax
	mov	eax, DWORD PTR g_debug[rip]
	test	eax, eax
	je	.L15
	lea	rdx, -1008[rbp]
	mov	eax, DWORD PTR -1040[rbp]
	mov	esi, eax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
.L15:
	add	DWORD PTR -1048[rbp], 1
.L12:
	mov	eax, DWORD PTR g_num[rip]
	cmp	DWORD PTR -1048[rbp], eax
	jl	.L16
	jmp	.L17
.L10:
	mov	eax, DWORD PTR g_debug[rip]
	test	eax, eax
	je	.L18
	mov	eax, DWORD PTR -1040[rbp]
	mov	esi, eax
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
.L18:
	mov	eax, DWORD PTR -1012[rbp]
	mov	DWORD PTR -1036[rbp], eax
	mov	eax, DWORD PTR -1024[rbp]
	mov	DWORD PTR -1032[rbp], eax
	mov	DWORD PTR -1048[rbp], 0
	jmp	.L19
.L23:
	lea	rax, -1008[rbp]
	mov	edx, 1000
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	lea	rcx, -1008[rbp]
	mov	eax, DWORD PTR -1032[rbp]
	mov	edx, 1000
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -1040[rbp], eax
	mov	eax, DWORD PTR g_debug[rip]
	test	eax, eax
	je	.L20
	mov	edx, DWORD PTR -1040[rbp]
	lea	rax, -1008[rbp]
	mov	rsi, rax
	lea	rdi, .LC11[rip]
	mov	eax, 0
	call	printf@PLT
.L20:
	mov	edx, DWORD PTR -1040[rbp]
	lea	rax, -1008[rbp]
	mov	ecx, edx
	lea	rdx, .LC12[rip]
	mov	esi, 999
	mov	rdi, rax
	mov	eax, 0
	call	snprintf@PLT
	lea	rax, -1008[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	DWORD PTR -1028[rbp], eax
	mov	eax, DWORD PTR -1028[rbp]
	movsx	rdx, eax
	lea	rcx, -1008[rbp]
	mov	eax, DWORD PTR -1036[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	DWORD PTR -1040[rbp], eax
	mov	eax, DWORD PTR g_debug[rip]
	test	eax, eax
	je	.L21
	mov	edx, DWORD PTR -1040[rbp]
	lea	rax, -1008[rbp]
	mov	rsi, rax
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
.L21:
	mov	eax, DWORD PTR -1040[rbp]
	cmp	eax, DWORD PTR -1028[rbp]
	je	.L22
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 73
	lea	rsi, .LC1[rip]
	lea	rdi, .LC14[rip]
	call	__assert_fail@PLT
.L22:
	add	DWORD PTR -1048[rbp], 1
.L19:
	mov	eax, DWORD PTR g_num[rip]
	cmp	DWORD PTR -1048[rbp], eax
	jl	.L23
.L17:
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L25
	call	__stack_chk_fail@PLT
.L25:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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	"184518800.c"
	.text
	.data
	.align	2
	.type	g_num, %object
	.size	g_num, 4
g_num:
	.word	10
	.local	g_debug
	.comm	g_debug,4,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"dn:\000"
	.align	2
.LC1:
	.ascii	"the_stack_data/184518800.c\000"
	.align	2
.LC2:
	.ascii	"rv == 0 && \"c2p failed\"\000"
	.align	2
.LC3:
	.ascii	"rv == 0 && \"p2c failed\"\000"
	.align	2
.LC4:
	.ascii	"%d %d %d %d\012\000"
	.align	2
.LC5:
	.ascii	"c>hild\000"
	.align	2
.LC6:
	.ascii	"writing %d\000"
	.align	2
.LC7:
	.ascii	"c>len_to_wr=%d fdo=%d, buf='%s'\012\000"
	.align	2
.LC8:
	.ascii	"c>rv = %d, errno=%d\012\000"
	.align	2
.LC9:
	.ascii	"c>rv = %d, got: '%s'\012\000"
	.align	2
.LC10:
	.ascii	"p>arent %d\012\000"
	.align	2
.LC11:
	.ascii	"p>read> '%s' rv=%d\012\000"
	.align	2
.LC12:
	.ascii	"received %d\000"
	.align	2
.LC13:
	.ascii	"p>wrote> '%s', rv=%d\012\000"
	.align	2
.LC14:
	.ascii	"rv == len_to_wr\000"
	.align	2
.LC15:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 1056
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1056
	sub	sp, sp, #8
	str	r0, [fp, #-1056]
	str	r1, [fp, #-1060]
	ldr	r3, .L27
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	b	.L2
.L6:
	ldr	r3, [fp, #-1044]
	cmp	r3, #100
	beq	.L3
	ldr	r3, [fp, #-1044]
	cmp	r3, #110
	beq	.L4
	b	.L26
.L3:
	ldr	r3, .L27+4
	mov	r2, #1
	str	r2, [r3]
	b	.L2
.L4:
	ldr	r3, .L27+8
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	ldr	r2, .L27+12
	str	r3, [r2]
	b	.L2
.L26:
	bl	abort
.L2:
	ldr	r2, .L27+16
	ldr	r1, [fp, #-1060]
	ldr	r0, [fp, #-1056]
	bl	getopt
	str	r0, [fp, #-1044]
	ldr	r3, [fp, #-1044]
	cmn	r3, #1
	bne	.L6
	ldr	r3, .L27+20
	ldr	r3, [r3]
	mov	r1, #0
	mov	r0, r3
	bl	setbuf
	ldr	r3, .L27+24
	ldr	r3, [r3]
	mov	r1, #0
	mov	r0, r3
	bl	setbuf
	sub	r3, fp, #1024
	mov	r0, r3
	bl	pipe
	str	r0, [fp, #-1040]
	ldr	r3, [fp, #-1040]
	cmp	r3, #0
	beq	.L7
	ldr	r3, .L27+28
	mov	r2, #40
	ldr	r1, .L27+32
	ldr	r0, .L27+36
	bl	__assert_fail
.L7:
	sub	r3, fp, #1016
	mov	r0, r3
	bl	pipe
	str	r0, [fp, #-1040]
	ldr	r3, [fp, #-1040]
	cmp	r3, #0
	beq	.L8
	ldr	r3, .L27+28
	mov	r2, #42
	ldr	r1, .L27+32
	ldr	r0, .L27+40
	bl	__assert_fail
.L8:
	ldr	r3, .L27+4
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L9
	ldr	r1, [fp, #-1024]
	ldr	r2, [fp, #-1020]
	ldr	r0, [fp, #-1016]
	ldr	r3, [fp, #-1012]
	str	r3, [sp]
	mov	r3, r0
	ldr	r0, .L27+44
	bl	printf
.L9:
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-1040]
	ldr	r3, [fp, #-1040]
	cmp	r3, #0
	bne	.L10
	ldr	r3, .L27+4
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L11
	ldr	r0, .L27+48
	bl	puts
.L11:
	ldr	r3, [fp, #-1020]
	str	r3, [fp, #-1036]
	ldr	r3, [fp, #-1016]
	str	r3, [fp, #-1032]
	mov	r3, #0
	str	r3, [fp, #-1048]
	b	.L12
.L16:
	sub	r0, fp, #1008
	ldr	r3, [fp, #-1048]
	ldr	r2, .L27+52
	ldr	r1, .L27+56
	bl	snprintf
	sub	r3, fp, #1008
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	str	r3, [fp, #-1028]
	ldr	r3, .L27+4
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L13
	sub	r3, fp, #1008
	ldr	r2, [fp, #-1036]
	ldr	r1, [fp, #-1028]
	ldr	r0, .L27+60
	bl	printf
.L13:
	ldr	r2, [fp, #-1028]
	sub	r3, fp, #1008
	mov	r1, r3
	ldr	r0, [fp, #-1036]
	bl	write
	str	r0, [fp, #-1040]
	ldr	r3, .L27+4
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L14
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, [fp, #-1040]
	ldr	r0, .L27+64
	bl	printf
.L14:
	sub	r3, fp, #1008
	mov	r2, #1000
	mov	r1, r3
	ldr	r0, [fp, #-1032]
	bl	read
	str	r0, [fp, #-1040]
	ldr	r3, .L27+4
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L15
	sub	r3, fp, #1008
	mov	r2, r3
	ldr	r1, [fp, #-1040]
	ldr	r0, .L27+68
	bl	printf
.L15:
	ldr	r3, [fp, #-1048]
	add	r3, r3, #1
	str	r3, [fp, #-1048]
.L12:
	ldr	r3, .L27+12
	ldr	r3, [r3]
	ldr	r2, [fp, #-1048]
	cmp	r2, r3
	blt	.L16
	b	.L17
.L10:
	ldr	r3, .L27+4
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L18
	ldr	r1, [fp, #-1040]
	ldr	r0, .L27+72
	bl	printf
.L18:
	ldr	r3, [fp, #-1012]
	str	r3, [fp, #-1036]
	ldr	r3, [fp, #-1024]
	str	r3, [fp, #-1032]
	mov	r3, #0
	str	r3, [fp, #-1048]
	b	.L19
.L23:
	sub	r3, fp, #1008
	mov	r2, #1000
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r3, fp, #1008
	mov	r2, #1000
	mov	r1, r3
	ldr	r0, [fp, #-1032]
	bl	read
	str	r0, [fp, #-1040]
	ldr	r3, .L27+4
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L20
	sub	r3, fp, #1008
	ldr	r2, [fp, #-1040]
	mov	r1, r3
	ldr	r0, .L27+76
	bl	printf
.L20:
	sub	r0, fp, #1008
	ldr	r3, [fp, #-1040]
	ldr	r2, .L27+80
	ldr	r1, .L27+56
	bl	snprintf
	sub	r3, fp, #1008
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	str	r3, [fp, #-1028]
	ldr	r2, [fp, #-1028]
	sub	r3, fp, #1008
	mov	r1, r3
	ldr	r0, [fp, #-1036]
	bl	write
	str	r0, [fp, #-1040]
	ldr	r3, .L27+4
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L21
	sub	r3, fp, #1008
	ldr	r2, [fp, #-1040]
	mov	r1, r3
	ldr	r0, .L27+84
	bl	printf
.L21:
	ldr	r2, [fp, #-1040]
	ldr	r3, [fp, #-1028]
	cmp	r2, r3
	beq	.L22
	ldr	r3, .L27+28
	mov	r2, #73
	ldr	r1, .L27+32
	ldr	r0, .L27+88
	bl	__assert_fail
.L22:
	ldr	r3, [fp, #-1048]
	add	r3, r3, #1
	str	r3, [fp, #-1048]
.L19:
	ldr	r3, .L27+12
	ldr	r3, [r3]
	ldr	r2, [fp, #-1048]
	cmp	r2, r3
	blt	.L23
.L17:
	mov	r3, #0
	ldr	r2, .L27
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L25
	bl	__stack_chk_fail
.L25:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L28:
	.align	2
.L27:
	.word	.LC15
	.word	g_debug
	.word	optarg
	.word	g_num
	.word	.LC0
	.word	stdout
	.word	stderr
	.word	__PRETTY_FUNCTION__.6282
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	999
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.size	main, .-main
	.section	.rodata
	.align	2
	.type	__PRETTY_FUNCTION__.6282, %object
	.size	__PRETTY_FUNCTION__.6282, 5
__PRETTY_FUNCTION__.6282:
	.ascii	"main\000"
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
