	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function swf_write_header
_swf_write_header:                      ## @swf_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	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$328, %rsp                      ## imm = 0x148
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	8(%rdi), %rax
	movq	%rax, -312(%rbp)                ## 8-byte Spill
	movq	32(%rdi), %r13
	xorps	%xmm0, %xmm0
	movups	%xmm0, 48(%r13)
	movq	$0, 64(%r13)
	movl	(%rdi), %eax
	testl	%eax, %eax
	jle	LBB0_21
## %bb.1:
	xorl	%ebx, %ebx
	movq	_AVMEDIA_TYPE_AUDIO@GOTPCREL(%rip), %r14
	movq	_AV_CODEC_ID_VP6F@GOTPCREL(%rip), %r12
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_19:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%rdx, 32(%r13)
	movq	%rcx, 16(%r13)
LBB0_20:                                ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	movslq	%eax, %rcx
	cmpq	%rcx, %rbx
	jge	LBB0_21
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%r15), %rcx
	movq	(%rcx,%rbx,8), %rdx
	movq	8(%rdx), %rcx
	movq	(%rcx), %rsi
	cmpq	(%r14), %rsi
	jne	LBB0_14
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$0, 8(%r13)
	jne	LBB0_4
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%rcx), %rax
	movq	_AV_CODEC_ID_MP3@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	jne	LBB0_12
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rcx, 8(%r13)
	movq	_AUDIO_FIFO_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_av_fifo_alloc
	movl	%eax, 40(%r13)
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r15), %eax
	jmp	LBB0_20
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$0, 16(%r13)
	jne	LBB0_15
## %bb.16:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%rcx), %rsi
	cmpq	(%r12), %rsi
	je	LBB0_19
## %bb.17:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	_AV_CODEC_ID_FLV1@GOTPCREL(%rip), %rdi
	cmpq	(%rdi), %rsi
	je	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	_AV_CODEC_ID_MJPEG@GOTPCREL(%rip), %rdi
	cmpq	(%rdi), %rsi
	je	LBB0_19
## %bb.58:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.3(%rip), %rdx
	jmp	LBB0_13
LBB0_21:
	movq	16(%r13), %rax
	testq	%rax, %rax
	je	LBB0_22
## %bb.23:
	movl	16(%rax), %ecx
	movq	%rcx, -320(%rbp)                ## 8-byte Spill
	movl	20(%rax), %eax
	movq	%rax, -336(%rbp)                ## 8-byte Spill
	movq	32(%r13), %rax
	movl	(%rax), %esi
	movl	4(%rax), %edx
	jmp	LBB0_24
LBB0_22:
	movl	$1, %edx
	movl	$10, %esi
	movl	$200, %eax
	movq	%rax, -336(%rbp)                ## 8-byte Spill
	movl	$320, %eax                      ## imm = 0x140
	movq	%rax, -320(%rbp)                ## 8-byte Spill
LBB0_24:
	movq	8(%r13), %rax
	movslq	%edx, %rcx
	movslq	%esi, %r12
	testq	%rax, %rax
	movl	%esi, -328(%rbp)                ## 4-byte Spill
	movl	%edx, -324(%rbp)                ## 4-byte Spill
	je	LBB0_25
## %bb.28:
	movq	%rcx, %rbx
	movl	24(%rax), %eax
	imull	%edx, %eax
	cltd
	idivl	%esi
	cltq
	jmp	LBB0_29
LBB0_25:
	movq	%rcx, %rbx
	imulq	$44100, %rcx, %rax              ## imm = 0xAC44
	movq	%rax, %rcx
	orq	%r12, %rcx
	shrq	$32, %rcx
	je	LBB0_26
## %bb.27:
	cqto
	idivq	%r12
	jmp	LBB0_29
LBB0_4:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	jmp	LBB0_5
LBB0_15:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
LBB0_5:
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_av_log
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_56
LBB0_12:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
LBB0_13:
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_av_log
	movl	$-1, %eax
	jmp	LBB0_56
LBB0_9:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_26:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%esi
                                        ## kill: def $eax killed $eax def $rax
LBB0_29:
	movq	%rax, (%r13)
	leaq	L_.str.4(%rip), %rsi
	movq	-312(%rbp), %rdi                ## 8-byte Reload
	movl	$3, %edx
	callq	_avio_write
	movq	16(%r15), %rax
	movl	(%rax), %esi
	leaq	L_.str.5(%rip), %rdi
	callq	_strcmp
	testl	%eax, %eax
	movl	%eax, -348(%rbp)                ## 4-byte Spill
	je	LBB0_30
