	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fill_tile4
_fill_tile4:                            ## @fill_tile4
	.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	$104, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movl	%esi, -48(%rbp)                 ## 4-byte Spill
	movq	%rdi, %rbx
	movq	8(%rdi), %rdi
	movq	%rdi, -104(%rbp)                ## 8-byte Spill
	callq	_bytestream2_get_le16
	movq	(%rbx), %xmm0                   ## xmm0 = mem[0],zero
	movdqa	%xmm0, %xmm1
	psrad	$31, %xmm1
	psrld	$30, %xmm1
	paddd	%xmm0, %xmm1
	psrad	$2, %xmm1
	pcmpeqd	%xmm2, %xmm2
	psubd	%xmm2, %xmm1
	pextrd	$1, %xmm1, %edx
	movd	%xmm1, %ecx
	imull	%ecx, %edx
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	cmpl	%eax, %edx
	jl	LBB0_22
## %bb.1:
	testl	%eax, %eax
	jle	LBB0_22
## %bb.2:
	movd	%xmm0, %ecx
	decl	%ecx
	movl	%ecx, -68(%rbp)                 ## 4-byte Spill
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	xorl	%ecx, %ecx
	movl	%eax, -72(%rbp)                 ## 4-byte Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_3 Depth=1
	movl	-76(%rbp), %ecx                 ## 4-byte Reload
	incl	%ecx
	movl	-72(%rbp), %eax                 ## 4-byte Reload
	cmpl	%eax, %ecx
	je	LBB0_22
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	movl	%ecx, -76(%rbp)                 ## 4-byte Spill
	movq	-104(%rbp), %r14                ## 8-byte Reload
	movq	%r14, %rdi
	callq	_bytestream2_get_byte
	movl	%eax, %r12d
	movq	%r14, %rdi
	callq	_bytestream2_get_byte
	movl	%eax, %r15d
	movq	%r14, %rdi
	callq	_bytestream2_get_le16
	movl	%eax, %r14d
	movq	%r12, %rax
	shll	$2, %eax
	leal	(,%r15,4), %ecx
	movq	%rcx, -136(%rbp)                ## 8-byte Spill
	leal	(%rcx,%rcx,2), %ecx
	movl	%ecx, -92(%rbp)                 ## 4-byte Spill
	leal	1(,%r15,4), %ecx
	movq	%rcx, -128(%rbp)                ## 8-byte Spill
	leal	(%rcx,%rcx,2), %ecx
	movl	%ecx, -88(%rbp)                 ## 4-byte Spill
	leal	2(,%r15,4), %ecx
	movq	%rcx, -120(%rbp)                ## 8-byte Spill
	leal	(%rcx,%rcx,2), %ecx
	movl	%ecx, -84(%rbp)                 ## 4-byte Spill
	leal	3(,%r15,4), %ecx
	movq	%rcx, -112(%rbp)                ## 8-byte Spill
	leal	(%rcx,%rcx,2), %ecx
	movl	%ecx, -80(%rbp)                 ## 4-byte Spill
	movl	-68(%rbp), %r15d                ## 4-byte Reload
	subl	%eax, %r15d
	xorl	%r13d, %r13d
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_4 Depth=2
	shll	$4, %r14d
	incl	%r13d
	decl	%r15d
	cmpl	$4, %r13d
	je	LBB0_21
LBB0_4:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	leal	(%rax,%r13), %r12d
	testl	$32768, %r14d                   ## imm = 0x8000
	je	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=2
	cmpl	(%rbx), %r12d
	jge	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=2
	movq	-136(%rbp), %rcx                ## 8-byte Reload
	cmpl	4(%rbx), %ecx
	jge	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=2
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rax
	movq	8(%rcx), %rcx
	movl	(%rax), %eax
	imull	%r15d, %eax
	addl	-92(%rbp), %eax                 ## 4-byte Folded Reload
	movslq	%eax, %rdi
	shlq	$2, %rdi
	addq	(%rcx), %rdi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	callq	_AV_WB24
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	incl	-44(%rbp)                       ## 4-byte Folded Spill
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=2
	testl	$16384, %r14d                   ## imm = 0x4000
	je	LBB0_12
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=2
	cmpl	(%rbx), %r12d
	jge	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_4 Depth=2
	movq	-128(%rbp), %rcx                ## 8-byte Reload
	cmpl	4(%rbx), %ecx
	jge	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_4 Depth=2
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rax
	movq	8(%rcx), %rcx
	movl	(%rax), %eax
	imull	%r15d, %eax
	addl	-88(%rbp), %eax                 ## 4-byte Folded Reload
	movslq	%eax, %rdi
	shlq	$2, %rdi
	addq	(%rcx), %rdi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	callq	_AV_WB24
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	incl	-44(%rbp)                       ## 4-byte Folded Spill
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_4 Depth=2
	testl	$8192, %r14d                    ## imm = 0x2000
	je	LBB0_16
