	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gxf_write_trailer
_gxf_write_trailer:                     ## @gxf_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	(%rdi), %rbx
	movq	8(%rdi), %r14
	callq	_ff_audio_interleave_close
	movq	%rbx, %rdi
	callq	_gxf_write_eos_packet
	movq	%rbx, %rdi
	callq	_avio_tell
	movl	%eax, %r12d
	movq	_SEEK_SET@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_avio_seek
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_gxf_write_map_packet
	testl	%eax, %eax
	js	LBB0_6
## %bb.1:
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	movq	%r15, %rdi
	callq	_gxf_write_flt_packet
	movq	%r15, %rdi
	callq	_gxf_write_umf_packet
	movq	%rbx, %rdi
	callq	_avio_flush
	cmpl	$2, (%r14)
	jl	LBB0_5
## %bb.2:
	movl	$1, %r12d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r14), %rax
	movl	(%rax,%r12,4), %esi
	movl	(%r13), %edx
	movq	%rbx, %rdi
	callq	_avio_seek
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_gxf_write_map_packet
	testl	%eax, %eax
	js	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rbx, %rdi
	callq	_avio_flush
	incq	%r12
	movslq	(%r14), %rax
	cmpq	%rax, %r12
	jl	LBB0_3
LBB0_5:
	movl	(%r13), %edx
	movq	%rbx, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_avio_seek
	leaq	16(%r14), %rdi
	callq	_av_freep
	addq	$8, %r14
	movq	%r14, %rdi
	callq	_av_freep
	xorl	%eax, %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
	.no_dead_strip	_gxf_write_trailer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gxf_write_trailer
_gxf_write_trailer:                     ; @gxf_write_trailer
	.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	x20, x0
	ldp	x19, x22, [x0]
	bl	_ff_audio_interleave_close
	mov	x0, x19
	bl	_gxf_write_eos_packet
	mov	x0, x19
	bl	_avio_tell
	mov	x21, x0
Lloh0:
	adrp	x23, _SEEK_SET@GOTPAGE
Lloh1:
	ldr	x23, [x23, _SEEK_SET@GOTPAGEOFF]
	ldr	w2, [x23]
	mov	x0, x19
	mov	w1, #0
	bl	_avio_seek
	mov	x0, x20
	mov	w1, #1
	bl	_gxf_write_map_packet
	tbnz	w0, #31, LBB0_6
; %bb.1:
	mov	x0, x20
	bl	_gxf_write_flt_packet
	mov	x0, x20
	bl	_gxf_write_umf_packet
	mov	x0, x19
	bl	_avio_flush
	ldr	w8, [x22]
	cmp	w8, #2
	b.lt	LBB0_5
; %bb.2:
	mov	w24, #1
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22, #8]
	ldr	w1, [x8, x24, lsl #2]
	ldr	w2, [x23]
	mov	x0, x19
	bl	_avio_seek
	mov	x0, x20
	mov	w1, #1
	bl	_gxf_write_map_packet
	tbnz	w0, #31, LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	bl	_avio_flush
	add	x24, x24, #1
	ldrsw	x8, [x22]
	cmp	x24, x8
	b.lt	LBB0_3
LBB0_5:
	ldr	w2, [x23]
	mov	x0, x19
	mov	x1, x21
	bl	_avio_seek
	add	x0, x22, #16
	bl	_av_freep
	add	x0, x22, #8
	bl	_av_freep
	mov	w0, #0
LBB0_6:
	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 AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.no_dead_strip	_gxf_write_trailer
.subsections_via_symbols
