	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tls_write
_tls_write:                             ## @tls_write
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	(%rdi), %rbx
	movq	8(%rbx), %rsi
	testq	%rsi, %rsi
	jne	LBB0_3
## %bb.1:
	leaq	8(%rbx), %r13
	movq	_SECPKG_ATTR_STREAM_SIZES@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movq	%r13, %rdx
	callq	_QueryContextAttributes
	movq	_SEC_E_OK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_18
## %bb.2:
	movq	(%r13), %rsi
LBB0_3:
	movl	%r12d, %edi
	callq	_FFMIN
	movl	%eax, %r13d
	movl	16(%rbx), %edi
	addl	%eax, %edi
	addl	20(%rbx), %edi
	callq	_av_malloc
	movq	%rax, -96(%rbp)
	testq	%rax, %rax
	je	LBB0_4
## %bb.6:
	movq	%rax, %r12
	movq	%r14, -88(%rbp)                 ## 8-byte Spill
	movq	_SECBUFFER_STREAM_HEADER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	16(%rbx), %ecx
	leaq	-80(%rbp), %rdi
	movq	%r12, %rdx
	callq	_init_sec_buffer
	leaq	-72(%rbp), %rdi
	movq	_SECBUFFER_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movslq	16(%rbx), %rax
	leaq	(%r12,%rax,4), %rdx
	movl	%r13d, %ecx
	callq	_init_sec_buffer
	leaq	-64(%rbp), %rdi
	movq	_SECBUFFER_STREAM_TRAILER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movslq	16(%rbx), %rax
	leaq	(%r12,%rax,4), %rax
	movslq	%r13d, %rcx
	leaq	(%rax,%rcx,4), %rdx
	movl	20(%rbx), %ecx
	callq	_init_sec_buffer
	leaq	-56(%rbp), %rdi
	movq	_SECBUFFER_EMPTY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_init_sec_buffer
	leaq	-100(%rbp), %r14
	movq	%r14, %rdi
	leaq	-80(%rbp), %rsi
	movl	$4, %edx
	callq	_init_sec_buffer_desc
	movl	-68(%rbp), %edi
	movq	%r15, %rsi
	movl	%r13d, %edx
	callq	_memcpy
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movq	%r14, %rdx
	xorl	%ecx, %ecx
	callq	_EncryptMessage
	movq	%rax, %r15
	movq	_SEC_E_OK@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r15
	jne	LBB0_10
## %bb.7:
	movl	-72(%rbp), %r15d
	addl	-80(%rbp), %r15d
	addl	-64(%rbp), %r15d
	movl	24(%rbx), %edi
	movq	%r12, %rsi
	movl	%r15d, %edx
	callq	_ffurl_write
	testl	%eax, %eax
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
	js	LBB0_9
## %bb.8:
	cmpl	%r15d, %eax
	je	LBB0_14
LBB0_9:
	movq	_EIO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	movl	%eax, %r15d
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %rdi
	callq	_av_log
	jmp	LBB0_14
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_19
## %bb.5:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_10:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	callq	_av_log
	movq	_SEC_E_INSUFFICIENT_MEMORY@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r15
	jne	LBB0_12
## %bb.11:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_18:
	movq	_AVERROR_UNKNOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	jmp	LBB0_16
LBB0_12:
	movq	_EIO@GOTPCREL(%rip), %rax
LBB0_13:
	movl	(%rax), %edi
	callq	_AVERROR
	movl	%eax, %r15d
LBB0_14:
	leaq	-96(%rbp), %rdi
	callq	_av_freep
	testl	%r15d, %r15d
	js	LBB0_16
## %bb.15:
	movl	-72(%rbp), %r15d
LBB0_16:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_19
## %bb.17:
	movl	%r15d, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_SECPKG_ATTR_STREAM_SIZES,4,2   ## @SECPKG_ATTR_STREAM_SIZES
	.comm	_SEC_E_OK,8,3                   ## @SEC_E_OK
	.comm	_AVERROR_UNKNOWN,4,2            ## @AVERROR_UNKNOWN
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_SECBUFFER_STREAM_HEADER,4,2    ## @SECBUFFER_STREAM_HEADER
	.comm	_SECBUFFER_DATA,4,2             ## @SECBUFFER_DATA
	.comm	_SECBUFFER_STREAM_TRAILER,4,2   ## @SECBUFFER_STREAM_TRAILER
	.comm	_SECBUFFER_EMPTY,4,2            ## @SECBUFFER_EMPTY
	.comm	_EIO,4,2                        ## @EIO
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Writing encrypted data to socket failed\n"

L_.str.1:                               ## @.str.1
	.asciz	"Encrypting data failed\n"

	.comm	_SEC_E_INSUFFICIENT_MEMORY,8,3  ## @SEC_E_INSUFFICIENT_MEMORY
	.no_dead_strip	_tls_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tls_write