## %bb.13:                              ##   in Loop: Header=BB0_4 Depth=2
	cmpl	(%rbx), %r12d
	jge	LBB0_16
## %bb.14:                              ##   in Loop: Header=BB0_4 Depth=2
	movq	-120(%rbp), %rcx                ## 8-byte Reload
	cmpl	4(%rbx), %ecx
	jge	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_4 Depth=2
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rax
	movq	8(%rcx), %rcx
	movl	(%rax), %eax
	imull	%r15d, %eax
	addl	-84(%rbp), %eax                 ## 4-byte Folded Reload
	movslq	%eax, %rdi
	shlq	$2, %rdi
	addq	(%rcx), %rdi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	callq	_AV_WB24
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	incl	-44(%rbp)                       ## 4-byte Folded Spill
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_4 Depth=2
	testl	$4096, %r14d                    ## imm = 0x1000
	je	LBB0_20
## %bb.17:                              ##   in Loop: Header=BB0_4 Depth=2
	cmpl	(%rbx), %r12d
	jge	LBB0_20
## %bb.18:                              ##   in Loop: Header=BB0_4 Depth=2
	movq	-112(%rbp), %rcx                ## 8-byte Reload
	cmpl	4(%rbx), %ecx
	jge	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_4 Depth=2
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rax
	movq	8(%rcx), %rcx
	movl	(%rax), %eax
	imull	%r15d, %eax
	addl	-80(%rbp), %eax                 ## 4-byte Folded Reload
	movslq	%eax, %rdi
	shlq	$2, %rdi
	addq	(%rcx), %rdi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	callq	_AV_WB24
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	incl	-44(%rbp)                       ## 4-byte Folded Spill
	jmp	LBB0_20
