	.file	"149991.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Enter Port: "
.LC1:
	.string	"%d"
.LC2:
	.string	"socket"
.LC3:
	.string	"bind"
.LC4:
	.string	"listen"
.LC5:
	.string	"signal"
.LC6:
	.string	"pthread_attr_init"
.LC7:
	.string	"pthread_attr_setdetachstate"
.LC8:
	.string	"malloc"
.LC9:
	.string	"accept"
.LC10:
	.string	"pthread_create"
	.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
	add	rsp, -128
	mov	DWORD PTR -116[rbp], edi
	mov	QWORD PTR -128[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -116[rbp], 1
	jle	.L2
	mov	rax, QWORD PTR -128[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	jmp	.L3
.L2:
	mov	eax, 0
.L3:
	mov	DWORD PTR -112[rbp], eax
	mov	eax, DWORD PTR -112[rbp]
	test	eax, eax
	jne	.L4
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -112[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
.L4:
	lea	rax, -80[rbp]
	mov	edx, 16
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	WORD PTR -80[rbp], 2
	mov	eax, DWORD PTR -112[rbp]
	movzx	eax, ax
	mov	edi, eax
	call	htons@PLT
	mov	WORD PTR -78[rbp], ax
	mov	DWORD PTR -76[rbp], 0
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -104[rbp], eax
	cmp	DWORD PTR -104[rbp], -1
	jne	.L5
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L5:
	lea	rcx, -80[rbp]
	mov	eax, DWORD PTR -104[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	bind@PLT
	cmp	eax, -1
	jne	.L6
	lea	rdi, .LC3[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L6:
	mov	eax, DWORD PTR -104[rbp]
	mov	esi, 10
	mov	edi, eax
	call	listen@PLT
	cmp	eax, -1
	jne	.L7
	lea	rdi, .LC4[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L7:
	mov	esi, 1
	mov	edi, 13
	call	signal@PLT
	cmp	rax, -1
	jne	.L8
	lea	rdi, .LC5[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L8:
	lea	rsi, signal_handler[rip]
	mov	edi, 15
	call	signal@PLT
	cmp	rax, -1
	jne	.L9
	lea	rdi, .LC5[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L9:
	lea	rsi, signal_handler[rip]
	mov	edi, 2
	call	signal@PLT
	cmp	rax, -1
	jne	.L10
	lea	rdi, .LC5[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L10:
	lea	rax, -64[rbp]
	mov	rdi, rax
	call	pthread_attr_init@PLT
	test	eax, eax
	je	.L11
	lea	rdi, .LC6[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L11:
	lea	rax, -64[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	pthread_attr_setdetachstate@PLT
	test	eax, eax
	je	.L12
	lea	rdi, .LC7[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L12:
	mov	edi, 20
	call	malloc@PLT
	mov	QWORD PTR -88[rbp], rax
	cmp	QWORD PTR -88[rbp], 0
	jne	.L13
	lea	rdi, .LC8[rip]
	call	perror@PLT
	jmp	.L14
.L13:
	mov	DWORD PTR -108[rbp], 16
	mov	rax, QWORD PTR -88[rbp]
	lea	rcx, 4[rax]
	lea	rdx, -108[rbp]
	mov	eax, DWORD PTR -104[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	accept@PLT
	mov	DWORD PTR -100[rbp], eax
	cmp	DWORD PTR -100[rbp], -1
	jne	.L15
	lea	rdi, .LC9[rip]
	call	perror@PLT
	mov	rax, QWORD PTR -88[rbp]
	mov	rdi, rax
	call	free@PLT
	jmp	.L14
.L15:
	mov	rax, QWORD PTR -88[rbp]
	mov	edx, DWORD PTR -100[rbp]
	mov	DWORD PTR [rax], edx
	mov	rdx, QWORD PTR -88[rbp]
	lea	rsi, -64[rbp]
	lea	rax, -96[rbp]
	mov	rcx, rdx
	lea	rdx, pthread_routine[rip]
	mov	rdi, rax
	call	pthread_create@PLT
	test	eax, eax
	je	.L12
	lea	rdi, .LC10[rip]
	call	perror@PLT
	mov	rax, QWORD PTR -88[rbp]
	mov	rdi, rax
	call	free@PLT
	nop
.L14:
	jmp	.L12
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.globl	pthread_routine
	.type	pthread_routine, @function
pthread_routine:
.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, 64
	mov	QWORD PTR -56[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -56[rbp]
	mov	QWORD PTR -40[rbp], rax
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -44[rbp], eax
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR 12[rax]
	mov	rax, QWORD PTR 4[rax]
	mov	QWORD PTR -32[rbp], rax
	mov	QWORD PTR -24[rbp], rdx
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	eax, DWORD PTR -44[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	pthread_routine, .-pthread_routine
	.globl	signal_handler
	.type	signal_handler, @function
signal_handler:
.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, 16
	mov	DWORD PTR -4[rbp], edi
	mov	edi, 0
	call	exit@PLT
	.cfi_endproc
.LFE8:
	.size	signal_handler, .-signal_handler
	.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	"149991.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Enter Port: \000"
	.align	2
.LC1:
	.ascii	"%d\000"
	.align	2
.LC2:
	.ascii	"socket\000"
	.align	2
.LC3:
	.ascii	"bind\000"
	.align	2
.LC4:
	.ascii	"listen\000"
	.align	2
.LC5:
	.ascii	"signal\000"
	.align	2
.LC6:
	.ascii	"pthread_attr_init\000"
	.align	2
.LC7:
	.ascii	"pthread_attr_setdetachstate\000"
	.align	2
.LC8:
	.ascii	"malloc\000"
	.align	2
.LC9:
	.ascii	"accept\000"
	.align	2
.LC10:
	.ascii	"pthread_create\000"
	.align	2
.LC11:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 88
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #88
	str	r0, [fp, #-88]
	str	r1, [fp, #-92]
	ldr	r3, .L17
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-88]
	cmp	r3, #1
	ble	.L2
	ldr	r3, [fp, #-92]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	b	.L3
.L2:
	mov	r3, #0
.L3:
	str	r3, [fp, #-84]
	ldr	r3, [fp, #-84]
	cmp	r3, #0
	bne	.L4
	ldr	r0, .L17+4
	bl	printf
	sub	r3, fp, #84
	mov	r1, r3
	ldr	r0, .L17+8
	bl	__isoc99_scanf
.L4:
	sub	r3, fp, #60
	mov	r2, #16
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #2
	strh	r3, [fp, #-60]	@ movhi
	ldr	r3, [fp, #-84]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	mov	r0, r3
	bl	htons
	mov	r3, r0
	strh	r3, [fp, #-58]	@ movhi
	mov	r3, #0
	str	r3, [fp, #-56]
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-72]
	ldr	r3, [fp, #-72]
	cmn	r3, #1
	bne	.L5
	ldr	r0, .L17+12
	bl	perror
	mov	r0, #1
	bl	exit
.L5:
	sub	r3, fp, #60
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-72]
	bl	bind
	mov	r3, r0
	cmn	r3, #1
	bne	.L6
	ldr	r0, .L17+16
	bl	perror
	mov	r0, #1
	bl	exit
.L6:
	mov	r1, #10
	ldr	r0, [fp, #-72]
	bl	listen
	mov	r3, r0
	cmn	r3, #1
	bne	.L7
	ldr	r0, .L17+20
	bl	perror
	mov	r0, #1
	bl	exit
.L7:
	mov	r1, #1
	mov	r0, #13
	bl	signal
	mov	r3, r0
	cmn	r3, #1
	bne	.L8
	ldr	r0, .L17+24
	bl	perror
	mov	r0, #1
	bl	exit
.L8:
	ldr	r1, .L17+28
	mov	r0, #15
	bl	signal
	mov	r3, r0
	cmn	r3, #1
	bne	.L9
	ldr	r0, .L17+24
	bl	perror
	mov	r0, #1
	bl	exit
.L9:
	ldr	r1, .L17+28
	mov	r0, #2
	bl	signal
	mov	r3, r0
	cmn	r3, #1
	bne	.L10
	ldr	r0, .L17+24
	bl	perror
	mov	r0, #1
	bl	exit
.L10:
	sub	r3, fp, #44
	mov	r0, r3
	bl	pthread_attr_init
	mov	r3, r0
	cmp	r3, #0
	beq	.L11
	ldr	r0, .L17+32
	bl	perror
	mov	r0, #1
	bl	exit
.L11:
	sub	r3, fp, #44
	mov	r1, #1
	mov	r0, r3
	bl	pthread_attr_setdetachstate
	mov	r3, r0
	cmp	r3, #0
	beq	.L12
	ldr	r0, .L17+36
	bl	perror
	mov	r0, #1
	bl	exit
.L12:
	mov	r0, #20
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-68]
	ldr	r3, [fp, #-68]
	cmp	r3, #0
	bne	.L13
	ldr	r0, .L17+40
	bl	perror
	b	.L14
.L13:
	mov	r3, #16
	str	r3, [fp, #-76]
	ldr	r3, [fp, #-68]
	add	r3, r3, #4
	sub	r2, fp, #76
	mov	r1, r3
	ldr	r0, [fp, #-72]
	bl	accept
	str	r0, [fp, #-64]
	ldr	r3, [fp, #-64]
	cmn	r3, #1
	bne	.L15
	ldr	r0, .L17+44
	bl	perror
	ldr	r0, [fp, #-68]
	bl	free
	b	.L14
.L15:
	ldr	r3, [fp, #-68]
	ldr	r2, [fp, #-64]
	str	r2, [r3]
	sub	r1, fp, #44
	sub	r0, fp, #80
	ldr	r3, [fp, #-68]
	ldr	r2, .L17+48
	bl	pthread_create
	mov	r3, r0
	cmp	r3, #0
	beq	.L12
	ldr	r0, .L17+52
	bl	perror
	ldr	r0, [fp, #-68]
	bl	free
	nop
.L14:
	b	.L12
.L18:
	.align	2
.L17:
	.word	.LC11
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	signal_handler
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	pthread_routine
	.word	.LC10
	.size	main, .-main
	.section	.rodata
	.align	2
.LC12:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	pthread_routine
	.syntax unified
	.arm
	.fpu softvfp
	.type	pthread_routine, %function
pthread_routine:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	str	r0, [fp, #-40]
	ldr	r3, .L22
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-40]
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-32]
	ldr	r3, [r3]
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-32]
	sub	ip, fp, #24
	add	r3, r3, #4
	ldm	r3, {r0, r1, r2, r3}
	stm	ip, {r0, r1, r2, r3}
	ldr	r0, [fp, #-40]
	bl	free
	ldr	r0, [fp, #-28]
	bl	close
	mov	r3, #0
	ldr	r2, .L22
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L21
	bl	__stack_chk_fail
.L21:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L23:
	.align	2
.L22:
	.word	.LC12
	.size	pthread_routine, .-pthread_routine
	.align	2
	.global	signal_handler
	.syntax unified
	.arm
	.fpu softvfp
	.type	signal_handler, %function
signal_handler:
	@ 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]
	mov	r0, #0
	bl	exit
	.size	signal_handler, .-signal_handler
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
