	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tak_read_header
_tak_read_header:                       ## @tak_read_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	8(%rdi), %rbx
	movq	16(%rdi), %r14
	xorl	%esi, %esi
	callq	_avformat_new_stream
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	movq	_AVMEDIA_TYPE_AUDIO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	8(%rax), %rdx
	movl	%ecx, 40(%rdx)
	movq	_AV_CODEC_ID_TAK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 36(%rdx)
	movq	_AVSTREAM_PARSE_FULL_RAW@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 24(%rax)
	movl	$0, (%r14)
	movq	%rbx, %rdi
	callq	_avio_rl32
	movq	%rax, %r14
	movl	$116, %edi
	movl	$66, %esi
	movl	$97, %edx
	movl	$75, %ecx
	callq	_MKTAG
	cmpq	%rax, %r14
	jne	LBB0_2
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_avio_feof
	testl	%eax, %eax
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rbx, %rdi
	callq	_avio_r8
	movq	%rbx, %rdi
	callq	_avio_rl24
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_avio_skip
	testl	%eax, %eax
	jns	LBB0_3
	jmp	LBB0_6
LBB0_7:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_2:
	movq	_SEEK_CUR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	$-4, %esi
	callq	_avio_seek
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_5:
	movq	_AVERROR_EOF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_6:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_AVMEDIA_TYPE_AUDIO,4,2         ## @AVMEDIA_TYPE_AUDIO
	.comm	_AV_CODEC_ID_TAK,4,2            ## @AV_CODEC_ID_TAK
	.comm	_AVSTREAM_PARSE_FULL_RAW,4,2    ## @AVSTREAM_PARSE_FULL_RAW
	.comm	_SEEK_CUR,4,2                   ## @SEEK_CUR
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.comm	_AV_INPUT_BUFFER_PADDING_SIZE,4,2 ## @AV_INPUT_BUFFER_PADDING_SIZE
	.comm	_tak_check_crc,4,2              ## @tak_check_crc
	.comm	_EIO,4,2                        ## @EIO
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.comm	_AV_EF_EXPLODE,4,2              ## @AV_EF_EXPLODE
	.comm	_AV_LOG_VERBOSE,4,2             ## @AV_LOG_VERBOSE
	.comm	_AVIO_SEEKABLE_NORMAL,4,2       ## @AVIO_SEEKABLE_NORMAL
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
	.comm	_TAK_LAST_FRAME_POS_BITS,4,2    ## @TAK_LAST_FRAME_POS_BITS
	.comm	_TAK_LAST_FRAME_SIZE_BITS,4,2   ## @TAK_LAST_FRAME_SIZE_BITS
	.comm	_TAK_ENCODER_VERSION_BITS,4,2   ## @TAK_ENCODER_VERSION_BITS
	.comm	_AVERROR_EOF,4,2                ## @AVERROR_EOF
	.no_dead_strip	_tak_read_header
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tak_read_header
_tak_read_header:                       ; @tak_read_header
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldp	x19, x20, [x0, #8]
	mov	w1, #0
	bl	_avformat_new_stream
	cbz	x0, LBB0_4
; %bb.1:
Lloh0:
	adrp	x8, _AVMEDIA_TYPE_AUDIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AVMEDIA_TYPE_AUDIO@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	x9, [x0, #8]
Lloh3:
	adrp	x10, _AV_CODEC_ID_TAK@GOTPAGE
Lloh4:
	ldr	x10, [x10, _AV_CODEC_ID_TAK@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	stp	w10, w8, [x9, #36]
Lloh6:
	adrp	x8, _AVSTREAM_PARSE_FULL_RAW@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AVSTREAM_PARSE_FULL_RAW@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [x0, #24]
	str	wzr, [x20]
	mov	x0, x19
	bl	_avio_rl32
	mov	x20, x0
	mov	w0, #116
	mov	w1, #66
	mov	w2, #97
	mov	w3, #75
	bl	_MKTAG
	cmp	x20, x0
	b.ne	LBB0_5
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_avio_feof
	cbnz	w0, LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x19
	bl	_avio_r8
	mov	x0, x19
	bl	_avio_rl24
	mov	x1, x0
	mov	x0, x19
	bl	_avio_skip
	tbz	w0, #31, LBB0_2
	b	LBB0_7
LBB0_4:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_AVERROR
LBB0_5:
Lloh12:
	adrp	x8, _SEEK_CUR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SEEK_CUR@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #-4
	bl	_avio_seek
	mov	w0, #0
	b	LBB0_7
LBB0_6:
Lloh15:
	adrp	x8, _AVERROR_EOF@GOTPAGE
Lloh16:
	ldr	x8, [x8, _AVERROR_EOF@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
LBB0_7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_AVMEDIA_TYPE_AUDIO,4,2         ; @AVMEDIA_TYPE_AUDIO
	.comm	_AV_CODEC_ID_TAK,4,2            ; @AV_CODEC_ID_TAK
	.comm	_AVSTREAM_PARSE_FULL_RAW,4,2    ; @AVSTREAM_PARSE_FULL_RAW
	.comm	_SEEK_CUR,4,2                   ; @SEEK_CUR
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_AV_INPUT_BUFFER_PADDING_SIZE,4,2 ; @AV_INPUT_BUFFER_PADDING_SIZE
	.comm	_tak_check_crc,4,2              ; @tak_check_crc
	.comm	_EIO,4,2                        ; @EIO
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.comm	_AV_EF_EXPLODE,4,2              ; @AV_EF_EXPLODE
	.comm	_AV_LOG_VERBOSE,4,2             ; @AV_LOG_VERBOSE
	.comm	_AVIO_SEEKABLE_NORMAL,4,2       ; @AVIO_SEEKABLE_NORMAL
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.comm	_TAK_LAST_FRAME_POS_BITS,4,2    ; @TAK_LAST_FRAME_POS_BITS
	.comm	_TAK_LAST_FRAME_SIZE_BITS,4,2   ; @TAK_LAST_FRAME_SIZE_BITS
	.comm	_TAK_ENCODER_VERSION_BITS,4,2   ; @TAK_ENCODER_VERSION_BITS
	.comm	_AVERROR_EOF,4,2                ; @AVERROR_EOF
	.no_dead_strip	_tak_read_header
.subsections_via_symbols
