	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ff_tls_open
_ff_tls_open:                           ## @ff_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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	(%rdi), %r12
	xorl	%eax, %eax
	callq	_tls_init
	cmpl	$-1, %eax
	je	LBB0_1
## %bb.2:
	leaq	8(%r12), %rdi
	movq	%r15, %rsi
	movq	%rbx, %rdx
	movq	%r14, %rcx
	callq	_ff_tls_open_underlying
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	cmpl	$0, 16(%r12)
	je	LBB0_5
## %bb.6:
	xorl	%eax, %eax
	callq	_tls_server
	jmp	LBB0_7
LBB0_3:
	movl	%eax, %ebx
	jmp	LBB0_31
LBB0_5:
	xorl	%eax, %eax
	callq	_tls_client
LBB0_7:
	movq	%rax, (%r12)
	testq	%rax, %rax
	je	LBB0_1
## %bb.8:
	xorl	%eax, %eax
	callq	_tls_config_new
	movq	%rax, %r14
	cmpq	$0, (%r12)
	je	LBB0_29
## %bb.9:
	movq	_TLS_PROTOCOLS_ALL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_tls_config_set_protocols
	cmpl	$-1, %eax
	je	LBB0_26
## %bb.10:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_tls_config_set_ciphers
	cmpl	$-1, %eax
	je	LBB0_26
## %bb.11:
	movq	40(%r12), %rsi
	testq	%rsi, %rsi
	je	LBB0_13
## %bb.12:
	movq	%r14, %rdi
	callq	_tls_config_set_ca_file
	cmpl	$-1, %eax
	je	LBB0_26
LBB0_13:
	movq	32(%r12), %rsi
	testq	%rsi, %rsi
	je	LBB0_15
## %bb.14:
	movq	%r14, %rdi
	callq	_tls_config_set_cert_file
	cmpl	$-1, %eax
	je	LBB0_26
LBB0_15:
	movq	24(%r12), %rsi
	testq	%rsi, %rsi
	je	LBB0_17
## %bb.16:
	movq	%r14, %rdi
	callq	_tls_config_set_key_file
	cmpl	$-1, %eax
	je	LBB0_26
LBB0_17:
	cmpl	$0, 20(%r12)
	jne	LBB0_19
## %bb.18:
	movq	%r14, %rdi
	callq	_tls_config_insecure_noverifycert
	movq	%r14, %rdi
	callq	_tls_config_insecure_noverifyname
	movq	%r14, %rdi
	callq	_tls_config_insecure_noverifytime
LBB0_19:
	movq	(%r12), %rdi
	movq	%r14, %rsi
	callq	_tls_configure
	cmpl	$-1, %eax
	je	LBB0_27
## %bb.20:
	cmpl	$0, 16(%r12)
	je	LBB0_21
## %bb.22:
	movq	(%r12), %rdi
	movq	_tls_read_callback@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_tls_write_callback@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	8(%r12), %r8d
	leaq	-40(%rbp), %rsi
	callq	_tls_accept_cbs
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_24
## %bb.23:
	movq	(%r12), %rdi
	callq	_tls_free
	movq	-40(%rbp), %rax
	movq	%rax, (%r12)
	jmp	LBB0_24
LBB0_1:
	movq	_EIO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	movl	%eax, %ebx
	jmp	LBB0_31
LBB0_26:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r14, %rdi
	callq	_tls_config_error
LBB0_28:
	leaq	L_.str.1(%rip), %rdx
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%eax, %ecx
	callq	_av_log
LBB0_29:
	movq	_EIO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	movl	%eax, %ebx
	testq	%r14, %r14
	je	LBB0_31
## %bb.30:
	movq	%r14, %rdi
	callq	_tls_config_free
LBB0_31:
	movq	%r15, %rdi
	callq	_ff_tls_close
LBB0_32:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_21:
	movq	(%r12), %rdi
	movq	_tls_read_callback@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_tls_write_callback@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	8(%r12), %ecx
	movl	12(%r12), %r8d
	callq	_tls_connect_cbs
	movl	%eax, %ebx
LBB0_24:
	cmpl	$-1, %ebx
	je	LBB0_27
## %bb.25:
	movq	%r14, %rdi
	callq	_tls_config_free
	xorl	%ebx, %ebx
	jmp	LBB0_32
LBB0_27:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	(%r12), %rdi
	callq	_tls_error
	jmp	LBB0_28
	.cfi_endproc
                                        ## -- End function
	.comm	_EIO,4,2                        ## @EIO
	.comm	_TLS_PROTOCOLS_ALL,4,2          ## @TLS_PROTOCOLS_ALL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"compat"

	.comm	_tls_read_callback,4,2          ## @tls_read_callback
	.comm	_tls_write_callback,4,2         ## @tls_write_callback
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
L_.str.1:                               ## @.str.1
	.asciz	"%s\n"

	.no_dead_strip	_ff_tls_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ff_tls_open
_ff_tls_open:                           ; @ff_tls_open
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x3
	mov	x21, x1
	mov	x19, x0
	ldr	x22, [x0]
	bl	_tls_init
	cmn	w0, #1
	b.eq	LBB0_21
; %bb.1:
	add	x0, x22, #8
	mov	x1, x19
	mov	x2, x21
	mov	x3, x20
	bl	_ff_tls_open_underlying
	tbnz	w0, #31, LBB0_19
