	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_raspi_gps_shutdown             ## -- Begin function raspi_gps_shutdown
	.p2align	4, 0x90
_raspi_gps_shutdown:                    ## @raspi_gps_shutdown
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%edi, %r14d
	movq	_gps_reader_data@GOTPCREL(%rip), %rbx
	movl	$1, (%rbx)
	cmpq	$0, 24(%rbx)
	je	LBB0_4
## %bb.1:
	testl	%r14d, %r14d
	je	LBB0_3
## %bb.2:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_fprintf
LBB0_3:
	movl	16(%rbx), %edi
	xorl	%esi, %esi
	callq	_pthread_join
LBB0_4:
	testl	%r14d, %r14d
	je	LBB0_7
## %bb.5:
	cmpq	$0, 8(%rbx)
	je	LBB0_7
## %bb.6:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_fprintf
LBB0_7:
	leaq	8(%rbx), %r14
	movq	%r14, %rdi
	callq	_disconnect_gpsd
	movq	%r14, %rdi
	callq	_libgps_unload
	addq	$4, %rbx
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_pthread_mutex_destroy          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_gps_reader_data,32,3           ## @gps_reader_data
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Waiting for GPS reader thread to terminate\n"

L_.str.1:                               ## @.str.1
	.asciz	"Closing gpsd connection\n\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_raspi_gps_shutdown             ; -- Begin function raspi_gps_shutdown
	.p2align	2
_raspi_gps_shutdown:                    ; @raspi_gps_shutdown
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x20, _gps_reader_data@GOTPAGE
Lloh1:
	ldr	x20, [x20, _gps_reader_data@GOTPAGEOFF]
	mov	w8, #1
	str	w8, [x20]
	ldr	x8, [x20, #24]
	cbz	x8, LBB0_4
; %bb.1:
	cbz	w19, LBB0_3
; %bb.2:
Lloh2:
	adrp	x8, _stderr@GOTPAGE
Lloh3:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fprintf
LBB0_3:
	ldr	w0, [x20, #16]
	mov	x1, #0
	bl	_pthread_join
LBB0_4:
	cbz	w19, LBB0_7
; %bb.5:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_7
; %bb.6:
Lloh7:
	adrp	x8, _stderr@GOTPAGE
Lloh8:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_fprintf
LBB0_7:
	add	x19, x20, #8
	mov	x0, x19
	bl	_disconnect_gpsd
	mov	x0, x19
	bl	_libgps_unload
	add	x0, x20, #4
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_pthread_mutex_destroy
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_gps_reader_data,32,3           ; @gps_reader_data
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Waiting for GPS reader thread to terminate\n"

l_.str.1:                               ; @.str.1
	.asciz	"Closing gpsd connection\n\n"

.subsections_via_symbols
