// File: /workspace/github_cpp_makefile_star2_O2/marxn[P]pupp/3rdparty/gmp/mpn/toom_interpolate_8pts.c
// Function: _gmpn_toom_interpolate_8pts
void
mpn_toom_interpolate_8pts (mp_ptr pp, mp_size_t n,
			   mp_ptr r3, mp_ptr r7,
			   mp_size_t spt, mp_ptr ws)
{
  mp_limb_signed_t cy;
  mp_ptr r5, r1;
  r5 = (pp + 3 * n);			/* 3n+1 */
  r1 = (pp + 7 * n);			/* spt */

  /******************************* interpolation *****************************/

  DO_mpn_subrsh(r3+n, 2 * n + 1, pp, 2 * n, 4, ws);
  cy = DO_mpn_sublsh_n (r3, r1, spt, 12, ws);
  MPN_DECR_U (r3 + spt, 3 * n + 1 - spt, cy);

  DO_mpn_subrsh(r5+n, 2 * n + 1, pp, 2 * n, 2, ws);
  cy = DO_mpn_sublsh_n (r5, r1, spt, 6, ws);
  MPN_DECR_U (r5 + spt, 3 * n + 1 - spt, cy);

  r7[3*n] -= mpn_sub_n (r7+n, r7+n, pp, 2 * n);
  cy = mpn_sub_n (r7, r7, r1, spt);
  MPN_DECR_U (r7 + spt, 3 * n + 1 - spt, cy);

  ASSERT_NOCARRY(mpn_sub_n (r3, r3, r5, 3 * n + 1));
  ASSERT_NOCARRY(mpn_rshift(r3, r3, 3 * n + 1, 2));

  ASSERT_NOCARRY(mpn_sub_n (r5, r5, r7, 3 * n + 1));

  ASSERT_NOCARRY(mpn_sub_n (r3, r3, r5, 3 * n + 1));

  mpn_divexact_by45 (r3, r3, 3 * n + 1);

  ASSERT_NOCARRY(mpn_divexact_by3 (r5, r5, 3 * n + 1));

  ASSERT_NOCARRY(DO_mpn_sublsh2_n (r5, r3, 3 * n + 1, ws));

  /* last interpolation steps... */
  /* ... are mixed with recomposition */

  /***************************** recomposition *******************************/
  /*
    pp[] prior to operations:
     |_H r1|_L r1|____||_H r5|_M_r5|_L r5|_____|_H r8|_L r8|pp

    summation scheme for remaining operations:
     |____8|n___7|n___6|n___5|n___4|n___3|n___2|n____|n____|pp
     |_H r1|_L r1|____||_H*r5|_M r5|_L r5|_____|_H_r8|_L r8|pp
	  ||_H r3|_M r3|_L*r3|
				  ||_H_r7|_M_r7|_L_r7|
		      ||-H r3|-M r3|-L*r3|
				  ||-H*r5|-M_r5|-L_r5|
  */

  cy = mpn_add_n (pp + n, pp + n, r7, n); /* Hr8+Lr7-Lr5 */
  cy-= mpn_sub_n (pp + n, pp + n, r5, n);
  if (0 > cy)
    MPN_DECR_U (r7 + n, 2*n + 1, 1);
  else
    MPN_INCR_U (r7 + n, 2*n + 1, cy);

  cy = mpn_sub_n (pp + 2*n, r7 + n, r5 + n, n); /* Mr7-Mr5 */
  MPN_DECR_U (r7 + 2*n, n + 1, cy);

  cy = mpn_add_n (pp + 3*n, r5, r7+ 2*n, n+1); /* Hr7+Lr5 */
  r5[3*n]+= mpn_add_n (r5 + 2*n, r5 + 2*n, r3, n); /* Hr5+Lr3 */
  cy-= mpn_sub_n (pp + 3*n, pp + 3*n, r5 + 2*n, n+1); /* Hr7-Hr5+Lr5-Lr3 */
  if (UNLIKELY(0 > cy))
    MPN_DECR_U (r5 + n + 1, 2*n, 1);
  else
    MPN_INCR_U (r5 + n + 1, 2*n, cy);

  ASSERT_NOCARRY(mpn_sub_n(pp + 4*n, r5 + n, r3 + n, 2*n +1)); /* Mr5-Mr3,Hr5-Hr3 */

  cy = mpn_add_1 (pp + 6*n, r3 + n, n, pp[6*n]);
  MPN_INCR_U (r3 + 2*n, n + 1, cy);
  cy = mpn_add_n (pp + 7*n, pp + 7*n, r3 + 2*n, n);
  if (LIKELY(spt != n))
    MPN_INCR_U (pp + 8*n, spt - n, cy + r3[3*n]);
  else
    ASSERT (r3[3*n] + cy == 0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %r9, (%rsp)
movq %r8, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %rdx, %rbp
movq %rsi, %r14
movq %rdi, %r12
leaq (%rsi,%rsi,2), %rax
movq %rax, 0x18(%rsp)
leaq (%rdi,%rax,8), %rax
movq %rax, 0x40(%rsp)
imulq $0x38, %rsi, %r13
addq %rdi, %r13
movq %r13, 0x28(%rsp)
movq (%rdi), %rax
shrq $0x4, %rax
leaq (%rdx,%rsi,8), %r15
movq %r15, %rcx
subq %rax, (%rcx)
jae 0x238d9
subq $0x1, 0x8(%rcx)
leaq 0x8(%rcx), %rcx
jb 0x238ce
leaq 0x8(%rdi), %rsi
movq %rsi, 0x8(%rsp)
leaq (%r14,%r14), %rax
movq %rax, 0x20(%rsp)
leaq -0x1(%r14,%r14), %rdx
movq %rdx, 0x10(%rsp)
pushq $0x3c
popq %rcx
movq %r15, %rdi
movq %r9, %r8
callq 0x23c9a
movq %r14, %rbx
shlq $0x4, %rbx
movq %r15, 0x50(%rsp)
leaq (%rbx,%r15), %rcx
addq $-0x8, %rcx
subq %rax, (%rcx)
jae 0x23927
subq $0x1, 0x8(%rcx)
leaq 0x8(%rcx), %rcx
jb 0x2391c
pushq $0xc
popq %rcx
movq %rbp, %r15
movq %rbp, 0x48(%rsp)
movq %rbp, %rdi
movq %r13, %rsi
movq 0x30(%rsp), %rbp
movq %rbp, %rdx
movq (%rsp), %r13
movq %r13, %r8
callq 0x23c9a
leaq (%r15,%rbp,8), %rcx
movq 0x40(%rsp), %rbp
subq %rax, (%rcx)
jae 0x23965
subq $0x1, 0x8(%rcx)
leaq 0x8(%rcx), %rcx
jb 0x2395a
movq (%r12), %rax
shrq $0x2, %rax
leaq (,%r14,8), %r15
addq %rbp, %r15
movq %r15, %rcx
subq %rax, (%rcx)
jae 0x2398b
subq $0x1, 0x8(%rcx)
leaq 0x8(%rcx), %rcx
jb 0x23980
pushq $0x3e
popq %rcx
movq %r15, %rdi
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %r13, %r8
callq 0x23c9a
movq %r15, 0x8(%rsp)
leaq (%rbx,%r15), %rcx
addq $-0x8, %rcx
movq %r12, %r15
subq %rax, (%rcx)
jae 0x239c3
subq $0x1, 0x8(%rcx)
leaq 0x8(%rcx), %rcx
jb 0x239b8
pushq $0x6
popq %rcx
movq %rbp, %rdi
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %r12
movq %r12, %rdx
movq %r13, %r8
callq 0x23c9a
leaq (,%r12,8), %rcx
addq %rbp, %rcx
subq %rax, (%rcx)
jae 0x239f9
subq $0x1, 0x8(%rcx)
leaq 0x8(%rcx), %rcx
jb 0x239ee
movq 0x38(%rsp), %rbx
leaq (%rbx,%r14,8), %rdi
movq %rdi, 0x10(%rsp)
movq %rdi, %rsi
movq %r15, %rdx
movq %r15, %r13
movq 0x20(%rsp), %rcx
callq 0x17ed0
movq 0x18(%rsp), %rcx
subq %rax, (%rbx,%rcx,8)
movq %rbx, %rdi
movq %rbx, %rsi
movq 0x28(%rsp), %rdx
movq 0x48(%rsp), %r15
movq %r12, %rcx
callq 0x17ed0
leaq (%rbx,%r12,8), %rcx
subq %rax, (%rcx)
jae 0x23a4f
subq $0x1, 0x8(%rcx)
leaq 0x8(%rcx), %rcx
jb 0x23a44
leaq (%r14,%r14,2), %r12
incq %r12
movq %r15, %rdi
movq %r15, %rsi
movq %rbp, %rdx
movq %r12, %rcx
callq 0x17ed0
pushq $0x2
popq %rcx
movq %r15, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x2a0a0
movq %rbp, %rdi
movq %rbp, %rsi
movq %rbx, %rdx
movq %r12, %rcx
callq 0x17ed0
movq %r15, %rdi
movq %r15, %rsi
movq %rbp, %rdx
movq %r12, %rcx
callq 0x17ed0
pushq $0x2d
popq %rcx
movabsq $0x4fa4fa4fa4fa4fa5, %r8 # imm = 0x4FA4FA4FA4FA4FA5
movq %r15, %rdi
movq %r15, %rsi
movq %r12, %rdx
xorl %r9d, %r9d
callq 0x28f98
movabsq $0x5555555555555555, %rcx # imm = 0x5555555555555555
movq %rbp, %rdi
movq %rbp, %rsi
movq %r12, %rdx
xorl %r8d, %r8d
callq 0x29020
movq %rbp, %rdi
movq %r15, %rsi
movq %r12, %rdx
pushq $0x2
popq %rcx
movq (%rsp), %r8
callq 0x23c9a
movq %r13, (%rsp)
leaq (%r13,%r14,8), %r13
movq %r13, %rdi
movq %r13, %rsi
movq %rbx, %rdx
movq %r14, %rcx
callq 0x17cf0
movq %rax, %r12
movq %r13, %rdi
movq %r13, %rsi
movq %rbp, %rdx
movq %r14, %rcx
callq 0x17ed0
subq %rax, %r12
js 0x23b35
movq 0x10(%rsp), %rsi
movq %rsi, %rax
addq %r12, (%rax)
jae 0x23b33
addq $0x1, 0x8(%rax)
leaq 0x8(%rax), %rax
jb 0x23b28
jmp 0x23b47
movq 0x10(%rsp), %rsi
movq %rsi, %rax
subq $0x1, (%rax)
leaq 0x8(%rax), %rax
jb 0x23b3d
movq 0x20(%rsp), %rbx
movq (%rsp), %rax
leaq (%rax,%rbx,8), %rdi
movq 0x8(%rsp), %rdx
movq %r14, %rcx
callq 0x17ed0
movq 0x38(%rsp), %rcx
leaq (%rcx,%rbx,8), %rdx
movq %rdx, %rcx
subq %rax, (%rcx)
jae 0x23b7d
subq $0x1, 0x8(%rcx)
leaq 0x8(%rcx), %rcx
jb 0x23b72
leaq 0x1(%r14), %r13
movq %rbp, %rdi
movq %rbp, %rsi
movq %r13, %rcx
callq 0x17cf0
movq %rax, %r12
leaq (,%rbx,8), %rbx
addq %rbp, %rbx
movq %rbx, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0x17cf0
movq 0x18(%rsp), %rcx
addq %rax, (%rbp,%rcx,8)
movq %rbp, %rdi
movq %rbp, %rsi
movq %rbx, %rdx
movq %r13, %rcx
callq 0x17ed0
movq 0x8(%rsp), %rcx
addq $0x8, %rcx
subq %rax, %r12
js 0x23c8b
addq %r12, (%rcx)
jae 0x23beb
addq $0x1, 0x8(%rcx)
leaq 0x8(%rcx), %rcx
jb 0x23be0
movq %r14, %rdi
shlq $0x5, %rdi
movq (%rsp), %rbx
addq %rbx, %rdi
movq 0x20(%rsp), %r12
movq %r12, %rcx
orq $0x1, %rcx
movq 0x8(%rsp), %rsi
movq 0x50(%rsp), %r13
movq %r13, %rdx
callq 0x17ed0
imulq $0x30, %r14, %rax
leaq (%rbx,%rax), %rdi
movq (%rbx,%rax), %rcx
movq %r13, %rsi
movq %r14, %rdx
callq 0x29e1c
leaq (%r15,%r12,8), %rdx
movq %rdx, %rcx
addq %rax, (%rcx)
jae 0x23c45
addq $0x1, 0x8(%rcx)
leaq 0x8(%rcx), %rcx
jb 0x23c3a
movq 0x28(%rsp), %rdi
movq %rdi, %rsi
movq %r14, %rcx
callq 0x17cf0
cmpq %r14, 0x30(%rsp)
je 0x23c7c
movq 0x18(%rsp), %rcx
addq (%r15,%rcx,8), %rax
shlq $0x6, %r14
addq %r14, %rbx
addq %rax, (%rbx)
jae 0x23c7c
addq $0x1, 0x8(%rbx)
leaq 0x8(%rbx), %rbx
jb 0x23c71
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
subq $0x1, (%rcx)
leaq 0x8(%rcx), %rcx
jb 0x23c8b
jmp 0x23beb