#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;
typedef int /*<<< orphan*/ mpf_t;

/* Variables and functions */
int /*<<< orphan*/ gmp_printf(char *, int /*<<< orphan*/);
int /*<<< orphan*/ mpf_clear(int /*<<< orphan*/);
int /*<<< orphan*/ mpf_div(int /*<<< orphan*/, int /*<<< orphan*/,
                           int /*<<< orphan*/);
int /*<<< orphan*/ mpf_floor(int /*<<< orphan*/, int /*<<< orphan*/);
scalar_t__ mpf_get_d(int /*<<< orphan*/);
int /*<<< orphan*/ mpf_init(int /*<<< orphan*/);
int /*<<< orphan*/ mpf_set_ui(int /*<<< orphan*/, int);
int /*<<< orphan*/ mpf_set_z(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ mpf_sub(int /*<<< orphan*/, int /*<<< orphan*/,
                           int /*<<< orphan*/);
int /*<<< orphan*/ mpz_add(int /*<<< orphan*/, int /*<<< orphan*/,
                           int /*<<< orphan*/);
int /*<<< orphan*/ mpz_add_ui(int /*<<< orphan*/, int /*<<< orphan*/, int);
int /*<<< orphan*/ mpz_clear(int /*<<< orphan*/);
scalar_t__ mpz_cmp(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ mpz_init(int /*<<< orphan*/);
int /*<<< orphan*/ mpz_mul(int /*<<< orphan*/, int /*<<< orphan*/,
                           int /*<<< orphan*/);
int /*<<< orphan*/ mpz_powm(int /*<<< orphan*/, int /*<<< orphan*/,
                            int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ mpz_set(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ mpz_set_str(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ mpz_set_ui(int /*<<< orphan*/, unsigned long);
int /*<<< orphan*/ printf(char *);
int main(int argc, char const *argv[]) {
  mpz_t nint, eint, p0, p1, p, q, q0, q1, bint, tmpint, message;
  mpf_t nfloat, efloat, a, bfloat, tmpfloat, one;
  mpz_init(nint);
  mpz_init(eint);
  mpz_init(bint);
  mpz_init(message);
  mpz_init(tmpint);
  mpz_init(p0);
  mpz_init(p1);
  mpz_init(p);
  mpz_init(q);
  mpz_init(q0);
  mpz_init(q1);
  mpf_init(nfloat);
  mpf_init(efloat);
  mpf_init(a);
  mpf_init(bfloat);
  mpf_init(tmpfloat);
  mpf_init(one);
  mpz_set_str(nint, "9449868410449", 10);
  mpz_set_str(eint, "6792605526025", 10);
  mpz_set_str(message, "123456789", 10);
  mpf_set_ui(one, 1);
  mpf_set_z(nfloat, nint);
  mpf_set_z(efloat, eint);
  mpf_div(a, efloat, nfloat);
  mpf_floor(bfloat, a);
  mpz_set_ui(bint, (unsigned long int)mpf_get_d(bfloat));
  mpz_set(p0, bint);
  mpz_set_ui(q0, 1);
  mpf_sub(tmpfloat, a, bfloat);
  mpf_div(a, one, tmpfloat);
  mpf_floor(bfloat, a);
  mpz_set_ui(bint, (unsigned long int)mpf_get_d(bfloat));
  mpz_mul(tmpint, bint, p0);
  mpz_add_ui(p1, tmpint, 1);
  mpz_set(q1, bint);
  mpz_set(q, q1);
  int cnt = 1 << 30;
  while (cnt--) {
    mpz_mul(tmpint, eint, q);
    mpz_powm(tmpint, message, tmpint, nint);
    if (mpz_cmp(tmpint, message) == 0) {
      printf("Success!!!\n");
      gmp_printf("d=%Zd\n", q);
      break;
    }
    mpf_sub(tmpfloat, a, bfloat);
    mpf_div(a, one, tmpfloat);
    mpf_floor(bfloat, a);
    mpz_set_ui(bint, (unsigned long int)mpf_get_d(bfloat));
    mpz_mul(tmpint, bint, q1);
    mpz_add(tmpint, tmpint, q0);
    mpz_set(q, tmpint);
    mpz_set(q0, q1);
    mpz_set(q1, q);
  }
  if (cnt <= 0) {
    printf("Failed!!\n");
  }
  mpz_clear(nint);
  mpz_clear(eint);
  mpz_clear(p);
  mpz_clear(p0);
  mpz_clear(p1);
  mpz_clear(q);
  mpz_clear(message);
  mpz_clear(bint);
  mpz_clear(q1);
  mpz_clear(q0);
  mpz_clear(tmpint);
  mpf_clear(nfloat);
  mpf_clear(efloat);
  mpf_clear(a);
  mpf_clear(bfloat);
  mpf_clear(tmpfloat);
  mpf_clear(one);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x14(%rbp),%edi
call   1080 <mpz_init@plt>
mov    -0x18(%rbp),%edi
call   1080 <mpz_init@plt>
mov    -0x34(%rbp),%edi
call   1080 <mpz_init@plt>
mov    -0x3c(%rbp),%edi
call   1080 <mpz_init@plt>
mov    -0x38(%rbp),%edi
call   1080 <mpz_init@plt>
mov    -0x1c(%rbp),%edi
call   1080 <mpz_init@plt>
mov    -0x20(%rbp),%edi
call   1080 <mpz_init@plt>
mov    -0x24(%rbp),%edi
call   1080 <mpz_init@plt>
mov    -0x28(%rbp),%edi
call   1080 <mpz_init@plt>
mov    -0x2c(%rbp),%edi
call   1080 <mpz_init@plt>
mov    -0x30(%rbp),%edi
call   1080 <mpz_init@plt>
mov    -0x40(%rbp),%edi
call   1090 <mpf_init@plt>
mov    -0x44(%rbp),%edi
call   1090 <mpf_init@plt>
mov    -0x48(%rbp),%edi
call   1090 <mpf_init@plt>
mov    -0x4c(%rbp),%edi
call   1090 <mpf_init@plt>
mov    -0x50(%rbp),%edi
call   1090 <mpf_init@plt>
mov    -0x54(%rbp),%edi
call   1090 <mpf_init@plt>
mov    -0x14(%rbp),%edi
lea    0xd18(%rip),%rsi
mov    $0xa,%edx
call   1100 <mpz_set_str@plt>
mov    -0x18(%rbp),%edi
lea    0xd12(%rip),%rsi
mov    $0xa,%edx
call   1100 <mpz_set_str@plt>
mov    -0x3c(%rbp),%edi
lea    0xd0c(%rip),%rsi
mov    $0xa,%edx
call   1100 <mpz_set_str@plt>
mov    -0x54(%rbp),%edi
mov    $0x1,%esi
call   10d0 <mpf_set_ui@plt>
mov    -0x40(%rbp),%edi
mov    -0x14(%rbp),%esi
call   10e0 <mpf_set_z@plt>
mov    -0x44(%rbp),%edi
mov    -0x18(%rbp),%esi
call   10e0 <mpf_set_z@plt>
mov    -0x48(%rbp),%edi
mov    -0x44(%rbp),%esi
mov    -0x40(%rbp),%edx
call   1150 <mpf_div@plt>
mov    -0x4c(%rbp),%edi
mov    -0x48(%rbp),%esi
call   1030 <mpf_floor@plt>
mov    -0x34(%rbp),%eax
mov    %eax,-0x60(%rbp)
mov    -0x4c(%rbp),%edi
call   1140 <mpf_get_d@plt>
mov    -0x60(%rbp),%edi
mov    %rax,%rsi
call   1120 <mpz_set_ui@plt>
mov    -0x1c(%rbp),%edi
mov    -0x34(%rbp),%esi
call   1050 <mpz_set@plt>
mov    -0x2c(%rbp),%edi
mov    $0x1,%esi
call   1120 <mpz_set_ui@plt>
mov    -0x50(%rbp),%edi
mov    -0x48(%rbp),%esi
mov    -0x4c(%rbp),%edx
call   10f0 <mpf_sub@plt>
mov    -0x48(%rbp),%edi
mov    -0x54(%rbp),%esi
mov    -0x50(%rbp),%edx
call   1150 <mpf_div@plt>
mov    -0x4c(%rbp),%edi
mov    -0x48(%rbp),%esi
call   1030 <mpf_floor@plt>
mov    -0x34(%rbp),%eax
mov    %eax,-0x5c(%rbp)
mov    -0x4c(%rbp),%edi
call   1140 <mpf_get_d@plt>
mov    -0x5c(%rbp),%edi
mov    %rax,%rsi
call   1120 <mpz_set_ui@plt>
mov    -0x38(%rbp),%edi
mov    -0x34(%rbp),%esi
mov    -0x1c(%rbp),%edx
call   10c0 <mpz_mul@plt>
mov    -0x20(%rbp),%edi
mov    -0x38(%rbp),%esi
mov    $0x1,%edx
call   1060 <mpz_add_ui@plt>
mov    -0x30(%rbp),%edi
mov    -0x34(%rbp),%esi
call   1050 <mpz_set@plt>
mov    -0x28(%rbp),%edi
mov    -0x30(%rbp),%esi
call   1050 <mpz_set@plt>
movl   $0x40000000,-0x58(%rbp)
mov    -0x58(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x58(%rbp)
cmp    $0x0,%eax
je     14ec <main+0x2ac>
mov    -0x38(%rbp),%edi
mov    -0x18(%rbp),%esi
mov    -0x28(%rbp),%edx
call   10c0 <mpz_mul@plt>
mov    -0x38(%rbp),%edi
mov    -0x3c(%rbp),%esi
mov    -0x38(%rbp),%edx
mov    -0x14(%rbp),%ecx
call   1040 <mpz_powm@plt>
mov    -0x38(%rbp),%edi
mov    -0x3c(%rbp),%esi
call   1110 <mpz_cmp@plt>
cmp    $0x0,%rax
jne    146a <main+0x22a>
lea    0xbd5(%rip),%rdi
call   1070 <printf@plt>
mov    -0x28(%rbp),%esi
lea    0xbd2(%rip),%rdi
call   1160 <gmp_printf@plt>
jmp    14ec <main+0x2ac>
mov    -0x50(%rbp),%edi
mov    -0x48(%rbp),%esi
mov    -0x4c(%rbp),%edx
call   10f0 <mpf_sub@plt>
mov    -0x48(%rbp),%edi
mov    -0x54(%rbp),%esi
mov    -0x50(%rbp),%edx
call   1150 <mpf_div@plt>
mov    -0x4c(%rbp),%edi
mov    -0x48(%rbp),%esi
call   1030 <mpf_floor@plt>
mov    -0x34(%rbp),%eax
mov    %eax,-0x64(%rbp)
mov    -0x4c(%rbp),%edi
call   1140 <mpf_get_d@plt>
mov    -0x64(%rbp),%edi
mov    %rax,%rsi
call   1120 <mpz_set_ui@plt>
mov    -0x38(%rbp),%edi
mov    -0x34(%rbp),%esi
mov    -0x30(%rbp),%edx
call   10c0 <mpz_mul@plt>
mov    -0x38(%rbp),%edi
mov    -0x38(%rbp),%esi
mov    -0x2c(%rbp),%edx
call   10b0 <mpz_add@plt>
mov    -0x28(%rbp),%edi
mov    -0x38(%rbp),%esi
call   1050 <mpz_set@plt>
mov    -0x2c(%rbp),%edi
mov    -0x30(%rbp),%esi
call   1050 <mpz_set@plt>
mov    -0x30(%rbp),%edi
mov    -0x28(%rbp),%esi
call   1050 <mpz_set@plt>
jmp    1402 <main+0x1c2>
cmpl   $0x0,-0x58(%rbp)
jg     1502 <main+0x2c2>
lea    0xb3c(%rip),%rdi
call   1070 <printf@plt>
mov    -0x14(%rbp),%edi
call   1130 <mpz_clear@plt>
mov    -0x18(%rbp),%edi
call   1130 <mpz_clear@plt>
mov    -0x24(%rbp),%edi
call   1130 <mpz_clear@plt>
mov    -0x1c(%rbp),%edi
call   1130 <mpz_clear@plt>
mov    -0x20(%rbp),%edi
call   1130 <mpz_clear@plt>
mov    -0x28(%rbp),%edi
call   1130 <mpz_clear@plt>
mov    -0x3c(%rbp),%edi
call   1130 <mpz_clear@plt>
mov    -0x34(%rbp),%edi
call   1130 <mpz_clear@plt>
mov    -0x30(%rbp),%edi
call   1130 <mpz_clear@plt>
mov    -0x2c(%rbp),%edi
call   1130 <mpz_clear@plt>
mov    -0x38(%rbp),%edi
call   1130 <mpz_clear@plt>
mov    -0x40(%rbp),%edi
call   10a0 <mpf_clear@plt>
mov    -0x44(%rbp),%edi
call   10a0 <mpf_clear@plt>
mov    -0x48(%rbp),%edi
call   10a0 <mpf_clear@plt>
mov    -0x4c(%rbp),%edi
call   10a0 <mpf_clear@plt>
mov    -0x50(%rbp),%edi
call   10a0 <mpf_clear@plt>
mov    -0x54(%rbp),%edi
call   10a0 <mpf_clear@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
call   1080 <mpz_init@plt>
call   1080 <mpz_init@plt>
call   1080 <mpz_init@plt>
call   1080 <mpz_init@plt>
call   1080 <mpz_init@plt>
call   1080 <mpz_init@plt>
call   1080 <mpz_init@plt>
call   1080 <mpz_init@plt>
call   1080 <mpz_init@plt>
call   1080 <mpz_init@plt>
call   1080 <mpz_init@plt>
call   1090 <mpf_init@plt>
call   1090 <mpf_init@plt>
call   1090 <mpf_init@plt>
call   1090 <mpf_init@plt>
call   1090 <mpf_init@plt>
call   1090 <mpf_init@plt>
lea    0xd63(%rip),%rsi
mov    $0xa,%edx
call   1100 <mpz_set_str@plt>
lea    0xd60(%rip),%rsi
mov    $0xa,%edx
call   1100 <mpz_set_str@plt>
lea    0xd5d(%rip),%rsi
mov    $0xa,%edx
call   1100 <mpz_set_str@plt>
mov    $0x1,%esi
call   10d0 <mpf_set_ui@plt>
call   10e0 <mpf_set_z@plt>
call   10e0 <mpf_set_z@plt>
call   1150 <mpf_div@plt>
call   1030 <mpf_floor@plt>
call   1140 <mpf_get_d@plt>
mov    %rax,%rsi
call   1120 <mpz_set_ui@plt>
call   1060 <mpz_set@plt>
mov    $0x1,%esi
call   1120 <mpz_set_ui@plt>
call   10f0 <mpf_sub@plt>
call   1150 <mpf_div@plt>
call   1030 <mpf_floor@plt>
call   1140 <mpf_get_d@plt>
mov    %rax,%rsi
call   1120 <mpz_set_ui@plt>
call   10c0 <mpz_mul@plt>
mov    $0x1,%edx
call   1070 <mpz_add_ui@plt>
call   1060 <mpz_set@plt>
call   1060 <mpz_set@plt>
call   10c0 <mpz_mul@plt>
call   1040 <mpz_powm@plt>
call   1110 <mpz_cmp@plt>
mov    $0x40000000,%ebx
test   %rax,%rax
je     13b1 <main+0x171>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
call   10f0 <mpf_sub@plt>
call   1150 <mpf_div@plt>
call   1030 <mpf_floor@plt>
call   1140 <mpf_get_d@plt>
mov    %rax,%rsi
call   1120 <mpz_set_ui@plt>
call   10c0 <mpz_mul@plt>
call   10b0 <mpz_add@plt>
call   1060 <mpz_set@plt>
call   1060 <mpz_set@plt>
call   1060 <mpz_set@plt>
cmp    $0x1,%ebx
je     13ce <main+0x18e>
call   10c0 <mpz_mul@plt>
call   1040 <mpz_powm@plt>
call   1110 <mpz_cmp@plt>
add    $0xffffffff,%ebx
test   %rax,%rax
jne    1360 <main+0x120>
lea    0xc7e(%rip),%rdi
call   1050 <puts@plt>
lea    0xc62(%rip),%rdi
call   1160 <gmp_printf@plt>
cmp    $0x1,%ebx
jg     13da <main+0x19a>
lea    0xc58(%rip),%rdi
call   1050 <puts@plt>
call   1130 <mpz_clear@plt>
call   1130 <mpz_clear@plt>
call   1130 <mpz_clear@plt>
call   1130 <mpz_clear@plt>
call   1130 <mpz_clear@plt>
call   1130 <mpz_clear@plt>
call   1130 <mpz_clear@plt>
call   1130 <mpz_clear@plt>
call   1130 <mpz_clear@plt>
call   1130 <mpz_clear@plt>
call   1130 <mpz_clear@plt>
call   10a0 <mpf_clear@plt>
call   10a0 <mpf_clear@plt>
call   10a0 <mpf_clear@plt>
call   10a0 <mpf_clear@plt>
call   10a0 <mpf_clear@plt>
call   10a0 <mpf_clear@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"9449868410449\00"
@.str.1 = [14 x i8] c"6792605526025\00"
@.str.2 = [10 x i8] c"123456789\00"
@.str.3 = [12 x i8] c"Success!!!\0A\00"
@.str.4 = [7 x i8] c"d=%Zd\0A\00"
@.str.5 = [10 x i8] c"Failed!!\0A\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
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%24 = load i32, i32* %6
%25 = call i32 @mpz_init(i32 %24)
%26 = load i32, i32* %7
%27 = call i32 @mpz_init(i32 %26)
%28 = load i32, i32* %14
%29 = call i32 @mpz_init(i32 %28)
%30 = load i32, i32* %16
%31 = call i32 @mpz_init(i32 %30)
%32 = load i32, i32* %15
%33 = call i32 @mpz_init(i32 %32)
%34 = load i32, i32* %8
%35 = call i32 @mpz_init(i32 %34)
%36 = load i32, i32* %9
%37 = call i32 @mpz_init(i32 %36)
%38 = load i32, i32* %10
%39 = call i32 @mpz_init(i32 %38)
%40 = load i32, i32* %11
%41 = call i32 @mpz_init(i32 %40)
%42 = load i32, i32* %12
%43 = call i32 @mpz_init(i32 %42)
%44 = load i32, i32* %13
%45 = call i32 @mpz_init(i32 %44)
%46 = load i32, i32* %17
%47 = call i32 @mpf_init(i32 %46)
%48 = load i32, i32* %18
%49 = call i32 @mpf_init(i32 %48)
%50 = load i32, i32* %19
%51 = call i32 @mpf_init(i32 %50)
%52 = load i32, i32* %20
%53 = call i32 @mpf_init(i32 %52)
%54 = load i32, i32* %21
%55 = call i32 @mpf_init(i32 %54)
%56 = load i32, i32* %22
%57 = call i32 @mpf_init(i32 %56)
%58 = load i32, i32* %6
%59 = call i32 @mpz_set_str(i32 %58, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 10)
%60 = load i32, i32* %7
%61 = call i32 @mpz_set_str(i32 %60, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 10)
%62 = load i32, i32* %16
%63 = call i32 @mpz_set_str(i32 %62, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 10)
%64 = load i32, i32* %22
%65 = call i32 @mpf_set_ui(i32 %64, i32 1)
%66 = load i32, i32* %17
%67 = load i32, i32* %6
%68 = call i32 @mpf_set_z(i32 %66, i32 %67)
%69 = load i32, i32* %18
%70 = load i32, i32* %7
%71 = call i32 @mpf_set_z(i32 %69, i32 %70)
%72 = load i32, i32* %19
%73 = load i32, i32* %18
%74 = load i32, i32* %17
%75 = call i32 @mpf_div(i32 %72, i32 %73, i32 %74)
%76 = load i32, i32* %20
%77 = load i32, i32* %19
%78 = call i32 @mpf_floor(i32 %76, i32 %77)
%79 = load i32, i32* %14
%80 = load i32, i32* %20
%81 = call i64 @mpf_get_d(i32 %80)
%82 = call i32 @mpz_set_ui(i32 %79, i64 %81)
%83 = load i32, i32* %8
%84 = load i32, i32* %14
%85 = call i32 @mpz_set(i32 %83, i32 %84)
%86 = load i32, i32* %12
%87 = call i32 @mpz_set_ui(i32 %86, i64 1)
%88 = load i32, i32* %21
%89 = load i32, i32* %19
%90 = load i32, i32* %20
%91 = call i32 @mpf_sub(i32 %88, i32 %89, i32 %90)
%92 = load i32, i32* %19
%93 = load i32, i32* %22
%94 = load i32, i32* %21
%95 = call i32 @mpf_div(i32 %92, i32 %93, i32 %94)
%96 = load i32, i32* %20
%97 = load i32, i32* %19
%98 = call i32 @mpf_floor(i32 %96, i32 %97)
%99 = load i32, i32* %14
%100 = load i32, i32* %20
%101 = call i64 @mpf_get_d(i32 %100)
%102 = call i32 @mpz_set_ui(i32 %99, i64 %101)
%103 = load i32, i32* %15
%104 = load i32, i32* %14
%105 = load i32, i32* %8
%106 = call i32 @mpz_mul(i32 %103, i32 %104, i32 %105)
%107 = load i32, i32* %9
%108 = load i32, i32* %15
%109 = call i32 @mpz_add_ui(i32 %107, i32 %108, i32 1)
%110 = load i32, i32* %13
%111 = load i32, i32* %14
%112 = call i32 @mpz_set(i32 %110, i32 %111)
%113 = load i32, i32* %11
%114 = load i32, i32* %13
%115 = call i32 @mpz_set(i32 %113, i32 %114)
store i32 1073741824, i32* %23
br label %116
116: ; preds = %138, %2
%117 = load i32, i32* %23
%118 = add nsw i32 %117, -1
store i32 %118, i32* %23
%119 = icmp ne i32 %117, 0
br i1 %119, label %120, label %171
120: ; preds = %116
%121 = load i32, i32* %15
%122 = load i32, i32* %7
%123 = load i32, i32* %11
%124 = call i32 @mpz_mul(i32 %121, i32 %122, i32 %123)
%125 = load i32, i32* %15
%126 = load i32, i32* %16
%127 = load i32, i32* %15
%128 = load i32, i32* %6
%129 = call i32 @mpz_powm(i32 %125, i32 %126, i32 %127, i32 %128)
%130 = load i32, i32* %15
%131 = load i32, i32* %16
%132 = call i64 @mpz_cmp(i32 %130, i32 %131)
%133 = icmp eq i64 %132, 0
br i1 %133, label %134, label %138
134: ; preds = %120
%135 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0))
%136 = load i32, i32* %11
%137 = call i32 @gmp_printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i32 %136)
br label %171
138: ; preds = %120
%139 = load i32, i32* %21
%140 = load i32, i32* %19
%141 = load i32, i32* %20
%142 = call i32 @mpf_sub(i32 %139, i32 %140, i32 %141)
%143 = load i32, i32* %19
%144 = load i32, i32* %22
%145 = load i32, i32* %21
%146 = call i32 @mpf_div(i32 %143, i32 %144, i32 %145)
%147 = load i32, i32* %20
%148 = load i32, i32* %19
%149 = call i32 @mpf_floor(i32 %147, i32 %148)
%150 = load i32, i32* %14
%151 = load i32, i32* %20
%152 = call i64 @mpf_get_d(i32 %151)
%153 = call i32 @mpz_set_ui(i32 %150, i64 %152)
%154 = load i32, i32* %15
%155 = load i32, i32* %14
%156 = load i32, i32* %13
%157 = call i32 @mpz_mul(i32 %154, i32 %155, i32 %156)
%158 = load i32, i32* %15
%159 = load i32, i32* %15
%160 = load i32, i32* %12
%161 = call i32 @mpz_add(i32 %158, i32 %159, i32 %160)
%162 = load i32, i32* %11
%163 = load i32, i32* %15
%164 = call i32 @mpz_set(i32 %162, i32 %163)
%165 = load i32, i32* %12
%166 = load i32, i32* %13
%167 = call i32 @mpz_set(i32 %165, i32 %166)
%168 = load i32, i32* %13
%169 = load i32, i32* %11
%170 = call i32 @mpz_set(i32 %168, i32 %169)
br label %116
171: ; preds = %134, %116
%172 = load i32, i32* %23
%173 = icmp sle i32 %172, 0
br i1 %173, label %174, label %176
174: ; preds = %171
%175 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0))
br label %176
176: ; preds = %174, %171
%177 = load i32, i32* %6
%178 = call i32 @mpz_clear(i32 %177)
%179 = load i32, i32* %7
%180 = call i32 @mpz_clear(i32 %179)
%181 = load i32, i32* %10
%182 = call i32 @mpz_clear(i32 %181)
%183 = load i32, i32* %8
%184 = call i32 @mpz_clear(i32 %183)
%185 = load i32, i32* %9
%186 = call i32 @mpz_clear(i32 %185)
%187 = load i32, i32* %11
%188 = call i32 @mpz_clear(i32 %187)
%189 = load i32, i32* %16
%190 = call i32 @mpz_clear(i32 %189)
%191 = load i32, i32* %14
%192 = call i32 @mpz_clear(i32 %191)
%193 = load i32, i32* %13
%194 = call i32 @mpz_clear(i32 %193)
%195 = load i32, i32* %12
%196 = call i32 @mpz_clear(i32 %195)
%197 = load i32, i32* %15
%198 = call i32 @mpz_clear(i32 %197)
%199 = load i32, i32* %17
%200 = call i32 @mpf_clear(i32 %199)
%201 = load i32, i32* %18
%202 = call i32 @mpf_clear(i32 %201)
%203 = load i32, i32* %19
%204 = call i32 @mpf_clear(i32 %203)
%205 = load i32, i32* %20
%206 = call i32 @mpf_clear(i32 %205)
%207 = load i32, i32* %21
%208 = call i32 @mpf_clear(i32 %207)
%209 = load i32, i32* %22
%210 = call i32 @mpf_clear(i32 %209)
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"9449868410449\00"
@.str.1 = [14 x i8] c"6792605526025\00"
@.str.2 = [10 x i8] c"123456789\00"
@.str.4 = [7 x i8] c"d=%Zd\0A\00"
@str = [9 x i8] c"Failed!!\00"
@str.6 = [11 x i8] c"Success!!!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @mpz_init(i32 undef)
%4 = tail call i32 @mpz_init(i32 undef)
%5 = tail call i32 @mpz_init(i32 undef)
%6 = tail call i32 @mpz_init(i32 undef)
%7 = tail call i32 @mpz_init(i32 undef)
%8 = tail call i32 @mpz_init(i32 undef)
%9 = tail call i32 @mpz_init(i32 undef)
%10 = tail call i32 @mpz_init(i32 undef)
%11 = tail call i32 @mpz_init(i32 undef)
%12 = tail call i32 @mpz_init(i32 undef)
%13 = tail call i32 @mpz_init(i32 undef)
%14 = tail call i32 @mpf_init(i32 undef)
%15 = tail call i32 @mpf_init(i32 undef)
%16 = tail call i32 @mpf_init(i32 undef)
%17 = tail call i32 @mpf_init(i32 undef)
%18 = tail call i32 @mpf_init(i32 undef)
%19 = tail call i32 @mpf_init(i32 undef)
%20 = tail call i32 @mpz_set_str(i32 undef, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 10)
%21 = tail call i32 @mpz_set_str(i32 undef, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 10)
%22 = tail call i32 @mpz_set_str(i32 undef, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 10)
%23 = tail call i32 @mpf_set_ui(i32 undef, i32 1)
%24 = tail call i32 @mpf_set_z(i32 undef, i32 undef)
%25 = tail call i32 @mpf_set_z(i32 undef, i32 undef)
%26 = tail call i32 @mpf_div(i32 undef, i32 undef, i32 undef)
%27 = tail call i32 @mpf_floor(i32 undef, i32 undef)
%28 = tail call i64 @mpf_get_d(i32 undef)
%29 = tail call i32 @mpz_set_ui(i32 undef, i64 %28)
%30 = tail call i32 @mpz_set(i32 undef, i32 undef)
%31 = tail call i32 @mpz_set_ui(i32 undef, i64 1)
%32 = tail call i32 @mpf_sub(i32 undef, i32 undef, i32 undef)
%33 = tail call i32 @mpf_div(i32 undef, i32 undef, i32 undef)
%34 = tail call i32 @mpf_floor(i32 undef, i32 undef)
%35 = tail call i64 @mpf_get_d(i32 undef)
%36 = tail call i32 @mpz_set_ui(i32 undef, i64 %35)
%37 = tail call i32 @mpz_mul(i32 undef, i32 undef, i32 undef)
%38 = tail call i32 @mpz_add_ui(i32 undef, i32 undef, i32 1)
%39 = tail call i32 @mpz_set(i32 undef, i32 undef)
%40 = tail call i32 @mpz_set(i32 undef, i32 undef)
%41 = tail call i32 @mpz_mul(i32 undef, i32 undef, i32 undef)
%42 = tail call i32 @mpz_powm(i32 undef, i32 undef, i32 undef, i32 undef)
%43 = tail call i64 @mpz_cmp(i32 undef, i32 undef)
%44 = icmp eq i64 %43, 0
br i1 %44, label %64, label %51
45: ; preds = %51
%46 = add nsw i32 %52, -1
%47 = tail call i32 @mpz_mul(i32 undef, i32 undef, i32 undef)
%48 = tail call i32 @mpz_powm(i32 undef, i32 undef, i32 undef, i32 undef)
%49 = tail call i64 @mpz_cmp(i32 undef, i32 undef)
%50 = icmp eq i64 %49, 0
br i1 %50, label %64, label %51
51: ; preds = %2, %45
%52 = phi i32 [ %46, %45 ], [ 1073741823, %2 ]
%53 = tail call i32 @mpf_sub(i32 undef, i32 undef, i32 undef)
%54 = tail call i32 @mpf_div(i32 undef, i32 undef, i32 undef)
%55 = tail call i32 @mpf_floor(i32 undef, i32 undef)
%56 = tail call i64 @mpf_get_d(i32 undef)
%57 = tail call i32 @mpz_set_ui(i32 undef, i64 %56)
%58 = tail call i32 @mpz_mul(i32 undef, i32 undef, i32 undef)
%59 = tail call i32 @mpz_add(i32 undef, i32 undef, i32 undef)
%60 = tail call i32 @mpz_set(i32 undef, i32 undef)
%61 = tail call i32 @mpz_set(i32 undef, i32 undef)
%62 = tail call i32 @mpz_set(i32 undef, i32 undef)
%63 = icmp eq i32 %52, 0
br i1 %63, label %69, label %45
64: ; preds = %45, %2
%65 = phi i32 [ 1073741824, %2 ], [ %52, %45 ]
%66 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.6, i64 0, i64 0))
%67 = tail call i32 @gmp_printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i32 undef)
%68 = icmp slt i32 %65, 2
br i1 %68, label %69, label %71
69: ; preds = %51, %64
%70 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
br label %71
71: ; preds = %69, %64
%72 = tail call i32 @mpz_clear(i32 undef)
%73 = tail call i32 @mpz_clear(i32 undef)
%74 = tail call i32 @mpz_clear(i32 undef)
%75 = tail call i32 @mpz_clear(i32 undef)
%76 = tail call i32 @mpz_clear(i32 undef)
%77 = tail call i32 @mpz_clear(i32 undef)
%78 = tail call i32 @mpz_clear(i32 undef)
%79 = tail call i32 @mpz_clear(i32 undef)
%80 = tail call i32 @mpz_clear(i32 undef)
%81 = tail call i32 @mpz_clear(i32 undef)
%82 = tail call i32 @mpz_clear(i32 undef)
%83 = tail call i32 @mpf_clear(i32 undef)
%84 = tail call i32 @mpf_clear(i32 undef)
%85 = tail call i32 @mpf_clear(i32 undef)
%86 = tail call i32 @mpf_clear(i32 undef)
%87 = tail call i32 @mpf_clear(i32 undef)
%88 = tail call i32 @mpf_clear(i32 undef)
ret i32 0
}