	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function write_streamheader
_write_streamheader:                    ## @write_streamheader
	.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
	movl	%ecx, %r15d
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movq	(%rdi), %r14
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movq	8(%rdx), %r13
	movq	%rsi, %rdi
	movl	%ecx, %esi
	callq	_ff_put_v
	movl	(%r13), %eax
	addl	$-128, %eax
	movl	$3, %esi
	cmpl	$2, %eax
	ja	LBB0_2
## %bb.1:
	cltq
	leaq	l_switch.table.write_streamheader(%rip), %rcx
	movl	(%rcx,%rax,4), %esi
LBB0_2:
	movq	%r12, %rdi
	callq	_ff_put_v
	movq	%r12, %rdi
	movl	$4, %esi
	callq	_ff_put_v
	movq	32(%r13), %rsi
	testq	%rsi, %rsi
	je	LBB0_13
## %bb.3:
	movq	%r12, %rdi
	callq	_avio_wl32
	movq	8(%r14), %rax
	movslq	%r15d, %rcx
	shlq	$2, %rcx
	leaq	(%rcx,%rcx,2), %rbx
	movl	(%rax,%rbx), %esi
	subl	(%r14), %esi
	movq	%r12, %rdi
	callq	_ff_put_v
	movq	8(%r14), %rax
	movl	4(%rax,%rbx), %esi
	movq	%r12, %rdi
	callq	_ff_put_v
	movq	8(%r14), %rax
	movl	8(%rax,%rbx), %esi
	movq	%r12, %rdi
	callq	_ff_put_v
	movl	4(%r13), %esi
	movq	%r12, %rdi
	callq	_ff_put_v
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_avio_w8
	movl	8(%r13), %esi
	movq	%r12, %rdi
	callq	_ff_put_v
	movl	8(%r13), %edx
	movl	28(%r13), %esi
	movq	%r12, %rdi
	callq	_avio_write
	movl	(%r13), %eax
	cmpl	$128, %eax
	je	LBB0_6
## %bb.4:
	cmpl	$130, %eax
	jne	LBB0_12
## %bb.5:
	movl	12(%r13), %esi
	movq	%r12, %rdi
	callq	_ff_put_v
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_ff_put_v
	movl	16(%r13), %esi
	movq	%r12, %rdi
	jmp	LBB0_11
LBB0_13:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %rdi
	movl	%r15d, %ecx
	callq	_av_log
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_6:
	movl	20(%r13), %esi
	movq	%r12, %rdi
	callq	_ff_put_v
	movl	24(%r13), %esi
	movq	%r12, %rdi
	callq	_ff_put_v
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movl	(%rbx), %esi
	testl	%esi, %esi
	jle	LBB0_8
## %bb.7:
	cmpl	$0, 4(%rbx)
	jle	LBB0_8
## %bb.9:
	movq	%r12, %rdi
	callq	_ff_put_v
	movl	4(%rbx), %r14d
	jmp	LBB0_10
LBB0_8:
	xorl	%r14d, %r14d
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_ff_put_v
LBB0_10:
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_ff_put_v
	movq	%r12, %rdi
	xorl	%esi, %esi
LBB0_11:
	callq	_ff_put_v
LBB0_12:
	xorl	%eax, %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	"No codec tag defined for stream %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_write_streamheader
	.section	__TEXT,__const
	.p2align	2                               ## @switch.table.write_streamheader
l_switch.table.write_streamheader:
	.long	0                               ## 0x0
	.long	2                               ## 0x2
	.long	1                               ## 0x1

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function write_streamheader
_write_streamheader:                    ; @write_streamheader
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x3
	mov	x20, x2
	mov	x19, x1
	mov	x22, x0
	ldr	x24, [x0]
	ldr	x23, [x2, #8]
	mov	x0, x1
	mov	x1, x3
	bl	_ff_put_v
	ldr	w8, [x23]
	sub	w8, w8, #128
	cmp	w8, #2
	b.hi	LBB0_2
; %bb.1:
Lloh0:
	adrp	x9, l_switch.table.write_streamheader@PAGE
Lloh1:
	add	x9, x9, l_switch.table.write_streamheader@PAGEOFF
	ldr	w1, [x9, w8, sxtw #2]
	b	LBB0_3
LBB0_2:
	mov	w1, #3
LBB0_3:
	mov	x0, x19
	bl	_ff_put_v
	mov	x0, x19
	mov	w1, #4
	bl	_ff_put_v
	ldr	x1, [x23, #32]
	cbz	x1, LBB0_7
; %bb.4:
	mov	x0, x19
	bl	_avio_wl32
	ldr	x8, [x24, #8]
	mov	w22, #12
	smull	x9, w21, w22
	ldr	w8, [x8, x9]
	ldr	w9, [x24]
	sub	w1, w8, w9
	mov	x0, x19
	bl	_ff_put_v
	ldr	x8, [x24, #8]
	smaddl	x8, w21, w22, x8
	ldr	w1, [x8, #4]
	mov	x0, x19
	bl	_ff_put_v
	ldr	x8, [x24, #8]
	smaddl	x8, w21, w22, x8
	ldr	w1, [x8, #8]
	mov	x0, x19
	bl	_ff_put_v
	ldr	w1, [x23, #4]
	mov	x0, x19
	bl	_ff_put_v
	mov	x0, x19
	mov	w1, #0
	bl	_avio_w8
	ldr	w1, [x23, #8]
	mov	x0, x19
	bl	_ff_put_v
	ldr	w1, [x23, #28]
	ldr	w2, [x23, #8]
	mov	x0, x19
	bl	_avio_write
	ldr	w8, [x23]
	cmp	w8, #128
	b.eq	LBB0_8
; %bb.5:
	cmp	w8, #130
	b.ne	LBB0_14
; %bb.6:
	ldr	w1, [x23, #12]
	mov	x0, x19
	bl	_ff_put_v
	mov	x0, x19
	mov	w1, #1
	bl	_ff_put_v
	ldr	w1, [x23, #16]
	mov	x0, x19
	b	LBB0_13
LBB0_7:
Lloh2:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x2, l_.str@PAGE
Lloh6:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x22
	mov	x3, x21
	bl	_av_log
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_AVERROR
LBB0_8:
	ldr	w1, [x23, #20]
	mov	x0, x19
	bl	_ff_put_v
	ldr	w1, [x23, #24]
	mov	x0, x19
	bl	_ff_put_v
	ldr	w1, [x20]
	cmp	w1, #1
	b.lt	LBB0_11
; %bb.9:
	ldr	w8, [x20, #4]
	cmp	w8, #0
	b.le	LBB0_11
; %bb.10:
	mov	x0, x19
	bl	_ff_put_v
	ldr	w1, [x20, #4]
	b	LBB0_12
LBB0_11:
	mov	x0, x19
	mov	w1, #0
	bl	_ff_put_v
	mov	w1, #0
LBB0_12:
	mov	x0, x19
	bl	_ff_put_v
	mov	x0, x19
	mov	w1, #0
LBB0_13:
	bl	_ff_put_v
LBB0_14:
	mov	w0, #0
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No codec tag defined for stream %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_write_streamheader
	.section	__TEXT,__const
	.p2align	2                               ; @switch.table.write_streamheader
l_switch.table.write_streamheader:
	.long	0                               ; 0x0
	.long	2                               ; 0x2
	.long	1                               ; 0x1

.subsections_via_symbols
