	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fill_tileX
_fill_tileX:                            ## @fill_tileX
	.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	$136, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, -176(%rbp)                 ## 8-byte Spill
	movl	%ecx, -140(%rbp)                ## 4-byte Spill
	movl	%edx, %r14d
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movq	8(%rdi), %rdi
	leal	3(%r14), %eax
	testl	%edx, %edx
	cmovnsl	%edx, %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	leal	3(%r15), %r12d
	testl	%esi, %esi
	cmovnsl	%esi, %r12d
	movq	%rdi, -160(%rbp)                ## 8-byte Spill
	callq	_bytestream2_get_le16
	movl	%eax, %esi
	movl	(%rbx), %edi
	movl	4(%rbx), %eax
	cltd
	movq	%r15, %rcx
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	idivl	%r15d
	movl	%eax, %ecx
	incl	%ecx
	movl	%edi, -60(%rbp)                 ## 4-byte Spill
	movl	%edi, %eax
	cltd
	idivl	%r14d
	incl	%eax
	imull	%ecx, %eax
	xorl	%r13d, %r13d
	cmpl	%esi, %eax
	jl	LBB0_10
## %bb.1:
	movl	%esi, -112(%rbp)                ## 4-byte Spill
	testl	%esi, %esi
	jle	LBB0_10
## %bb.2:
	movq	%r12, %rcx
	sarl	$2, -44(%rbp)                   ## 4-byte Folded Spill
	sarl	$2, %ecx
	decl	-60(%rbp)                       ## 4-byte Folded Spill
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	leal	(%rax,%rax,2), %eax
	movl	%eax, -108(%rbp)                ## 4-byte Spill
	leal	(%rcx,%rcx,2), %r12d
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	movq	%r14, -168(%rbp)                ## 8-byte Spill
	movq	%rcx, -88(%rbp)                 ## 8-byte Spill
	movl	%r12d, -124(%rbp)               ## 4-byte Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	-116(%rbp), %eax                ## 4-byte Reload
	incl	%eax
	cmpl	-112(%rbp), %eax                ## 4-byte Folded Reload
	je	LBB0_10
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_7 Depth 2
                                        ##       Child Loop BB0_11 Depth 3
                                        ##         Child Loop BB0_14 Depth 4
                                        ##           Child Loop BB0_16 Depth 5
	movl	%eax, -116(%rbp)                ## 4-byte Spill
	movq	-160(%rbp), %r15                ## 8-byte Reload
	movq	%r15, %rdi
	callq	_bytestream2_get_byte
                                        ## kill: def $eax killed $eax def $rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	callq	_bytestream2_get_byte
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	%r15, %rdi
	callq	_bytestream2_get_le16
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	movl	%eax, %edx
	movl	%ecx, %eax
	imull	-56(%rbp), %eax                 ## 4-byte Folded Reload
	cmpl	4(%rbx), %eax
	jge	LBB0_9
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rax, -152(%rbp)                ## 8-byte Spill
	movq	-80(%rbp), %r15                 ## 8-byte Reload
	imull	%r14d, %r15d
	cmpl	(%rbx), %r15d
	jge	LBB0_9
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	testl	%r14d, %r14d
	jle	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	leal	(%r15,%r14), %eax
	movl	%eax, -120(%rbp)                ## 4-byte Spill
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	-152(%rbp), %rsi                ## 8-byte Reload
	addl	%eax, %esi
	movl	-60(%rbp), %eax                 ## 4-byte Reload
	subl	%r15d, %eax
	movl	%eax, -64(%rbp)                 ## 4-byte Spill
	imull	-108(%rbp), %ecx                ## 4-byte Folded Reload
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movl	%esi, -128(%rbp)                ## 4-byte Spill
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_7 Depth=2
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	addl	%eax, %r15d
	subl	%eax, -64(%rbp)                 ## 4-byte Folded Spill
	cmpl	-120(%rbp), %r15d               ## 4-byte Folded Reload
	jge	LBB0_9
