	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function guard_check_connection
_guard_check_connection:                ## @guard_check_connection
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_adhost@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	movq	(%rax), %rax
	movq	_ADIST_ROLE_SENDER@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
	callq	_PJDLOG_ASSERT
	movq	_adist_remote_lock@GOTPCREL(%rip), %r15
	movq	%r15, %rdi
	callq	_rw_rlock
	movq	(%r14), %rax
	movq	16(%rax), %rbx
	movq	%r15, %rdi
	callq	_rw_unlock
	movq	(%r14), %rax
	movl	8(%rax), %edx
	testq	%rbx, %rbx
	je	LBB0_3
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movl	$3, %edi
	jmp	LBB0_2
LBB0_3:
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	callq	_pjdlog_debug
	xorl	%eax, %eax
	callq	_sender_connect
	movq	(%r14), %rcx
	movl	8(%rcx), %edx
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	leaq	L_.str.3(%rip), %rsi
	movl	$1, %edi
LBB0_2:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pjdlog_debug                   ## TAILCALL
LBB0_5:
	leaq	L_.str.2(%rip), %rdi
	movl	%edx, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pjdlog_info                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_adhost,8,3                     ## @adhost
	.comm	_ADIST_ROLE_SENDER,8,3          ## @ADIST_ROLE_SENDER
	.comm	_adist_remote_lock,4,2          ## @adist_remote_lock
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"remote_guard: Connection to %s is ok."

L_.str.1:                               ## @.str.1
	.asciz	"remote_guard: Reconnecting to %s."

L_.str.2:                               ## @.str.2
	.asciz	"Successfully reconnected to %s."

L_.str.3:                               ## @.str.3
	.asciz	"remote_guard: Reconnect to %s failed."

	.no_dead_strip	_guard_check_connection
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function guard_check_connection
_guard_check_connection:                ; @guard_check_connection
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
Lloh0:
	adrp	x20, _adhost@GOTPAGE
Lloh1:
	ldr	x20, [x20, _adhost@GOTPAGEOFF]
	ldr	x8, [x20]
	ldr	x8, [x8]
Lloh2:
	adrp	x9, _ADIST_ROLE_SENDER@GOTPAGE
Lloh3:
	ldr	x9, [x9, _ADIST_ROLE_SENDER@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, eq
	bl	_PJDLOG_ASSERT
Lloh5:
	adrp	x19, _adist_remote_lock@GOTPAGE
Lloh6:
	ldr	x19, [x19, _adist_remote_lock@GOTPAGEOFF]
	mov	x0, x19
	bl	_rw_rlock
	ldr	x8, [x20]
	ldr	x21, [x8, #16]
	mov	x0, x19
	bl	_rw_unlock
	ldr	x8, [x20]
	ldr	w2, [x8, #8]
	cbz	x21, LBB0_2
; %bb.1:
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #3
	b	LBB0_4
LBB0_2:
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	bl	_pjdlog_debug
	bl	_sender_connect
	ldr	x8, [x20]
	ldr	w2, [x8, #8]
	cbz	x0, LBB0_5
; %bb.3:
Lloh11:
	adrp	x1, l_.str.3@PAGE
Lloh12:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w0, #1
LBB0_4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_pjdlog_debug
LBB0_5:
Lloh13:
	adrp	x0, l_.str.2@PAGE
Lloh14:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x2
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_pjdlog_info
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_adhost,8,3                     ; @adhost
	.comm	_ADIST_ROLE_SENDER,8,3          ; @ADIST_ROLE_SENDER
	.comm	_adist_remote_lock,4,2          ; @adist_remote_lock
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"remote_guard: Connection to %s is ok."

l_.str.1:                               ; @.str.1
	.asciz	"remote_guard: Reconnecting to %s."

l_.str.2:                               ; @.str.2
	.asciz	"Successfully reconnected to %s."

l_.str.3:                               ; @.str.3
	.asciz	"remote_guard: Reconnect to %s failed."

	.no_dead_strip	_guard_check_connection
.subsections_via_symbols
