// File: /workspace/github_cpp_makefile_star2_O3/marxn[P]pupp/3rdparty/gmp/gen-trialdivtab.c
// Function: mpn_mod_1s_4p_cps
void
mpn_mod_1s_4p_cps (mpz_t cps[7], mpz_t bparm)
{
  mpz_t b, bi;
  mpz_t B1modb, B2modb, B3modb, B4modb, B5modb;
  mpz_t t;
  int cnt;

  mpz_init_set (b, bparm);

  cnt = limb_bits - mpz_log2 (b);

  mpz_init (bi);
  mpz_init (t);
  mpz_init (B1modb);
  mpz_init (B2modb);
  mpz_init (B3modb);
  mpz_init (B4modb);
  mpz_init (B5modb);

  mpz_set_ui (t, 1);
  mpz_mul_2exp (t, t, limb_bits - cnt);
  mpz_sub (t, t, b);
  mpz_mul_2exp (t, t, limb_bits);
  mpz_tdiv_q (bi, t, b);		/* bi = B^2/b, except msb */

  mpz_set_ui (t, 1);
  mpz_mul_2exp (t, t, limb_bits);	/* t = B */
  mpz_tdiv_r (B1modb, t, b);

  mpz_mul_2exp (t, B1modb, limb_bits);
  mpz_tdiv_r (B2modb, t, b);

  mpz_mul_2exp (t, B2modb, limb_bits);
  mpz_tdiv_r (B3modb, t, b);

  mpz_mul_2exp (t, B3modb, limb_bits);
  mpz_tdiv_r (B4modb, t, b);

  mpz_mul_2exp (t, B4modb, limb_bits);
  mpz_tdiv_r (B5modb, t, b);

  mpz_set (cps[0], bi);
  mpz_set_ui (cps[1], cnt);
  mpz_tdiv_q_2exp (cps[2], B1modb, 0);
  mpz_tdiv_q_2exp (cps[3], B2modb, 0);
  mpz_tdiv_q_2exp (cps[4], B3modb, 0);
  mpz_tdiv_q_2exp (cps[5], B4modb, 0);
  mpz_tdiv_q_2exp (cps[6], B5modb, 0);

  mpz_clear (b);
  mpz_clear (bi);
  mpz_clear (t);
  mpz_clear (B1modb);
  mpz_clear (B2modb);
  mpz_clear (B3modb);
  mpz_clear (B4modb);
  mpz_clear (B5modb);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rsi, %r15
movq %rdi, %rbx
movl $0x1, %r14d
leaq -0xb0(%rbp), %r12
movq %r14, (%r12)
movl $0x8, %edi
callq *0x6197(%rip)           # 0xf0a0
movq %rax, 0x8(%r12)
movq %r12, %rdi
movq %r15, %rsi
callq 0x2482
movl 0x61b1(%rip), %eax      # 0xf0d0
movl %eax, -0x2c(%rbp)
movq %r12, %rdi
callq 0x92e9
movq %rax, -0x38(%rbp)
leaq -0x60(%rbp), %r12
movq %r14, (%r12)
movl $0x8, %edi
callq *0x615f(%rip)           # 0xf0a0
movq %rax, 0x8(%r12)
movl $0x1, %eax
leaq -0xc0(%rbp), %r13
movl %eax, (%r13)
movl $0x8, %edi
callq *0x613f(%rip)           # 0xf0a0
movq %rax, %r12
movq %rax, 0x8(%r13)
leaq -0x50(%rbp), %r15
movq %r14, (%r15)
movl $0x8, %edi
callq *0x6126(%rip)           # 0xf0a0
movq %rax, 0x8(%r15)
leaq -0xa0(%rbp), %r15
movq %r14, (%r15)
movl $0x8, %edi
callq *0x610d(%rip)           # 0xf0a0
movq %rax, 0x8(%r15)
leaq -0x90(%rbp), %r15
movq %r14, (%r15)
movl $0x8, %edi
callq *0x60f4(%rip)           # 0xf0a0
movq %rax, 0x8(%r15)
leaq -0x80(%rbp), %rax
movq %r14, (%rax)
movq %rax, %r15
movl $0x8, %edi
callq *0x60db(%rip)           # 0xf0a0
movq %rax, 0x8(%r15)
leaq -0x70(%rbp), %r15
movq %r14, (%r15)
movl $0x8, %edi
callq *0x60c5(%rip)           # 0xf0a0
movq %rax, 0x8(%r15)
movq %r14, (%r12)
movl $0x1, %r12d
movl %r12d, 0x4(%r13)
movslq 0x60dc(%rip), %rdx      # 0xf0d0
movl -0x2c(%rbp), %eax
subl -0x38(%rbp), %eax
cltq
subq %rax, %rdx
movq %r13, %rdi
movq %r13, %rsi
callq 0x360c
movq %r13, %rdi
movq %r13, %rsi
leaq -0xb0(%rbp), %r15
movq %r15, %rdx
callq 0x33af
movslq 0x60aa(%rip), %rdx      # 0xf0d0
movq %r13, %rdi
movq %r13, %rsi
callq 0x360c
leaq -0x60(%rbp), %rdi
xorl %esi, %esi
movq %r13, %rdx
movq %r15, %rcx
movl $0x2, %r8d
callq 0x3923
movq 0x8(%r13), %rax
movq %r14, (%rax)
movl %r12d, 0x4(%r13)
movslq 0x6076(%rip), %rdx      # 0xf0d0
movq %r13, %rdi
movq %r13, %rsi
callq 0x360c
xorl %edi, %edi
leaq -0x50(%rbp), %r14
movq %r14, %rsi
movq %r13, %rdx
movq %r15, %rcx
movl $0x2, %r8d
callq 0x3923
movslq 0x604a(%rip), %rdx      # 0xf0d0
movq %r13, %rdi
movq %r14, %rsi
callq 0x360c
xorl %edi, %edi
leaq -0xa0(%rbp), %r14
movq %r14, %rsi
movq %r13, %rdx
movq %r15, %rcx
movl $0x2, %r8d
callq 0x3923
movslq 0x601b(%rip), %rdx      # 0xf0d0
movq %r13, %rdi
movq %r14, %rsi
callq 0x360c
xorl %edi, %edi
leaq -0x90(%rbp), %r14
movq %r14, %rsi
movq %r13, %rdx
movq %r15, %rcx
movl $0x2, %r8d
callq 0x3923
movslq 0x5fec(%rip), %rdx      # 0xf0d0
movq %r13, %rdi
movq %r14, %rsi
callq 0x360c
xorl %edi, %edi
leaq -0x80(%rbp), %r14
movq %r14, %rsi
movq %r13, %rdx
movq %r15, %rcx
movl $0x2, %r8d
callq 0x3923
movslq 0x5fc0(%rip), %rdx      # 0xf0d0
movq %r13, %rdi
movq %r14, %rsi
callq 0x360c
xorl %edi, %edi
leaq -0x70(%rbp), %rsi
movq %r13, %rdx
movq %r15, %rcx
movl $0x2, %r8d
callq 0x3923
movq %rbx, %rdi
leaq -0x60(%rbp), %rsi
callq 0x2482
xorl %ecx, %ecx
movl -0x2c(%rbp), %eax
subl -0x38(%rbp), %eax
je 0x9156
cltq
movq 0x18(%rbx), %rcx
movq %rax, (%rcx)
movl $0x1, %ecx
movl %ecx, 0x14(%rbx)
leaq 0x20(%rbx), %rdi
leaq -0x50(%rbp), %rsi
xorl %edx, %edx
movl $0x2, %ecx
callq 0x3e33
leaq 0x30(%rbx), %rdi
leaq -0xa0(%rbp), %r15
movq %r15, %rsi
xorl %edx, %edx
movl $0x2, %ecx
callq 0x3e33
leaq 0x40(%rbx), %rdi
leaq -0x90(%rbp), %r12
movq %r12, %rsi
xorl %edx, %edx
movl $0x2, %ecx
callq 0x3e33
leaq 0x50(%rbx), %rdi
leaq -0x80(%rbp), %r13
movq %r13, %rsi
xorl %edx, %edx
movl $0x2, %ecx
callq 0x3e33
addq $0x60, %rbx
leaq -0x70(%rbp), %r14
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
movl $0x2, %ecx
callq 0x3e33
movq -0xa8(%rbp), %rdi
xorl %esi, %esi
callq *0x5ecf(%rip)           # 0xf0b0
movq -0x58(%rbp), %rdi
xorl %esi, %esi
callq *0x5ec3(%rip)           # 0xf0b0
movq -0xb8(%rbp), %rdi
xorl %esi, %esi
callq *0x5eb4(%rip)           # 0xf0b0
leaq -0x50(%rbp), %rax
movq 0x8(%rax), %rdi
xorl %esi, %esi
callq *0x5ea4(%rip)           # 0xf0b0
movq 0x8(%r15), %rdi
xorl %esi, %esi
callq *0x5e98(%rip)           # 0xf0b0
movq 0x8(%r12), %rdi
xorl %esi, %esi
callq *0x5e8b(%rip)           # 0xf0b0
movq 0x8(%r13), %rdi
xorl %esi, %esi
callq *0x5e7f(%rip)           # 0xf0b0
movq 0x8(%r14), %rdi
xorl %esi, %esi
callq *0x5e73(%rip)           # 0xf0b0
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq