	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ssl_choose_server_version      ## -- Begin function ssl_choose_server_version
	.p2align	4, 0x90
_ssl_choose_server_version:             ## @ssl_choose_server_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, %r13
	movq	%rsi, %r12
	movq	%rdi, %r14
	movq	16(%rdi), %rax
	movl	(%rax), %eax
	movl	(%rsi), %r15d
	movl	%r15d, (%rdi)
	movq	_tls_version_table@GOTPCREL(%rip), %rbx
	cmpl	$128, %eax
	je	LBB0_4
## %bb.1:
	cmpl	$129, %eax
	jne	LBB0_3
## %bb.2:
	movq	_dtls_version_table@GOTPCREL(%rip), %rbx
	jmp	LBB0_4
LBB0_3:
	movq	%r14, %rdi
	callq	_SSL_IS_TLS13
	testl	%eax, %eax
	je	LBB0_26
LBB0_4:
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movq	(%rbx), %rbx
	movq	8(%r12), %r12
	movq	_TLSEXT_IDX_supported_versions@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	shlq	$4, %r13
	cmpq	$0, 8(%r12,%r13)
	je	LBB0_13
## %bb.5:
	movq	%r14, %rdi
	callq	_SSL_IS_DTLS
	testl	%eax, %eax
	jne	LBB0_14
## %bb.6:
	movl	$0, -44(%rbp)
	movq	$0, -64(%rbp)
	movl	$1, (%r12,%r13)
	leaq	(%r12,%r13), %rdi
	addq	$4, %rdi
	leaq	-48(%rbp), %rsi
	callq	_PACKET_as_length_prefixed_1
	testl	%eax, %eax
	je	LBB0_30
## %bb.7:
	movq	_SSL3_VERSION@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jle	LBB0_28
## %bb.8:
	xorl	%r15d, %r15d
	leaq	-48(%rbp), %r12
	leaq	-44(%rbp), %r13
	leaq	-64(%rbp), %rbx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movq	%r13, %rsi
	callq	_PACKET_get_net_2
	testq	%rax, %rax
	je	LBB0_29
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	-44(%rbp), %esi
	movq	%r14, %rdi
	movl	%r15d, %edx
	callq	_version_cmp
	testq	%rax, %rax
	jle	LBB0_9
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	-44(%rbp), %esi
	movq	%r14, %rdi
	movq	%rbx, %rdx
	callq	_ssl_version_supported
	testq	%rax, %rax
	je	LBB0_9
## %bb.12:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	-44(%rbp), %r15d
	jmp	LBB0_9
LBB0_13:
	movq	8(%r14), %rax
	movq	_SSL_HRR_NONE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_24
LBB0_14:
	movq	_TLS1_3_VERSION@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_version_cmp
	testq	%rax, %rax
	js	LBB0_16
## %bb.15:
	movq	_TLS1_2_VERSION@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
LBB0_16:
	movl	(%rbx), %edx
	testl	%edx, %edx
	je	LBB0_25
## %bb.17:
	xorl	%r13d, %r13d
	jmp	LBB0_19
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_19 Depth=1
	movl	16(%rbx), %edx
	addq	$16, %rbx
	testl	%edx, %edx
	je	LBB0_23
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	cmpq	$0, 8(%rbx)
	je	LBB0_18
## %bb.20:                              ##   in Loop: Header=BB0_19 Depth=1
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_version_cmp
	testq	%rax, %rax
	js	LBB0_18
## %bb.21:                              ##   in Loop: Header=BB0_19 Depth=1
	xorl	%eax, %eax
	callq	*8(%rbx)
	movq	%rax, %r12
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_ssl_method_error
	movl	$1, %r13d
	testq	%rax, %rax
	jne	LBB0_18
## %bb.22:
	movl	(%rbx), %esi
	movq	%r14, %rdi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	callq	_check_for_downgrade
	movl	(%rbx), %eax
	movl	%eax, 4(%r14)
	movq	%r12, 16(%r14)
	xorl	%eax, %eax
	jmp	LBB0_33
LBB0_23:
	testl	%r13d, %r13d
	je	LBB0_25
LBB0_24:
	movq	_SSL_R_UNSUPPORTED_PROTOCOL@GOTPCREL(%rip), %rax
	jmp	LBB0_32