## %bb.31:
	movq	16(%r13), %rax
	testq	%rax, %rax
	je	LBB0_34
## %bb.32:
	movq	8(%rax), %rax
	movq	_AV_CODEC_ID_VP6F@GOTPCREL(%rip), %rcx
	movl	$8, %esi
	cmpq	(%rcx), %rax
	je	LBB0_35
## %bb.33:
	movq	_AV_CODEC_ID_FLV1@GOTPCREL(%rip), %rcx
	movl	$6, %esi
	cmpq	(%rcx), %rax
	je	LBB0_35
LBB0_34:
	movl	$4, %esi
	jmp	LBB0_35
LBB0_30:
	movl	$9, %esi
LBB0_35:
	movq	-312(%rbp), %r14                ## 8-byte Reload
	movq	%r14, %rdi
	callq	_avio_w8
	movq	_DUMMY_FILE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_avio_wl32
	movq	-320(%rbp), %rax                ## 8-byte Reload
	leal	(,%rax,4), %eax
	leal	(%rax,%rax,4), %edx
	movq	-336(%rbp), %rax                ## 8-byte Reload
	leal	(,%rax,4), %eax
	leal	(%rax,%rax,4), %r8d
	movq	%r14, %rdi
	xorl	%esi, %esi
	xorl	%ecx, %ecx
	callq	_put_swf_rect
	shlq	$8, %r12
	movq	%r12, %rax
	orq	%rbx, %rax
	shrq	$32, %rax
	je	LBB0_36
## %bb.37:
	movq	%r12, %rax
	cqto
	idivq	%rbx
	movl	-324(%rbp), %r8d                ## 4-byte Reload
	cmpq	$65536, %rax                    ## imm = 0x10000
	jl	LBB0_41
LBB0_39:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.6(%rip), %rdx
	movq	%r15, %rdi
	movl	-328(%rbp), %ecx                ## 4-byte Reload
	xorl	%eax, %eax
	callq	_av_log
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_10:
	movl	(%rax), %edi
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_40
## %bb.11:
	addq	$328, %rsp                      ## imm = 0x148
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_36:
	movl	%r12d, %eax
	xorl	%edx, %edx
	movl	-324(%rbp), %r8d                ## 4-byte Reload
	divl	%r8d
                                        ## kill: def $eax killed $eax def $rax
	cmpq	$65536, %rax                    ## imm = 0x10000
	jge	LBB0_39
LBB0_41:
	movl	-328(%rbp), %r14d               ## 4-byte Reload
	movl	%r14d, %eax
	shll	$8, %eax
	cltd
	idivl	%r8d
	movq	-312(%rbp), %rbx                ## 8-byte Reload
	movq	%rbx, %rdi
	movl	%eax, %esi
	movl	%r8d, %r12d
	callq	_avio_wl16
	movq	%rbx, %rdi
	callq	_avio_tell
	movl	%eax, 24(%r13)
	movq	_DUMMY_DURATION@GOTPCREL(%rip), %rax
	imull	(%rax), %r14d
	movl	%r14d, %eax
	cltd
	idivl	%r12d
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_avio_wl16
	cmpl	$0, -348(%rbp)                  ## 4-byte Folded Reload
	jne	LBB0_43
## %bb.42:
	movq	_TAG_FILEATTRIBUTES@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_put_swf_tag
	movq	-312(%rbp), %rdi                ## 8-byte Reload
	movl	$8, %esi
	callq	_avio_wl32
	movq	%r15, %rdi
	callq	_put_swf_end_tag
LBB0_43:
	movq	16(%r13), %rax
	testq	%rax, %rax
	movq	-336(%rbp), %r12                ## 8-byte Reload
	je	LBB0_46
## %bb.44:
	movq	8(%rax), %rax
	movq	_AV_CODEC_ID_MJPEG@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_46
