	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function swf_write_trailer
_swf_write_trailer:                     ## @swf_write_trailer
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movq	24(%rdi), %rcx
	movq	8(%rdi), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	(%rdi), %eax
	testl	%eax, %eax
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	jle	LBB0_1
## %bb.2:
	addq	$12, %rcx
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	xorl	%r12d, %r12d
	movq	_AVMEDIA_TYPE_VIDEO@GOTPCREL(%rip), %r14
	xorl	%ebx, %ebx
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%r12
	movslq	%eax, %rcx
	movq	%r15, %rbx
	cmpq	%rcx, %r12
	jge	LBB0_6
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r13), %rcx
	movq	(%rcx,%r12,8), %rcx
	movq	(%rcx), %r15
	movq	(%r15), %rcx
	cmpq	(%r14), %rcx
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_av_fifo_freep
	movl	(%r13), %eax
	movq	%rbx, %r15
	jmp	LBB0_5
LBB0_1:
	xorl	%r15d, %r15d
LBB0_6:
	movq	_TAG_END@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_put_swf_tag
	movq	%r13, %rdi
	callq	_put_swf_end_tag
	movq	8(%r13), %rax
	movq	_AVIO_SEEKABLE_NORMAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_11
## %bb.7:
	testq	%r15, %r15
	je	LBB0_11
## %bb.8:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_avio_tell
	movl	%eax, %r14d
	movq	_SEEK_SET@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	movq	%rbx, %rdi
	movl	$4, %esi
	callq	_avio_seek
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_avio_wl32
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	movl	(%r12), %esi
	movl	(%r15), %edx
	movq	%rbx, %rdi
	callq	_avio_seek
	movl	8(%r12), %esi
	movq	%rbx, %rdi
	callq	_avio_wl16
	movl	4(%r12), %esi
	testl	%esi, %esi
	je	LBB0_10
## %bb.9:
	movl	(%r15), %edx
	movq	%rbx, %rdi
	callq	_avio_seek
	movl	8(%r12), %esi
	movq	%rbx, %rdi
	callq	_avio_wl16
LBB0_10:
	movl	(%r15), %edx
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_avio_seek
LBB0_11:
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AVMEDIA_TYPE_VIDEO,8,3         ## @AVMEDIA_TYPE_VIDEO
	.comm	_TAG_END,4,2                    ## @TAG_END
	.comm	_AVIO_SEEKABLE_NORMAL,4,2       ## @AVIO_SEEKABLE_NORMAL
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
	.no_dead_strip	_swf_write_trailer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function swf_write_trailer
_swf_write_trailer:                     ; @swf_write_trailer
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x20, x0
	ldr	x22, [x0, #24]
	ldr	x19, [x0, #8]
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x23, #0
	mov	x26, #0
	add	x21, x22, #12
Lloh0:
	adrp	x25, _AVMEDIA_TYPE_VIDEO@GOTPAGE
Lloh1:
	ldr	x25, [x25, _AVMEDIA_TYPE_VIDEO@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x23, x23, #1
	cmp	x23, w8, sxtw
	mov	x26, x24
	b.ge	LBB0_6
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x20, #16]
	ldr	x9, [x9, x23, lsl #3]
	ldr	x24, [x9]
	ldr	x9, [x24]
	ldr	x10, [x25]
	cmp	x9, x10
	b.eq	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x21
	bl	_av_fifo_freep
	ldr	w8, [x20]
	mov	x24, x26
	b	LBB0_2
LBB0_5:
	mov	x24, #0
LBB0_6:
Lloh2:
	adrp	x8, _TAG_END@GOTPAGE
Lloh3:
	ldr	x8, [x8, _TAG_END@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_put_swf_tag
	mov	x0, x20
	bl	_put_swf_end_tag
	ldr	x8, [x20, #8]
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _AVIO_SEEKABLE_NORMAL@GOTPAGE
Lloh6:
	ldr	x9, [x9, _AVIO_SEEKABLE_NORMAL@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	and	w8, w9, w8
	cmp	w8, #0
	ccmp	x24, #0, #4, ne
	b.eq	LBB0_10
; %bb.7:
	mov	x0, x19
	bl	_avio_tell
	mov	x20, x0
Lloh8:
	adrp	x21, _SEEK_SET@GOTPAGE
Lloh9:
	ldr	x21, [x21, _SEEK_SET@GOTPAGEOFF]
	ldr	w2, [x21]
	mov	x0, x19
	mov	w1, #4
	bl	_avio_seek
	mov	x0, x19
	mov	x1, x20
	bl	_avio_wl32
	ldr	w1, [x22]
	ldr	w2, [x21]
	mov	x0, x19
	bl	_avio_seek
	ldr	w1, [x22, #8]
	mov	x0, x19
	bl	_avio_wl16
	ldr	w1, [x22, #4]
	cbz	w1, LBB0_9
; %bb.8:
	ldr	w2, [x21]
	mov	x0, x19
	bl	_avio_seek
	ldr	w1, [x22, #8]
	mov	x0, x19
	bl	_avio_wl16
LBB0_9:
	ldr	w2, [x21]
	mov	x0, x19
	mov	x1, x20
	bl	_avio_seek
LBB0_10:
	mov	w0, #0
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_AVMEDIA_TYPE_VIDEO,8,3         ; @AVMEDIA_TYPE_VIDEO
	.comm	_TAG_END,4,2                    ; @TAG_END
	.comm	_AVIO_SEEKABLE_NORMAL,4,2       ; @AVIO_SEEKABLE_NORMAL
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.no_dead_strip	_swf_write_trailer
.subsections_via_symbols
