	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_S_AdpcmMemoryNeeded            ## -- Begin function S_AdpcmMemoryNeeded
	.p2align	4, 0x90
_S_AdpcmMemoryNeeded:                   ## @S_AdpcmMemoryNeeded
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	cvtsi2ssq	8(%rdi), %xmm0
	movq	_dma@GOTPCREL(%rip), %rax
	divss	(%rax), %xmm0
	movss	(%rdi), %xmm1                   ## xmm1 = mem[0],zero,zero,zero
	divss	%xmm0, %xmm1
	cvttss2si	%xmm1, %ecx
	movq	_PAINTBUFFER_SIZE@GOTPCREL(%rip), %rsi
	movl	%ecx, %eax
	cltd
	idivl	(%rsi)
                                        ## kill: def $eax killed $eax def $rax
	cmpl	$1, %edx
	sbbl	$-1, %eax
	movl	%ecx, %edx
	shrl	$31, %edx
	addl	%ecx, %edx
	sarl	%edx
	leal	(%rdx,%rax,4), %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_dma,4,2                        ## @dma
	.comm	_PAINTBUFFER_SIZE,4,2           ## @PAINTBUFFER_SIZE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_S_AdpcmMemoryNeeded            ; -- Begin function S_AdpcmMemoryNeeded
	.p2align	2
_S_AdpcmMemoryNeeded:                   ; @S_AdpcmMemoryNeeded
	.cfi_startproc
; %bb.0:
	ldr	x8, [x0, #8]
	scvtf	s0, x8
Lloh0:
	adrp	x8, _dma@GOTPAGE
Lloh1:
	ldr	x8, [x8, _dma@GOTPAGEOFF]
Lloh2:
	ldr	s1, [x8]
	fdiv	s0, s0, s1
	ldr	s1, [x0]
	fdiv	s0, s1, s0
	fcvtzs	w8, s0
Lloh3:
	adrp	x9, _PAINTBUFFER_SIZE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PAINTBUFFER_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	sdiv	w10, w8, w9
	msub	w9, w10, w9, w8
	cmp	w9, #0
	cinc	w9, w10, ne
	cmp	w8, #0
	cinc	w8, w8, lt
	lsl	w9, w9, #2
	add	w0, w9, w8, asr #1
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_dma,4,2                        ; @dma
	.comm	_PAINTBUFFER_SIZE,4,2           ; @PAINTBUFFER_SIZE
.subsections_via_symbols
