	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ssl_parse_servername_ext
_ssl_parse_servername_ext:              ## @ssl_parse_servername_ext
	.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	%rdx, %r15
	movq	%rsi, %rbx
	movq	%rdi, %r14
	leaq	L_.str(%rip), %rsi
	movl	$3, %edi
	callq	_MBEDTLS_SSL_DEBUG_MSG
	movzwl	(%rbx), %eax
	rolw	$8, %ax
	movzwl	%ax, %eax
	leaq	2(%rax), %rcx
	cmpq	%r15, %rcx
	jne	LBB0_1
## %bb.3:
	xorl	%r15d, %r15d
	testq	%rax, %rax
	je	LBB0_10
## %bb.4:
	addq	$2, %rbx
	movq	_MBEDTLS_TLS_EXT_SERVERNAME_HOSTNAME@GOTPCREL(%rip), %rcx
	movb	(%rcx), %dl
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movzwl	1(%rbx), %ecx
	rolw	$8, %cx
	movzwl	%cx, %ecx
	leaq	3(%rcx), %rsi
	cmpq	%rsi, %rax
	jb	LBB0_1
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	cmpb	%dl, (%rbx)
	je	LBB0_7
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	addq	%rsi, %rbx
	subq	%rsi, %rax
	jne	LBB0_5
	jmp	LBB0_10
LBB0_1:
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	callq	_MBEDTLS_SSL_DEBUG_MSG
	movq	_MBEDTLS_SSL_ALERT_LEVEL_FATAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MBEDTLS_SSL_ALERT_MSG_DECODE_ERROR@GOTPCREL(%rip), %rax
LBB0_2:
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_mbedtls_ssl_send_alert_message
	movq	_MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
LBB0_10:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	(%r14), %rax
	movl	8(%rax), %edi
	addq	$3, %rbx
	movq	%r14, %rsi
	movq	%rbx, %rdx
	callq	*(%rax)
	testl	%eax, %eax
	je	LBB0_10
## %bb.8:
	leaq	L_.str.2(%rip), %rsi
	movl	$1, %edi
	movl	%eax, %edx
	callq	_MBEDTLS_SSL_DEBUG_RET
	movq	_MBEDTLS_SSL_ALERT_LEVEL_FATAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MBEDTLS_SSL_ALERT_MSG_UNRECOGNIZED_NAME@GOTPCREL(%rip), %rax
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"parse ServerName extension"

L_.str.1:                               ## @.str.1
	.asciz	"bad client hello message"

	.comm	_MBEDTLS_SSL_ALERT_LEVEL_FATAL,4,2 ## @MBEDTLS_SSL_ALERT_LEVEL_FATAL
	.comm	_MBEDTLS_SSL_ALERT_MSG_DECODE_ERROR,4,2 ## @MBEDTLS_SSL_ALERT_MSG_DECODE_ERROR
	.comm	_MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO,4,2 ## @MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO
	.comm	_MBEDTLS_TLS_EXT_SERVERNAME_HOSTNAME,1,0 ## @MBEDTLS_TLS_EXT_SERVERNAME_HOSTNAME
L_.str.2:                               ## @.str.2
	.asciz	"ssl_sni_wrapper"

	.comm	_MBEDTLS_SSL_ALERT_MSG_UNRECOGNIZED_NAME,4,2 ## @MBEDTLS_SSL_ALERT_MSG_UNRECOGNIZED_NAME
	.comm	_MBEDTLS_SSL_ALERT_MSG_ILLEGAL_PARAMETER,4,2 ## @MBEDTLS_SSL_ALERT_MSG_ILLEGAL_PARAMETER
	.no_dead_strip	_ssl_parse_servername_ext
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ssl_parse_servername_ext
_ssl_parse_servername_ext:              ; @ssl_parse_servername_ext
	.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
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #3
	bl	_MBEDTLS_SSL_DEBUG_MSG
	ldrh	w8, [x20]
	rev16	w8, w8
	add	x9, x8, #2
	cmp	x9, x21
	b.ne	LBB0_7
