	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function aic_decode_frame
_aic_decode_frame:                      ## @aic_decode_frame
	.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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %rbx
	movq	%rdx, -88(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r14
	movq	(%rdi), %r15
	movq	8(%rcx), %r13
	movl	(%rcx), %r12d
	movq	%rsi, -96(%rbp)
	movq	%rsi, 24(%r15)
	movq	_AV_PICTURE_TYPE_I@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%rsi)
	movl	$1, (%rsi)
	movl	(%r15), %edi
	imull	4(%r15), %edi
	movq	_AIC_HDR_SIZE@GOTPCREL(%rip), %rax
	addl	%edi, %edi
	addl	(%rax), %edi
	movl	$4, %esi
	callq	_FFALIGN
	movl	%r12d, %edx
	cmpl	%eax, %r12d
	jge	LBB0_3
## %bb.1:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_av_log
LBB0_2:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_21
LBB0_3:
	movl	%eax, %r12d
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	%r15, %rbx
	movq	%r15, %rdi
	movq	%r13, -80(%rbp)                 ## 8-byte Spill
	movq	%r13, %rsi
	movl	%edx, -60(%rbp)                 ## 4-byte Spill
	callq	_aic_decode_header
	testl	%eax, %eax
	js	LBB0_4
## %bb.5:
	leaq	-96(%rbp), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	xorl	%edx, %edx
	callq	_ff_thread_get_buffer
	testl	%eax, %eax
	js	LBB0_6
## %bb.7:
	movq	_AIC_HDR_SIZE@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%rax,4), %rsi
	movq	%rbx, %r14
	movl	(%rbx), %edx
	imull	4(%rbx), %edx
	addl	%edx, %edx
	leaq	-64(%rbp), %rdi
	callq	_bytestream2_init
	movl	4(%rbx), %ecx
	testl	%ecx, %ecx
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	jle	LBB0_20
## %bb.8:
	movl	8(%r14), %eax
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
LBB0_9:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_12 Depth 2
	testl	%eax, %eax
	jle	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_12:                                ##   Parent Loop BB0_9 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	leaq	-64(%rbp), %rdi
	callq	_bytestream2_get_le16
                                        ## kill: def $eax killed $eax def $rax
	leal	(,%rax,4), %r8d
	leal	(%r12,%rax,4), %r15d
	cmpl	-60(%rbp), %r15d                ## 4-byte Folded Reload
	jg	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=2
	testl	%eax, %eax
	je	LBB0_14
## %bb.15:                              ##   in Loop: Header=BB0_12 Depth=2
	movslq	%r12d, %rax
	leaq	(%rbx,%rax,4), %rcx
	movq	%r14, %rdi
	movl	%r13d, %esi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_aic_decode_slice
	testl	%eax, %eax
	js	LBB0_16
## %bb.17:                              ##   in Loop: Header=BB0_12 Depth=2
	movq	%r14, %rcx
	addl	16(%r14), %r13d
	movl	8(%r14), %eax
	movl	%r15d, %r12d
	cmpl	%eax, %r13d
	jl	LBB0_12
## %bb.18:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	4(%r14), %ecx
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	jmp	LBB0_19
LBB0_10:                                ##   in Loop: Header=BB0_9 Depth=1
	movl	%r12d, %r15d
LBB0_19:                                ##   in Loop: Header=BB0_9 Depth=1
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	incl	%edi
	movl	%r15d, %r12d
	movl	%edi, -44(%rbp)                 ## 4-byte Spill
	cmpl	%ecx, %edi
	jl	LBB0_9
LBB0_20:
	movl	$1, (%rsi)
	movl	(%rdx), %r14d
	jmp	LBB0_21
LBB0_4:
	movl	%eax, %r14d
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_21
LBB0_6:
	movl	%eax, %r14d
	jmp	LBB0_21
LBB0_14:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r8d, %ecx
	movl	%r13d, %r8d
	movl	-44(%rbp), %r9d                 ## 4-byte Reload
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_2
LBB0_16:
	movl	%eax, %r14d
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.3(%rip), %rdx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r13d, %ecx
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	xorl	%eax, %eax
	callq	_av_log
LBB0_21:
	movl	%r14d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_PICTURE_TYPE_I,4,2          ## @AV_PICTURE_TYPE_I
	.comm	_AIC_HDR_SIZE,4,2               ## @AIC_HDR_SIZE
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Too small frame\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
L_.str.1:                               ## @.str.1
	.asciz	"Invalid header\n"

L_.str.2:                               ## @.str.2
	.asciz	"Incorrect slice size %d at %d.%d\n"

L_.str.3:                               ## @.str.3
	.asciz	"Error decoding slice at %d.%d\n"

	.no_dead_strip	_aic_decode_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function aic_decode_frame
