	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ssl_parse_client_psk_identity
_ssl_parse_client_psk_identity:         ## @ssl_parse_client_psk_identity
	.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	%rsi, %rbx
	movq	%rdi, %r14
	movq	(%rdi), %rax
	cmpq	$0, (%rax)
	je	LBB0_3
LBB0_1:
	movq	(%rbx), %rcx
	leaq	2(%rcx), %rax
	cmpq	%rdx, %rax
	jbe	LBB0_8
LBB0_2:
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	callq	_MBEDTLS_SSL_DEBUG_MSG
	movq	_MBEDTLS_ERR_SSL_BAD_HS_CLIENT_KEY_EXCHANGE@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_3:
	cmpq	$0, 40(%rax)
	je	LBB0_7
## %bb.4:
	cmpq	$0, 24(%rax)
	je	LBB0_7
## %bb.5:
	cmpq	$0, 8(%rax)
	je	LBB0_7
## %bb.6:
	cmpq	$0, 16(%rax)
	jne	LBB0_1
LBB0_7:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_MBEDTLS_SSL_DEBUG_MSG
	movq	_MBEDTLS_ERR_SSL_PRIVATE_KEY_REQUIRED@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_8:
	movzwl	(%rcx), %ecx
	rolw	$8, %cx
	movq	%rax, (%rbx)
	testw	%cx, %cx
	je	LBB0_2
## %bb.9:
	movzwl	%cx, %r15d
	leaq	(%rax,%r15), %rcx
	cmpq	%rdx, %rcx
	ja	LBB0_2
## %bb.10:
	movq	(%r14), %rcx
	movq	(%rcx), %r8
	testq	%r8, %r8
	je	LBB0_13
## %bb.11:
	movl	32(%rcx), %edi
	movq	%r14, %rsi
	movq	%rax, %rdx
	movq	%r15, %rcx
	callq	*%r8
	xorl	%ecx, %ecx
	testq	%rax, %rax
	movq	_MBEDTLS_ERR_SSL_UNKNOWN_IDENTITY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmovnel	%eax, %ecx
	cmpl	%eax, %ecx
	je	LBB0_16
LBB0_12:
	addq	%r15, (%rbx)
	xorl	%eax, %eax
	jmp	LBB0_18
LBB0_13:
	cmpq	8(%rcx), %r15
	jne	LBB0_16
## %bb.14:
	movq	24(%rcx), %rdi
	movq	%rax, %rsi
	movq	%r15, %rdx
	callq	_mbedtls_ssl_safer_memcmp
	testq	%rax, %rax
	jne	LBB0_16
## %bb.15:
	movq	_MBEDTLS_ERR_SSL_UNKNOWN_IDENTITY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%ecx, %ecx
	cmpl	%eax, %ecx
	jne	LBB0_12
LBB0_16:
	movq	(%rbx), %rdx
	leaq	L_.str.2(%rip), %rsi
	movl	$3, %edi
	movq	%r15, %rcx
	callq	_MBEDTLS_SSL_DEBUG_BUF
	movq	_MBEDTLS_SSL_ALERT_LEVEL_FATAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MBEDTLS_SSL_ALERT_MSG_UNKNOWN_PSK_IDENTITY@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_mbedtls_ssl_send_alert_message
	movq	_MBEDTLS_ERR_SSL_UNKNOWN_IDENTITY@GOTPCREL(%rip), %rax
LBB0_17:
	movl	(%rax), %eax
LBB0_18:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"got no pre-shared key"

	.comm	_MBEDTLS_ERR_SSL_PRIVATE_KEY_REQUIRED,4,2 ## @MBEDTLS_ERR_SSL_PRIVATE_KEY_REQUIRED
L_.str.1:                               ## @.str.1
	.asciz	"bad client key exchange message"

	.comm	_MBEDTLS_ERR_SSL_BAD_HS_CLIENT_KEY_EXCHANGE,4,2 ## @MBEDTLS_ERR_SSL_BAD_HS_CLIENT_KEY_EXCHANGE
	.comm	_MBEDTLS_ERR_SSL_UNKNOWN_IDENTITY,4,2 ## @MBEDTLS_ERR_SSL_UNKNOWN_IDENTITY
L_.str.2:                               ## @.str.2
	.asciz	"Unknown PSK identity"

	.comm	_MBEDTLS_SSL_ALERT_LEVEL_FATAL,4,2 ## @MBEDTLS_SSL_ALERT_LEVEL_FATAL
	.comm	_MBEDTLS_SSL_ALERT_MSG_UNKNOWN_PSK_IDENTITY,4,2 ## @MBEDTLS_SSL_ALERT_MSG_UNKNOWN_PSK_IDENTITY
	.no_dead_strip	_ssl_parse_client_psk_identity
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ssl_parse_client_psk_identity
_ssl_parse_client_psk_identity:         ; @ssl_parse_client_psk_identity
	.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	x20, x1
	mov	x19, x0
	ldr	x8, [x0]
	ldr	x9, [x8]
	cbz	x9, LBB0_4
