	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gps_reader_process
_gps_reader_process:                    ## @gps_reader_process
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_gps_reader_data@GOTPCREL(%rip), %rbx
	cmpl	$0, 80(%rbx)
	je	LBB0_1
LBB0_14:
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	leaq	16(%rbx), %r14
	leaq	8(%rbx), %r15
	leaq	48(%rbx), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	leaq	-56(%rbp), %r13
	movq	_TIME_SET@GOTPCREL(%rip), %r12
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	callq	_time
	movq	%r15, %rdi
	callq	_pthread_mutex_lock
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	movl	$4, %edx
	callq	_memcpy
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %rdi
	callq	_pthread_mutex_unlock
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$0, 80(%rbx)
	jne	LBB0_14
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	$0, 16(%rbx)
	movq	$0, 24(%rbx)
	movq	%r14, %rdi
	callq	_connect_gpsd
	testq	%rax, %rax
	js	LBB0_14
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %rdi
	callq	_read_gps_data_once
	testl	%eax, %eax
	js	LBB0_14
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	je	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$0, 40(%rbx)
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	24(%rbx), %rax
	movq	_MODE_2D@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_7
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rdi
	callq	_time
	movq	-56(%rbp), %rax
	subq	(%rbx), %rax
	movq	_GPS_CACHE_EXPIRY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jle	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %rdi
	callq	_pthread_mutex_lock
	movq	40(%rbx), %rax
	movq	%rax, 72(%rbx)
	movl	$0, 48(%rbx)
	movq	$0, 64(%rbx)
	movq	%r15, %rdi
	callq	_pthread_mutex_unlock
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r12), %eax
	testl	%eax, 16(%rbx)
	je	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %rdi
	callq	_pthread_mutex_lock
	movl	(%r12), %eax
	orl	%eax, 48(%rbx)
	movl	32(%rbx), %eax
	movl	%eax, 56(%rbx)
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_gps_reader_data,88,3           ## @gps_reader_data
	.comm	_MODE_2D,8,3                    ## @MODE_2D
	.comm	_GPS_CACHE_EXPIRY,8,3           ## @GPS_CACHE_EXPIRY
	.comm	_TIME_SET,4,2                   ## @TIME_SET
	.no_dead_strip	_gps_reader_process
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gps_reader_process
_gps_reader_process:                    ; @gps_reader_process
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
Lloh0:
	adrp	x19, _gps_reader_data@GOTPAGE
Lloh1:
	ldr	x19, [x19, _gps_reader_data@GOTPAGEOFF]
	ldr	w8, [x19, #80]
	cbz	w8, LBB0_2
LBB0_1:
	mov	x0, #0
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_2:
Lloh2:
	adrp	x21, _GPS_CACHE_EXPIRY@GOTPAGE
Lloh3:
	ldr	x21, [x21, _GPS_CACHE_EXPIRY@GOTPAGEOFF]
Lloh4:
	adrp	x22, _TIME_SET@GOTPAGE
Lloh5:
	ldr	x22, [x22, _TIME_SET@GOTPAGEOFF]
Lloh6:
	adrp	x23, _MODE_2D@GOTPAGE
Lloh7:
	ldr	x23, [x23, _MODE_2D@GOTPAGEOFF]
	b	LBB0_6
LBB0_3:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x19
	bl	_time
	add	x20, x19, #8
	mov	x0, x20
	bl	_pthread_mutex_lock
	add	x0, x19, #48
	add	x1, x19, #16
	mov	w2, #4
	bl	_memcpy
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x20
	bl	_pthread_mutex_unlock
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x19, #80]
	cbnz	w8, LBB0_1
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	str	wzr, [x0, #16]!
	str	xzr, [x0, #8]
	bl	_connect_gpsd
	tbnz	x0, #63, LBB0_1
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	add	x0, x19, #16
	bl	_read_gps_data_once
	tbnz	w0, #31, LBB0_1
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x19, #40]
	cmp	w0, #0
	ccmp	x8, #0, #4, ne
	b.eq	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x19, #24]
	ldr	x9, [x23]
	cmp	x8, x9
	b.ge	LBB0_3
LBB0_10:                                ;   in Loop: Header=BB0_6 Depth=1
	add	x0, sp, #8
	bl	_time
	ldr	x8, [sp, #8]
	ldr	x9, [x19]
	ldr	x10, [x21]
	sub	x8, x8, x9
	cmp	x8, x10
	b.le	LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_6 Depth=1
	add	x20, x19, #8
	mov	x0, x20
	bl	_pthread_mutex_lock
	ldr	x8, [x19, #40]
	str	wzr, [x19, #48]
	stp	xzr, x8, [x19, #64]
	mov	x0, x20
	bl	_pthread_mutex_unlock
LBB0_12:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x19, #16]
	ldr	w9, [x22]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.13:                               ;   in Loop: Header=BB0_6 Depth=1
	add	x20, x19, #8
	mov	x0, x20
	bl	_pthread_mutex_lock
	ldr	w8, [x22]
	ldr	w9, [x19, #48]
	orr	w8, w9, w8
	str	w8, [x19, #48]
	ldr	w8, [x19, #32]
	str	w8, [x19, #56]
	b	LBB0_4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_gps_reader_data,88,3           ; @gps_reader_data
	.comm	_MODE_2D,8,3                    ; @MODE_2D
	.comm	_GPS_CACHE_EXPIRY,8,3           ; @GPS_CACHE_EXPIRY
	.comm	_TIME_SET,4,2                   ; @TIME_SET
	.no_dead_strip	_gps_reader_process
.subsections_via_symbols
