	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function ivi_init_tiles
LCPI0_0:
	.space	16
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_ivi_init_tiles:                        ## @ivi_init_tiles
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, -48(%rbp)                 ## 4-byte Spill
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movl	(%rdi), %eax
	testl	%eax, %eax
	jle	LBB0_12
## %bb.1:
	movq	%rdi, %rbx
	movq	16(%rdi), %r14
	orl	%edx, %ecx
	movl	4(%rdi), %edi
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	movl	%r9d, -52(%rbp)                 ## 4-byte Spill
	movl	%ecx, -56(%rbp)                 ## 4-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	(%rbx), %eax
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	addl	-48(%rbp), %edx                 ## 4-byte Folded Reload
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	cmpl	%eax, %edx
	jge	LBB0_12
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	testl	%edi, %edi
	jle	LBB0_11
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%r12d, %r12d
	xorl	%r15d, %r15d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_4 Depth=2
	addq	$72, %r14
	movl	-52(%rbp), %r9d                 ## 4-byte Reload
	addl	%r9d, %r15d
	movq	%r13, %rbx
	movl	4(%r13), %edi
	subl	%r9d, %r12d
	cmpl	%r15d, %edi
	jle	LBB0_10
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%r15d, (%r14)
	movl	-44(%rbp), %r13d                ## 4-byte Reload
	movl	%r13d, 4(%r14)
	movl	8(%rbx), %eax
	movl	%eax, 64(%r14)
	addl	%r12d, %edi
	movl	%r9d, %esi
	callq	_FFMIN
	movq	%rax, 40(%r14)
	movl	(%rbx), %edi
	subl	%r13d, %edi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	callq	_FFMIN
	movq	%rax, 32(%r14)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 48(%r14)
	movq	40(%r14), %rdi
	movq	%rbx, %r13
	movl	8(%rbx), %edx
	movq	%rax, %rsi
	callq	_IVI_MBs_PER_TILE
	movq	%rax, 8(%r14)
	leaq	16(%r14), %rdi
	callq	_av_freep
	movq	8(%r14), %rdi
	movl	$4, %esi
	callq	_av_mallocz_array
	movq	%rax, 16(%r14)
	testq	%rax, %rax
	je	LBB0_14
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=2
	movq	$0, 24(%r14)
	movl	-56(%rbp), %ecx                 ## 4-byte Reload
	testl	%ecx, %ecx
	je	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=2
	movq	8(%r14), %rax
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	cmpq	8(%rdx), %rax
	jne	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=2
	movq	16(%rdx), %rax
	movq	%rax, 24(%r14)
	addq	$72, %rdx
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_9
LBB0_12:
	xorl	%eax, %eax
	jmp	LBB0_13
LBB0_14:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_7:
	movq	_AV_LOG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	xorl	%edi, %edi
	callq	_av_log
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_13:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_AV_LOG_DEBUG,4,2               ## @AV_LOG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ref_tile mismatch\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.no_dead_strip	_ivi_init_tiles
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ivi_init_tiles
_ivi_init_tiles:                        ; @ivi_init_tiles
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	ldr	w9, [x0]
	cmp	w9, #1
	b.lt	LBB0_11
; %bb.1:
	mov	x19, x5
	mov	x20, x4
	mov	x21, x1
	mov	x22, x0
	mov	w23, #0
	ldr	x24, [x0, #16]
	orr	w25, w3, w2
	ldr	w8, [x0, #4]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w9, [x22]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	w23, w23, w20
	cmp	w23, w9
	b.ge	LBB0_11
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w26, #0
	mov	w27, #0
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=2
	add	x24, x24, #72
	ldr	w8, [x22, #4]
	sub	w26, w26, w19
	add	w27, w27, w19
	cmp	w8, w27
	b.le	LBB0_2
LBB0_7:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	stp	w27, w23, [x24]
	ldr	w9, [x22, #8]
	str	w9, [x24, #64]
	add	w0, w8, w26
	mov	x1, x19
	bl	_FFMIN
	str	x0, [x24, #40]
	ldr	w8, [x22]
	sub	w0, w8, w23
	mov	x1, x20
	bl	_FFMIN
	mov	x1, x0
	str	x0, [x24, #32]
	stp	xzr, xzr, [x24, #48]
	ldr	x0, [x24, #40]
	ldr	w2, [x22, #8]
	bl	_IVI_MBs_PER_TILE
	str	x0, [x24, #8]
	add	x0, x24, #16
	bl	_av_freep
	ldr	x0, [x24, #8]
	mov	w1, #4
	bl	_av_mallocz_array
	str	x0, [x24, #16]
	cbz	x0, LBB0_12
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=2
	str	xzr, [x24, #24]
	cbz	w25, LBB0_6
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=2
	ldr	x8, [x24, #8]
	ldr	x9, [x21, #8]
	cmp	x8, x9
	b.ne	LBB0_13
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=2
	ldr	x8, [x21, #16]
	str	x8, [x24, #24]
	add	x21, x21, #72
	b	LBB0_6
LBB0_11:
	mov	w0, #0
	b	LBB0_14
LBB0_12:
Lloh0:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_AVERROR
LBB0_13:
Lloh3:
	adrp	x8, _AV_LOG_DEBUG@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AV_LOG_DEBUG@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, #0
	bl	_av_log
Lloh8:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh9:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
LBB0_14:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_AV_LOG_DEBUG,4,2               ; @AV_LOG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ref_tile mismatch\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.no_dead_strip	_ivi_init_tiles
.subsections_via_symbols
