	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tls_open
_tls_open:                              ## @tls_open
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r15
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	(%rdi), %r12
	leaq	32(%r12), %r13
	movq	%r12, %rdi
	callq	_parse_options
	movq	%r13, %rdi
	movq	%r14, %rsi
	movq	%rbx, %rdx
	movq	%r15, %rcx
	callq	_ff_tls_open_underlying
	testl	%eax, %eax
	js	LBB0_38
## %bb.1:
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	callq	_mbedtls_ssl_init
	leaq	4(%r12), %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_mbedtls_ssl_config_init
	leaq	24(%r12), %r13
	movq	%r13, %rdi
	callq	_mbedtls_entropy_init
	leaq	20(%r12), %rbx
	movq	%rbx, %rdi
	callq	_mbedtls_ctr_drbg_init
	leaq	16(%r12), %r15
	movq	%r15, %rdi
	callq	_mbedtls_x509_crt_init
	leaq	8(%r12), %rdi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_mbedtls_pk_init
	movq	64(%r12), %rsi
	testq	%rsi, %rsi
	je	LBB0_5
## %bb.2:
	movq	%r15, %rdi
	callq	_mbedtls_x509_crt_parse_file
	testl	%eax, %eax
	je	LBB0_5
## %bb.3:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	L_.str(%rip), %rdx
	jmp	LBB0_4
LBB0_5:
	movq	80(%r12), %rsi
	testq	%rsi, %rsi
	je	LBB0_8
## %bb.6:
	leaq	12(%r12), %rdi
	callq	_mbedtls_x509_crt_parse_file
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	L_.str.1(%rip), %rdx
	jmp	LBB0_4
LBB0_8:
	movq	72(%r12), %rsi
	testq	%rsi, %rsi
	je	LBB0_11
## %bb.9:
	movl	28(%r12), %edx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_mbedtls_pk_parse_keyfile
	testl	%eax, %eax
	je	LBB0_11
## %bb.10:
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_handle_pk_parse_error
	jmp	LBB0_38
LBB0_11:
	movq	_mbedtls_entropy_func@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movq	%r13, %rdx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_mbedtls_ctr_drbg_seed
	testl	%eax, %eax
	je	LBB0_13
## %bb.12:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	L_.str.2(%rip), %rdx
	jmp	LBB0_4
LBB0_13:
	cmpq	$0, 56(%r12)
	jne	LBB0_14
## %bb.15:
	movq	_MBEDTLS_SSL_IS_CLIENT@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_14:
	movq	_MBEDTLS_SSL_IS_SERVER@GOTPCREL(%rip), %rax
LBB0_16:
	movl	(%rax), %esi
	movq	_MBEDTLS_SSL_TRANSPORT_STREAM@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_MBEDTLS_SSL_PRESET_DEFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_mbedtls_ssl_config_defaults
	testl	%eax, %eax
	je	LBB0_18
## %bb.17:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	L_.str.3(%rip), %rdx
	jmp	LBB0_4
LBB0_18:
	cmpq	$0, 64(%r12)
	jne	LBB0_19
## %bb.20:
	movq	_MBEDTLS_SSL_VERIFY_NONE@GOTPCREL(%rip), %rax
	jmp	LBB0_21
LBB0_19:
	movq	_MBEDTLS_SSL_VERIFY_REQUIRED@GOTPCREL(%rip), %rax
LBB0_21:
	movl	(%rax), %esi
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rdi
	callq	_mbedtls_ssl_conf_authmode
	movq	_mbedtls_ctr_drbg_random@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movq	%rbx, %rdx
	callq	_mbedtls_ssl_conf_rng
	movq	%r13, %rdi
	movq	%r15, %rsi
	xorl	%edx, %edx
	callq	_mbedtls_ssl_conf_ca_chain
	leaq	12(%r12), %rsi
	movq	%r13, %rdi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	callq	_mbedtls_ssl_conf_own_cert
	testl	%eax, %eax
	je	LBB0_23
## %bb.22:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	L_.str.4(%rip), %rdx
	jmp	LBB0_4
LBB0_23:
	movq	%r12, %rdi
	movq	%r13, %rsi
	callq	_mbedtls_ssl_setup
	testl	%eax, %eax
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	je	LBB0_25
## %bb.24:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	L_.str.5(%rip), %rdx
LBB0_4:
	movq	%r14, %rdi
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_av_log
LBB0_38:
	movq	%r14, %rdi
	callq	_tls_close
	movq	_EIO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_25:
	cmpq	$0, 56(%r12)
	jne	LBB0_29
