	.file	"795585.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"ERROR, no such host\n"
.LC1:
	.string	"ERROR opening socket"
.LC2:
	.string	"ERROR connecting"
.LC3:
	.string	"ERROR sending filename"
.LC4:
	.string	"SENDING FILENAME"
	.align 8
.LC5:
	.string	"Created filename, now sending file contents "
.LC6:
	.string	"File transferred."
	.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, 96
	mov	DWORD PTR -84[rbp], edi
	mov	QWORD PTR -96[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -96[rbp]
	add	rax, 32
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -72[rbp], eax
	mov	rax, QWORD PTR -96[rbp]
	add	rax, 24
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	gethostbyname@PLT
	mov	QWORD PTR -56[rbp], rax
	cmp	QWORD PTR -56[rbp], 0
	jne	.L2
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 20
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	edi, 0
	call	exit@PLT
.L2:
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -68[rbp], eax
	cmp	DWORD PTR -68[rbp], 0
	jns	.L3
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	error@PLT
.L3:
	lea	rax, -48[rbp]
	mov	QWORD PTR [rax], 0
	mov	QWORD PTR 8[rax], 0
	mov	WORD PTR -48[rbp], 2
	mov	eax, DWORD PTR -72[rbp]
	movzx	eax, ax
	mov	edi, eax
	call	htons@PLT
	mov	WORD PTR -46[rbp], ax
	mov	rax, QWORD PTR -96[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rdx, -48[rbp]
	add	rdx, 4
	mov	rsi, rax
	mov	edi, 2
	mov	eax, 0
	call	inet_pton@PLT
	lea	rcx, -48[rbp]
	mov	eax, DWORD PTR -68[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	connect@PLT
	test	eax, eax
	jns	.L4
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	error@PLT
.L4:
	mov	rax, QWORD PTR -96[rbp]
	add	rax, 16
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -68[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	send_filename
	test	eax, eax
	jne	.L5
	lea	rdi, .LC3[rip]
	call	puts@PLT
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	error@PLT
.L5:
	lea	rdi, .LC5[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -96[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	esi, 0
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -64[rbp], eax
.L8:
	lea	rcx, -18[rbp]
	mov	eax, DWORD PTR -64[rbp]
	mov	edx, 10
	mov	rsi, rcx
	mov	edi, eax
	mov	eax, 0
	call	read@PLT
	mov	DWORD PTR -60[rbp], eax
	mov	BYTE PTR -8[rbp], 0
	cmp	DWORD PTR -60[rbp], 0
	je	.L12
	mov	edx, DWORD PTR -60[rbp]
	lea	rcx, -18[rbp]
	mov	eax, DWORD PTR -68[rbp]
	mov	rsi, rcx
	mov	edi, eax
	mov	eax, 0
	call	write@PLT
	jmp	.L8
.L12:
	nop
	lea	rdi, .LC6[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -64[rbp]
	mov	edi, eax
	mov	eax, 0
	call	close@PLT
	mov	eax, DWORD PTR -68[rbp]
	mov	edi, eax
	mov	eax, 0
	call	close@PLT
	mov	eax, 0
	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
	.section	.rodata
.LC7:
	.string	"filename sending: %s \n"
.LC8:
	.string	"Error creating file"
	.text
	.globl	send_filename
	.type	send_filename, @function
send_filename:
.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, 144
	mov	DWORD PTR -132[rbp], edi
	mov	QWORD PTR -144[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	movabs	rax, 9132979056108904
	mov	edx, 0
	mov	QWORD PTR -112[rbp], rax
	mov	QWORD PTR -104[rbp], rdx
	mov	QWORD PTR -96[rbp], 0
	mov	QWORD PTR -88[rbp], 0
	mov	QWORD PTR -80[rbp], 0
	mov	QWORD PTR -72[rbp], 0
	mov	QWORD PTR -64[rbp], 0
	mov	QWORD PTR -56[rbp], 0
	mov	QWORD PTR -48[rbp], 0
	mov	QWORD PTR -40[rbp], 0
	mov	QWORD PTR -32[rbp], 0
	mov	QWORD PTR -24[rbp], 0
	mov	DWORD PTR -16[rbp], 0
	mov	rdx, QWORD PTR -144[rbp]
	lea	rax, -112[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcat@PLT
	lea	rax, -112[rbp]
	mov	rsi, rax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -112[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rcx, -112[rbp]
	mov	eax, DWORD PTR -132[rbp]
	mov	rsi, rcx
	mov	edi, eax
	mov	eax, 0
	call	write@PLT
	lea	rcx, -112[rbp]
	mov	eax, DWORD PTR -132[rbp]
	mov	edx, 100
	mov	rsi, rcx
	mov	edi, eax
	mov	eax, 0
	call	read@PLT
	mov	DWORD PTR -116[rbp], eax
	movzx	eax, BYTE PTR -112[rbp]
	cmp	al, 83
	je	.L14
	lea	rdi, .LC8[rip]
	call	puts@PLT
	mov	eax, 0
	jmp	.L16
.L14:
	mov	eax, 1
.L16:
	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	send_filename, .-send_filename
	.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	"795585.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"ERROR, no such host\012\000"
	.align	2
.LC1:
	.ascii	"ERROR opening socket\000"
	.align	2
.LC2:
	.ascii	"ERROR connecting\000"
	.align	2
.LC3:
	.ascii	"ERROR sending filename\000"
	.align	2
.LC4:
	.ascii	"SENDING FILENAME\000"
	.align	2
.LC5:
	.ascii	"Created filename, now sending file contents \000"
	.align	2
.LC6:
	.ascii	"File transferred.\000"
	.align	2
.LC7:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 64
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #64
	str	r0, [fp, #-64]
	str	r1, [fp, #-68]
	ldr	r3, .L13
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-68]
	add	r3, r3, #16
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-56]
	ldr	r3, [fp, #-68]
	add	r3, r3, #12
	ldr	r3, [r3]
	mov	r0, r3
	bl	gethostbyname
	str	r0, [fp, #-52]
	ldr	r3, [fp, #-52]
	cmp	r3, #0
	bne	.L2
	ldr	r3, .L13+4
	ldr	r3, [r3]
	mov	r2, #20
	mov	r1, #1
	ldr	r0, .L13+8
	bl	fwrite
	mov	r0, #0
	bl	exit
.L2:
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-48]
	ldr	r3, [fp, #-48]
	cmp	r3, #0
	bge	.L3
	ldr	r0, .L13+12
	bl	error
.L3:
	sub	r3, fp, #36
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2]
	str	r3, [r2, #4]
	str	r3, [r2, #8]
	str	r3, [r2, #12]
	mov	r3, #2
	strh	r3, [fp, #-36]	@ movhi
	ldr	r3, [fp, #-56]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	mov	r0, r3
	bl	htons
	mov	r3, r0
	strh	r3, [fp, #-34]	@ movhi
	ldr	r3, [fp, #-68]
	add	r3, r3, #4
	ldr	r1, [r3]
	sub	r3, fp, #36
	add	r3, r3, #4
	mov	r2, r3
	mov	r0, #2
	bl	inet_pton
	sub	r3, fp, #36
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-48]
	bl	connect
	mov	r3, r0
	cmp	r3, #0
	bge	.L4
	ldr	r0, .L13+16
	bl	error
.L4:
	ldr	r3, [fp, #-68]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, [fp, #-48]
	bl	send_filename
	mov	r3, r0
	cmp	r3, #0
	bne	.L5
	ldr	r0, .L13+20
	bl	puts
	ldr	r0, .L13+24
	bl	error
.L5:
	ldr	r0, .L13+28
	bl	puts
	ldr	r3, [fp, #-68]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r1, #0
	mov	r0, r3
	bl	open
	str	r0, [fp, #-44]
.L8:
	sub	r3, fp, #20
	mov	r2, #10
	mov	r1, r3
	ldr	r0, [fp, #-44]
	bl	read
	str	r0, [fp, #-40]
	mov	r3, #0
	strb	r3, [fp, #-10]
	ldr	r3, [fp, #-40]
	cmp	r3, #0
	beq	.L12
	sub	r3, fp, #20
	ldr	r2, [fp, #-40]
	mov	r1, r3
	ldr	r0, [fp, #-48]
	bl	write
	b	.L8
.L12:
	nop
	ldr	r0, .L13+32
	bl	puts
	ldr	r0, [fp, #-44]
	bl	close
	ldr	r0, [fp, #-48]
	bl	close
	mov	r3, #0
	ldr	r2, .L13
	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}
.L14:
	.align	2
.L13:
	.word	.LC7
	.word	stderr
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.size	main, .-main
	.section	.rodata
	.align	2
.LC9:
	.ascii	"filename sending: %s \012\000"
	.align	2
.LC10:
	.ascii	"Error creating file\000"
	.align	2
.LC8:
	.ascii	"header \000"
	.space	92
	.align	2
.LC11:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	send_filename
	.syntax unified
	.arm
	.fpu softvfp
	.type	send_filename, %function
send_filename:
	@ args = 0, pretend = 0, frame = 120
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #120
	str	r0, [fp, #-120]
	str	r1, [fp, #-124]
	ldr	r3, .L20
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r2, .L20+4
	sub	r3, fp, #108
	ldm	r2, {r0, r1}
	stm	r3, {r0, r1}
	sub	r3, fp, #100
	mov	r2, #92
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r3, fp, #108
	ldr	r1, [fp, #-124]
	mov	r0, r3
	bl	strcat
	sub	r3, fp, #108
	mov	r1, r3
	ldr	r0, .L20+8
	bl	printf
	sub	r3, fp, #108
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r3, fp, #108
	mov	r1, r3
	ldr	r0, [fp, #-120]
	bl	write
	sub	r3, fp, #108
	mov	r2, #100
	mov	r1, r3
	ldr	r0, [fp, #-120]
	bl	read
	str	r0, [fp, #-112]
	ldrb	r3, [fp, #-108]	@ zero_extendqisi2
	cmp	r3, #83
	beq	.L16
	ldr	r0, .L20+12
	bl	puts
	mov	r3, #0
	b	.L18
.L16:
	mov	r3, #1
.L18:
	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	.LC11
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.size	send_filename, .-send_filename
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
