	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function scc_write_header
_scc_write_header:                      ## @scc_write_header
	.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
	cmpl	$1, (%rdi)
	jne	LBB0_2
## %bb.1:
	movq	8(%rbx), %rax
	movq	(%rax), %rdi
	movq	(%rdi), %rax
	movq	(%rax), %rcx
	movq	_AVMEDIA_TYPE_SUBTITLE@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_2
## %bb.4:
	movq	8(%rax), %rax
	movq	_AV_CODEC_ID_EIA_608@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.6:
	movq	16(%rbx), %r14
	movl	$64, %esi
	movl	$1, %edx
	movl	$1000, %ecx                     ## imm = 0x3E8
	callq	_avpriv_set_pts_info
	movl	4(%rbx), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_avio_printf
	pcmpeqd	%xmm0, %xmm0
	movdqu	%xmm0, (%r14)
	movq	$0, 16(%r14)
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_2:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_av_log
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_5:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r14d
	movq	%rax, %rdi
	callq	_avcodec_get_name
	leaq	L_.str.1(%rip), %rdx
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_3
	.cfi_endproc
                                        ## -- End function
	.comm	_AVMEDIA_TYPE_SUBTITLE,8,3      ## @AVMEDIA_TYPE_SUBTITLE
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SCC supports only a single subtitles stream.\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_AV_CODEC_ID_EIA_608,8,3        ## @AV_CODEC_ID_EIA_608
L_.str.1:                               ## @.str.1
	.asciz	"Unsupported subtitles codec: %s\n"

L_.str.2:                               ## @.str.2
	.asciz	"Scenarist_SCC V1.0\n"

	.no_dead_strip	_scc_write_header
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function scc_write_header
_scc_write_header:                      ; @scc_write_header
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	w8, [x0]
	cmp	w8, #1
	b.ne	LBB0_4
; %bb.1:
	ldr	x8, [x19, #8]
	ldr	x0, [x8]
	ldr	x8, [x0]
	ldr	x9, [x8]
Lloh0:
	adrp	x10, _AVMEDIA_TYPE_SUBTITLE@GOTPAGE
Lloh1:
	ldr	x10, [x10, _AVMEDIA_TYPE_SUBTITLE@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_4
; %bb.2:
	ldr	x8, [x8, #8]
Lloh3:
	adrp	x9, _AV_CODEC_ID_EIA_608@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AV_CODEC_ID_EIA_608@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.3:
	ldr	x20, [x19, #16]
	mov	w1, #64
	mov	w2, #1
	mov	w3, #1000
	bl	_avpriv_set_pts_info
	ldr	w0, [x19, #4]
Lloh6:
	adrp	x1, l_.str.2@PAGE
Lloh7:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_avio_printf
	mov	x8, #-1
	stp	x8, x8, [x20]
	str	xzr, [x20, #16]
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_4:
Lloh8:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x2, l_.str@PAGE
Lloh12:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
LBB0_5:
	bl	_av_log
Lloh13:
	adrp	x8, _EINVAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	b	_AVERROR
LBB0_6:
Lloh16:
	adrp	x9, _AV_LOG_ERROR@GOTPAGE
Lloh17:
	ldr	x9, [x9, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh18:
	ldr	w20, [x9]
	mov	x0, x8
	bl	_avcodec_get_name
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh19:
	adrp	x2, l_.str.1@PAGE
Lloh20:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x1, x20
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_AVMEDIA_TYPE_SUBTITLE,8,3      ; @AVMEDIA_TYPE_SUBTITLE
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SCC supports only a single subtitles stream.\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_AV_CODEC_ID_EIA_608,8,3        ; @AV_CODEC_ID_EIA_608
l_.str.1:                               ; @.str.1
	.asciz	"Unsupported subtitles codec: %s\n"

l_.str.2:                               ; @.str.2
	.asciz	"Scenarist_SCC V1.0\n"

	.no_dead_strip	_scc_write_header
.subsections_via_symbols
