	.file	"673135.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"A: socket() failed"
.LC1:
	.string	"A: setsockopt() failed"
.LC2:
	.string	"A: bind() failed"
.LC3:
	.string	"A: listen() failed"
.LC4:
	.string	"A: accept() failed"
.LC5:
	.string	"Hello!"
.LC6:
	.string	"Are you OK?"
	.text
	.globl	host_A
	.type	host_A, @function
host_A:
.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, 1104
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -1084[rbp], eax
	cmp	DWORD PTR -1084[rbp], 0
	jne	.L2
	lea	rdi, .LC0[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	mov	DWORD PTR -1092[rbp], 1
	lea	rdx, -1092[rbp]
	mov	eax, DWORD PTR -1084[rbp]
	mov	r8d, 4
	mov	rcx, rdx
	mov	edx, 15
	mov	esi, 1
	mov	edi, eax
	call	setsockopt@PLT
	test	eax, eax
	je	.L3
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L3:
	mov	DWORD PTR -1088[rbp], 16
	mov	WORD PTR -1056[rbp], 2
	mov	DWORD PTR -1052[rbp], 0
	mov	edi, 1145
	call	htons@PLT
	mov	WORD PTR -1054[rbp], ax
	lea	rcx, -1056[rbp]
	mov	eax, DWORD PTR -1084[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	bind@PLT
	test	eax, eax
	jns	.L4
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L4:
	mov	eax, DWORD PTR -1084[rbp]
	mov	esi, 3
	mov	edi, eax
	call	listen@PLT
	test	eax, eax
	jns	.L5
	lea	rdi, .LC3[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L5:
	lea	rdx, -1088[rbp]
	lea	rcx, -1056[rbp]
	mov	eax, DWORD PTR -1084[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	accept@PLT
	mov	DWORD PTR -1080[rbp], eax
	cmp	DWORD PTR -1080[rbp], 0
	jns	.L6
	lea	rdi, .LC4[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L6:
	mov	QWORD PTR -1040[rbp], 0
	mov	QWORD PTR -1032[rbp], 0
	lea	rdx, -1024[rbp]
	mov	eax, 0
	mov	ecx, 126
	mov	rdi, rdx
	rep stosq
	lea	rax, .LC5[rip]
	mov	QWORD PTR -1072[rbp], rax
	lea	rax, .LC6[rip]
	mov	QWORD PTR -1064[rbp], rax
	mov	rax, QWORD PTR -1072[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	mov	rsi, QWORD PTR -1072[rbp]
	mov	eax, DWORD PTR -1080[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
	mov	rax, QWORD PTR -1064[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	mov	rsi, QWORD PTR -1064[rbp]
	mov	eax, DWORD PTR -1080[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
	lea	rcx, -1040[rbp]
	mov	eax, DWORD PTR -1080[rbp]
	mov	edx, 1024
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -1076[rbp], eax
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L7
	call	__stack_chk_fail@PLT
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	host_A, .-host_A
	.section	.rodata
.LC7:
	.string	"B: socket() failed"
.LC8:
	.string	"127.0.0.1"
.LC9:
	.string	"B: invalid address"
.LC10:
	.string	"B: connect() failed"
	.text
	.globl	host_B
	.type	host_B, @function
host_B:
.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, 1088
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -1088[rbp], eax
	cmp	DWORD PTR -1088[rbp], 0
	jns	.L9
	lea	rdi, .LC7[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L9:
	mov	WORD PTR -1072[rbp], 2
	mov	edi, 5141
	call	htons@PLT
	mov	WORD PTR -1070[rbp], ax
	lea	rcx, -1072[rbp]
	mov	eax, DWORD PTR -1088[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	bind@PLT
	test	eax, eax
	jns	.L10
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L10:
	mov	WORD PTR -1056[rbp], 2
	mov	edi, 1145
	call	htons@PLT
	mov	WORD PTR -1054[rbp], ax
	lea	rax, -1056[rbp]
	add	rax, 4
	mov	rdx, rax
	lea	rsi, .LC8[rip]
	mov	edi, 2
	mov	eax, 0
	call	inet_pton@PLT
	test	eax, eax
	jg	.L11
	lea	rdi, .LC9[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L11:
	lea	rcx, -1056[rbp]
	mov	eax, DWORD PTR -1088[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	connect@PLT
	test	eax, eax
	jns	.L12
	lea	rdi, .LC10[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L12:
	mov	QWORD PTR -1040[rbp], 0
	mov	QWORD PTR -1032[rbp], 0
	lea	rdx, -1024[rbp]
	mov	eax, 0
	mov	ecx, 126
	mov	rdi, rdx
	rep stosq
	lea	rcx, -1040[rbp]
	mov	eax, DWORD PTR -1088[rbp]
	mov	edx, 1024
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -1084[rbp], eax
	lea	rax, .LC5[rip]
	mov	QWORD PTR -1080[rbp], rax
	mov	rax, QWORD PTR -1080[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	mov	rsi, QWORD PTR -1080[rbp]
	mov	eax, DWORD PTR -1088[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
	lea	rcx, -1040[rbp]
	mov	eax, DWORD PTR -1088[rbp]
	mov	edx, 1024
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -1084[rbp], eax
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	host_B, .-host_B
	.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
	mov	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	call	fork@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	jne	.L15
	mov	edi, 1
	call	sleep@PLT
	mov	eax, 0
	call	host_B
	jmp	.L16
.L15:
	mov	eax, 0
	call	host_A
.L16:
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.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	"673135.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"A: socket() failed\000"
	.align	2
.LC1:
	.ascii	"A: setsockopt() failed\000"
	.align	2
.LC2:
	.ascii	"A: bind() failed\000"
	.align	2
.LC3:
	.ascii	"A: listen() failed\000"
	.align	2
.LC4:
	.ascii	"A: accept() failed\000"
	.align	2
.LC5:
	.ascii	"Hello!\000"
	.align	2
.LC6:
	.ascii	"Are you OK?\000"
	.align	2
.LC7:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	host_A
	.syntax unified
	.arm
	.fpu softvfp
	.type	host_A, %function
host_A:
	@ args = 0, pretend = 0, frame = 1072
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1072
	sub	sp, sp, #8
	ldr	r3, .L8
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-1068]
	ldr	r3, [fp, #-1068]
	cmp	r3, #0
	bne	.L2
	ldr	r0, .L8+4
	bl	perror
	mov	r0, #1
	bl	exit
.L2:
	mov	r3, #1
	str	r3, [fp, #-1076]
	sub	r3, fp, #1072
	sub	r3, r3, #4
	mov	r2, #4
	str	r2, [sp]
	mov	r2, #15
	mov	r1, #1
	ldr	r0, [fp, #-1068]
	bl	setsockopt
	mov	r3, r0
	cmp	r3, #0
	beq	.L3
	ldr	r0, .L8+8
	bl	perror
	mov	r0, #1
	bl	exit
.L3:
	mov	r3, #16
	str	r3, [fp, #-1072]
	sub	r3, fp, #4
	sub	r3, r3, #1040
	sub	r3, r3, #4
	mov	r2, #2
	strh	r2, [r3]	@ movhi
	mov	r3, #0
	str	r3, [fp, #-1044]
	ldr	r0, .L8+12
	bl	htons
	mov	r3, r0
	mov	r2, r3
	sub	r3, fp, #4
	sub	r3, r3, #1040
	sub	r3, r3, #4
	strh	r2, [r3, #2]	@ movhi
	sub	r3, fp, #1040
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-1068]
	bl	bind
	mov	r3, r0
	cmp	r3, #0
	bge	.L4
	ldr	r0, .L8+16
	bl	perror
	mov	r0, #1
	bl	exit
.L4:
	mov	r1, #3
	ldr	r0, [fp, #-1068]
	bl	listen
	mov	r3, r0
	cmp	r3, #0
	bge	.L5
	ldr	r0, .L8+20
	bl	perror
	mov	r0, #1
	bl	exit
.L5:
	sub	r2, fp, #1056
	sub	r2, r2, #4
	sub	r2, r2, #12
	sub	r3, fp, #1040
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, [fp, #-1068]
	bl	accept
	str	r0, [fp, #-1064]
	ldr	r3, [fp, #-1064]
	cmp	r3, #0
	bge	.L6
	ldr	r0, .L8+24
	bl	perror
	mov	r0, #1
	bl	exit
.L6:
	mov	r3, #0
	str	r3, [fp, #-1032]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	mov	r2, #1020
	mov	r1, #0
	mov	r0, r3
	bl	memset
	ldr	r3, .L8+28
	str	r3, [fp, #-1060]
	ldr	r3, .L8+32
	str	r3, [fp, #-1056]
	ldr	r0, [fp, #-1060]
	bl	strlen
	mov	r2, r0
	mov	r3, #0
	ldr	r1, [fp, #-1060]
	ldr	r0, [fp, #-1064]
	bl	send
	ldr	r0, [fp, #-1056]
	bl	strlen
	mov	r2, r0
	mov	r3, #0
	ldr	r1, [fp, #-1056]
	ldr	r0, [fp, #-1064]
	bl	send
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #1024
	mov	r1, r3
	ldr	r0, [fp, #-1064]
	bl	read
	str	r0, [fp, #-1052]
	nop
	ldr	r3, .L8
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L7
	bl	__stack_chk_fail
.L7:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L9:
	.align	2
.L8:
	.word	.LC7
	.word	.LC0
	.word	.LC1
	.word	1145
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.size	host_A, .-host_A
	.section	.rodata
	.align	2
.LC8:
	.ascii	"B: socket() failed\000"
	.align	2
.LC9:
	.ascii	"127.0.0.1\000"
	.align	2
.LC10:
	.ascii	"B: invalid address\000"
	.align	2
.LC11:
	.ascii	"B: connect() failed\000"
	.align	2
.LC12:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	host_B
	.syntax unified
	.arm
	.fpu softvfp
	.type	host_B, %function
host_B:
	@ args = 0, pretend = 0, frame = 1072
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1072
	ldr	r3, .L16
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-1076]
	ldr	r3, [fp, #-1076]
	cmp	r3, #0
	bge	.L11
	ldr	r0, .L16+4
	bl	perror
	mov	r0, #1
	bl	exit
.L11:
	sub	r3, fp, #4
	sub	r3, r3, #1056
	sub	r3, r3, #4
	mov	r2, #2
	strh	r2, [r3]	@ movhi
	ldr	r0, .L16+8
	bl	htons
	mov	r3, r0
	mov	r2, r3
	sub	r3, fp, #4
	sub	r3, r3, #1056
	sub	r3, r3, #4
	strh	r2, [r3, #2]	@ movhi
	sub	r3, fp, #1056
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-1076]
	bl	bind
	mov	r3, r0
	cmp	r3, #0
	bge	.L12
	ldr	r0, .L16+12
	bl	perror
	mov	r0, #1
	bl	exit
.L12:
	sub	r3, fp, #4
	sub	r3, r3, #1040
	sub	r3, r3, #4
	mov	r2, #2
	strh	r2, [r3]	@ movhi
	ldr	r0, .L16+16
	bl	htons
	mov	r3, r0
	mov	r2, r3
	sub	r3, fp, #4
	sub	r3, r3, #1040
	sub	r3, r3, #4
	strh	r2, [r3, #2]	@ movhi
	sub	r3, fp, #1040
	sub	r3, r3, #4
	sub	r3, r3, #4
	add	r3, r3, #4
	mov	r2, r3
	ldr	r1, .L16+20
	mov	r0, #2
	bl	inet_pton
	mov	r3, r0
	cmp	r3, #0
	bgt	.L13
	ldr	r0, .L16+24
	bl	perror
	mov	r0, #1
	bl	exit
.L13:
	sub	r3, fp, #1040
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-1076]
	bl	connect
	mov	r3, r0
	cmp	r3, #0
	bge	.L14
	ldr	r0, .L16+28
	bl	perror
	mov	r0, #1
	bl	exit
.L14:
	mov	r3, #0
	str	r3, [fp, #-1032]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	mov	r2, #1020
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #1024
	mov	r1, r3
	ldr	r0, [fp, #-1076]
	bl	read
	str	r0, [fp, #-1072]
	ldr	r3, .L16+32
	str	r3, [fp, #-1068]
	ldr	r0, [fp, #-1068]
	bl	strlen
	mov	r2, r0
	mov	r3, #0
	ldr	r1, [fp, #-1068]
	ldr	r0, [fp, #-1076]
	bl	send
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #1024
	mov	r1, r3
	ldr	r0, [fp, #-1076]
	bl	read
	str	r0, [fp, #-1072]
	nop
	ldr	r3, .L16
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L15
	bl	__stack_chk_fail
.L15:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L17:
	.align	2
.L16:
	.word	.LC12
	.word	.LC8
	.word	5141
	.word	.LC2
	.word	1145
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC5
	.size	host_B, .-host_B
	.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
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L19
	mov	r0, #1
	bl	sleep
	bl	host_B
	b	.L20
.L19:
	bl	host_A
.L20:
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