LBB0_1:
	ldr	x9, [x20]
	add	x8, x9, #2
	cmp	x8, x2
	b.hi	LBB0_3
; %bb.2:
	ldrh	w9, [x9]
	rev16	w21, w9
	str	x8, [x20]
	add	x9, x8, x21
	cmp	w21, #0
	ccmp	x9, x2, #2, ne
	b.ls	LBB0_9
LBB0_3:
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	bl	_MBEDTLS_SSL_DEBUG_MSG
Lloh2:
	adrp	x8, _MBEDTLS_ERR_SSL_BAD_HS_CLIENT_KEY_EXCHANGE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MBEDTLS_ERR_SSL_BAD_HS_CLIENT_KEY_EXCHANGE@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	b	LBB0_16
LBB0_4:
	ldr	x9, [x8, #40]
	cbz	x9, LBB0_8
; %bb.5:
	ldr	x9, [x8, #24]
	cbz	x9, LBB0_8
; %bb.6:
	ldr	x9, [x8, #8]
	cbz	x9, LBB0_8
; %bb.7:
	ldr	x8, [x8, #16]
	cbnz	x8, LBB0_1
LBB0_8:
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_MBEDTLS_SSL_DEBUG_MSG
Lloh7:
	adrp	x8, _MBEDTLS_ERR_SSL_PRIVATE_KEY_REQUIRED@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MBEDTLS_ERR_SSL_PRIVATE_KEY_REQUIRED@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	b	LBB0_16
LBB0_9:
	ldr	x9, [x19]
	ldr	x10, [x9]
Lloh10:
	adrp	x22, _MBEDTLS_ERR_SSL_UNKNOWN_IDENTITY@GOTPAGE
Lloh11:
	ldr	x22, [x22, _MBEDTLS_ERR_SSL_UNKNOWN_IDENTITY@GOTPAGEOFF]
	cbz	x10, LBB0_12
; %bb.10:
	ldr	w0, [x9, #32]
	mov	x1, x19
	mov	x2, x8
	mov	x3, x21
	blr	x10
	ldr	w8, [x22]
	cmp	x0, #0
	csel	w9, wzr, w8, eq
	cmp	w9, w8
	b.eq	LBB0_15
LBB0_11:
	mov	w0, #0
	ldr	x8, [x20]
	add	x8, x8, x21
	str	x8, [x20]
	b	LBB0_16
LBB0_12:
	ldr	x10, [x9, #8]
	cmp	x21, x10
	b.ne	LBB0_15
; %bb.13:
	ldr	x0, [x9, #24]
	mov	x1, x8
	mov	x2, x21
	bl	_mbedtls_ssl_safer_memcmp
	cbnz	x0, LBB0_15
; %bb.14:
	mov	w9, #0
	ldr	w8, [x22]
	cmp	w9, w8
	b.ne	LBB0_11
LBB0_15:
	ldr	x2, [x20]
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #3
	mov	x3, x21
	bl	_MBEDTLS_SSL_DEBUG_BUF
Lloh14:
	adrp	x8, _MBEDTLS_SSL_ALERT_LEVEL_FATAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MBEDTLS_SSL_ALERT_LEVEL_FATAL@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
Lloh17:
	adrp	x8, _MBEDTLS_SSL_ALERT_MSG_UNKNOWN_PSK_IDENTITY@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MBEDTLS_SSL_ALERT_MSG_UNKNOWN_PSK_IDENTITY@GOTPAGEOFF]
Lloh19:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_mbedtls_ssl_send_alert_message
	ldr	w0, [x22]
LBB0_16:
	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
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"got no pre-shared key"

	.comm	_MBEDTLS_ERR_SSL_PRIVATE_KEY_REQUIRED,4,2 ; @MBEDTLS_ERR_SSL_PRIVATE_KEY_REQUIRED
l_.str.1:                               ; @.str.1
	.asciz	"bad client key exchange message"

	.comm	_MBEDTLS_ERR_SSL_BAD_HS_CLIENT_KEY_EXCHANGE,4,2 ; @MBEDTLS_ERR_SSL_BAD_HS_CLIENT_KEY_EXCHANGE
	.comm	_MBEDTLS_ERR_SSL_UNKNOWN_IDENTITY,4,2 ; @MBEDTLS_ERR_SSL_UNKNOWN_IDENTITY
l_.str.2:                               ; @.str.2
	.asciz	"Unknown PSK identity"

	.comm	_MBEDTLS_SSL_ALERT_LEVEL_FATAL,4,2 ; @MBEDTLS_SSL_ALERT_LEVEL_FATAL
	.comm	_MBEDTLS_SSL_ALERT_MSG_UNKNOWN_PSK_IDENTITY,4,2 ; @MBEDTLS_SSL_ALERT_MSG_UNKNOWN_PSK_IDENTITY
	.no_dead_strip	_ssl_parse_client_psk_identity
.subsections_via_symbols
