	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ssl_cli_parse_alpn_ext
_ssl_cli_parse_alpn_ext:                ## @ssl_cli_parse_alpn_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	8(%rdi), %rax
	movq	(%rax), %r13
	testq	%r13, %r13
	je	LBB0_1
## %bb.2:
	cmpq	$3, %rdx
	jbe	LBB0_3
## %bb.4:
	movq	%rsi, %r15
	movzwl	(%rsi), %eax
	rolw	$8, %ax
	movzwl	%ax, %eax
	addq	$-2, %rdx
	cmpq	%rdx, %rax
	jne	LBB0_3
## %bb.5:
	movzbl	2(%r15), %r12d
	decq	%rax
	cmpq	%r12, %rax
	jne	LBB0_3
## %bb.6:
	movq	(%r13), %rbx
	testq	%rbx, %rbx
	je	LBB0_12
## %bb.7:
	addq	$3, %r15
	addq	$8, %r13
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	(%r13), %rbx
	addq	$8, %r13
	testq	%rbx, %rbx
	je	LBB0_12
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_strlen
	cmpq	%r12, %rax
	jne	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movq	%r12, %rdx
	callq	_memcmp
	testq	%rax, %rax
	jne	LBB0_11
## %bb.10:
	movq	-8(%r13), %rax
	movq	%rax, (%r14)
	xorl	%eax, %eax
	jmp	LBB0_15
LBB0_3:
	movq	_MBEDTLS_SSL_ALERT_LEVEL_FATAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MBEDTLS_SSL_ALERT_MSG_DECODE_ERROR@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_1:
	leaq	L_.str(%rip), %rsi
LBB0_13:
	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_HANDSHAKE_FAILURE@GOTPCREL(%rip), %rax
LBB0_14:
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_mbedtls_ssl_send_alert_message
	movq	_MBEDTLS_ERR_SSL_BAD_HS_SERVER_HELLO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_15:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"non-matching ALPN extension"

	.comm	_MBEDTLS_SSL_ALERT_LEVEL_FATAL,4,2 ## @MBEDTLS_SSL_ALERT_LEVEL_FATAL
	.comm	_MBEDTLS_SSL_ALERT_MSG_HANDSHAKE_FAILURE,4,2 ## @MBEDTLS_SSL_ALERT_MSG_HANDSHAKE_FAILURE
	.comm	_MBEDTLS_ERR_SSL_BAD_HS_SERVER_HELLO,4,2 ## @MBEDTLS_ERR_SSL_BAD_HS_SERVER_HELLO
	.comm	_MBEDTLS_SSL_ALERT_MSG_DECODE_ERROR,4,2 ## @MBEDTLS_SSL_ALERT_MSG_DECODE_ERROR
L_.str.1:                               ## @.str.1
	.asciz	"ALPN extension: no matching protocol"

	.no_dead_strip	_ssl_cli_parse_alpn_ext
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ssl_cli_parse_alpn_ext
_ssl_cli_parse_alpn_ext:                ; @ssl_cli_parse_alpn_ext
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x0
	ldr	x8, [x0, #8]
	ldr	x8, [x8]
	cbz	x8, LBB0_11
; %bb.1:
	cmp	x2, #3
	b.ls	LBB0_10
; %bb.2:
	ldrh	w9, [x1]
	rev16	w9, w9
	sub	x10, x2, #2
	cmp	x9, x10
	b.ne	LBB0_10
; %bb.3:
	ldrb	w20, [x1, #2]
	sub	x9, x9, #1
	cmp	x9, x20
	b.ne	LBB0_10
; %bb.4:
	ldr	x22, [x8]
	cbz	x22, LBB0_15
; %bb.5:
	add	x21, x1, #3
	add	x23, x8, #8
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	ldr	x22, [x23], #8
	cbz	x22, LBB0_15
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	bl	_strlen
	cmp	x0, x20
	b.ne	LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x21
	mov	x1, x22
	mov	x2, x20
	bl	_memcmp
	cbnz	x0, LBB0_6
; %bb.9:
	ldur	x8, [x23, #-8]
	str	x8, [x19]
	b	LBB0_14
LBB0_10:
Lloh0:
	adrp	x8, _MBEDTLS_SSL_ALERT_LEVEL_FATAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MBEDTLS_SSL_ALERT_LEVEL_FATAL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _MBEDTLS_SSL_ALERT_MSG_DECODE_ERROR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MBEDTLS_SSL_ALERT_MSG_DECODE_ERROR@GOTPAGEOFF]
	b	LBB0_13
LBB0_11:
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
LBB0_12:
	mov	w0, #1
	bl	_MBEDTLS_SSL_DEBUG_MSG
Lloh7:
	adrp	x8, _MBEDTLS_SSL_ALERT_LEVEL_FATAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MBEDTLS_SSL_ALERT_LEVEL_FATAL@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
Lloh10:
	adrp	x8, _MBEDTLS_SSL_ALERT_MSG_HANDSHAKE_FAILURE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MBEDTLS_SSL_ALERT_MSG_HANDSHAKE_FAILURE@GOTPAGEOFF]
LBB0_13:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_mbedtls_ssl_send_alert_message
Lloh12:
	adrp	x8, _MBEDTLS_ERR_SSL_BAD_HS_SERVER_HELLO@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MBEDTLS_ERR_SSL_BAD_HS_SERVER_HELLO@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
LBB0_14:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_15:
Lloh15:
	adrp	x1, l_.str.1@PAGE
Lloh16:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_12
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"non-matching ALPN extension"

	.comm	_MBEDTLS_SSL_ALERT_LEVEL_FATAL,4,2 ; @MBEDTLS_SSL_ALERT_LEVEL_FATAL
	.comm	_MBEDTLS_SSL_ALERT_MSG_HANDSHAKE_FAILURE,4,2 ; @MBEDTLS_SSL_ALERT_MSG_HANDSHAKE_FAILURE
	.comm	_MBEDTLS_ERR_SSL_BAD_HS_SERVER_HELLO,4,2 ; @MBEDTLS_ERR_SSL_BAD_HS_SERVER_HELLO
	.comm	_MBEDTLS_SSL_ALERT_MSG_DECODE_ERROR,4,2 ; @MBEDTLS_SSL_ALERT_MSG_DECODE_ERROR
l_.str.1:                               ; @.str.1
	.asciz	"ALPN extension: no matching protocol"

	.no_dead_strip	_ssl_cli_parse_alpn_ext
.subsections_via_symbols
