	.file	"590494.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Connecting to %s, at port %d\n"
.LC1:
	.string	"Connect OK"
.LC2:
	.string	"write error!"
.LC3:
	.string	"read error!"
.LC4:
	.string	"SERVER: %s\n"
.LC5:
	.string	"Socket closed."
	.text
	.globl	client
	.type	client, @function
client:
.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, 2128
	mov	QWORD PTR -2104[rbp], rdi
	mov	DWORD PTR -2108[rbp], esi
	mov	QWORD PTR -2120[rbp], rdx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -2108[rbp], 0
	jle	.L2
	cmp	DWORD PTR -2108[rbp], 65535
	jle	.L3
.L2:
	mov	eax, -1
	jmp	.L10
.L3:
	mov	WORD PTR -2080[rbp], 2
	mov	eax, DWORD PTR -2108[rbp]
	movzx	eax, ax
	mov	edi, eax
	call	htons@PLT
	mov	WORD PTR -2078[rbp], ax
	mov	rax, QWORD PTR -2104[rbp]
	mov	rdi, rax
	call	inet_addr@PLT
	mov	DWORD PTR -2076[rbp], eax
	mov	eax, DWORD PTR -2076[rbp]
	cmp	eax, -1
	jne	.L5
	mov	eax, -1
	jmp	.L10
