	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mbedtls_ssl_handle_message_type ## -- Begin function mbedtls_ssl_handle_message_type
	.p2align	4, 0x90
_mbedtls_ssl_handle_message_type:       ## @mbedtls_ssl_handle_message_type
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	(%rdi), %rcx
	movq	_MBEDTLS_SSL_MSG_HANDSHAKE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rcx
	jne	LBB0_3
## %bb.1:
	movq	%rbx, %rdi
	callq	_mbedtls_ssl_prepare_handshake_record
	testl	%eax, %eax
	jne	LBB0_11
## %bb.2:
	movq	(%rbx), %rcx
LBB0_3:
	movq	_MBEDTLS_SSL_MSG_ALERT@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	cmpq	(%rdx), %rcx
	jne	LBB0_11
## %bb.4:
	movq	8(%rbx), %rax
	movq	8(%rax), %rsi
	movl	$2, %edi
	callq	_MBEDTLS_SSL_DEBUG_MSG
	movq	8(%rbx), %rax
	movq	(%rax), %rcx
	movq	_MBEDTLS_SSL_ALERT_LEVEL_FATAL@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_6
## %bb.5:
	movq	8(%rax), %rsi
	movl	$1, %edi
	callq	_MBEDTLS_SSL_DEBUG_MSG
	movq	_MBEDTLS_ERR_SSL_FATAL_ALERT_MESSAGE@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_6:
	movq	_MBEDTLS_SSL_ALERT_LEVEL_WARNING@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_9
## %bb.7:
	movq	8(%rax), %rax
	movq	_MBEDTLS_SSL_ALERT_MSG_CLOSE_NOTIFY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.8:
	leaq	L_.str.2(%rip), %rsi
	movl	$2, %edi
	callq	_MBEDTLS_SSL_DEBUG_MSG
	movq	_MBEDTLS_ERR_SSL_PEER_CLOSE_NOTIFY@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_9:
	movq	_MBEDTLS_ERR_SSL_NON_FATAL@GOTPCREL(%rip), %rax
LBB0_10:
	movl	(%rax), %eax
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MBEDTLS_SSL_MSG_HANDSHAKE,8,3  ## @MBEDTLS_SSL_MSG_HANDSHAKE
	.comm	_MBEDTLS_SSL_MSG_ALERT,8,3      ## @MBEDTLS_SSL_MSG_ALERT
	.comm	_MBEDTLS_SSL_ALERT_LEVEL_FATAL,8,3 ## @MBEDTLS_SSL_ALERT_LEVEL_FATAL
	.comm	_MBEDTLS_ERR_SSL_FATAL_ALERT_MESSAGE,4,2 ## @MBEDTLS_ERR_SSL_FATAL_ALERT_MESSAGE
	.comm	_MBEDTLS_SSL_ALERT_LEVEL_WARNING,8,3 ## @MBEDTLS_SSL_ALERT_LEVEL_WARNING
	.comm	_MBEDTLS_SSL_ALERT_MSG_CLOSE_NOTIFY,8,3 ## @MBEDTLS_SSL_ALERT_MSG_CLOSE_NOTIFY
	.section	__TEXT,__cstring,cstring_literals
L_.str.2:                               ## @.str.2
	.asciz	"is a close notify message"

	.comm	_MBEDTLS_ERR_SSL_PEER_CLOSE_NOTIFY,4,2 ## @MBEDTLS_ERR_SSL_PEER_CLOSE_NOTIFY
	.comm	_MBEDTLS_ERR_SSL_NON_FATAL,4,2  ## @MBEDTLS_ERR_SSL_NON_FATAL
	.comm	_MBEDTLS_SSL_ALERT_MSG_NO_CERT,8,3 ## @MBEDTLS_SSL_ALERT_MSG_NO_CERT
	.comm	_MBEDTLS_SSL_ALERT_MSG_NO_RENEGOTIATION,8,3 ## @MBEDTLS_SSL_ALERT_MSG_NO_RENEGOTIATION
	.comm	_MBEDTLS_SSL_IS_SERVER,8,3      ## @MBEDTLS_SSL_IS_SERVER
	.comm	_MBEDTLS_SSL_MINOR_VERSION_0,8,3 ## @MBEDTLS_SSL_MINOR_VERSION_0
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mbedtls_ssl_handle_message_type ; -- Begin function mbedtls_ssl_handle_message_type
	.p2align	2
_mbedtls_ssl_handle_message_type:       ; @mbedtls_ssl_handle_message_type
	.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
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _MBEDTLS_SSL_MSG_HANDSHAKE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MBEDTLS_SSL_MSG_HANDSHAKE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.1:
	mov	x0, x19
	bl	_mbedtls_ssl_prepare_handshake_record
	cbnz	w0, LBB0_12
; %bb.2:
	ldr	x8, [x19]