## %bb.26:
	cmpl	$0, 48(%r12)
	je	LBB0_27
LBB0_29:
	movl	40(%r12), %esi
	movq	_mbedtls_send@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_mbedtls_recv@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r12, %rdi
	xorl	%r8d, %r8d
	callq	_mbedtls_ssl_set_bio
	movq	_MBEDTLS_ERR_SSL_WANT_READ@GOTPCREL(%rip), %rbx
	movq	_MBEDTLS_ERR_SSL_WANT_WRITE@GOTPCREL(%rip), %r15
LBB0_30:                                ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	callq	_mbedtls_ssl_handshake
	testl	%eax, %eax
	je	LBB0_34
## %bb.31:                              ##   in Loop: Header=BB0_30 Depth=1
	cmpl	(%rbx), %eax
	je	LBB0_30
## %bb.32:                              ##   in Loop: Header=BB0_30 Depth=1
	cmpl	(%r15), %eax
	je	LBB0_30
## %bb.33:
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_handle_handshake_error
	jmp	LBB0_38
LBB0_34:
	cmpq	$0, (%r13)
	je	LBB0_39
## %bb.35:
	movq	%r12, %rdi
	callq	_mbedtls_ssl_get_verify_result
	testl	%eax, %eax
	je	LBB0_39
## %bb.36:
	movl	%eax, %ebx
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	leaq	L_.str.7(%rip), %rdx
	movq	%r14, %rdi
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_av_log
	movq	_MBEDTLS_X509_BADCERT_NOT_TRUSTED@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_38
## %bb.37:
	movl	(%r15), %esi
	leaq	L_.str.8(%rip), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_38
LBB0_39:
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_27:
	movl	44(%r12), %esi
	movq	%r12, %rdi
	callq	_mbedtls_ssl_set_hostname
	testl	%eax, %eax
	je	LBB0_29
## %bb.28:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	L_.str.6(%rip), %rdx
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mbedtls_x509_crt_parse_file for CA cert returned %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"mbedtls_x509_crt_parse_file for own cert returned %d\n"

	.comm	_mbedtls_entropy_func,4,2       ## @mbedtls_entropy_func
L_.str.2:                               ## @.str.2
	.asciz	"mbedtls_ctr_drbg_seed returned %d\n"

	.comm	_MBEDTLS_SSL_IS_SERVER,4,2      ## @MBEDTLS_SSL_IS_SERVER
	.comm	_MBEDTLS_SSL_IS_CLIENT,4,2      ## @MBEDTLS_SSL_IS_CLIENT
	.comm	_MBEDTLS_SSL_TRANSPORT_STREAM,4,2 ## @MBEDTLS_SSL_TRANSPORT_STREAM
	.comm	_MBEDTLS_SSL_PRESET_DEFAULT,4,2 ## @MBEDTLS_SSL_PRESET_DEFAULT
L_.str.3:                               ## @.str.3
	.asciz	"mbedtls_ssl_config_defaults returned %d\n"

	.comm	_MBEDTLS_SSL_VERIFY_REQUIRED,4,2 ## @MBEDTLS_SSL_VERIFY_REQUIRED
	.comm	_MBEDTLS_SSL_VERIFY_NONE,4,2    ## @MBEDTLS_SSL_VERIFY_NONE
	.comm	_mbedtls_ctr_drbg_random,4,2    ## @mbedtls_ctr_drbg_random
L_.str.4:                               ## @.str.4
	.asciz	"mbedtls_ssl_conf_own_cert returned %d\n"

L_.str.5:                               ## @.str.5
	.asciz	"mbedtls_ssl_setup returned %d\n"

L_.str.6:                               ## @.str.6
	.asciz	"mbedtls_ssl_set_hostname returned %d\n"

	.comm	_mbedtls_send,4,2               ## @mbedtls_send
	.comm	_mbedtls_recv,4,2               ## @mbedtls_recv
	.comm	_MBEDTLS_ERR_SSL_WANT_READ,4,2  ## @MBEDTLS_ERR_SSL_WANT_READ
	.comm	_MBEDTLS_ERR_SSL_WANT_WRITE,4,2 ## @MBEDTLS_ERR_SSL_WANT_WRITE
L_.str.7:                               ## @.str.7
	.asciz	"mbedtls_ssl_get_verify_result reported problems with the certificate verification, returned flags: %u\n"

	.comm	_MBEDTLS_X509_BADCERT_NOT_TRUSTED,4,2 ## @MBEDTLS_X509_BADCERT_NOT_TRUSTED
L_.str.8:                               ## @.str.8
	.asciz	"The certificate is not correctly signed by the trusted CA.\n"

	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_tls_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tls_open
