	.file	"351882.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"localhost"
.LC1:
	.string	"3000"
.LC2:
	.string	"usage: UDPtime [host [port]]\n"
.LC3:
	.string	"Can't get host entry \n"
.LC4:
	.string	"Can't create socket \n"
.LC5:
	.string	"Can't connect to %s %s \n"
.LC6:
	.string	"Please enter a file name:"
.LC7:
	.string	"%s"
.LC8:
	.string	"ab"
.LC9:
	.string	"dest.txt"
.LC10:
	.string	"Unable to open file on local"
.LC11:
	.string	"Data transfer successful!"
.LC12:
	.string	"Error Message: %s\n"
	.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, 416
	mov	DWORD PTR -404[rbp], edi
	mov	QWORD PTR -416[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, .LC0[rip]
	mov	QWORD PTR -384[rbp], rax
	lea	rax, .LC1[rip]
	mov	QWORD PTR -376[rbp], rax
	cmp	DWORD PTR -404[rbp], 3
	je	.L2
	cmp	DWORD PTR -404[rbp], 3
	jg	.L3
	cmp	DWORD PTR -404[rbp], 1
	je	.L4
	cmp	DWORD PTR -404[rbp], 2
	je	.L5
	jmp	.L3
.L4:
	lea	rax, .LC0[rip]
	mov	QWORD PTR -384[rbp], rax
	jmp	.L6
.L2:
	mov	rax, QWORD PTR -416[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	QWORD PTR -376[rbp], rax
.L5:
	mov	rax, QWORD PTR -416[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -384[rbp], rax
	jmp	.L6
.L3:
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 29
	mov	esi, 1
	lea	rdi, .LC2[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L6:
	lea	rax, -352[rbp]
	mov	edx, 16
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	WORD PTR -352[rbp], 2
	mov	rax, QWORD PTR -376[rbp]
	mov	rdi, rax
	call	atoi@PLT
	movzx	eax, ax
	mov	edi, eax
	call	htons@PLT
	mov	WORD PTR -350[rbp], ax
	mov	rax, QWORD PTR -384[rbp]
	mov	rdi, rax
	call	gethostbyname@PLT
	mov	QWORD PTR -368[rbp], rax
	cmp	QWORD PTR -368[rbp], 0
	je	.L7
	mov	rax, QWORD PTR -368[rbp]
	mov	eax, DWORD PTR 20[rax]
	movsx	rdx, eax
	mov	rax, QWORD PTR -368[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	rax, QWORD PTR [rax]
	lea	rcx, -352[rbp]
	add	rcx, 4
	mov	rsi, rax
	mov	rdi, rcx
	call	memcpy@PLT
	jmp	.L8
.L7:
	mov	rax, QWORD PTR -384[rbp]
	mov	rdi, rax
	call	inet_addr@PLT
	mov	DWORD PTR -348[rbp], eax
	mov	eax, DWORD PTR -348[rbp]
	cmp	eax, -1
	jne	.L8
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 22
	mov	esi, 1
	lea	rdi, .LC3[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L8:
	mov	edx, 0
	mov	esi, 2
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -392[rbp], eax
	cmp	DWORD PTR -392[rbp], 0
	jns	.L9
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 21
	mov	esi, 1
	lea	rdi, .LC4[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L9:
	lea	rcx, -352[rbp]
	mov	eax, DWORD PTR -392[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	connect@PLT
	test	eax, eax
	jns	.L10
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, QWORD PTR -376[rbp]
	mov	rdx, QWORD PTR -384[rbp]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L10:
	lea	rdi, .LC6[rip]
	call	puts@PLT
	lea	rax, -224[rbp]
	add	rax, 1
	mov	rsi, rax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	BYTE PTR -224[rbp], 67
	lea	rcx, -224[rbp]
	mov	eax, DWORD PTR -392[rbp]
	mov	edx, 128
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	lea	rsi, .LC8[rip]
	lea	rdi, .LC9[rip]
	call	fopen@PLT
	mov	QWORD PTR -360[rbp], rax
	cmp	QWORD PTR -360[rbp], 0
	jne	.L16
	lea	rdi, .LC10[rip]
	call	puts@PLT
.L16:
	lea	rcx, -336[rbp]
	mov	eax, DWORD PTR -392[rbp]
	mov	edx, 128
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -388[rbp], eax
	movzx	eax, BYTE PTR -336[rbp]
	cmp	al, 68
	jne	.L12
	lea	rax, -336[rbp]
	add	rax, 1
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -360[rbp]
	lea	rcx, -336[rbp]
	lea	rdi, 1[rcx]
	mov	rcx, rax
	mov	esi, 1
	call	fwrite@PLT
	lea	rdi, .LC11[rip]
	call	puts@PLT
	jmp	.L16
.L12:
	movzx	eax, BYTE PTR -336[rbp]
	cmp	al, 69
	jne	.L14
	lea	rax, -336[rbp]
	add	rax, 1
	mov	rsi, rax
	lea	rdi, .LC12[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L16
.L14:
	movzx	eax, BYTE PTR -336[rbp]
	cmp	al, 70
	jne	.L16
	mov	rax, QWORD PTR -360[rbp]
	mov	rdi, rax
	call	fclose@PLT
	nop
	mov	edi, 0
	call	exit@PLT
	.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	"351882.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"localhost\000"
	.align	2
.LC1:
	.ascii	"3000\000"
	.align	2
.LC2:
	.ascii	"usage: UDPtime [host [port]]\012\000"
	.align	2
.LC3:
	.ascii	"Can't get host entry \012\000"
	.align	2
.LC4:
	.ascii	"Can't create socket \012\000"
	.align	2
.LC5:
	.ascii	"Can't connect to %s %s \012\000"
	.align	2
.LC6:
	.ascii	"Please enter a file name:\000"
	.align	2
.LC7:
	.ascii	"%s\000"
	.align	2
.LC8:
	.ascii	"ab\000"
	.align	2
.LC9:
	.ascii	"dest.txt\000"
	.align	2
.LC10:
	.ascii	"Unable to open file on local\000"
	.align	2
.LC11:
	.ascii	"Data transfer successful!\000"
	.align	2
.LC12:
	.ascii	"Error Message: %s\012\000"
	.align	2
.LC13:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 360
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #360
	str	r0, [fp, #-360]
	str	r1, [fp, #-364]
	ldr	r3, .L18
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L18+4
	str	r3, [fp, #-356]
	ldr	r3, .L18+8
	str	r3, [fp, #-352]
	ldr	r3, [fp, #-360]
	cmp	r3, #3
	beq	.L2
	ldr	r3, [fp, #-360]
	cmp	r3, #3
	bgt	.L3
	ldr	r3, [fp, #-360]
	cmp	r3, #1
	beq	.L4
	ldr	r3, [fp, #-360]
	cmp	r3, #2
	beq	.L5
	b	.L3
.L4:
	ldr	r3, .L18+4
	str	r3, [fp, #-356]
	b	.L6
.L2:
	ldr	r3, [fp, #-364]
	ldr	r3, [r3, #8]
	str	r3, [fp, #-352]
.L5:
	ldr	r3, [fp, #-364]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-356]
	b	.L6
.L3:
	ldr	r3, .L18+12
	ldr	r3, [r3]
	mov	r2, #29
	mov	r1, #1
	ldr	r0, .L18+16
	bl	fwrite
	mov	r0, #1
	bl	exit
.L6:
	sub	r3, fp, #332
	mov	r2, #16
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r3, fp, #4
	sub	r3, r3, #328
	mov	r2, #2
	strh	r2, [r3]	@ movhi
	ldr	r0, [fp, #-352]
	bl	atoi
	mov	r3, r0
	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, #328
	strh	r2, [r3, #2]	@ movhi
	ldr	r0, [fp, #-356]
	bl	gethostbyname
	str	r0, [fp, #-348]
	ldr	r3, [fp, #-348]
	cmp	r3, #0
	beq	.L7
	ldr	r3, [fp, #-348]
	ldr	r3, [r3, #16]
	ldr	r1, [r3]
	ldr	r3, [fp, #-348]
	ldr	r3, [r3, #12]
	mov	r2, r3
	sub	r3, fp, #332
	add	r3, r3, #4
	mov	r0, r3
	bl	memcpy
	b	.L8
.L7:
	ldr	r0, [fp, #-356]
	bl	inet_addr
	mov	r3, r0
	str	r3, [fp, #-328]
	ldr	r3, [fp, #-328]
	cmn	r3, #1
	bne	.L8
	ldr	r3, .L18+12
	ldr	r3, [r3]
	mov	r2, #22
	mov	r1, #1
	ldr	r0, .L18+20
	bl	fwrite
	mov	r0, #1
	bl	exit
.L8:
	mov	r2, #0
	mov	r1, #2
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-344]
	ldr	r3, [fp, #-344]
	cmp	r3, #0
	bge	.L9
	ldr	r3, .L18+12
	ldr	r3, [r3]
	mov	r2, #21
	mov	r1, #1
	ldr	r0, .L18+24
	bl	fwrite
	mov	r0, #1
	bl	exit
.L9:
	sub	r3, fp, #332
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-344]
	bl	connect
	mov	r3, r0
	cmp	r3, #0
	bge	.L10
	ldr	r3, .L18+12
	ldr	r0, [r3]
	ldr	r3, [fp, #-352]
	ldr	r2, [fp, #-356]
	ldr	r1, .L18+28
	bl	fprintf
	mov	r0, #1
	bl	exit
.L10:
	ldr	r0, .L18+32
	bl	puts
	sub	r3, fp, #212
	add	r3, r3, #1
	mov	r1, r3
	ldr	r0, .L18+36
	bl	__isoc99_scanf
	mov	r3, #67
	strb	r3, [fp, #-212]
	sub	r3, fp, #212
	mov	r2, #128
	mov	r1, r3
	ldr	r0, [fp, #-344]
	bl	write
	ldr	r1, .L18+40
	ldr	r0, .L18+44
	bl	fopen
	str	r0, [fp, #-340]
	ldr	r3, [fp, #-340]
	cmp	r3, #0
	bne	.L16
	ldr	r0, .L18+48
	bl	puts
.L16:
	sub	r3, fp, #316
	mov	r2, #128
	mov	r1, r3
	ldr	r0, [fp, #-344]
	bl	read
	str	r0, [fp, #-336]
	ldrb	r3, [fp, #-316]	@ zero_extendqisi2
	cmp	r3, #68
	bne	.L12
	sub	r3, fp, #316
	add	r3, r3, #1
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r3, fp, #316
	add	r0, r3, #1
	ldr	r3, [fp, #-340]
	mov	r1, #1
	bl	fwrite
	ldr	r0, .L18+52
	bl	puts
	b	.L16
.L12:
	ldrb	r3, [fp, #-316]	@ zero_extendqisi2
	cmp	r3, #69
	bne	.L14
	sub	r3, fp, #316
	add	r3, r3, #1
	mov	r1, r3
	ldr	r0, .L18+56
	bl	printf
	b	.L16
.L14:
	ldrb	r3, [fp, #-316]	@ zero_extendqisi2
	cmp	r3, #70
	bne	.L16
	ldr	r0, [fp, #-340]
	bl	fclose
	nop
	mov	r0, #0
	bl	exit
.L19:
	.align	2
.L18:
	.word	.LC13
	.word	.LC0
	.word	.LC1
	.word	stderr
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
