// File: /workspace/github_cpp_makefile_star2_O2/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 $0x38, %rsp
movl %edi, %r14d
leal 0x1(%r14), %eax
movslq %eax, %rsi
leaq -0x60(%rbp), %r12
movq %r12, %rdi
callq 0x21ac
movslq %r14d, %r14
movq %r12, %rdi
movq %r14, %rsi
callq 0x497f
addl %r14d, %r14d
movslq %r14d, %rdi
movq %rdi, -0x30(%rbp)
shlq $0x4, %rdi
callq 0x1294
movq %rax, %r15
movq %rax, 0x67e0(%rip)      # 0xe0c0
pushq $0x1
popq %rbx
movq %rbx, (%rax)
pushq $0x8
popq %r13
movq %r13, %rdi
callq *0x67ad(%rip)           # 0xe0a0
movq %rax, 0x8(%r15)
movq %rbx, (%rax)
movl $0x1, 0x4(%r15)
movq 0x67b7(%rip), %r14      # 0xe0c0
movq %rbx, 0x10(%r14)
movq %r13, %rdi
callq *0x678a(%rip)           # 0xe0a0
movq %rax, 0x18(%r14)
andl $0x0, 0x14(%r14)
leaq -0x50(%rbp), %r14
movq %rbx, (%r14)
movq %r13, %rdi
callq *0x6771(%rip)           # 0xe0a0
movq %rax, 0x8(%r14)
pushq $0x2
popq %rax
pushq $0x20
popq %rbx
pushq $0x1
popq %r13
movq %rax, -0x38(%rbp)
cmpq -0x30(%rbp), %rax
jge 0x7a30
movq %r12, %r14
movq 0x676b(%rip), %r15      # 0xe0c0
movq $0x1, (%r15,%rbx)
pushq $0x8
popq %rdi
callq *0x673a(%rip)           # 0xe0a0
movq %rax, 0x8(%r15,%rbx)
movq 0x674e(%rip), %rax      # 0xe0c0
leaq (%rax,%rbx), %rdi
leaq (%rax,%rbx), %rsi
addq $-0x10, %rsi
leaq (%rax,%rbx), %rdx
addq $-0x20, %rdx
callq 0x2c4d
movq 0x672e(%rip), %r15      # 0xe0c0
leaq (%r15,%rbx), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x2973
testl %eax, %eax
jns 0x7a13
leal 0x2(%r13), %eax
movl %eax, 0x6719(%rip)      # 0xe0c8
movl %r13d, 0x6716(%rip)     # 0xe0cc
leaq (%r15,%rbx), %rdx
addq $-0x10, %rdx
leaq -0x50(%rbp), %r15
movq %r15, %rdi
movq %r12, %rsi
callq 0x2c4d
movq 0x66ec(%rip), %rax      # 0xe0c0
leaq (%rax,%rbx), %rdx
addq $-0x10, %rdx
movq %r15, %rdi
movq %r15, %rsi
callq 0x2c4d
movq %r15, %rdi
movq %r14, %rsi
callq 0x2973
testl %eax, %eax
movq %r14, %r12
jns 0x7a00
movl %r13d, 0x66d0(%rip)     # 0xe0d0
addq $0x10, %rbx
incl %r13d
movq -0x38(%rbp), %rax
incq %rax
jmp 0x793d
movq 0x6696(%rip), %rax      # 0xe0b0
movq -0x58(%rbp), %rdi
xorl %esi, %esi
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%rax
leaq 0x20ac(%rip), %rdi      # 0x9ae3
leaq 0x20b0(%rip), %rsi      # 0x9aee
leaq 0x20b3(%rip), %rcx      # 0x9af8
pushq $0x39
popq %rdx
callq 0x1090