	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mbedtls_ssl_read_record_layer  ## -- Begin function mbedtls_ssl_read_record_layer
	.p2align	4, 0x90
_mbedtls_ssl_read_record_layer:         ## @mbedtls_ssl_read_record_layer
	.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, %rbx
	movq	(%rdi), %rax
	movq	80(%rdi), %rcx
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	testq	%rcx, %rcx
	je	LBB0_4
## %bb.2:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_MBEDTLS_SSL_DEBUG_MSG
	movq	_MBEDTLS_ERR_SSL_INTERNAL_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_3
LBB0_6:
	xorl	%r14d, %r14d
	testq	%rcx, %rcx
	jne	LBB0_3
## %bb.7:
	movq	$0, 8(%rbx)
	jmp	LBB0_9
LBB0_4:
	movq	8(%rbx), %rdx
	subq	%rax, %rdx
	jle	LBB0_5
## %bb.8:
	movq	%rdx, 8(%rbx)
	movq	16(%rbx), %rdi
	leaq	(%rdi,%rax,8), %rsi
	callq	_memmove
	movq	8(%rbx), %rcx
	movq	16(%rbx), %rdx
	leaq	L_.str.1(%rip), %rsi
	movl	$4, %edi
	callq	_MBEDTLS_SSL_DEBUG_BUF
	movq	$0, (%rbx)
	xorl	%r14d, %r14d
	cmpq	$0, 8(%rbx)
	jg	LBB0_3
	jmp	LBB0_9
LBB0_5:
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rbx)
LBB0_9:
	movq	%rbx, %rdi
	callq	_mbedtls_ssl_hdr_len
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_mbedtls_ssl_fetch_input
	testl	%eax, %eax
	je	LBB0_11
LBB0_10:
	movl	%eax, %r14d
	leaq	L_.str.2(%rip), %rsi
	movl	$1, %edi
	movl	%eax, %edx
	callq	_MBEDTLS_SSL_DEBUG_RET
	jmp	LBB0_3
LBB0_11:
	movq	%rbx, %rdi
	callq	_ssl_parse_record_header
	movl	%eax, %r14d
	testl	%eax, %eax
	je	LBB0_12
LBB0_3:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_12:
	movq	%rbx, %rdi
	callq	_mbedtls_ssl_hdr_len
	addq	8(%rbx), %rax
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_mbedtls_ssl_fetch_input
	testl	%eax, %eax
	jne	LBB0_10
## %bb.13:
	movq	$0, 64(%rbx)
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_ssl_prepare_record_content     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"should never happen"

	.comm	_MBEDTLS_ERR_SSL_INTERNAL_ERROR,4,2 ## @MBEDTLS_ERR_SSL_INTERNAL_ERROR
L_.str.1:                               ## @.str.1
	.asciz	"remaining content in record"

L_.str.2:                               ## @.str.2
	.asciz	"mbedtls_ssl_fetch_input"

	.comm	_MBEDTLS_ERR_SSL_CLIENT_RECONNECT,4,2 ## @MBEDTLS_ERR_SSL_CLIENT_RECONNECT
	.comm	_MBEDTLS_ERR_SSL_INVALID_MAC,4,2 ## @MBEDTLS_ERR_SSL_INVALID_MAC
	.comm	_MBEDTLS_ERR_SSL_INVALID_RECORD,4,2 ## @MBEDTLS_ERR_SSL_INVALID_RECORD
	.comm	_MBEDTLS_ERR_SSL_UNEXPECTED_RECORD,4,2 ## @MBEDTLS_ERR_SSL_UNEXPECTED_RECORD
	.comm	_MBEDTLS_ERR_SSL_WANT_READ,4,2  ## @MBEDTLS_ERR_SSL_WANT_READ
	.comm	_MBEDTLS_SSL_ALERT_LEVEL_FATAL,4,2 ## @MBEDTLS_SSL_ALERT_LEVEL_FATAL
	.comm	_MBEDTLS_SSL_ALERT_MSG_BAD_RECORD_MAC,4,2 ## @MBEDTLS_SSL_ALERT_MSG_BAD_RECORD_MAC
	.comm	_MBEDTLS_SSL_CLIENT_FINISHED,8,3 ## @MBEDTLS_SSL_CLIENT_FINISHED
	.comm	_MBEDTLS_SSL_HANDSHAKE_OVER,8,3 ## @MBEDTLS_SSL_HANDSHAKE_OVER
	.comm	_MBEDTLS_SSL_HS_FINISHED,8,3    ## @MBEDTLS_SSL_HS_FINISHED
	.comm	_MBEDTLS_SSL_MSG_HANDSHAKE,8,3  ## @MBEDTLS_SSL_MSG_HANDSHAKE
	.comm	_MBEDTLS_SSL_SERVER_FINISHED,8,3 ## @MBEDTLS_SSL_SERVER_FINISHED
	.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_read_record_layer  ; -- Begin function mbedtls_ssl_read_record_layer
	.p2align	2