.L5:
	mov	edx, DWORD PTR -2108[rbp]
	mov	rax, QWORD PTR -2104[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -2084[rbp], eax
	cmp	DWORD PTR -2084[rbp], -1
	jne	.L6
	mov	eax, -1
	jmp	.L10
.L6:
	lea	rcx, -2080[rbp]
	mov	eax, DWORD PTR -2084[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	connect@PLT
	cmp	eax, -1
	jne	.L7
	mov	eax, -1
	jmp	.L10
.L7:
	lea	rdi, .LC1[rip]
	call	puts@PLT
	mov	BYTE PTR -2064[rbp], 0
	mov	rax, QWORD PTR -2120[rbp]
	mov	rdi, rax
	call	strlen@PLT
	lea	rdx, 1[rax]
	mov	rcx, QWORD PTR -2120[rbp]
	mov	eax, DWORD PTR -2084[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	cmp	rax, -1
	jne	.L8
	lea	rdi, .LC2[rip]
	call	puts@PLT
	mov	eax, -1
	jmp	.L10
.L8:
	mov	BYTE PTR -2064[rbp], 0
	lea	rcx, -2064[rbp]
	mov	eax, DWORD PTR -2084[rbp]
	mov	edx, 2048
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	cmp	rax, -1
	jne	.L9
	lea	rdi, .LC3[rip]
	call	puts@PLT
	mov	eax, -1
	jmp	.L10
.L9:
	lea	rax, -2064[rbp]
	mov	rsi, rax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -2084[rbp]
	mov	edi, eax
	call	close@PLT
	lea	rdi, .LC5[rip]
	call	puts@PLT
	mov	eax, 0
.L10:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	client, .-client
	.section	.rodata
	.align 8
.LC6:
	.string	"Options are: -p PORTNUM, -i IPNUM -c 'CMD'"
.LC7:
	.string	"Unrecognized option"
.LC8:
	.string	"i:p:c:"
.LC9:
	.string	"Error."
	.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
	sub	rsp, 2112
	mov	DWORD PTR -2100[rbp], edi
	mov	QWORD PTR -2112[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdi, .LC6[rip]
	call	puts@PLT
	lea	rax, -2080[rbp]
	movabs	rcx, 3328210909095473713
	mov	QWORD PTR [rax], rcx
	mov	WORD PTR 8[rax], 49
	lea	rax, -2092[rbp]
	mov	DWORD PTR [rax], 808465714
	mov	BYTE PTR 4[rax], 0
	lea	rax, -2064[rbp]
	mov	DWORD PTR [rax], 7169394
	jmp	.L13
.L21:
	movsx	eax, BYTE PTR -2093[rbp]
	cmp	eax, 112
	je	.L14
	cmp	eax, 112
	jg	.L15
	cmp	eax, 99
	je	.L16
	cmp	eax, 105
	jne	.L15
	mov	rax, QWORD PTR optarg[rip]
	mov	rdi, rax
	call	strlen@PLT
	cmp	rax, 15
	ja	.L13
	mov	rdx, QWORD PTR optarg[rip]
	lea	rax, -2080[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	jmp	.L13
.L16:
	mov	rax, QWORD PTR optarg[rip]
	mov	rdi, rax
	call	strlen@PLT
	cmp	rax, 2047
	ja	.L13
	mov	rdx, QWORD PTR optarg[rip]
	lea	rax, -2064[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	jmp	.L13
.L14:
	mov	rax, QWORD PTR optarg[rip]
	mov	rdi, rax
	call	strlen@PLT
	cmp	rax, 11
	ja	.L13
	mov	rdx, QWORD PTR optarg[rip]
	lea	rax, -2092[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	jmp	.L13
.L15:
	lea	rdi, .LC7[rip]
	call	puts@PLT
	mov	eax, 1
	jmp	.L23
.L13:
	mov	rcx, QWORD PTR -2112[rbp]
	mov	eax, DWORD PTR -2100[rbp]
	lea	rdx, .LC8[rip]
	mov	rsi, rcx
	mov	edi, eax
	call	getopt@PLT
	mov	BYTE PTR -2093[rbp], al
	cmp	BYTE PTR -2093[rbp], -1
	jne	.L21
	lea	rax, -2092[rbp]
	mov	rdi, rax
	call	atoi@PLT
	mov	ecx, eax
	lea	rdx, -2064[rbp]
	lea	rax, -2080[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	client
	cmp	eax, -1
	jne	.L22
	lea	rdi, .LC9[rip]
	call	puts@PLT
.L22:
	mov	eax, 0
.L23:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L24
	call	__stack_chk_fail@PLT
.L24:
	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	"590494.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Connecting to %s, at port %d\012\000"
	.align	2
.LC1:
	.ascii	"Connect OK\000"
	.align	2
.LC2:
	.ascii	"write error!\000"
	.align	2
.LC3:
	.ascii	"read error!\000"
	.align	2
.LC4:
	.ascii	"SERVER: %s\012\000"
	.align	2
.LC5:
	.ascii	"Socket closed.\000"
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	client
	.syntax unified
	.arm
	.fpu softvfp
	.type	client, %function
client:
	@ args = 0, pretend = 0, frame = 2096
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #2096
	str	r0, [fp, #-2088]
	str	r1, [fp, #-2092]
	str	r2, [fp, #-2096]
	ldr	r3, .L12
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-2092]
	cmp	r3, #0
	ble	.L2
	ldr	r3, [fp, #-2092]
	cmp	r3, #65536
	blt	.L3
.L2:
	mvn	r3, #0
	b	.L10
.L3:
	sub	r3, fp, #4
	sub	r3, r3, #2064
	sub	r3, r3, #8
	mov	r2, #2
	strh	r2, [r3]	@ movhi
	ldr	r3, [fp, #-2092]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	mov	r0, r3
	bl	htons
	mov	r3, r0
	mov	r2, r3
	sub	r3, fp, #4
	sub	r3, r3, #2064
	sub	r3, r3, #8
	strh	r2, [r3, #2]	@ movhi
	ldr	r0, [fp, #-2088]
	bl	inet_addr
	mov	r3, r0
	str	r3, [fp, #-2072]
	ldr	r3, [fp, #-2072]
	cmn	r3, #1
	bne	.L5
	mvn	r3, #0
	b	.L10
.L5:
	ldr	r2, [fp, #-2092]
	ldr	r1, [fp, #-2088]
	ldr	r0, .L12+4
	bl	printf
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-2080]
	ldr	r3, [fp, #-2080]
	cmn	r3, #1
	bne	.L6
	mvn	r3, #0
	b	.L10
.L6:
	sub	r3, fp, #2064
	sub	r3, r3, #4
	sub	r3, r3, #8
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-2080]
	bl	connect
	mov	r3, r0
	cmn	r3, #1
	bne	.L7
	mvn	r3, #0
	b	.L10
.L7:
	ldr	r0, .L12+8
	bl	puts
	mov	r3, #0
	strb	r3, [fp, #-2060]
	ldr	r0, [fp, #-2096]
	bl	strlen
	mov	r3, r0
	add	r3, r3, #1
	mov	r2, r3
	ldr	r1, [fp, #-2096]
	ldr	r0, [fp, #-2080]
	bl	write
	mov	r3, r0
	cmn	r3, #1
	bne	.L8
	ldr	r0, .L12+12
	bl	puts
	mvn	r3, #0
	b	.L10
.L8:
	mov	r3, #0
	strb	r3, [fp, #-2060]
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #8
	mov	r2, #2048
	mov	r1, r3
	ldr	r0, [fp, #-2080]
	bl	read
	mov	r3, r0
	cmn	r3, #1
	bne	.L9
	ldr	r0, .L12+16
	bl	puts
	mvn	r3, #0
	b	.L10
.L9:
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #8
	mov	r1, r3
	ldr	r0, .L12+20
	bl	printf
	ldr	r0, [fp, #-2080]
	bl	close
	ldr	r0, .L12+24
	bl	puts
	mov	r3, #0
.L10:
	ldr	r2, .L12
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L11
	bl	__stack_chk_fail
.L11:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L13:
	.align	2
.L12:
	.word	.LC6
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.size	client, .-client
	.section	.rodata
	.align	2
.LC7:
	.ascii	"Options are: -p PORTNUM, -i IPNUM -c 'CMD'\000"
	.align	2
.LC8:
	.ascii	"127.0.0.1\000"
	.align	2
.LC9:
	.ascii	"2500\000"
	.align	2
.LC10:
	.ascii	"Unrecognized option\000"
	.align	2
.LC11:
	.ascii	"i:p:c:\000"
	.align	2
.LC12:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 2096
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #2096
	str	r0, [fp, #-2096]
	str	r1, [fp, #-2100]
	ldr	r3, .L27
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, .L27+4
	bl	puts
	sub	r3, fp, #2064
	sub	r3, r3, #4
	sub	r3, r3, #8
	ldr	r2, .L27+8
	ldm	r2, {r0, r1, r2}
	stmia	r3!, {r0, r1}
	strh	r2, [r3]	@ movhi
	sub	r3, fp, #2080
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r2, .L27+12
	ldm	r2, {r0, r1}
	str	r0, [r3]
	add	r3, r3, #4
	strb	r1, [r3]
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #8
	ldr	r2, .L27+16
	str	r2, [r3]
	b	.L15
.L26:
	cmp	r3, #112
	bgt	.L17
	cmp	r3, #99
	beq	.L18
	cmp	r3, #105
	bne	.L17
	ldr	r3, .L27+20
	ldr	r3, [r3]
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	cmp	r3, #15
	bhi	.L15
	ldr	r3, .L27+20
	ldr	r2, [r3]
	sub	r3, fp, #2064
	sub	r3, r3, #4
	sub	r3, r3, #8
	mov	r1, r2
	mov	r0, r3
	bl	strcpy
	b	.L15
.L18:
	ldr	r3, .L27+20
	ldr	r3, [r3]
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	cmp	r3, #2048
	bcs	.L15
	ldr	r3, .L27+20
	ldr	r2, [r3]
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #8
	mov	r1, r2
	mov	r0, r3
	bl	strcpy
	b	.L15
.L16:
	ldr	r3, .L27+20
	ldr	r3, [r3]
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	cmp	r3, #11
	bhi	.L15
	ldr	r3, .L27+20
	ldr	r2, [r3]
	sub	r3, fp, #2080
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r2
	mov	r0, r3
	bl	strcpy
	b	.L15
.L17:
	ldr	r0, .L27+24
	bl	puts
	mov	r3, #1
	ldr	r2, .L27
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L24
	b	.L25
.L15:
	ldr	r2, .L27+28
	ldr	r1, [fp, #-2100]
	ldr	r0, [fp, #-2096]
	bl	getopt
	mov	r3, r0
	strb	r3, [fp, #-2089]
	ldrb	r3, [fp, #-2089]	@ zero_extendqisi2
	cmp	r3, #112
	beq	.L16
	b	.L26
.L25:
	bl	__stack_chk_fail
.L24:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L28:
	.align	2
.L27:
	.word	.LC12
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	7169394
	.word	optarg
	.word	.LC10
	.word	.LC11
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
