	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_discover_version               ## -- Begin function discover_version
	.p2align	4, 0x90
_discover_version:                      ## @discover_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	callq	_packet_reader_peek
                                        ## kill: def $eax killed $eax def $rax
	addl	$-132, %eax
	cmpl	$3, %eax
	ja	LBB0_8
## %bb.1:
	movl	$130, %ebx
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_3:
	movl	(%r14), %edi
	callq	_determine_protocol_version_client
	cmpl	$131, %eax
	je	LBB0_8
## %bb.4:
	movl	%eax, %ebx
	cmpl	$129, %eax
	je	LBB0_7
## %bb.5:
	cmpl	$128, %ebx
	jne	LBB0_9
## %bb.6:
	movq	%r14, %rdi
	callq	_process_capabilities_v2
	movl	$128, %ebx
	jmp	LBB0_9
LBB0_8:
	leaq	L_.str(%rip), %rdi
	callq	_BUG
	movl	$131, %ebx
	jmp	LBB0_9
LBB0_2:
	xorl	%edi, %edi
	callq	_die_initial_contact
	jmp	LBB0_9
LBB0_7:
	movq	%r14, %rdi
	callq	_packet_reader_read
	movl	$129, %ebx
LBB0_9:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
LJTI0_0:
	.long	L0_0_set_3
	.long	L0_0_set_9
	.long	L0_0_set_2
	.long	L0_0_set_9
	.end_data_region
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unknown protocol version"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_discover_version               ; -- Begin function discover_version
	.p2align	2
_discover_version:                      ; @discover_version
	.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
	bl	_packet_reader_peek
	sub	w8, w0, #132
	cmp	w8, #3
	b.hi	LBB0_6
; %bb.1:
	mov	w0, #130
Lloh0:
	adrp	x9, lJTI0_0@PAGE
Lloh1:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
	ldr	w0, [x19]
	bl	_determine_protocol_version_client
	cmp	w0, #131
	b.eq	LBB0_6
; %bb.3:
	cmp	w0, #129
	b.eq	LBB0_8
; %bb.4:
	cmp	w0, #128
	b.ne	LBB0_9
; %bb.5:
	mov	x0, x19
	bl	_process_capabilities_v2
	mov	w0, #128
	b	LBB0_9
LBB0_6:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_BUG
	mov	w0, #131
	b	LBB0_9
LBB0_7:
	mov	w0, #0
	bl	_die_initial_contact
	mov	w0, #130
	b	LBB0_9
LBB0_8:
	mov	x0, x19
	bl	_packet_reader_read
	mov	w0, #129
LBB0_9:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_9-LBB0_2)>>2
	.byte	(LBB0_7-LBB0_2)>>2
	.byte	(LBB0_9-LBB0_2)>>2
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unknown protocol version"

.subsections_via_symbols
