	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ssl_parse_server_key_exchange
_ssl_parse_server_key_exchange:         ## @ssl_parse_server_key_exchange
	.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	%rdi, %r14
	movq	56(%rdi), %rax
	movq	(%rax), %r15
	leaq	L_.str(%rip), %rsi
	movl	$2, %edi
	callq	_MBEDTLS_SSL_DEBUG_MSG
	movq	%r14, %rdi
	callq	_mbedtls_ssl_read_record
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	movl	%eax, %edx
	callq	_MBEDTLS_SSL_DEBUG_RET
	jmp	LBB0_12
LBB0_2:
	movq	(%r14), %rax
	movq	_MBEDTLS_SSL_MSG_HANDSHAKE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.5:
	movq	8(%r14), %rbx
	movq	(%rbx), %rax
	movq	_MBEDTLS_SSL_HS_SERVER_KEY_EXCHANGE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.10:
	movq	%r14, %rdi
	callq	_mbedtls_ssl_hs_hdr_len
	cltq
	leaq	(%rbx,%rax,8), %rdx
	movslq	20(%r14), %rcx
	shlq	$3, %rcx
	addq	8(%r14), %rcx
	subq	%rdx, %rcx
	leaq	L_.str.4(%rip), %rsi
	movl	$3, %edi
	callq	_MBEDTLS_SSL_DEBUG_BUF
	leaq	L_.str.5(%rip), %rsi
	movl	$1, %edi
	callq	_MBEDTLS_SSL_DEBUG_MSG
	movq	_MBEDTLS_ERR_SSL_INTERNAL_ERROR@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_3:
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_4
LBB0_6:
	movq	(%r15), %rax
	movq	_MBEDTLS_KEY_EXCHANGE_PSK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_8
## %bb.7:
	movq	_MBEDTLS_KEY_EXCHANGE_RSA_PSK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_8
## %bb.9:
	leaq	L_.str.3(%rip), %rsi
LBB0_4:
	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_UNEXPECTED_MESSAGE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_mbedtls_ssl_send_alert_message
	movq	_MBEDTLS_ERR_SSL_UNEXPECTED_MESSAGE@GOTPCREL(%rip), %rax
LBB0_11:
	movl	(%rax), %ebx
LBB0_12:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movl	$1, 16(%r14)
	incl	32(%r14)
	leaq	L_.str.6(%rip), %rsi
	movl	$2, %edi
	callq	_MBEDTLS_SSL_DEBUG_MSG
	xorl	%ebx, %ebx
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"=> parse server key exchange"

L_.str.1:                               ## @.str.1
	.asciz	"mbedtls_ssl_read_record"

	.comm	_MBEDTLS_SSL_MSG_HANDSHAKE,8,3  ## @MBEDTLS_SSL_MSG_HANDSHAKE
L_.str.2:                               ## @.str.2
	.asciz	"bad server key exchange message"

	.comm	_MBEDTLS_SSL_ALERT_LEVEL_FATAL,4,2 ## @MBEDTLS_SSL_ALERT_LEVEL_FATAL
	.comm	_MBEDTLS_SSL_ALERT_MSG_UNEXPECTED_MESSAGE,4,2 ## @MBEDTLS_SSL_ALERT_MSG_UNEXPECTED_MESSAGE
	.comm	_MBEDTLS_ERR_SSL_UNEXPECTED_MESSAGE,4,2 ## @MBEDTLS_ERR_SSL_UNEXPECTED_MESSAGE
	.comm	_MBEDTLS_SSL_HS_SERVER_KEY_EXCHANGE,8,3 ## @MBEDTLS_SSL_HS_SERVER_KEY_EXCHANGE
	.comm	_MBEDTLS_KEY_EXCHANGE_PSK,8,3   ## @MBEDTLS_KEY_EXCHANGE_PSK
	.comm	_MBEDTLS_KEY_EXCHANGE_RSA_PSK,8,3 ## @MBEDTLS_KEY_EXCHANGE_RSA_PSK
L_.str.3:                               ## @.str.3
	.asciz	"server key exchange message must not be skipped"

L_.str.4:                               ## @.str.4
	.asciz	"server key exchange"

L_.str.5:                               ## @.str.5
	.asciz	"should never happen"

	.comm	_MBEDTLS_ERR_SSL_INTERNAL_ERROR,4,2 ## @MBEDTLS_ERR_SSL_INTERNAL_ERROR
