	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rm_write_trailer
_rm_write_trailer:                      ## @rm_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	8(%rdi), %rbx
	movq	_AVIO_SEEKABLE_NORMAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_10
## %bb.1:
	movq	%rdi, %r15
	movq	16(%rdi), %r12
	movq	%rbx, %rdi
	callq	_avio_tell
	movl	%eax, %r14d
	subl	(%r12), %r14d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_avio_wb32
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_avio_wb32
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_avio_seek
	movl	(%r15), %edx
	testl	%edx, %edx
	jle	LBB0_9
## %bb.2:
	movq	8(%r12), %rcx
	leaq	-1(%rdx), %rsi
	movl	%edx, %eax
	andl	$3, %eax
	cmpq	$3, %rsi
	jae	LBB0_4
## %bb.3:
	xorl	%esi, %esi
	jmp	LBB0_6
LBB0_10:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_avio_wb32
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_avio_wb32
	jmp	LBB0_11
LBB0_4:
	andl	$-4, %edx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rcx,%rsi,8), %edi
	movl	8(%rcx,%rsi,8), %ebx
	movl	%edi, 4(%rcx,%rsi,8)
	movl	%ebx, 12(%rcx,%rsi,8)
	movl	16(%rcx,%rsi,8), %edi
	movl	%edi, 20(%rcx,%rsi,8)
	movl	24(%rcx,%rsi,8), %edi
	movl	%edi, 28(%rcx,%rsi,8)
	addq	$4, %rsi
	cmpq	%rsi, %rdx
	jne	LBB0_5
LBB0_6:
	testq	%rax, %rax
	je	LBB0_9
## %bb.7:
	leaq	(%rcx,%rsi,8), %rcx
	addq	$4, %rcx
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movl	-4(%rcx,%rdx,8), %esi
	movl	%esi, (%rcx,%rdx,8)
	incq	%rdx
	cmpq	%rdx, %rax
	jne	LBB0_8
LBB0_9:
	movq	%r15, %rdi
	movl	%r14d, %esi
	xorl	%edx, %edx
	callq	_rv10_write_header
LBB0_11:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AVIO_SEEKABLE_NORMAL,4,2       ## @AVIO_SEEKABLE_NORMAL
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
	.no_dead_strip	_rm_write_trailer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rm_write_trailer
_rm_write_trailer:                      ; @rm_write_trailer
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	ldr	x21, [x0, #8]
	ldr	w8, [x21]
Lloh0:
	adrp	x9, _AVIO_SEEKABLE_NORMAL@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AVIO_SEEKABLE_NORMAL@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.1:
	mov	x19, x0
	ldr	x22, [x0, #16]
	mov	x0, x21
	bl	_avio_tell
	ldr	w8, [x22]
	sub	w20, w0, w8
	mov	x0, x21
	mov	w1, #0
	bl	_avio_wb32
	mov	x0, x21
	mov	w1, #0
	bl	_avio_wb32
Lloh3:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x21
	mov	w1, #0
	bl	_avio_seek
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.2:
	ldr	x9, [x22, #8]
	cmp	w8, #4
	b.hs	LBB0_5
; %bb.3:
	mov	x10, #0
	b	LBB0_8
LBB0_4:
	mov	x0, x21
	mov	w1, #0
	bl	_avio_wb32
	mov	x0, x21
	mov	w1, #0
	bl	_avio_wb32
	b	LBB0_11
LBB0_5:
	and	x10, x8, #0xfffffffc
	add	x11, x9, #16
	mov	x12, x10
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldur	w13, [x11, #-16]
	ldur	w14, [x11, #-8]
	ldr	w15, [x11]
	ldr	w16, [x11, #8]
	stur	w13, [x11, #-12]
	stur	w14, [x11, #-4]
	str	w15, [x11, #4]
	str	w16, [x11, #12]
	add	x11, x11, #32
	subs	x12, x12, #4
	b.ne	LBB0_6
; %bb.7:
	cmp	x10, x8
	b.eq	LBB0_10
LBB0_8:
	add	x9, x9, x10, lsl #3
	add	x9, x9, #4
	sub	x8, x8, x10
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldur	w10, [x9, #-4]
	str	w10, [x9], #8
	subs	x8, x8, #1
	b.ne	LBB0_9
LBB0_10:
	mov	x0, x19
	mov	x1, x20
	mov	w2, #0
	bl	_rv10_write_header
LBB0_11:
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_AVIO_SEEKABLE_NORMAL,4,2       ; @AVIO_SEEKABLE_NORMAL
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.no_dead_strip	_rm_write_trailer
.subsections_via_symbols