## %bb.45:
	movq	_TAG_DEFINESHAPE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_put_swf_tag
	movq	_SHAPE_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-312(%rbp), %rbx                ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_avio_wl16
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movq	-320(%rbp), %rdx                ## 8-byte Reload
	movq	%rdx, -320(%rbp)                ## 8-byte Spill
                                        ## kill: def $edx killed $edx killed $rdx
	xorl	%ecx, %ecx
	movl	%r12d, %r8d
	callq	_put_swf_rect
	movl	$1, %r14d
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_avio_w8
	movq	%rbx, %rdi
	movl	$65, %esi
	callq	_avio_w8
	movq	_BITMAP_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_avio_wl16
	movq	_FRAC_BITS@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %r14d
	movl	$0, (%rsp)
	movq	%rbx, %rdi
	movl	%r14d, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movl	%r14d, %r8d
	xorl	%r9d, %r9d
	callq	_put_swf_matrix
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_avio_w8
	leaq	-344(%rbp), %rbx
	leaq	-304(%rbp), %rsi
	movq	%rbx, %rdi
	movl	$256, %edx                      ## imm = 0x100
	callq	_init_put_bits
	movq	%rbx, %rdi
	movl	$4, %esi
	movl	$1, %edx
	callq	_put_bits
	movq	%rbx, %rdi
	movl	$4, %esi
	xorl	%edx, %edx
	callq	_put_bits
	movq	%rbx, %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	callq	_put_bits
	movq	_FLAG_MOVETO@GOTPCREL(%rip), %rax
	movq	_FLAG_SETFILL0@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	%rbx, %rdi
	movl	$5, %esi
	callq	_put_bits
	movq	%rbx, %rdi
	movl	$5, %esi
	movl	$1, %edx
	callq	_put_bits
	movq	%rbx, %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	callq	_put_bits
	movq	%rbx, %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	callq	_put_bits
	movq	%rbx, %rdi
	movl	$1, %esi
	movl	$1, %edx
	callq	_put_bits
	movq	%rbx, %rdi
	movq	-320(%rbp), %r14                ## 8-byte Reload
	movl	%r14d, %esi
	xorl	%edx, %edx
	callq	_put_swf_line_edge
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	%r12d, %edx
	callq	_put_swf_line_edge
	negl	%r14d
	movq	%rbx, %rdi
	movl	%r14d, %esi
	xorl	%edx, %edx
	callq	_put_swf_line_edge
	negl	%r12d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	%r12d, %edx
	callq	_put_swf_line_edge
	movq	%rbx, %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	callq	_put_bits
	movq	%rbx, %rdi
	movl	$5, %esi
	xorl	%edx, %edx
	callq	_put_bits
	movq	%rbx, %rdi
	callq	_flush_put_bits
	movq	%rbx, %rdi
	callq	_put_bits_ptr
	subl	-344(%rbp), %eax
	movq	-312(%rbp), %rdi                ## 8-byte Reload
	leaq	-304(%rbp), %rsi
	movl	%eax, %edx
	callq	_avio_write
	movq	%r15, %rdi
	callq	_put_swf_end_tag
LBB0_46:
	movq	8(%r13), %rax
	testq	%rax, %rax
	je	LBB0_55
## %bb.47:
	movq	8(%rax), %rax
	movq	_AV_CODEC_ID_MP3@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_55
## %bb.48:
	movq	_TAG_STREAMHEAD2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_put_swf_tag
	movq	8(%r13), %rax
	movl	24(%rax), %ecx
	cmpl	$11025, %ecx                    ## imm = 0x2B11
	je	LBB0_49
## %bb.50:
	cmpl	$44100, %ecx                    ## imm = 0xAC44
	je	LBB0_53
## %bb.51:
	cmpl	$22050, %ecx                    ## imm = 0x5622
	jne	LBB0_59
## %bb.52:
	movl	$10, %ecx
	jmp	LBB0_54
LBB0_49:
	movl	$6, %ecx
	jmp	LBB0_54
LBB0_53:
	movl	$14, %ecx
LBB0_54:
	xorl	%r14d, %r14d
	cmpl	$2, 28(%rax)
	sete	%r14b
	orl	%ecx, %r14d
	movq	8(%r15), %rdi
	movl	%r14d, %esi
	callq	_avio_w8
	orl	$32, %r14d
	movq	8(%r15), %rdi
	movl	%r14d, %esi
	callq	_avio_w8
	movq	8(%r15), %rdi
	movl	(%r13), %esi
	callq	_avio_wl16
	movq	8(%r15), %rdi
	xorl	%esi, %esi
	callq	_avio_wl16
	movq	%r15, %rdi
	callq	_put_swf_end_tag
LBB0_55:
	movq	8(%r15), %rdi
	callq	_avio_flush
	xorl	%eax, %eax
LBB0_56:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_40
## %bb.57:
	addq	$328, %rsp                      ## imm = 0x148
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_59:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.7(%rip), %rdx
	jmp	LBB0_13
