	.file	"286514.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"GPS Initializing"
.LC1:
	.string	"Done"
	.text
	.globl	initialize
	.type	initialize, @function
initialize:
.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, 16
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -4[rbp], 0
	jmp	.L2
.L3:
	mov	edi, 300000
	call	usleep@PLT
	mov	edi, 46
	call	putchar@PLT
	add	DWORD PTR -4[rbp], 1
.L2:
	cmp	DWORD PTR -4[rbp], 9
	jle	.L3
	lea	rdi, .LC1[rip]
	call	puts@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	initialize, .-initialize
	.section	.rodata
.LC2:
	.string	"Acquiring satellites."
.LC3:
	.string	"Satellite %d"
.LC4:
	.string	"Weak signal."
.LC5:
	.string	"\nGPS Initialized."
	.align 8
.LC6:
	.string	"Warning: Weak signal causing low measurement accuracy\n"
	.text
	.globl	acquire_satellites
	.type	acquire_satellites, @function
acquire_satellites:
.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, 16
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -8[rbp], 0
	jmp	.L5
.L10:
	mov	eax, DWORD PTR -8[rbp]
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -4[rbp], 0
	jmp	.L6
.L7:
	mov	edi, 133700
	call	usleep@PLT
	mov	edi, 46
	call	putchar@PLT
	add	DWORD PTR -4[rbp], 1
.L6:
	call	rand@PLT
	mov	ecx, eax
	movsx	rax, ecx
	imul	rax, rax, 1717986919
	shr	rax, 32
	sar	eax, 2
	mov	esi, ecx
	sar	esi, 31
	sub	eax, esi
	mov	edx, eax
	mov	eax, edx
	sal	eax, 2
	add	eax, edx
	add	eax, eax
	sub	ecx, eax
	mov	edx, ecx
	cmp	DWORD PTR -4[rbp], edx
	jl	.L7
	cmp	DWORD PTR -8[rbp], 3
	je	.L8
	lea	rdi, .LC1[rip]
	call	puts@PLT
	jmp	.L9
.L8:
	lea	rdi, .LC4[rip]
	call	puts@PLT
.L9:
	add	DWORD PTR -8[rbp], 1
.L5:
	cmp	DWORD PTR -8[rbp], 2
	jle	.L10
	lea	rdi, .LC5[rip]
	call	puts@PLT
	lea	rdi, .LC6[rip]
	call	puts@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	acquire_satellites, .-acquire_satellites
	.globl	query_position
	.type	query_position, @function
query_position:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	call	rand@PLT
	movsx	rdx, eax
	imul	rdx, rdx, 1644744395
	shr	rdx, 32
	sar	edx, 9
	mov	ecx, eax
	sar	ecx, 31
	sub	edx, ecx
	imul	ecx, edx, 1337
	sub	eax, ecx
	mov	edx, eax
	lea	eax, -668[rdx]
	mov	DWORD PTR -20[rbp], eax
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, -21[rbp]
	add	rax, rdx
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	query_position, .-query_position
	.section	.rodata
	.align 8
.LC7:
	.string	"We need to access flag.txt.\nCurrent position: %p\n"
.LC8:
	.string	"What's your plan?\n> "
.LC9:
	.string	"Where do we start?\n> "
.LC10:
	.string	"%p"
	.text
	.globl	main
	.type	main, @function
main:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 4096
	or	QWORD PTR [rsp], 0
	sub	rsp, 32
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR stdout[rip]
	mov	esi, 0
	mov	rdi, rax
	call	setbuf@PLT
	lea	rax, -4112[rbp]
	mov	edi, eax
	call	srand@PLT
	mov	eax, 0
	call	initialize
	mov	eax, 0
	call	acquire_satellites
	mov	eax, 0
	call	query_position
	mov	rsi, rax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rdx, QWORD PTR stdin[rip]
	lea	rax, -4112[rbp]
	mov	esi, 4096
	mov	rdi, rax
	call	fgets@PLT
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -4120[rbp]
	mov	rsi, rax
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	rax, QWORD PTR -4120[rbp]
	call	rax
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.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	"286514.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"GPS Initializing\000"
	.align	2
.LC1:
	.ascii	"Done\000"
	.text
	.align	2
	.global	initialize
	.syntax unified
	.arm
	.fpu softvfp
	.type	initialize, %function
