	.file	"690229.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"3000"
	.align 8
.LC1:
	.string	"usage: time_server [host [port]]\n"
.LC2:
	.string	"can't creat socket\n"
.LC3:
	.string	"can't bind to %s port\n"
.LC4:
	.string	"recvfrom error\n"
.LC5:
	.string	"rb"
	.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, 432
	mov	DWORD PTR -420[rbp], edi
	mov	QWORD PTR -432[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
	mov	WORD PTR -406[rbp], 0
	cmp	DWORD PTR -420[rbp], 1
	je	.L16
	cmp	DWORD PTR -420[rbp], 2
	jne	.L15
	mov	rax, QWORD PTR -432[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -384[rbp], rax
	jmp	.L5
.L15:
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 33
	mov	esi, 1
	lea	rdi, .LC1[rip]
	call	fwrite@PLT
	jmp	.L5
.L16:
	nop
.L5:
	lea	rax, -352[rbp]
	mov	edx, 16
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	WORD PTR -352[rbp], 2
	mov	DWORD PTR -348[rbp], 0
	mov	rax, QWORD PTR -384[rbp]
	mov	rdi, rax
	call	atoi@PLT
	movzx	eax, ax
	mov	edi, eax
	call	htons@PLT
	mov	WORD PTR -350[rbp], ax
	mov	edx, 0
	mov	esi, 2
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -400[rbp], eax
	cmp	DWORD PTR -400[rbp], 0
	jns	.L6
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 19
	mov	esi, 1
	lea	rdi, .LC2[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L6:
	lea	rcx, -352[rbp]
	mov	eax, DWORD PTR -400[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	bind@PLT
	test	eax, eax
	jns	.L13
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -384[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
.L13:
	mov	DWORD PTR -404[rbp], 16
	lea	rcx, -404[rbp]
	lea	rdx, -368[rbp]
	lea	rsi, -336[rbp]
	mov	eax, DWORD PTR -400[rbp]
	mov	r9, rcx
	mov	r8, rdx
	mov	ecx, 0
	mov	edx, 128
	mov	edi, eax
	call	recvfrom@PLT
	mov	DWORD PTR -396[rbp], eax
	cmp	DWORD PTR -396[rbp], 0
	jns	.L8
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 15
	mov	esi, 1
	lea	rdi, .LC4[rip]
	call	fwrite@PLT
.L8:
	lea	rax, -224[rbp]
	add	rax, 1
	mov	rdi, rax
	call	puts@PLT
	movzx	eax, BYTE PTR -336[rbp]
	movsx	eax, al
	cmp	eax, 67
	jne	.L13
	lea	rax, -336[rbp]
	add	rax, 1
	mov	esi, 0
	mov	rdi, rax
	call	access@PLT
	cmp	eax, -1
	je	.L10
	lea	rax, -336[rbp]
	add	rax, 1
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -376[rbp], rax
	mov	rax, QWORD PTR -376[rbp]
	lea	rdx, -224[rbp]
	lea	rdi, 1[rdx]
	mov	rcx, rax
	mov	edx, 100
	mov	esi, 1
	call	fread@PLT
	mov	DWORD PTR -392[rbp], eax
	jmp	.L11
.L12:
	mov	BYTE PTR -224[rbp], 68
	mov	eax, DWORD PTR -392[rbp]
	add	eax, 1
	movsx	rdx, eax
	lea	rcx, -368[rbp]
	lea	rsi, -224[rbp]
	mov	eax, DWORD PTR -400[rbp]
	mov	r9d, 16
	mov	r8, rcx
	mov	ecx, 0
	mov	edi, eax
	call	sendto@PLT
	mov	rax, QWORD PTR -376[rbp]
	lea	rdx, -224[rbp]
	lea	rdi, 1[rdx]
	mov	rcx, rax
	mov	edx, 100
	mov	esi, 1
	call	fread@PLT
	mov	DWORD PTR -388[rbp], eax
.L11:
	mov	rax, QWORD PTR -376[rbp]
	mov	rdi, rax
	call	feof@PLT
	test	eax, eax
	je	.L12
	mov	rax, QWORD PTR -376[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	BYTE PTR -224[rbp], 70
	lea	rdx, -368[rbp]
	lea	rsi, -224[rbp]
	mov	eax, DWORD PTR -400[rbp]
	mov	r9d, 16
	mov	r8, rdx
	mov	ecx, 0
	mov	edx, 101
	mov	edi, eax
	call	sendto@PLT
	jmp	.L13
.L10:
	mov	BYTE PTR -224[rbp], 69
	lea	rax, -224[rbp]
	add	rax, 1
	movabs	rsi, 8367799623835807317
	movabs	rdi, 7359003173080473711
	mov	QWORD PTR [rax], rsi
	mov	QWORD PTR 8[rax], rdi
	mov	DWORD PTR 16[rax], 778398825
	mov	BYTE PTR 20[rax], 0
	lea	rdx, -368[rbp]
	lea	rsi, -224[rbp]
	mov	eax, DWORD PTR -400[rbp]
	mov	r9d, 16
	mov	r8, rdx
	mov	ecx, 0
	mov	edx, 101
	mov	edi, eax
	call	sendto@PLT
	jmp	.L13
	.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	"690229.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"3000\000"
	.align	2
.LC1:
	.ascii	"usage: time_server [host [port]]\012\000"
	.align	2
.LC2:
	.ascii	"can't creat socket\012\000"
	.align	2
.LC3:
	.ascii	"can't bind to %s port\012\000"
	.align	2
.LC4:
	.ascii	"recvfrom error\012\000"
	.align	2
.LC5:
	.ascii	"rb\000"
	.align	2
.LC6:
	.ascii	"Unable to open file.\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 = 384
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #392
	str	r0, [fp, #-384]
	str	r1, [fp, #-388]
	ldr	r3, .L17
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L17+4
	str	r3, [fp, #-372]
	sub	r3, fp, #4
	sub	r3, r3, #372
	sub	r3, r3, #2
	mov	r2, #0
	strh	r2, [r3]	@ movhi
	ldr	r3, [fp, #-384]
	cmp	r3, #1
	beq	.L16
	ldr	r3, [fp, #-384]
	cmp	r3, #2
	bne	.L15
	ldr	r3, [fp, #-388]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-372]
	b	.L5
.L15:
	ldr	r3, .L17+8
	ldr	r3, [r3]
	mov	r2, #33
	mov	r1, #1
	ldr	r0, .L17+12
	bl	fwrite
	b	.L5
.L16:
	nop
.L5:
	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
	mov	r3, #0
	str	r3, [fp, #-328]
	ldr	r0, [fp, #-372]
	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
	mov	r2, #0
	mov	r1, #2
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-368]
	ldr	r3, [fp, #-368]
	cmp	r3, #0
	bge	.L6
	ldr	r3, .L17+8
	ldr	r3, [r3]
	mov	r2, #19
	mov	r1, #1
	ldr	r0, .L17+16
	bl	fwrite
	mov	r0, #1
	bl	exit
.L6:
	sub	r3, fp, #332
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-368]
	bl	bind
	mov	r3, r0
	cmp	r3, #0
	bge	.L13
	ldr	r3, .L17+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-372]
	ldr	r1, .L17+20
	mov	r0, r3
	bl	fprintf
.L13:
	mov	r3, #16
	str	r3, [fp, #-376]
	sub	r1, fp, #316
	sub	r3, fp, #376
	str	r3, [sp, #4]
	sub	r3, fp, #348
	str	r3, [sp]
	mov	r3, #0
	mov	r2, #128
	ldr	r0, [fp, #-368]
	bl	recvfrom
	str	r0, [fp, #-364]
	ldr	r3, [fp, #-364]
	cmp	r3, #0
	bge	.L8
	ldr	r3, .L17+8
	ldr	r3, [r3]
	mov	r2, #15
	mov	r1, #1
	ldr	r0, .L17+24
	bl	fwrite
.L8:
	sub	r3, fp, #212
	add	r3, r3, #1
	mov	r0, r3
	bl	puts
	ldrb	r3, [fp, #-316]	@ zero_extendqisi2
	cmp	r3, #67
	bne	.L13
	sub	r3, fp, #316
	add	r3, r3, #1
	mov	r1, #0
	mov	r0, r3
	bl	access
	mov	r3, r0
	cmn	r3, #1
	beq	.L10
	sub	r3, fp, #316
	add	r3, r3, #1
	ldr	r1, .L17+28
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-360]
	sub	r3, fp, #212
	add	r0, r3, #1
	ldr	r3, [fp, #-360]
	mov	r2, #100
	mov	r1, #1
	bl	fread
	mov	r3, r0
	str	r3, [fp, #-356]
	b	.L11
.L12:
	mov	r3, #68
	strb	r3, [fp, #-212]
	ldr	r3, [fp, #-356]
	add	r3, r3, #1
	mov	r2, r3
	sub	r1, fp, #212
	mov	r3, #16
	str	r3, [sp, #4]
	sub	r3, fp, #348
	str	r3, [sp]
	mov	r3, #0
	ldr	r0, [fp, #-368]
	bl	sendto
	sub	r3, fp, #212
	add	r0, r3, #1
	ldr	r3, [fp, #-360]
	mov	r2, #100
	mov	r1, #1
	bl	fread
	mov	r3, r0
	str	r3, [fp, #-352]
.L11:
	ldr	r0, [fp, #-360]
	bl	feof
	mov	r3, r0
	cmp	r3, #0
	beq	.L12
	ldr	r0, [fp, #-360]
	bl	fclose
	mov	r3, #70
	strb	r3, [fp, #-212]
	sub	r1, fp, #212
	mov	r3, #16
	str	r3, [sp, #4]
	sub	r3, fp, #348
	str	r3, [sp]
	mov	r3, #0
	mov	r2, #101
	ldr	r0, [fp, #-368]
	bl	sendto
	b	.L13
.L10:
	mov	r3, #69
	strb	r3, [fp, #-212]
	sub	r3, fp, #212
	add	r3, r3, #1
	ldr	r2, .L17+32
	mov	r0, r3
	mov	r1, r2
	mov	r3, #21
	mov	r2, r3
	bl	memcpy
	sub	r1, fp, #212
	mov	r3, #16
	str	r3, [sp, #4]
	sub	r3, fp, #348
	str	r3, [sp]
	mov	r3, #0
	mov	r2, #101
	ldr	r0, [fp, #-368]
	bl	sendto
	b	.L13
.L18:
	.align	2
.L17:
	.word	.LC7
	.word	.LC0
	.word	stderr
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
