	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mbedtls_ssl_handshake_wrapup   ## -- Begin function mbedtls_ssl_handshake_wrapup
	.p2align	4, 0x90
_mbedtls_ssl_handshake_wrapup:          ## @mbedtls_ssl_handshake_wrapup
	.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	16(%rdi), %rax
	movl	(%rax), %r14d
	leaq	L_.str(%rip), %rsi
	movl	$3, %edi
	callq	_MBEDTLS_SSL_DEBUG_MSG
	movq	32(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	callq	_mbedtls_ssl_session_free
	movq	32(%rbx), %rdi
	callq	_mbedtls_free
LBB0_2:
	movq	24(%rbx), %rax
	movq	40(%rbx), %rsi
	movq	%rsi, 32(%rbx)
	movq	$0, 40(%rbx)
	movq	(%rax), %rcx
	testq	%rcx, %rcx
	je	LBB0_7
## %bb.3:
	cmpq	$0, (%rsi)
	je	LBB0_7
## %bb.4:
	testl	%r14d, %r14d
	jne	LBB0_7
## %bb.5:
	movl	16(%rax), %edi
	callq	*%rcx
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	callq	_MBEDTLS_SSL_DEBUG_MSG
LBB0_7:
	movq	%rbx, %rdi
	callq	_ssl_handshake_wrapup_free_hs_transform
	incl	8(%rbx)
	leaq	L_.str.2(%rip), %rsi
	movl	$3, %edi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_MBEDTLS_SSL_DEBUG_MSG          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"=> handshake wrapup"

L_.str.1:                               ## @.str.1
	.asciz	"cache did not store session"

L_.str.2:                               ## @.str.2
	.asciz	"<= handshake wrapup"

	.comm	_MBEDTLS_SSL_RENEGOTIATION_DONE,8,3 ## @MBEDTLS_SSL_RENEGOTIATION_DONE
	.comm	_MBEDTLS_SSL_RENEGOTIATION_IN_PROGRESS,8,3 ## @MBEDTLS_SSL_RENEGOTIATION_IN_PROGRESS
	.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_handshake_wrapup   ; -- Begin function mbedtls_ssl_handshake_wrapup
	.p2align	2
_mbedtls_ssl_handshake_wrapup:          ; @mbedtls_ssl_handshake_wrapup
	.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, #16]
	ldr	w20, [x8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #3
	bl	_MBEDTLS_SSL_DEBUG_MSG
	ldr	x0, [x19, #32]
	cbz	x0, LBB0_2
; %bb.1:
	bl	_mbedtls_ssl_session_free
	ldr	x0, [x19, #32]
	bl	_mbedtls_free
LBB0_2:
	ldr	x1, [x19, #40]
	stp	x1, xzr, [x19, #32]
	ldr	x9, [x19, #24]
	ldr	x8, [x9]
	cbz	x8, LBB0_6
; %bb.3:
	ldr	x10, [x1]
	cmp	x10, #0
	ccmp	w20, #0, #0, ne
	b.ne	LBB0_6
; %bb.4:
	ldr	w0, [x9, #16]
	blr	x8
	cbz	x0, LBB0_6
; %bb.5:
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	bl	_MBEDTLS_SSL_DEBUG_MSG
LBB0_6:
	mov	x0, x19
	bl	_ssl_handshake_wrapup_free_hs_transform
	ldr	w8, [x19, #8]
	add	w8, w8, #1
	str	w8, [x19, #8]
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #3
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_MBEDTLS_SSL_DEBUG_MSG
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"=> handshake wrapup"

l_.str.1:                               ; @.str.1
	.asciz	"cache did not store session"

l_.str.2:                               ; @.str.2
	.asciz	"<= handshake wrapup"

	.comm	_MBEDTLS_SSL_RENEGOTIATION_DONE,8,3 ; @MBEDTLS_SSL_RENEGOTIATION_DONE
	.comm	_MBEDTLS_SSL_RENEGOTIATION_IN_PROGRESS,8,3 ; @MBEDTLS_SSL_RENEGOTIATION_IN_PROGRESS
	.comm	_MBEDTLS_SSL_TRANSPORT_DATAGRAM,8,3 ; @MBEDTLS_SSL_TRANSPORT_DATAGRAM
.subsections_via_symbols