LBB0_3:
Lloh3:
	adrp	x9, _MBEDTLS_SSL_MSG_ALERT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MBEDTLS_SSL_MSG_ALERT@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.4:
	ldr	x8, [x19, #8]
	ldr	x1, [x8, #8]
	mov	w0, #2
	bl	_MBEDTLS_SSL_DEBUG_MSG
	ldr	x8, [x19, #8]
	ldr	x9, [x8]
Lloh6:
	adrp	x10, _MBEDTLS_SSL_ALERT_LEVEL_FATAL@GOTPAGE
Lloh7:
	ldr	x10, [x10, _MBEDTLS_SSL_ALERT_LEVEL_FATAL@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_7
; %bb.5:
	ldr	x1, [x8, #8]
	mov	w0, #1
	bl	_MBEDTLS_SSL_DEBUG_MSG
Lloh9:
	adrp	x8, _MBEDTLS_ERR_SSL_FATAL_ALERT_MESSAGE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MBEDTLS_ERR_SSL_FATAL_ALERT_MESSAGE@GOTPAGEOFF]
	b	LBB0_11
LBB0_6:
	mov	w0, #0
	b	LBB0_12
LBB0_7:
Lloh11:
	adrp	x10, _MBEDTLS_SSL_ALERT_LEVEL_WARNING@GOTPAGE
Lloh12:
	ldr	x10, [x10, _MBEDTLS_SSL_ALERT_LEVEL_WARNING@GOTPAGEOFF]
Lloh13:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_10
; %bb.8:
	ldr	x8, [x8, #8]
Lloh14:
	adrp	x9, _MBEDTLS_SSL_ALERT_MSG_CLOSE_NOTIFY@GOTPAGE
Lloh15:
	ldr	x9, [x9, _MBEDTLS_SSL_ALERT_MSG_CLOSE_NOTIFY@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.9:
Lloh17:
	adrp	x1, l_.str.2@PAGE
Lloh18:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #2
	bl	_MBEDTLS_SSL_DEBUG_MSG
Lloh19:
	adrp	x8, _MBEDTLS_ERR_SSL_PEER_CLOSE_NOTIFY@GOTPAGE
Lloh20:
	ldr	x8, [x8, _MBEDTLS_ERR_SSL_PEER_CLOSE_NOTIFY@GOTPAGEOFF]
	b	LBB0_11
LBB0_10:
Lloh21:
	adrp	x8, _MBEDTLS_ERR_SSL_NON_FATAL@GOTPAGE
Lloh22:
	ldr	x8, [x8, _MBEDTLS_ERR_SSL_NON_FATAL@GOTPAGEOFF]
LBB0_11:
	ldr	w0, [x8]
LBB0_12:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_MBEDTLS_SSL_MSG_HANDSHAKE,8,3  ; @MBEDTLS_SSL_MSG_HANDSHAKE
	.comm	_MBEDTLS_SSL_MSG_ALERT,8,3      ; @MBEDTLS_SSL_MSG_ALERT
	.comm	_MBEDTLS_SSL_ALERT_LEVEL_FATAL,8,3 ; @MBEDTLS_SSL_ALERT_LEVEL_FATAL
	.comm	_MBEDTLS_ERR_SSL_FATAL_ALERT_MESSAGE,4,2 ; @MBEDTLS_ERR_SSL_FATAL_ALERT_MESSAGE
	.comm	_MBEDTLS_SSL_ALERT_LEVEL_WARNING,8,3 ; @MBEDTLS_SSL_ALERT_LEVEL_WARNING
	.comm	_MBEDTLS_SSL_ALERT_MSG_CLOSE_NOTIFY,8,3 ; @MBEDTLS_SSL_ALERT_MSG_CLOSE_NOTIFY
	.section	__TEXT,__cstring,cstring_literals
l_.str.2:                               ; @.str.2
	.asciz	"is a close notify message"

	.comm	_MBEDTLS_ERR_SSL_PEER_CLOSE_NOTIFY,4,2 ; @MBEDTLS_ERR_SSL_PEER_CLOSE_NOTIFY
	.comm	_MBEDTLS_ERR_SSL_NON_FATAL,4,2  ; @MBEDTLS_ERR_SSL_NON_FATAL
	.comm	_MBEDTLS_SSL_ALERT_MSG_NO_CERT,8,3 ; @MBEDTLS_SSL_ALERT_MSG_NO_CERT
	.comm	_MBEDTLS_SSL_ALERT_MSG_NO_RENEGOTIATION,8,3 ; @MBEDTLS_SSL_ALERT_MSG_NO_RENEGOTIATION
	.comm	_MBEDTLS_SSL_IS_SERVER,8,3      ; @MBEDTLS_SSL_IS_SERVER
	.comm	_MBEDTLS_SSL_MINOR_VERSION_0,8,3 ; @MBEDTLS_SSL_MINOR_VERSION_0
.subsections_via_symbols
