	.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
	pushq	%rax
	.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, %r12
	movq	%rdi, %rbx
	movq	(%rdi), %r13
	xorl	%eax, %eax
	callq	_ff_openssl_init
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	%rbx, %rsi
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	addq	$24, %r13
	movq	%r13, %rdi
	movq	%r12, %rdx
	movq	%r15, %rcx
	callq	_ff_tls_open_underlying
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	cmpq	$0, (%r13)
	je	LBB0_6
## %bb.5:
	xorl	%eax, %eax
	callq	_SSLv23_server_method
	jmp	LBB0_7
LBB0_1:
	movl	%eax, %r14d
	jmp	LBB0_34
LBB0_3:
	movl	%eax, %r14d
	movq	%rbx, %r12
	jmp	LBB0_33
LBB0_6:
	xorl	%eax, %eax
	callq	_SSLv23_client_method
LBB0_7:
	movq	%rbx, %r12
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movl	%eax, %edi
	callq	_SSL_CTX_new
	movl	%eax, 16(%rbx)
	testl	%eax, %eax
	je	LBB0_8
## %bb.9:
	movq	_SSL_OP_NO_SSLv2@GOTPCREL(%rip), %rcx
	movq	_SSL_OP_NO_SSLv3@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	orl	(%rcx), %esi
	movl	%eax, %edi
	callq	_SSL_CTX_set_options
	movq	72(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_12
## %bb.10:
	movl	16(%rbx), %edi
	xorl	%edx, %edx
	callq	_SSL_CTX_load_verify_locations
	testl	%eax, %eax
	jne	LBB0_12
## %bb.11:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	xorl	%eax, %eax
	callq	_ERR_get_error
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_ERR_error_string
	leaq	L_.str.1(%rip), %rdx
	movq	%r12, %rdi
	movl	%r14d, %esi
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_av_log
LBB0_12:
	movq	64(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_17
## %bb.13:
	movl	16(%rbx), %edi
	callq	_SSL_CTX_use_certificate_chain_file
	testl	%eax, %eax
	je	LBB0_14
LBB0_17:
	movq	56(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_20
## %bb.18:
	movl	16(%rbx), %edi
	movq	_SSL_FILETYPE_PEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_SSL_CTX_use_PrivateKey_file
	testl	%eax, %eax
	je	LBB0_19
LBB0_20:
	cmpq	$0, 48(%rbx)
	je	LBB0_22
## %bb.21:
	movl	16(%rbx), %edi
	movq	_SSL_VERIFY_PEER@GOTPCREL(%rip), %rax
	movq	_SSL_VERIFY_FAIL_IF_NO_PEER_CERT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	xorl	%edx, %edx
	callq	_SSL_CTX_set_verify
LBB0_22:
	movl	16(%rbx), %edi
	callq	_SSL_new
	movl	%eax, (%rbx)
	testl	%eax, %eax
	je	LBB0_8
## %bb.23:
	movq	_url_bio_method@GOTPCREL(%rip), %rdi
	callq	_BIO_new
	movl	40(%rbx), %ecx
	movl	%ecx, (%rax)
	movl	(%rbx), %edi
	movq	%rax, %rsi
	movq	%rax, %rdx
	callq	_SSL_set_bio
	cmpq	$0, 24(%rbx)
	je	LBB0_24
LBB0_26:
	movl	(%rbx), %edi
	callq	_SSL_accept
	testl	%eax, %eax
	je	LBB0_29
LBB0_30:
	xorl	%r14d, %r14d
	testl	%eax, %eax
	jns	LBB0_34
## %bb.31:
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_print_tls_error
	jmp	LBB0_32
LBB0_8:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	xorl	%eax, %eax
	callq	_ERR_get_error
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_ERR_error_string
	leaq	L_.str(%rip), %rdx
	movq	%r12, %rdi
	movl	%ebx, %esi
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_16
LBB0_14:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	64(%rbx), %r15
	xorl	%eax, %eax
	callq	_ERR_get_error
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_ERR_error_string
	leaq	L_.str.2(%rip), %rdx
	jmp	LBB0_15
LBB0_19:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	56(%rbx), %r15
	xorl	%eax, %eax
	callq	_ERR_get_error
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_ERR_error_string
	leaq	L_.str.3(%rip), %rdx
LBB0_15:
	movq	%r12, %rdi
	movl	%r14d, %esi
	movq	%r15, %rcx
	movl	%eax, %r8d
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_16
LBB0_24:
	cmpl	$0, 36(%rbx)
	jne	LBB0_27
## %bb.25:
	movl	(%rbx), %edi
	movl	32(%rbx), %esi
	callq	_SSL_set_tlsext_host_name
	cmpq	$0, 24(%rbx)
	jne	LBB0_26
LBB0_27:
	movl	(%rbx), %edi
	callq	_SSL_connect
	testl	%eax, %eax
	jne	LBB0_30
LBB0_29:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.4(%rip), %rdx
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_av_log
LBB0_16:
	movq	_EIO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
LBB0_32:
	movl	%eax, %r14d
LBB0_33:
	movq	%r12, %rdi
	callq	_tls_close
LBB0_34:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s\n"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_SSL_OP_NO_SSLv2,4,2            ## @SSL_OP_NO_SSLv2
	.comm	_SSL_OP_NO_SSLv3,4,2            ## @SSL_OP_NO_SSLv3
L_.str.1:                               ## @.str.1
	.asciz	"SSL_CTX_load_verify_locations %s\n"

L_.str.2:                               ## @.str.2
	.asciz	"Unable to load cert file %s: %s\n"

	.comm	_SSL_FILETYPE_PEM,4,2           ## @SSL_FILETYPE_PEM
L_.str.3:                               ## @.str.3
	.asciz	"Unable to load key file %s: %s\n"

	.comm	_SSL_VERIFY_PEER,4,2            ## @SSL_VERIFY_PEER
	.comm	_SSL_VERIFY_FAIL_IF_NO_PEER_CERT,4,2 ## @SSL_VERIFY_FAIL_IF_NO_PEER_CERT
	.comm	_url_bio_method,4,2             ## @url_bio_method
L_.str.4:                               ## @.str.4
	.asciz	"Unable to negotiate TLS/SSL session\n"

	.comm	_BIO_TYPE_SOURCE_SINK,4,2       ## @BIO_TYPE_SOURCE_SINK
	.comm	_url_bio_bputs,4,2              ## @url_bio_bputs
	.comm	_url_bio_bread,4,2              ## @url_bio_bread
	.comm	_url_bio_bwrite,4,2             ## @url_bio_bwrite
	.comm	_url_bio_create,4,2             ## @url_bio_create
	.comm	_url_bio_ctrl,4,2               ## @url_bio_ctrl
	.comm	_url_bio_destroy,4,2            ## @url_bio_destroy
	.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, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x21, x3
	mov	x22, x1
	mov	x19, x0
	ldr	x24, [x0]
	bl	_ff_openssl_init
	tbnz	w0, #31, LBB0_4
; %bb.1:
	add	x23, x24, #24
	mov	x0, x23
	mov	x1, x19
	mov	x2, x22
	mov	x3, x21
	bl	_ff_tls_open_underlying
	tbnz	w0, #31, LBB0_26
; %bb.2:
	ldr	x8, [x23]
	cbz	x8, LBB0_5
; %bb.3:
	bl	_SSLv23_server_method
	b	LBB0_6
LBB0_4:
	mov	x20, x0
	b	LBB0_27
LBB0_5:
	bl	_SSLv23_client_method
LBB0_6:
	bl	_SSL_CTX_new
	str	w0, [x24, #16]
	cbz	w0, LBB0_20
; %bb.7:
Lloh0:
	adrp	x8, _SSL_OP_NO_SSLv2@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SSL_OP_NO_SSLv2@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _SSL_OP_NO_SSLv3@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SSL_OP_NO_SSLv3@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w1, w9, w8
	bl	_SSL_CTX_set_options
	ldr	x1, [x24, #72]
	cbz	x1, LBB0_9
; %bb.8:
	ldr	w0, [x24, #16]
	mov	x2, #0
	bl	_SSL_CTX_load_verify_locations
	cbz	w0, LBB0_21
LBB0_9:
	ldr	x1, [x24, #64]
	cbz	x1, LBB0_11
LBB0_10:
	ldr	w0, [x24, #16]
	bl	_SSL_CTX_use_certificate_chain_file
	cbz	w0, LBB0_22
LBB0_11:
	ldr	x1, [x24, #56]
	cbz	x1, LBB0_13
; %bb.12:
	ldr	w0, [x24, #16]
Lloh6:
	adrp	x8, _SSL_FILETYPE_PEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SSL_FILETYPE_PEM@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	bl	_SSL_CTX_use_PrivateKey_file
	cbz	w0, LBB0_23
LBB0_13:
	ldr	x8, [x24, #48]
	cbz	x8, LBB0_15
; %bb.14:
Lloh9:
	adrp	x8, _SSL_VERIFY_PEER@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SSL_VERIFY_PEER@GOTPAGEOFF]
	ldr	w0, [x24, #16]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _SSL_VERIFY_FAIL_IF_NO_PEER_CERT@GOTPAGE
Lloh13:
	ldr	x9, [x9, _SSL_VERIFY_FAIL_IF_NO_PEER_CERT@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w1, w9, w8
	mov	x2, #0
	bl	_SSL_CTX_set_verify
LBB0_15:
	ldr	w0, [x24, #16]
	bl	_SSL_new
	str	w0, [x24]
	cbz	w0, LBB0_20
; %bb.16:
Lloh15:
	adrp	x0, _url_bio_method@GOTPAGE
Lloh16:
	ldr	x0, [x0, _url_bio_method@GOTPAGEOFF]
	bl	_BIO_new
	mov	x1, x0
	ldr	w8, [x24, #40]
	str	w8, [x0]
	ldr	w0, [x24]
	mov	x2, x1
	bl	_SSL_set_bio
	ldr	x8, [x24, #24]
	cbz	x8, LBB0_28
LBB0_17:
	ldr	w0, [x24]
	bl	_SSL_accept
	mov	x1, x0
	cbz	w0, LBB0_31
LBB0_18:
	tbnz	w1, #31, LBB0_32
; %bb.19:
	mov	w20, #0
	b	LBB0_27
LBB0_20:
Lloh17:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh18:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh19:
	ldr	w20, [x8]
	bl	_ERR_get_error
	mov	x1, #0
	bl	_ERR_error_string
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh20:
	adrp	x2, l_.str@PAGE
Lloh21:
	add	x2, x2, l_.str@PAGEOFF
	b	LBB0_24
LBB0_21:
Lloh22:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh23:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh24:
	ldr	w20, [x8]
	bl	_ERR_get_error
	mov	x1, #0
	bl	_ERR_error_string
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh25:
	adrp	x2, l_.str.1@PAGE
Lloh26:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x1, x20
	bl	_av_log
	ldr	x1, [x24, #64]
	cbnz	x1, LBB0_10
	b	LBB0_11
LBB0_22:
Lloh27:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh28:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh29:
	ldr	w20, [x8]
	ldr	x21, [x24, #64]
	bl	_ERR_get_error
	mov	x1, #0
	bl	_ERR_error_string
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x21, x0, [sp]
Lloh30:
	adrp	x2, l_.str.2@PAGE
Lloh31:
	add	x2, x2, l_.str.2@PAGEOFF
	b	LBB0_24
LBB0_23:
Lloh32:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh33:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh34:
	ldr	w20, [x8]
	ldr	x21, [x24, #56]
	bl	_ERR_get_error
	mov	x1, #0
	bl	_ERR_error_string
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x21, x0, [sp]
Lloh35:
	adrp	x2, l_.str.3@PAGE
Lloh36:
	add	x2, x2, l_.str.3@PAGEOFF
LBB0_24:
	mov	x0, x19
	mov	x1, x20
LBB0_25:
	bl	_av_log
Lloh37:
	adrp	x8, _EIO@GOTPAGE
Lloh38:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh39:
	ldr	w0, [x8]
	bl	_AVERROR
LBB0_26:
	mov	x20, x0
	mov	x0, x19
	bl	_tls_close
LBB0_27:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_28:
	ldr	w8, [x24, #36]
	cbnz	w8, LBB0_30
; %bb.29:
	ldr	w0, [x24]
	ldr	w1, [x24, #32]
	bl	_SSL_set_tlsext_host_name
	ldr	x8, [x24, #24]
	cbnz	x8, LBB0_17
LBB0_30:
	ldr	w0, [x24]
	bl	_SSL_connect
	mov	x1, x0
	cbnz	w0, LBB0_18
LBB0_31:
Lloh40:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh41:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh42:
	ldr	w1, [x8]
Lloh43:
	adrp	x2, l_.str.4@PAGE
Lloh44:
	add	x2, x2, l_.str.4@PAGEOFF
	mov	x0, x19
	b	LBB0_25
LBB0_32:
	mov	x0, x19
	bl	_print_tls_error
	b	LBB0_26
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpAdd	Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s\n"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_SSL_OP_NO_SSLv2,4,2            ; @SSL_OP_NO_SSLv2
	.comm	_SSL_OP_NO_SSLv3,4,2            ; @SSL_OP_NO_SSLv3
l_.str.1:                               ; @.str.1
	.asciz	"SSL_CTX_load_verify_locations %s\n"

l_.str.2:                               ; @.str.2
	.asciz	"Unable to load cert file %s: %s\n"

	.comm	_SSL_FILETYPE_PEM,4,2           ; @SSL_FILETYPE_PEM
l_.str.3:                               ; @.str.3
	.asciz	"Unable to load key file %s: %s\n"

	.comm	_SSL_VERIFY_PEER,4,2            ; @SSL_VERIFY_PEER
	.comm	_SSL_VERIFY_FAIL_IF_NO_PEER_CERT,4,2 ; @SSL_VERIFY_FAIL_IF_NO_PEER_CERT
	.comm	_url_bio_method,4,2             ; @url_bio_method
l_.str.4:                               ; @.str.4
	.asciz	"Unable to negotiate TLS/SSL session\n"

	.comm	_BIO_TYPE_SOURCE_SINK,4,2       ; @BIO_TYPE_SOURCE_SINK
	.comm	_url_bio_bputs,4,2              ; @url_bio_bputs
	.comm	_url_bio_bread,4,2              ; @url_bio_bread
	.comm	_url_bio_bwrite,4,2             ; @url_bio_bwrite
	.comm	_url_bio_create,4,2             ; @url_bio_create
	.comm	_url_bio_ctrl,4,2               ; @url_bio_ctrl
	.comm	_url_bio_destroy,4,2            ; @url_bio_destroy
	.no_dead_strip	_tls_open
.subsections_via_symbols
