	.file	"1227039.c"
	.intel_syntax noprefix
	.text
	.globl	error
	.type	error, @function
error:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
	.cfi_endproc
.LFE6:
	.size	error, .-error
	.section	.rodata
.LC0:
	.string	"usage %s hostname port\n"
.LC1:
	.string	"Error Openinn Socket."
.LC2:
	.string	"Error , no such host"
.LC3:
	.string	"connection faild"
.LC4:
	.string	"r"
.LC5:
	.string	"test.txt"
.LC6:
	.string	"Words: %d\n"
	.align 8
.LC7:
	.string	"The file has been successfully sent. Thank you"
	.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, 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	.L3
	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	edi, 1
	call	exit@PLT
.L3:
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -312[rbp], eax
	cmp	DWORD PTR -312[rbp], 0
	jns	.L4
	lea	rdi, .LC1[rip]
	call	error
.L4:
	lea	rax, -288[rbp]
	mov	edx, 16
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	rax, QWORD PTR -336[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	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 -304[rbp], rax
	cmp	QWORD PTR -304[rbp], 0
	jne	.L5
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 20
	mov	esi, 1
	lea	rdi, .LC2[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L5:
	mov	WORD PTR -288[rbp], 2
	mov	rax, QWORD PTR -304[rbp]
	mov	eax, DWORD PTR 20[rax]
	movsx	rdx, eax
	mov	rax, QWORD PTR -304[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 -312[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	connect@PLT
	test	eax, eax
	jns	.L6
	lea	rdi, .LC3[rip]
	call	error
.L6:
	mov	DWORD PTR -316[rbp], 0
	lea	rsi, .LC4[rip]
	lea	rdi, .LC5[rip]
	call	fopen@PLT
	mov	QWORD PTR -296[rbp], rax
	jmp	.L7
.L8:
	mov	eax, DWORD PTR -316[rbp]
	add	eax, 1
	mov	DWORD PTR -316[rbp], eax
.L7:
	mov	rax, QWORD PTR -296[rbp]
	mov	rdi, rax
	call	fgetc@PLT
	mov	BYTE PTR -317[rbp], al
	cmp	BYTE PTR -317[rbp], -1
	jne	.L8
	mov	eax, DWORD PTR -316[rbp]
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rcx, -316[rbp]
	mov	eax, DWORD PTR -312[rbp]
	mov	edx, 4
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	rax, QWORD PTR -296[rbp]
	mov	rdi, rax
	call	rewind@PLT
	jmp	.L9
.L10:
	lea	rcx, -318[rbp]
	mov	eax, DWORD PTR -312[rbp]
	mov	edx, 1
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
.L9:
	mov	rax, QWORD PTR -296[rbp]
	mov	rdi, rax
	call	fgetc@PLT
	mov	BYTE PTR -318[rbp], al
	movzx	eax, BYTE PTR -318[rbp]
	cmp	al, -1
	jne	.L10
	lea	rdi, .LC7[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -312[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	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	"1227039.c"
	.text
	.align	2
	.global	error
	.syntax unified
	.arm
	.fpu softvfp
	.type	error, %function
error:
	@ 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	r0, [fp, #-8]
	bl	perror
	mov	r0, #1
	bl	exit
	.size	error, .-error
	.section	.rodata
	.align	2
.LC0:
	.ascii	"usage %s hostname port\012\000"
	.align	2
.LC1:
	.ascii	"Error Openinn Socket.\000"
	.align	2
.LC2:
	.ascii	"Error , no such host\000"
	.align	2
.LC3:
	.ascii	"connection faild\000"
	.align	2
.LC4:
	.ascii	"r\000"
	.align	2
.LC5:
	.ascii	"test.txt\000"
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 312
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #312
	str	r0, [fp, #-312]
	str	r1, [fp, #-316]
	ldr	r3, .L11
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-312]
	cmp	r3, #2
	bgt	.L3
	ldr	r3, .L11+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-316]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L11+8
	bl	fprintf
	mov	r0, #1
	bl	exit
.L3:
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-296]
	ldr	r3, [fp, #-296]
	cmp	r3, #0
	bge	.L4
	ldr	r0, .L11+12
	bl	error
.L4:
	sub	r3, fp, #280
	mov	r2, #16
	mov	r1, #0
	mov	r0, r3
	bl	memset
	ldr	r3, [fp, #-316]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-292]
	ldr	r3, [fp, #-316]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	gethostbyname
	str	r0, [fp, #-288]
	ldr	r3, [fp, #-288]
	cmp	r3, #0
	bne	.L5
	ldr	r3, .L11+4
	ldr	r3, [r3]
	mov	r2, #20
	mov	r1, #1
	ldr	r0, .L11+16
	bl	fwrite
	mov	r0, #1
	bl	exit
.L5:
	sub	r3, fp, #4
	sub	r3, r3, #276
	mov	r2, #2
	strh	r2, [r3]	@ movhi
	ldr	r3, [fp, #-288]
	ldr	r3, [r3, #16]
	ldr	r1, [r3]
	ldr	r3, [fp, #-288]
	ldr	r3, [r3, #12]
	mov	r2, r3
	sub	r3, fp, #280
	add	r3, r3, #4
	mov	r0, r3
	bl	memmove
	ldr	r3, [fp, #-292]
	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, #-296]
	bl	connect
	mov	r3, r0
	cmp	r3, #0
	bge	.L6
	ldr	r0, .L11+20
	bl	error
.L6:
	mov	r3, #0
	str	r3, [fp, #-300]
	ldr	r1, .L11+24
	ldr	r0, .L11+28
	bl	fopen
	str	r0, [fp, #-284]
	b	.L7
.L10:
	ldr	r3, [fp, #-300]
	add	r3, r3, #1
	str	r3, [fp, #-300]
.L7:
	ldr	r0, [fp, #-284]
	bl	fgetc
	mov	r3, r0
	strb	r3, [fp, #-301]
	b	.L10
.L12:
	.align	2
.L11:
	.word	.LC6
	.word	stderr
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
