	.file	"extr_ssl_srv.c_ssl_parse_supported_elliptic_curves.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"bad client hello message"
	.text
	.p2align 4
	.type	ssl_parse_supported_elliptic_curves, @function
ssl_parse_supported_elliptic_curves:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	movzx	eax, WORD PTR [rsi]
	rol	ax, 8
	movzx	r14d, ax
	lea	rcx, 2[r14]
	cmp	rcx, rdx
	jne	.L2
	test	al, 1
	jne	.L2
	mov	rax, QWORD PTR [rdi]
	cmp	QWORD PTR [rax], 0
	jne	.L2
	mov	rbp, r14
	mov	rbx, rsi
	mov	esi, 8
	shr	rbp
	add	rbp, 1
	cmp	QWORD PTR MBEDTLS_ECP_DP_MAX[rip], rbp
	cmovbe	rbp, QWORD PTR MBEDTLS_ECP_DP_MAX[rip]
	mov	rdi, rbp
	call	mbedtls_calloc@PLT
	mov	r13, rax
	test	rax, rax
	je	.L25
	mov	rax, QWORD PTR [r12]
	add	rbx, 2
	mov	QWORD PTR [rax], r13
	cmp	rbp, 1
	jbe	.L6
	test	r14, r14
	je	.L6
	add	r14, rbx
	.p2align 4,,10
	.p2align 3
.L8:
	movzx	edi, BYTE PTR 1[rbx]
	call	mbedtls_ecp_curve_info_from_tls_id@PLT
	test	rax, rax
	je	.L7
	mov	QWORD PTR 0[r13], rax
	sub	rbp, 1
	add	r13, 8
.L7:
	add	rbx, 2
	cmp	rbx, r14
	je	.L6
	cmp	rbp, 1
	ja	.L8
.L6:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xor	eax, eax
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	lea	rsi, .LC0[rip]
	mov	edi, 1
	call	MBEDTLS_SSL_DEBUG_MSG@PLT
	mov	edx, DWORD PTR MBEDTLS_SSL_ALERT_MSG_DECODE_ERROR[rip]
	mov	esi, DWORD PTR MBEDTLS_SSL_ALERT_LEVEL_FATAL[rip]
	mov	rdi, r12
	call	mbedtls_ssl_send_alert_message@PLT
	mov	eax, DWORD PTR MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO[rip]
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L25:
	.cfi_restore_state
	mov	edx, DWORD PTR MBEDTLS_SSL_ALERT_MSG_INTERNAL_ERROR[rip]
	mov	esi, DWORD PTR MBEDTLS_SSL_ALERT_LEVEL_FATAL[rip]
	mov	rdi, r12
	call	mbedtls_ssl_send_alert_message@PLT
	mov	eax, DWORD PTR MBEDTLS_ERR_SSL_ALLOC_FAILED[rip]
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	ssl_parse_supported_elliptic_curves, .-ssl_parse_supported_elliptic_curves
	.comm	MBEDTLS_SSL_ALERT_MSG_INTERNAL_ERROR,4,4
	.comm	MBEDTLS_SSL_ALERT_MSG_DECODE_ERROR,4,4
	.comm	MBEDTLS_SSL_ALERT_LEVEL_FATAL,4,4
	.comm	MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO,4,4
	.comm	MBEDTLS_ERR_SSL_ALLOC_FAILED,4,4
	.comm	MBEDTLS_ECP_DP_MAX,8,8
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_ssl_srv.c_ssl_parse_supported_elliptic_curves.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"bad client hello message\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ssl_parse_supported_elliptic_curves, %function
ssl_parse_supported_elliptic_curves:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldrb	r4, [r1]	@ zero_extendqisi2
	ldrb	r3, [r1, #1]	@ zero_extendqisi2
	mov	r7, r0
	orr	r3, r4, r3, lsl #8
	lsr	r4, r3, #8
	orr	r4, r4, r3, lsl #8
	lsl	r4, r4, #16
	lsr	r8, r4, #16
	add	r3, r8, #2
	cmp	r3, r2
	bne	.L2
	tst	r8, #1
	bne	.L2
	ldr	r3, [r0]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L2
	ldr	r3, .L19
	lsr	r4, r4, #17
	ldr	r3, [r3]
	add	r4, r4, #1
	cmp	r4, r3
	movcs	r4, r3
	mov	r5, r1
	mov	r0, r4
	mov	r1, #4
	bl	mbedtls_calloc
	subs	r6, r0, #0
	beq	.L18
	cmp	r8, #0
	cmpne	r4, #1
	ldr	r3, [r7]
	add	r5, r5, #2
	str	r6, [r3]
	bls	.L6
	add	r8, r5, r8
.L8:
	ldrb	r0, [r5, #1]	@ zero_extendqisi2
	bl	mbedtls_ecp_curve_info_from_tls_id
	subs	r3, r0, #0
	add	r5, r5, #2
	subne	r4, r4, #1
	strne	r3, [r6], #4
	cmp	r5, r8
	cmpne	r4, #1
	bhi	.L8
.L6:
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
	ldr	r1, .L19+4
	mov	r0, #1
	bl	MBEDTLS_SSL_DEBUG_MSG
	ldr	r3, .L19+8
	ldr	r2, .L19+12
	ldr	r1, [r3]
	mov	r0, r7
	ldr	r2, [r2]
	bl	mbedtls_ssl_send_alert_message
	ldr	r3, .L19+16
	ldr	r0, [r3]
	pop	{r4, r5, r6, r7, r8, pc}
.L18:
	ldr	r3, .L19+8
	ldr	r2, .L19+20
	ldr	r1, [r3]
	mov	r0, r7
	ldr	r2, [r2]
	bl	mbedtls_ssl_send_alert_message
	ldr	r3, .L19+24
	ldr	r0, [r3]
	pop	{r4, r5, r6, r7, r8, pc}
.L20:
	.align	2
.L19:
	.word	MBEDTLS_ECP_DP_MAX
	.word	.LC0
	.word	MBEDTLS_SSL_ALERT_LEVEL_FATAL
	.word	MBEDTLS_SSL_ALERT_MSG_DECODE_ERROR
	.word	MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO
	.word	MBEDTLS_SSL_ALERT_MSG_INTERNAL_ERROR
	.word	MBEDTLS_ERR_SSL_ALLOC_FAILED
	.size	ssl_parse_supported_elliptic_curves, .-ssl_parse_supported_elliptic_curves
	.comm	MBEDTLS_SSL_ALERT_MSG_INTERNAL_ERROR,4,4
	.comm	MBEDTLS_SSL_ALERT_MSG_DECODE_ERROR,4,4
	.comm	MBEDTLS_SSL_ALERT_LEVEL_FATAL,4,4
	.comm	MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO,4,4
	.comm	MBEDTLS_ERR_SSL_ALLOC_FAILED,4,4
	.comm	MBEDTLS_ECP_DP_MAX,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