; %bb.2:
	ldr	w8, [x22, #16]
	cbz	w8, LBB0_20
; %bb.3:
	bl	_tls_server
	str	x0, [x22]
	cbz	x0, LBB0_21
LBB0_4:
	bl	_tls_config_new
	mov	x20, x0
	ldr	x8, [x22]
	cbz	x8, LBB0_24
; %bb.5:
Lloh0:
	adrp	x8, _TLS_PROTOCOLS_ALL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TLS_PROTOCOLS_ALL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_tls_config_set_protocols
	cmn	w0, #1
	b.eq	LBB0_22
; %bb.6:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_tls_config_set_ciphers
	cmn	w0, #1
	b.eq	LBB0_22
; %bb.7:
	ldr	x1, [x22, #40]
	cbz	x1, LBB0_9
; %bb.8:
	mov	x0, x20
	bl	_tls_config_set_ca_file
	cmn	w0, #1
	b.eq	LBB0_22
LBB0_9:
	ldr	x1, [x22, #32]
	cbz	x1, LBB0_11
; %bb.10:
	mov	x0, x20
	bl	_tls_config_set_cert_file
	cmn	w0, #1
	b.eq	LBB0_22
LBB0_11:
	ldr	x1, [x22, #24]
	cbz	x1, LBB0_13
; %bb.12:
	mov	x0, x20
	bl	_tls_config_set_key_file
	cmn	w0, #1
	b.eq	LBB0_22
LBB0_13:
	ldr	w8, [x22, #20]
	cbnz	w8, LBB0_15
; %bb.14:
	mov	x0, x20
	bl	_tls_config_insecure_noverifycert
	mov	x0, x20
	bl	_tls_config_insecure_noverifyname
	mov	x0, x20
	bl	_tls_config_insecure_noverifytime
LBB0_15:
	ldr	x0, [x22]
	mov	x1, x20
	bl	_tls_configure
	cmn	w0, #1
	b.eq	LBB0_31
; %bb.16:
	ldr	w8, [x22, #16]
	cbz	w8, LBB0_28
; %bb.17:
Lloh5:
	adrp	x8, _tls_read_callback@GOTPAGE
Lloh6:
	ldr	x8, [x8, _tls_read_callback@GOTPAGEOFF]
	ldr	x0, [x22]
Lloh7:
	ldr	w2, [x8]
Lloh8:
	adrp	x8, _tls_write_callback@GOTPAGE
Lloh9:
	ldr	x8, [x8, _tls_write_callback@GOTPAGEOFF]
Lloh10:
	ldr	w3, [x8]
	ldr	w4, [x22, #8]
	add	x1, sp, #8
	bl	_tls_accept_cbs
	mov	x21, x0
	cbnz	w0, LBB0_29
; %bb.18:
	ldr	x0, [x22]
	bl	_tls_free
	ldr	x8, [sp, #8]
	str	x8, [x22]
	b	LBB0_29
LBB0_19:
	mov	x21, x0
	b	LBB0_26
LBB0_20:
	bl	_tls_client
	str	x0, [x22]
	cbnz	x0, LBB0_4
LBB0_21:
Lloh11:
	adrp	x8, _EIO@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	bl	_AVERROR
	mov	x21, x0
	b	LBB0_26
LBB0_22:
Lloh14:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh16:
	ldr	w21, [x8]
	mov	x0, x20
	bl	_tls_config_error
LBB0_23:
	mov	x3, x0
Lloh17:
	adrp	x2, l_.str.1@PAGE
Lloh18:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x1, x21
	bl	_av_log
LBB0_24:
Lloh19:
	adrp	x8, _EIO@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
	bl	_AVERROR
	mov	x21, x0
	cbz	x20, LBB0_26
; %bb.25:
	mov	x0, x20
	bl	_tls_config_free
LBB0_26:
	mov	x0, x19
	bl	_ff_tls_close
LBB0_27:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_28:
	ldr	x0, [x22]
Lloh22:
	adrp	x8, _tls_read_callback@GOTPAGE
Lloh23:
	ldr	x8, [x8, _tls_read_callback@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
Lloh25:
	adrp	x8, _tls_write_callback@GOTPAGE
Lloh26:
	ldr	x8, [x8, _tls_write_callback@GOTPAGEOFF]
Lloh27:
	ldr	w2, [x8]
	ldp	w3, w4, [x22, #8]
	bl	_tls_connect_cbs
	mov	x21, x0
LBB0_29:
	cmn	w21, #1
	b.eq	LBB0_31
; %bb.30:
	mov	x0, x20
	bl	_tls_config_free
	mov	w21, #0
	b	LBB0_27
LBB0_31:
Lloh28:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh29:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh30:
	ldr	w21, [x8]
	ldr	x0, [x22]
	bl	_tls_error
	b	LBB0_23
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_EIO,4,2                        ; @EIO
	.comm	_TLS_PROTOCOLS_ALL,4,2          ; @TLS_PROTOCOLS_ALL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"compat"

	.comm	_tls_read_callback,4,2          ; @tls_read_callback
	.comm	_tls_write_callback,4,2         ; @tls_write_callback
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
l_.str.1:                               ; @.str.1
	.asciz	"%s\n"

	.no_dead_strip	_ff_tls_open
.subsections_via_symbols
