	.file	"200143069.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"tcp"
.LC1:
	.string	"unknown port %s\n"
.LC2:
	.string	"bad port number %d\n"
	.align 8
.LC3:
	.string	"\"%s\" unknown host or address!\n"
	.text
	.globl	parse_addr
	.type	parse_addr, @function
parse_addr:
.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, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	QWORD PTR -48[rbp], rsi
	mov	DWORD PTR -28[rbp], 0
	mov	rax, QWORD PTR -48[rbp]
	mov	esi, 58
	mov	rdi, rax
	call	strrchr@PLT
	mov	QWORD PTR -24[rbp], rax
	cmp	QWORD PTR -24[rbp], 0
	je	.L2
	mov	rax, QWORD PTR -24[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -24[rbp], rdx
	mov	BYTE PTR [rax], 0
.L2:
	cmp	QWORD PTR -24[rbp], 0
	je	.L3
	call	__ctype_b_loc@PLT
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR [rax]
	movsx	rax, al
	add	rax, rax
	add	rax, rdx
	movzx	eax, WORD PTR [rax]
	movzx	eax, ax
	and	eax, 2048
	test	eax, eax
	jne	.L4
	mov	rax, QWORD PTR -24[rbp]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	call	getservbyname@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	je	.L5
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR 16[rax]
	movzx	eax, ax
	mov	edi, eax
	call	ntohs@PLT
	movzx	eax, ax
	mov	DWORD PTR -28[rbp], eax
	jmp	.L3
.L5:
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -24[rbp]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, -1
	jmp	.L6
.L4:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -28[rbp], eax
.L3:
	cmp	DWORD PTR -28[rbp], 0
	js	.L7
	cmp	DWORD PTR -28[rbp], 65535
	jle	.L8
.L7:
	mov	rax, QWORD PTR stderr[rip]
	mov	edx, DWORD PTR -28[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, -1
	jmp	.L6
.L8:
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR [rax], 0
	mov	QWORD PTR 8[rax], 0
	mov	rax, QWORD PTR -40[rbp]
	mov	WORD PTR [rax], 2
	mov	eax, DWORD PTR -28[rbp]
	movzx	eax, ax
	mov	edi, eax
	call	htons@PLT
	mov	rdx, QWORD PTR -40[rbp]
	mov	WORD PTR 2[rdx], ax
	mov	rax, QWORD PTR -48[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L9
	mov	rax, QWORD PTR -40[rbp]
	mov	DWORD PTR 4[rax], 0
	jmp	.L10
.L9:
	mov	rax, QWORD PTR -48[rbp]
	mov	rdi, rax
	call	inet_addr@PLT
	mov	rdx, QWORD PTR -40[rbp]
	mov	DWORD PTR 4[rdx], eax
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR 4[rax]
	cmp	eax, -1
	jne	.L10
	mov	rax, QWORD PTR -48[rbp]
	mov	rdi, rax
	call	gethostbyname@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L11
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -48[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, -1
	jmp	.L6
.L11:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 20[rax]
	movsx	rdx, eax
	mov	rax, QWORD PTR -40[rbp]
	lea	rcx, 4[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	mov	rdi, rcx
	call	memmove@PLT
.L10:
	mov	eax, 0
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	parse_addr, .-parse_addr
	.section	.rodata
.LC4:
	.string	"-fd"
.LC5:
	.string	"Unknown protocol: %s\n"
	.text
	.globl	new_entry
	.type	new_entry, @function
new_entry:
.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, 48
	mov	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	mov	edi, 48
	call	malloc@PLT
	mov	QWORD PTR -24[rbp], rax
	cmp	QWORD PTR -24[rbp], 0
	jne	.L13
	mov	eax, 0
	jmp	.L14
.L13:
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR [rax], 0
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR 8[rax], -1
	mov	rax, QWORD PTR -48[rbp]
	mov	esi, 44
	mov	rdi, rax
	call	strchr@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	je	.L15
	mov	rax, QWORD PTR -16[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -16[rbp], rdx
	mov	BYTE PTR [rax], 0
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR -48[rbp]
	mov	QWORD PTR 40[rax], rdx
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR -48[rbp], rax
	jmp	.L16
.L15:
	mov	rax, QWORD PTR -24[rbp]
	lea	rdx, .LC4[rip]
	mov	QWORD PTR 40[rax], rdx
.L16:
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR -36[rbp]
	mov	DWORD PTR 12[rax], edx
	cmp	DWORD PTR -36[rbp], 2
	jg	.L17
	cmp	DWORD PTR -36[rbp], 0
	jg	.L18
	jmp	.L19
.L17:
	cmp	DWORD PTR -36[rbp], 3
	jne	.L19
	mov	rax, QWORD PTR -48[rbp]
	mov	rdi, rax
	call	getprotobyname@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L20
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -48[rbp]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	eax, 0
	jmp	.L14
.L20:
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR 16[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR 16[rax], edx
	jmp	.L19
.L18:
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR 16[rax], 0
	mov	rax, QWORD PTR -24[rbp]
	lea	rdx, 20[rax]
	mov	rax, QWORD PTR -48[rbp]
	mov	rsi, rax
	mov	rdi, rdx
	mov	eax, 0
	call	parse_addr
	test	eax, eax
	jns	.L22
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	eax, 0
	jmp	.L14
.L22:
	nop
.L19:
	mov	rax, QWORD PTR -24[rbp]
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	new_entry, .-new_entry
	.section	.rodata
.LC6:
	.string	"socket"
.LC7:
	.string	"bind"
	.text
	.globl	open_socket
	.type	open_socket, @function
open_socket:
.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	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR 16[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 12[rax]
	mov	esi, eax
	mov	edi, 2
	call	socket@PLT
	mov	rdx, QWORD PTR -8[rbp]
	mov	DWORD PTR 8[rdx], eax
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 8[rax]
	test	eax, eax
	jns	.L24
	lea	rdi, .LC6[rip]
	call	perror@PLT
	mov	eax, -1
	jmp	.L25
.L24:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 12[rax]
	cmp	eax, 3
	je	.L26
	mov	rax, QWORD PTR -8[rbp]
	lea	rcx, 20[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 8[rax]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	bind@PLT
	test	eax, eax
	jns	.L26
	lea	rdi, .LC7[rip]
	call	perror@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 8[rax]
	mov	edi, eax
	call	close@PLT
	mov	eax, -1
	jmp	.L25
.L26:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 8[rax]
.L25:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	open_socket, .-open_socket
	.section	.rodata
.LC8:
	.string	"s:d:r:"
.LC9:
	.string	"failed to create socket!\n"
.LC10:
	.string	"/bin/echo"
.LC11:
	.string	"%d"
.LC12:
	.string	"exec"
	.text
	.globl	main
	.type	main, @function
main:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 80
	mov	DWORD PTR -68[rbp], edi
	mov	QWORD PTR -80[rbp], rsi
	mov	QWORD PTR -48[rbp], 0
	mov	QWORD PTR -40[rbp], 0
	mov	DWORD PTR -60[rbp], 0
	jmp	.L28
.L36:
	cmp	DWORD PTR -52[rbp], 115
	je	.L29
	cmp	DWORD PTR -52[rbp], 115
	jg	.L30
	cmp	DWORD PTR -52[rbp], 100
	je	.L31
	cmp	DWORD PTR -52[rbp], 114
	je	.L32
	jmp	.L30
.L29:
	mov	rax, QWORD PTR optarg[rip]
	mov	rsi, rax
	mov	edi, 1
	mov	eax, 0
	call	new_entry
	mov	QWORD PTR -40[rbp], rax
	cmp	QWORD PTR -40[rbp], 0
	jne	.L33
	mov	edi, 1
	call	exit@PLT
.L33:
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR -48[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR -48[rbp], rax
	add	DWORD PTR -60[rbp], 1
	jmp	.L28
.L31:
	mov	rax, QWORD PTR optarg[rip]
	mov	rsi, rax
	mov	edi, 2
	mov	eax, 0
	call	new_entry
	mov	QWORD PTR -40[rbp], rax
	cmp	QWORD PTR -40[rbp], 0
	jne	.L34
	mov	edi, 1
	call	exit@PLT
.L34:
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR -48[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR -48[rbp], rax
	add	DWORD PTR -60[rbp], 1
	jmp	.L28
.L32:
	mov	rax, QWORD PTR optarg[rip]
	mov	rsi, rax
	mov	edi, 3
	mov	eax, 0
	call	new_entry
	mov	QWORD PTR -40[rbp], rax
	cmp	QWORD PTR -40[rbp], 0
	jne	.L35
	mov	edi, 1
	call	exit@PLT
.L35:
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR -48[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR -48[rbp], rax
	add	DWORD PTR -60[rbp], 1
	jmp	.L28
.L30:
	mov	edi, 1
	call	exit@PLT
.L28:
	mov	rcx, QWORD PTR -80[rbp]
	mov	eax, DWORD PTR -68[rbp]
	lea	rdx, .LC8[rip]
	mov	rsi, rcx
	mov	edi, eax
	call	getopt@PLT
	mov	DWORD PTR -52[rbp], eax
	cmp	DWORD PTR -52[rbp], -1
	jne	.L36
	mov	eax, DWORD PTR optind[rip]
	sub	DWORD PTR -68[rbp], eax
	mov	eax, DWORD PTR optind[rip]
	cdqe
	sal	rax, 3
	add	QWORD PTR -80[rbp], rax
	mov	rax, QWORD PTR -48[rbp]
	mov	QWORD PTR -40[rbp], rax
	jmp	.L37
.L39:
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	mov	eax, 0
	call	open_socket
	test	eax, eax
	jns	.L38
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 25
	mov	esi, 1
	lea	rdi, .LC9[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L38:
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -40[rbp], rax
.L37:
	cmp	QWORD PTR -40[rbp], 0
	jne	.L39
	call	getuid@PLT
	mov	edi, eax
	call	setuid@PLT
	lea	rax, .LC10[rip]
	mov	QWORD PTR -24[rbp], rax
	mov	eax, DWORD PTR -60[rbp]
	add	eax, eax
	lea	edx, 1[rax]
	mov	eax, DWORD PTR -68[rbp]
	add	eax, edx
	add	eax, 1
	cdqe
	sal	rax, 3
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, 47
	mov	rdi, rax
	call	strrchr@PLT
	mov	QWORD PTR -32[rbp], rax
	cmp	QWORD PTR -32[rbp], 0
	jne	.L40
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR -32[rbp], rax
	jmp	.L41
.L40:
	add	QWORD PTR -32[rbp], 1
.L41:
	mov	DWORD PTR -56[rbp], 0
	mov	eax, DWORD PTR -56[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -56[rbp], edx
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -16[rbp]
	add	rdx, rax
	mov	rax, QWORD PTR -32[rbp]
	mov	QWORD PTR [rdx], rax
	jmp	.L42
.L43:
	mov	eax, DWORD PTR -56[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -16[rbp]
	add	rdx, rax
	mov	rax, QWORD PTR -80[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR [rdx], rax
	sub	DWORD PTR -68[rbp], 1
	add	QWORD PTR -80[rbp], 8
	add	DWORD PTR -56[rbp], 1
.L42:
	cmp	DWORD PTR -68[rbp], 0
	jne	.L43
	mov	rax, QWORD PTR -48[rbp]
	mov	QWORD PTR -40[rbp], rax
	jmp	.L44
.L47:
	mov	edi, 8
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L45
	mov	edi, 1
	call	exit@PLT
.L45:
	mov	rax, QWORD PTR -40[rbp]
	mov	edx, DWORD PTR 8[rax]
	mov	rax, QWORD PTR -8[rbp]
	lea	rsi, .LC11[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 40[rax]
	test	rax, rax
	je	.L46
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 40[rax]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	je	.L46
	mov	eax, DWORD PTR -56[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -56[rbp], edx
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -16[rbp]
	add	rdx, rax
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 40[rax]
	mov	QWORD PTR [rdx], rax
.L46:
	mov	eax, DWORD PTR -56[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -56[rbp], edx
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -16[rbp]
	add	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR [rdx], rax
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR -48[rbp], rax
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -40[rbp], rax
	mov	rax, QWORD PTR -48[rbp]
	mov	rdi, rax
	call	free@PLT
.L44:
	cmp	QWORD PTR -40[rbp], 0
	jne	.L47
	mov	eax, DWORD PTR -56[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -16[rbp]
	add	rax, rdx
	mov	QWORD PTR [rax], 0
	mov	rdx, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	execv@PLT
	lea	rdi, .LC12[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
	.cfi_endproc
.LFE9:
	.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	"200143069.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"tcp\000"
	.align	2
.LC1:
	.ascii	"unknown port %s\012\000"
	.align	2
.LC2:
	.ascii	"bad port number %d\012\000"
	.align	2
.LC3:
	.ascii	"\"%s\" unknown host or address!\012\000"
	.text
	.align	2
	.global	parse_addr
	.syntax unified
	.arm
	.fpu softvfp
	.type	parse_addr, %function
parse_addr:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-20]
	mov	r1, #58
	ldr	r0, [fp, #-28]
	bl	strrchr
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	beq	.L2
	ldr	r3, [fp, #-16]
	add	r2, r3, #1
	str	r2, [fp, #-16]
	mov	r2, #0
	strb	r2, [r3]
.L2:
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	beq	.L3
	bl	__ctype_b_loc
	mov	r3, r0
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]
	and	r3, r3, #2048
	cmp	r3, #0
	bne	.L4
	ldr	r1, .L12
	ldr	r0, [fp, #-16]
	bl	getservbyname
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	beq	.L5
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #8]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	mov	r0, r3
	bl	ntohs
	mov	r3, r0
	str	r3, [fp, #-20]
	b	.L3
.L5:
	ldr	r3, .L12+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	ldr	r1, .L12+8
	mov	r0, r3
	bl	fprintf
	mvn	r3, #0
	b	.L6
.L4:
	ldr	r0, [fp, #-16]
	bl	atoi
	str	r0, [fp, #-20]
.L3:
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	blt	.L7
	ldr	r3, [fp, #-20]
	cmp	r3, #65536
	blt	.L8
.L7:
	ldr	r3, .L12+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-20]
	ldr	r1, .L12+12
	mov	r0, r3
	bl	fprintf
	mvn	r3, #0
	b	.L6
.L8:
	ldr	r3, [fp, #-24]
	mov	r0, r3
	mov	r3, #16
	mov	r2, r3
	mov	r1, #0
	bl	memset
	ldr	r3, [fp, #-24]
	mov	r2, #2
	strh	r2, [r3]	@ movhi
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	mov	r0, r3
	bl	htons
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-24]
	strh	r2, [r3, #2]	@ movhi
	ldr	r3, [fp, #-28]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L9
	ldr	r3, [fp, #-24]
	mov	r2, #0
	str	r2, [r3, #4]
	b	.L10
.L9:
	ldr	r0, [fp, #-28]
	bl	inet_addr
	mov	r2, r0
	ldr	r3, [fp, #-24]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #4]
	cmn	r3, #1
	bne	.L10
	ldr	r0, [fp, #-28]
	bl	gethostbyname
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L11
	ldr	r3, .L12+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-28]
	ldr	r1, .L12+16
	mov	r0, r3
	bl	fprintf
	mvn	r3, #0
	b	.L6
.L11:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #16]
	ldr	r1, [r3]
	ldr	r3, [fp, #-24]
	add	r0, r3, #4
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #12]
	mov	r2, r3
	bl	memmove
.L10:
	mov	r3, #0
.L6:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L13:
	.align	2
.L12:
	.word	.LC0
	.word	stderr
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.size	parse_addr, .-parse_addr
	.section	.rodata
	.align	2
.LC4:
	.ascii	"-fd\000"
	.align	2
.LC5:
	.ascii	"Unknown protocol: %s\012\000"
	.text
	.align	2
	.global	new_entry
	.syntax unified
	.arm
	.fpu softvfp
	.type	new_entry, %function
new_entry:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	mov	r0, #36
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L15
	mov	r3, #0
	b	.L16
.L15:
	ldr	r3, [fp, #-16]
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-16]
	mvn	r2, #0
	str	r2, [r3, #4]
	mov	r1, #44
	ldr	r0, [fp, #-28]
	bl	strchr
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	beq	.L17
	ldr	r3, [fp, #-12]
	add	r2, r3, #1
	str	r2, [fp, #-12]
	mov	r2, #0
	strb	r2, [r3]
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-28]
	str	r2, [r3, #32]
	ldr	r3, [fp, #-12]
	str	r3, [fp, #-28]
	b	.L18
.L17:
	ldr	r3, [fp, #-16]
	ldr	r2, .L25
	str	r2, [r3, #32]
.L18:
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-24]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-24]
	cmp	r3, #2
	bgt	.L19
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bgt	.L20
	b	.L21
.L19:
	ldr	r3, [fp, #-24]
	cmp	r3, #3
	bne	.L21
	ldr	r0, [fp, #-28]
	bl	getprotobyname
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L22
	ldr	r3, .L25+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-28]
	ldr	r1, .L25+8
	mov	r0, r3
	bl	fprintf
	ldr	r0, [fp, #-16]
	bl	free
	mov	r3, #0
	b	.L16
.L22:
	ldr	r3, [fp, #-8]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-16]
	str	r2, [r3, #12]
	b	.L21
.L20:
	ldr	r3, [fp, #-16]
	mov	r2, #0
	str	r2, [r3, #12]
	ldr	r3, [fp, #-16]
	add	r3, r3, #16
	ldr	r1, [fp, #-28]
	mov	r0, r3
	bl	parse_addr
	mov	r3, r0
	cmp	r3, #0
	bge	.L24
	ldr	r0, [fp, #-16]
	bl	free
	mov	r3, #0
	b	.L16
.L24:
	nop
.L21:
	ldr	r3, [fp, #-16]
.L16:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L26:
	.align	2
.L25:
	.word	.LC4
	.word	stderr
	.word	.LC5
	.size	new_entry, .-new_entry
	.section	.rodata
	.align	2
.LC6:
	.ascii	"socket\000"
	.align	2
.LC7:
	.ascii	"bind\000"
	.text
	.align	2
	.global	open_socket
	.syntax unified
	.arm
	.fpu softvfp
	.type	open_socket, %function
open_socket:
	@ 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]
	ldr	r3, [fp, #-8]
	ldr	r1, [r3, #8]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #12]
	mov	r2, r3
	mov	r0, #2
	bl	socket
	mov	r2, r0
	ldr	r3, [fp, #-8]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	cmp	r3, #0
	bge	.L28
	ldr	r0, .L31
	bl	perror
	mvn	r3, #0
	b	.L29
.L28:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	cmp	r3, #3
	beq	.L30
	ldr	r3, [fp, #-8]
	ldr	r0, [r3, #4]
	ldr	r3, [fp, #-8]
	add	r3, r3, #16
	mov	r2, #16
	mov	r1, r3
	bl	bind
	mov	r3, r0
	cmp	r3, #0
	bge	.L30
	ldr	r0, .L31+4
	bl	perror
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	mov	r0, r3
	bl	close
	mvn	r3, #0
	b	.L29
.L30:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
.L29:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L32:
	.align	2
.L31:
	.word	.LC6
	.word	.LC7
	.size	open_socket, .-open_socket
	.section	.rodata
	.align	2
.LC8:
	.ascii	"s:d:r:\000"
	.align	2
.LC9:
	.ascii	"failed to create socket!\012\000"
	.align	2
.LC10:
	.ascii	"/bin/echo\000"
	.align	2
.LC11:
	.ascii	"%d\000"
	.align	2
.LC12:
	.ascii	"exec\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #48
	str	r0, [fp, #-48]
	str	r1, [fp, #-52]
	mov	r3, #0
	str	r3, [fp, #-40]
	mov	r3, #0
	str	r3, [fp, #-36]
	mov	r3, #0
	str	r3, [fp, #-32]
	b	.L34
.L42:
	ldr	r3, [fp, #-20]
	cmp	r3, #115
	beq	.L35
	ldr	r3, [fp, #-20]
	cmp	r3, #115
	bgt	.L36
	ldr	r3, [fp, #-20]
	cmp	r3, #100
	beq	.L37
	ldr	r3, [fp, #-20]
	cmp	r3, #114
	beq	.L38
	b	.L36
.L35:
	ldr	r3, .L54
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #1
	bl	new_entry
	str	r0, [fp, #-36]
	ldr	r3, [fp, #-36]
	cmp	r3, #0
	bne	.L39
	mov	r0, #1
	bl	exit
.L39:
	ldr	r3, [fp, #-36]
	ldr	r2, [fp, #-40]
	str	r2, [r3]
	ldr	r3, [fp, #-36]
	str	r3, [fp, #-40]
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
	b	.L34
.L37:
	ldr	r3, .L54
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #2
	bl	new_entry
	str	r0, [fp, #-36]
	ldr	r3, [fp, #-36]
	cmp	r3, #0
	bne	.L40
	mov	r0, #1
	bl	exit
.L40:
	ldr	r3, [fp, #-36]
	ldr	r2, [fp, #-40]
	str	r2, [r3]
	ldr	r3, [fp, #-36]
	str	r3, [fp, #-40]
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
	b	.L34
.L38:
	ldr	r3, .L54
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #3
	bl	new_entry
	str	r0, [fp, #-36]
	ldr	r3, [fp, #-36]
	cmp	r3, #0
	bne	.L41
	mov	r0, #1
	bl	exit
.L41:
	ldr	r3, [fp, #-36]
	ldr	r2, [fp, #-40]
	str	r2, [r3]
	ldr	r3, [fp, #-36]
	str	r3, [fp, #-40]
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
	b	.L34
.L36:
	mov	r0, #1
	bl	exit
.L34:
	ldr	r2, .L54+4
	ldr	r1, [fp, #-52]
	ldr	r0, [fp, #-48]
	bl	getopt
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmn	r3, #1
	bne	.L42
	ldr	r3, .L54+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-48]
	sub	r3, r2, r3
	str	r3, [fp, #-48]
	ldr	r3, .L54+8
	ldr	r3, [r3]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-52]
	add	r3, r2, r3
	str	r3, [fp, #-52]
	ldr	r3, [fp, #-40]
	str	r3, [fp, #-36]
	b	.L43
.L45:
	ldr	r0, [fp, #-36]
	bl	open_socket
	mov	r3, r0
	cmp	r3, #0
	bge	.L44
	ldr	r3, .L54+12
	ldr	r3, [r3]
	mov	r2, #25
	mov	r1, #1
	ldr	r0, .L54+16
	bl	fwrite
	mov	r0, #1
	bl	exit
.L44:
	ldr	r3, [fp, #-36]
	ldr	r3, [r3]
	str	r3, [fp, #-36]
.L43:
	ldr	r3, [fp, #-36]
	cmp	r3, #0
	bne	.L45
	bl	getuid
	mov	r3, r0
	mov	r0, r3
	bl	setuid
	ldr	r3, .L54+20
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #1
	add	r2, r3, #1
	ldr	r3, [fp, #-48]
	add	r3, r2, r3
	add	r3, r3, #1
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-12]
	mov	r1, #47
	ldr	r0, [fp, #-16]
	bl	strrchr
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bne	.L46
	ldr	r3, [fp, #-16]
	str	r3, [fp, #-24]
	b	.L47
.L46:
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L47:
	mov	r3, #0
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-28]
	add	r2, r3, #1
	str	r2, [fp, #-28]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-12]
	add	r3, r2, r3
	ldr	r2, [fp, #-24]
	str	r2, [r3]
	b	.L48
.L49:
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-12]
	add	r3, r2, r3
	ldr	r2, [fp, #-52]
	ldr	r2, [r2]
	str	r2, [r3]
	ldr	r3, [fp, #-48]
	sub	r3, r3, #1
	str	r3, [fp, #-48]
	ldr	r3, [fp, #-52]
	add	r3, r3, #4
	str	r3, [fp, #-52]
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L48:
	ldr	r3, [fp, #-48]
	cmp	r3, #0
	bne	.L49
	ldr	r3, [fp, #-40]
	str	r3, [fp, #-36]
	b	.L50
.L53:
	mov	r0, #8
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L51
	mov	r0, #1
	bl	exit
.L51:
	ldr	r3, [fp, #-36]
	ldr	r3, [r3, #4]
	mov	r2, r3
	ldr	r1, .L54+24
	ldr	r0, [fp, #-8]
	bl	sprintf
	ldr	r3, [fp, #-36]
	ldr	r3, [r3, #32]
	cmp	r3, #0
	beq	.L52
	ldr	r3, [fp, #-36]
	ldr	r3, [r3, #32]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L52
	ldr	r3, [fp, #-28]
	add	r2, r3, #1
	str	r2, [fp, #-28]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-12]
	add	r3, r2, r3
	ldr	r2, [fp, #-36]
	ldr	r2, [r2, #32]
	str	r2, [r3]
.L52:
	ldr	r3, [fp, #-28]
	add	r2, r3, #1
	str	r2, [fp, #-28]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-12]
	add	r3, r2, r3
	ldr	r2, [fp, #-8]
	str	r2, [r3]
	ldr	r3, [fp, #-36]
	str	r3, [fp, #-40]
	ldr	r3, [fp, #-36]
	ldr	r3, [r3]
	str	r3, [fp, #-36]
	ldr	r0, [fp, #-40]
	bl	free
.L50:
	ldr	r3, [fp, #-36]
	cmp	r3, #0
	bne	.L53
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-12]
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3]
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-16]
	bl	execv
	ldr	r0, .L54+28
	bl	perror
	mov	r0, #1
	bl	exit
.L55:
	.align	2
.L54:
	.word	optarg
	.word	.LC8
	.word	optind
	.word	stderr
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
