	.file	"190769497.c"
	.intel_syntax noprefix
	.text
	.globl	get_in_addr
	.type	get_in_addr, @function
get_in_addr:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, WORD PTR [rax]
	cmp	ax, 2
	jne	.L2
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 4
	jmp	.L3
.L2:
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 8
.L3:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	get_in_addr, .-get_in_addr
	.section	.rodata
.LC0:
	.string	"Usage: send_file <IP address>"
.LC1:
	.string	"GET /index.html HTTP/1.1\r\n\r\n"
.LC2:
	.string	"8080"
.LC3:
	.string	"getaddrinfo: %s\n"
.LC4:
	.string	"client: socket"
.LC5:
	.string	"client: connect"
.LC6:
	.string	"client: failed to connect\n"
.LC7:
	.string	"client: connecting to %s\n"
.LC8:
	.string	"Can't send request to server"
.LC9:
	.string	"Request to server sent!"
.LC10:
	.string	"File is fetched successfully"
	.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, 1200
	mov	DWORD PTR -1188[rbp], edi
	mov	QWORD PTR -1200[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -1188[rbp], 2
	je	.L5
	lea	rdi, .LC0[rip]
	call	perror@PLT
	mov	eax, -1
	jmp	.L18
.L5:
	lea	rax, .LC1[rip]
	mov	QWORD PTR -1144[rbp], rax
	mov	QWORD PTR -1040[rbp], 0
	mov	QWORD PTR -1032[rbp], 0
	lea	rdx, -1024[rbp]
	mov	eax, 0
	mov	ecx, 126
	mov	rdi, rdx
	rep stosq
	lea	rax, -1136[rbp]
	mov	edx, 48
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	DWORD PTR -1132[rbp], 0
	mov	DWORD PTR -1128[rbp], 1
	mov	rax, QWORD PTR -1200[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rcx, -1160[rbp]
	lea	rdx, -1136[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	call	getaddrinfo@PLT
	mov	DWORD PTR -1168[rbp], eax
	cmp	DWORD PTR -1168[rbp], 0
	je	.L7
	mov	eax, DWORD PTR -1168[rbp]
	mov	edi, eax
	call	gai_strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 1
	jmp	.L18
.L7:
	mov	rax, QWORD PTR -1160[rbp]
	mov	QWORD PTR -1152[rbp], rax
	jmp	.L8
.L13:
	mov	rax, QWORD PTR -1152[rbp]
	mov	edx, DWORD PTR 12[rax]
	mov	rax, QWORD PTR -1152[rbp]
	mov	ecx, DWORD PTR 8[rax]
	mov	rax, QWORD PTR -1152[rbp]
	mov	eax, DWORD PTR 4[rax]
	mov	esi, ecx
	mov	edi, eax
	call	socket@PLT
	mov	DWORD PTR -1172[rbp], eax
	cmp	DWORD PTR -1172[rbp], -1
	jne	.L9
	lea	rdi, .LC4[rip]
	call	perror@PLT
	jmp	.L10
.L9:
	mov	rax, QWORD PTR -1152[rbp]
	mov	edx, DWORD PTR 16[rax]
	mov	rax, QWORD PTR -1152[rbp]
	mov	rcx, QWORD PTR 24[rax]
	mov	eax, DWORD PTR -1172[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	connect@PLT
	cmp	eax, -1
	jne	.L20
	mov	eax, DWORD PTR -1172[rbp]
	mov	edi, eax
	call	close@PLT
	lea	rdi, .LC5[rip]
	call	perror@PLT
	nop
.L10:
	mov	rax, QWORD PTR -1152[rbp]
	mov	rax, QWORD PTR 40[rax]
	mov	QWORD PTR -1152[rbp], rax
.L8:
	cmp	QWORD PTR -1152[rbp], 0
	jne	.L13
	jmp	.L12
.L20:
	nop
.L12:
	cmp	QWORD PTR -1152[rbp], 0
	jne	.L14
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 26
	mov	esi, 1
	lea	rdi, .LC6[rip]
	call	fwrite@PLT
	mov	eax, 2
	jmp	.L18
.L14:
	mov	rax, QWORD PTR -1152[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	rdi, rax
	call	get_in_addr
	mov	rsi, rax
	mov	rax, QWORD PTR -1152[rbp]
	mov	eax, DWORD PTR 4[rax]
	lea	rdx, -1088[rbp]
	mov	ecx, 46
	mov	edi, eax
	call	inet_ntop@PLT
	lea	rax, -1088[rbp]
	mov	rsi, rax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -1160[rbp]
	mov	rdi, rax
	call	freeaddrinfo@PLT
	mov	rax, QWORD PTR -1144[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	mov	rsi, QWORD PTR -1144[rbp]
	mov	eax, DWORD PTR -1172[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
	cmp	rax, -1
	jne	.L15
	lea	rdi, .LC8[rip]
	call	perror@PLT
	mov	eax, -1
	jmp	.L18
.L15:
	lea	rdi, .LC9[rip]
	call	puts@PLT
	jmp	.L16
.L17:
	lea	rax, -1040[rbp]
	mov	rdi, rax
	call	puts@PLT
.L16:
	lea	rsi, -1040[rbp]
	mov	eax, DWORD PTR -1172[rbp]
	mov	ecx, 0
	mov	edx, 1024
	mov	edi, eax
	call	recv@PLT
	mov	DWORD PTR -1164[rbp], eax
	cmp	DWORD PTR -1164[rbp], 0
	jg	.L17
	lea	rdi, .LC10[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -1172[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
.L18:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	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	"190769497.c"
	.text
	.align	2
	.global	get_in_addr
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_in_addr, %function
get_in_addr:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldrh	r3, [r3]
	cmp	r3, #2
	bne	.L2
	ldr	r3, [fp, #-8]
	add	r3, r3, #4
	b	.L3
.L2:
	ldr	r3, [fp, #-8]
	add	r3, r3, #8
.L3:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	get_in_addr, .-get_in_addr
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Usage: send_file <IP address>\000"
	.align	2
.LC1:
	.ascii	"GET /index.html HTTP/1.1\015\012\015\012\000"
	.align	2
.LC2:
	.ascii	"8080\000"
	.align	2
.LC3:
	.ascii	"getaddrinfo: %s\012\000"
	.align	2
.LC4:
	.ascii	"client: socket\000"
	.align	2
.LC5:
	.ascii	"client: connect\000"
	.align	2
.LC6:
	.ascii	"client: failed to connect\012\000"
	.align	2
.LC7:
	.ascii	"client: connecting to %s\012\000"
	.align	2
.LC8:
	.ascii	"Can't send request to server\000"
	.align	2
.LC9:
	.ascii	"Request to server sent!\000"
	.align	2
.LC10:
	.ascii	"File is fetched successfully\000"
	.align	2
.LC11:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 1144
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #1136
	sub	sp, sp, #12
	str	r0, [fp, #-1152]
	str	r1, [fp, #-1156]
	ldr	r3, .L21
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r3, [fp, #-1152]
	cmp	r3, #2
	beq	.L5
	ldr	r0, .L21+4
	bl	perror
	mvn	r3, #0
	b	.L18
.L5:
	ldr	r3, .L21+8
	str	r3, [fp, #-1132]
	mov	r3, #0
	str	r3, [fp, #-1040]
	sub	r3, fp, #1024
	sub	r3, r3, #12
	mov	r2, #1020
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r3, fp, #1104
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r2, #32
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #0
	str	r3, [fp, #-1116]
	mov	r3, #1
	str	r3, [fp, #-1112]
	ldr	r3, [fp, #-1156]
	add	r3, r3, #4
	ldr	r0, [r3]
	sub	r3, fp, #1120
	sub	r3, r3, #12
	sub	r3, r3, #12
	sub	r2, fp, #1104
	sub	r2, r2, #12
	sub	r2, r2, #4
	ldr	r1, .L21+12
	bl	getaddrinfo
	str	r0, [fp, #-1128]
	ldr	r3, [fp, #-1128]
	cmp	r3, #0
	beq	.L7
	ldr	r3, .L21+16
	ldr	r4, [r3]
	ldr	r0, [fp, #-1128]
	bl	gai_strerror
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L21+20
	mov	r0, r4
	bl	fprintf
	mov	r3, #1
	b	.L18
.L7:
	ldr	r3, [fp, #-1144]
	str	r3, [fp, #-1140]
	b	.L8
.L13:
	ldr	r3, [fp, #-1140]
	ldr	r0, [r3, #4]
	ldr	r3, [fp, #-1140]
	ldr	r1, [r3, #8]
	ldr	r3, [fp, #-1140]
	ldr	r3, [r3, #12]
	mov	r2, r3
	bl	socket
	str	r0, [fp, #-1136]
	ldr	r3, [fp, #-1136]
	cmn	r3, #1
	bne	.L9
	ldr	r0, .L21+24
	bl	perror
	b	.L10
.L9:
	ldr	r3, [fp, #-1140]
	ldr	r1, [r3, #20]
	ldr	r3, [fp, #-1140]
	ldr	r3, [r3, #16]
	mov	r2, r3
	ldr	r0, [fp, #-1136]
	bl	connect
	mov	r3, r0
	cmn	r3, #1
	bne	.L20
	ldr	r0, [fp, #-1136]
	bl	close
	ldr	r0, .L21+28
	bl	perror
	nop
.L10:
	ldr	r3, [fp, #-1140]
	ldr	r3, [r3, #28]
	str	r3, [fp, #-1140]
.L8:
	ldr	r3, [fp, #-1140]
	cmp	r3, #0
	bne	.L13
	b	.L12
.L20:
	nop
.L12:
	ldr	r3, [fp, #-1140]
	cmp	r3, #0
	bne	.L14
	ldr	r3, .L21+16
	ldr	r3, [r3]
	mov	r2, #26
	mov	r1, #1
	ldr	r0, .L21+32
	bl	fwrite
	mov	r3, #2
	b	.L18
.L14:
	ldr	r3, [fp, #-1140]
	ldr	r4, [r3, #4]
	ldr	r3, [fp, #-1140]
	ldr	r3, [r3, #20]
	mov	r0, r3
	bl	get_in_addr
	mov	r1, r0
	sub	r2, fp, #1072
	sub	r2, r2, #12
	sub	r2, r2, #4
	mov	r3, #46
	mov	r0, r4
	bl	inet_ntop
	sub	r3, fp, #1072
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, .L21+36
	bl	printf
	ldr	r3, [fp, #-1144]
	mov	r0, r3
	bl	freeaddrinfo
	ldr	r0, [fp, #-1132]
	bl	strlen
	mov	r2, r0
	mov	r3, #0
	ldr	r1, [fp, #-1132]
	ldr	r0, [fp, #-1136]
	bl	send
	mov	r3, r0
	cmn	r3, #1
	bne	.L15
	ldr	r0, .L21+40
	bl	perror
	mvn	r3, #0
	b	.L18
.L15:
	ldr	r0, .L21+44
	bl	puts
	b	.L16
.L17:
	sub	r3, fp, #1024
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r0, r3
	bl	puts
.L16:
	sub	r1, fp, #1024
	sub	r1, r1, #12
	sub	r1, r1, #4
	mov	r3, #0
	mov	r2, #1024
	ldr	r0, [fp, #-1136]
	bl	recv
	str	r0, [fp, #-1124]
	ldr	r3, [fp, #-1124]
	cmp	r3, #0
	bgt	.L17
	ldr	r0, .L21+48
	bl	puts
	ldr	r0, [fp, #-1136]
	bl	close
	mov	r3, #0
.L18:
	ldr	r2, .L21
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L19
	bl	__stack_chk_fail
.L19:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L22:
	.align	2
.L21:
	.word	.LC11
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	stderr
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