; %bb.1:
	cbz	x8, LBB0_6
; %bb.2:
	add	x9, x20, #2
Lloh2:
	adrp	x10, _MBEDTLS_TLS_EXT_SERVERNAME_HOSTNAME@GOTPAGE
Lloh3:
	ldr	x10, [x10, _MBEDTLS_TLS_EXT_SERVERNAME_HOSTNAME@GOTPAGEOFF]
	ldrb	w10, [x10]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldurh	w11, [x9, #1]
	rev16	w3, w11
	add	x11, x3, #3
	cmp	x8, x11
	b.lo	LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldrb	w12, [x9]
	cmp	w12, w10
	b.eq	LBB0_10
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x9, x9, x11
	subs	x8, x8, x11
	b.ne	LBB0_3
LBB0_6:
	mov	w0, #0
	b	LBB0_9
LBB0_7:
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	bl	_MBEDTLS_SSL_DEBUG_MSG
Lloh6:
	adrp	x8, _MBEDTLS_SSL_ALERT_LEVEL_FATAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MBEDTLS_SSL_ALERT_LEVEL_FATAL@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x8, _MBEDTLS_SSL_ALERT_MSG_DECODE_ERROR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MBEDTLS_SSL_ALERT_MSG_DECODE_ERROR@GOTPAGEOFF]
LBB0_8:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_mbedtls_ssl_send_alert_message
Lloh11:
	adrp	x8, _MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
LBB0_9:
	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
	ret
LBB0_10:
	ldr	x8, [x19]
	ldr	x10, [x8]
	ldr	w0, [x8, #8]
	add	x2, x9, #3
	mov	x1, x19
	blr	x10
	cbz	w0, LBB0_9
; %bb.11:
	mov	x2, x0
Lloh14:
	adrp	x1, l_.str.2@PAGE
Lloh15:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #1
	bl	_MBEDTLS_SSL_DEBUG_RET
Lloh16:
	adrp	x8, _MBEDTLS_SSL_ALERT_LEVEL_FATAL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _MBEDTLS_SSL_ALERT_LEVEL_FATAL@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
Lloh19:
	adrp	x8, _MBEDTLS_SSL_ALERT_MSG_UNRECOGNIZED_NAME@GOTPAGE
Lloh20:
	ldr	x8, [x8, _MBEDTLS_SSL_ALERT_MSG_UNRECOGNIZED_NAME@GOTPAGEOFF]
	b	LBB0_8
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"parse ServerName extension"

l_.str.1:                               ; @.str.1
	.asciz	"bad client hello message"

	.comm	_MBEDTLS_SSL_ALERT_LEVEL_FATAL,4,2 ; @MBEDTLS_SSL_ALERT_LEVEL_FATAL
	.comm	_MBEDTLS_SSL_ALERT_MSG_DECODE_ERROR,4,2 ; @MBEDTLS_SSL_ALERT_MSG_DECODE_ERROR
	.comm	_MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO,4,2 ; @MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO
	.comm	_MBEDTLS_TLS_EXT_SERVERNAME_HOSTNAME,1,0 ; @MBEDTLS_TLS_EXT_SERVERNAME_HOSTNAME
l_.str.2:                               ; @.str.2
	.asciz	"ssl_sni_wrapper"

	.comm	_MBEDTLS_SSL_ALERT_MSG_UNRECOGNIZED_NAME,4,2 ; @MBEDTLS_SSL_ALERT_MSG_UNRECOGNIZED_NAME
	.comm	_MBEDTLS_SSL_ALERT_MSG_ILLEGAL_PARAMETER,4,2 ; @MBEDTLS_SSL_ALERT_MSG_ILLEGAL_PARAMETER
	.no_dead_strip	_ssl_parse_servername_ext
.subsections_via_symbols
