	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function aiff_write_trailer
_aiff_write_trailer:                    ## @aiff_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), %r12
	movq	8(%rdi), %rax
	movq	16(%rdi), %r14
	movq	(%r14), %rcx
	movq	(%rax,%rcx,8), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	callq	_avio_tell
	movl	%eax, %ebx
	movl	%eax, %r13d
	testb	$1, %bl
	je	LBB0_2
## %bb.1:
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_avio_w8
	movl	%ebx, %r13d
	incl	%r13d
LBB0_2:
	movq	(%r15), %rax
	movq	_AVIO_SEEKABLE_NORMAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_3
## %bb.4:
	movl	8(%r14), %esi
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	callq	_avio_seek
	movl	%ebx, %eax
	subl	12(%r14), %eax
	addl	$-12, %eax
	cltd
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	idivl	(%rcx)
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_avio_wb32
	movl	12(%r14), %esi
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	callq	_avio_seek
	movl	12(%r14), %eax
	subl	%eax, %ebx
	addl	$-4, %ebx
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_avio_wb32
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movl	%r13d, %esi
	callq	_avio_seek
	cmpq	$0, 24(%r14)
	je	LBB0_5
## %bb.6:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_put_id3v2_tags
	movl	%eax, %r15d
	testl	%eax, %eax
	jns	LBB0_7
	jmp	LBB0_8
LBB0_3:
	xorl	%r15d, %r15d
	jmp	LBB0_8
LBB0_5:
	xorl	%r15d, %r15d
LBB0_7:
	movq	%r12, %rdi
	callq	_avio_tell
	movl	%eax, %ebx
	movl	16(%r14), %esi
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	callq	_avio_seek
	subl	16(%r14), %ebx
	addl	$-4, %ebx
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_avio_wb32
	movq	%r12, %rdi
	callq	_avio_flush
LBB0_8:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	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	_aiff_write_trailer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function aiff_write_trailer
_aiff_write_trailer:                    ; @aiff_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	x21, x0
	ldp	x8, x20, [x0, #8]
	ldr	x19, [x0]
	ldr	x9, [x20]
	ldr	x8, [x8, x9, lsl #3]
	ldr	x25, [x8]
	mov	x0, x19
	bl	_avio_tell
	mov	x23, x0
	mov	x22, x0
	tbz	w0, #0, LBB0_2
; %bb.1:
	mov	x0, x19
	mov	w1, #0
	bl	_avio_w8
	add	w22, w23, #1
LBB0_2:
	ldr	x8, [x21]
	ldr	w8, [x8]
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_5
; %bb.3:
	ldr	w1, [x20, #8]
Lloh3:
	adrp	x24, _SEEK_SET@GOTPAGE
Lloh4:
	ldr	x24, [x24, _SEEK_SET@GOTPAGEOFF]
	ldr	w2, [x24]
	mov	x0, x19
	bl	_avio_seek
	ldr	w8, [x20, #12]
	sub	w8, w23, w8
	sub	w8, w8, #12
	ldr	w9, [x25]
	sdiv	w1, w8, w9
	mov	x0, x19
	bl	_avio_wb32
	ldr	w1, [x20, #12]
	ldr	w2, [x24]
	mov	x0, x19
	bl	_avio_seek
	ldr	w8, [x20, #12]
	sub	w8, w23, w8
	sub	w1, w8, #4
	mov	x0, x19
	bl	_avio_wb32
	ldr	w2, [x24]
	mov	x0, x19
	mov	x1, x22
	bl	_avio_seek
	ldr	x8, [x20, #24]
	cbz	x8, LBB0_6
; %bb.4:
	mov	x0, x21
	mov	x1, x20
	bl	_put_id3v2_tags
	mov	x21, x0
	tbz	w0, #31, LBB0_7
	b	LBB0_8
LBB0_5:
	mov	w21, #0
	b	LBB0_8
LBB0_6:
	mov	w21, #0
LBB0_7:
	mov	x0, x19
	bl	_avio_tell
	mov	x22, x0
	ldr	w1, [x20, #16]
	ldr	w2, [x24]
	mov	x0, x19
	bl	_avio_seek
	ldr	w8, [x20, #16]
	sub	w8, w22, w8
	sub	w1, w8, #4
	mov	x0, x19
	bl	_avio_wb32
	mov	x0, x19
	bl	_avio_flush
LBB0_8:
	mov	x0, x21
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_AVIO_SEEKABLE_NORMAL,4,2       ; @AVIO_SEEKABLE_NORMAL
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.no_dead_strip	_aiff_write_trailer
.subsections_via_symbols