LBB0_7:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_11 Depth 3
                                        ##         Child Loop BB0_14 Depth 4
                                        ##           Child Loop BB0_16 Depth 5
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
	movq	-152(%rbp), %rax                ## 8-byte Reload
	movl	%eax, %edi
	cmpl	$0, -56(%rbp)                   ## 4-byte Folded Reload
	movq	%r15, -80(%rbp)                 ## 8-byte Spill
	jg	LBB0_11
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_11 Depth=3
	movl	(%rbx), %esi
	movq	-80(%rbp), %r15                 ## 8-byte Reload
	subl	%r15d, %esi
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_FFMIN
	movl	%eax, %r14d
	movl	4(%rbx), %esi
	subl	-104(%rbp), %esi                ## 4-byte Folded Reload
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_FFMIN
	movq	-104(%rbp), %rdi                ## 8-byte Reload
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	imull	%r14d, %eax
	movl	-136(%rbp), %r13d               ## 4-byte Reload
	addl	%eax, %r13d
	movq	-168(%rbp), %r14                ## 8-byte Reload
	movl	-124(%rbp), %r12d               ## 4-byte Reload
	movl	-132(%rbp), %edx                ## 4-byte Reload
	movl	-128(%rbp), %esi                ## 4-byte Reload
LBB0_22:                                ##   in Loop: Header=BB0_11 Depth=3
	addl	%edx, %edx
	addl	%ecx, %edi
	addl	%r12d, -68(%rbp)                ## 4-byte Folded Spill
	cmpl	%esi, %edi
	jge	LBB0_8
LBB0_11:                                ##   Parent Loop BB0_3 Depth=1
                                        ##     Parent Loop BB0_7 Depth=2
                                        ## =>    This Loop Header: Depth=3
                                        ##         Child Loop BB0_14 Depth 4
                                        ##           Child Loop BB0_16 Depth 5
	testl	$32768, %edx                    ## imm = 0x8000
	je	LBB0_22
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=3
	movl	%edx, -132(%rbp)                ## 4-byte Spill
	movl	%r13d, -136(%rbp)               ## 4-byte Spill
	cmpl	$4, %r14d
	movq	%rdi, -104(%rbp)                ## 8-byte Spill
	jl	LBB0_21
## %bb.13:                              ##   in Loop: Header=BB0_11 Depth=3
	xorl	%eax, %eax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movl	-64(%rbp), %r13d                ## 4-byte Reload
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_14 Depth=4
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	incl	%eax
	decl	%r13d
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	cmpl	-44(%rbp), %eax                 ## 4-byte Folded Reload
	je	LBB0_21
LBB0_14:                                ##   Parent Loop BB0_3 Depth=1
                                        ##     Parent Loop BB0_7 Depth=2
                                        ##       Parent Loop BB0_11 Depth=3
                                        ## =>      This Loop Header: Depth=4
                                        ##           Child Loop BB0_16 Depth 5
	cmpl	$4, -56(%rbp)                   ## 4-byte Folded Reload
	jl	LBB0_20
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=4
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	-96(%rbp), %rdx                 ## 8-byte Reload
	leal	(%rdx,%rax), %r12d
	xorl	%r15d, %r15d
	movl	-68(%rbp), %r14d                ## 4-byte Reload
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_19:                                ##   in Loop: Header=BB0_16 Depth=5
	incl	%r15d
	addl	$3, %r14d
	cmpl	%r15d, %ecx
	je	LBB0_20
LBB0_16:                                ##   Parent Loop BB0_3 Depth=1
                                        ##     Parent Loop BB0_7 Depth=2
                                        ##       Parent Loop BB0_11 Depth=3
                                        ##         Parent Loop BB0_14 Depth=4
                                        ## =>        This Inner Loop Header: Depth=5
	cmpl	(%rbx), %r12d
	jge	LBB0_19