L_.str.6:                               ## @.str.6
	.asciz	"<= parse server key exchange"

	.comm	_MBEDTLS_ERR_SSL_BAD_HS_SERVER_KEY_EXCHANGE,4,2 ## @MBEDTLS_ERR_SSL_BAD_HS_SERVER_KEY_EXCHANGE
	.comm	_MBEDTLS_ERR_SSL_PK_TYPE_MISMATCH,4,2 ## @MBEDTLS_ERR_SSL_PK_TYPE_MISMATCH
	.comm	_MBEDTLS_KEY_EXCHANGE_DHE_PSK,8,3 ## @MBEDTLS_KEY_EXCHANGE_DHE_PSK
	.comm	_MBEDTLS_KEY_EXCHANGE_DHE_RSA,8,3 ## @MBEDTLS_KEY_EXCHANGE_DHE_RSA
	.comm	_MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,8,3 ## @MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA
	.comm	_MBEDTLS_KEY_EXCHANGE_ECDHE_PSK,8,3 ## @MBEDTLS_KEY_EXCHANGE_ECDHE_PSK
	.comm	_MBEDTLS_KEY_EXCHANGE_ECDHE_RSA,8,3 ## @MBEDTLS_KEY_EXCHANGE_ECDHE_RSA
	.comm	_MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA,8,3 ## @MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA
	.comm	_MBEDTLS_KEY_EXCHANGE_ECDH_RSA,8,3 ## @MBEDTLS_KEY_EXCHANGE_ECDH_RSA
	.comm	_MBEDTLS_KEY_EXCHANGE_ECJPAKE,8,3 ## @MBEDTLS_KEY_EXCHANGE_ECJPAKE
	.comm	_MBEDTLS_KEY_EXCHANGE_RSA,8,3   ## @MBEDTLS_KEY_EXCHANGE_RSA
	.comm	_MBEDTLS_MD_NONE,8,3            ## @MBEDTLS_MD_NONE
	.comm	_MBEDTLS_MD_SHA1,8,3            ## @MBEDTLS_MD_SHA1
	.comm	_MBEDTLS_PK_ECDSA,8,3           ## @MBEDTLS_PK_ECDSA
	.comm	_MBEDTLS_PK_NONE,8,3            ## @MBEDTLS_PK_NONE
	.comm	_MBEDTLS_SSL_ALERT_MSG_DECODE_ERROR,4,2 ## @MBEDTLS_SSL_ALERT_MSG_DECODE_ERROR
	.comm	_MBEDTLS_SSL_ALERT_MSG_DECRYPT_ERROR,4,2 ## @MBEDTLS_SSL_ALERT_MSG_DECRYPT_ERROR
	.comm	_MBEDTLS_SSL_ALERT_MSG_HANDSHAKE_FAILURE,4,2 ## @MBEDTLS_SSL_ALERT_MSG_HANDSHAKE_FAILURE
	.comm	_MBEDTLS_SSL_ALERT_MSG_ILLEGAL_PARAMETER,4,2 ## @MBEDTLS_SSL_ALERT_MSG_ILLEGAL_PARAMETER
	.comm	_MBEDTLS_SSL_ALERT_MSG_INTERNAL_ERROR,4,2 ## @MBEDTLS_SSL_ALERT_MSG_INTERNAL_ERROR
	.comm	_MBEDTLS_SSL_MINOR_VERSION_3,8,3 ## @MBEDTLS_SSL_MINOR_VERSION_3
	.no_dead_strip	_ssl_parse_server_key_exchange
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ssl_parse_server_key_exchange
_ssl_parse_server_key_exchange:         ; @ssl_parse_server_key_exchange
	.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	x19, x0
	ldr	x8, [x0, #56]
	ldr	x21, [x8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #2
	bl	_MBEDTLS_SSL_DEBUG_MSG
	mov	x0, x19
	bl	_mbedtls_ssl_read_record
	cbz	w0, LBB0_2
; %bb.1:
	mov	x20, x0
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	mov	x2, x20
	bl	_MBEDTLS_SSL_DEBUG_RET
	b	LBB0_8
LBB0_2:
	ldr	x8, [x19]
Lloh4:
	adrp	x9, _MBEDTLS_SSL_MSG_HANDSHAKE@GOTPAGE
Lloh5:
	ldr	x9, [x9, _MBEDTLS_SSL_MSG_HANDSHAKE@GOTPAGEOFF]
Lloh6:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.3:
	ldr	x20, [x19, #8]
	ldr	x8, [x20]
Lloh7:
	adrp	x9, _MBEDTLS_SSL_HS_SERVER_KEY_EXCHANGE@GOTPAGE
Lloh8:
	ldr	x9, [x9, _MBEDTLS_SSL_HS_SERVER_KEY_EXCHANGE@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.4:
	mov	x0, x19
	bl	_mbedtls_ssl_hs_hdr_len
	add	x2, x20, w0, sxtw #3
	ldr	x8, [x19, #8]
	ldrsw	x9, [x19, #20]
	add	x8, x8, x9, lsl #3
	sub	x3, x8, x2
Lloh10:
	adrp	x1, l_.str.4@PAGE
Lloh11:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	w0, #3
	bl	_MBEDTLS_SSL_DEBUG_BUF
Lloh12:
	adrp	x1, l_.str.5@PAGE
Lloh13:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	w0, #1
	bl	_MBEDTLS_SSL_DEBUG_MSG
Lloh14:
	adrp	x8, _MBEDTLS_ERR_SSL_INTERNAL_ERROR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MBEDTLS_ERR_SSL_INTERNAL_ERROR@GOTPAGEOFF]
	b	LBB0_7
LBB0_5:
Lloh16:
	adrp	x1, l_.str.2@PAGE
Lloh17:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_6:
	mov	w0, #1
	bl	_MBEDTLS_SSL_DEBUG_MSG
Lloh18:
	adrp	x8, _MBEDTLS_SSL_ALERT_LEVEL_FATAL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _MBEDTLS_SSL_ALERT_LEVEL_FATAL@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
Lloh21:
	adrp	x8, _MBEDTLS_SSL_ALERT_MSG_UNEXPECTED_MESSAGE@GOTPAGE
Lloh22:
	ldr	x8, [x8, _MBEDTLS_SSL_ALERT_MSG_UNEXPECTED_MESSAGE@GOTPAGEOFF]
Lloh23:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_mbedtls_ssl_send_alert_message
Lloh24:
	adrp	x8, _MBEDTLS_ERR_SSL_UNEXPECTED_MESSAGE@GOTPAGE
Lloh25:
	ldr	x8, [x8, _MBEDTLS_ERR_SSL_UNEXPECTED_MESSAGE@GOTPAGEOFF]
LBB0_7:
	ldr	w20, [x8]
LBB0_8:
	mov	x0, x20
	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_9:
	ldr	x8, [x21]
Lloh26:
	adrp	x9, _MBEDTLS_KEY_EXCHANGE_PSK@GOTPAGE
Lloh27:
	ldr	x9, [x9, _MBEDTLS_KEY_EXCHANGE_PSK@GOTPAGEOFF]
Lloh28:
	ldr	x9, [x9]
Lloh29:
	adrp	x10, _MBEDTLS_KEY_EXCHANGE_RSA_PSK@GOTPAGE
Lloh30:
	ldr	x10, [x10, _MBEDTLS_KEY_EXCHANGE_RSA_PSK@GOTPAGEOFF]
Lloh31:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_11
; %bb.10:
	mov	w8, #1
	str	w8, [x19, #16]
	ldr	w8, [x19, #32]
	add	w8, w8, #1
	str	w8, [x19, #32]
Lloh32:
	adrp	x1, l_.str.6@PAGE
Lloh33:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	w0, #2
	bl	_MBEDTLS_SSL_DEBUG_MSG
	mov	w20, #0
	b	LBB0_8
LBB0_11:
Lloh34:
	adrp	x1, l_.str.3@PAGE
Lloh35:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_6
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"=> parse server key exchange"

l_.str.1:                               ; @.str.1
	.asciz	"mbedtls_ssl_read_record"

	.comm	_MBEDTLS_SSL_MSG_HANDSHAKE,8,3  ; @MBEDTLS_SSL_MSG_HANDSHAKE
l_.str.2:                               ; @.str.2
	.asciz	"bad server key exchange message"

	.comm	_MBEDTLS_SSL_ALERT_LEVEL_FATAL,4,2 ; @MBEDTLS_SSL_ALERT_LEVEL_FATAL
	.comm	_MBEDTLS_SSL_ALERT_MSG_UNEXPECTED_MESSAGE,4,2 ; @MBEDTLS_SSL_ALERT_MSG_UNEXPECTED_MESSAGE
	.comm	_MBEDTLS_ERR_SSL_UNEXPECTED_MESSAGE,4,2 ; @MBEDTLS_ERR_SSL_UNEXPECTED_MESSAGE
	.comm	_MBEDTLS_SSL_HS_SERVER_KEY_EXCHANGE,8,3 ; @MBEDTLS_SSL_HS_SERVER_KEY_EXCHANGE
	.comm	_MBEDTLS_KEY_EXCHANGE_PSK,8,3   ; @MBEDTLS_KEY_EXCHANGE_PSK
	.comm	_MBEDTLS_KEY_EXCHANGE_RSA_PSK,8,3 ; @MBEDTLS_KEY_EXCHANGE_RSA_PSK
l_.str.3:                               ; @.str.3
	.asciz	"server key exchange message must not be skipped"

l_.str.4:                               ; @.str.4
	.asciz	"server key exchange"

l_.str.5:                               ; @.str.5
	.asciz	"should never happen"

	.comm	_MBEDTLS_ERR_SSL_INTERNAL_ERROR,4,2 ; @MBEDTLS_ERR_SSL_INTERNAL_ERROR
l_.str.6:                               ; @.str.6
	.asciz	"<= parse server key exchange"

	.comm	_MBEDTLS_ERR_SSL_BAD_HS_SERVER_KEY_EXCHANGE,4,2 ; @MBEDTLS_ERR_SSL_BAD_HS_SERVER_KEY_EXCHANGE
	.comm	_MBEDTLS_ERR_SSL_PK_TYPE_MISMATCH,4,2 ; @MBEDTLS_ERR_SSL_PK_TYPE_MISMATCH
	.comm	_MBEDTLS_KEY_EXCHANGE_DHE_PSK,8,3 ; @MBEDTLS_KEY_EXCHANGE_DHE_PSK
	.comm	_MBEDTLS_KEY_EXCHANGE_DHE_RSA,8,3 ; @MBEDTLS_KEY_EXCHANGE_DHE_RSA
	.comm	_MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,8,3 ; @MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA
	.comm	_MBEDTLS_KEY_EXCHANGE_ECDHE_PSK,8,3 ; @MBEDTLS_KEY_EXCHANGE_ECDHE_PSK
	.comm	_MBEDTLS_KEY_EXCHANGE_ECDHE_RSA,8,3 ; @MBEDTLS_KEY_EXCHANGE_ECDHE_RSA
	.comm	_MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA,8,3 ; @MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA
	.comm	_MBEDTLS_KEY_EXCHANGE_ECDH_RSA,8,3 ; @MBEDTLS_KEY_EXCHANGE_ECDH_RSA
	.comm	_MBEDTLS_KEY_EXCHANGE_ECJPAKE,8,3 ; @MBEDTLS_KEY_EXCHANGE_ECJPAKE
	.comm	_MBEDTLS_KEY_EXCHANGE_RSA,8,3   ; @MBEDTLS_KEY_EXCHANGE_RSA
	.comm	_MBEDTLS_MD_NONE,8,3            ; @MBEDTLS_MD_NONE
	.comm	_MBEDTLS_MD_SHA1,8,3            ; @MBEDTLS_MD_SHA1
	.comm	_MBEDTLS_PK_ECDSA,8,3           ; @MBEDTLS_PK_ECDSA
	.comm	_MBEDTLS_PK_NONE,8,3            ; @MBEDTLS_PK_NONE
	.comm	_MBEDTLS_SSL_ALERT_MSG_DECODE_ERROR,4,2 ; @MBEDTLS_SSL_ALERT_MSG_DECODE_ERROR
	.comm	_MBEDTLS_SSL_ALERT_MSG_DECRYPT_ERROR,4,2 ; @MBEDTLS_SSL_ALERT_MSG_DECRYPT_ERROR
	.comm	_MBEDTLS_SSL_ALERT_MSG_HANDSHAKE_FAILURE,4,2 ; @MBEDTLS_SSL_ALERT_MSG_HANDSHAKE_FAILURE
	.comm	_MBEDTLS_SSL_ALERT_MSG_ILLEGAL_PARAMETER,4,2 ; @MBEDTLS_SSL_ALERT_MSG_ILLEGAL_PARAMETER
	.comm	_MBEDTLS_SSL_ALERT_MSG_INTERNAL_ERROR,4,2 ; @MBEDTLS_SSL_ALERT_MSG_INTERNAL_ERROR
	.comm	_MBEDTLS_SSL_MINOR_VERSION_3,8,3 ; @MBEDTLS_SSL_MINOR_VERSION_3
	.no_dead_strip	_ssl_parse_server_key_exchange
.subsections_via_symbols
