	.file	"180923.c"
	.intel_syntax noprefix
	.text
	.local	stop
	.comm	stop,4,4
	.type	handle_sig, @function
handle_sig:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -4[rbp], edi
	mov	DWORD PTR stop[rip], 1
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	handle_sig, .-handle_sig
	.section	.rodata
.LC0:
	.string	"Usage: %s <ip> <port>\n"
	.align 8
.LC1:
	.string	"failed parsing the ip address: %s\n"
.LC2:
	.string	"[%d] %s\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 72
	.cfi_offset 3, -24
	mov	DWORD PTR -68[rbp], edi
	mov	QWORD PTR -80[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -68[rbp], 3
	je	.L3
	mov	rax, QWORD PTR -80[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	__xpg_basename@PLT
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, -1
	jmp	.L10
.L3:
	lea	rsi, handle_sig[rip]
	mov	edi, 15
	call	signal@PLT
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -56[rbp], eax
	mov	WORD PTR -48[rbp], 2
	mov	rax, QWORD PTR -80[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	movzx	eax, ax
	mov	edi, eax
	call	htons@PLT
	mov	WORD PTR -46[rbp], ax
	mov	rax, QWORD PTR -80[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rdx, -48[rbp]
	add	rdx, 4
	mov	rsi, rax
	mov	edi, 2
	call	inet_pton@PLT
	mov	DWORD PTR -52[rbp], eax
	cmp	DWORD PTR -52[rbp], 1
	je	.L5
	mov	rax, QWORD PTR -80[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, -1
	jmp	.L10
.L5:
	lea	rcx, -48[rbp]
	mov	eax, DWORD PTR -56[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	bind@PLT
	mov	DWORD PTR -52[rbp], eax
	cmp	DWORD PTR -52[rbp], 0
	je	.L6
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rbx, rax
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	rdx, rbx
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, -1
	jmp	.L10
.L6:
	mov	eax, DWORD PTR -56[rbp]
	mov	esi, 5
	mov	edi, eax
	call	listen@PLT
	mov	DWORD PTR -52[rbp], eax
	cmp	DWORD PTR -52[rbp], 0
	je	.L8
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rbx, rax
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	rdx, rbx
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, -1
	jmp	.L10
.L9:
	mov	edi, 1
	call	sleep@PLT
.L8:
	mov	eax, DWORD PTR stop[rip]
	test	eax, eax
	je	.L9
	mov	eax, DWORD PTR -56[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
.L10:
	mov	rcx, QWORD PTR -24[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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	"180923.c"
	.text
	.local	stop
	.comm	stop,4,4
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	handle_sig, %function
handle_sig:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	ldr	r3, .L2
	mov	r2, #1
	str	r2, [r3]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L3:
	.align	2
.L2:
	.word	stop
	.size	handle_sig, .-handle_sig
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Usage: %s <ip> <port>\012\000"
	.align	2
.LC1:
	.ascii	"failed parsing the ip address: %s\012\000"
	.align	2
.LC2:
	.ascii	"[%d] %s\012\000"
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #44
	str	r0, [fp, #-48]
	str	r1, [fp, #-52]
	ldr	r3, .L14
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r3, [fp, #-48]
	cmp	r3, #3
	beq	.L5
	ldr	r3, [fp, #-52]
	ldr	r3, [r3]
	mov	r0, r3
	bl	__xpg_basename
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L14+4
	bl	printf
	mvn	r3, #0
	b	.L12
.L5:
	ldr	r1, .L14+8
	mov	r0, #15
	bl	signal
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-40]
	mov	r3, #2
	strh	r3, [fp, #-32]	@ movhi
	ldr	r3, [fp, #-52]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	mov	r0, r3
	bl	htons
	mov	r3, r0
	strh	r3, [fp, #-30]	@ movhi
	ldr	r3, [fp, #-52]
	add	r3, r3, #4
	ldr	r1, [r3]
	sub	r3, fp, #32
	add	r3, r3, #4
	mov	r2, r3
	mov	r0, #2
	bl	inet_pton
	str	r0, [fp, #-36]
	ldr	r3, [fp, #-36]
	cmp	r3, #1
	beq	.L7
	ldr	r3, [fp, #-52]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L14+12
	bl	printf
	mvn	r3, #0
	b	.L12
.L7:
	sub	r3, fp, #32
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-40]
	bl	bind
	str	r0, [fp, #-36]
	ldr	r3, [fp, #-36]
	cmp	r3, #0
	beq	.L8
	bl	__errno_location
	mov	r3, r0
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	mov	r1, r4
	ldr	r0, .L14+16
	bl	printf
	mvn	r3, #0
	b	.L12
.L8:
	mov	r1, #5
	ldr	r0, [fp, #-40]
	bl	listen
	str	r0, [fp, #-36]
	ldr	r3, [fp, #-36]
	cmp	r3, #0
	beq	.L10
	bl	__errno_location
	mov	r3, r0
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	mov	r1, r4
	ldr	r0, .L14+16
	bl	printf
	mvn	r3, #0
	b	.L12
.L11:
	mov	r0, #1
	bl	sleep
.L10:
	ldr	r3, .L14+20
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L11
	ldr	r0, [fp, #-40]
	bl	close
	mov	r3, #0
.L12:
	ldr	r2, .L14
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L13
	bl	__stack_chk_fail
.L13:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L15:
	.align	2
.L14:
	.word	.LC3
	.word	.LC0
	.word	handle_sig
	.word	.LC1
	.word	.LC2
	.word	stop
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
