	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function choose_tiling
_choose_tiling:                         ## @choose_tiling
	.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
	movq	%rsi, %r14
	movq	%rdi, %r12
	movq	8(%rdi), %r13
	movl	(%r13), %ecx
	testl	%ecx, %ecx
	js	LBB0_2
## %bb.1:
	movl	$1, %eax
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %eax
	movl	%eax, 4(%r13)
LBB0_2:
	movl	8(%r13), %ecx
	testl	%ecx, %ecx
	js	LBB0_4
## %bb.3:
	movl	$1, %eax
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %eax
	movl	%eax, 12(%r13)
LBB0_4:
	movl	4(%r13), %eax
	testl	%eax, %eax
	jne	LBB0_7
## %bb.5:
	movl	(%r12), %eax
	movq	_AV1_MAX_TILE_WIDTH@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	addl	%ecx, %eax
	decl	%eax
	cltd
	idivl	%ecx
	movl	%eax, 4(%r13)
	cmpl	$2, %eax
	jl	LBB0_7
## %bb.6:
	movq	_AV_LOG_DEBUG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r12, %rdi
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_av_log
	movl	4(%r13), %eax
LBB0_7:
	xorl	%edi, %edi
	testl	%eax, %eax
	setg	%dil
	callq	_av_assert0
	movl	12(%r13), %eax
	testl	%eax, %eax
	jne	LBB0_10
## %bb.8:
	movl	(%r12), %edi
	movl	$128, %esi
	callq	_FFALIGN
                                        ## kill: def $eax killed $eax def $rax
	movl	4(%r13), %ecx
	addl	%ecx, %eax
	decl	%eax
	cltd
	idivl	%ecx
	movl	%eax, %edi
	movl	$128, %esi
	callq	_FFALIGN
	movl	%eax, %ebx
	movl	4(%r12), %edi
	movl	$128, %esi
	callq	_FFALIGN
                                        ## kill: def $eax killed $eax def $rax
	imull	%ebx, %eax
	movq	_AV1_MAX_TILE_AREA@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	addl	%ecx, %eax
	decl	%eax
	cltd
	idivl	%ecx
	movl	%eax, 12(%r13)
	cmpl	$2, %eax
	jl	LBB0_10
## %bb.9:
	movq	_AV_LOG_DEBUG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r12, %rdi
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_av_log
	movl	12(%r13), %eax
LBB0_10:
	xorl	%edi, %edi
	testl	%eax, %eax
	setg	%dil
	callq	_av_assert0
	movl	(%r12), %esi
	leal	63(%rsi), %eax
	leal	126(%rsi), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$6, %ecx
	movl	4(%r13), %edi
	cmpl	%edi, %ecx
	jl	LBB0_12
## %bb.11:
	movl	4(%r12), %ebx
	leal	63(%rbx), %eax
	leal	126(%rbx), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$6, %ecx
	movl	12(%r13), %r9d
	cmpl	%r9d, %ecx
	jge	LBB0_14
LBB0_12:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_av_log
LBB0_13:
	movq	_EINVAL@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_14:
	movq	_AV1_MAX_TILE_COLS@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_AV1_MAX_TILE_ROWS@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	cmpl	%ecx, %edi
	jg	LBB0_16
## %bb.15:
	cmpl	%r8d, %r9d
	jg	LBB0_16
## %bb.17:
	movl	%esi, %eax
	cltd
	idivl	%edi
	movq	_AV1_MAX_TILE_WIDTH@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	%ecx, %eax
	jle	LBB0_19
## %bb.18:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.4(%rip), %rdx
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_13
LBB0_16:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.3(%rip), %rdx
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_13
LBB0_19:
	movq	_AOM_SUPERBLOCK_SIZE_DYNAMIC@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 24(%r13)
	cmpl	$1, %edi
	jne	LBB0_22
## %bb.20:
	cmpl	$1, %r9d
	jne	LBB0_22
## %bb.21:
	movq	_AV_LOG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.5(%rip), %rdx
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_48
LBB0_22:
	leal	127(%rsi), %eax
	addl	$254, %esi
	testl	%eax, %eax
	cmovnsl	%eax, %esi
	sarl	$7, %esi
	xorl	%edx, %edx
	movl	$0, %eax
	cmpl	%edi, %esi
	jl	LBB0_24
