	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mbedtls_ssl_get_record_expansion ## -- Begin function mbedtls_ssl_get_record_expansion
	.p2align	4, 0x90
_mbedtls_ssl_get_record_expansion:      ## @mbedtls_ssl_get_record_expansion
	.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	%rdi, %r15
	movq	8(%rdi), %rbx
	testq	%rbx, %rbx
	je	LBB0_1
## %bb.2:
	leaq	16(%rbx), %r14
	movq	%r14, %rdi
	callq	_mbedtls_cipher_get_cipher_mode
                                        ## kill: def $eax killed $eax def $rax
	leal	-128(%rax), %ecx
	cmpl	$3, %ecx
	jae	LBB0_3
## %bb.6:
	movq	(%rbx), %r14
	jmp	LBB0_7
LBB0_1:
	movq	%r15, %rdi
	callq	_mbedtls_ssl_hdr_len
	jmp	LBB0_8
LBB0_3:
	cmpl	$131, %eax
	jne	LBB0_5
## %bb.4:
	movq	8(%rbx), %rbx
	movq	%r14, %rdi
	callq	_mbedtls_cipher_get_block_size
	movq	%rax, %r14
	addq	%rbx, %r14
LBB0_7:
	movq	%r15, %rdi
	callq	_mbedtls_ssl_hdr_len
	addl	%r14d, %eax
	jmp	LBB0_8
LBB0_5:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_MBEDTLS_SSL_DEBUG_MSG
	movq	_MBEDTLS_ERR_SSL_INTERNAL_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_8:
                                        ## kill: def $eax killed $eax killed $rax
	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	"should never happen"

	.comm	_MBEDTLS_ERR_SSL_INTERNAL_ERROR,4,2 ## @MBEDTLS_ERR_SSL_INTERNAL_ERROR
	.comm	_MBEDTLS_ERR_SSL_FEATURE_UNAVAILABLE,4,2 ## @MBEDTLS_ERR_SSL_FEATURE_UNAVAILABLE
	.comm	_MBEDTLS_SSL_COMPRESS_NULL,8,3  ## @MBEDTLS_SSL_COMPRESS_NULL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mbedtls_ssl_get_record_expansion ; -- Begin function mbedtls_ssl_get_record_expansion
	.p2align	2
_mbedtls_ssl_get_record_expansion:      ; @mbedtls_ssl_get_record_expansion
	.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	x19, x0
	ldr	x21, [x0, #8]
	cbz	x21, LBB0_3
; %bb.1:
	add	x20, x21, #16
	mov	x0, x20
	bl	_mbedtls_cipher_get_cipher_mode
	sub	w8, w0, #128
	cmp	w8, #3
	b.hs	LBB0_4
; %bb.2:
	ldr	x20, [x21]
	b	LBB0_6
LBB0_3:
	mov	x0, x19
	bl	_mbedtls_ssl_hdr_len
	b	LBB0_8
LBB0_4:
	cmp	w0, #131
	b.ne	LBB0_7
; %bb.5:
	ldr	x21, [x21, #8]
	mov	x0, x20
	bl	_mbedtls_cipher_get_block_size
	add	x20, x0, x21
LBB0_6:
	mov	x0, x19
	bl	_mbedtls_ssl_hdr_len
	add	w0, w0, w20
	b	LBB0_8
LBB0_7:
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	w0, [x8]
LBB0_8:
                                        ; kill: def $w0 killed $w0 killed $x0
	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
	.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
	.comm	_MBEDTLS_ERR_SSL_FEATURE_UNAVAILABLE,4,2 ; @MBEDTLS_ERR_SSL_FEATURE_UNAVAILABLE
	.comm	_MBEDTLS_SSL_COMPRESS_NULL,8,3  ; @MBEDTLS_SSL_COMPRESS_NULL
.subsections_via_symbols
