	.file	"36076124.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Usage: %s <NTP host>\n"
.LC1:
	.string	"Error looking up host."
.LC2:
	.string	"Error binding socket."
	.align 8
.LC3:
	.string	"Sending message to remote host"
	.align 8
.LC4:
	.string	"Receiving answer from remote host"
.LC5:
	.string	"\nOriginal time: %s"
.LC6:
	.string	"settimeofday"
.LC7:
	.string	"Corrected time: %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, 256
	mov	DWORD PTR -244[rbp], edi
	mov	QWORD PTR -256[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -244[rbp], 2
	je	.L2
	mov	rax, QWORD PTR -256[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	eax, 1
	jmp	.L11
.L2:
	mov	rax, QWORD PTR -256[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rdx, -232[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	inet_aton@PLT
	test	eax, eax
	je	.L4
	lea	rax, -232[rbp]
	mov	edx, 2
	mov	esi, 4
	mov	rdi, rax
	call	gethostbyaddr@PLT
	mov	QWORD PTR -200[rbp], rax
	jmp	.L5
.L4:
	mov	rax, QWORD PTR -256[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	gethostbyname@PLT
	mov	QWORD PTR -200[rbp], rax
	mov	rax, QWORD PTR -200[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	rax, QWORD PTR [rax]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -232[rbp], eax
.L5:
	cmp	QWORD PTR -200[rbp], 0
	jne	.L6
	lea	rdi, .LC1[rip]
	call	herror@PLT
	mov	eax, 1
	jmp	.L11
.L6:
	mov	edx, 17
	mov	esi, 2
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -224[rbp], eax
	lea	rax, -160[rbp]
	mov	edx, 16
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	WORD PTR -160[rbp], 2
	mov	eax, DWORD PTR -232[rbp]
	mov	DWORD PTR -156[rbp], eax
	mov	edi, 123
	call	htons@PLT
	mov	WORD PTR -158[rbp], ax
	mov	DWORD PTR -228[rbp], 16
	mov	WORD PTR -176[rbp], 2
	lea	rax, -176[rbp]
	add	rax, 4
	mov	edx, 4
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	WORD PTR -174[rbp], 0
	lea	rcx, -176[rbp]
	mov	eax, DWORD PTR -224[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	bind@PLT
	mov	DWORD PTR -220[rbp], eax
	cmp	DWORD PTR -220[rbp], 0
	je	.L7
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L11
.L7:
	mov	edi, 184549376
	call	htonl@PLT
	mov	DWORD PTR -144[rbp], eax
	lea	rax, -144[rbp]
	add	rax, 4
	mov	edx, 56
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	lea	rdx, -160[rbp]
	lea	rsi, -144[rbp]
	mov	eax, DWORD PTR -224[rbp]
	mov	r9d, 16
	mov	r8, rdx
	mov	ecx, 0
	mov	edx, 60
	mov	edi, eax
	call	sendto@PLT
	mov	DWORD PTR -220[rbp], eax
	cmp	DWORD PTR -220[rbp], 0
	jns	.L8
	lea	rdi, .LC3[rip]
	call	perror@PLT
.L8:
	lea	rcx, -228[rbp]
	lea	rdx, -160[rbp]
	lea	rsi, -80[rbp]
	mov	eax, DWORD PTR -224[rbp]
	mov	r9, rcx
	mov	r8, rdx
	mov	ecx, 0
	mov	edx, 60
	mov	edi, eax
	call	recvfrom@PLT
	mov	DWORD PTR -220[rbp], eax
	cmp	DWORD PTR -220[rbp], 0
	jns	.L9
	lea	rdi, .LC4[rip]
	call	perror@PLT
.L9:
	mov	eax, DWORD PTR -40[rbp]
	mov	edi, eax
	call	ntohl@PLT
	mov	DWORD PTR -216[rbp], eax
	mov	DWORD PTR -212[rbp], 1671408000
	add	DWORD PTR -212[rbp], 537580800
	mov	edi, 16
	call	malloc@PLT
	mov	QWORD PTR -192[rbp], rax
	mov	edi, 8
	call	malloc@PLT
	mov	QWORD PTR -184[rbp], rax
	mov	rdx, QWORD PTR -184[rbp]
	mov	rax, QWORD PTR -192[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	gettimeofday@PLT
	lea	rax, -208[rbp]
	mov	rdi, rax
	call	time@PLT
	lea	rax, -208[rbp]
	mov	rdi, rax
	call	ctime@PLT
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -216[rbp]
	sub	eax, DWORD PTR -212[rbp]
	mov	edx, eax
	mov	rax, QWORD PTR -192[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -192[rbp]
	mov	QWORD PTR 8[rax], 0
	mov	rdx, QWORD PTR -184[rbp]
	mov	rax, QWORD PTR -192[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	settimeofday@PLT
	test	eax, eax
	jns	.L10
	lea	rdi, .LC6[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L11
.L10:
	lea	rax, -208[rbp]
	mov	rdi, rax
	call	time@PLT
	lea	rax, -208[rbp]
	mov	rdi, rax
	call	ctime@PLT
	mov	rsi, rax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -192[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -184[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	eax, 0
.L11:
	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
.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	"36076124.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Usage: %s <NTP host>\012\000"
	.align	2
.LC1:
	.ascii	"Error looking up host.\000"
	.align	2
.LC2:
	.ascii	"Error binding socket.\000"
	.align	2
.LC3:
	.ascii	"Sending message to remote host\000"
	.align	2
.LC4:
	.ascii	"Receiving answer from remote host\000"
	.align	2
.LC5:
	.ascii	"\012Original time: %s\000"
	.align	2
.LC6:
	.ascii	"settimeofday\000"
	.align	2
.LC7:
	.ascii	"Corrected time: %s\012\000"
	.align	2
.LC8:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 208
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #216
	str	r0, [fp, #-208]
	str	r1, [fp, #-212]
	ldr	r3, .L13
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-208]
	cmp	r3, #2
	beq	.L2
	ldr	r3, .L13+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-212]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L13+8
	bl	fprintf
	mov	r3, #1
	b	.L11
.L2:
	ldr	r3, [fp, #-212]
	add	r3, r3, #4
	ldr	r3, [r3]
	sub	r2, fp, #200
	mov	r1, r2
	mov	r0, r3
	bl	inet_aton
	mov	r3, r0
	cmp	r3, #0
	beq	.L4
	sub	r3, fp, #200
	mov	r2, #2
	mov	r1, #4
	mov	r0, r3
	bl	gethostbyaddr
	str	r0, [fp, #-188]
	b	.L5
.L4:
	ldr	r3, [fp, #-212]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	gethostbyname
	str	r0, [fp, #-188]
	ldr	r3, [fp, #-188]
	ldr	r3, [r3, #16]
	ldr	r3, [r3]
	ldr	r3, [r3]
	str	r3, [fp, #-200]
.L5:
	ldr	r3, [fp, #-188]
	cmp	r3, #0
	bne	.L6
	ldr	r0, .L13+12
	bl	herror
	mov	r3, #1
	b	.L11
.L6:
	mov	r2, #17
	mov	r1, #2
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-184]
	sub	r3, fp, #144
	mov	r2, #16
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #2
	strh	r3, [fp, #-144]	@ movhi
	ldr	r3, [fp, #-200]
	str	r3, [fp, #-140]
	mov	r0, #123
	bl	htons
	mov	r3, r0
	strh	r3, [fp, #-142]	@ movhi
	mov	r3, #16
	str	r3, [fp, #-196]
	mov	r3, #2
	strh	r3, [fp, #-160]	@ movhi
	sub	r3, fp, #160
	add	r3, r3, #4
	mov	r2, #4
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #0
	strh	r3, [fp, #-158]	@ movhi
	sub	r3, fp, #160
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-184]
	bl	bind
	str	r0, [fp, #-180]
	ldr	r3, [fp, #-180]
	cmp	r3, #0
	beq	.L7
	ldr	r0, .L13+16
	bl	perror
	mov	r3, #1
	b	.L11
.L7:
	mov	r0, #184549376
	bl	htonl
	mov	r3, r0
	str	r3, [fp, #-128]
	sub	r3, fp, #128
	add	r3, r3, #4
	mov	r2, #56
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r1, fp, #128
	mov	r3, #16
	str	r3, [sp, #4]
	sub	r3, fp, #144
	str	r3, [sp]
	mov	r3, #0
	mov	r2, #60
	ldr	r0, [fp, #-184]
	bl	sendto
	str	r0, [fp, #-180]
	ldr	r3, [fp, #-180]
	cmp	r3, #0
	bge	.L8
	ldr	r0, .L13+20
	bl	perror
.L8:
	sub	r1, fp, #68
	sub	r3, fp, #196
	str	r3, [sp, #4]
	sub	r3, fp, #144
	str	r3, [sp]
	mov	r3, #0
	mov	r2, #60
	ldr	r0, [fp, #-184]
	bl	recvfrom
	str	r0, [fp, #-180]
	ldr	r3, [fp, #-180]
	cmp	r3, #0
	bge	.L9
	ldr	r0, .L13+24
	bl	perror
.L9:
	ldr	r3, [fp, #-28]
	mov	r0, r3
	bl	ntohl
	str	r0, [fp, #-176]
	ldr	r3, .L13+28
	str	r3, [fp, #-172]
	ldr	r2, [fp, #-172]
	ldr	r3, .L13+32
	add	r3, r2, r3
	str	r3, [fp, #-172]
	mov	r0, #8
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-168]
	mov	r0, #8
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-164]
	ldr	r1, [fp, #-164]
	ldr	r0, [fp, #-168]
	bl	gettimeofday
	sub	r3, fp, #192
	mov	r0, r3
	bl	time
	sub	r3, fp, #192
	mov	r0, r3
	bl	ctime
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L13+36
	bl	printf
	ldr	r2, [fp, #-176]
	ldr	r3, [fp, #-172]
	sub	r3, r2, r3
	mov	r2, r3
	ldr	r3, [fp, #-168]
	str	r2, [r3]
	ldr	r3, [fp, #-168]
	mov	r2, #0
	str	r2, [r3, #4]
	ldr	r1, [fp, #-164]
	ldr	r0, [fp, #-168]
	bl	settimeofday
	mov	r3, r0
	cmp	r3, #0
	bge	.L10
	ldr	r0, .L13+40
	bl	perror
	mov	r3, #1
	b	.L11
.L10:
	sub	r3, fp, #192
	mov	r0, r3
	bl	time
	sub	r3, fp, #192
	mov	r0, r3
	bl	ctime
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L13+44
	bl	printf
	ldr	r0, [fp, #-168]
	bl	free
	ldr	r0, [fp, #-164]
	bl	free
	mov	r3, #0
.L11:
	ldr	r2, .L13
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L12
	bl	__stack_chk_fail
.L12:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L14:
	.align	2
.L13:
	.word	.LC8
	.word	stderr
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	1671408000
	.word	537580800
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