## %bb.23:
	leal	127(%rbx), %eax
	addl	$254, %ebx
	testl	%eax, %eax
	cmovnsl	%eax, %ebx
	sarl	$7, %ebx
	cmpl	%r9d, %ebx
	setge	%al
LBB0_24:
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	cmpl	$1, %edi
	je	LBB0_26
## %bb.25:
	decl	%edi
	callq	_av_log2
	movq	%rax, %rdx
	incl	%edx
	movl	12(%r13), %r9d
LBB0_26:
	movl	%edx, (%r13)
	xorl	%eax, %eax
	cmpl	$1, %r9d
	je	LBB0_28
## %bb.27:
	decl	%r9d
	movl	%r9d, %edi
	callq	_av_log2
	incl	%eax
	movl	(%r13), %edx
LBB0_28:
	movl	%eax, 8(%r13)
	movl	(%r12), %edi
	movl	$64, %esi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_count_uniform_tiling
	movl	%eax, %ebx
	movl	4(%r12), %edi
	movl	8(%r13), %edx
	movl	$64, %esi
	callq	_count_uniform_tiling
	movl	%eax, %r15d
	movq	_AV_LOG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.6(%rip), %rdx
	movq	%r12, %rdi
	movl	%ebx, %ecx
	movl	%r15d, %r8d
	xorl	%eax, %eax
	callq	_av_log
	cmpl	4(%r13), %ebx
	jne	LBB0_33
## %bb.29:
	movl	12(%r13), %ebx
	cmpl	%ebx, %r15d
	sete	%al
	cmpb	$0, -44(%rbp)                   ## 1-byte Folded Reload
	jne	LBB0_35
## %bb.30:
	movq	_AV_LOG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.8(%rip), %rdx
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_av_log
	movl	$1, 16(%r13)
	cmpl	%ebx, %r15d
	jne	LBB0_50
## %bb.31:
	movq	_AV_LOG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r13), %ecx
	movl	8(%r13), %r8d
	leaq	L_.str.10(%rip), %rdx
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_av_log
	movq	_AOM_SUPERBLOCK_SIZE_64X64@GOTPCREL(%rip), %rax
	jmp	LBB0_32
LBB0_33:
	cmpb	$0, -44(%rbp)                   ## 1-byte Folded Reload
	je	LBB0_49
## %bb.34:
	xorl	%eax, %eax
LBB0_35:
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	(%r12), %edi
	movl	(%r13), %edx
	movl	$128, %r15d
	movl	$128, %esi
	callq	_count_uniform_tiling
	movl	%eax, %ebx
	movl	4(%r12), %edi
	movl	8(%r13), %edx
	movl	$128, %esi
	callq	_count_uniform_tiling
	movl	%eax, %r8d
	movq	_AV_LOG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.7(%rip), %rdx
	movq	%r12, %rdi
	movl	%ebx, %ecx
	movl	%r8d, -48(%rbp)                 ## 4-byte Spill
	xorl	%eax, %eax
	callq	_av_log
	movl	4(%r13), %r9d
	cmpl	%r9d, %ebx
	jne	LBB0_36
## %bb.37:
	movl	12(%r13), %eax
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	cmpl	%eax, %esi
	sete	%cl
	movl	$1, 16(%r13)
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	andb	%cl, %dl
	cmpb	$1, %dl
	jne	LBB0_39
## %bb.38:
	movq	_AV_LOG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r13), %ecx
	movl	8(%r13), %r8d
	leaq	L_.str.9(%rip), %rdx
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_48
LBB0_49:
	movq	_AV_LOG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.8(%rip), %rdx
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_av_log
	movl	$1, 16(%r13)
LBB0_50:
	movl	4(%r13), %r9d
	movq	_AOM_SUPERBLOCK_SIZE_64X64@GOTPCREL(%rip), %rax
	movl	$64, %r15d
	jmp	LBB0_41
LBB0_36:
	movl	$1, 16(%r13)
	movq	_AOM_SUPERBLOCK_SIZE_128X128@GOTPCREL(%rip), %rax
	jmp	LBB0_41
LBB0_39:
	cmpl	%eax, %esi
	jne	LBB0_40
## %bb.51:
	movq	_AV_LOG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r13), %ecx
	movl	8(%r13), %r8d
	leaq	L_.str.11(%rip), %rdx
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_av_log
	movq	_AOM_SUPERBLOCK_SIZE_128X128@GOTPCREL(%rip), %rax
