	.file	"232954968.c"
	.intel_syntax noprefix
	.text
	.globl	sig_child
	.type	sig_child, @function
sig_child:
.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, 16
	mov	DWORD PTR -4[rbp], edi
	nop
.L2:
	mov	edx, 1
	mov	esi, 0
	mov	edi, -1
	call	waitpid@PLT
	test	eax, eax
	jg	.L2
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	sig_child, .-sig_child
	.globl	child
	.type	child, @function
child:
.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, 4096
	or	QWORD PTR [rsp], 0
	sub	rsp, 48
	mov	DWORD PTR -4132[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
.L5:
	lea	rsi, -4112[rbp]
	mov	eax, DWORD PTR -4132[rbp]
	mov	ecx, 0
	mov	edx, 4096
	mov	edi, eax
	call	recv@PLT
	mov	DWORD PTR -4116[rbp], eax
	cmp	DWORD PTR -4116[rbp], 0
	jle	.L4
	mov	eax, DWORD PTR -4116[rbp]
	movsx	rdx, eax
	lea	rsi, -4112[rbp]
	mov	eax, DWORD PTR -4132[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
.L4:
	cmp	DWORD PTR -4116[rbp], 0
	jg	.L5
	mov	eax, DWORD PTR -4132[rbp]
	mov	edi, eax
	mov	eax, 0
	call	close@PLT
	mov	edi, 0
	call	exit@PLT
	.cfi_endproc
.LFE7:
	.size	child, .-child
	.section	.rodata
.LC0:
	.string	"sigaction() failed"
.LC1:
	.string	"Connections=%d\r"
.LC2:
	.string	"fork() failed"
.LC3:
	.string	"bind() failed"
	.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, 208
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -192[rbp], 0
	lea	rax, -160[rbp]
	mov	rsi, rax
	mov	eax, 0
	mov	edx, 19
	mov	rdi, rsi
	mov	rcx, rdx
	rep stosq
	lea	rax, sig_child[rip]
	mov	QWORD PTR -160[rbp], rax
	mov	DWORD PTR -24[rbp], 268435457
	lea	rax, -160[rbp]
	mov	edx, 0
	mov	rsi, rax
	mov	edi, 17
	call	sigaction@PLT
	test	eax, eax
	je	.L8
	lea	rdi, .LC0[rip]
	call	perror@PLT
.L8:
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -188[rbp], eax
	lea	rax, -176[rbp]
	mov	QWORD PTR [rax], 0
	mov	QWORD PTR 8[rax], 0
	mov	WORD PTR -176[rbp], 2
	mov	edi, 9999
	call	htons@PLT
	mov	WORD PTR -174[rbp], ax
	mov	DWORD PTR -172[rbp], 0
	lea	rcx, -176[rbp]
	mov	eax, DWORD PTR -188[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	bind@PLT
	test	eax, eax
	jne	.L9
	mov	eax, DWORD PTR -188[rbp]
	mov	esi, 20
	mov	edi, eax
	call	listen@PLT
.L13:
	mov	DWORD PTR -196[rbp], 16
	lea	rdx, -196[rbp]
	lea	rcx, -176[rbp]
	mov	eax, DWORD PTR -188[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	accept@PLT
	mov	DWORD PTR -184[rbp], eax
	add	DWORD PTR -192[rbp], 1
	mov	eax, DWORD PTR -192[rbp]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	cmp	DWORD PTR -184[rbp], 0
	jle	.L13
	call	fork@PLT
	mov	DWORD PTR -180[rbp], eax
	cmp	DWORD PTR -180[rbp], 0
	jne	.L11
	mov	eax, DWORD PTR -188[rbp]
	mov	edi, eax
	mov	eax, 0
	call	close@PLT
	mov	eax, DWORD PTR -184[rbp]
	mov	edi, eax
	call	child
	jmp	.L13
.L11:
	cmp	DWORD PTR -180[rbp], 0
	jle	.L12
	mov	eax, DWORD PTR -184[rbp]
	mov	edi, eax
	mov	eax, 0
	call	close@PLT
	jmp	.L13
.L12:
	lea	rdi, .LC2[rip]
	call	perror@PLT
	jmp	.L13
.L9:
	lea	rdi, .LC3[rip]
	call	perror@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	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	"232954968.c"
	.text
	.align	2
	.global	sig_child
	.syntax unified
	.arm
	.fpu softvfp
	.type	sig_child, %function
sig_child:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	nop
.L2:
	mov	r2, #1
	mov	r1, #0
	mvn	r0, #0
	bl	waitpid
	mov	r3, r0
	cmp	r3, #0
	bgt	.L2
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	sig_child, .-sig_child
	.section	.rodata
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	child
	.syntax unified
	.arm
	.fpu softvfp
	.type	child, %function
child:
	@ args = 0, pretend = 0, frame = 4112
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #4096
	sub	sp, sp, #20
	sub	r3, fp, #4096
	sub	r3, r3, #12
	str	r0, [r3, #-12]
	ldr	r3, .L7
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
.L5:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	sub	r1, fp, #4096
	sub	r1, r1, #12
	sub	r1, r1, #4
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r0, r3
	mov	r3, #0
	mov	r2, #4096
	ldr	r0, [r0, #-12]
	bl	recv
	str	r0, [r4, #-8]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-8]
	cmp	r3, #0
	ble	.L4
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r2, [r3, #-8]
	sub	r1, fp, #4096
	sub	r1, r1, #12
	sub	r1, r1, #4
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r0, r3
	mov	r3, #0
	ldr	r0, [r0, #-12]
	bl	send
.L4:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-8]
	cmp	r3, #0
	bgt	.L5
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r0, [r3, #-12]
	bl	close
	mov	r0, #0
	bl	exit
.L8:
	.align	2
.L7:
	.word	.LC0
	.size	child, .-child
	.section	.rodata
	.align	2
.LC1:
	.ascii	"sigaction() failed\000"
	.align	2
.LC2:
	.ascii	"Connections=%d\015\000"
	.align	2
.LC3:
	.ascii	"fork() failed\000"
	.align	2
.LC4:
	.ascii	"bind() failed\000"
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 184
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #184
	ldr	r3, .L18
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-180]
	sub	r3, fp, #148
	mov	r0, r3
	mov	r3, #140
	mov	r2, r3
	mov	r1, #0
	bl	memset
	ldr	r3, .L18+4
	str	r3, [fp, #-148]
	mov	r3, #268435457
	str	r3, [fp, #-16]
	sub	r3, fp, #148
	mov	r2, #0
	mov	r1, r3
	mov	r0, #17
	bl	sigaction
	mov	r3, r0
	cmp	r3, #0
	beq	.L10
	ldr	r0, .L18+8
	bl	perror
.L10:
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-176]
	sub	r3, fp, #164
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2]
	str	r3, [r2, #4]
	str	r3, [r2, #8]
	str	r3, [r2, #12]
	mov	r3, #2
	strh	r3, [fp, #-164]	@ movhi
	ldr	r0, .L18+12
	bl	htons
	mov	r3, r0
	strh	r3, [fp, #-162]	@ movhi
	mov	r3, #0
	str	r3, [fp, #-160]
	sub	r3, fp, #164
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-176]
	bl	bind
	mov	r3, r0
	cmp	r3, #0
	bne	.L11
	mov	r1, #20
	ldr	r0, [fp, #-176]
	bl	listen
.L15:
	mov	r3, #16
	str	r3, [fp, #-184]
	sub	r2, fp, #184
	sub	r3, fp, #164
	mov	r1, r3
	ldr	r0, [fp, #-176]
	bl	accept
	str	r0, [fp, #-172]
	ldr	r3, [fp, #-180]
	add	r3, r3, #1
	str	r3, [fp, #-180]
	ldr	r1, [fp, #-180]
	ldr	r0, .L18+16
	bl	printf
	ldr	r3, [fp, #-172]
	cmp	r3, #0
	ble	.L15
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-168]
	ldr	r3, [fp, #-168]
	cmp	r3, #0
	bne	.L13
	ldr	r0, [fp, #-176]
	bl	close
	ldr	r0, [fp, #-172]
	bl	child
	b	.L15
.L13:
	ldr	r3, [fp, #-168]
	cmp	r3, #0
	ble	.L14
	ldr	r0, [fp, #-172]
	bl	close
	b	.L15
.L14:
	ldr	r0, .L18+20
	bl	perror
	b	.L15
.L11:
	ldr	r0, .L18+24
	bl	perror
	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	.LC5
	.word	sig_child
	.word	.LC1
	.word	9999
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