LBB0_40:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_AVMEDIA_TYPE_AUDIO,8,3         ## @AVMEDIA_TYPE_AUDIO
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SWF muxer only supports 1 audio stream\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.comm	_AV_CODEC_ID_MP3,8,3            ## @AV_CODEC_ID_MP3
	.comm	_AUDIO_FIFO_SIZE,4,2            ## @AUDIO_FIFO_SIZE
	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"SWF muxer only supports MP3\n"

L_.str.2:                               ## @.str.2
	.asciz	"SWF muxer only supports 1 video stream\n"

	.comm	_AV_CODEC_ID_VP6F,8,3           ## @AV_CODEC_ID_VP6F
	.comm	_AV_CODEC_ID_FLV1,8,3           ## @AV_CODEC_ID_FLV1
	.comm	_AV_CODEC_ID_MJPEG,8,3          ## @AV_CODEC_ID_MJPEG
L_.str.3:                               ## @.str.3
	.asciz	"SWF muxer only supports VP6, FLV1 and MJPEG\n"

L_.str.4:                               ## @.str.4
	.asciz	"FWS"

L_.str.5:                               ## @.str.5
	.asciz	"avm2"

	.comm	_DUMMY_FILE_SIZE,4,2            ## @DUMMY_FILE_SIZE
L_.str.6:                               ## @.str.6
	.asciz	"Invalid (too large) frame rate %d/%d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_DUMMY_DURATION,4,2             ## @DUMMY_DURATION
	.comm	_TAG_FILEATTRIBUTES,4,2         ## @TAG_FILEATTRIBUTES
	.comm	_TAG_DEFINESHAPE,4,2            ## @TAG_DEFINESHAPE
	.comm	_SHAPE_ID,4,2                   ## @SHAPE_ID
	.comm	_BITMAP_ID,4,2                  ## @BITMAP_ID
	.comm	_FRAC_BITS,4,2                  ## @FRAC_BITS
	.comm	_FLAG_MOVETO,4,2                ## @FLAG_MOVETO
	.comm	_FLAG_SETFILL0,4,2              ## @FLAG_SETFILL0
	.comm	_TAG_STREAMHEAD2,4,2            ## @TAG_STREAMHEAD2
