	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function adpcm_yamaha_compress_sample
_adpcm_yamaha_compress_sample:          ## @adpcm_yamaha_compress_sample
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %ebx
	movq	%rdi, %r14
	movl	(%rdi), %ecx
	testl	%ecx, %ecx
	je	LBB0_2
## %bb.1:
	movl	4(%r14), %eax
	jmp	LBB0_3
LBB0_2:
	movq	$127, (%r14)
	xorl	%eax, %eax
	movl	$127, %ecx
LBB0_3:
	subl	%eax, %ebx
	movl	%ebx, %eax
	negl	%eax
	cmovsl	%ebx, %eax
	shll	$2, %eax
	cltd
	idivl	%ecx
	movl	$7, %edi
	movl	%eax, %esi
	callq	_FFMIN
                                        ## kill: def $eax killed $eax def $rax
	shrl	$31, %ebx
	leal	(%rax,%rbx,8), %eax
	movq	_ff_adpcm_yamaha_difflookup@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movslq	%eax, %rbx
	movl	(%rcx,%rbx,4), %eax
	imull	(%r14), %eax
	leal	7(%rax), %edi
	testl	%eax, %eax
	cmovnsl	%eax, %edi
	sarl	$3, %edi
	addl	4(%r14), %edi
	movl	%edi, 4(%r14)
	callq	_av_clip_int16
	movl	%eax, 4(%r14)
	movq	_ff_adpcm_yamaha_indexscale@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%rbx,4), %edi
	imull	(%r14), %edi
	sarl	$8, %edi
	movl	%edi, (%r14)
	movl	$127, %esi
	movl	$24576, %edx                    ## imm = 0x6000
	callq	_av_clip
	movl	%eax, (%r14)
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ff_adpcm_yamaha_difflookup,8,3 ## @ff_adpcm_yamaha_difflookup
	.comm	_ff_adpcm_yamaha_indexscale,8,3 ## @ff_adpcm_yamaha_indexscale
	.no_dead_strip	_adpcm_yamaha_compress_sample
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function adpcm_yamaha_compress_sample
lCPI0_0:
	.long	127                             ; 0x7f
	.long	0                               ; 0x0
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_adpcm_yamaha_compress_sample:          ; @adpcm_yamaha_compress_sample
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	ldr	w8, [x0]
	cbz	w8, LBB0_2
; %bb.1:
	ldr	w9, [x19, #4]
	b	LBB0_3
LBB0_2:
	mov	w9, #0
Lloh0:
	adrp	x8, lCPI0_0@PAGE
Lloh1:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [x19]
	mov	w8, #127
LBB0_3:
	subs	w20, w1, w9
	cneg	w9, w20, mi
	lsl	w9, w9, #2
	sdiv	w1, w9, w8
	mov	w0, #7
	bl	_FFMIN
	lsr	w8, w20, #28
	and	w8, w8, #0x8
	add	w20, w0, w8
Lloh2:
	adrp	x8, _ff_adpcm_yamaha_difflookup@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ff_adpcm_yamaha_difflookup@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	sbfiz	x21, x20, #2, #32
	ldr	w8, [x8, x21]
	ldp	w9, w10, [x19]
	mul	w8, w8, w9
	add	w9, w8, #7
	cmp	w8, #0
	csel	w8, w9, w8, lt
	add	w0, w10, w8, asr #3
	str	w0, [x19, #4]
	bl	_av_clip_int16
	str	w0, [x19, #4]
	ldr	w8, [x19]
Lloh5:
	adrp	x9, _ff_adpcm_yamaha_indexscale@GOTPAGE
Lloh6:
	ldr	x9, [x9, _ff_adpcm_yamaha_indexscale@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	ldr	w9, [x9, x21]
	mul	w8, w9, w8
	asr	w0, w8, #8
	str	w0, [x19]
	mov	w1, #127
	mov	w2, #24576
	bl	_av_clip
	str	w0, [x19]
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdr	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_ff_adpcm_yamaha_difflookup,8,3 ; @ff_adpcm_yamaha_difflookup
	.comm	_ff_adpcm_yamaha_indexscale,8,3 ; @ff_adpcm_yamaha_indexscale
	.no_dead_strip	_adpcm_yamaha_compress_sample
.subsections_via_symbols
