	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tta_write_header
_tta_write_header:                      ## @tta_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	8(%rdi), %rax
	movq	16(%rdi), %r14
	movq	(%rax), %rax
	movq	(%rax), %r15
	movq	%r14, %rdi
	callq	_avio_open_dyn_buf
	testl	%eax, %eax
	js	LBB0_5
## %bb.1:
	movl	(%rbx), %edi
	movq	_ff_crcEDB88320_update@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	_UINT32_MAX@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	callq	_ffio_init_checksum
	movl	(%r14), %edi
	movl	(%r12), %esi
	movl	(%r13), %edx
	callq	_ffio_init_checksum
	movl	(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	movl	$4, %edx
	callq	_avio_write
	movl	(%rbx), %r14d
	movq	16(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.3:
	addq	$4, %rdi
	callq	_AV_RL16
	movl	%eax, %esi
	jmp	LBB0_4
LBB0_2:
	movl	$1, %esi
LBB0_4:
	movl	%r14d, %edi
	callq	_avio_wl16
	movl	(%rbx), %edi
	movl	(%r15), %esi
	callq	_avio_wl16
	movl	(%rbx), %edi
	movl	4(%r15), %esi
	callq	_avio_wl16
	movl	(%rbx), %edi
	movl	8(%r15), %esi
	callq	_avio_wl32
	xorl	%eax, %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ff_crcEDB88320_update,4,2      ## @ff_crcEDB88320_update
	.comm	_UINT32_MAX,4,2                 ## @UINT32_MAX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"TTA1"

	.no_dead_strip	_tta_write_header
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tta_write_header
_tta_write_header:                      ; @tta_write_header
	.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	x19, x0
	ldp	x8, x20, [x0, #8]
	ldr	x8, [x8]
	ldr	x21, [x8]
	mov	x0, x20
	bl	_avio_open_dyn_buf
	tbnz	w0, #31, LBB0_5
; %bb.1:
	ldr	w0, [x19]
Lloh0:
	adrp	x22, _ff_crcEDB88320_update@GOTPAGE
Lloh1:
	ldr	x22, [x22, _ff_crcEDB88320_update@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh2:
	adrp	x23, _UINT32_MAX@GOTPAGE
Lloh3:
	ldr	x23, [x23, _UINT32_MAX@GOTPAGEOFF]
	ldr	w2, [x23]
	bl	_ffio_init_checksum
	ldr	w0, [x20]
	ldr	w1, [x22]
	ldr	w2, [x23]
	bl	_ffio_init_checksum
	ldr	w0, [x19]
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	mov	w2, #4
	bl	_avio_write
	ldr	w20, [x19]
	ldr	x8, [x21, #16]
	cbz	x8, LBB0_3
; %bb.2:
	add	x0, x8, #4
	bl	_AV_RL16
	mov	x1, x0
	b	LBB0_4
LBB0_3:
	mov	w1, #1
LBB0_4:
	mov	x0, x20
	bl	_avio_wl16
	ldr	w0, [x19]
	ldr	w1, [x21]
	bl	_avio_wl16
	ldr	w0, [x19]
	ldr	w1, [x21, #4]
	bl	_avio_wl16
	ldr	w0, [x19]
	ldr	w1, [x21, #8]
	bl	_avio_wl32
	mov	w0, #0
LBB0_5:
	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 AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_ff_crcEDB88320_update,4,2      ; @ff_crcEDB88320_update
	.comm	_UINT32_MAX,4,2                 ; @UINT32_MAX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"TTA1"

	.no_dead_strip	_tta_write_header
.subsections_via_symbols
