	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_convert_dither              ## -- Begin function ff_convert_dither
	.p2align	4, 0x90
_ff_convert_dither:                     ## @ff_convert_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	(%rsi), %rax
	movq	_AV_SAMPLE_FMT_S16P@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movq	%r14, 16(%rbx)
	jmp	LBB0_3
LBB0_2:
	movq	16(%rbx), %rdi
	movl	8(%r15), %esi
	callq	_ff_audio_data_realloc
	testl	%eax, %eax
	js	LBB0_24
LBB0_3:
	movq	(%r15), %rax
	movq	_AV_SAMPLE_FMT_FLTP@GOTPCREL(%rip), %r13
	cmpq	(%r13), %rax
	jne	LBB0_8
## %bb.4:
	cmpq	$0, 48(%rbx)
	je	LBB0_5
LBB0_8:
	movq	64(%rbx), %rdi
	movl	8(%r15), %esi
	callq	_ff_audio_data_realloc
	testl	%eax, %eax
	js	LBB0_24
## %bb.9:
	movq	64(%rbx), %r12
	movq	(%r15), %rax
	cmpq	(%r13), %rax
	jne	LBB0_11
## %bb.10:
	movq	%r12, %r13
	jmp	LBB0_6
LBB0_11:
	movl	56(%rbx), %edi
	movq	%r12, %rsi
	movq	%r15, %rdx
	callq	_ff_audio_convert
	testl	%eax, %eax
	jns	LBB0_13
	jmp	LBB0_24
LBB0_5:
                                        ## implicit-def: $r13
LBB0_6:
	cmpq	$0, 48(%rbx)
	movq	%r15, %r12
	je	LBB0_13
## %bb.7:
	movl	44(%rbx), %edx
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_ff_audio_data_copy
	movq	%r13, %r12
	testl	%eax, %eax
	js	LBB0_24
LBB0_13:
	movq	(%rbx), %rax
	movq	_AV_RESAMPLE_DITHER_TRIANGULAR_NS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_19
## %bb.14:
	movl	28(%r12), %edi
	movq	16(%rbx), %rax
	movl	28(%rax), %esi
	callq	_FFMIN
	movl	%eax, %r13d
	movl	24(%r12), %edi
	movq	16(%rbx), %rax
	movl	24(%rax), %esi
	callq	_FFMIN
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	8(%r15), %edi
	movl	32(%rbx), %esi
	callq	_FFALIGN
	movl	%eax, %ecx
	movl	%r13d, %eax
	cltd
	idivl	36(%rbx)
	testl	%edx, %edx
	jne	LBB0_17
## %bb.15:
	cmpl	%ecx, -44(%rbp)                 ## 4-byte Folded Reload
	jl	LBB0_17
## %bb.16:
	movl	32(%rbx), %eax
	movl	40(%rbx), %ecx
	movl	%ecx, 28(%rbx)
	jmp	LBB0_18
LBB0_17:
	movq	_quantize_c@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%rbx)
	movl	$1, %eax
LBB0_18:
	movl	%eax, 8(%rbx)
LBB0_19:
	movq	16(%rbx), %rax
	movq	16(%rax), %rsi
	movq	16(%r12), %rdx
	movl	8(%r15), %r8d
	movl	12(%r15), %ecx
	movq	%rbx, %rdi
	callq	_convert_samples
	testl	%eax, %eax
	js	LBB0_24
## %bb.20:
	movl	8(%r15), %eax
	movq	16(%rbx), %rdx
	movl	%eax, 8(%rdx)
	movq	(%r14), %rax
	movq	_AV_SAMPLE_FMT_S16@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_22
## %bb.21:
	movl	24(%rbx), %edi
	movq	%r14, %rsi
	callq	_ff_audio_convert
	testl	%eax, %eax
	jns	LBB0_23
	jmp	LBB0_24
LBB0_22:
	movq	$0, 16(%rbx)
LBB0_23:
	xorl	%eax, %eax
LBB0_24:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_SAMPLE_FMT_S16P,8,3         ## @AV_SAMPLE_FMT_S16P
	.comm	_AV_SAMPLE_FMT_FLTP,8,3         ## @AV_SAMPLE_FMT_FLTP
	.comm	_AV_RESAMPLE_DITHER_TRIANGULAR_NS,8,3 ## @AV_RESAMPLE_DITHER_TRIANGULAR_NS
	.comm	_quantize_c,4,2                 ## @quantize_c
	.comm	_AV_SAMPLE_FMT_S16,8,3          ## @AV_SAMPLE_FMT_S16
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_convert_dither              ; -- Begin function ff_convert_dither
	.p2align	2
_ff_convert_dither:                     ; @ff_convert_dither
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
	ldr	x8, [x1]