LBB0_25:
	movq	_SSL_R_VERSION_TOO_LOW@GOTPCREL(%rip), %rax
	jmp	LBB0_32
LBB0_26:
	movl	4(%r14), %edx
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_version_cmp
	testq	%rax, %rax
	js	LBB0_31
## %bb.27:
	movq	_DOWNGRADE_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r13)
	xorl	%eax, %eax
	jmp	LBB0_33
LBB0_28:
	movq	_SSL_R_BAD_LEGACY_VERSION@GOTPCREL(%rip), %rax
	jmp	LBB0_32
LBB0_29:
	leaq	-48(%rbp), %rdi
	callq	_PACKET_remaining
	testq	%rax, %rax
	je	LBB0_34
LBB0_30:
	movq	_SSL_R_LENGTH_MISMATCH@GOTPCREL(%rip), %rax
	jmp	LBB0_32
LBB0_31:
	movq	_SSL_R_WRONG_SSL_VERSION@GOTPCREL(%rip), %rax
LBB0_32:
	movl	(%rax), %eax
LBB0_33:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_34:
	testl	%r15d, %r15d
	je	LBB0_24
## %bb.35:
	movq	8(%r14), %rax
	movq	_SSL_HRR_NONE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_37
## %bb.36:
	movq	%r14, %rdi
	movl	%r15d, %esi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	callq	_check_for_downgrade
	movl	%r15d, 4(%r14)
	movq	-64(%rbp), %rax
	movq	%rax, 16(%r14)
	xorl	%eax, %eax
	jmp	LBB0_33
LBB0_37:
	movq	_TLS1_3_VERSION@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	cmpl	(%rcx), %r15d
	jne	LBB0_24
	jmp	LBB0_33
	.cfi_endproc
                                        ## -- End function
	.comm	_SSL_R_WRONG_SSL_VERSION,4,2    ## @SSL_R_WRONG_SSL_VERSION
	.comm	_DOWNGRADE_NONE,4,2             ## @DOWNGRADE_NONE
	.comm	_tls_version_table,8,3          ## @tls_version_table
	.comm	_dtls_version_table,8,3         ## @dtls_version_table
	.comm	_TLSEXT_IDX_supported_versions,8,3 ## @TLSEXT_IDX_supported_versions
	.comm	_SSL_HRR_NONE,8,3               ## @SSL_HRR_NONE
	.comm	_SSL_R_UNSUPPORTED_PROTOCOL,4,2 ## @SSL_R_UNSUPPORTED_PROTOCOL
	.comm	_SSL_R_LENGTH_MISMATCH,4,2      ## @SSL_R_LENGTH_MISMATCH
	.comm	_SSL3_VERSION,4,2               ## @SSL3_VERSION
	.comm	_SSL_R_BAD_LEGACY_VERSION,4,2   ## @SSL_R_BAD_LEGACY_VERSION
	.comm	_TLS1_3_VERSION,4,2             ## @TLS1_3_VERSION
	.comm	_TLS1_2_VERSION,4,2             ## @TLS1_2_VERSION
	.comm	_SSL_R_VERSION_TOO_LOW,4,2      ## @SSL_R_VERSION_TOO_LOW
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ssl_choose_server_version      ; -- Begin function ssl_choose_server_version
	.p2align	2
