// File: /workspace/github_cpp_makefile_star2_O2/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 $0xa8, %rsp
movq %rdi, -0x68(%rbp)
leaq -0xc0(%rbp), %rbx
movq %rbx, %rdi
callq 0x2340
movl 0x622f(%rip), %eax      # 0xe0c0
movl %eax, -0x2c(%rbp)
movq %rbx, %rdi
callq 0x81fb
movq %rax, -0x38(%rbp)
pushq $0x1
popq %rbx
leaq -0x60(%rbp), %r15
movq %rbx, (%r15)
pushq $0x8
popq %r12
movq %r12, %rdi
callq *0x61e1(%rip)           # 0xe098
movq %rax, 0x8(%r15)
pushq $0x1
popq %rax
leaq -0xd0(%rbp), %r13
movl %eax, (%r13)
movq %r12, %rdi
callq *0x61c6(%rip)           # 0xe098
movq %rax, %r15
movq %rax, 0x8(%r13)
leaq -0x50(%rbp), %r14
movq %rbx, (%r14)
movq %r12, %rdi
callq *0x61af(%rip)           # 0xe098
movq %rax, 0x8(%r14)
leaq -0xb0(%rbp), %r14
movq %rbx, (%r14)
movq %r12, %rdi
callq *0x6198(%rip)           # 0xe098
movq %rax, 0x8(%r14)
leaq -0xa0(%rbp), %r14
movq %rbx, (%r14)
movq %r12, %rdi
callq *0x6181(%rip)           # 0xe098
movq %rax, 0x8(%r14)
leaq -0x90(%rbp), %rax
movq %rbx, (%rax)
movq %rax, %r14
movq %r12, %rdi
callq *0x6167(%rip)           # 0xe098
movq %rax, 0x8(%r14)
leaq -0x80(%rbp), %r14
movq %rbx, (%r14)
movq %r12, %rdi
callq *0x6153(%rip)           # 0xe098
movq %rax, 0x8(%r14)
movq %rbx, (%r15)
pushq $0x1
popq %r14
movl %r14d, 0x4(%r13)
movslq 0x6165(%rip), %rdx      # 0xe0c0
movl -0x2c(%rbp), %r15d
movl %r15d, %eax
subl -0x38(%rbp), %eax
cltq
subq %rax, %rdx
movq %r13, %rdi
movq %r13, %rsi
callq 0x304c
movq %r13, %rdi
movq %r13, %rsi
leaq -0xc0(%rbp), %r12
movq %r12, %rdx
callq 0x2e4a
movslq 0x612f(%rip), %rdx      # 0xe0c0
movq %r13, %rdi
movq %r13, %rsi
callq 0x304c
leaq -0x60(%rbp), %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x36c3
movq 0x8(%r13), %rax
movq %rbx, (%rax)
movq -0x68(%rbp), %rbx
movl %r14d, 0x4(%r13)
movslq 0x60ff(%rip), %rdx      # 0xe0c0
movq %r13, %rdi
movq %r13, %rsi
callq 0x304c
leaq -0x50(%rbp), %r14
movq %r14, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x370e
movslq 0x60db(%rip), %rdx      # 0xe0c0
movq %r13, %rdi
movq %r14, %rsi
callq 0x304c
leaq -0xb0(%rbp), %r14
movq %r14, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x370e
movslq 0x60b4(%rip), %rdx      # 0xe0c0
movq %r13, %rdi
movq %r14, %rsi
callq 0x304c
leaq -0xa0(%rbp), %r14
movq %r14, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x370e
movslq 0x608d(%rip), %rdx      # 0xe0c0
movq %r13, %rdi
movq %r14, %rsi
callq 0x304c
leaq -0x90(%rbp), %r14
movq %r14, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x370e
movslq 0x6066(%rip), %rdx      # 0xe0c0
movq %r13, %rdi
movq %r14, %rsi
callq 0x304c
leaq -0x80(%rbp), %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x370e
movq %rbx, %rdi
leaq -0x60(%rbp), %rsi
callq 0x2236
movl %r15d, %ecx
xorl %eax, %eax
subl -0x38(%rbp), %ecx
je 0x8097
movslq %ecx, %rax
movq 0x18(%rbx), %rcx
movq %rax, (%rcx)
pushq $0x1
popq %rax
movl %eax, 0x14(%rbx)
leaq 0x20(%rbx), %rdi
leaq -0x50(%rbp), %rsi
xorl %edx, %edx
callq 0x38a6
leaq 0x30(%rbx), %rdi
leaq -0xb0(%rbp), %r15
movq %r15, %rsi
xorl %edx, %edx
callq 0x38a6
leaq 0x40(%rbx), %rdi
leaq -0xa0(%rbp), %r12
movq %r12, %rsi
xorl %edx, %edx
callq 0x38a6
leaq 0x50(%rbx), %rdi
leaq -0x90(%rbp), %r13
movq %r13, %rsi
xorl %edx, %edx
callq 0x38a6
addq $0x60, %rbx
leaq -0x80(%rbp), %r14
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x38a6
movq -0xb8(%rbp), %rdi
xorl %esi, %esi
callq *0x5f9c(%rip)           # 0xe0a8
movq -0x58(%rbp), %rdi
xorl %esi, %esi
callq *0x5f90(%rip)           # 0xe0a8
movq -0xc8(%rbp), %rdi
xorl %esi, %esi
callq *0x5f81(%rip)           # 0xe0a8
leaq -0x50(%rbp), %rax
movq 0x8(%rax), %rdi
xorl %esi, %esi
callq *0x5f71(%rip)           # 0xe0a8
movq 0x8(%r15), %rdi
xorl %esi, %esi
callq *0x5f65(%rip)           # 0xe0a8
movq 0x8(%r12), %rdi
xorl %esi, %esi
callq *0x5f58(%rip)           # 0xe0a8
movq 0x8(%r13), %rdi
xorl %esi, %esi
callq *0x5f4c(%rip)           # 0xe0a8
movq 0x8(%r14), %rdi
xorl %esi, %esi
callq *0x5f40(%rip)           # 0xe0a8
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq