	.file	"552687.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"bind"
.LC1:
	.string	"listen"
.LC2:
	.string	"accept"
.LC3:
	.string	"fork(1)"
.LC4:
	.string	"fork(2)"
	.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, 160
	mov	DWORD PTR -148[rbp], edi
	mov	QWORD PTR -160[rbp], rsi
	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 -144[rbp], eax
	lea	rax, -48[rbp]
	mov	edx, 16
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	WORD PTR -48[rbp], 2
	mov	edi, 0
	call	htonl@PLT
	mov	DWORD PTR -44[rbp], eax
	mov	edi, 9999
	call	htons@PLT
	mov	WORD PTR -46[rbp], ax
	lea	rcx, -48[rbp]
	mov	eax, DWORD PTR -144[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	bind@PLT
	test	eax, eax
	jns	.L2
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -128[rbp], 1
	mov	DWORD PTR -124[rbp], eax
	lea	rax, .LC0[rip]
	mov	QWORD PTR -88[rbp], rax
	mov	rdx, QWORD PTR -88[rbp]
	mov	ecx, DWORD PTR -124[rbp]
	mov	eax, DWORD PTR -128[rbp]
	mov	esi, ecx
	mov	edi, eax
	mov	eax, 0
	call	error@PLT
	nop
.L2:
	mov	eax, DWORD PTR -144[rbp]
	mov	esi, 2
	mov	edi, eax
	call	listen@PLT
	test	eax, eax
	jns	.L11
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -120[rbp], 1
	mov	DWORD PTR -116[rbp], eax
	lea	rax, .LC1[rip]
	mov	QWORD PTR -80[rbp], rax
	mov	rdx, QWORD PTR -80[rbp]
	mov	ecx, DWORD PTR -116[rbp]
	mov	eax, DWORD PTR -120[rbp]
	mov	esi, ecx
	mov	edi, eax
	mov	eax, 0
	call	error@PLT
	jmp	.L7
.L11:
	nop
.L3:
.L7:
	mov	eax, DWORD PTR -144[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	accept@PLT
	mov	DWORD PTR -140[rbp], eax
	cmp	DWORD PTR -140[rbp], 0
	jns	.L4
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -112[rbp], 1
	mov	DWORD PTR -108[rbp], eax
	lea	rax, .LC2[rip]
	mov	QWORD PTR -72[rbp], rax
	mov	rdx, QWORD PTR -72[rbp]
	mov	ecx, DWORD PTR -108[rbp]
	mov	eax, DWORD PTR -112[rbp]
	mov	esi, ecx
	mov	edi, eax
	mov	eax, 0
	call	error@PLT
	nop
.L4:
	call	fork@PLT
	mov	DWORD PTR -136[rbp], eax
	cmp	DWORD PTR -136[rbp], 0
	jns	.L5
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -104[rbp], 1
	mov	DWORD PTR -100[rbp], eax
	lea	rax, .LC3[rip]
	mov	QWORD PTR -64[rbp], rax
	mov	rdx, QWORD PTR -64[rbp]
	mov	ecx, DWORD PTR -100[rbp]
	mov	eax, DWORD PTR -104[rbp]
	mov	esi, ecx
	mov	edi, eax
	mov	eax, 0
	call	error@PLT
	nop
.L5:
	cmp	DWORD PTR -136[rbp], 0
	jle	.L6
	mov	eax, DWORD PTR -140[rbp]
	mov	edi, eax
	call	close@PLT
	mov	edi, 0
	call	wait@PLT
	jmp	.L7
.L6:
	call	fork@PLT
	mov	DWORD PTR -132[rbp], eax
	cmp	DWORD PTR -132[rbp], 0
	jns	.L8
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -96[rbp], 1
	mov	DWORD PTR -92[rbp], eax
	lea	rax, .LC4[rip]
	mov	QWORD PTR -56[rbp], rax
	mov	rdx, QWORD PTR -56[rbp]
	mov	ecx, DWORD PTR -92[rbp]
	mov	eax, DWORD PTR -96[rbp]
	mov	esi, ecx
	mov	edi, eax
	mov	eax, 0
	call	error@PLT
	nop
.L8:
	cmp	DWORD PTR -132[rbp], 0
	jle	.L9
	mov	edi, 0
	call	exit@PLT
.L9:
	movabs	rax, 8583909746840200552
	mov	QWORD PTR -22[rbp], rax
	mov	DWORD PTR -14[rbp], 1684828783
	mov	WORD PTR -10[rbp], 10
	lea	rcx, -22[rbp]
	mov	eax, DWORD PTR -140[rbp]
	mov	edx, 13
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	eax, DWORD PTR -140[rbp]
	mov	esi, 2
	mov	edi, eax
	call	shutdown@PLT
	mov	edi, 0
	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	"552687.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"bind\000"
	.align	2
.LC1:
	.ascii	"listen\000"
	.align	2
.LC2:
	.ascii	"accept\000"
	.align	2
.LC3:
	.ascii	"fork(1)\000"
	.align	2
.LC4:
	.ascii	"fork(2)\000"
	.align	2
.LC5:
	.ascii	"hello, world\012\000"
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 120
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #120
	str	r0, [fp, #-120]
	str	r1, [fp, #-124]
	ldr	r3, .L12
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-116]
	sub	r3, fp, #40
	mov	r2, #16
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #2
	strh	r3, [fp, #-40]	@ movhi
	mov	r0, #0
	bl	htonl
	mov	r3, r0
	str	r3, [fp, #-36]
	ldr	r0, .L12+4
	bl	htons
	mov	r3, r0
	strh	r3, [fp, #-38]	@ movhi
	sub	r3, fp, #40
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-116]
	bl	bind
	mov	r3, r0
	cmp	r3, #0
	bge	.L2
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r2, #1
	str	r2, [fp, #-100]
	str	r3, [fp, #-96]
	ldr	r3, .L12+8
	str	r3, [fp, #-92]
	ldr	r2, [fp, #-92]
	ldr	r1, [fp, #-96]
	ldr	r0, [fp, #-100]
	bl	error
	nop
.L2:
	mov	r1, #2
	ldr	r0, [fp, #-116]
	bl	listen
	mov	r3, r0
	cmp	r3, #0
	bge	.L11
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r2, #1
	str	r2, [fp, #-88]
	str	r3, [fp, #-84]
	ldr	r3, .L12+12
	str	r3, [fp, #-80]
	ldr	r2, [fp, #-80]
	ldr	r1, [fp, #-84]
	ldr	r0, [fp, #-88]
	bl	error
	b	.L7
.L11:
	nop
.L3:
.L7:
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-116]
	bl	accept
	str	r0, [fp, #-112]
	ldr	r3, [fp, #-112]
	cmp	r3, #0
	bge	.L4
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r2, #1
	str	r2, [fp, #-76]
	str	r3, [fp, #-72]
	ldr	r3, .L12+16
	str	r3, [fp, #-68]
	ldr	r2, [fp, #-68]
	ldr	r1, [fp, #-72]
	ldr	r0, [fp, #-76]
	bl	error
	nop
.L4:
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-108]
	ldr	r3, [fp, #-108]
	cmp	r3, #0
	bge	.L5
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r2, #1
	str	r2, [fp, #-64]
	str	r3, [fp, #-60]
	ldr	r3, .L12+20
	str	r3, [fp, #-56]
	ldr	r2, [fp, #-56]
	ldr	r1, [fp, #-60]
	ldr	r0, [fp, #-64]
	bl	error
	nop
.L5:
	ldr	r3, [fp, #-108]
	cmp	r3, #0
	ble	.L6
	ldr	r0, [fp, #-112]
	bl	close
	mov	r0, #0
	bl	wait
	b	.L7
.L6:
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-104]
	ldr	r3, [fp, #-104]
	cmp	r3, #0
	bge	.L8
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r2, #1
	str	r2, [fp, #-52]
	str	r3, [fp, #-48]
	ldr	r3, .L12+24
	str	r3, [fp, #-44]
	ldr	r2, [fp, #-44]
	ldr	r1, [fp, #-48]
	ldr	r0, [fp, #-52]
	bl	error
	nop
.L8:
	ldr	r3, [fp, #-104]
	cmp	r3, #0
	ble	.L9
	mov	r0, #0
	bl	exit
.L9:
	ldr	r3, .L12+28
	sub	ip, fp, #24
	ldm	r3, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2}
	strh	r3, [ip]	@ movhi
	sub	r3, fp, #24
	mov	r2, #13
	mov	r1, r3
	ldr	r0, [fp, #-112]
	bl	write
	mov	r1, #2
	ldr	r0, [fp, #-112]
	bl	shutdown
	mov	r0, #0
	bl	exit
.L13:
	.align	2
.L12:
	.word	.LC6
	.word	9999
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
