	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function srt_write_header
_srt_write_header:                      ## @srt_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	16(%rbx), %r14
	movq	8(%rax), %rax
	movq	_AV_CODEC_ID_TEXT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_7
## %bb.5:
	movq	_AV_CODEC_ID_SUBRIP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_7
## %bb.6:
	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
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_7:
	movl	$64, %esi
	movl	$1, %edx
	movl	$1000, %ecx                     ## imm = 0x3E8
	callq	_avpriv_set_pts_info
	movl	$1, (%r14)
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.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	"SRT supports only a single subtitles stream.\n"

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

	.no_dead_strip	_srt_write_header
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function srt_write_header
_srt_write_header:                      ; @srt_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_TEXT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AV_CODEC_ID_TEXT@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
Lloh6:
	adrp	x10, _AV_CODEC_ID_SUBRIP@GOTPAGE
Lloh7:
	ldr	x10, [x10, _AV_CODEC_ID_SUBRIP@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_6
; %bb.3:
	ldr	x19, [x19, #16]
	mov	w20, #1
	mov	w1, #64
	mov	w2, #1
	mov	w3, #1000
	bl	_avpriv_set_pts_info
	str	w20, [x19]
	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:
Lloh9:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
Lloh12:
	adrp	x2, l_.str@PAGE
Lloh13:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
LBB0_5:
	bl	_av_log
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh16:
	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:
Lloh17:
	adrp	x9, _AV_LOG_ERROR@GOTPAGE
Lloh18:
	ldr	x9, [x9, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh19:
	ldr	w20, [x9]
	mov	x0, x8
	bl	_avcodec_get_name
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh20:
	adrp	x2, l_.str.1@PAGE
Lloh21:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x1, x20
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.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	"SRT supports only a single subtitles stream.\n"

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

	.no_dead_strip	_srt_write_header
.subsections_via_symbols
