	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function adts_aac_resync
_adts_aac_resync:                       ## @adts_aac_resync
	.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, %r14
	movq	8(%rdi), %rdi
	callq	_avio_r8
	movl	%eax, %ebx
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r14), %rdi
	callq	_avio_feof
	testl	%eax, %eax
	jne	LBB0_5
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	8(%r14), %rdi
	callq	_avio_tell
	cmpq	(%r14), %rax
	jge	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	%ebx, %r15d
	shll	$8, %r15d
	movq	8(%r14), %rdi
	callq	_avio_r8
	movl	%eax, %ebx
	orl	%r15d, %ebx
	movl	%ebx, %eax
	andl	$-16, %eax
	cmpl	$65520, %eax                    ## imm = 0xFFF0
	jne	LBB0_1
## %bb.4:
	movq	8(%r14), %rdi
	movq	_SEEK_CUR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$-2, %esi
	callq	_avio_seek
LBB0_5:
	movq	8(%r14), %rax
	cmpq	$0, (%rax)
	je	LBB0_7
## %bb.6:
	movq	_AVERROR_EOF@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_7:
	andl	$-16, %ebx
	xorl	%eax, %eax
	cmpl	$65520, %ebx                    ## imm = 0xFFF0
	je	LBB0_10
## %bb.8:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %eax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SEEK_CUR,4,2                   ## @SEEK_CUR
	.comm	_AVERROR_EOF,4,2                ## @AVERROR_EOF
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.no_dead_strip	_adts_aac_resync
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function adts_aac_resync
_adts_aac_resync:                       ; @adts_aac_resync
	.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
	mov	x20, x0
	ldr	x0, [x0, #8]
	bl	_avio_r8
	mov	x19, x0
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x20, #8]
	bl	_avio_feof
	cbnz	w0, LBB0_5
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x0, [x20, #8]
	bl	_avio_tell
	ldr	x8, [x20]
	cmp	x0, x8
	b.ge	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x0, [x20, #8]
	bl	_avio_r8
	orr	w19, w0, w19, lsl #8
	lsr	w8, w19, #4
	cmp	w8, #4095
	b.ne	LBB0_1
; %bb.4:
	ldr	x0, [x20, #8]
Lloh0:
	adrp	x8, _SEEK_CUR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SEEK_CUR@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #-2
	bl	_avio_seek
LBB0_5:
	ldr	x8, [x20, #8]
	ldr	x8, [x8]
	cbz	x8, LBB0_7
; %bb.6:
Lloh3:
	adrp	x8, _AVERROR_EOF@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AVERROR_EOF@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	b	LBB0_8
LBB0_7:
Lloh6:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	lsr	w9, w19, #4
	cmp	w9, #4095
	csel	w0, wzr, w8, eq
LBB0_8:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_SEEK_CUR,4,2                   ; @SEEK_CUR
	.comm	_AVERROR_EOF,4,2                ; @AVERROR_EOF
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.no_dead_strip	_adts_aac_resync
.subsections_via_symbols