LBB0_32:
	movq	(%rax), %rax
	movq	%rax, 24(%r13)
	jmp	LBB0_48
LBB0_40:
	movq	_AOM_SUPERBLOCK_SIZE_128X128@GOTPCREL(%rip), %rax
	movl	%ebx, %r9d
LBB0_41:
	movl	$0, 16(%r13)
	movq	(%rax), %rax
	movq	%rax, 24(%r13)
	movq	_AV_LOG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	12(%r13), %eax
	movl	%eax, (%rsp)
	leaq	L_.str.12(%rip), %rdx
	movq	%r12, %rdi
	movl	%r15d, %ecx
	movl	%r15d, %r8d
	xorl	%eax, %eax
	callq	_av_log
	movl	4(%r13), %ebx
	movl	%ebx, (%r14)
	movl	12(%r13), %edi
	movl	%edi, 4(%r14)
	leal	-1(%r15), %ecx
	movl	(%r12), %eax
	addl	%ecx, %eax
	cltd
	idivl	%r15d
	movl	%eax, %esi
	addl	4(%r12), %ecx
	movl	%ecx, %eax
	cltd
	idivl	%r15d
	movl	%eax, %r8d
	movl	%esi, %eax
	cltd
	idivl	%ebx
                                        ## kill: def $edx killed $edx def $rdx
	testl	%ebx, %ebx
	jle	LBB0_45
## %bb.42:
	movl	%edx, %ecx
	shrl	$31, %ecx
	addl	%edx, %ecx
	sarl	%ecx
	movl	%edx, %esi
	incl	%esi
	shrl	$31, %esi
	addl	%edx, %esi
	incl	%esi
	sarl	%esi
	notl	%esi
	movq	8(%r14), %r9
	movslq	%ecx, %rdi
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_43:                                ## =>This Inner Loop Header: Depth=1
	cmpq	%rdi, %rcx
	setl	%dl
	addl	%esi, %ebx
	movslq	%ebx, %rbx
	cmpq	%rbx, %rcx
	setg	%bl
	orb	%dl, %bl
	movzbl	%bl, %edx
	addl	%eax, %edx
	movl	%edx, (%r9,%rcx,4)
	incq	%rcx
	movslq	4(%r13), %rbx
	cmpq	%rbx, %rcx
	jl	LBB0_43
## %bb.44:
	movl	12(%r13), %edi
LBB0_45:
	movl	%r8d, %eax
	cltd
	idivl	%edi
                                        ## kill: def $edx killed $edx def $rdx
	testl	%edi, %edi
	jle	LBB0_48
## %bb.46:
	movl	%edx, %ebx
	shrl	$31, %ebx
	addl	%edx, %ebx
	sarl	%ebx
	movl	%edx, %ecx
	incl	%ecx
	shrl	$31, %ecx
	leal	(%rdx,%rcx), %esi
	incl	%esi
	sarl	%esi
	notl	%esi
	movq	16(%r14), %r8
	movslq	%ebx, %r9
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_47:                                ## =>This Inner Loop Header: Depth=1
	cmpq	%r9, %rbx
	setl	%dl
	addl	%esi, %edi
	movslq	%edi, %rdi
	cmpq	%rdi, %rbx
	setg	%cl
	orb	%dl, %cl
	movzbl	%cl, %ecx
	addl	%eax, %ecx
	movl	%ecx, (%r8,%rbx,4)
	incq	%rbx
	movslq	12(%r13), %rdi
	cmpq	%rdi, %rbx
	jl	LBB0_47
LBB0_48:
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV1_MAX_TILE_WIDTH,4,2         ## @AV1_MAX_TILE_WIDTH
	.comm	_AV_LOG_DEBUG,4,2               ## @AV_LOG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Automatically using %d tile columns to fill width.\n"

	.comm	_AV1_MAX_TILE_AREA,4,2          ## @AV1_MAX_TILE_AREA
L_.str.1:                               ## @.str.1
	.asciz	"Automatically using %d tile rows to fill area.\n"

	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
L_.str.2:                               ## @.str.2
	.asciz	"Invalid tile sizing: frame not large enough to fit specified tile arrangement.\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_AV1_MAX_TILE_COLS,4,2          ## @AV1_MAX_TILE_COLS
	.comm	_AV1_MAX_TILE_ROWS,4,2          ## @AV1_MAX_TILE_ROWS
