// File: /workspace/github_cpp_makefile_star2_O1/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 *0x65f5(%rip)           # 0xf0a8
movq %rax, 0x8(%r14)
movslq %ebx, %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x539d
leal (%rbx,%rbx), %r13d
movslq %r13d, %rdi
shlq $0x4, %rdi
callq 0x1484
movq %rax, %r14
movq %rax, 0x65e9(%rip)      # 0xf0c8
movl $0x1, %r12d
movq %r12, (%rax)
movl $0x8, %edi
callq *0x65b5(%rip)           # 0xf0a8
movq %rax, 0x8(%r14)
movl $0x1, 0x4(%r14)
movq %r12, (%rax)
movq 0x65bf(%rip), %r14      # 0xf0c8
movq %r12, 0x10(%r14)
movl $0x8, %edi
callq *0x6590(%rip)           # 0xf0a8
movq %rax, 0x18(%r14)
movl %r15d, 0x14(%r14)
movq %r12, -0x40(%rbp)
movl $0x8, %edi
callq *0x6579(%rip)           # 0xf0a8
movq %rax, -0x38(%rbp)
cmpl $0x2, %ebx
jl 0x8c22
cmpl $0x4, %r13d
movl $0x3, %eax
cmovgel %r13d, %eax
shlq $0x4, %rax
movq %rax, -0x30(%rbp)
movl $0x20, %r13d
movl $0x1, %ebx
movq 0x6565(%rip), %r15      # 0xf0c8
movq $0x1, (%r15,%r13)
movl $0x8, %edi
callq *0x6532(%rip)           # 0xf0a8
movq %rax, 0x8(%r15,%r13)
movq 0x6546(%rip), %rax      # 0xf0c8
leaq (%rax,%r13), %rdi
leaq (%rax,%r13), %rsi
addq $-0x10, %rsi
leaq (%rax,%r13), %rdx
addq $-0x20, %rdx
callq 0x312c
movq 0x6526(%rip), %r12      # 0xf0c8
leaq (%r12,%r13), %r15
movq %r15, %rdi
leaq -0x50(%rbp), %r14
movq %r14, %rsi
callq 0x2d6a
testl %eax, %eax
jns 0x8c41
leal 0x2(%rbx), %eax
movl %eax, 0x650a(%rip)      # 0xf0d0
movl %ebx, 0x6508(%rip)      # 0xf0d4
leaq (%r12,%r13), %rdx
addq $-0x10, %rdx
leaq -0x40(%rbp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x312c
movq 0x64de(%rip), %rax      # 0xf0c8
leaq (%rax,%r13), %rdx
addq $-0x10, %rdx
movq %r12, %rdi
movq %r12, %rsi
callq 0x312c
movq %r12, %rdi
movq %r14, %rsi
callq 0x2d6a
testl %eax, %eax
jns 0x8c12
movl %ebx, 0x64c6(%rip)      # 0xf0d8
addq $0x10, %r13
incl %ebx
cmpq %r13, -0x30(%rbp)
jne 0x8b5c
leaq 0x1eba(%rip), %rdi      # 0xaae3
leaq 0x1ebe(%rip), %rsi      # 0xaaee
leaq 0x1ec1(%rip), %rcx      # 0xaaf8
movl $0x39, %edx
callq 0x1090
movq 0x6470(%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