Lloh0:
	adrp	x9, _AV_SAMPLE_FMT_S16P@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AV_SAMPLE_FMT_S16P@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	str	x19, [x20, #16]
	b	LBB0_3
LBB0_2:
	ldr	x0, [x20, #16]
	ldr	w1, [x21, #8]
	bl	_ff_audio_data_realloc
	tbnz	w0, #31, LBB0_22
LBB0_3:
	ldr	x8, [x21]
Lloh3:
	adrp	x23, _AV_SAMPLE_FMT_FLTP@GOTPAGE
Lloh4:
	ldr	x23, [x23, _AV_SAMPLE_FMT_FLTP@GOTPAGEOFF]
	ldr	x9, [x23]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.4:
	ldr	x8, [x20, #48]
	cbz	x8, LBB0_9
LBB0_5:
	ldr	x0, [x20, #64]
	ldr	w1, [x21, #8]
	bl	_ff_audio_data_realloc
	tbnz	w0, #31, LBB0_22
; %bb.6:
	ldr	x22, [x20, #64]
	ldr	x8, [x21]
	ldr	x9, [x23]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.7:
	mov	x23, x22
	b	LBB0_10
LBB0_8:
	ldr	w0, [x20, #56]
	mov	x1, x22
	mov	x2, x21
	bl	_ff_audio_convert
	tbz	w0, #31, LBB0_12
	b	LBB0_22
LBB0_9:
                                        ; implicit-def: $x23
LBB0_10:
	ldr	x8, [x20, #48]
	mov	x22, x21
	cbz	x8, LBB0_12
; %bb.11:
	ldr	w2, [x20, #44]
	mov	x0, x23
	mov	x1, x21
	bl	_ff_audio_data_copy
	mov	x22, x23
	tbnz	w0, #31, LBB0_22
LBB0_12:
	ldr	x8, [x20]
Lloh5:
	adrp	x9, _AV_RESAMPLE_DITHER_TRIANGULAR_NS@GOTPAGE
Lloh6:
	ldr	x9, [x9, _AV_RESAMPLE_DITHER_TRIANGULAR_NS@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_17
; %bb.13:
	ldr	w0, [x22, #28]
	ldr	x8, [x20, #16]
	ldr	w1, [x8, #28]
	bl	_FFMIN
	mov	x23, x0
	ldr	w0, [x22, #24]
	ldr	x8, [x20, #16]
	ldr	w1, [x8, #24]
	bl	_FFMIN
	mov	x24, x0
	ldr	w0, [x21, #8]
	ldr	w1, [x20, #32]
	bl	_FFALIGN
	ldr	w8, [x20, #36]
	sdiv	w9, w23, w8
	msub	w8, w9, w8, w23
	cmp	w8, #0
	ccmp	w24, w0, #8, eq
	b.ge	LBB0_15
; %bb.14:
Lloh8:
	adrp	x8, _quantize_c@GOTPAGE
Lloh9:
	ldr	x8, [x8, _quantize_c@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	str	w8, [x20, #28]
	mov	w8, #1
	b	LBB0_16
LBB0_15:
	ldr	w8, [x20, #40]
	str	w8, [x20, #28]
	ldr	w8, [x20, #32]
LBB0_16:
	str	w8, [x20, #8]
LBB0_17:
	ldr	x8, [x20, #16]
	ldr	x1, [x8, #16]
	ldr	x2, [x22, #16]
	ldp	w4, w3, [x21, #8]
	mov	x0, x20
	bl	_convert_samples
	tbnz	w0, #31, LBB0_22
; %bb.18:
	ldr	w8, [x21, #8]
	ldr	x2, [x20, #16]
	str	w8, [x2, #8]
	ldr	x8, [x19]
Lloh11:
	adrp	x9, _AV_SAMPLE_FMT_S16@GOTPAGE
Lloh12:
	ldr	x9, [x9, _AV_SAMPLE_FMT_S16@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_20
; %bb.19:
	ldr	w0, [x20, #24]
	mov	x1, x19
	bl	_ff_audio_convert
	tbz	w0, #31, LBB0_21
	b	LBB0_22
LBB0_20:
	str	xzr, [x20, #16]
LBB0_21:
	mov	w0, #0
LBB0_22:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_SAMPLE_FMT_S16P,8,3         ; @AV_SAMPLE_FMT_S16P
	.comm	_AV_SAMPLE_FMT_FLTP,8,3         ; @AV_SAMPLE_FMT_FLTP
	.comm	_AV_RESAMPLE_DITHER_TRIANGULAR_NS,8,3 ; @AV_RESAMPLE_DITHER_TRIANGULAR_NS
	.comm	_quantize_c,4,2                 ; @quantize_c
	.comm	_AV_SAMPLE_FMT_S16,8,3          ; @AV_SAMPLE_FMT_S16
.subsections_via_symbols
