	.file	"219487.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"usage is %s hostname port"
.LC1:
	.string	"no such host"
.LC2:
	.string	"error connecting"
	.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
	sub	rsp, 336
	mov	DWORD PTR -324[rbp], edi
	mov	QWORD PTR -336[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -324[rbp], 2
	jg	.L2
	mov	rax, QWORD PTR -336[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 1
	jmp	.L9
.L2:
	mov	rax, QWORD PTR -336[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	mov	eax, 0
	call	atoi@PLT
	mov	DWORD PTR -308[rbp], eax
	mov	rax, QWORD PTR -336[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	gethostbyname@PLT
	mov	QWORD PTR -296[rbp], rax
	cmp	QWORD PTR -296[rbp], 0
	jne	.L4
	mov	rax, QWORD PTR -336[rbp]
	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, 1
	jmp	.L9
.L4:
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -304[rbp], eax
	lea	rax, -288[rbp]
	mov	QWORD PTR [rax], 0
	mov	QWORD PTR 8[rax], 0
	mov	WORD PTR -288[rbp], 2
	mov	rax, QWORD PTR -296[rbp]
	mov	eax, DWORD PTR 20[rax]
	movsx	rdx, eax
	mov	rax, QWORD PTR -296[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	rax, QWORD PTR [rax]
	lea	rcx, -288[rbp]
	add	rcx, 4
	mov	rsi, rax
	mov	rdi, rcx
	call	memmove@PLT
	mov	eax, DWORD PTR -308[rbp]
	movzx	eax, ax
	mov	edi, eax
	call	htons@PLT
	mov	WORD PTR -286[rbp], ax
	lea	rcx, -288[rbp]
	mov	eax, DWORD PTR -304[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	connect@PLT
	test	eax, eax
	jns	.L6
	mov	rax, QWORD PTR -336[rbp]
	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, 1
	jmp	.L9
.L8:
	mov	rdx, QWORD PTR stdin[rip]
	lea	rax, -272[rbp]
	mov	rcx, rdx
	mov	edx, 256
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	mov	DWORD PTR -300[rbp], eax
	mov	eax, DWORD PTR -300[rbp]
	movsx	rdx, eax
	lea	rsi, -272[rbp]
	mov	eax, DWORD PTR -304[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
	mov	rcx, QWORD PTR stdout[rip]
	mov	eax, DWORD PTR -300[rbp]
	movsx	rdx, eax
	lea	rax, -272[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
	mov	eax, DWORD PTR -300[rbp]
	cmp	eax, 255
	jbe	.L11
.L6:
	mov	rax, QWORD PTR stdin[rip]
	mov	rdi, rax
	call	feof@PLT
	test	eax, eax
	jne	.L7
	mov	rax, QWORD PTR stdin[rip]
	mov	rdi, rax
	call	ferror@PLT
	test	eax, eax
	je	.L8
	jmp	.L7
.L11:
	nop
.L7:
	mov	eax, DWORD PTR -304[rbp]
	mov	esi, 2
	mov	edi, eax
	call	shutdown@PLT
	mov	eax, DWORD PTR -304[rbp]
	mov	edi, eax
	mov	eax, 0
	call	close@PLT
	mov	eax, 0
.L9:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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	"219487.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"usage is %s hostname port\000"
	.align	2
.LC1:
	.ascii	"no such host\000"
	.align	2
.LC2:
	.ascii	"error connecting\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 = 304
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #304
	str	r0, [fp, #-304]
	str	r1, [fp, #-308]
	ldr	r3, .L12
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-304]
	cmp	r3, #2
	bgt	.L2
	ldr	r3, .L12+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-308]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L12+8
	bl	fprintf
	mov	r3, #1
	b	.L9
.L2:
	ldr	r3, [fp, #-308]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-296]
	ldr	r3, [fp, #-308]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	gethostbyname
	str	r0, [fp, #-292]
	ldr	r3, [fp, #-292]
	cmp	r3, #0
	bne	.L4
	ldr	r3, .L12+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-308]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L12+12
	bl	fprintf
	mov	r3, #1
	b	.L9
.L4:
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-288]
	sub	r3, fp, #280
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2]
	str	r3, [r2, #4]
	str	r3, [r2, #8]
	str	r3, [r2, #12]
	sub	r3, fp, #4
	sub	r3, r3, #276
	mov	r2, #2
	strh	r2, [r3]	@ movhi
	ldr	r3, [fp, #-292]
	ldr	r3, [r3, #16]
	ldr	r1, [r3]
	ldr	r3, [fp, #-292]
	ldr	r3, [r3, #12]
	mov	r2, r3
	sub	r3, fp, #280
	add	r3, r3, #4
	mov	r0, r3
	bl	memmove
	ldr	r3, [fp, #-296]
	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, #276
	strh	r2, [r3, #2]	@ movhi
	sub	r3, fp, #280
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-288]
	bl	connect
	mov	r3, r0
	cmp	r3, #0
	bge	.L6
	ldr	r3, .L12+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-308]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L12+16
	bl	fprintf
	mov	r3, #1
	b	.L9
.L8:
	ldr	r3, .L12+20
	ldr	r3, [r3]
	sub	r0, fp, #264
	mov	r2, #256
	mov	r1, #1
	bl	fread
	mov	r3, r0
	str	r3, [fp, #-284]
	ldr	r2, [fp, #-284]
	sub	r1, fp, #264
	mov	r3, #0
	ldr	r0, [fp, #-288]
	bl	send
	ldr	r2, [fp, #-284]
	ldr	r3, .L12+24
	ldr	r3, [r3]
	sub	r0, fp, #264
	mov	r1, #1
	bl	fwrite
	ldr	r3, [fp, #-284]
	cmp	r3, #255
	bls	.L11
.L6:
	ldr	r3, .L12+20
	ldr	r3, [r3]
	mov	r0, r3
	bl	feof
	mov	r3, r0
	cmp	r3, #0
	bne	.L7
	ldr	r3, .L12+20
	ldr	r3, [r3]
	mov	r0, r3
	bl	ferror
	mov	r3, r0
	cmp	r3, #0
	beq	.L8
	b	.L7
.L11:
	nop
.L7:
	mov	r1, #2
	ldr	r0, [fp, #-288]
	bl	shutdown
	ldr	r0, [fp, #-288]
	bl	close
	mov	r3, #0
.L9:
	ldr	r2, .L12
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L10
	bl	__stack_chk_fail
.L10:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L13:
	.align	2
.L12:
	.word	.LC3
	.word	stderr
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	stdin
	.word	stdout
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
