	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mbedtls_ssl_parse_change_cipher_spec ## -- Begin function mbedtls_ssl_parse_change_cipher_spec
	.p2align	4, 0x90
_mbedtls_ssl_parse_change_cipher_spec:  ## @mbedtls_ssl_parse_change_cipher_spec
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	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_11
LBB0_2:
	movq	(%r14), %rax
	movq	_MBEDTLS_SSL_MSG_CHANGE_CIPHER_SPEC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.3:
	cmpl	$1, 8(%r14)
	jne	LBB0_9
## %bb.4:
	movq	16(%r14), %rax
	cmpl	$1, (%rax)
	jne	LBB0_9
## %bb.5:
	leaq	L_.str.3(%rip), %rsi
	movl	$3, %edi
	callq	_MBEDTLS_SSL_DEBUG_MSG
	movq	56(%r14), %rax
	movq	%rax, 88(%r14)
	movl	80(%r14), %eax
	movl	%eax, 84(%r14)
	movl	64(%r14), %edi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movq	_MBEDTLS_SSL_MINOR_VERSION_2@GOTPCREL(%rip), %rcx
	movq	32(%r14), %rdx
	movq	40(%r14), %rax
	cmpq	(%rcx), %rdx
	jl	LBB0_7
## %bb.6:
	movq	56(%r14), %rcx
	movslq	(%rcx), %rdx
	leaq	(%rax,%rdx,4), %rax
	subq	8(%rcx), %rax
	sarq	$2, %rax
LBB0_7:
	movq	%rax, 16(%r14)
	incl	48(%r14)
	leaq	L_.str.4(%rip), %rsi
	movl	$2, %edi
	callq	_MBEDTLS_SSL_DEBUG_MSG
	jmp	LBB0_11