## %bb.17:                              ##   in Loop: Header=BB0_16 Depth=5
	leal	(%rdi,%r15), %eax
	cmpl	4(%rbx), %eax
	jge	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_16 Depth=5
	movq	-176(%rbp), %rcx                ## 8-byte Reload
	movq	(%rcx), %rax
	movq	8(%rcx), %rcx
	movl	(%rax), %eax
	imull	%r13d, %eax
	addl	%r14d, %eax
	movslq	%eax, %rdi
	shlq	$2, %rdi
	addq	(%rcx), %rdi
	movl	-140(%rbp), %esi                ## 4-byte Reload
	callq	_AV_WB24
	movq	-104(%rbp), %rdi                ## 8-byte Reload
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	jmp	LBB0_19
LBB0_10:
	movl	%r13d, %eax
	addq	$136, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_fill_tileX
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fill_tileX
_fill_tileX:                            ; @fill_tileX
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #176
	.cfi_def_cfa_offset 176
	stp	x28, x27, [sp, #80]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #96]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #112]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #128]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #144]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #160]            ; 16-byte Folded Spill
	add	x29, sp, #160
	.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	x19, x4
	str	w3, [sp, #76]                   ; 4-byte Folded Spill
	mov	x25, x2
	mov	x27, x1
	mov	x23, x0
	ldr	x0, [x0, #8]
	add	w8, w2, #3
	cmp	w2, #0
	csel	w21, w8, w2, lt
	add	w8, w1, #3
	cmp	w1, #0
	csel	w22, w8, w1, lt
	str	x0, [sp, #16]                   ; 8-byte Folded Spill
	bl	_bytestream2_get_le16
	ldp	w8, w9, [x23]
	sdiv	w9, w9, w27
	add	w9, w9, #1
	sdiv	w10, w8, w25
	madd	w9, w9, w10, w9
	cmp	w9, w0
	str	w0, [sp, #12]                   ; 4-byte Folded Spill
	ccmp	w0, #1, #8, ge
	b.ge	LBB0_3
; %bb.1:
	mov	w21, #0
LBB0_2:
	mov	x0, x21
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #112]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #96]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #176
	ret
LBB0_3:
	mov	w9, #0
	mov	w26, #0
	asr	w10, w21, #2
	str	w10, [sp, #72]                  ; 4-byte Folded Spill
	mov	w21, #0
	asr	w28, w22, #2
	sub	w10, w8, #1
	add	w8, w27, w27, lsl #1
	stp	w8, w10, [sp, #4]               ; 8-byte Folded Spill
	add	w22, w28, w28, lsl #1
	stp	w22, w25, [sp, #44]             ; 8-byte Folded Spill
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w26, [sp, #24]                  ; 4-byte Folded Reload
	add	w26, w26, #1
	ldr	w8, [sp, #12]                   ; 4-byte Folded Reload
	cmp	w26, w8
	b.eq	LBB0_2
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_9 Depth 2
                                        ;       Child Loop BB0_12 Depth 3
                                        ;         Child Loop BB0_16 Depth 4
                                        ;           Child Loop BB0_19 Depth 5
	ldr	x20, [sp, #16]                  ; 8-byte Folded Reload
	mov	x0, x20
	bl	_bytestream2_get_byte
	str	w0, [sp, #68]                   ; 4-byte Folded Spill
	mov	x0, x20
	bl	_bytestream2_get_byte
	mov	x24, x0
	mov	x0, x20
	bl	_bytestream2_get_le16
	mul	w9, w24, w27
	ldr	w8, [x23, #4]
	cmp	w9, w8
	str	w26, [sp, #24]                  ; 4-byte Folded Spill
	b.ge	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	str	w9, [sp, #36]                   ; 4-byte Folded Spill
	ldr	w8, [sp, #68]                   ; 4-byte Folded Reload
	mul	w20, w8, w25
	ldr	w8, [x23]
	cmp	w20, w8
	ccmp	w25, #1, #8, lt
	b.lt	LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	add	w8, w20, w25
	str	w8, [sp, #32]                   ; 4-byte Folded Spill
	ldr	w26, [sp, #36]                  ; 4-byte Folded Reload
	add	w9, w26, w27
	ldr	w8, [sp, #8]                    ; 4-byte Folded Reload
	sub	w8, w8, w20
	str	w8, [sp, #40]                   ; 4-byte Folded Spill
	ldr	w8, [sp, #4]                    ; 4-byte Folded Reload
	mul	w8, w8, w24
	str	w8, [sp, #28]                   ; 4-byte Folded Spill
	str	w9, [sp, #52]                   ; 4-byte Folded Spill
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=2
	ldr	w8, [sp, #72]                   ; 4-byte Folded Reload
	ldp	w26, w10, [sp, #36]             ; 8-byte Folded Reload
	sub	w10, w10, w8
	str	w10, [sp, #40]                  ; 4-byte Folded Spill
	add	w20, w20, w8
	ldr	w8, [sp, #32]                   ; 4-byte Folded Reload
	cmp	w20, w8
	b.ge	LBB0_4
LBB0_9:                                 ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_12 Depth 3
                                        ;         Child Loop BB0_16 Depth 4
                                        ;           Child Loop BB0_19 Depth 5
	ldr	w8, [sp, #28]                   ; 4-byte Folded Reload
	stp	w20, w8, [sp, #64]              ; 8-byte Folded Spill
	cmp	w27, #1
	b.ge	LBB0_12
	b	LBB0_8
LBB0_10:                                ;   in Loop: Header=BB0_12 Depth=3
	ldr	w8, [x23]
	ldr	w20, [sp, #64]                  ; 4-byte Folded Reload
	sub	w1, w8, w20
	ldr	w0, [sp, #72]                   ; 4-byte Folded Reload
	bl	_FFMIN
	mov	x24, x0
	ldr	w8, [x23, #4]
	sub	w1, w8, w26
	mov	x0, x28
	bl	_FFMIN
	ldr	w21, [sp, #60]                  ; 4-byte Folded Reload
	madd	w21, w0, w24, w21
	ldp	w22, w25, [sp, #44]             ; 8-byte Folded Reload
	ldp	w9, w0, [sp, #52]               ; 8-byte Folded Reload
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=3
	lsl	w0, w0, #1
	ldr	w8, [sp, #68]                   ; 4-byte Folded Reload
	add	w8, w8, w22
	str	w8, [sp, #68]                   ; 4-byte Folded Spill
	add	w26, w26, w28
	cmp	w26, w9
	b.ge	LBB0_8
LBB0_12:                                ;   Parent Loop BB0_5 Depth=1
                                        ;     Parent Loop BB0_9 Depth=2
                                        ; =>    This Loop Header: Depth=3
                                        ;         Child Loop BB0_16 Depth 4
                                        ;           Child Loop BB0_19 Depth 5
	tbz	w0, #15, LBB0_11
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=3
	stp	w0, w21, [sp, #56]              ; 8-byte Folded Spill
	cmp	w25, #4
	b.lt	LBB0_10
; %bb.14:                               ;   in Loop: Header=BB0_12 Depth=3
	mov	w24, #0
	ldr	w22, [sp, #40]                  ; 4-byte Folded Reload
	b	LBB0_16
LBB0_15:                                ;   in Loop: Header=BB0_16 Depth=4
	add	w24, w24, #1
	sub	w22, w22, #1
	ldr	w8, [sp, #72]                   ; 4-byte Folded Reload
	cmp	w24, w8
	mov	x27, x20
	b.eq	LBB0_10
LBB0_16:                                ;   Parent Loop BB0_5 Depth=1
                                        ;     Parent Loop BB0_9 Depth=2
                                        ;       Parent Loop BB0_12 Depth=3
                                        ; =>      This Loop Header: Depth=4
                                        ;           Child Loop BB0_19 Depth 5
	mov	x20, x27
	cmp	w27, #4
	b.lt	LBB0_15
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=4
	mov	w27, #0
	ldp	w8, w21, [sp, #64]              ; 8-byte Folded Reload
	add	w25, w24, w8
	b	LBB0_19
LBB0_18:                                ;   in Loop: Header=BB0_19 Depth=5
	add	w27, w27, #1
	add	w21, w21, #3
	cmp	w28, w27
	b.eq	LBB0_15
LBB0_19:                                ;   Parent Loop BB0_5 Depth=1
                                        ;     Parent Loop BB0_9 Depth=2
                                        ;       Parent Loop BB0_12 Depth=3
                                        ;         Parent Loop BB0_16 Depth=4
                                        ; =>        This Inner Loop Header: Depth=5
	ldr	w8, [x23]
	cmp	w25, w8
	b.ge	LBB0_18
; %bb.20:                               ;   in Loop: Header=BB0_19 Depth=5
	ldr	w8, [x23, #4]
	add	w9, w26, w27
	cmp	w9, w8
	b.ge	LBB0_18
; %bb.21:                               ;   in Loop: Header=BB0_19 Depth=5
	ldp	x9, x8, [x19]
	ldr	x8, [x8]
	ldr	w9, [x9]
	madd	w9, w22, w9, w21
	add	x0, x8, w9, sxtw #2
	ldr	w1, [sp, #76]                   ; 4-byte Folded Reload
	bl	_AV_WB24
	b	LBB0_18
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_fill_tileX
.subsections_via_symbols