_mbedtls_ssl_read_record_layer:         ; @mbedtls_ssl_read_record_layer
	.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]
	ldr	x9, [x0, #80]
	cbz	x8, LBB0_3
; %bb.1:
	cbz	x9, LBB0_5
; %bb.2:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_MBEDTLS_SSL_DEBUG_MSG
Lloh2:
	adrp	x8, _MBEDTLS_ERR_SSL_INTERNAL_ERROR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MBEDTLS_ERR_SSL_INTERNAL_ERROR@GOTPAGEOFF]
Lloh4:
	ldr	w20, [x8]
	b	LBB0_12
LBB0_3:
	cbnz	x9, LBB0_7
; %bb.4:
	str	xzr, [x19, #8]
	b	LBB0_9
LBB0_5:
	ldr	x9, [x19, #8]
	subs	x2, x9, x8
	b.le	LBB0_8
; %bb.6:
	str	x2, [x19, #8]
	ldr	x0, [x19, #16]
	add	x1, x0, x8, lsl #3
	bl	_memmove
	ldp	x3, x2, [x19, #8]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #4
	bl	_MBEDTLS_SSL_DEBUG_BUF
	ldr	x8, [x19, #8]
	str	xzr, [x19]
	cmp	x8, #0
	b.le	LBB0_9
LBB0_7:
	mov	w20, #0
	b	LBB0_12
LBB0_8:
	stp	xzr, xzr, [x19]
LBB0_9:
	mov	x0, x19
	bl	_mbedtls_ssl_hdr_len
	mov	x1, x0
	mov	x0, x19
	bl	_mbedtls_ssl_fetch_input
	cbz	w0, LBB0_11
LBB0_10:
	mov	x20, x0
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #1
	mov	x2, x20
	bl	_MBEDTLS_SSL_DEBUG_RET
	b	LBB0_12
LBB0_11:
	mov	x0, x19
	bl	_ssl_parse_record_header
	mov	x20, x0
	cbz	w0, LBB0_13
LBB0_12:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_13:
	mov	x0, x19
	bl	_mbedtls_ssl_hdr_len
	ldr	x8, [x19, #8]
	add	x1, x0, x8
	mov	x0, x19
	bl	_mbedtls_ssl_fetch_input
	cbnz	w0, LBB0_10
; %bb.14:
	str	xzr, [x19, #64]
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_ssl_prepare_record_content
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"should never happen"

	.comm	_MBEDTLS_ERR_SSL_INTERNAL_ERROR,4,2 ; @MBEDTLS_ERR_SSL_INTERNAL_ERROR
l_.str.1:                               ; @.str.1
	.asciz	"remaining content in record"

l_.str.2:                               ; @.str.2
	.asciz	"mbedtls_ssl_fetch_input"

	.comm	_MBEDTLS_ERR_SSL_CLIENT_RECONNECT,4,2 ; @MBEDTLS_ERR_SSL_CLIENT_RECONNECT
	.comm	_MBEDTLS_ERR_SSL_INVALID_MAC,4,2 ; @MBEDTLS_ERR_SSL_INVALID_MAC
	.comm	_MBEDTLS_ERR_SSL_INVALID_RECORD,4,2 ; @MBEDTLS_ERR_SSL_INVALID_RECORD
	.comm	_MBEDTLS_ERR_SSL_UNEXPECTED_RECORD,4,2 ; @MBEDTLS_ERR_SSL_UNEXPECTED_RECORD
	.comm	_MBEDTLS_ERR_SSL_WANT_READ,4,2  ; @MBEDTLS_ERR_SSL_WANT_READ
	.comm	_MBEDTLS_SSL_ALERT_LEVEL_FATAL,4,2 ; @MBEDTLS_SSL_ALERT_LEVEL_FATAL
	.comm	_MBEDTLS_SSL_ALERT_MSG_BAD_RECORD_MAC,4,2 ; @MBEDTLS_SSL_ALERT_MSG_BAD_RECORD_MAC
	.comm	_MBEDTLS_SSL_CLIENT_FINISHED,8,3 ; @MBEDTLS_SSL_CLIENT_FINISHED
	.comm	_MBEDTLS_SSL_HANDSHAKE_OVER,8,3 ; @MBEDTLS_SSL_HANDSHAKE_OVER
	.comm	_MBEDTLS_SSL_HS_FINISHED,8,3    ; @MBEDTLS_SSL_HS_FINISHED
	.comm	_MBEDTLS_SSL_MSG_HANDSHAKE,8,3  ; @MBEDTLS_SSL_MSG_HANDSHAKE
	.comm	_MBEDTLS_SSL_SERVER_FINISHED,8,3 ; @MBEDTLS_SSL_SERVER_FINISHED
	.comm	_MBEDTLS_SSL_TRANSPORT_DATAGRAM,8,3 ; @MBEDTLS_SSL_TRANSPORT_DATAGRAM
.subsections_via_symbols
