// File: /workspace/github_cpp_makefile_star2_O3/marxn[P]pupp/3rdparty/gmp/gen-fib.c
// Function: generate
void
generate (int numb_bits)
{
  mpz_t  limit, l;
  int    falloc, i;

  mpz_init2 (limit, numb_bits + 1);
  mpz_setbit (limit, numb_bits);

  /* fib(2n) > 2^n, so use 2n as a limit for the table size */
  falloc = 2 * numb_bits;
  f = (mpz_t*) xmalloc (falloc * sizeof (*f));

  mpz_init_set_ui (f[0], 1L);  /* F[-1] */
  mpz_init_set_ui (f[1], 0L);  /* F[0] */

  mpz_init (l);

  for (i = 2; ; i++)
    {
      assert (i < falloc);

      /* F[i] = F[i-1] + F[i-2] */
      mpz_init (f[i]);
      mpz_add (f[i], f[i-1], f[i-2]);
      if (mpz_cmp (f[i], limit) >= 0)
        break;

      fnum = i+1;
      fib_limit = i-1;

      /* L[i] = F[i]+2*F[i-1] */
      mpz_add (l, f[i], f[i-1]);
      mpz_add (l, l, f[i-1]);

      if (mpz_cmp (l, limit) < 0)
        luc_limit = i-1;
    }

  mpz_clear (limit);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edi, %ebx
leal 0x1(%rbx), %eax
cltq
cmpl $0x1, %eax
adcq $-0x1, %rax
shrq $0x6, %rax
leaq 0x1(%rax), %rcx
leaq -0x50(%rbp), %r14
movl %ecx, (%r14)
xorl %r15d, %r15d
movl %r15d, 0x4(%r14)
leaq 0x8(,%rax,8), %rdi
callq *0x675f(%rip)           # 0xf0a8
movq %rax, 0x8(%r14)
movslq %ebx, %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x5335
leal (%rbx,%rbx), %r12d
movslq %r12d, %rdi
shlq $0x4, %rdi
callq 0x1484
movq %rax, %r14
movq %rax, 0x6753(%rip)      # 0xf0c8
movl $0x1, %r13d
movq %r13, (%rax)
movl $0x8, %edi
callq *0x671f(%rip)           # 0xf0a8
movq %rax, 0x8(%r14)
movq %r13, (%rax)
movl $0x1, 0x4(%r14)
movq 0x6729(%rip), %r14      # 0xf0c8
movq %r13, 0x10(%r14)
movl $0x8, %edi
callq *0x66fa(%rip)           # 0xf0a8
movq %rax, 0x18(%r14)
movl %r15d, 0x14(%r14)
movq %r13, -0x40(%rbp)
movl $0x8, %edi
callq *0x66e3(%rip)           # 0xf0a8
movq %rax, -0x38(%rbp)
cmpl $0x2, %ebx
jl 0x8ab4
movl %r12d, %eax
shlq $0x4, %rax
movq %rax, -0x30(%rbp)
movl $0x20, %r13d
movl $0x1, %r12d
movq 0x66d8(%rip), %rbx      # 0xf0c8
movq $0x1, (%rbx,%r13)
movl $0x8, %edi
callq *0x66a5(%rip)           # 0xf0a8
movq %rax, 0x8(%rbx,%r13)
movq 0x66b9(%rip), %rax      # 0xf0c8
leaq (%rax,%r13), %rdi
leaq (%rax,%r13), %rsi
addq $-0x10, %rsi
leaq (%rax,%r13), %rdx
addq $-0x20, %rdx
callq 0x30f3
movq 0x6699(%rip), %rbx      # 0xf0c8
leaq (%rbx,%r13), %r15
movq %r15, %rdi
leaq -0x50(%rbp), %r14
movq %r14, %rsi
callq 0x2d2b
testl %eax, %eax
jns 0x8ad3
leal 0x2(%r12), %eax
movl %eax, 0x667b(%rip)      # 0xf0d0
movl %r12d, 0x6678(%rip)     # 0xf0d4
leaq (%rbx,%r13), %rdx
addq $-0x10, %rdx
leaq -0x40(%rbp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x30f3
movq 0x664e(%rip), %rax      # 0xf0c8
leaq (%rax,%r13), %rdx
addq $-0x10, %rdx
movq %rbx, %rdi
movq %rbx, %rsi
callq 0x30f3
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2d2b
testl %eax, %eax
jns 0x8aa3
movl %r12d, 0x6635(%rip)     # 0xf0d8
addq $0x10, %r13
incl %r12d
cmpq %r13, -0x30(%rbp)
jne 0x89e9
leaq 0x2028(%rip), %rdi      # 0xaae3
leaq 0x202c(%rip), %rsi      # 0xaaee
leaq 0x202f(%rip), %rcx      # 0xaaf8
movl $0x39, %edx
callq 0x1090
movq 0x65de(%rip), %rax      # 0xf0b8
movq -0x48(%rbp), %rdi
xorl %esi, %esi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%rax