	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function swri_get_dither
LCPI0_0:
	.quad	0x4330000000000000              ## double 4503599627370496
	.quad	0x4330000000000000              ## double 4503599627370496
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3
LCPI0_1:
	.quad	0xbfe0000000000000              ## double -0.5
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_swri_get_dither
	.p2align	4, 0x90
_swri_get_dither:                       ## @swri_get_dither
	.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 $r8d killed $r8d def $r8
	movq	%r8, -64(%rbp)                  ## 8-byte Spill
	movl	%ecx, %r13d
	movl	%edx, %r15d
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rbx
	movsd	(%rdi), %xmm0                   ## xmm0 = mem[0],zero
	movsd	%xmm0, -80(%rbp)                ## 8-byte Spill
	leal	2(%r15), %r14d
	movl	%r14d, %edi
	movl	$8, %esi
	callq	_av_malloc_array
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	movq	%rax, %r12
	cmpl	$-1, %r15d
	jl	LBB0_19
## %bb.2:
	movq	%r15, %rdx
	movl	%r14d, %ecx
	xorl	%r15d, %r15d
	movq	_UINT_MAX@GOTPCREL(%rip), %r14
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_3 Depth=1
	xorl	%edi, %edi
	movq	_SWR_DITHER_NB@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	setl	%dil
	movq	%rdx, %r12
	callq	_av_assert0
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%r12, %rdx
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	movd	%r13d, %xmm0
	imull	$1664525, %r13d, %r13d          ## imm = 0x19660D
	addl	$1013904223, %r13d              ## imm = 0x3C6EF35F
	pinsrd	$1, %r13d, %xmm0
	pmovzxdq	%xmm0, %xmm0                    ## xmm0 = xmm0[0],zero,xmm0[1],zero
	movdqa	LCPI0_0(%rip), %xmm1            ## xmm1 = [4.503599627370496E+15,4.503599627370496E+15]
	por	%xmm1, %xmm0
	subpd	%xmm1, %xmm0
	movddup	(%r14), %xmm1                   ## xmm1 = mem[0,0]
	divpd	%xmm1, %xmm0
	movapd	%xmm0, %xmm1
	unpckhpd	%xmm0, %xmm1                    ## xmm1 = xmm1[1],xmm0[1]
	subsd	%xmm1, %xmm0
LBB0_11:                                ##   in Loop: Header=BB0_3 Depth=1
	movsd	%xmm0, (%r12,%r15,8)
	incq	%r15
	cmpq	%r15, %rcx
	je	LBB0_6
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	imull	$1664525, %r13d, %r13d          ## imm = 0x19660D
	addl	$1013904223, %r13d              ## imm = 0x3C6EF35F
	movl	8(%rbx), %eax
	cmpl	$129, %eax
	jne	LBB0_10
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%r13d, %eax
	xorps	%xmm0, %xmm0
	cvtsi2sd	%rax, %xmm0
	divsd	(%r14), %xmm0
	addsd	LCPI0_1(%rip), %xmm0
	jmp	LBB0_11
LBB0_5:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_6:
	testl	%edx, %edx
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	jle	LBB0_19
## %bb.7:
	movl	%edx, %r13d
	xorl	%r14d, %r14d
	addl	$-130, %r15d
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_8 Depth=1
	xorl	%edi, %edi
	callq	_av_assert0
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_8 Depth=1
	incq	%r14
	cmpq	%r14, %r13
	je	LBB0_19
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movl	8(%rbx), %eax
	cmpl	$128, %eax
	jne	LBB0_9
## %bb.12:                              ##   in Loop: Header=BB0_8 Depth=1
	movsd	8(%r12,%r14,8), %xmm0           ## xmm0 = mem[0],zero
	addsd	%xmm0, %xmm0
	subsd	(%r12,%r14,8), %xmm0
	subsd	16(%r12,%r14,8), %xmm0
	movsd	%xmm0, -56(%rbp)                ## 8-byte Spill
	movl	$6, %edi
	callq	_sqrt
	movsd	-56(%rbp), %xmm1                ## 8-byte Reload
                                        ## xmm1 = mem[0],zero
	divsd	%xmm0, %xmm1
	movapd	%xmm1, %xmm0
	cmpl	$3, %r15d
	jbe	LBB0_14
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_8 Depth=1
	xorl	%edi, %edi
	movq	_SWR_DITHER_NB@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	setl	%dil
	callq	_av_assert0
	movsd	(%r12,%r14,8), %xmm0            ## xmm0 = mem[0],zero
	cmpl	$3, %r15d
	ja	LBB0_17
LBB0_14:                                ##   in Loop: Header=BB0_8 Depth=1
	mulsd	-80(%rbp), %xmm0                ## 8-byte Folded Reload
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%r15,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_16:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movsd	%xmm0, (%rax,%r14,8)
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_8 Depth=1
	cvtsd2ss	%xmm0, %xmm0
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movss	%xmm0, (%rax,%r14,4)
	jmp	LBB0_18
LBB0_19:
	movq	%r12, %rdi
	callq	_av_free
	xorl	%eax, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_16, LBB0_16-LJTI0_0
.set L0_0_set_15, LBB0_15-LJTI0_0
LJTI0_0:
	.long	L0_0_set_16
	.long	L0_0_set_16
	.long	L0_0_set_15
	.long	L0_0_set_16
	.end_data_region
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_UINT_MAX,8,3                   ## @UINT_MAX
	.comm	_SWR_DITHER_NB,4,2              ## @SWR_DITHER_NB
	.comm	_TMP_EXTRA,4,2                  ## @TMP_EXTRA
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_swri_get_dither                ; -- Begin function swri_get_dither
	.p2align	2
