	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ssl_parse_encrypted_pms
_ssl_parse_encrypted_pms:               ## @ssl_parse_encrypted_pms
	.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	%r12
	pushq	%rbx
	subq	$128, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r12
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	callq	_mbedtls_ssl_own_key
	movl	%eax, %edi
	callq	_mbedtls_pk_get_len
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_mbedtls_ssl_own_key
	movq	_MBEDTLS_PK_RSA@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_mbedtls_pk_can_do
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	leaq	(%r14,%r15), %rax
	cmpq	%r12, %rax
	je	LBB0_4
## %bb.3:
	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_6
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_MBEDTLS_SSL_DEBUG_MSG
	movq	_MBEDTLS_ERR_SSL_PRIVATE_KEY_REQUIRED@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %eax
LBB0_7:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-40(%rbp), %rcx
	jne	LBB0_9
## %bb.8:
	addq	$128, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	8(%rbx), %rax
	movq	16(%rbx), %rcx
	movl	12(%rax), %esi
	movl	16(%rax), %edi
	movl	12(%rcx), %edx
	leaq	-146(%rbp), %rcx
	callq	_mbedtls_ssl_write_version
	movq	16(%rbx), %rax
	movl	8(%rax), %edi
	leaq	-96(%rbp), %rsi
	movl	$48, %edx
	callq	*(%rax)
	testl	%eax, %eax
	jne	LBB0_7
## %bb.5:
	movq	%rbx, %rdi
	callq	_mbedtls_ssl_own_key
	movq	16(%rbx), %rbx
	movl	8(%rbx), %r10d
	leaq	-144(%rbp), %rcx
	leaq	-160(%rbp), %r8
	movl	%eax, %edi
	movq	%r14, %rsi
	movq	%r15, %rdx
	movl	$48, %r9d
	pushq	%r10
	pushq	(%rbx)
	callq	_mbedtls_pk_decrypt
	addq	$16, %rsp
	leaq	L_.str.2(%rip), %rsi
	movl	$1, %edi
	callq	_MBEDTLS_SSL_DEBUG_MSG
	movq	_MBEDTLS_ERR_SSL_INTERNAL_ERROR@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_9:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MBEDTLS_PK_RSA,4,2             ## @MBEDTLS_PK_RSA
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"got no RSA private 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
L_.str.2:                               ## @.str.2
	.asciz	"should never happen"

	.comm	_MBEDTLS_ERR_SSL_INTERNAL_ERROR,4,2 ## @MBEDTLS_ERR_SSL_INTERNAL_ERROR
	.comm	_MBEDTLS_SSL_MINOR_VERSION_0,8,3 ## @MBEDTLS_SSL_MINOR_VERSION_0
	.no_dead_strip	_ssl_parse_encrypted_pms
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ssl_parse_encrypted_pms
_ssl_parse_encrypted_pms:               ; @ssl_parse_encrypted_pms
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #176
	.cfi_def_cfa_offset 176
	stp	x22, x21, [sp, #128]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #144]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #160]            ; 16-byte Folded Spill
	add	x29, sp, #160
	.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	x22, x2
	mov	x19, x1
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	bl	_mbedtls_ssl_own_key
	bl	_mbedtls_pk_get_len
	mov	x20, x0
	mov	x0, x21
	bl	_mbedtls_ssl_own_key
Lloh3:
	adrp	x8, _MBEDTLS_PK_RSA@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MBEDTLS_PK_RSA@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_mbedtls_pk_can_do
	cbz	w0, LBB0_3
; %bb.1:
	add	x8, x19, x20
	cmp	x8, x22
	b.eq	LBB0_7
; %bb.2:
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	bl	_MBEDTLS_SSL_DEBUG_MSG
Lloh8:
	adrp	x8, _MBEDTLS_ERR_SSL_BAD_HS_CLIENT_KEY_EXCHANGE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MBEDTLS_ERR_SSL_BAD_HS_CLIENT_KEY_EXCHANGE@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_MBEDTLS_SSL_DEBUG_MSG
Lloh12:
	adrp	x8, _MBEDTLS_ERR_SSL_PRIVATE_KEY_REQUIRED@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MBEDTLS_ERR_SSL_PRIVATE_KEY_REQUIRED@GOTPAGEOFF]
LBB0_4:
	ldr	w0, [x8]
LBB0_5:
	ldur	x8, [x29, #-40]
Lloh14:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh15:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_9
; %bb.6:
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	add	sp, sp, #176
	ret
LBB0_7:
	ldp	x8, x9, [x21, #8]
	ldp	w1, w0, [x8, #12]
	ldr	w2, [x9, #12]
	add	x3, sp, #22
	bl	_mbedtls_ssl_write_version
	ldr	x8, [x21, #16]
	ldr	x9, [x8]
	ldr	w0, [x8, #8]
	add	x1, sp, #72
	mov	w2, #48
	blr	x9
	cbnz	w0, LBB0_5
; %bb.8:
	mov	x0, x21
	bl	_mbedtls_ssl_own_key
	ldr	x8, [x21, #16]
	ldr	x6, [x8]
	ldr	w7, [x8, #8]
	add	x3, sp, #24
	add	x4, sp, #8
	mov	x1, x19
	mov	x2, x20
	mov	w5, #48
	bl	_mbedtls_pk_decrypt
Lloh17:
	adrp	x1, l_.str.2@PAGE
Lloh18:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #1
	bl	_MBEDTLS_SSL_DEBUG_MSG
Lloh19:
	adrp	x8, _MBEDTLS_ERR_SSL_INTERNAL_ERROR@GOTPAGE
Lloh20:
	ldr	x8, [x8, _MBEDTLS_ERR_SSL_INTERNAL_ERROR@GOTPAGEOFF]
	b	LBB0_4
LBB0_9:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_MBEDTLS_PK_RSA,4,2             ; @MBEDTLS_PK_RSA
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"got no RSA private 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
l_.str.2:                               ; @.str.2
	.asciz	"should never happen"

	.comm	_MBEDTLS_ERR_SSL_INTERNAL_ERROR,4,2 ; @MBEDTLS_ERR_SSL_INTERNAL_ERROR
	.comm	_MBEDTLS_SSL_MINOR_VERSION_0,8,3 ; @MBEDTLS_SSL_MINOR_VERSION_0
	.no_dead_strip	_ssl_parse_encrypted_pms
.subsections_via_symbols
