	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function handshake_version
_handshake_version:                     ## @handshake_version
	.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	%rdx, %rbx
	movq	%rsi, %r12
	movq	%rdi, %r13
	testq	%rcx, %rcx
	leaq	-60(%rbp), %r15
	cmovneq	%rcx, %r15
	movl	4(%rdi), %edi
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdx
	xorl	%eax, %eax
	callq	_packet_write_fmt_gently
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_4
LBB0_1:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movl	(%rbx), %edx
	testl	%edx, %edx
	je	LBB0_8
## %bb.2:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	leaq	4(%rax), %r14
	leaq	L_.str.2(%rip), %rbx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	4(%r13), %edi
	movq	%rbx, %rsi
	xorl	%eax, %eax
	callq	_packet_write_fmt_gently
	testq	%rax, %rax
	jne	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	(%r14), %edx
	addq	$4, %r14
	testl	%edx, %edx
	jne	LBB0_6
LBB0_8:
	movl	4(%r13), %edi
	callq	_packet_flush_gently
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	leaq	L_.str.4(%rip), %rdi
	jmp	LBB0_4
LBB0_7:
	leaq	L_.str.3(%rip), %rdi
LBB0_4:
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_error                          ## TAILCALL
LBB0_10:
	movl	(%r13), %edi
	xorl	%esi, %esi
	callq	_packet_read_line
	testq	%rax, %rax
	je	LBB0_11
## %bb.12:
	movq	%rax, %rbx
	leaq	-48(%rbp), %rdx
	movq	%rax, %rdi
	movq	%r12, %rsi
	callq	_skip_prefix
	testl	%eax, %eax
	je	LBB0_14
## %bb.13:
	movq	-48(%rbp), %rdi
	leaq	L_.str.5(%rip), %rsi
	callq	_strcmp
	testq	%rax, %rax
	jne	LBB0_14
## %bb.15:
	movl	(%r13), %edi
	xorl	%esi, %esi
	callq	_packet_read_line
	testq	%rax, %rax
	je	LBB0_16
## %bb.17:
	movq	%rax, %r12
	leaq	L_.str.8(%rip), %rsi
	leaq	-48(%rbp), %rdx
	movq	%rax, %rdi
	callq	_skip_prefix
	testl	%eax, %eax
	je	LBB0_19
## %bb.18:
	movq	-48(%rbp), %rdi
	movl	$10, %esi
	movq	%r15, %rdx
	callq	_strtol_i
	testq	%rax, %rax
	jne	LBB0_19
## %bb.21:
	movl	(%r13), %edi
	xorl	%esi, %esi
	callq	_packet_read_line
	testq	%rax, %rax
	je	LBB0_22
## %bb.24:
	leaq	L_.str.10(%rip), %rdi
	movq	%rax, %rsi
	jmp	LBB0_20
LBB0_11:
	leaq	L_.str.7(%rip), %rbx
LBB0_14:
	leaq	L_.str.6(%rip), %rdi
	movq	%rbx, %rsi
	movq	%r12, %rdx
	xorl	%eax, %eax
	callq	_error
LBB0_29:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	leaq	L_.str.7(%rip), %r12
LBB0_19:
	leaq	L_.str.9(%rip), %rdi
	movq	%r12, %rsi
LBB0_20:
	xorl	%eax, %eax
	callq	_error
	jmp	LBB0_29
LBB0_22:
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx), %eax
	movl	(%r15), %esi
	testl	%eax, %eax
	je	LBB0_28
## %bb.23:
	addq	$4, %rcx
LBB0_26:                                ## =>This Inner Loop Header: Depth=1
	cmpl	%esi, %eax
	je	LBB0_27
## %bb.25:                              ##   in Loop: Header=BB0_26 Depth=1
	movl	(%rcx), %eax
	addq	$4, %rcx
	testl	%eax, %eax
	jne	LBB0_26
LBB0_28:
	leaq	L_.str.11(%rip), %rdi
	xorl	%eax, %eax
	callq	_error
	jmp	LBB0_29
LBB0_27:
	xorl	%eax, %eax
	jmp	LBB0_29
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s-client\n"

L_.str.1:                               ## @.str.1
	.asciz	"Could not write client identification"

L_.str.2:                               ## @.str.2
	.asciz	"version=%d\n"

L_.str.3:                               ## @.str.3
	.asciz	"Could not write requested version"

L_.str.4:                               ## @.str.4
	.asciz	"Could not write flush packet"

L_.str.5:                               ## @.str.5
	.asciz	"-server"

L_.str.6:                               ## @.str.6
	.asciz	"Unexpected line '%s', expected %s-server"

L_.str.7:                               ## @.str.7
	.asciz	"<flush packet>"

L_.str.8:                               ## @.str.8
	.asciz	"version="

L_.str.9:                               ## @.str.9
	.asciz	"Unexpected line '%s', expected version"

L_.str.10:                              ## @.str.10
	.asciz	"Unexpected line '%s', expected flush"

