	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ssl_parse_supported_elliptic_curves
_ssl_parse_supported_elliptic_curves:   ## @ssl_parse_supported_elliptic_curves
	.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, %rbx
	movzbl	(%rsi), %r14d
	shlq	$8, %r14
	movzbl	1(%rsi), %eax
	leaq	(%r14,%rax), %rcx
	addq	$2, %rcx
	cmpq	%rdx, %rcx
	jne	LBB0_3
## %bb.1:
	movl	%eax, %ecx
	andl	$1, %ecx
	testq	%rcx, %rcx
	jne	LBB0_3
## %bb.2:
	movq	(%rbx), %rcx
	cmpq	$0, (%rcx)
	je	LBB0_6
LBB0_3:
	leaq	L_.str(%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
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_mbedtls_ssl_send_alert_message
	movq	_MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	%rsi, %r15
	orq	%rax, %r14
	movq	%r14, %rax
	shrq	%rax
	leaq	1(%rax), %r13
	movq	_MBEDTLS_ECP_DP_MAX@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	%rcx, %rax
	cmovaeq	%rcx, %r13
	movq	%r13, %rdi
	movl	$8, %esi
	callq	_mbedtls_calloc
	testq	%rax, %rax
	je	LBB0_14
## %bb.7:
	movq	%rax, %r12
	movq	(%rbx), %rax
	movq	%r12, (%rax)
	xorl	%eax, %eax
	testq	%r14, %r14
	je	LBB0_5
## %bb.8:
	cmpq	$2, %r13
	jb	LBB0_5
## %bb.9:
	addq	$-2, %r14
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movzbl	3(%r15,%rbx), %edi
	callq	_mbedtls_ecp_curve_info_from_tls_id
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	%rax, (%r12)
	addq	$8, %r12
	decq	%r13
LBB0_12:                                ##   in Loop: Header=BB0_10 Depth=1
	xorl	%eax, %eax
	cmpq	%rbx, %r14
	je	LBB0_5
## %bb.13:                              ##   in Loop: Header=BB0_10 Depth=1
	addq	$2, %rbx
	cmpq	$1, %r13
	ja	LBB0_10
	jmp	LBB0_5
LBB0_14:
	movq	_MBEDTLS_SSL_ALERT_LEVEL_FATAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MBEDTLS_SSL_ALERT_MSG_INTERNAL_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_mbedtls_ssl_send_alert_message
	movq	_MBEDTLS_ERR_SSL_ALLOC_FAILED@GOTPCREL(%rip), %rax
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.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_ECP_DP_MAX,8,3         ## @MBEDTLS_ECP_DP_MAX
	.comm	_MBEDTLS_SSL_ALERT_MSG_INTERNAL_ERROR,4,2 ## @MBEDTLS_SSL_ALERT_MSG_INTERNAL_ERROR
	.comm	_MBEDTLS_ERR_SSL_ALLOC_FAILED,4,2 ## @MBEDTLS_ERR_SSL_ALLOC_FAILED
	.no_dead_strip	_ssl_parse_supported_elliptic_curves
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ssl_parse_supported_elliptic_curves
_ssl_parse_supported_elliptic_curves:   ; @ssl_parse_supported_elliptic_curves
	.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	x21, x0
	ldrb	w8, [x1]
	ldrb	w23, [x1, #1]
	and	x9, x23, #0x1
	bfi	x23, x8, #8, #8
	add	x8, x23, #2
	cmp	x8, x2
	ccmp	x9, #0, #0, eq
	b.ne	LBB0_2
; %bb.1:
	ldr	x8, [x21]
	ldr	x8, [x8]
	cbz	x8, LBB0_5
LBB0_2:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_MBEDTLS_SSL_DEBUG_MSG
Lloh2:
	adrp	x8, _MBEDTLS_SSL_ALERT_LEVEL_FATAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MBEDTLS_SSL_ALERT_LEVEL_FATAL@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x8, _MBEDTLS_SSL_ALERT_MSG_DECODE_ERROR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MBEDTLS_SSL_ALERT_MSG_DECODE_ERROR@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	x0, x21
	bl	_mbedtls_ssl_send_alert_message
Lloh8:
	adrp	x8, _MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO@GOTPAGEOFF]
LBB0_3:
	ldr	w0, [x8]
LBB0_4:
	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_5:
	mov	x22, x1
	lsr	x8, x23, #1
Lloh10:
	adrp	x9, _MBEDTLS_ECP_DP_MAX@GOTPAGE
Lloh11:
	ldr	x9, [x9, _MBEDTLS_ECP_DP_MAX@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x8, x9
	csinc	x19, x9, x8, hs
	mov	x0, x19
	mov	w1, #8
	bl	_mbedtls_calloc
	cbz	x0, LBB0_13
; %bb.6:
	mov	x20, x0
	mov	w0, #0
	ldr	x8, [x21]
	str	x20, [x8]
	cbz	x23, LBB0_4
; %bb.7:
	cmp	x19, #2
	b.lo	LBB0_4
; %bb.8:
	add	x21, x22, #3
	sub	x22, x23, #2
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldrb	w0, [x21]
	bl	_mbedtls_ecp_curve_info_from_tls_id
	cbz	x0, LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	str	x0, [x20], #8
	sub	x19, x19, #1
LBB0_11:                                ;   in Loop: Header=BB0_9 Depth=1
	mov	w0, #0
	cbz	x22, LBB0_4
; %bb.12:                               ;   in Loop: Header=BB0_9 Depth=1
	add	x21, x21, #2
	sub	x22, x22, #2
	cmp	x19, #1
	b.hi	LBB0_9
	b	LBB0_4
LBB0_13:
Lloh13:
	adrp	x8, _MBEDTLS_SSL_ALERT_LEVEL_FATAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _MBEDTLS_SSL_ALERT_LEVEL_FATAL@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
Lloh16:
	adrp	x8, _MBEDTLS_SSL_ALERT_MSG_INTERNAL_ERROR@GOTPAGE
Lloh17:
	ldr	x8, [x8, _MBEDTLS_SSL_ALERT_MSG_INTERNAL_ERROR@GOTPAGEOFF]
Lloh18:
	ldr	w2, [x8]
	mov	x0, x21
	bl	_mbedtls_ssl_send_alert_message
Lloh19:
	adrp	x8, _MBEDTLS_ERR_SSL_ALLOC_FAILED@GOTPAGE
Lloh20:
	ldr	x8, [x8, _MBEDTLS_ERR_SSL_ALLOC_FAILED@GOTPAGEOFF]
	b	LBB0_3
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.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_ECP_DP_MAX,8,3         ; @MBEDTLS_ECP_DP_MAX
	.comm	_MBEDTLS_SSL_ALERT_MSG_INTERNAL_ERROR,4,2 ; @MBEDTLS_SSL_ALERT_MSG_INTERNAL_ERROR
	.comm	_MBEDTLS_ERR_SSL_ALLOC_FAILED,4,2 ; @MBEDTLS_ERR_SSL_ALLOC_FAILED
	.no_dead_strip	_ssl_parse_supported_elliptic_curves
.subsections_via_symbols