_tls_write:                             ; @tls_write
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x22, x2
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #56]
	ldr	x20, [x0]
	mov	x23, x20
	ldr	x1, [x23, #8]!
	cbnz	x1, LBB0_3
; %bb.1:
Lloh3:
	adrp	x8, _SECPKG_ATTR_STREAM_SIZES@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SECPKG_ATTR_STREAM_SIZES@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, x23
	bl	_QueryContextAttributes
Lloh6:
	adrp	x8, _SEC_E_OK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SEC_E_OK@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_12
; %bb.2:
	ldr	x1, [x23]
LBB0_3:
	mov	x0, x22
	bl	_FFMIN
	mov	x23, x0
	ldp	w8, w9, [x20, #16]
	add	w8, w8, w0
	add	w0, w8, w9
	bl	_av_malloc
	str	x0, [sp, #16]
	cbz	x0, LBB0_8
; %bb.4:
	mov	x22, x0
Lloh9:
	adrp	x8, _SECBUFFER_STREAM_HEADER@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SECBUFFER_STREAM_HEADER@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	ldr	w3, [x20, #16]
	add	x24, sp, #24
	add	x0, sp, #24
	mov	x2, x22
	bl	_init_sec_buffer
	add	x0, x24, #8
Lloh12:
	adrp	x8, _SECBUFFER_DATA@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SECBUFFER_DATA@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	ldrsw	x8, [x20, #16]
	add	x2, x22, x8, lsl #2
	mov	x3, x23
	bl	_init_sec_buffer
Lloh15:
	adrp	x8, _SECBUFFER_STREAM_TRAILER@GOTPAGE
Lloh16:
	ldr	x8, [x8, _SECBUFFER_STREAM_TRAILER@GOTPAGEOFF]
	add	x0, x24, #16
Lloh17:
	ldr	w1, [x8]
	ldp	w8, w3, [x20, #16]
                                        ; kill: def $w8 killed $w8 def $x8
	sxtw	x8, w8
	add	x8, x22, x8, lsl #2
	add	x2, x8, w23, sxtw #2
	bl	_init_sec_buffer
	add	x0, x24, #24
Lloh18:
	adrp	x8, _SECBUFFER_EMPTY@GOTPAGE
Lloh19:
	ldr	x8, [x8, _SECBUFFER_EMPTY@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	x2, #0
	mov	w3, #0
	bl	_init_sec_buffer
	add	x0, sp, #12
	add	x1, sp, #24
	mov	w2, #4
	bl	_init_sec_buffer_desc
	ldr	w0, [sp, #36]
	mov	x1, x21
	mov	x2, x23
	bl	_memcpy
	add	x2, sp, #12
	mov	x0, x20
	mov	w1, #0
	mov	w3, #0
	bl	_EncryptMessage
Lloh21:
	adrp	x8, _SEC_E_OK@GOTPAGE
Lloh22:
	ldr	x8, [x8, _SEC_E_OK@GOTPAGEOFF]
Lloh23:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_10
; %bb.5:
	ldr	w8, [sp, #24]
	ldr	w9, [sp, #32]
	ldr	w10, [sp, #40]
	add	w8, w9, w8
	add	w21, w8, w10
	ldr	w0, [x20, #24]
	mov	x1, x22
	mov	x2, x21
	bl	_ffurl_write
	tbnz	w0, #31, LBB0_7
; %bb.6:
	cmp	w0, w21
	b.eq	LBB0_15
LBB0_7:
Lloh24:
	adrp	x8, _EIO@GOTPAGE
Lloh25:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
	bl	_AVERROR
	mov	x21, x0
Lloh27:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh28:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
Lloh30:
	adrp	x2, l_.str@PAGE
Lloh31:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_av_log
	b	LBB0_15
LBB0_8:
Lloh32:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh33:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh34:
	ldr	w0, [x8]
	ldr	x8, [sp, #56]
Lloh35:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh36:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh37:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_18
; %bb.9:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #128
	b	_AVERROR
LBB0_10:
	mov	x21, x0
Lloh38:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh39:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh40:
	ldr	w1, [x8]
Lloh41:
	adrp	x2, l_.str.1@PAGE
Lloh42:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_av_log
Lloh43:
	adrp	x8, _SEC_E_INSUFFICIENT_MEMORY@GOTPAGE
Lloh44:
	ldr	x8, [x8, _SEC_E_INSUFFICIENT_MEMORY@GOTPAGEOFF]
Lloh45:
	ldr	x8, [x8]
	cmp	x21, x8
	b.ne	LBB0_13
; %bb.11:
Lloh46:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh47:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_14
LBB0_12:
Lloh48:
	adrp	x8, _AVERROR_UNKNOWN@GOTPAGE
Lloh49:
	ldr	x8, [x8, _AVERROR_UNKNOWN@GOTPAGEOFF]
Lloh50:
	ldr	w0, [x8]
	b	LBB0_16
LBB0_13:
Lloh51:
	adrp	x8, _EIO@GOTPAGE
Lloh52:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_14:
	ldr	w0, [x8]
	bl	_AVERROR
	mov	x21, x0
LBB0_15:
	add	x0, sp, #16
	bl	_av_freep
	ldr	w8, [sp, #32]
	cmp	w21, #0
	csel	w0, w21, w8, lt
LBB0_16:
	ldr	x8, [sp, #56]
Lloh53:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh54:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh55:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_18
; %bb.17:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_18:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGot	Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGot	Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.cfi_endproc
                                        ; -- End function
	.comm	_SECPKG_ATTR_STREAM_SIZES,4,2   ; @SECPKG_ATTR_STREAM_SIZES
	.comm	_SEC_E_OK,8,3                   ; @SEC_E_OK
	.comm	_AVERROR_UNKNOWN,4,2            ; @AVERROR_UNKNOWN
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_SECBUFFER_STREAM_HEADER,4,2    ; @SECBUFFER_STREAM_HEADER
	.comm	_SECBUFFER_DATA,4,2             ; @SECBUFFER_DATA
	.comm	_SECBUFFER_STREAM_TRAILER,4,2   ; @SECBUFFER_STREAM_TRAILER
	.comm	_SECBUFFER_EMPTY,4,2            ; @SECBUFFER_EMPTY
	.comm	_EIO,4,2                        ; @EIO
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Writing encrypted data to socket failed\n"

l_.str.1:                               ; @.str.1
	.asciz	"Encrypting data failed\n"

	.comm	_SEC_E_INSUFFICIENT_MEMORY,8,3  ; @SEC_E_INSUFFICIENT_MEMORY
	.no_dead_strip	_tls_write
.subsections_via_symbols
