	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function adts_aac_read_header
_adts_aac_read_header:                  ## @adts_aac_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	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	xorl	%esi, %esi
	callq	_avformat_new_stream
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	movq	%rax, %r14
	movq	_AVMEDIA_TYPE_AUDIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	8(%r14), %rcx
	movl	%eax, 4(%rcx)
	movq	16(%rbx), %rax
	movl	(%rax), %eax
	movl	%eax, (%rcx)
	movq	_AVSTREAM_PARSE_FULL_RAW@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r14)
	movq	%rbx, %rdi
	callq	_ff_id3v1_read
	movq	(%rbx), %rax
	movq	_AVIO_SEEKABLE_NORMAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_4
## %bb.2:
	movl	8(%rbx), %edi
	movq	_AV_DICT_IGNORE_SUFFIX@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	L_.str(%rip), %rsi
	xorl	%edx, %edx
	callq	_av_dict_get
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	movq	(%rbx), %rdi
	callq	_avio_tell
	movl	%eax, %r15d
	movq	%rbx, %rdi
	callq	_ff_ape_parse_tag
	movq	(%rbx), %rdi
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r15d, %esi
	callq	_avio_seek
LBB0_4:
	movq	%rbx, %rdi
	callq	_adts_aac_resync
	testl	%eax, %eax
	js	LBB0_6
## %bb.5:
	movq	%r14, %rdi
	movl	$64, %esi
	movl	$1, %edx
	movl	$28224000, %ecx                 ## imm = 0x1AEAA00
	callq	_avpriv_set_pts_info
	xorl	%eax, %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_AVMEDIA_TYPE_AUDIO,4,2         ## @AVMEDIA_TYPE_AUDIO
	.comm	_AVSTREAM_PARSE_FULL_RAW,4,2    ## @AVSTREAM_PARSE_FULL_RAW
	.comm	_AVIO_SEEKABLE_NORMAL,4,2       ## @AVIO_SEEKABLE_NORMAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.space	1

	.comm	_AV_DICT_IGNORE_SUFFIX,4,2      ## @AV_DICT_IGNORE_SUFFIX
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
	.no_dead_strip	_adts_aac_read_header
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function adts_aac_read_header
_adts_aac_read_header:                  ; @adts_aac_read_header
	.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
	mov	x20, x0
	mov	x1, #0
	bl	_avformat_new_stream
	cbz	x0, LBB0_7
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x8, _AVMEDIA_TYPE_AUDIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AVMEDIA_TYPE_AUDIO@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	x9, [x0, #8]
	ldr	x10, [x20, #16]
	ldr	w10, [x10]
	stp	w10, w8, [x9]
Lloh3:
	adrp	x8, _AVSTREAM_PARSE_FULL_RAW@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AVSTREAM_PARSE_FULL_RAW@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x0]
	mov	x0, x20
	bl	_ff_id3v1_read
	ldr	x8, [x20]
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _AVIO_SEEKABLE_NORMAL@GOTPAGE
Lloh7:
	ldr	x9, [x9, _AVIO_SEEKABLE_NORMAL@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.2:
	ldr	w0, [x20, #8]
Lloh9:
	adrp	x8, _AV_DICT_IGNORE_SUFFIX@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AV_DICT_IGNORE_SUFFIX@GOTPAGEOFF]
Lloh11:
	ldr	w3, [x8]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, #0
	bl	_av_dict_get
	cbnz	w0, LBB0_4
; %bb.3:
	ldr	x0, [x20]
	bl	_avio_tell
	mov	x21, x0
	mov	x0, x20
	bl	_ff_ape_parse_tag
	ldr	x0, [x20]
Lloh14:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh15:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	mov	x1, x21
	bl	_avio_seek
LBB0_4:
	mov	x0, x20
	bl	_adts_aac_resync
	tbnz	w0, #31, LBB0_6
; %bb.5:
	mov	x0, x19
	mov	w1, #64
	mov	w2, #1
	mov	w3, #43520
	movk	w3, #430, lsl #16
	bl	_avpriv_set_pts_info
	mov	w0, #0
LBB0_6:
	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
LBB0_7:
Lloh17:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	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
	b	_AVERROR
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_AVMEDIA_TYPE_AUDIO,4,2         ; @AVMEDIA_TYPE_AUDIO
	.comm	_AVSTREAM_PARSE_FULL_RAW,4,2    ; @AVSTREAM_PARSE_FULL_RAW
	.comm	_AVIO_SEEKABLE_NORMAL,4,2       ; @AVIO_SEEKABLE_NORMAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.space	1

	.comm	_AV_DICT_IGNORE_SUFFIX,4,2      ; @AV_DICT_IGNORE_SUFFIX
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.no_dead_strip	_adts_aac_read_header
.subsections_via_symbols
