	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rpc_make_handshake             ## -- Begin function rpc_make_handshake
	.p2align	4, 0x90
_rpc_make_handshake:                    ## @rpc_make_handshake
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	(%rdi), %rax
	movq	_rpc_status_connected@GOTPCREL(%rip), %rcx
	movl	$-1, %r14d
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.1:
	movq	%rdi, %rbx
	cmpq	$0, 8(%rdi)
	js	LBB0_9
## %bb.2:
	cmpl	$-2, 16(%rbx)
	jne	LBB0_4
## %bb.3:
	cmpl	$-2, 20(%rbx)
	jne	LBB0_4
## %bb.5:
	movq	%rbx, %rdi
	movsd	%xmm0, -24(%rbp)                ## 8-byte Spill
	callq	_rpc_nonce_send
	testq	%rax, %rax
	js	LBB0_4
## %bb.6:
	movq	%rbx, %rdi
	movl	$1, %esi
	movsd	-24(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	callq	_rpc_work
	testq	%rax, %rax
	js	LBB0_4
## %bb.7:
	movq	%rbx, %rdi
	movl	$1, %esi
	movsd	-24(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	callq	_rpc_work
	testq	%rax, %rax
	js	LBB0_4
## %bb.8:
	xorl	%edi, %edi
	cmpl	$0, 20(%rbx)
	sete	%dil
	callq	_assert
	xorl	%edi, %edi
	cmpl	$0, 16(%rbx)
	sete	%dil
	callq	_assert
	xorl	%r14d, %r14d
	jmp	LBB0_9
LBB0_4:
	movq	%rbx, %rdi
	callq	_rpc_server_disconnect
LBB0_9:
	movl	%r14d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_rpc_status_connected,8,3       ## @rpc_status_connected
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rpc_make_handshake             ; -- Begin function rpc_make_handshake
	.p2align	2
_rpc_make_handshake:                    ; @rpc_make_handshake
	.cfi_startproc
; %bb.0:
	stp	d9, d8, [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 b8, -40
	.cfi_offset b9, -48
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _rpc_status_connected@GOTPAGE
Lloh1:
	ldr	x9, [x9, _rpc_status_connected@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.1:
	mov	x19, x0
	ldr	x8, [x0, #8]
	tbnz	x8, #63, LBB0_9
; %bb.2:
	ldr	w8, [x19, #16]
	cmn	w8, #2
	b.ne	LBB0_8
; %bb.3:
	ldr	w8, [x19, #20]
	cmn	w8, #2
	b.ne	LBB0_8
; %bb.4:
	fmov	d8, d0
	mov	x0, x19
	bl	_rpc_nonce_send
	tbnz	x0, #63, LBB0_8
; %bb.5:
	mov	x0, x19
	mov	w1, #1
	fmov	d0, d8
	bl	_rpc_work
	tbnz	x0, #63, LBB0_8
; %bb.6:
	mov	x0, x19
	mov	w1, #1
	fmov	d0, d8
	bl	_rpc_work
	tbnz	x0, #63, LBB0_8
; %bb.7:
	ldr	w8, [x19, #20]
	cmp	w8, #0
	cset	w0, eq
	bl	_assert
	ldr	w8, [x19, #16]
	cmp	w8, #0
	cset	w0, eq
	bl	_assert
	mov	w0, #0
	b	LBB0_10
LBB0_8:
	mov	x0, x19
	bl	_rpc_server_disconnect
LBB0_9:
	mov	w0, #-1
LBB0_10:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp], #48               ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_rpc_status_connected,8,3       ; @rpc_status_connected
.subsections_via_symbols