L_.str.11:                              ## @.str.11
	.asciz	"Version %d not supported"

	.no_dead_strip	_handshake_version
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function handshake_version
_handshake_version:                     ; @handshake_version
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x19, x2
	mov	x22, x1
	mov	x21, x0
	add	x8, sp, #28
	cmp	x3, #0
	csel	x20, x8, x3, eq
	ldr	w0, [x0, #4]
	str	x1, [sp]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_packet_write_fmt_gently
	cbz	x0, LBB0_2
; %bb.1:
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_9
LBB0_2:
	ldr	w8, [x19]
	cbz	w8, LBB0_6
; %bb.3:
	add	x24, x19, #4
Lloh4:
	adrp	x23, l_.str.2@PAGE
Lloh5:
	add	x23, x23, l_.str.2@PAGEOFF
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x21, #4]
	str	x8, [sp]
	mov	x1, x23
	bl	_packet_write_fmt_gently
	cbnz	x0, LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x24], #4
	cbnz	w8, LBB0_4
LBB0_6:
	ldr	w0, [x21, #4]
	bl	_packet_flush_gently
	cbz	x0, LBB0_10
; %bb.7:
Lloh6:
	adrp	x0, l_.str.4@PAGE
Lloh7:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_9
LBB0_8:
Lloh8:
	adrp	x0, l_.str.3@PAGE
Lloh9:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_9:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	b	_error
LBB0_10:
	ldr	w0, [x21]
	mov	x1, #0
	bl	_packet_read_line
	cbz	x0, LBB0_18
; %bb.11:
	mov	x23, x0
	add	x2, sp, #16
	mov	x1, x22
	bl	_skip_prefix
	cbz	w0, LBB0_19
; %bb.12:
	ldr	x0, [sp, #16]
Lloh10:
	adrp	x1, l_.str.5@PAGE
Lloh11:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_strcmp
	cbnz	x0, LBB0_19
; %bb.13:
	ldr	w0, [x21]
	mov	x1, #0
	bl	_packet_read_line
	cbz	x0, LBB0_22
; %bb.14:
	mov	x22, x0
Lloh12:
	adrp	x1, l_.str.8@PAGE
Lloh13:
	add	x1, x1, l_.str.8@PAGEOFF
	add	x2, sp, #16
	bl	_skip_prefix
	cbz	w0, LBB0_23
; %bb.15:
	ldr	x0, [sp, #16]
	mov	w1, #10
	mov	x2, x20
	bl	_strtol_i
	cbnz	x0, LBB0_23
; %bb.16:
	ldr	w0, [x21]
	mov	x1, #0
	bl	_packet_read_line
	cbz	x0, LBB0_24
; %bb.17:
	str	x0, [sp]
Lloh14:
	adrp	x0, l_.str.10@PAGE
Lloh15:
	add	x0, x0, l_.str.10@PAGEOFF
	b	LBB0_20
LBB0_18:
Lloh16:
	adrp	x23, l_.str.7@PAGE
Lloh17:
	add	x23, x23, l_.str.7@PAGEOFF
LBB0_19:
	stp	x23, x22, [sp]
Lloh18:
	adrp	x0, l_.str.6@PAGE
Lloh19:
	add	x0, x0, l_.str.6@PAGEOFF
LBB0_20:
	bl	_error
LBB0_21:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_22:
Lloh20:
	adrp	x22, l_.str.7@PAGE
Lloh21:
	add	x22, x22, l_.str.7@PAGEOFF
LBB0_23:
	str	x22, [sp]
Lloh22:
	adrp	x0, l_.str.9@PAGE
Lloh23:
	add	x0, x0, l_.str.9@PAGEOFF
	b	LBB0_20
LBB0_24:
	ldr	w9, [x19]
	ldr	w8, [x20]
	cbz	w9, LBB0_28
; %bb.25:
	add	x10, x19, #4
LBB0_26:                                ; =>This Inner Loop Header: Depth=1
	cmp	w9, w8
	b.eq	LBB0_29
; %bb.27:                               ;   in Loop: Header=BB0_26 Depth=1
	ldr	w9, [x10], #4
	cbnz	w9, LBB0_26
LBB0_28:
	str	x8, [sp]
Lloh24:
	adrp	x0, l_.str.11@PAGE
Lloh25:
	add	x0, x0, l_.str.11@PAGEOFF
	b	LBB0_20
LBB0_29:
	mov	w0, #0
	b	LBB0_21
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s-client\n"

l_.str.1:                               ; @.str.1
	.asciz	"Could not write client identification"

l_.str.2:                               ; @.str.2
	.asciz	"version=%d\n"

l_.str.3:                               ; @.str.3
	.asciz	"Could not write requested version"

l_.str.4:                               ; @.str.4
	.asciz	"Could not write flush packet"

l_.str.5:                               ; @.str.5
	.asciz	"-server"

l_.str.6:                               ; @.str.6
	.asciz	"Unexpected line '%s', expected %s-server"

l_.str.7:                               ; @.str.7
	.asciz	"<flush packet>"

l_.str.8:                               ; @.str.8
	.asciz	"version="

l_.str.9:                               ; @.str.9
	.asciz	"Unexpected line '%s', expected version"

l_.str.10:                              ; @.str.10
	.asciz	"Unexpected line '%s', expected flush"

l_.str.11:                              ; @.str.11
	.asciz	"Version %d not supported"

	.no_dead_strip	_handshake_version
.subsections_via_symbols