L_.str.3:                               ## @.str.3
	.asciz	"Invalid tile sizing: AV1 does not allow more than %dx%d tiles.\n"

L_.str.4:                               ## @.str.4
	.asciz	"Invalid tile sizing: AV1 does not allow tiles of width greater than %d.\n"

	.comm	_AOM_SUPERBLOCK_SIZE_DYNAMIC,8,3 ## @AOM_SUPERBLOCK_SIZE_DYNAMIC
L_.str.5:                               ## @.str.5
	.asciz	"Using a single tile.\n"

L_.str.6:                               ## @.str.6
	.asciz	"Uniform with 64x64 superblocks -> %dx%d tiles.\n"

L_.str.7:                               ## @.str.7
	.asciz	"Uniform with 128x128 superblocks -> %dx%d tiles.\n"

L_.str.8:                               ## @.str.8
	.asciz	"128x128 superblocks not possible.\n"

L_.str.9:                               ## @.str.9
	.asciz	"Using uniform tiling with dynamic superblocks (tile_cols_log2 = %d, tile_rows_log2 = %d).\n"

L_.str.10:                              ## @.str.10
	.asciz	"Using uniform tiling with 64x64 superblocks (tile_cols_log2 = %d, tile_rows_log2 = %d).\n"

	.comm	_AOM_SUPERBLOCK_SIZE_64X64,8,3  ## @AOM_SUPERBLOCK_SIZE_64X64
L_.str.11:                              ## @.str.11
	.asciz	"Using uniform tiling with 128x128 superblocks (tile_cols_log2 = %d, tile_rows_log2 = %d).\n"

	.comm	_AOM_SUPERBLOCK_SIZE_128X128,8,3 ## @AOM_SUPERBLOCK_SIZE_128X128