_tls_open:                              ; @tls_open
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x22, x3
	mov	x23, x1
	mov	x19, x0
	ldr	x20, [x0]
	add	x21, x20, #32
	mov	x0, x20
	bl	_parse_options
	mov	x0, x21
	mov	x1, x19
	mov	x2, x23
	mov	x3, x22
	bl	_ff_tls_open_underlying
	tbnz	w0, #31, LBB0_19
; %bb.1:
	mov	x0, x20
	bl	_mbedtls_ssl_init
	add	x22, x20, #4
	mov	x0, x22
	bl	_mbedtls_ssl_config_init
	add	x26, x20, #24
	mov	x0, x26
	bl	_mbedtls_entropy_init
	add	x25, x20, #20
	mov	x0, x25
	bl	_mbedtls_ctr_drbg_init
	add	x24, x20, #16
	mov	x0, x24
	bl	_mbedtls_x509_crt_init
	add	x23, x20, #8
	mov	x0, x23
	bl	_mbedtls_pk_init
	ldr	x1, [x20, #64]
	cbz	x1, LBB0_4
; %bb.2:
	mov	x0, x24
	bl	_mbedtls_x509_crt_parse_file
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_4
; %bb.3:
Lloh0:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	str	x0, [sp]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	b	LBB0_18
LBB0_4:
	ldr	x1, [x20, #80]
	cbz	x1, LBB0_7
; %bb.5:
	add	x0, x20, #12
	bl	_mbedtls_x509_crt_parse_file
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_7
; %bb.6:
Lloh5:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	str	x0, [sp]
Lloh8:
	adrp	x2, l_.str.1@PAGE
Lloh9:
	add	x2, x2, l_.str.1@PAGEOFF
	b	LBB0_18
LBB0_7:
	ldr	x1, [x20, #72]
	cbz	x1, LBB0_10
; %bb.8:
	ldr	w2, [x20, #28]
	mov	x0, x23
	bl	_mbedtls_pk_parse_keyfile
	cbz	w0, LBB0_10
; %bb.9:
	mov	x1, x0
	mov	x0, x19
	bl	_handle_pk_parse_error
	b	LBB0_19
LBB0_10:
Lloh10:
	adrp	x8, _mbedtls_entropy_func@GOTPAGE
Lloh11:
	ldr	x8, [x8, _mbedtls_entropy_func@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x0, x25
	mov	x2, x26
	mov	x3, #0
	mov	w4, #0
	bl	_mbedtls_ctr_drbg_seed
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_12
; %bb.11:
Lloh13:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh14:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	str	x0, [sp]
Lloh16:
	adrp	x2, l_.str.2@PAGE
Lloh17:
	add	x2, x2, l_.str.2@PAGEOFF
	b	LBB0_18
LBB0_12:
Lloh18:
	adrp	x8, _MBEDTLS_SSL_IS_SERVER@GOTPAGE
Lloh19:
	ldr	x8, [x8, _MBEDTLS_SSL_IS_SERVER@GOTPAGEOFF]
	ldr	x9, [x20, #56]
Lloh20:
	adrp	x10, _MBEDTLS_SSL_IS_CLIENT@GOTPAGE
Lloh21:
	ldr	x10, [x10, _MBEDTLS_SSL_IS_CLIENT@GOTPAGEOFF]
	cmp	x9, #0
	csel	x8, x10, x8, eq
	ldr	w1, [x8]
Lloh22:
	adrp	x8, _MBEDTLS_SSL_TRANSPORT_STREAM@GOTPAGE
Lloh23:
	ldr	x8, [x8, _MBEDTLS_SSL_TRANSPORT_STREAM@GOTPAGEOFF]
Lloh24:
	ldr	w2, [x8]
Lloh25:
	adrp	x8, _MBEDTLS_SSL_PRESET_DEFAULT@GOTPAGE
Lloh26:
	ldr	x8, [x8, _MBEDTLS_SSL_PRESET_DEFAULT@GOTPAGEOFF]
Lloh27:
	ldr	w3, [x8]
	mov	x0, x22
	bl	_mbedtls_ssl_config_defaults
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_14
; %bb.13:
Lloh28:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh29:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
	str	x0, [sp]
Lloh31:
	adrp	x2, l_.str.3@PAGE
Lloh32:
	add	x2, x2, l_.str.3@PAGEOFF
	b	LBB0_18
LBB0_14:
Lloh33:
	adrp	x8, _MBEDTLS_SSL_VERIFY_REQUIRED@GOTPAGE
Lloh34:
	ldr	x8, [x8, _MBEDTLS_SSL_VERIFY_REQUIRED@GOTPAGEOFF]
	ldr	x9, [x20, #64]
Lloh35:
	adrp	x10, _MBEDTLS_SSL_VERIFY_NONE@GOTPAGE
Lloh36:
	ldr	x10, [x10, _MBEDTLS_SSL_VERIFY_NONE@GOTPAGEOFF]
	cmp	x9, #0
	csel	x8, x10, x8, eq
	ldr	w1, [x8]
	mov	x0, x22
	bl	_mbedtls_ssl_conf_authmode
Lloh37:
	adrp	x8, _mbedtls_ctr_drbg_random@GOTPAGE
Lloh38:
	ldr	x8, [x8, _mbedtls_ctr_drbg_random@GOTPAGEOFF]
Lloh39:
	ldr	w1, [x8]
	mov	x0, x22
	mov	x2, x25
	bl	_mbedtls_ssl_conf_rng
	mov	x0, x22
	mov	x1, x24
	mov	x2, #0
	bl	_mbedtls_ssl_conf_ca_chain
	add	x1, x20, #12
	mov	x0, x22
	mov	x2, x23
	bl	_mbedtls_ssl_conf_own_cert
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_16
; %bb.15:
Lloh40:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh41:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh42:
	ldr	w1, [x8]
	str	x0, [sp]
Lloh43:
	adrp	x2, l_.str.4@PAGE
Lloh44:
	add	x2, x2, l_.str.4@PAGEOFF
	b	LBB0_18
LBB0_16:
	mov	x0, x20
	mov	x1, x22
	bl	_mbedtls_ssl_setup
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_20
; %bb.17:
Lloh45:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh46:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh47:
	ldr	w1, [x8]
	str	x0, [sp]
Lloh48:
	adrp	x2, l_.str.5@PAGE
Lloh49:
	add	x2, x2, l_.str.5@PAGEOFF
LBB0_18:
	mov	x0, x19
	bl	_av_log
LBB0_19:
	mov	x0, x19
	bl	_tls_close
Lloh50:
	adrp	x8, _EIO@GOTPAGE
Lloh51:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh52:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	b	_AVERROR
LBB0_20:
	ldr	x8, [x20, #56]
	cbnz	x8, LBB0_22
; %bb.21:
	ldr	w8, [x20, #48]
	cbz	w8, LBB0_31
LBB0_22:
	ldr	w1, [x20, #40]
Lloh53:
	adrp	x8, _mbedtls_send@GOTPAGE
Lloh54:
	ldr	x8, [x8, _mbedtls_send@GOTPAGEOFF]
Lloh55:
	ldr	w2, [x8]
Lloh56:
	adrp	x8, _mbedtls_recv@GOTPAGE
Lloh57:
	ldr	x8, [x8, _mbedtls_recv@GOTPAGEOFF]
Lloh58:
	ldr	w3, [x8]
	mov	x0, x20
	mov	x4, #0
	bl	_mbedtls_ssl_set_bio
Lloh59:
	adrp	x22, _MBEDTLS_ERR_SSL_WANT_READ@GOTPAGE
Lloh60:
	ldr	x22, [x22, _MBEDTLS_ERR_SSL_WANT_READ@GOTPAGEOFF]
Lloh61:
	adrp	x23, _MBEDTLS_ERR_SSL_WANT_WRITE@GOTPAGE
Lloh62:
	ldr	x23, [x23, _MBEDTLS_ERR_SSL_WANT_WRITE@GOTPAGEOFF]
LBB0_23:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_mbedtls_ssl_handshake
	cbz	w0, LBB0_26
; %bb.24:                               ;   in Loop: Header=BB0_23 Depth=1
	mov	x1, x0
	ldr	w8, [x22]
	ldr	w9, [x23]
	cmp	w0, w8
	ccmp	w0, w9, #4, ne
	b.eq	LBB0_23
; %bb.25:
	mov	x0, x19
	bl	_handle_handshake_error
	b	LBB0_19
LBB0_26:
	ldr	x8, [x21]
	cbz	x8, LBB0_30
; %bb.27:
	mov	x0, x20
	bl	_mbedtls_ssl_get_verify_result
	cbz	w0, LBB0_30
; %bb.28:
	mov	x20, x0
Lloh63:
	adrp	x21, _AV_LOG_ERROR@GOTPAGE
Lloh64:
	ldr	x21, [x21, _AV_LOG_ERROR@GOTPAGEOFF]
	ldr	w1, [x21]
	str	x20, [sp]
Lloh65:
	adrp	x2, l_.str.7@PAGE
Lloh66:
	add	x2, x2, l_.str.7@PAGEOFF
	mov	x0, x19
	bl	_av_log
Lloh67:
	adrp	x8, _MBEDTLS_X509_BADCERT_NOT_TRUSTED@GOTPAGE
Lloh68:
	ldr	x8, [x8, _MBEDTLS_X509_BADCERT_NOT_TRUSTED@GOTPAGEOFF]
Lloh69:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_19
; %bb.29:
	ldr	w1, [x21]
Lloh70:
	adrp	x2, l_.str.8@PAGE
Lloh71:
	add	x2, x2, l_.str.8@PAGEOFF
	b	LBB0_18
LBB0_30:
	mov	w0, #0
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_31:
	ldr	w1, [x20, #44]
	mov	x0, x20
	bl	_mbedtls_ssl_set_hostname
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_22
; %bb.32:
Lloh72:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh73:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh74:
	ldr	w1, [x8]
	str	x0, [sp]
Lloh75:
	adrp	x2, l_.str.6@PAGE
Lloh76:
	add	x2, x2, l_.str.6@PAGEOFF
	b	LBB0_18
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpAdd	Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpAdd	Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpLdrGot	Lloh61, Lloh62
	.loh AdrpLdrGot	Lloh59, Lloh60
	.loh AdrpLdrGotLdr	Lloh56, Lloh57, Lloh58
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.loh AdrpLdrGotLdr	Lloh67, Lloh68, Lloh69
	.loh AdrpAdd	Lloh65, Lloh66
	.loh AdrpLdrGot	Lloh63, Lloh64
	.loh AdrpAdd	Lloh70, Lloh71
	.loh AdrpAdd	Lloh75, Lloh76
	.loh AdrpLdrGotLdr	Lloh72, Lloh73, Lloh74
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mbedtls_x509_crt_parse_file for CA cert returned %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"mbedtls_x509_crt_parse_file for own cert returned %d\n"

	.comm	_mbedtls_entropy_func,4,2       ; @mbedtls_entropy_func
l_.str.2:                               ; @.str.2
	.asciz	"mbedtls_ctr_drbg_seed returned %d\n"

	.comm	_MBEDTLS_SSL_IS_SERVER,4,2      ; @MBEDTLS_SSL_IS_SERVER
	.comm	_MBEDTLS_SSL_IS_CLIENT,4,2      ; @MBEDTLS_SSL_IS_CLIENT
	.comm	_MBEDTLS_SSL_TRANSPORT_STREAM,4,2 ; @MBEDTLS_SSL_TRANSPORT_STREAM
	.comm	_MBEDTLS_SSL_PRESET_DEFAULT,4,2 ; @MBEDTLS_SSL_PRESET_DEFAULT
l_.str.3:                               ; @.str.3
	.asciz	"mbedtls_ssl_config_defaults returned %d\n"

	.comm	_MBEDTLS_SSL_VERIFY_REQUIRED,4,2 ; @MBEDTLS_SSL_VERIFY_REQUIRED
	.comm	_MBEDTLS_SSL_VERIFY_NONE,4,2    ; @MBEDTLS_SSL_VERIFY_NONE
	.comm	_mbedtls_ctr_drbg_random,4,2    ; @mbedtls_ctr_drbg_random
l_.str.4:                               ; @.str.4
	.asciz	"mbedtls_ssl_conf_own_cert returned %d\n"

l_.str.5:                               ; @.str.5
	.asciz	"mbedtls_ssl_setup returned %d\n"

l_.str.6:                               ; @.str.6
	.asciz	"mbedtls_ssl_set_hostname returned %d\n"

	.comm	_mbedtls_send,4,2               ; @mbedtls_send
	.comm	_mbedtls_recv,4,2               ; @mbedtls_recv
	.comm	_MBEDTLS_ERR_SSL_WANT_READ,4,2  ; @MBEDTLS_ERR_SSL_WANT_READ
	.comm	_MBEDTLS_ERR_SSL_WANT_WRITE,4,2 ; @MBEDTLS_ERR_SSL_WANT_WRITE
l_.str.7:                               ; @.str.7
	.asciz	"mbedtls_ssl_get_verify_result reported problems with the certificate verification, returned flags: %u\n"

	.comm	_MBEDTLS_X509_BADCERT_NOT_TRUSTED,4,2 ; @MBEDTLS_X509_BADCERT_NOT_TRUSTED
l_.str.8:                               ; @.str.8
	.asciz	"The certificate is not correctly signed by the trusted CA.\n"

	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_tls_open
.subsections_via_symbols