LBB0_8:
	leaq	L_.str.2(%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_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
	jmp	LBB0_10
LBB0_9:
	leaq	L_.str.2(%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	%r14, %rdi
	callq	_mbedtls_ssl_send_alert_message
	movq	_MBEDTLS_ERR_SSL_BAD_HS_CHANGE_CIPHER_SPEC@GOTPCREL(%rip), %rax
LBB0_10:
	movl	(%rax), %ebx
LBB0_11:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"=> parse change cipher spec"

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

	.comm	_MBEDTLS_SSL_MSG_CHANGE_CIPHER_SPEC,8,3 ## @MBEDTLS_SSL_MSG_CHANGE_CIPHER_SPEC
L_.str.2:                               ## @.str.2
	.asciz	"bad change cipher spec 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_ALERT_MSG_DECODE_ERROR,4,2 ## @MBEDTLS_SSL_ALERT_MSG_DECODE_ERROR
	.comm	_MBEDTLS_ERR_SSL_BAD_HS_CHANGE_CIPHER_SPEC,4,2 ## @MBEDTLS_ERR_SSL_BAD_HS_CHANGE_CIPHER_SPEC
L_.str.3:                               ## @.str.3
	.asciz	"switching to new transform spec for inbound data"

	.comm	_MBEDTLS_SSL_MINOR_VERSION_2,8,3 ## @MBEDTLS_SSL_MINOR_VERSION_2
L_.str.4:                               ## @.str.4
	.asciz	"<= parse change cipher spec"

	.comm	_MBEDTLS_ERR_SSL_COUNTER_WRAPPING,4,2 ## @MBEDTLS_ERR_SSL_COUNTER_WRAPPING
	.comm	_MBEDTLS_ERR_SSL_HW_ACCEL_FAILED,4,2 ## @MBEDTLS_ERR_SSL_HW_ACCEL_FAILED
	.comm	_MBEDTLS_SSL_ALERT_MSG_INTERNAL_ERROR,4,2 ## @MBEDTLS_SSL_ALERT_MSG_INTERNAL_ERROR
	.comm	_MBEDTLS_SSL_CHANNEL_INBOUND,4,2 ## @MBEDTLS_SSL_CHANNEL_INBOUND
	.comm	_MBEDTLS_SSL_TRANSPORT_DATAGRAM,8,3 ## @MBEDTLS_SSL_TRANSPORT_DATAGRAM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mbedtls_ssl_parse_change_cipher_spec ; -- Begin function mbedtls_ssl_parse_change_cipher_spec
	.p2align	2
_mbedtls_ssl_parse_change_cipher_spec:  ; @mbedtls_ssl_parse_change_cipher_spec
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
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_11
LBB0_2:
	ldr	x8, [x19]
Lloh4:
	adrp	x9, _MBEDTLS_SSL_MSG_CHANGE_CIPHER_SPEC@GOTPAGE
Lloh5:
	ldr	x9, [x9, _MBEDTLS_SSL_MSG_CHANGE_CIPHER_SPEC@GOTPAGEOFF]
Lloh6:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.3:
	ldr	w8, [x19, #8]
	cmp	w8, #1
	b.ne	LBB0_9
; %bb.4:
	ldr	x8, [x19, #16]
	ldr	w8, [x8]
	cmp	w8, #1
	b.ne	LBB0_9
; %bb.5:
Lloh7:
	adrp	x1, l_.str.3@PAGE
Lloh8:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w0, #3
	bl	_MBEDTLS_SSL_DEBUG_MSG
	ldr	x8, [x19, #56]
	str	x8, [x19, #88]
	ldr	w8, [x19, #80]
	str	w8, [x19, #84]
	ldr	w0, [x19, #64]
	mov	w1, #0
	mov	w2, #8
	bl	_memset
Lloh9:
	adrp	x8, _MBEDTLS_SSL_MINOR_VERSION_2@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MBEDTLS_SSL_MINOR_VERSION_2@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x8]
	ldp	x10, x8, [x19, #32]
	cmp	x10, x9
	b.lt	LBB0_7
; %bb.6:
	ldr	x9, [x19, #56]
	ldrsw	x10, [x9]
	add	x8, x8, x10, lsl #2
	ldr	x9, [x9, #8]
	sub	x8, x8, x9
	asr	x8, x8, #2
LBB0_7:
	str	x8, [x19, #16]
	ldr	w8, [x19, #48]
	add	w8, w8, #1
	str	w8, [x19, #48]
Lloh12:
	adrp	x1, l_.str.4@PAGE
Lloh13:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	w0, #2
	bl	_MBEDTLS_SSL_DEBUG_MSG
	mov	w20, #0
	b	LBB0_11
LBB0_8:
Lloh14:
	adrp	x1, l_.str.2@PAGE
Lloh15:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #1
	bl	_MBEDTLS_SSL_DEBUG_MSG
Lloh16:
	adrp	x8, _MBEDTLS_SSL_ALERT_LEVEL_FATAL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _MBEDTLS_SSL_ALERT_LEVEL_FATAL@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
Lloh19:
	adrp	x8, _MBEDTLS_SSL_ALERT_MSG_UNEXPECTED_MESSAGE@GOTPAGE
Lloh20:
	ldr	x8, [x8, _MBEDTLS_SSL_ALERT_MSG_UNEXPECTED_MESSAGE@GOTPAGEOFF]
Lloh21:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_mbedtls_ssl_send_alert_message
Lloh22:
	adrp	x8, _MBEDTLS_ERR_SSL_UNEXPECTED_MESSAGE@GOTPAGE
Lloh23:
	ldr	x8, [x8, _MBEDTLS_ERR_SSL_UNEXPECTED_MESSAGE@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:
Lloh24:
	adrp	x1, l_.str.2@PAGE
Lloh25:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #1
	bl	_MBEDTLS_SSL_DEBUG_MSG
Lloh26:
	adrp	x8, _MBEDTLS_SSL_ALERT_LEVEL_FATAL@GOTPAGE
Lloh27:
	ldr	x8, [x8, _MBEDTLS_SSL_ALERT_LEVEL_FATAL@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
Lloh29:
	adrp	x8, _MBEDTLS_SSL_ALERT_MSG_DECODE_ERROR@GOTPAGE
Lloh30:
	ldr	x8, [x8, _MBEDTLS_SSL_ALERT_MSG_DECODE_ERROR@GOTPAGEOFF]
Lloh31:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_mbedtls_ssl_send_alert_message
Lloh32:
	adrp	x8, _MBEDTLS_ERR_SSL_BAD_HS_CHANGE_CIPHER_SPEC@GOTPAGE
Lloh33:
	ldr	x8, [x8, _MBEDTLS_ERR_SSL_BAD_HS_CHANGE_CIPHER_SPEC@GOTPAGEOFF]
LBB0_10:
	ldr	w20, [x8]
LBB0_11:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"=> parse change cipher spec"

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

	.comm	_MBEDTLS_SSL_MSG_CHANGE_CIPHER_SPEC,8,3 ; @MBEDTLS_SSL_MSG_CHANGE_CIPHER_SPEC
l_.str.2:                               ; @.str.2
	.asciz	"bad change cipher spec 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_ALERT_MSG_DECODE_ERROR,4,2 ; @MBEDTLS_SSL_ALERT_MSG_DECODE_ERROR
	.comm	_MBEDTLS_ERR_SSL_BAD_HS_CHANGE_CIPHER_SPEC,4,2 ; @MBEDTLS_ERR_SSL_BAD_HS_CHANGE_CIPHER_SPEC
l_.str.3:                               ; @.str.3
	.asciz	"switching to new transform spec for inbound data"

	.comm	_MBEDTLS_SSL_MINOR_VERSION_2,8,3 ; @MBEDTLS_SSL_MINOR_VERSION_2
l_.str.4:                               ; @.str.4
	.asciz	"<= parse change cipher spec"

	.comm	_MBEDTLS_ERR_SSL_COUNTER_WRAPPING,4,2 ; @MBEDTLS_ERR_SSL_COUNTER_WRAPPING
	.comm	_MBEDTLS_ERR_SSL_HW_ACCEL_FAILED,4,2 ; @MBEDTLS_ERR_SSL_HW_ACCEL_FAILED
	.comm	_MBEDTLS_SSL_ALERT_MSG_INTERNAL_ERROR,4,2 ; @MBEDTLS_SSL_ALERT_MSG_INTERNAL_ERROR
	.comm	_MBEDTLS_SSL_CHANNEL_INBOUND,4,2 ; @MBEDTLS_SSL_CHANNEL_INBOUND
	.comm	_MBEDTLS_SSL_TRANSPORT_DATAGRAM,8,3 ; @MBEDTLS_SSL_TRANSPORT_DATAGRAM
.subsections_via_symbols