_ssl_choose_server_version:             ; @ssl_choose_server_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	x20, x0
	ldr	x8, [x0, #16]
	ldr	w8, [x8]
	ldr	w21, [x1]
	str	w21, [x0]
	cmp	w8, #128
	b.eq	LBB0_4
; %bb.1:
	cmp	w8, #129
	b.ne	LBB0_3
; %bb.2:
Lloh0:
	adrp	x8, _dtls_version_table@GOTPAGE
Lloh1:
	ldr	x8, [x8, _dtls_version_table@GOTPAGEOFF]
	b	LBB0_5
LBB0_3:
	mov	x0, x20
	bl	_SSL_IS_TLS13
	cbz	w0, LBB0_24
LBB0_4:
Lloh2:
	adrp	x8, _tls_version_table@GOTPAGE
Lloh3:
	ldr	x8, [x8, _tls_version_table@GOTPAGEOFF]
LBB0_5:
	ldr	x23, [x8]
	ldr	x22, [x22, #8]
Lloh4:
	adrp	x8, _TLSEXT_IDX_supported_versions@GOTPAGE
Lloh5:
	ldr	x8, [x8, _TLSEXT_IDX_supported_versions@GOTPAGEOFF]
Lloh6:
	ldr	x24, [x8]
	add	x8, x22, x24, lsl #4
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_13
; %bb.6:
	mov	x0, x20
	bl	_SSL_IS_DTLS
	cbnz	w0, LBB0_14
; %bb.7:
	str	wzr, [sp, #28]
	str	xzr, [sp, #16]
	add	x0, x22, x24, lsl #4
	mov	w8, #1
	str	w8, [x0], #4
	add	x1, sp, #12
	bl	_PACKET_as_length_prefixed_1
	cbz	w0, LBB0_29
; %bb.8:
Lloh7:
	adrp	x8, _SSL3_VERSION@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SSL3_VERSION@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	cmp	w21, w8
	b.le	LBB0_27
; %bb.9:
	mov	w21, #0
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	add	x0, sp, #12
	add	x1, sp, #28
	bl	_PACKET_get_net_2
	cbz	x0, LBB0_28
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	w1, [sp, #28]
	mov	x0, x20
	mov	x2, x21
	bl	_version_cmp
	cmp	x0, #1
	b.lt	LBB0_10
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	w1, [sp, #28]
	add	x2, sp, #16
	mov	x0, x20
	bl	_ssl_version_supported
	ldr	w8, [sp, #28]
	cmp	x0, #0
	csel	w21, w21, w8, eq
	b	LBB0_10
LBB0_13:
	ldr	x8, [x20, #8]
Lloh10:
	adrp	x9, _SSL_HRR_NONE@GOTPAGE
Lloh11:
	ldr	x9, [x9, _SSL_HRR_NONE@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_22
LBB0_14:
Lloh13:
	adrp	x8, _TLS1_3_VERSION@GOTPAGE
Lloh14:
	ldr	x8, [x8, _TLS1_3_VERSION@GOTPAGEOFF]
Lloh15:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x21
	bl	_version_cmp
Lloh16:
	adrp	x8, _TLS1_2_VERSION@GOTPAGE
Lloh17:
	ldr	x8, [x8, _TLS1_2_VERSION@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	cmp	x0, #0
	csel	w21, w21, w8, lt
	ldr	w2, [x23]
	cbz	w2, LBB0_23
; %bb.15:
	mov	w22, #0
	add	x23, x23, #8
	b	LBB0_17
LBB0_16:                                ;   in Loop: Header=BB0_17 Depth=1
	ldr	w2, [x23, #8]
	add	x23, x23, #16
	cbz	w2, LBB0_21
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23]
	cbz	x8, LBB0_16
; %bb.18:                               ;   in Loop: Header=BB0_17 Depth=1
	mov	x0, x20
	mov	x1, x21
	bl	_version_cmp
	tbnz	x0, #63, LBB0_16
; %bb.19:                               ;   in Loop: Header=BB0_17 Depth=1
	ldr	x8, [x23]
	blr	x8
	mov	x22, x0
	mov	x0, x20
	mov	x1, x22
	bl	_ssl_method_error
	cbz	x0, LBB0_26
; %bb.20:                               ;   in Loop: Header=BB0_17 Depth=1
	mov	w22, #1
	b	LBB0_16
LBB0_21:
	cbz	w22, LBB0_23
LBB0_22:
Lloh19:
	adrp	x8, _SSL_R_UNSUPPORTED_PROTOCOL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _SSL_R_UNSUPPORTED_PROTOCOL@GOTPAGEOFF]
	b	LBB0_31
LBB0_23:
Lloh21:
	adrp	x8, _SSL_R_VERSION_TOO_LOW@GOTPAGE
Lloh22:
	ldr	x8, [x8, _SSL_R_VERSION_TOO_LOW@GOTPAGEOFF]
	b	LBB0_31
LBB0_24:
	ldr	w2, [x20, #4]
	mov	x0, x20
	mov	x1, x21
	bl	_version_cmp
	tbnz	x0, #63, LBB0_30
; %bb.25:
	mov	w0, #0
Lloh23:
	adrp	x8, _DOWNGRADE_NONE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _DOWNGRADE_NONE@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	str	w8, [x19]
	b	LBB0_32
LBB0_26:
	ldur	w1, [x23, #-8]
	mov	x0, x20
	mov	x2, x19
	bl	_check_for_downgrade
	mov	w0, #0
	ldur	w8, [x23, #-8]
	str	w8, [x20, #4]
	str	x22, [x20, #16]
	b	LBB0_32
LBB0_27:
Lloh26:
	adrp	x8, _SSL_R_BAD_LEGACY_VERSION@GOTPAGE
Lloh27:
	ldr	x8, [x8, _SSL_R_BAD_LEGACY_VERSION@GOTPAGEOFF]
	b	LBB0_31
LBB0_28:
	add	x0, sp, #12
	bl	_PACKET_remaining
	cbz	x0, LBB0_33
LBB0_29:
Lloh28:
	adrp	x8, _SSL_R_LENGTH_MISMATCH@GOTPAGE
Lloh29:
	ldr	x8, [x8, _SSL_R_LENGTH_MISMATCH@GOTPAGEOFF]
	b	LBB0_31
LBB0_30:
Lloh30:
	adrp	x8, _SSL_R_WRONG_SSL_VERSION@GOTPAGE
Lloh31:
	ldr	x8, [x8, _SSL_R_WRONG_SSL_VERSION@GOTPAGEOFF]
LBB0_31:
	ldr	w0, [x8]
LBB0_32:
	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_33:
	cbz	w21, LBB0_22
; %bb.34:
	ldr	x8, [x20, #8]
Lloh32:
	adrp	x9, _SSL_HRR_NONE@GOTPAGE
Lloh33:
	ldr	x9, [x9, _SSL_HRR_NONE@GOTPAGEOFF]
Lloh34:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_36
; %bb.35:
	mov	x0, x20
	mov	x1, x21
	mov	x2, x19
	bl	_check_for_downgrade
	mov	w0, #0
	str	w21, [x20, #4]
	ldr	x8, [sp, #16]
	str	x8, [x20, #16]
	b	LBB0_32
LBB0_36:
Lloh35:
	adrp	x8, _TLS1_3_VERSION@GOTPAGE
Lloh36:
	ldr	x8, [x8, _TLS1_3_VERSION@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
Lloh38:
	adrp	x9, _SSL_R_UNSUPPORTED_PROTOCOL@GOTPAGE
Lloh39:
	ldr	x9, [x9, _SSL_R_UNSUPPORTED_PROTOCOL@GOTPAGEOFF]
Lloh40:
	ldr	w9, [x9]
	cmp	w21, w8
	csel	w0, wzr, w9, eq
	b	LBB0_32
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_SSL_R_WRONG_SSL_VERSION,4,2    ; @SSL_R_WRONG_SSL_VERSION
	.comm	_DOWNGRADE_NONE,4,2             ; @DOWNGRADE_NONE
	.comm	_tls_version_table,8,3          ; @tls_version_table
	.comm	_dtls_version_table,8,3         ; @dtls_version_table
	.comm	_TLSEXT_IDX_supported_versions,8,3 ; @TLSEXT_IDX_supported_versions
	.comm	_SSL_HRR_NONE,8,3               ; @SSL_HRR_NONE
	.comm	_SSL_R_UNSUPPORTED_PROTOCOL,4,2 ; @SSL_R_UNSUPPORTED_PROTOCOL
	.comm	_SSL_R_LENGTH_MISMATCH,4,2      ; @SSL_R_LENGTH_MISMATCH
	.comm	_SSL3_VERSION,4,2               ; @SSL3_VERSION
	.comm	_SSL_R_BAD_LEGACY_VERSION,4,2   ; @SSL_R_BAD_LEGACY_VERSION
	.comm	_TLS1_3_VERSION,4,2             ; @TLS1_3_VERSION
	.comm	_TLS1_2_VERSION,4,2             ; @TLS1_2_VERSION
	.comm	_SSL_R_VERSION_TOO_LOW,4,2      ; @SSL_R_VERSION_TOO_LOW
.subsections_via_symbols
