	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function randomize_loopfilter_buffers
_randomize_loopfilter_buffers:          ## @randomize_loopfilter_buffers
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
                                        ## kill: def $r9d killed $r9d def $r9
	movl	%edi, %r14d
	testl	%edx, %edx
	movl	$1, %eax
	cmovnel	%eax, %esi
	leal	1(%r9), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	%r9, -80(%rbp)                  ## 8-byte Spill
	movl	%r9d, %eax
	notl	%eax
	movl	%r8d, -52(%rbp)                 ## 4-byte Spill
	addl	%r8d, %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	sarl	$2, %ecx
	movl	%ecx, -64(%rbp)                 ## 4-byte Spill
	imull	%esi, %r14d
	addl	%esi, %esi
	movl	%esi, -60(%rbp)                 ## 4-byte Spill
	movl	$-2, %ebx
                                        ## implicit-def: $eax
                                        ## kill: killed $eax
                                        ## implicit-def: $eax
                                        ## kill: killed $eax
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	%r14d, %edi
	movl	$-2, %esi
	movl	-68(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %edx
	movl	%r15d, %ecx
	movl	-48(%rbp), %r8d                 ## 4-byte Reload
	movl	-44(%rbp), %r9d                 ## 4-byte Reload
	callq	_setdx2
LBB0_9:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	%r14d, %edi
	movl	$-3, %esi
	movl	%ebx, %edx
	movl	-52(%rbp), %r15d                ## 4-byte Reload
	movl	%r15d, %ecx
	callq	_setdx
	movl	%r14d, %edi
	movl	$-4, %esi
	movl	%ebx, -68(%rbp)                 ## 4-byte Spill
	movl	%ebx, %edx
	movl	%r15d, %ecx
	callq	_setdx
	movl	-56(%rbp), %ebx                 ## 4-byte Reload
	addl	$2, %ebx
	addl	-60(%rbp), %r14d                ## 4-byte Folded Reload
	cmpl	$6, %ebx
	jae	LBB0_10
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	24(%rbp), %r13d
	testl	%r13d, %r13d
	setns	%r12b
	xorl	%eax, %eax
	callq	_rnd
	movzbl	%al, %r15d
	movl	%r14d, %edi
	xorl	%esi, %esi
	movl	%r15d, %edx
	callq	_setpx
	cmpl	$-2, %ebx
	sete	%al
	testl	%r13d, %r13d
	movl	%ebx, -56(%rbp)                 ## 4-byte Spill
	jg	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	andb	%al, %r12b
	jne	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	%r14d, %edi
	movl	$1, %esi
	movl	%r15d, %edx
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
                                        ## kill: def $ecx killed $ecx killed $rcx
	callq	_setdx
	movl	%r15d, %ebx
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	%r14d, %edi
	movl	$1, %esi
	movl	-72(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %edx
	movl	%r15d, %ecx
	movl	-48(%rbp), %r8d                 ## 4-byte Reload
	movl	-44(%rbp), %r9d                 ## 4-byte Reload
	callq	_setdx2
LBB0_5:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	24(%rbp), %eax
	testl	%eax, %eax
	setns	%r12b
	movl	%r14d, %edi
	movl	$2, %esi
	movl	%ebx, %edx
	movl	-52(%rbp), %r13d                ## 4-byte Reload
	movl	%r13d, %ecx
	callq	_setdx
	movl	%r14d, %edi
	movl	$3, %esi
	movl	%ebx, -72(%rbp)                 ## 4-byte Spill
	movl	%ebx, %edx
	movl	%r13d, %ecx
	callq	_setdx
	movl	%r14d, %edi
	movl	$-1, %esi
	movl	%r15d, %edx
	movl	-64(%rbp), %ecx                 ## 4-byte Reload
	callq	_setdx
	cmpl	$0, -56(%rbp)                   ## 4-byte Folded Reload
	sete	%al
	cmpl	$0, 24(%rbp)
	jg	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_1 Depth=1
	andb	%al, %r12b
	jne	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	%r14d, %edi
	movl	$-2, %esi
	movl	%r15d, %edx
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
                                        ## kill: def $ecx killed $ecx killed $rcx
	callq	_setdx
	movl	%r15d, %ebx
	jmp	LBB0_9
LBB0_10:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_randomize_loopfilter_buffers
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function randomize_loopfilter_buffers
_randomize_loopfilter_buffers:          ; @randomize_loopfilter_buffers
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x7
	mov	x21, x4
	cmp	w2, #0
	csinc	w8, w1, wzr, eq
	add	w9, w5, #1
	stp	w5, w9, [sp, #8]                ; 8-byte Folded Spill
	mvn	w9, w5
	add	w23, w9, w4
	asr	w24, w3, #2
	mul	w25, w8, w0
	lsl	w22, w8, #1
	mov	w20, #-2
                                        ; implicit-def: $w26
                                        ; implicit-def: $w27
	b	LBB0_3
LBB0_1:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x25
	mov	w1, #-2
	mov	x2, x27
	mov	x3, x28
	ldr	w4, [sp, #12]                   ; 4-byte Folded Reload
	mov	x5, x23
	bl	_setdx2
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x25
	mov	w1, #-3
	mov	x2, x27
	mov	x3, x21
	bl	_setdx
	mov	x0, x25
	mov	w1, #-4
	mov	x2, x27
	mov	x3, x21
	bl	_setdx
	add	w20, w20, #2
	add	w25, w25, w22
	cmp	w20, #6
	b.hs	LBB0_10
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	bl	_rnd
	and	w28, w0, #0xff
	mov	x0, x25
	mov	w1, #0
	mov	x2, x28
	bl	_setpx
	cmn	w20, #2
	cset	w8, eq
	cmp	w19, #0
	cset	w9, ge
	b.gt	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	and	w8, w9, w8
	cbnz	w8, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x25
	mov	w1, #1
	mov	x2, x28
	ldr	w3, [sp, #8]                    ; 4-byte Folded Reload
	bl	_setdx
	mov	x26, x28
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x25
	mov	w1, #1
	mov	x2, x26
	mov	x3, x28
	ldr	w4, [sp, #12]                   ; 4-byte Folded Reload
	mov	x5, x23
	bl	_setdx2
LBB0_7:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x25
	mov	w1, #2
	mov	x2, x26
	mov	x3, x21
	bl	_setdx
	mov	x0, x25
	mov	w1, #3
	mov	x2, x26
	mov	x3, x21
	bl	_setdx
	mov	x0, x25
	mov	w1, #-1
	mov	x2, x28
	mov	x3, x24
	bl	_setdx
	cmp	w20, #0
	cset	w8, eq
	cmp	w19, #0
	cset	w9, ge
	b.gt	LBB0_1
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	and	w8, w9, w8
	cbnz	w8, LBB0_1
; %bb.9:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x25
	mov	w1, #-2
	mov	x2, x28
	ldr	w3, [sp, #8]                    ; 4-byte Folded Reload
	bl	_setdx
	mov	x27, x28
	b	LBB0_2
LBB0_10:
	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
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_randomize_loopfilter_buffers
.subsections_via_symbols