_aic_decode_frame:                      ; @aic_decode_frame
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x3
	mov	x25, x2
	mov	x19, x0
	ldr	x22, [x0]
	ldr	x23, [x3, #8]
	ldr	w24, [x3]
	str	x1, [sp, #32]
Lloh0:
	adrp	x8, _AV_PICTURE_TYPE_I@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AV_PICTURE_TYPE_I@GOTPAGEOFF]
	str	x1, [x22, #24]
Lloh2:
	ldr	w8, [x8]
	mov	w9, #1
Lloh3:
	adrp	x26, _AIC_HDR_SIZE@GOTPAGE
Lloh4:
	ldr	x26, [x26, _AIC_HDR_SIZE@GOTPAGEOFF]
	stp	w9, w8, [x1]
	ldr	w8, [x26]
	ldp	w9, w10, [x22]
	mul	w9, w9, w10
	add	w0, w8, w9, lsl #1
	mov	w1, #4
	bl	_FFALIGN
	cmp	w24, w0
	b.ge	LBB0_3
; %bb.1:
Lloh5:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	adrp	x2, l_.str@PAGE
Lloh9:
	add	x2, x2, l_.str@PAGEOFF
LBB0_2:
	mov	x0, x19
	bl	_av_log
Lloh10:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh11:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh12:
	ldr	w27, [x8]
	b	LBB0_20
LBB0_3:
	mov	x21, x0
	mov	x0, x22
	mov	x1, x23
	mov	x2, x24
	bl	_aic_decode_header
	tbnz	w0, #31, LBB0_7
; %bb.4:
	add	x1, sp, #32
	mov	x0, x19
	mov	w2, #0
	bl	_ff_thread_get_buffer
	tbnz	w0, #31, LBB0_8
; %bb.5:
	ldrsw	x8, [x26]
	add	x1, x23, x8, lsl #2
	ldp	w8, w9, [x22]
	mul	w8, w8, w9
	lsl	w2, w8, #1
	add	x0, sp, #44
	bl	_bytestream2_init
	ldr	w9, [x22, #4]
	cmp	w9, #1
	b.lt	LBB0_16
; %bb.6:
	mov	w26, #0
	ldr	w8, [x22, #8]
	str	x25, [sp, #24]                  ; 8-byte Folded Spill
	b	LBB0_11
LBB0_7:
	mov	x27, x0
Lloh13:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh14:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
Lloh16:
	adrp	x2, l_.str.1@PAGE
Lloh17:
	add	x2, x2, l_.str.1@PAGEOFF
	b	LBB0_19
LBB0_8:
	mov	x27, x0
	b	LBB0_20
LBB0_9:                                 ;   in Loop: Header=BB0_11 Depth=1
	ldr	w9, [x22, #4]
	mov	x21, x25
	ldr	x25, [sp, #24]                  ; 8-byte Folded Reload
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	add	w26, w26, #1
	cmp	w26, w9
	b.ge	LBB0_16
LBB0_11:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_13 Depth 2
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	w28, #0
LBB0_13:                                ;   Parent Loop BB0_11 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	x0, sp, #44
	bl	_bytestream2_get_le16
	lsl	w4, w0, #2
	add	w25, w4, w21
	cmp	w25, w24
	ccmp	w0, #0, #4, le
	b.eq	LBB0_17
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=2
	add	x3, x23, w21, sxtw #2
	mov	x0, x22
	mov	x1, x28
	mov	x2, x26
                                        ; kill: def $w4 killed $w4 killed $x4
	bl	_aic_decode_slice
	tbnz	w0, #31, LBB0_18
; %bb.15:                               ;   in Loop: Header=BB0_13 Depth=2
	ldr	w9, [x22, #16]
	ldr	w8, [x22, #8]
	add	w28, w28, w9
	cmp	w28, w8
	mov	x21, x25
	b.lt	LBB0_13
	b	LBB0_9
LBB0_16:
	mov	w8, #1
	str	w8, [x25]
	ldr	w27, [x20]
	b	LBB0_20
LBB0_17:
Lloh18:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh19:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	stp	x28, x26, [sp, #8]
	str	x4, [sp]
Lloh21:
	adrp	x2, l_.str.2@PAGE
Lloh22:
	add	x2, x2, l_.str.2@PAGEOFF
	b	LBB0_2
LBB0_18:
	mov	x27, x0
Lloh23:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh24:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
                                        ; kill: def $w26 killed $w26 killed $x26 def $x26
                                        ; kill: def $w28 killed $w28 killed $x28 def $x28
	stp	x28, x26, [sp]
Lloh26:
	adrp	x2, l_.str.3@PAGE
Lloh27:
	add	x2, x2, l_.str.3@PAGEOFF
LBB0_19:
	mov	x0, x19
	bl	_av_log
LBB0_20:
	mov	x0, x27
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_PICTURE_TYPE_I,4,2          ; @AV_PICTURE_TYPE_I
	.comm	_AIC_HDR_SIZE,4,2               ; @AIC_HDR_SIZE
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Too small frame\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
l_.str.1:                               ; @.str.1
	.asciz	"Invalid header\n"

l_.str.2:                               ; @.str.2
	.asciz	"Incorrect slice size %d at %d.%d\n"

l_.str.3:                               ; @.str.3
	.asciz	"Error decoding slice at %d.%d\n"

	.no_dead_strip	_aic_decode_frame
.subsections_via_symbols