L_.str.7:                               ## @.str.7
	.asciz	"swf does not support that sample rate, choose from (44100, 22050, 11025).\n"

	.no_dead_strip	_swf_write_header
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function swf_write_header
_swf_write_header:                      ; @swf_write_header
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #400
	.cfi_def_cfa_offset 400
	stp	x28, x27, [sp, #304]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #320]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #336]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #352]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #368]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #384]            ; 16-byte Folded Spill
	add	x29, sp, #384
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-96]
	ldr	x24, [x0, #32]
	ldr	x20, [x0, #8]
	stp	xzr, xzr, [x24, #48]
	str	xzr, [x24, #64]
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.1:
	mov	x21, #0
Lloh3:
	adrp	x22, _AVMEDIA_TYPE_AUDIO@GOTPAGE
Lloh4:
	ldr	x22, [x22, _AVMEDIA_TYPE_AUDIO@GOTPAGEOFF]
Lloh5:
	adrp	x23, _AV_CODEC_ID_MP3@GOTPAGE
Lloh6:
	ldr	x23, [x23, _AV_CODEC_ID_MP3@GOTPAGEOFF]
Lloh7:
	adrp	x25, _AUDIO_FIFO_SIZE@GOTPAGE
Lloh8:
	ldr	x25, [x25, _AUDIO_FIFO_SIZE@GOTPAGEOFF]
Lloh9:
	adrp	x26, _AV_CODEC_ID_VP6F@GOTPAGE
Lloh10:
	ldr	x26, [x26, _AV_CODEC_ID_VP6F@GOTPAGEOFF]
Lloh11:
	adrp	x27, _AV_CODEC_ID_FLV1@GOTPAGE
Lloh12:
	ldr	x27, [x27, _AV_CODEC_ID_FLV1@GOTPAGEOFF]
Lloh13:
	adrp	x28, _AV_CODEC_ID_MJPEG@GOTPAGE
Lloh14:
	ldr	x28, [x28, _AV_CODEC_ID_MJPEG@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x21, x21, #1
	cmp	x21, w8, sxtw
	b.ge	LBB0_11
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x19, #24]
	ldr	x10, [x9, x21, lsl #3]
	ldr	x9, [x10, #8]
	ldr	x11, [x9]
	ldr	x12, [x22]
	cmp	x11, x12
	b.ne	LBB0_8
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x24, #8]
	cbnz	x8, LBB0_37
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x9, #8]
	ldr	x10, [x23]
	cmp	x8, x10
	b.ne	LBB0_40
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	str	x9, [x24, #8]
	ldr	w0, [x25]
	bl	_av_fifo_alloc
	str	w0, [x24, #40]
	cbz	w0, LBB0_43
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x19]
	b	LBB0_2
LBB0_8:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x11, [x24, #16]
	cbnz	x11, LBB0_38
; %bb.9:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x11, [x9, #8]
	ldr	x12, [x26]
	ldr	x13, [x27]
	ldr	x14, [x28]
	cmp	x11, x12
	ccmp	x11, x13, #4, ne
	ccmp	x11, x14, #4, ne
	b.ne	LBB0_41
; %bb.10:                               ;   in Loop: Header=BB0_3 Depth=1
	str	x10, [x24, #32]
	str	x9, [x24, #16]
	b	LBB0_2
LBB0_11:
	ldr	x8, [x24, #16]
	cbz	x8, LBB0_14
; %bb.12:
	ldp	w22, w21, [x8, #16]
	ldr	x8, [x24, #32]
	ldp	w25, w26, [x8]
	ldr	x8, [x24, #8]
	cbz	x8, LBB0_15
LBB0_13:
	ldr	w8, [x8, #24]
	mul	w8, w8, w26
	sdiv	w8, w8, w25
	sxtw	x8, w8
	b	LBB0_16
LBB0_14:
	mov	w26, #1
	mov	w25, #10
	mov	w21, #200
	mov	w22, #320
	ldr	x8, [x24, #8]
	cbnz	x8, LBB0_13
LBB0_15:
	mov	w8, #44100
	smull	x8, w26, w8
	mov	x9, x25
	sxtw	x9, w9
	sdiv	x8, x8, x9
LBB0_16:
	str	x8, [x24]
Lloh15:
	adrp	x1, l_.str.4@PAGE
Lloh16:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x20
	mov	w2, #3
	bl	_avio_write
	ldr	x8, [x19, #16]
	ldr	w1, [x8]
Lloh17:
	adrp	x0, l_.str.5@PAGE
Lloh18:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_strcmp
	mov	x23, x0
	cbz	w0, LBB0_20
; %bb.17:
	ldr	x8, [x24, #16]
	cbz	x8, LBB0_23
; %bb.18:
	ldr	x8, [x8, #8]
Lloh19:
	adrp	x9, _AV_CODEC_ID_VP6F@GOTPAGE
Lloh20:
	ldr	x9, [x9, _AV_CODEC_ID_VP6F@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_21
; %bb.19:
	mov	w1, #8
	b	LBB0_24
LBB0_20:
	mov	w1, #9
	b	LBB0_24
LBB0_21:
Lloh22:
	adrp	x9, _AV_CODEC_ID_FLV1@GOTPAGE
Lloh23:
	ldr	x9, [x9, _AV_CODEC_ID_FLV1@GOTPAGEOFF]
Lloh24:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_23
; %bb.22:
	mov	w1, #6
	b	LBB0_24
LBB0_23:
	mov	w1, #4
LBB0_24:
	mov	x0, x20
	bl	_avio_w8
Lloh25:
	adrp	x8, _DUMMY_FILE_SIZE@GOTPAGE
Lloh26:
	ldr	x8, [x8, _DUMMY_FILE_SIZE@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_avio_wl32
	add	w8, w22, w22, lsl #2
	lsl	w2, w8, #2
	add	w8, w21, w21, lsl #2
	lsl	w4, w8, #2
	mov	x0, x20
	mov	w1, #0
	mov	w3, #0
	bl	_put_swf_rect
	sbfiz	x8, x25, #8, #32
	sxtw	x9, w26
	sdiv	x8, x8, x9
	cmp	x8, #16, lsl #12                ; =65536
	b.lt	LBB0_26
; %bb.25:
Lloh28:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh29:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
                                        ; kill: def $w26 killed $w26 killed $x26 def $x26
                                        ; kill: def $w25 killed $w25 killed $x25 def $x25
	stp	x25, x26, [sp]
Lloh31:
	adrp	x2, l_.str.6@PAGE
Lloh32:
	add	x2, x2, l_.str.6@PAGEOFF
	mov	x0, x19
	bl	_av_log
Lloh33:
	adrp	x8, _EINVAL@GOTPAGE
Lloh34:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_44
LBB0_26:
	lsl	w8, w25, #8
	sdiv	w1, w8, w26
	mov	x0, x20
	bl	_avio_wl16
	mov	x0, x20
	bl	_avio_tell
	str	w0, [x24, #24]
Lloh35:
	adrp	x8, _DUMMY_DURATION@GOTPAGE
Lloh36:
	ldr	x8, [x8, _DUMMY_DURATION@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
	mul	w8, w8, w25
	sdiv	w1, w8, w26
	mov	x0, x20
	bl	_avio_wl16
	cbnz	w23, LBB0_28
; %bb.27:
Lloh38:
	adrp	x8, _TAG_FILEATTRIBUTES@GOTPAGE
Lloh39:
	ldr	x8, [x8, _TAG_FILEATTRIBUTES@GOTPAGEOFF]
Lloh40:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_put_swf_tag
	mov	x0, x20
	mov	w1, #8
	bl	_avio_wl32
	mov	x0, x19
	bl	_put_swf_end_tag
LBB0_28:
	ldr	x8, [x24, #16]
	cbz	x8, LBB0_31
; %bb.29:
	ldr	x8, [x8, #8]
Lloh41:
	adrp	x9, _AV_CODEC_ID_MJPEG@GOTPAGE
Lloh42:
	ldr	x9, [x9, _AV_CODEC_ID_MJPEG@GOTPAGEOFF]
Lloh43:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_31
; %bb.30:
Lloh44:
	adrp	x8, _TAG_DEFINESHAPE@GOTPAGE
Lloh45:
	ldr	x8, [x8, _TAG_DEFINESHAPE@GOTPAGEOFF]
Lloh46:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_put_swf_tag
Lloh47:
	adrp	x8, _SHAPE_ID@GOTPAGE
Lloh48:
	ldr	x8, [x8, _SHAPE_ID@GOTPAGEOFF]
Lloh49:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_avio_wl16
	mov	x0, x20
	mov	w1, #0
	mov	x2, x22
	mov	w3, #0
	mov	x4, x21
	bl	_put_swf_rect
	mov	w23, #1
	mov	x0, x20
	mov	w1, #1
	bl	_avio_w8
	mov	x0, x20
	mov	w1, #65
	bl	_avio_w8
Lloh50:
	adrp	x8, _BITMAP_ID@GOTPAGE
Lloh51:
	ldr	x8, [x8, _BITMAP_ID@GOTPAGEOFF]
Lloh52:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_avio_wl16
Lloh53:
	adrp	x8, _FRAC_BITS@GOTPAGE
Lloh54:
	ldr	x8, [x8, _FRAC_BITS@GOTPAGEOFF]
Lloh55:
	ldr	w8, [x8]
	lsl	w1, w23, w8
	mov	x0, x20
	mov	w2, #0
	mov	w3, #0
	mov	x4, x1
	mov	w5, #0
	mov	w6, #0
	bl	_put_swf_matrix
	mov	x0, x20
	mov	w1, #0
	bl	_avio_w8
	add	x0, sp, #24
	add	x1, sp, #32
	mov	w2, #256
	bl	_init_put_bits
	add	x0, sp, #24
	mov	w1, #4
	mov	w2, #1
	bl	_put_bits
	add	x0, sp, #24
	mov	w1, #4
	mov	w2, #0
	bl	_put_bits
	add	x0, sp, #24
	mov	w1, #1
	mov	w2, #0
	bl	_put_bits
Lloh56:
	adrp	x8, _FLAG_MOVETO@GOTPAGE
Lloh57:
	ldr	x8, [x8, _FLAG_MOVETO@GOTPAGEOFF]
Lloh58:
	ldr	w8, [x8]
Lloh59:
	adrp	x9, _FLAG_SETFILL0@GOTPAGE
Lloh60:
	ldr	x9, [x9, _FLAG_SETFILL0@GOTPAGEOFF]
Lloh61:
	ldr	w9, [x9]
	orr	w2, w9, w8
	add	x0, sp, #24
	mov	w1, #5
	bl	_put_bits
	add	x0, sp, #24
	mov	w1, #5
	mov	w2, #1
	bl	_put_bits
	add	x0, sp, #24
	mov	w1, #1
	mov	w2, #0
	bl	_put_bits
	add	x0, sp, #24
	mov	w1, #1
	mov	w2, #0
	bl	_put_bits
	add	x0, sp, #24
	mov	w1, #1
	mov	w2, #1
	bl	_put_bits
	add	x0, sp, #24
	mov	x1, x22
	mov	w2, #0
	bl	_put_swf_line_edge
	add	x0, sp, #24
	mov	w1, #0
	mov	x2, x21
	bl	_put_swf_line_edge
	neg	w1, w22
	add	x0, sp, #24
	mov	w2, #0
	bl	_put_swf_line_edge
	neg	w2, w21
	add	x0, sp, #24
	mov	w1, #0
	bl	_put_swf_line_edge
	add	x0, sp, #24
	mov	w1, #1
	mov	w2, #0
	bl	_put_bits
	add	x0, sp, #24
	mov	w1, #5
	mov	w2, #0
	bl	_put_bits
	add	x0, sp, #24
	bl	_flush_put_bits
	add	x0, sp, #24
	bl	_put_bits_ptr
	ldr	w8, [sp, #24]
	sub	w2, w0, w8
	add	x1, sp, #32
	mov	x0, x20
	bl	_avio_write
	mov	x0, x19
	bl	_put_swf_end_tag
LBB0_31:
	ldr	x8, [x24, #8]
	cbz	x8, LBB0_49
; %bb.32:
	ldr	x8, [x8, #8]
Lloh62:
	adrp	x9, _AV_CODEC_ID_MP3@GOTPAGE
Lloh63:
	ldr	x9, [x9, _AV_CODEC_ID_MP3@GOTPAGEOFF]
Lloh64:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_49
; %bb.33:
Lloh65:
	adrp	x8, _TAG_STREAMHEAD2@GOTPAGE
Lloh66:
	ldr	x8, [x8, _TAG_STREAMHEAD2@GOTPAGEOFF]
Lloh67:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_put_swf_tag
	ldr	x8, [x24, #8]
	ldr	w9, [x8, #24]
	mov	w10, #11025
	cmp	w9, w10
	b.eq	LBB0_46
; %bb.34:
	mov	w10, #44100
	cmp	w9, w10
	b.eq	LBB0_47
; %bb.35:
	mov	w10, #22050
	cmp	w9, w10
	b.ne	LBB0_52
; %bb.36:
	mov	w9, #10
	b	LBB0_48
LBB0_37:
Lloh68:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh69:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh70:
	ldr	w1, [x8]
Lloh71:
	adrp	x2, l_.str@PAGE
Lloh72:
	add	x2, x2, l_.str@PAGEOFF
	b	LBB0_39
LBB0_38:
Lloh73:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh74:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh75:
	ldr	w1, [x8]
Lloh76:
	adrp	x2, l_.str.2@PAGE
Lloh77:
	add	x2, x2, l_.str.2@PAGEOFF
LBB0_39:
	mov	x0, x19
	bl	_av_log
Lloh78:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh79:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh80:
	ldr	w0, [x8]
	b	LBB0_50
LBB0_40:
Lloh81:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh82:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh83:
	ldr	w1, [x8]
Lloh84:
	adrp	x2, l_.str.1@PAGE
Lloh85:
	add	x2, x2, l_.str.1@PAGEOFF
	b	LBB0_42
LBB0_41:
Lloh86:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh87:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh88:
	ldr	w1, [x8]
Lloh89:
	adrp	x2, l_.str.3@PAGE
Lloh90:
	add	x2, x2, l_.str.3@PAGEOFF
LBB0_42:
	mov	x0, x19
	bl	_av_log
	mov	w0, #-1
	b	LBB0_50
LBB0_43:
Lloh91:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh92:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_44:
	ldr	w0, [x8]
	ldur	x8, [x29, #-96]
Lloh93:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh94:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh95:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_53
; %bb.45:
	ldp	x29, x30, [sp, #384]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #368]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #352]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #336]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #320]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #304]            ; 16-byte Folded Reload
	add	sp, sp, #400
	b	_AVERROR
LBB0_46:
	mov	w9, #6
	b	LBB0_48
LBB0_47:
	mov	w9, #14
LBB0_48:
	ldr	w8, [x8, #28]
	cmp	w8, #2
	cset	w8, eq
	orr	w20, w9, w8
	ldr	x0, [x19, #8]
	mov	x1, x20
	bl	_avio_w8
	orr	w1, w20, #0x20
	ldr	x0, [x19, #8]
	bl	_avio_w8
	ldr	x0, [x19, #8]
	ldr	w1, [x24]
	bl	_avio_wl16
	ldr	x0, [x19, #8]
	mov	w1, #0
	bl	_avio_wl16
	mov	x0, x19
	bl	_put_swf_end_tag
LBB0_49:
	ldr	x0, [x19, #8]
	bl	_avio_flush
	mov	w0, #0
LBB0_50:
	ldur	x8, [x29, #-96]
Lloh96:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh97:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh98:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_53
; %bb.51:
	ldp	x29, x30, [sp, #384]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #368]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #352]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #336]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #320]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #304]            ; 16-byte Folded Reload
	add	sp, sp, #400
	ret
LBB0_52:
Lloh99:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh100:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh101:
	ldr	w1, [x8]
Lloh102:
	adrp	x2, l_.str.7@PAGE
Lloh103:
	add	x2, x2, l_.str.7@PAGEOFF
	b	LBB0_42
LBB0_53:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh59, Lloh60, Lloh61
	.loh AdrpLdrGotLdr	Lloh56, Lloh57, Lloh58
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh62, Lloh63, Lloh64
	.loh AdrpLdrGotLdr	Lloh65, Lloh66, Lloh67
	.loh AdrpAdd	Lloh71, Lloh72
	.loh AdrpLdrGotLdr	Lloh68, Lloh69, Lloh70
	.loh AdrpAdd	Lloh76, Lloh77
	.loh AdrpLdrGotLdr	Lloh73, Lloh74, Lloh75
	.loh AdrpLdrGotLdr	Lloh78, Lloh79, Lloh80
	.loh AdrpAdd	Lloh84, Lloh85
	.loh AdrpLdrGotLdr	Lloh81, Lloh82, Lloh83
	.loh AdrpAdd	Lloh89, Lloh90
	.loh AdrpLdrGotLdr	Lloh86, Lloh87, Lloh88
	.loh AdrpLdrGot	Lloh91, Lloh92
	.loh AdrpLdrGotLdr	Lloh93, Lloh94, Lloh95
	.loh AdrpLdrGotLdr	Lloh96, Lloh97, Lloh98
	.loh AdrpAdd	Lloh102, Lloh103
	.loh AdrpLdrGotLdr	Lloh99, Lloh100, Lloh101
	.cfi_endproc
                                        ; -- End function
	.comm	_AVMEDIA_TYPE_AUDIO,8,3         ; @AVMEDIA_TYPE_AUDIO
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SWF muxer only supports 1 audio stream\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_AV_CODEC_ID_MP3,8,3            ; @AV_CODEC_ID_MP3
	.comm	_AUDIO_FIFO_SIZE,4,2            ; @AUDIO_FIFO_SIZE
	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"SWF muxer only supports MP3\n"

l_.str.2:                               ; @.str.2
	.asciz	"SWF muxer only supports 1 video stream\n"

	.comm	_AV_CODEC_ID_VP6F,8,3           ; @AV_CODEC_ID_VP6F
	.comm	_AV_CODEC_ID_FLV1,8,3           ; @AV_CODEC_ID_FLV1
	.comm	_AV_CODEC_ID_MJPEG,8,3          ; @AV_CODEC_ID_MJPEG
l_.str.3:                               ; @.str.3
	.asciz	"SWF muxer only supports VP6, FLV1 and MJPEG\n"

l_.str.4:                               ; @.str.4
	.asciz	"FWS"

l_.str.5:                               ; @.str.5
	.asciz	"avm2"

	.comm	_DUMMY_FILE_SIZE,4,2            ; @DUMMY_FILE_SIZE
l_.str.6:                               ; @.str.6
	.asciz	"Invalid (too large) frame rate %d/%d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_DUMMY_DURATION,4,2             ; @DUMMY_DURATION
	.comm	_TAG_FILEATTRIBUTES,4,2         ; @TAG_FILEATTRIBUTES
	.comm	_TAG_DEFINESHAPE,4,2            ; @TAG_DEFINESHAPE
	.comm	_SHAPE_ID,4,2                   ; @SHAPE_ID
	.comm	_BITMAP_ID,4,2                  ; @BITMAP_ID
	.comm	_FRAC_BITS,4,2                  ; @FRAC_BITS
	.comm	_FLAG_MOVETO,4,2                ; @FLAG_MOVETO
	.comm	_FLAG_SETFILL0,4,2              ; @FLAG_SETFILL0
	.comm	_TAG_STREAMHEAD2,4,2            ; @TAG_STREAMHEAD2
l_.str.7:                               ; @.str.7
	.asciz	"swf does not support that sample rate, choose from (44100, 22050, 11025).\n"

	.no_dead_strip	_swf_write_header
.subsections_via_symbols