LBB0_22:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_fill_tile4
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fill_tile4
_fill_tile4:                            ; @fill_tile4
	.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	x19, x2
	mov	x20, x1
	mov	x21, x0
	ldr	x0, [x0, #8]
	str	x0, [sp, #8]                    ; 8-byte Folded Spill
	bl	_bytestream2_get_le16
	ldp	w8, w9, [x21]
	add	w10, w9, #3
	cmp	w9, #0
	csel	w9, w10, w9, lt
	asr	w9, w9, #2
	add	w10, w8, #3
	cmp	w8, #0
	csel	w10, w10, w8, lt
	asr	w10, w10, #2
	add	w10, w10, #1
	madd	w9, w10, w9, w10
	cmp	w9, w0
	str	w0, [sp, #4]                    ; 4-byte Folded Spill
	mov	w24, #0
	ccmp	w0, #1, #8, ge
	b.ge	LBB0_2
LBB0_1:
	mov	x0, x24
	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
LBB0_2:
	mov	w9, #0
	sub	w8, w8, #1
	str	w8, [sp]                        ; 4-byte Folded Spill
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w9, [sp, #16]                   ; 4-byte Folded Reload
	add	w9, w9, #1
	ldr	w8, [sp, #4]                    ; 4-byte Folded Reload
	cmp	w9, w8
	b.eq	LBB0_1
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	str	w9, [sp, #16]                   ; 4-byte Folded Spill
	ldr	x22, [sp, #8]                   ; 8-byte Folded Reload
	mov	x0, x22
	bl	_bytestream2_get_byte
	mov	x26, x0
	mov	x0, x22
	bl	_bytestream2_get_byte
	mov	x27, x0
	mov	x0, x22
	bl	_bytestream2_get_le16
	mov	x25, x0
	mov	w23, #0
	lsl	w26, w26, #2
	lsl	w9, w27, #2
	add	w8, w27, w27, lsl #1
	lsl	w10, w8, #2
	mov	w8, #1
	bfi	w8, w27, #2, #30
	stp	w8, w9, [sp, #40]               ; 8-byte Folded Spill
	add	w8, w8, w8, lsl #1
	stp	w8, w10, [sp, #28]              ; 8-byte Folded Spill
	mov	w8, #2
	bfi	w8, w27, #2, #30
	str	w8, [sp, #36]                   ; 4-byte Folded Spill
	add	w9, w8, w8, lsl #1
	mov	w28, #3
	bfi	w28, w27, #2, #30
	ldr	w8, [sp]                        ; 4-byte Folded Reload
	sub	w27, w8, w26
	add	w8, w28, w28, lsl #1
	stp	w8, w9, [sp, #20]               ; 8-byte Folded Spill
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=2
	lsl	w25, w25, #4
	add	w23, w23, #1
	sub	w27, w27, #1
	cmp	w23, #4
	b.eq	LBB0_3
LBB0_6:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	w22, w26, w23
	tbz	w25, #15, LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	ldr	w8, [x21]
	cmp	w22, w8
	b.ge	LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=2
	ldr	w8, [x21, #4]
	ldr	w9, [sp, #44]                   ; 4-byte Folded Reload
	cmp	w9, w8
	b.ge	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=2
	ldp	x9, x8, [x19]
	ldr	x8, [x8]
	ldr	w9, [x9]
	ldr	w10, [sp, #32]                  ; 4-byte Folded Reload
	madd	w9, w9, w27, w10
	add	x0, x8, w9, sxtw #2
	mov	x1, x20
	bl	_AV_WB24
	add	w24, w24, #1
LBB0_10:                                ;   in Loop: Header=BB0_6 Depth=2
	tbz	w25, #14, LBB0_14
; %bb.11:                               ;   in Loop: Header=BB0_6 Depth=2
	ldr	w8, [x21]
	cmp	w22, w8
	b.ge	LBB0_14
; %bb.12:                               ;   in Loop: Header=BB0_6 Depth=2
	ldr	w8, [x21, #4]
	ldr	w9, [sp, #40]                   ; 4-byte Folded Reload
	cmp	w9, w8
	b.ge	LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_6 Depth=2
	ldp	x9, x8, [x19]
	ldr	x8, [x8]
	ldr	w9, [x9]
	ldr	w10, [sp, #28]                  ; 4-byte Folded Reload
	madd	w9, w9, w27, w10
	add	x0, x8, w9, sxtw #2
	mov	x1, x20
	bl	_AV_WB24
	add	w24, w24, #1
LBB0_14:                                ;   in Loop: Header=BB0_6 Depth=2
	tbz	w25, #13, LBB0_18
; %bb.15:                               ;   in Loop: Header=BB0_6 Depth=2
	ldr	w8, [x21]
	cmp	w22, w8
	b.ge	LBB0_18
; %bb.16:                               ;   in Loop: Header=BB0_6 Depth=2
	ldr	w8, [x21, #4]
	ldr	w9, [sp, #36]                   ; 4-byte Folded Reload
	cmp	w9, w8
	b.ge	LBB0_18
; %bb.17:                               ;   in Loop: Header=BB0_6 Depth=2
	ldp	x9, x8, [x19]
	ldr	x8, [x8]
	ldr	w9, [x9]
	ldr	w10, [sp, #24]                  ; 4-byte Folded Reload
	madd	w9, w9, w27, w10
	add	x0, x8, w9, sxtw #2
	mov	x1, x20
	bl	_AV_WB24
	add	w24, w24, #1
LBB0_18:                                ;   in Loop: Header=BB0_6 Depth=2
	tbz	w25, #12, LBB0_5
; %bb.19:                               ;   in Loop: Header=BB0_6 Depth=2
	ldr	w8, [x21]
	cmp	w22, w8
	b.ge	LBB0_5
; %bb.20:                               ;   in Loop: Header=BB0_6 Depth=2
	ldr	w8, [x21, #4]
	cmp	w28, w8
	b.ge	LBB0_5
; %bb.21:                               ;   in Loop: Header=BB0_6 Depth=2
	ldp	x9, x8, [x19]
	ldr	x8, [x8]
	ldr	w9, [x9]
	ldr	w10, [sp, #20]                  ; 4-byte Folded Reload
	madd	w9, w9, w27, w10
	add	x0, x8, w9, sxtw #2
	mov	x1, x20
	bl	_AV_WB24
	add	w24, w24, #1
	b	LBB0_5
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_fill_tile4
.subsections_via_symbols