L_.str.12:                              ## @.str.12
	.asciz	"Using fixed tiling with %dx%d superblocks (tile_cols = %d, tile_rows = %d).\n"

	.no_dead_strip	_choose_tiling
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function choose_tiling
_choose_tiling:                         ; @choose_tiling
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x19, x1
	mov	x20, x0
	ldr	x23, [x0, #8]
	ldr	w8, [x23]
	tbnz	w8, #31, LBB0_2
; %bb.1:
	mov	w9, #1
	lsl	w8, w9, w8
	str	w8, [x23, #4]
LBB0_2:
	ldr	w8, [x23, #8]
	tbnz	w8, #31, LBB0_4
; %bb.3:
	mov	w9, #1
	lsl	w8, w9, w8
	str	w8, [x23, #12]
LBB0_4:
	ldr	w8, [x23, #4]
	cbnz	w8, LBB0_7
; %bb.5:
	ldr	w8, [x20]
Lloh0:
	adrp	x9, _AV1_MAX_TILE_WIDTH@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AV1_MAX_TILE_WIDTH@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	add	w8, w8, w9
	sub	w8, w8, #1
	sdiv	w8, w8, w9
	str	w8, [x23, #4]
	cmp	w8, #2
	b.lt	LBB0_7
; %bb.6:
Lloh3:
	adrp	x9, _AV_LOG_DEBUG@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AV_LOG_DEBUG@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x9]
	str	x8, [sp]
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
	bl	_av_log
	ldr	w8, [x23, #4]
LBB0_7:
	cmp	w8, #0
	cset	w0, gt
	bl	_av_assert0
	ldr	w8, [x23, #12]
	cbnz	w8, LBB0_10
; %bb.8:
	ldr	w0, [x20]
	mov	w1, #128
	bl	_FFALIGN
	ldr	w8, [x23, #4]
	add	w9, w0, w8
	sub	w9, w9, #1
	sdiv	w0, w9, w8
	mov	w1, #128
	bl	_FFALIGN
	mov	x21, x0
	ldr	w0, [x20, #4]
	mov	w1, #128
	bl	_FFALIGN
Lloh8:
	adrp	x8, _AV1_MAX_TILE_AREA@GOTPAGE
Lloh9:
	ldr	x8, [x8, _AV1_MAX_TILE_AREA@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	madd	w9, w0, w21, w8
	sub	w9, w9, #1
	sdiv	w8, w9, w8
	str	w8, [x23, #12]
	cmp	w8, #2
	b.lt	LBB0_10
; %bb.9:
Lloh11:
	adrp	x9, _AV_LOG_DEBUG@GOTPAGE
Lloh12:
	ldr	x9, [x9, _AV_LOG_DEBUG@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x9]
	str	x8, [sp]
Lloh14:
	adrp	x2, l_.str.1@PAGE
Lloh15:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_av_log
	ldr	w8, [x23, #12]
LBB0_10:
	cmp	w8, #0
	cset	w0, gt
	bl	_av_assert0
	ldr	w10, [x20]
	add	w8, w10, #63
	add	w9, w10, #126
	cmp	w8, #0
	csel	w8, w9, w8, lt
	ldr	w9, [x23, #4]
	cmp	w9, w8, asr #6
	b.gt	LBB0_12
; %bb.11:
	ldr	w11, [x20, #4]
	add	w8, w11, #63
	add	w12, w11, #126
	cmp	w8, #0
	csel	w12, w12, w8, lt
	ldr	w8, [x23, #12]
	cmp	w8, w12, asr #6
	b.le	LBB0_14
LBB0_12:
Lloh16:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh17:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
Lloh19:
	adrp	x2, l_.str.2@PAGE
Lloh20:
	add	x2, x2, l_.str.2@PAGEOFF
LBB0_13:
	mov	x0, x20
	bl	_av_log
Lloh21:
	adrp	x8, _EINVAL@GOTPAGE
Lloh22:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_AVERROR
LBB0_14:
Lloh24:
	adrp	x12, _AV1_MAX_TILE_COLS@GOTPAGE
Lloh25:
	ldr	x12, [x12, _AV1_MAX_TILE_COLS@GOTPAGEOFF]
Lloh26:
	ldr	w12, [x12]
Lloh27:
	adrp	x13, _AV1_MAX_TILE_ROWS@GOTPAGE
Lloh28:
	ldr	x13, [x13, _AV1_MAX_TILE_ROWS@GOTPAGEOFF]
Lloh29:
	ldr	w13, [x13]
	cmp	w9, w12
	ccmp	w8, w13, #0, le
	b.le	LBB0_16
; %bb.15:
Lloh30:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh31:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x8]
	stp	x12, x13, [sp]
Lloh33:
	adrp	x2, l_.str.3@PAGE
Lloh34:
	add	x2, x2, l_.str.3@PAGEOFF
	b	LBB0_13
LBB0_16:
	sdiv	w13, w10, w9
Lloh35:
	adrp	x12, _AV1_MAX_TILE_WIDTH@GOTPAGE
Lloh36:
	ldr	x12, [x12, _AV1_MAX_TILE_WIDTH@GOTPAGEOFF]
Lloh37:
	ldr	w12, [x12]
	cmp	w13, w12
	b.le	LBB0_18
; %bb.17:
Lloh38:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh39:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh40:
	ldr	w1, [x8]
	str	x12, [sp]
Lloh41:
	adrp	x2, l_.str.4@PAGE
Lloh42:
	add	x2, x2, l_.str.4@PAGEOFF
	b	LBB0_13
LBB0_18:
Lloh43:
	adrp	x12, _AOM_SUPERBLOCK_SIZE_DYNAMIC@GOTPAGE
Lloh44:
	ldr	x12, [x12, _AOM_SUPERBLOCK_SIZE_DYNAMIC@GOTPAGEOFF]
Lloh45:
	ldr	x12, [x12]
	str	x12, [x23, #24]
	cmp	w9, #1
	b.ne	LBB0_22
; %bb.19:
	cmp	w8, #1
	b.ne	LBB0_22
; %bb.20:
Lloh46:
	adrp	x8, _AV_LOG_DEBUG@GOTPAGE
Lloh47:
	ldr	x8, [x8, _AV_LOG_DEBUG@GOTPAGEOFF]
Lloh48:
	ldr	w1, [x8]
Lloh49:
	adrp	x2, l_.str.5@PAGE
Lloh50:
	add	x2, x2, l_.str.5@PAGEOFF
LBB0_21:
	mov	x0, x20
	bl	_av_log
	b	LBB0_53
LBB0_22:
	add	w12, w10, #127
	add	w10, w10, #254
	cmp	w12, #0
	csel	w10, w10, w12, lt
	cmp	w9, w10, asr #7
	b.le	LBB0_24
; %bb.23:
	mov	w25, #0
	b	LBB0_25
LBB0_24:
	add	w10, w11, #127
	add	w11, w11, #254
	cmp	w10, #0
	csel	w10, w11, w10, lt
	cmp	w8, w10, asr #7
	cset	w25, le
LBB0_25:
	subs	w0, w9, #1
	b.ne	LBB0_27
; %bb.26:
	mov	w2, #0
	b	LBB0_28
LBB0_27:
	bl	_av_log2
	add	w2, w0, #1
	ldr	w8, [x23, #12]
LBB0_28:
	str	w2, [x23]
	subs	w0, w8, #1
	b.ne	LBB0_30
; %bb.29:
	mov	w8, #0
	b	LBB0_31
LBB0_30:
	bl	_av_log2
	add	w8, w0, #1
	ldr	w2, [x23]
LBB0_31:
	str	w8, [x23, #8]
	ldr	w0, [x20]
	mov	w1, #64
	bl	_count_uniform_tiling
	mov	x22, x0
	ldr	w0, [x20, #4]
	ldr	w2, [x23, #8]
	mov	w1, #64
	bl	_count_uniform_tiling
	mov	x21, x0
Lloh51:
	adrp	x24, _AV_LOG_DEBUG@GOTPAGE
Lloh52:
	ldr	x24, [x24, _AV_LOG_DEBUG@GOTPAGEOFF]
	ldr	w1, [x24]
	stp	x22, x21, [sp]
Lloh53:
	adrp	x2, l_.str.6@PAGE
Lloh54:
	add	x2, x2, l_.str.6@PAGEOFF
	mov	x0, x20
	bl	_av_log
	ldr	w8, [x23, #4]
	cmp	w22, w8
	b.ne	LBB0_35
; %bb.32:
	ldr	w22, [x23, #12]
	cmp	w21, w22
	cset	w26, eq
	tbnz	w25, #0, LBB0_37
; %bb.33:
	ldr	w1, [x24]
Lloh55:
	adrp	x2, l_.str.8@PAGE
Lloh56:
	add	x2, x2, l_.str.8@PAGEOFF
	mov	x0, x20
	bl	_av_log
	mov	w8, #1
	str	w8, [x23, #16]
	cmp	w21, w22
	b.ne	LBB0_41
; %bb.34:
	ldr	w1, [x24]
	ldr	w8, [x23]
	ldr	w9, [x23, #8]
	stp	x8, x9, [sp]
Lloh57:
	adrp	x2, l_.str.10@PAGE
Lloh58:
	add	x2, x2, l_.str.10@PAGEOFF
	mov	x0, x20
	bl	_av_log
Lloh59:
	adrp	x8, _AOM_SUPERBLOCK_SIZE_64X64@GOTPAGE
Lloh60:
	ldr	x8, [x8, _AOM_SUPERBLOCK_SIZE_64X64@GOTPAGEOFF]
Lloh61:
	ldr	x8, [x8]
	str	x8, [x23, #24]
	b	LBB0_53
LBB0_35:
	tbz	w25, #0, LBB0_40
; %bb.36:
	mov	w26, #0
LBB0_37:
	ldr	w0, [x20]
	ldr	w2, [x23]
	mov	w1, #128
	bl	_count_uniform_tiling
	mov	x21, x0
	ldr	w0, [x20, #4]
	ldr	w2, [x23, #8]
	mov	w1, #128
	bl	_count_uniform_tiling
	mov	x22, x0
	ldr	w1, [x24]
	stp	x21, x22, [sp]
Lloh62:
	adrp	x2, l_.str.7@PAGE
Lloh63:
	add	x2, x2, l_.str.7@PAGEOFF
	mov	x0, x20
	bl	_av_log
	ldr	w8, [x23, #4]
	cmp	w21, w8
	b.ne	LBB0_42
; %bb.38:
	ldr	w8, [x23, #12]
	cmp	w22, w8
	cset	w9, eq
	mov	w10, #1
	str	w10, [x23, #16]
	and	w9, w26, w9
	cmp	w9, #1
	b.ne	LBB0_43
; %bb.39:
	ldr	w1, [x24]
	ldr	w8, [x23]
	ldr	w9, [x23, #8]
	stp	x8, x9, [sp]
Lloh64:
	adrp	x2, l_.str.9@PAGE
Lloh65:
	add	x2, x2, l_.str.9@PAGEOFF
	b	LBB0_21
LBB0_40:
	ldr	w1, [x24]
Lloh66:
	adrp	x2, l_.str.8@PAGE
Lloh67:
	add	x2, x2, l_.str.8@PAGEOFF
	mov	x0, x20
	bl	_av_log
	mov	w8, #1
	str	w8, [x23, #16]
LBB0_41:
	ldr	w8, [x23, #4]
Lloh68:
	adrp	x25, _AOM_SUPERBLOCK_SIZE_64X64@GOTPAGE
Lloh69:
	ldr	x25, [x25, _AOM_SUPERBLOCK_SIZE_64X64@GOTPAGEOFF]
	mov	w22, #64
	b	LBB0_46
LBB0_42:
	mov	w9, #1
	str	w9, [x23, #16]
Lloh70:
	adrp	x25, _AOM_SUPERBLOCK_SIZE_128X128@GOTPAGE
Lloh71:
	ldr	x25, [x25, _AOM_SUPERBLOCK_SIZE_128X128@GOTPAGEOFF]
	mov	w22, #128
	b	LBB0_46
LBB0_43:
Lloh72:
	adrp	x25, _AOM_SUPERBLOCK_SIZE_128X128@GOTPAGE
Lloh73:
	ldr	x25, [x25, _AOM_SUPERBLOCK_SIZE_128X128@GOTPAGEOFF]
	cmp	w22, w8
	b.ne	LBB0_45
; %bb.44:
	ldr	w1, [x24]
	ldr	w8, [x23]
	ldr	w9, [x23, #8]
	stp	x8, x9, [sp]
Lloh74:
	adrp	x2, l_.str.11@PAGE
Lloh75:
	add	x2, x2, l_.str.11@PAGEOFF
	mov	x0, x20
	bl	_av_log
	ldr	x8, [x25]
	str	x8, [x23, #24]
	b	LBB0_53
LBB0_45:
	mov	w22, #128
	mov	x8, x21
LBB0_46:
	str	wzr, [x23, #16]
	ldr	x9, [x25]
	str	x9, [x23, #24]
	ldr	w1, [x24]
	ldr	w9, [x23, #12]
	stp	x8, x9, [sp, #16]
	stp	x22, x22, [sp]
Lloh76:
	adrp	x2, l_.str.12@PAGE
Lloh77:
	add	x2, x2, l_.str.12@PAGEOFF
	mov	x0, x20
	bl	_av_log
	ldr	w11, [x23, #4]
	ldr	w10, [x23, #12]
	stp	w11, w10, [x19]
	sub	w8, w22, #1
	ldr	w9, [x20, #4]
	cmp	w11, #1
	b.lt	LBB0_50
; %bb.47:
	mov	x10, #0
	ldr	w12, [x20]
	add	w12, w8, w12
	sdiv	w13, w12, w22
	sdiv	w12, w13, w11
	msub	w13, w12, w11, w13
	cmp	w13, #0
	cinc	w15, w13, lt
	add	w14, w13, #1
	cmp	w14, #0
	add	w14, w13, #2
	csinc	w13, w14, w13, lt
	mov	w14, #-1
	eor	w13, w14, w13, asr #1
	ldr	x14, [x19, #8]
	sbfx	x15, x15, #1, #31
LBB0_48:                                ; =>This Inner Loop Header: Depth=1
	cmp	x10, x15
	add	w11, w13, w11
	sxtw	x11, w11
	ccmp	x10, x11, #0, ge
	cinc	w11, w12, gt
	str	w11, [x14, x10, lsl #2]
	add	x10, x10, #1
	ldrsw	x11, [x23, #4]
	cmp	x10, x11
	b.lt	LBB0_48
; %bb.49:
	ldr	w10, [x23, #12]
LBB0_50:
	cmp	w10, #1
	b.lt	LBB0_53
; %bb.51:
	mov	x11, #0
	add	w8, w8, w9
	sdiv	w9, w8, w22
	sdiv	w8, w9, w10
	msub	w9, w8, w10, w9
	cmp	w9, #0
	cinc	w13, w9, lt
	add	w12, w9, #1
	cmp	w12, #0
	add	w12, w9, #2
	csinc	w9, w12, w9, lt
	mov	w12, #-1
	eor	w9, w12, w9, asr #1
	ldr	x12, [x19, #16]
	sbfx	x13, x13, #1, #31
LBB0_52:                                ; =>This Inner Loop Header: Depth=1
	cmp	x11, x13
	add	w10, w9, w10
	sxtw	x10, w10
	ccmp	x11, x10, #0, ge
	cinc	w10, w8, gt
	str	w10, [x12, x11, lsl #2]
	add	x11, x11, #1
	ldrsw	x10, [x23, #12]
	cmp	x11, x10
	b.lt	LBB0_52
LBB0_53:
	mov	w0, #0
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpAdd	Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpAdd	Lloh53, Lloh54
	.loh AdrpLdrGot	Lloh51, Lloh52
	.loh AdrpAdd	Lloh55, Lloh56
	.loh AdrpLdrGotLdr	Lloh59, Lloh60, Lloh61
	.loh AdrpAdd	Lloh57, Lloh58
	.loh AdrpAdd	Lloh62, Lloh63
	.loh AdrpAdd	Lloh64, Lloh65
	.loh AdrpAdd	Lloh66, Lloh67
	.loh AdrpLdrGot	Lloh68, Lloh69
	.loh AdrpLdrGot	Lloh70, Lloh71
	.loh AdrpLdrGot	Lloh72, Lloh73
	.loh AdrpAdd	Lloh74, Lloh75
	.loh AdrpAdd	Lloh76, Lloh77
	.cfi_endproc
                                        ; -- End function
	.comm	_AV1_MAX_TILE_WIDTH,4,2         ; @AV1_MAX_TILE_WIDTH
	.comm	_AV_LOG_DEBUG,4,2               ; @AV_LOG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Automatically using %d tile columns to fill width.\n"

	.comm	_AV1_MAX_TILE_AREA,4,2          ; @AV1_MAX_TILE_AREA
l_.str.1:                               ; @.str.1
	.asciz	"Automatically using %d tile rows to fill area.\n"

	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
l_.str.2:                               ; @.str.2
	.asciz	"Invalid tile sizing: frame not large enough to fit specified tile arrangement.\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_AV1_MAX_TILE_COLS,4,2          ; @AV1_MAX_TILE_COLS
	.comm	_AV1_MAX_TILE_ROWS,4,2          ; @AV1_MAX_TILE_ROWS
l_.str.3:                               ; @.str.3
	.asciz	"Invalid tile sizing: AV1 does not allow more than %dx%d tiles.\n"

l_.str.4:                               ; @.str.4
	.asciz	"Invalid tile sizing: AV1 does not allow tiles of width greater than %d.\n"

	.comm	_AOM_SUPERBLOCK_SIZE_DYNAMIC,8,3 ; @AOM_SUPERBLOCK_SIZE_DYNAMIC
l_.str.5:                               ; @.str.5
	.asciz	"Using a single tile.\n"

l_.str.6:                               ; @.str.6
	.asciz	"Uniform with 64x64 superblocks -> %dx%d tiles.\n"

l_.str.7:                               ; @.str.7
	.asciz	"Uniform with 128x128 superblocks -> %dx%d tiles.\n"

l_.str.8:                               ; @.str.8
	.asciz	"128x128 superblocks not possible.\n"

l_.str.9:                               ; @.str.9
	.asciz	"Using uniform tiling with dynamic superblocks (tile_cols_log2 = %d, tile_rows_log2 = %d).\n"

l_.str.10:                              ; @.str.10
	.asciz	"Using uniform tiling with 64x64 superblocks (tile_cols_log2 = %d, tile_rows_log2 = %d).\n"

	.comm	_AOM_SUPERBLOCK_SIZE_64X64,8,3  ; @AOM_SUPERBLOCK_SIZE_64X64
l_.str.11:                              ; @.str.11
	.asciz	"Using uniform tiling with 128x128 superblocks (tile_cols_log2 = %d, tile_rows_log2 = %d).\n"

	.comm	_AOM_SUPERBLOCK_SIZE_128X128,8,3 ; @AOM_SUPERBLOCK_SIZE_128X128
l_.str.12:                              ; @.str.12
	.asciz	"Using fixed tiling with %dx%d superblocks (tile_cols = %d, tile_rows = %d).\n"

	.no_dead_strip	_choose_tiling
.subsections_via_symbols