_swri_get_dither:                       ; @swri_get_dither
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	d11, d10, [sp, #16]             ; 16-byte Folded Spill
	stp	d9, d8, [sp, #32]               ; 16-byte Folded Spill
	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
	.cfi_offset b8, -104
	.cfi_offset b9, -112
	.cfi_offset b10, -120
	.cfi_offset b11, -128
	mov	x21, x4
	mov	x24, x3
	mov	x23, x2
	mov	x19, x1
	mov	x20, x0
	ldr	d8, [x0]
	add	w25, w2, #2
	mov	x0, x25
	mov	w1, #8
	bl	_av_malloc_array
	cbz	x0, LBB0_7
; %bb.1:
	mov	x26, x0
	cmn	w23, #1
	b.lt	LBB0_18
; %bb.2:
	str	w21, [sp, #12]                  ; 4-byte Folded Spill
	mov	w27, #62303
	movk	w27, #15470, lsl #16
	mov	w28, #26125
	movk	w28, #25, lsl #16
Lloh0:
	adrp	x22, _UINT_MAX@GOTPAGE
Lloh1:
	ldr	x22, [x22, _UINT_MAX@GOTPAGEOFF]
	fmov	d9, #-0.50000000
	mov	x21, x26
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
Lloh2:
	adrp	x9, _SWR_DITHER_NB@GOTPAGE
Lloh3:
	ldr	x9, [x9, _SWR_DITHER_NB@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	cmp	w8, w9
	cset	w0, lt
	bl	_av_assert0
	ucvtf	d0, w24
	ldr	d1, [x22]
	fdiv	d0, d0, d1
	madd	w24, w24, w28, w27
	ucvtf	d2, w24
	fdiv	d1, d2, d1
	fsub	d0, d0, d1
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	str	d0, [x21], #8
	subs	x25, x25, #1
	b.eq	LBB0_8
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	madd	w24, w24, w28, w27
	ldr	w8, [x20, #8]
	cmp	w8, #129
	b.ne	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ucvtf	d0, w24
	ldr	d1, [x22]
	fdiv	d0, d0, d1
	fadd	d0, d0, d9
	b	LBB0_4
LBB0_7:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	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
	ldp	d9, d8, [sp, #32]               ; 16-byte Folded Reload
	ldp	d11, d10, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #144
	b	_AVERROR
LBB0_8:
	cmp	w23, #1
	ldr	w8, [sp, #12]                   ; 4-byte Folded Reload
	b.lt	LBB0_18
; %bb.9:
	mov	x24, #0
	mov	w23, w23
	fmov	d9, #2.00000000
	sub	w22, w8, #130
Lloh8:
	adrp	x25, lJTI0_0@PAGE
Lloh9:
	add	x25, x25, lJTI0_0@PAGEOFF
	b	LBB0_12
LBB0_10:                                ;   in Loop: Header=BB0_12 Depth=1
	mov	w0, #0
	bl	_av_assert0
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	add	x24, x24, #1
	cmp	x23, x24
	b.eq	LBB0_18
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x20, #8]
	cmp	w8, #128
	b.ne	LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	add	x8, x26, x24, lsl #3
	ldp	d0, d1, [x8]
	fnmsub	d0, d1, d9, d0
	ldr	d1, [x8, #16]
	fsub	d10, d0, d1
	mov	w0, #6
	bl	_sqrt
	fdiv	d0, d10, d0
	cmp	w22, #3
	b.ls	LBB0_15
	b	LBB0_10
LBB0_14:                                ;   in Loop: Header=BB0_12 Depth=1
Lloh10:
	adrp	x9, _SWR_DITHER_NB@GOTPAGE
Lloh11:
	ldr	x9, [x9, _SWR_DITHER_NB@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	cmp	w8, w9
	cset	w0, lt
	bl	_av_assert0
	ldr	d0, [x26, x24, lsl #3]
	cmp	w22, #3
	b.hi	LBB0_10
LBB0_15:                                ;   in Loop: Header=BB0_12 Depth=1
	fmul	d0, d8, d0
	adr	x8, LBB0_16
	ldrb	w9, [x25, x22]
	add	x8, x8, x9, lsl #2
	br	x8
LBB0_16:                                ;   in Loop: Header=BB0_12 Depth=1
	str	d0, [x19, x24, lsl #3]
	b	LBB0_11
LBB0_17:                                ;   in Loop: Header=BB0_12 Depth=1
	fcvt	s0, d0
	str	s0, [x19, x24, lsl #2]
	b	LBB0_11
LBB0_18:
	mov	x0, x26
	bl	_av_free
	mov	w0, #0
	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
	ldp	d9, d8, [sp, #32]               ; 16-byte Folded Reload
	ldp	d11, d10, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_16-LBB0_16)>>2
	.byte	(LBB0_16-LBB0_16)>>2
	.byte	(LBB0_17-LBB0_16)>>2
	.byte	(LBB0_16-LBB0_16)>>2
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_UINT_MAX,8,3                   ; @UINT_MAX
	.comm	_SWR_DITHER_NB,4,2              ; @SWR_DITHER_NB
	.comm	_TMP_EXTRA,4,2                  ; @TMP_EXTRA
.subsections_via_symbols