initialize:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	ldr	r0, .L4
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L2
.L3:
	ldr	r0, .L4+4
	bl	usleep
	mov	r0, #46
	bl	putchar
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L2:
	ldr	r3, [fp, #-8]
	cmp	r3, #9
	ble	.L3
	ldr	r0, .L4+8
	bl	puts
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L5:
	.align	2
.L4:
	.word	.LC0
	.word	300000
	.word	.LC1
	.size	initialize, .-initialize
	.section	.rodata
	.align	2
.LC2:
	.ascii	"Acquiring satellites.\000"
	.align	2
.LC3:
	.ascii	"Satellite %d\000"
	.align	2
.LC4:
	.ascii	"Weak signal.\000"
	.align	2
.LC5:
	.ascii	"\012GPS Initialized.\000"
	.align	2
.LC6:
	.ascii	"Warning: Weak signal causing low measurement accura"
	.ascii	"cy\012\000"
	.text
	.align	2
	.global	acquire_satellites
	.syntax unified
	.arm
	.fpu softvfp
	.type	acquire_satellites, %function
acquire_satellites:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	ldr	r0, .L13
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L7
.L12:
	ldr	r1, [fp, #-12]
	ldr	r0, .L13+4
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L8
.L9:
	ldr	r0, .L13+8
	bl	usleep
	mov	r0, #46
	bl	putchar
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L8:
	bl	rand
	mov	r1, r0
	ldr	r3, .L13+12
	smull	r2, r3, r1, r3
	asr	r2, r3, #2
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #1
	sub	r2, r1, r3
	ldr	r3, [fp, #-8]
	cmp	r3, r2
	blt	.L9
	ldr	r3, [fp, #-12]
	cmp	r3, #3
	beq	.L10
	ldr	r0, .L13+16
	bl	puts
	b	.L11
.L10:
	ldr	r0, .L13+20
	bl	puts
.L11:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L7:
	ldr	r3, [fp, #-12]
	cmp	r3, #2
	ble	.L12
	ldr	r0, .L13+24
	bl	puts
	ldr	r0, .L13+28
	bl	puts
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L14:
	.align	2
.L13:
	.word	.LC2
	.word	.LC3
	.word	133700
	.word	1717986919
	.word	.LC1
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.size	acquire_satellites, .-acquire_satellites
	.section	.rodata
	.align	2
.LC7:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	query_position
	.syntax unified
	.arm
	.fpu softvfp
	.type	query_position, %function
query_position:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	ldr	r3, .L18
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	bl	rand
	mov	r1, r0
	ldr	r3, .L18+4
	smull	r2, r3, r1, r3
	asr	r2, r3, #9
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #6
	sub	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	sub	r2, r1, r2
	sub	r3, r2, #668
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	sub	r2, fp, #17
	add	r3, r2, r3
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	ldr	r2, .L18
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L17
	bl	__stack_chk_fail
.L17:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L19:
	.align	2
.L18:
	.word	.LC7
	.word	1644744395
	.size	query_position, .-query_position
	.section	.rodata
	.align	2
.LC8:
	.ascii	"We need to access flag.txt.\012Current position: %p"
	.ascii	"\012\000"
	.align	2
.LC9:
	.ascii	"What's your plan?\012> \000"
	.align	2
.LC10:
	.ascii	"Where do we start?\012> \000"
	.align	2
.LC11:
	.ascii	"%p\000"
	.align	2
.LC12:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 4104
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #4096
	sub	sp, sp, #8
	ldr	r3, .L23
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L23+4
	ldr	r3, [r3]
	mov	r1, #0
	mov	r0, r3
	bl	setbuf
	sub	r3, fp, #4096
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	srand
	bl	initialize
	bl	acquire_satellites
	bl	query_position
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L23+8
	bl	printf
	ldr	r0, .L23+12
	bl	printf
	ldr	r3, .L23+16
	ldr	r2, [r3]
	sub	r3, fp, #4096
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, #4096
	mov	r0, r3
	bl	fgets
	ldr	r0, .L23+20
	bl	printf
	sub	r3, fp, #4096
	sub	r3, r3, #4
	sub	r3, r3, #8
	mov	r1, r3
	ldr	r0, .L23+24
	bl	__isoc99_scanf
	sub	r3, fp, #4096
	sub	r3, r3, #4
	ldr	r3, [r3, #-8]
	blx	r3
	mov	r3, #0
	ldr	r2, .L23
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L22
	bl	__stack_chk_fail
.L22:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L24:
	.align	2
.L23:
	.word	.LC12
	.word	stdout
	.word	.LC8
	.word	.LC9
	.word	stdin
	.word	.LC10
	.word	.LC11
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
