	.file	"26744.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"usage: %s ipaddress portnumber\n"
	.text
	.type	usage, @function
usage:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	rdx, QWORD PTR __progname[rip]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
	.cfi_endproc
.LFE6:
	.size	usage, .-usage
	.section	.rodata
.LC1:
	.string	"%s - not a number\n"
.LC2:
	.string	"%s - value out of range\n"
.LC3:
	.string	"Invalid IP address %s\n"
.LC4:
	.string	"socket failed"
.LC5:
	.string	"connect failed"
.LC6:
	.string	"read failed"
.LC7:
	.string	"Server sent:  %s"
	.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, 176
	mov	DWORD PTR -164[rbp], edi
	mov	QWORD PTR -176[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -164[rbp], 3
	je	.L3
	mov	eax, 0
	call	usage
.L3:
	mov	rax, QWORD PTR -176[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	lea	rcx, -152[rbp]
	mov	edx, 10
	mov	rsi, rcx
	mov	rdi, rax
	call	strtoul@PLT
	mov	QWORD PTR -128[rbp], rax
	mov	rax, QWORD PTR -176[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	je	.L4
	mov	rax, QWORD PTR -152[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	je	.L5
.L4:
	mov	rax, QWORD PTR -176[rbp]
	add	rax, 16
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 0
	call	usage
.L5:
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	eax, 34
	jne	.L6
	cmp	QWORD PTR -128[rbp], -1
	je	.L7
.L6:
	cmp	QWORD PTR -128[rbp], 65535
	jbe	.L8
.L7:
	mov	rax, QWORD PTR -176[rbp]
	add	rax, 16
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 0
	call	usage
.L8:
	mov	rax, QWORD PTR -128[rbp]
	mov	WORD PTR -158[rbp], ax
	lea	rax, -112[rbp]
	mov	edx, 16
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	WORD PTR -112[rbp], 2
	movzx	eax, WORD PTR -158[rbp]
	mov	edi, eax
	call	htons@PLT
	mov	WORD PTR -110[rbp], ax
	mov	rax, QWORD PTR -176[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	inet_addr@PLT
	mov	DWORD PTR -108[rbp], eax
	mov	eax, DWORD PTR -108[rbp]
	cmp	eax, -1
	jne	.L9
	mov	rax, QWORD PTR -176[rbp]
	add	rax, 8
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 0
	call	usage
.L9:
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -156[rbp], eax
	cmp	DWORD PTR -156[rbp], -1
	jne	.L10
	lea	rsi, .LC4[rip]
	mov	edi, 1
	mov	eax, 0
	call	err@PLT
.L10:
	lea	rcx, -112[rbp]
	mov	eax, DWORD PTR -156[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	connect@PLT
	cmp	eax, -1
	jne	.L11
	lea	rsi, .LC5[rip]
	mov	edi, 1
	mov	eax, 0
	call	err@PLT
.L11:
	mov	QWORD PTR -144[rbp], -1
	mov	QWORD PTR -136[rbp], 0
	mov	QWORD PTR -120[rbp], 79
	jmp	.L12
.L15:
	mov	rcx, QWORD PTR -136[rbp]
	mov	rax, QWORD PTR -120[rbp]
	sub	rax, rcx
	mov	rdx, rax
	mov	rax, QWORD PTR -136[rbp]
	lea	rcx, -96[rbp]
	add	rcx, rax
	mov	eax, DWORD PTR -156[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	QWORD PTR -144[rbp], rax
	cmp	QWORD PTR -144[rbp], -1
	jne	.L13
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	eax, 4
	je	.L12
	lea	rsi, .LC6[rip]
	mov	edi, 1
	mov	eax, 0
	call	err@PLT
.L13:
	mov	rax, QWORD PTR -144[rbp]
	add	QWORD PTR -136[rbp], rax
.L12:
	cmp	QWORD PTR -144[rbp], 0
	je	.L14
	mov	rax, QWORD PTR -136[rbp]
	cmp	QWORD PTR -120[rbp], rax
	ja	.L15
.L14:
	lea	rdx, -96[rbp]
	mov	rax, QWORD PTR -136[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	lea	rax, -96[rbp]
	mov	rsi, rax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -156[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	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	"26744.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"usage: %s ipaddress portnumber\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	usage, %function
usage:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L2
	ldr	r3, [r3]
	ldr	r2, .L2+4
	ldr	r2, [r2]
	ldr	r1, .L2+8
	mov	r0, r3
	bl	fprintf
	mov	r0, #1
	bl	exit
.L3:
	.align	2
.L2:
	.word	stderr
	.word	__progname
	.word	.LC0
	.size	usage, .-usage
	.section	.rodata
	.align	2
.LC1:
	.ascii	"%s - not a number\012\000"
	.align	2
.LC2:
	.ascii	"%s - value out of range\012\000"
	.align	2
.LC3:
	.ascii	"Invalid IP address %s\012\000"
	.align	2
.LC4:
	.ascii	"socket failed\000"
	.align	2
.LC5:
	.ascii	"connect failed\000"
	.align	2
.LC6:
	.ascii	"read failed\000"
	.align	2
.LC7:
	.ascii	"Server sent:  %s\000"
	.align	2
.LC8:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 136
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #136
	str	r0, [fp, #-136]
	str	r1, [fp, #-140]
	ldr	r3, .L20
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-136]
	cmp	r3, #3
	beq	.L5
	bl	usage
.L5:
	ldr	r3, [fp, #-140]
	add	r3, r3, #8
	ldr	r3, [r3]
	sub	r1, fp, #128
	mov	r2, #10
	mov	r0, r3
	bl	strtoul
	str	r0, [fp, #-116]
	ldr	r3, [fp, #-140]
	add	r3, r3, #8
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L6
	ldr	r3, [fp, #-128]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L7
.L6:
	ldr	r3, .L20+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-140]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L20+8
	bl	fprintf
	bl	usage
.L7:
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #34
	bne	.L8
	ldr	r3, [fp, #-116]
	cmn	r3, #1
	beq	.L9
.L8:
	ldr	r3, [fp, #-116]
	cmp	r3, #65536
	bcc	.L10
.L9:
	ldr	r3, .L20+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-140]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L20+12
	bl	fprintf
	bl	usage
.L10:
	ldr	r3, [fp, #-116]
	strh	r3, [fp, #-130]	@ movhi
	sub	r3, fp, #104
	mov	r2, #16
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #2
	strh	r3, [fp, #-104]	@ movhi
	ldrh	r3, [fp, #-130]
	mov	r0, r3
	bl	htons
	mov	r3, r0
	strh	r3, [fp, #-102]	@ movhi
	ldr	r3, [fp, #-140]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	inet_addr
	mov	r3, r0
	str	r3, [fp, #-100]
	ldr	r3, [fp, #-100]
	cmn	r3, #1
	bne	.L11
	ldr	r3, .L20+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-140]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L20+16
	bl	fprintf
	bl	usage
.L11:
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-112]
	ldr	r3, [fp, #-112]
	cmn	r3, #1
	bne	.L12
	ldr	r1, .L20+20
	mov	r0, #1
	bl	err
.L12:
	sub	r3, fp, #104
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-112]
	bl	connect
	mov	r3, r0
	cmn	r3, #1
	bne	.L13
	ldr	r1, .L20+24
	mov	r0, #1
	bl	err
.L13:
	mvn	r3, #0
	str	r3, [fp, #-124]
	mov	r3, #0
	str	r3, [fp, #-120]
	mov	r3, #79
	str	r3, [fp, #-108]
	b	.L14
.L17:
	ldr	r3, [fp, #-120]
	sub	r2, fp, #88
	add	r1, r2, r3
	ldr	r3, [fp, #-120]
	ldr	r2, [fp, #-108]
	sub	r3, r2, r3
	mov	r2, r3
	ldr	r0, [fp, #-112]
	bl	read
	str	r0, [fp, #-124]
	ldr	r3, [fp, #-124]
	cmn	r3, #1
	bne	.L15
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #4
	beq	.L14
	ldr	r1, .L20+28
	mov	r0, #1
	bl	err
.L15:
	ldr	r2, [fp, #-120]
	ldr	r3, [fp, #-124]
	add	r3, r2, r3
	str	r3, [fp, #-120]
.L14:
	ldr	r3, [fp, #-124]
	cmp	r3, #0
	beq	.L16
	ldr	r3, [fp, #-120]
	ldr	r2, [fp, #-108]
	cmp	r2, r3
	bhi	.L17
.L16:
	sub	r2, fp, #88
	ldr	r3, [fp, #-120]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	sub	r3, fp, #88
	mov	r1, r3
	ldr	r0, .L20+32
	bl	printf
	ldr	r0, [fp, #-112]
	bl	close
	mov	r3, #0
	ldr	r2, .L20
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L19
	bl	__stack_chk_fail
.L19:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L21:
	.align	2
.L20:
	.word	.LC8
	.word	stderr
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
