#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef int /*<<< orphan*/ mpz_t;

/* Variables and functions */
int /*<<< orphan*/ mpz_add(int /*<<< orphan*/, int /*<<< orphan*/,
                           int /*<<< orphan*/);
scalar_t__ mpz_cmp(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ mpz_div(int /*<<< orphan*/, int /*<<< orphan*/,
                           int /*<<< orphan*/);
int /*<<< orphan*/ mpz_init(int /*<<< orphan*/);
int /*<<< orphan*/ mpz_init_set(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ mpz_init_set_ui(int /*<<< orphan*/, int);
int /*<<< orphan*/ mpz_mul(int /*<<< orphan*/, int /*<<< orphan*/,
                           int /*<<< orphan*/);
int /*<<< orphan*/ mpz_mul_ui(int /*<<< orphan*/, int /*<<< orphan*/, int);
scalar_t__ mpz_perfect_square_p(int /*<<< orphan*/);
int /*<<< orphan*/ mpz_set(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ mpz_set_ui(int /*<<< orphan*/, int);
int /*<<< orphan*/ mpz_sqrt(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ mpz_sub(int /*<<< orphan*/, int /*<<< orphan*/,
                           int /*<<< orphan*/);
int /*<<< orphan*/ mpz_ui_sub(int /*<<< orphan*/, int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  int result = 0;
  mpz_t pmax;
  mpz_init_set_ui(pmax, 0);
  mpz_t mul1, mul2, mul3, sub1, add1;
  mpz_init_set_ui(mul1, 0);
  mpz_init_set_ui(mul2, 0);
  mpz_init_set_ui(mul3, 0);
  mpz_init_set_ui(sub1, 0);
  mpz_init_set_ui(add1, 0);
  mpz_t mpz_D;
  mpz_init(mpz_D);
  mpz_t one;
  mpz_init_set_ui(one, 1);
  for (int D = 2; D <= 1000; D++) {
    mpz_set_ui(mpz_D, D);
    if (mpz_perfect_square_p(mpz_D)) {
      continue;
    }
    mpz_t limit;
    mpz_init(limit);
    mpz_sqrt(limit, mpz_D);
    mpz_t m;
    mpz_t d;
    mpz_t a;
    mpz_init_set_ui(m, 0);
    mpz_init_set_ui(d, 1);
    mpz_init_set(a, limit);
    mpz_t num;
    mpz_t numm1;
    mpz_t numm2;
    mpz_init_set(num, a);
    mpz_init_set_ui(numm1, 1);
    mpz_init(numm2);
    mpz_t den;
    mpz_t denm1;
    mpz_t denm2;
    mpz_init_set_ui(den, 1);
    mpz_init_set_ui(denm1, 0);
    mpz_init(denm2);
    while (1) {
      mpz_mul(mul1, num, num);
      mpz_mul(mul2, den, den);
      mpz_mul_ui(mul3, mul2, D);
      mpz_sub(sub1, mul1, mul3);
      if (!mpz_cmp(sub1, one)) {
        break;
      }
      mpz_mul(mul1, d, a);
      mpz_sub(m, mul1, m);
      mpz_mul(mul1, m, m);
      mpz_ui_sub(sub1, D, mul1);
      mpz_div(d, sub1, d);
      mpz_add(add1, limit, m);
      mpz_div(a, add1, d);
      mpz_set(numm2, numm1);
      mpz_set(numm1, num);
      mpz_set(denm2, denm1);
      mpz_set(denm1, den);
      mpz_mul(mul1, a, numm1);
      mpz_add(num, mul1, numm2);
      mpz_mul(mul1, a, denm1);
      mpz_add(den, mul1, denm2);
    }
    if (mpz_cmp(num, pmax) > 0) {
      mpz_set(pmax, num);
      result = D;
    }
  }
  printf("%i", result);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x18(%rbp),%edi
xor    %esi,%esi
call   10c0 <mpz_init_set_ui@plt>
mov    -0x1c(%rbp),%edi
xor    %esi,%esi
call   10c0 <mpz_init_set_ui@plt>
mov    -0x20(%rbp),%edi
xor    %esi,%esi
call   10c0 <mpz_init_set_ui@plt>
mov    -0x24(%rbp),%edi
xor    %esi,%esi
call   10c0 <mpz_init_set_ui@plt>
mov    -0x28(%rbp),%edi
xor    %esi,%esi
call   10c0 <mpz_init_set_ui@plt>
mov    -0x2c(%rbp),%edi
xor    %esi,%esi
call   10c0 <mpz_init_set_ui@plt>
mov    -0x30(%rbp),%edi
call   1090 <mpz_init@plt>
mov    -0x34(%rbp),%edi
mov    $0x1,%esi
call   10c0 <mpz_init_set_ui@plt>
movl   $0x2,-0x38(%rbp)
cmpl   $0x3e8,-0x38(%rbp)
jg     145e <main+0x26e>
mov    -0x30(%rbp),%edi
mov    -0x38(%rbp),%esi
call   10f0 <mpz_set_ui@plt>
mov    -0x30(%rbp),%edi
call   1050 <mpz_perfect_square_p@plt>
cmp    $0x0,%rax
je     1294 <main+0xa4>
jmp    1450 <main+0x260>
mov    -0x3c(%rbp),%edi
call   1090 <mpz_init@plt>
mov    -0x3c(%rbp),%edi
mov    -0x30(%rbp),%esi
call   10d0 <mpz_sqrt@plt>
mov    -0x40(%rbp),%edi
xor    %esi,%esi
call   10c0 <mpz_init_set_ui@plt>
mov    -0x44(%rbp),%edi
mov    $0x1,%esi
call   10c0 <mpz_init_set_ui@plt>
mov    -0x48(%rbp),%edi
mov    -0x3c(%rbp),%esi
call   1100 <mpz_init_set@plt>
mov    -0x4c(%rbp),%edi
mov    -0x48(%rbp),%esi
call   1100 <mpz_init_set@plt>
mov    -0x50(%rbp),%edi
mov    $0x1,%esi
call   10c0 <mpz_init_set_ui@plt>
mov    -0x54(%rbp),%edi
call   1090 <mpz_init@plt>
mov    -0x58(%rbp),%edi
mov    $0x1,%esi
call   10c0 <mpz_init_set_ui@plt>
mov    -0x5c(%rbp),%edi
xor    %esi,%esi
call   10c0 <mpz_init_set_ui@plt>
mov    -0x60(%rbp),%edi
call   1090 <mpz_init@plt>
mov    -0x1c(%rbp),%edi
mov    -0x4c(%rbp),%esi
mov    -0x4c(%rbp),%edx
call   10b0 <mpz_mul@plt>
mov    -0x20(%rbp),%edi
mov    -0x58(%rbp),%esi
mov    -0x58(%rbp),%edx
call   10b0 <mpz_mul@plt>
mov    -0x24(%rbp),%edi
mov    -0x20(%rbp),%esi
mov    -0x38(%rbp),%edx
call   1110 <mpz_mul_ui@plt>
mov    -0x28(%rbp),%edi
mov    -0x1c(%rbp),%esi
mov    -0x24(%rbp),%edx
call   1070 <mpz_sub@plt>
mov    -0x28(%rbp),%edi
mov    -0x34(%rbp),%esi
call   10e0 <mpz_cmp@plt>
cmp    $0x0,%rax
jne    135a <main+0x16a>
jmp    1425 <main+0x235>
mov    -0x1c(%rbp),%edi
mov    -0x44(%rbp),%esi
mov    -0x48(%rbp),%edx
call   10b0 <mpz_mul@plt>
mov    -0x40(%rbp),%edi
mov    -0x1c(%rbp),%esi
mov    -0x40(%rbp),%edx
call   1070 <mpz_sub@plt>
mov    -0x1c(%rbp),%edi
mov    -0x40(%rbp),%esi
mov    -0x40(%rbp),%edx
call   10b0 <mpz_mul@plt>
mov    -0x28(%rbp),%edi
mov    -0x38(%rbp),%esi
mov    -0x1c(%rbp),%edx
call   1040 <mpz_ui_sub@plt>
mov    -0x44(%rbp),%edi
mov    -0x28(%rbp),%esi
mov    -0x44(%rbp),%edx
call   1030 <mpz_div@plt>
mov    -0x2c(%rbp),%edi
mov    -0x3c(%rbp),%esi
mov    -0x40(%rbp),%edx
call   10a0 <mpz_add@plt>
mov    -0x48(%rbp),%edi
mov    -0x2c(%rbp),%esi
mov    -0x44(%rbp),%edx
call   1030 <mpz_div@plt>
mov    -0x54(%rbp),%edi
mov    -0x50(%rbp),%esi
call   1060 <mpz_set@plt>
mov    -0x50(%rbp),%edi
mov    -0x4c(%rbp),%esi
call   1060 <mpz_set@plt>
mov    -0x60(%rbp),%edi
mov    -0x5c(%rbp),%esi
call   1060 <mpz_set@plt>
mov    -0x5c(%rbp),%edi
mov    -0x58(%rbp),%esi
call   1060 <mpz_set@plt>
mov    -0x1c(%rbp),%edi
mov    -0x48(%rbp),%esi
mov    -0x50(%rbp),%edx
call   10b0 <mpz_mul@plt>
mov    -0x4c(%rbp),%edi
mov    -0x1c(%rbp),%esi
mov    -0x54(%rbp),%edx
call   10a0 <mpz_add@plt>
mov    -0x1c(%rbp),%edi
mov    -0x48(%rbp),%esi
mov    -0x5c(%rbp),%edx
call   10b0 <mpz_mul@plt>
mov    -0x58(%rbp),%edi
mov    -0x1c(%rbp),%esi
mov    -0x60(%rbp),%edx
call   10a0 <mpz_add@plt>
jmp    1308 <main+0x118>
mov    -0x4c(%rbp),%edi
mov    -0x18(%rbp),%esi
call   10e0 <mpz_cmp@plt>
cmp    $0x0,%rax
jle    144b <main+0x25b>
mov    -0x18(%rbp),%edi
mov    -0x4c(%rbp),%esi
call   1060 <mpz_set@plt>
mov    -0x38(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    1450 <main+0x260>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1265 <main+0x75>
mov    -0x14(%rbp),%esi
lea    0xb98(%rip),%rdi
call   1080 <printf@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
xor    %ebx,%ebx
xor    %esi,%esi
call   10c0 <mpz_init_set_ui@plt>
xor    %esi,%esi
call   10c0 <mpz_init_set_ui@plt>
xor    %esi,%esi
call   10c0 <mpz_init_set_ui@plt>
xor    %esi,%esi
call   10c0 <mpz_init_set_ui@plt>
xor    %esi,%esi
call   10c0 <mpz_init_set_ui@plt>
xor    %esi,%esi
call   10c0 <mpz_init_set_ui@plt>
call   1090 <mpz_init@plt>
mov    $0x1,%esi
call   10c0 <mpz_init_set_ui@plt>
mov    $0x2,%ebp
jmp    124f <main+0x5f>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%ebp
cmp    $0x3e9,%ebp
je     133a <main+0x14a>
mov    %ebp,%esi
call   10f0 <mpz_set_ui@plt>
call   1050 <mpz_perfect_square_p@plt>
test   %rax,%rax
jne    1240 <main+0x50>
call   1090 <mpz_init@plt>
call   10d0 <mpz_sqrt@plt>
xor    %esi,%esi
call   10c0 <mpz_init_set_ui@plt>
mov    $0x1,%esi
call   10c0 <mpz_init_set_ui@plt>
call   1100 <mpz_init_set@plt>
call   1100 <mpz_init_set@plt>
mov    $0x1,%esi
call   10c0 <mpz_init_set_ui@plt>
call   1090 <mpz_init@plt>
mov    $0x1,%esi
call   10c0 <mpz_init_set_ui@plt>
xor    %esi,%esi
call   10c0 <mpz_init_set_ui@plt>
call   1090 <mpz_init@plt>
nopw   0x0(%rax,%rax,1)
call   10b0 <mpz_mul@plt>
call   10b0 <mpz_mul@plt>
mov    %ebp,%edx
call   1110 <mpz_mul_ui@plt>
call   1070 <mpz_sub@plt>
call   10e0 <mpz_cmp@plt>
test   %rax,%rax
je     1320 <main+0x130>
call   10b0 <mpz_mul@plt>
call   1070 <mpz_sub@plt>
call   10b0 <mpz_mul@plt>
mov    %ebp,%esi
call   1040 <mpz_ui_sub@plt>
call   1030 <mpz_div@plt>
call   10a0 <mpz_add@plt>
call   1030 <mpz_div@plt>
call   1060 <mpz_set@plt>
call   1060 <mpz_set@plt>
call   1060 <mpz_set@plt>
call   1060 <mpz_set@plt>
call   10b0 <mpz_mul@plt>
call   10a0 <mpz_add@plt>
call   10b0 <mpz_mul@plt>
call   10a0 <mpz_add@plt>
jmp    12b0 <main+0xc0>
nop
call   10e0 <mpz_cmp@plt>
test   %rax,%rax
jle    1240 <main+0x50>
call   1060 <mpz_set@plt>
mov    %ebp,%ebx
jmp    1240 <main+0x50>
lea    0xcbf(%rip),%rdi
mov    %ebx,%esi
call   1080 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%i\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
%23 = alloca i32
%24 = alloca i32
%25 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
%26 = load i32, i32* %7
%27 = call i32 @mpz_init_set_ui(i32 %26, i32 0)
%28 = load i32, i32* %8
%29 = call i32 @mpz_init_set_ui(i32 %28, i32 0)
%30 = load i32, i32* %9
%31 = call i32 @mpz_init_set_ui(i32 %30, i32 0)
%32 = load i32, i32* %10
%33 = call i32 @mpz_init_set_ui(i32 %32, i32 0)
%34 = load i32, i32* %11
%35 = call i32 @mpz_init_set_ui(i32 %34, i32 0)
%36 = load i32, i32* %12
%37 = call i32 @mpz_init_set_ui(i32 %36, i32 0)
%38 = load i32, i32* %13
%39 = call i32 @mpz_init(i32 %38)
%40 = load i32, i32* %14
%41 = call i32 @mpz_init_set_ui(i32 %40, i32 1)
store i32 2, i32* %15
br label %42
42: ; preds = %169, %2
%43 = load i32, i32* %15
%44 = icmp sle i32 %43, 1000
br i1 %44, label %45, label %172
45: ; preds = %42
%46 = load i32, i32* %13
%47 = load i32, i32* %15
%48 = call i32 @mpz_set_ui(i32 %46, i32 %47)
%49 = load i32, i32* %13
%50 = call i64 @mpz_perfect_square_p(i32 %49)
%51 = icmp ne i64 %50, 0
br i1 %51, label %52, label %53
52: ; preds = %45
br label %169
53: ; preds = %45
%54 = load i32, i32* %16
%55 = call i32 @mpz_init(i32 %54)
%56 = load i32, i32* %16
%57 = load i32, i32* %13
%58 = call i32 @mpz_sqrt(i32 %56, i32 %57)
%59 = load i32, i32* %17
%60 = call i32 @mpz_init_set_ui(i32 %59, i32 0)
%61 = load i32, i32* %18
%62 = call i32 @mpz_init_set_ui(i32 %61, i32 1)
%63 = load i32, i32* %19
%64 = load i32, i32* %16
%65 = call i32 @mpz_init_set(i32 %63, i32 %64)
%66 = load i32, i32* %20
%67 = load i32, i32* %19
%68 = call i32 @mpz_init_set(i32 %66, i32 %67)
%69 = load i32, i32* %21
%70 = call i32 @mpz_init_set_ui(i32 %69, i32 1)
%71 = load i32, i32* %22
%72 = call i32 @mpz_init(i32 %71)
%73 = load i32, i32* %23
%74 = call i32 @mpz_init_set_ui(i32 %73, i32 1)
%75 = load i32, i32* %24
%76 = call i32 @mpz_init_set_ui(i32 %75, i32 0)
%77 = load i32, i32* %25
%78 = call i32 @mpz_init(i32 %77)
br label %79
79: ; preds = %53, %101
%80 = load i32, i32* %8
%81 = load i32, i32* %20
%82 = load i32, i32* %20
%83 = call i32 @mpz_mul(i32 %80, i32 %81, i32 %82)
%84 = load i32, i32* %9
%85 = load i32, i32* %23
%86 = load i32, i32* %23
%87 = call i32 @mpz_mul(i32 %84, i32 %85, i32 %86)
%88 = load i32, i32* %10
%89 = load i32, i32* %9
%90 = load i32, i32* %15
%91 = call i32 @mpz_mul_ui(i32 %88, i32 %89, i32 %90)
%92 = load i32, i32* %11
%93 = load i32, i32* %8
%94 = load i32, i32* %10
%95 = call i32 @mpz_sub(i32 %92, i32 %93, i32 %94)
%96 = load i32, i32* %11
%97 = load i32, i32* %14
%98 = call i64 @mpz_cmp(i32 %96, i32 %97)
%99 = icmp ne i64 %98, 0
br i1 %99, label %101, label %100
100: ; preds = %79
br label %158
101: ; preds = %79
%102 = load i32, i32* %8
%103 = load i32, i32* %18
%104 = load i32, i32* %19
%105 = call i32 @mpz_mul(i32 %102, i32 %103, i32 %104)
%106 = load i32, i32* %17
%107 = load i32, i32* %8
%108 = load i32, i32* %17
%109 = call i32 @mpz_sub(i32 %106, i32 %107, i32 %108)
%110 = load i32, i32* %8
%111 = load i32, i32* %17
%112 = load i32, i32* %17
%113 = call i32 @mpz_mul(i32 %110, i32 %111, i32 %112)
%114 = load i32, i32* %11
%115 = load i32, i32* %15
%116 = load i32, i32* %8
%117 = call i32 @mpz_ui_sub(i32 %114, i32 %115, i32 %116)
%118 = load i32, i32* %18
%119 = load i32, i32* %11
%120 = load i32, i32* %18
%121 = call i32 @mpz_div(i32 %118, i32 %119, i32 %120)
%122 = load i32, i32* %12
%123 = load i32, i32* %16
%124 = load i32, i32* %17
%125 = call i32 @mpz_add(i32 %122, i32 %123, i32 %124)
%126 = load i32, i32* %19
%127 = load i32, i32* %12
%128 = load i32, i32* %18
%129 = call i32 @mpz_div(i32 %126, i32 %127, i32 %128)
%130 = load i32, i32* %22
%131 = load i32, i32* %21
%132 = call i32 @mpz_set(i32 %130, i32 %131)
%133 = load i32, i32* %21
%134 = load i32, i32* %20
%135 = call i32 @mpz_set(i32 %133, i32 %134)
%136 = load i32, i32* %25
%137 = load i32, i32* %24
%138 = call i32 @mpz_set(i32 %136, i32 %137)
%139 = load i32, i32* %24
%140 = load i32, i32* %23
%141 = call i32 @mpz_set(i32 %139, i32 %140)
%142 = load i32, i32* %8
%143 = load i32, i32* %19
%144 = load i32, i32* %21
%145 = call i32 @mpz_mul(i32 %142, i32 %143, i32 %144)
%146 = load i32, i32* %20
%147 = load i32, i32* %8
%148 = load i32, i32* %22
%149 = call i32 @mpz_add(i32 %146, i32 %147, i32 %148)
%150 = load i32, i32* %8
%151 = load i32, i32* %19
%152 = load i32, i32* %24
%153 = call i32 @mpz_mul(i32 %150, i32 %151, i32 %152)
%154 = load i32, i32* %23
%155 = load i32, i32* %8
%156 = load i32, i32* %25
%157 = call i32 @mpz_add(i32 %154, i32 %155, i32 %156)
br label %79
158: ; preds = %100
%159 = load i32, i32* %20
%160 = load i32, i32* %7
%161 = call i64 @mpz_cmp(i32 %159, i32 %160)
%162 = icmp sgt i64 %161, 0
br i1 %162, label %163, label %168
163: ; preds = %158
%164 = load i32, i32* %7
%165 = load i32, i32* %20
%166 = call i32 @mpz_set(i32 %164, i32 %165)
%167 = load i32, i32* %15
store i32 %167, i32* %6
br label %168
168: ; preds = %163, %158
br label %169
169: ; preds = %168, %52
%170 = load i32, i32* %15
%171 = add nsw i32 %170, 1
store i32 %171, i32* %15
br label %42
172: ; preds = %42
%173 = load i32, i32* %6
%174 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %173)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%i\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @mpz_init_set_ui(i32 undef, i32 0)
%4 = tail call i32 @mpz_init_set_ui(i32 undef, i32 0)
%5 = tail call i32 @mpz_init_set_ui(i32 undef, i32 0)
%6 = tail call i32 @mpz_init_set_ui(i32 undef, i32 0)
%7 = tail call i32 @mpz_init_set_ui(i32 undef, i32 0)
%8 = tail call i32 @mpz_init_set_ui(i32 undef, i32 0)
%9 = tail call i32 @mpz_init(i32 undef)
%10 = tail call i32 @mpz_init_set_ui(i32 undef, i32 1)
br label %13
11: ; preds = %59
%12 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %60)
ret i32 0
13: ; preds = %2, %59
%14 = phi i32 [ 2, %2 ], [ %61, %59 ]
%15 = phi i32 [ 0, %2 ], [ %60, %59 ]
%16 = tail call i32 @mpz_set_ui(i32 undef, i32 %14)
%17 = tail call i64 @mpz_perfect_square_p(i32 undef)
%18 = icmp eq i64 %17, 0
br i1 %18, label %19, label %59
19: ; preds = %13
%20 = tail call i32 @mpz_init(i32 undef)
%21 = tail call i32 @mpz_sqrt(i32 undef, i32 undef)
%22 = tail call i32 @mpz_init_set_ui(i32 undef, i32 0)
%23 = tail call i32 @mpz_init_set_ui(i32 undef, i32 1)
%24 = tail call i32 @mpz_init_set(i32 undef, i32 undef)
%25 = tail call i32 @mpz_init_set(i32 undef, i32 undef)
%26 = tail call i32 @mpz_init_set_ui(i32 undef, i32 1)
%27 = tail call i32 @mpz_init(i32 undef)
%28 = tail call i32 @mpz_init_set_ui(i32 undef, i32 1)
%29 = tail call i32 @mpz_init_set_ui(i32 undef, i32 0)
%30 = tail call i32 @mpz_init(i32 undef)
br label %31
31: ; preds = %38, %19
%32 = tail call i32 @mpz_mul(i32 undef, i32 undef, i32 undef)
%33 = tail call i32 @mpz_mul(i32 undef, i32 undef, i32 undef)
%34 = tail call i32 @mpz_mul_ui(i32 undef, i32 undef, i32 %14)
%35 = tail call i32 @mpz_sub(i32 undef, i32 undef, i32 undef)
%36 = tail call i64 @mpz_cmp(i32 undef, i32 undef)
%37 = icmp eq i64 %36, 0
br i1 %37, label %54, label %38
38: ; preds = %31
%39 = tail call i32 @mpz_mul(i32 undef, i32 undef, i32 undef)
%40 = tail call i32 @mpz_sub(i32 undef, i32 undef, i32 undef)
%41 = tail call i32 @mpz_mul(i32 undef, i32 undef, i32 undef)
%42 = tail call i32 @mpz_ui_sub(i32 undef, i32 %14, i32 undef)
%43 = tail call i32 @mpz_div(i32 undef, i32 undef, i32 undef)
%44 = tail call i32 @mpz_add(i32 undef, i32 undef, i32 undef)
%45 = tail call i32 @mpz_div(i32 undef, i32 undef, i32 undef)
%46 = tail call i32 @mpz_set(i32 undef, i32 undef)
%47 = tail call i32 @mpz_set(i32 undef, i32 undef)
%48 = tail call i32 @mpz_set(i32 undef, i32 undef)
%49 = tail call i32 @mpz_set(i32 undef, i32 undef)
%50 = tail call i32 @mpz_mul(i32 undef, i32 undef, i32 undef)
%51 = tail call i32 @mpz_add(i32 undef, i32 undef, i32 undef)
%52 = tail call i32 @mpz_mul(i32 undef, i32 undef, i32 undef)
%53 = tail call i32 @mpz_add(i32 undef, i32 undef, i32 undef)
br label %31
54: ; preds = %31
%55 = tail call i64 @mpz_cmp(i32 undef, i32 undef)
%56 = icmp sgt i64 %55, 0
br i1 %56, label %57, label %59
57: ; preds = %54
%58 = tail call i32 @mpz_set(i32 undef, i32 undef)
br label %59
59: ; preds = %54, %57, %13
%60 = phi i32 [ %15, %13 ], [ %14, %57 ], [ %15, %54 ]
%61 = add nuw nsw i32 %14, 1
%62 = icmp eq i32 %61, 1001
br i1 %62, label %11, label %13
}