#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*/ gmp_randstate_t;

/* Variables and functions */
int /*<<< orphan*/ extend_gcd(int /*<<< orphan*/, int /*<<< orphan*/,
                              int /*<<< orphan*/, int /*<<< orphan*/, int);
int /*<<< orphan*/ gmp_randinit_default(int /*<<< orphan*/);
int /*<<< orphan*/ gmp_randseed_ui(int /*<<< orphan*/, unsigned int);
int /*<<< orphan*/ gmp_sprintf(char *, char *, int, int /*<<< orphan*/,
                               int /*<<< orphan*/, int /*<<< orphan*/,
                               int /*<<< orphan*/, int /*<<< orphan*/);
scalar_t__ malloc(int);
int /*<<< orphan*/ mpz_clear(int /*<<< orphan*/);
int mpz_cmp_si(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ mpz_init2(int /*<<< orphan*/, int);
int /*<<< orphan*/ mpz_mul(int /*<<< orphan*/, int /*<<< orphan*/,
                           int /*<<< orphan*/);
int /*<<< orphan*/ mpz_neg(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ mpz_nextprime(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ mpz_root(int /*<<< orphan*/, int /*<<< orphan*/, int);
int /*<<< orphan*/ mpz_sub(int /*<<< orphan*/, int /*<<< orphan*/,
                           int /*<<< orphan*/);
int /*<<< orphan*/ mpz_sub_ui(int /*<<< orphan*/, int /*<<< orphan*/, int);
int /*<<< orphan*/ mpz_tdiv_r(int /*<<< orphan*/, int /*<<< orphan*/,
                              int /*<<< orphan*/);
int /*<<< orphan*/ mpz_urandomb(int /*<<< orphan*/, int /*<<< orphan*/, int);
int /*<<< orphan*/ mpz_urandomm(int /*<<< orphan*/, int /*<<< orphan*/,
                                int /*<<< orphan*/);
scalar_t__ rand();
scalar_t__ time(int /*<<< orphan*/);
const char *generate_private_key(int length) {
  gmp_randstate_t state;
  gmp_randinit_default(state);
  gmp_randseed_ui(state, (unsigned)time(0) + (unsigned)rand());
  mpz_t p, q, n, f, e, d, t1, t2, t3;
  mpz_init2(p, length / 2);
  mpz_init2(q, length / 2);
  mpz_init2(n, length);
  mpz_init2(f, length);
  mpz_init2(e, length);
  mpz_init2(d, length);
  mpz_init2(t1, length);
  mpz_init2(t2, length);
  mpz_init2(t3, length);
  mpz_urandomb(t1, state, length / 2);
  mpz_nextprime(p, t1);
  mpz_urandomb(t1, state, length / 2);
  mpz_nextprime(q, t1);
  mpz_mul(n, p, q);
  mpz_sub_ui(t1, p, 1);
  mpz_sub_ui(t2, q, 1);
  mpz_mul(f, t1, t2);
  mpz_root(t2, f, 2);
  mpz_urandomm(t1, state, t2);
  mpz_nextprime(e, t1);
  extend_gcd(e, f, t1, t2, length);
  {
    int t3 = mpz_cmp_si(t1, 0);
    if (t3 > 0) {
      mpz_tdiv_r(d, t1, f);
    } else if (t3 < 0) {
      mpz_neg(t2, t1);
      mpz_tdiv_r(t1, t2, f);
      mpz_sub(d, f, t1);
    }
  }
  char *buf = (char *)malloc(sizeof(char) * (length * 3 + 128));
  gmp_sprintf(buf,
              "-----RSA Private Key-----\nl: %d\nn: %Zx\ne: %Zx\nd: %Zx\np: "
              "%Zx\nq: %Zx\n-----End-----\n",
              length, n, e, d, p, q);
  mpz_clear(p);
  mpz_clear(q);
  mpz_clear(n);
  mpz_clear(f);
  mpz_clear(e);
  mpz_clear(d);
  mpz_clear(t1);
  mpz_clear(t2);
  mpz_clear(t3);
  return buf;
}


x86 assembly (clang, -O0):
<generate_private_key>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x8(%rbp),%edi
call   1120 <gmp_randinit_default@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x3c(%rbp)
xor    %edi,%edi
call   1090 <time@plt>
mov    %eax,-0x40(%rbp)
mov    $0x0,%al
call   1140 <rand@plt>
mov    -0x40(%rbp),%esi
mov    -0x3c(%rbp),%edi
add    %eax,%esi
call   1100 <gmp_randseed_ui@plt>
mov    -0xc(%rbp),%edi
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%esi
call   1110 <mpz_init2@plt>
mov    -0x10(%rbp),%edi
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%esi
call   1110 <mpz_init2@plt>
mov    -0x14(%rbp),%edi
mov    -0x4(%rbp),%esi
call   1110 <mpz_init2@plt>
mov    -0x18(%rbp),%edi
mov    -0x4(%rbp),%esi
call   1110 <mpz_init2@plt>
mov    -0x1c(%rbp),%edi
mov    -0x4(%rbp),%esi
call   1110 <mpz_init2@plt>
mov    -0x20(%rbp),%edi
mov    -0x4(%rbp),%esi
call   1110 <mpz_init2@plt>
mov    -0x24(%rbp),%edi
mov    -0x4(%rbp),%esi
call   1110 <mpz_init2@plt>
mov    -0x28(%rbp),%edi
mov    -0x4(%rbp),%esi
call   1110 <mpz_init2@plt>
mov    -0x2c(%rbp),%edi
mov    -0x4(%rbp),%esi
call   1110 <mpz_init2@plt>
mov    -0x24(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%edx
call   1070 <mpz_urandomb@plt>
mov    -0xc(%rbp),%edi
mov    -0x24(%rbp),%esi
call   10c0 <mpz_nextprime@plt>
mov    -0x24(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%edx
call   1070 <mpz_urandomb@plt>
mov    -0x10(%rbp),%edi
mov    -0x24(%rbp),%esi
call   10c0 <mpz_nextprime@plt>
mov    -0x14(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1080 <mpz_mul@plt>
mov    -0x24(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    $0x1,%edx
call   10a0 <mpz_sub_ui@plt>
mov    -0x28(%rbp),%edi
mov    -0x10(%rbp),%esi
mov    $0x1,%edx
call   10a0 <mpz_sub_ui@plt>
mov    -0x18(%rbp),%edi
mov    -0x24(%rbp),%esi
mov    -0x28(%rbp),%edx
call   1080 <mpz_mul@plt>
mov    -0x28(%rbp),%edi
mov    -0x18(%rbp),%esi
mov    $0x2,%edx
call   1130 <mpz_root@plt>
mov    -0x24(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x28(%rbp),%edx
call   1150 <mpz_urandomm@plt>
mov    -0x1c(%rbp),%edi
mov    -0x24(%rbp),%esi
call   10c0 <mpz_nextprime@plt>
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%esi
mov    -0x24(%rbp),%edx
mov    -0x28(%rbp),%ecx
mov    -0x4(%rbp),%r8d
call   10d0 <extend_gcd@plt>
mov    -0x24(%rbp),%edi
xor    %esi,%esi
call   10e0 <mpz_cmp_si@plt>
mov    %eax,-0x30(%rbp)
cmpl   $0x0,-0x30(%rbp)
jle    13c8 <generate_private_key+0x198>
mov    -0x20(%rbp),%edi
mov    -0x24(%rbp),%esi
mov    -0x18(%rbp),%edx
call   1060 <mpz_tdiv_r@plt>
jmp    13fe <generate_private_key+0x1ce>
cmpl   $0x0,-0x30(%rbp)
jge    13f9 <generate_private_key+0x1c9>
mov    -0x28(%rbp),%edi
mov    -0x24(%rbp),%esi
call   1040 <mpz_neg@plt>
mov    -0x24(%rbp),%edi
mov    -0x28(%rbp),%esi
mov    -0x18(%rbp),%edx
call   1060 <mpz_tdiv_r@plt>
mov    -0x20(%rbp),%edi
mov    -0x18(%rbp),%esi
mov    -0x24(%rbp),%edx
call   1030 <mpz_sub@plt>
jmp    13fe <generate_private_key+0x1ce>
imul   $0x3,-0x4(%rbp),%eax
add    $0x80,%eax
cltq
shl    $0x0,%rax
mov    %eax,%edi
call   10b0 <malloc@plt>
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rdi
mov    -0x4(%rbp),%edx
mov    -0x14(%rbp),%ecx
mov    -0x1c(%rbp),%r8d
mov    -0x20(%rbp),%r9d
mov    -0xc(%rbp),%r10d
mov    -0x10(%rbp),%eax
lea    0xbc8(%rip),%rsi
mov    %r10d,(%rsp)
mov    %eax,0x8(%rsp)
call   1050 <gmp_sprintf@plt>
mov    -0xc(%rbp),%edi
call   10f0 <mpz_clear@plt>
mov    -0x10(%rbp),%edi
call   10f0 <mpz_clear@plt>
mov    -0x14(%rbp),%edi
call   10f0 <mpz_clear@plt>
mov    -0x18(%rbp),%edi
call   10f0 <mpz_clear@plt>
mov    -0x1c(%rbp),%edi
call   10f0 <mpz_clear@plt>
mov    -0x20(%rbp),%edi
call   10f0 <mpz_clear@plt>
mov    -0x24(%rbp),%edi
call   10f0 <mpz_clear@plt>
mov    -0x28(%rbp),%edi
call   10f0 <mpz_clear@plt>
mov    -0x2c(%rbp),%edi
call   10f0 <mpz_clear@plt>
mov    -0x38(%rbp),%rax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<generate_private_key>:
push   %rbp
push   %rbx
sub    $0x18,%rsp
mov    %edi,%ebx
call   1120 <gmp_randinit_default@plt>
xor    %edi,%edi
call   1090 <time@plt>
mov    %rax,%rbp
xor    %eax,%eax
call   1140 <rand@plt>
add    %eax,%ebp
mov    %ebp,%esi
call   1100 <gmp_randseed_ui@plt>
mov    %ebx,%ebp
shr    $0x1f,%ebp
add    %ebx,%ebp
sar    %ebp
mov    %ebp,%esi
call   1110 <mpz_init2@plt>
mov    %ebp,%esi
call   1110 <mpz_init2@plt>
mov    %ebx,%esi
call   1110 <mpz_init2@plt>
mov    %ebx,%esi
call   1110 <mpz_init2@plt>
mov    %ebx,%esi
call   1110 <mpz_init2@plt>
mov    %ebx,%esi
call   1110 <mpz_init2@plt>
mov    %ebx,%esi
call   1110 <mpz_init2@plt>
mov    %ebx,%esi
call   1110 <mpz_init2@plt>
mov    %ebx,%esi
call   1110 <mpz_init2@plt>
mov    %ebp,%edx
call   1070 <mpz_urandomb@plt>
call   10c0 <mpz_nextprime@plt>
mov    %ebp,%edx
call   1070 <mpz_urandomb@plt>
call   10c0 <mpz_nextprime@plt>
call   1080 <mpz_mul@plt>
mov    $0x1,%edx
call   10a0 <mpz_sub_ui@plt>
mov    $0x1,%edx
call   10a0 <mpz_sub_ui@plt>
call   1080 <mpz_mul@plt>
mov    $0x2,%edx
call   1130 <mpz_root@plt>
call   1150 <mpz_urandomm@plt>
call   10c0 <mpz_nextprime@plt>
mov    %ebx,%r8d
call   10d0 <extend_gcd@plt>
xor    %esi,%esi
call   10e0 <mpz_cmp_si@plt>
test   %eax,%eax
jle    1303 <generate_private_key+0xd3>
call   1060 <mpz_tdiv_r@plt>
jmp    1314 <generate_private_key+0xe4>
jns    1314 <generate_private_key+0xe4>
call   1040 <mpz_neg@plt>
call   1060 <mpz_tdiv_r@plt>
call   1030 <mpz_sub@plt>
lea    (%rbx,%rbx,2),%edi
add    $0x80,%edi
call   10b0 <malloc@plt>
mov    %rax,%rbp
lea    0xcd4(%rip),%rsi
mov    %rax,%rdi
mov    %ebx,%edx
call   1050 <gmp_sprintf@plt>
call   10f0 <mpz_clear@plt>
call   10f0 <mpz_clear@plt>
call   10f0 <mpz_clear@plt>
call   10f0 <mpz_clear@plt>
call   10f0 <mpz_clear@plt>
call   10f0 <mpz_clear@plt>
call   10f0 <mpz_clear@plt>
call   10f0 <mpz_clear@plt>
call   10f0 <mpz_clear@plt>
mov    %rbp,%rax
add    $0x18,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [82 x i8] c"-----RSA Private Key-----\0Al: %d\0An: %Zx\0Ae: %Zx\0Ad: %Zx\0Ap: %Zx\0Aq: %Zx\0A-----End-----\0A\00"
define i8* @generate_private_key(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%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 i8*
store i32 %0, i32* %2
%15 = load i32, i32* %3
%16 = call i32 @gmp_randinit_default(i32 %15)
%17 = load i32, i32* %3
%18 = call i64 @time(i32 0)
%19 = trunc i64 %18 to i32
%20 = call i64 (...) @rand()
%21 = trunc i64 %20 to i32
%22 = add i32 %19, %21
%23 = call i32 @gmp_randseed_ui(i32 %17, i32 %22)
%24 = load i32, i32* %4
%25 = load i32, i32* %2
%26 = sdiv i32 %25, 2
%27 = call i32 @mpz_init2(i32 %24, i32 %26)
%28 = load i32, i32* %5
%29 = load i32, i32* %2
%30 = sdiv i32 %29, 2
%31 = call i32 @mpz_init2(i32 %28, i32 %30)
%32 = load i32, i32* %6
%33 = load i32, i32* %2
%34 = call i32 @mpz_init2(i32 %32, i32 %33)
%35 = load i32, i32* %7
%36 = load i32, i32* %2
%37 = call i32 @mpz_init2(i32 %35, i32 %36)
%38 = load i32, i32* %8
%39 = load i32, i32* %2
%40 = call i32 @mpz_init2(i32 %38, i32 %39)
%41 = load i32, i32* %9
%42 = load i32, i32* %2
%43 = call i32 @mpz_init2(i32 %41, i32 %42)
%44 = load i32, i32* %10
%45 = load i32, i32* %2
%46 = call i32 @mpz_init2(i32 %44, i32 %45)
%47 = load i32, i32* %11
%48 = load i32, i32* %2
%49 = call i32 @mpz_init2(i32 %47, i32 %48)
%50 = load i32, i32* %12
%51 = load i32, i32* %2
%52 = call i32 @mpz_init2(i32 %50, i32 %51)
%53 = load i32, i32* %10
%54 = load i32, i32* %3
%55 = load i32, i32* %2
%56 = sdiv i32 %55, 2
%57 = call i32 @mpz_urandomb(i32 %53, i32 %54, i32 %56)
%58 = load i32, i32* %4
%59 = load i32, i32* %10
%60 = call i32 @mpz_nextprime(i32 %58, i32 %59)
%61 = load i32, i32* %10
%62 = load i32, i32* %3
%63 = load i32, i32* %2
%64 = sdiv i32 %63, 2
%65 = call i32 @mpz_urandomb(i32 %61, i32 %62, i32 %64)
%66 = load i32, i32* %5
%67 = load i32, i32* %10
%68 = call i32 @mpz_nextprime(i32 %66, i32 %67)
%69 = load i32, i32* %6
%70 = load i32, i32* %4
%71 = load i32, i32* %5
%72 = call i32 @mpz_mul(i32 %69, i32 %70, i32 %71)
%73 = load i32, i32* %10
%74 = load i32, i32* %4
%75 = call i32 @mpz_sub_ui(i32 %73, i32 %74, i32 1)
%76 = load i32, i32* %11
%77 = load i32, i32* %5
%78 = call i32 @mpz_sub_ui(i32 %76, i32 %77, i32 1)
%79 = load i32, i32* %7
%80 = load i32, i32* %10
%81 = load i32, i32* %11
%82 = call i32 @mpz_mul(i32 %79, i32 %80, i32 %81)
%83 = load i32, i32* %11
%84 = load i32, i32* %7
%85 = call i32 @mpz_root(i32 %83, i32 %84, i32 2)
%86 = load i32, i32* %10
%87 = load i32, i32* %3
%88 = load i32, i32* %11
%89 = call i32 @mpz_urandomm(i32 %86, i32 %87, i32 %88)
%90 = load i32, i32* %8
%91 = load i32, i32* %10
%92 = call i32 @mpz_nextprime(i32 %90, i32 %91)
%93 = load i32, i32* %8
%94 = load i32, i32* %7
%95 = load i32, i32* %10
%96 = load i32, i32* %11
%97 = load i32, i32* %2
%98 = call i32 @extend_gcd(i32 %93, i32 %94, i32 %95, i32 %96, i32 %97)
%99 = load i32, i32* %10
%100 = call i32 @mpz_cmp_si(i32 %99, i32 0)
store i32 %100, i32* %13
%101 = load i32, i32* %13
%102 = icmp sgt i32 %101, 0
br i1 %102, label %103, label %108
103: ; preds = %1
%104 = load i32, i32* %9
%105 = load i32, i32* %10
%106 = load i32, i32* %7
%107 = call i32 @mpz_tdiv_r(i32 %104, i32 %105, i32 %106)
br label %124
108: ; preds = %1
%109 = load i32, i32* %13
%110 = icmp slt i32 %109, 0
br i1 %110, label %111, label %123
111: ; preds = %108
%112 = load i32, i32* %11
%113 = load i32, i32* %10
%114 = call i32 @mpz_neg(i32 %112, i32 %113)
%115 = load i32, i32* %10
%116 = load i32, i32* %11
%117 = load i32, i32* %7
%118 = call i32 @mpz_tdiv_r(i32 %115, i32 %116, i32 %117)
%119 = load i32, i32* %9
%120 = load i32, i32* %7
%121 = load i32, i32* %10
%122 = call i32 @mpz_sub(i32 %119, i32 %120, i32 %121)
br label %123
123: ; preds = %111, %108
br label %124
124: ; preds = %123, %103
%125 = load i32, i32* %2
%126 = mul nsw i32 %125, 3
%127 = add nsw i32 %126, 128
%128 = sext i32 %127 to i64
%129 = mul i64 1, %128
%130 = trunc i64 %129 to i32
%131 = call i64 @malloc(i32 %130)
%132 = inttoptr i64 %131 to i8*
store i8* %132, i8** %14
%133 = load i8*, i8** %14
%134 = load i32, i32* %2
%135 = load i32, i32* %6
%136 = load i32, i32* %8
%137 = load i32, i32* %9
%138 = load i32, i32* %4
%139 = load i32, i32* %5
%140 = call i32 @gmp_sprintf(i8* %133, i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str, i64 0, i64 0), i32 %134, i32 %135, i32 %136, i32 %137, i32 %138, i32 %139)
%141 = load i32, i32* %4
%142 = call i32 @mpz_clear(i32 %141)
%143 = load i32, i32* %5
%144 = call i32 @mpz_clear(i32 %143)
%145 = load i32, i32* %6
%146 = call i32 @mpz_clear(i32 %145)
%147 = load i32, i32* %7
%148 = call i32 @mpz_clear(i32 %147)
%149 = load i32, i32* %8
%150 = call i32 @mpz_clear(i32 %149)
%151 = load i32, i32* %9
%152 = call i32 @mpz_clear(i32 %151)
%153 = load i32, i32* %10
%154 = call i32 @mpz_clear(i32 %153)
%155 = load i32, i32* %11
%156 = call i32 @mpz_clear(i32 %155)
%157 = load i32, i32* %12
%158 = call i32 @mpz_clear(i32 %157)
%159 = load i8*, i8** %14
ret i8* %159
}

LLVM IR (-O2):
@.str = [82 x i8] c"-----RSA Private Key-----\0Al: %d\0An: %Zx\0Ae: %Zx\0Ad: %Zx\0Ap: %Zx\0Aq: %Zx\0A-----End-----\0A\00"
define i8* @generate_private_key(i32 %0) {
%2 = tail call i32 @gmp_randinit_default(i32 undef)
%3 = tail call i64 @time(i32 0)
%4 = trunc i64 %3 to i32
%5 = tail call i64 (...) @rand()
%6 = trunc i64 %5 to i32
%7 = add i32 %6, %4
%8 = tail call i32 @gmp_randseed_ui(i32 undef, i32 %7)
%9 = sdiv i32 %0, 2
%10 = tail call i32 @mpz_init2(i32 undef, i32 %9)
%11 = tail call i32 @mpz_init2(i32 undef, i32 %9)
%12 = tail call i32 @mpz_init2(i32 undef, i32 %0)
%13 = tail call i32 @mpz_init2(i32 undef, i32 %0)
%14 = tail call i32 @mpz_init2(i32 undef, i32 %0)
%15 = tail call i32 @mpz_init2(i32 undef, i32 %0)
%16 = tail call i32 @mpz_init2(i32 undef, i32 %0)
%17 = tail call i32 @mpz_init2(i32 undef, i32 %0)
%18 = tail call i32 @mpz_init2(i32 undef, i32 %0)
%19 = tail call i32 @mpz_urandomb(i32 undef, i32 undef, i32 %9)
%20 = tail call i32 @mpz_nextprime(i32 undef, i32 undef)
%21 = tail call i32 @mpz_urandomb(i32 undef, i32 undef, i32 %9)
%22 = tail call i32 @mpz_nextprime(i32 undef, i32 undef)
%23 = tail call i32 @mpz_mul(i32 undef, i32 undef, i32 undef)
%24 = tail call i32 @mpz_sub_ui(i32 undef, i32 undef, i32 1)
%25 = tail call i32 @mpz_sub_ui(i32 undef, i32 undef, i32 1)
%26 = tail call i32 @mpz_mul(i32 undef, i32 undef, i32 undef)
%27 = tail call i32 @mpz_root(i32 undef, i32 undef, i32 2)
%28 = tail call i32 @mpz_urandomm(i32 undef, i32 undef, i32 undef)
%29 = tail call i32 @mpz_nextprime(i32 undef, i32 undef)
%30 = tail call i32 @extend_gcd(i32 undef, i32 undef, i32 undef, i32 undef, i32 %0)
%31 = tail call i32 @mpz_cmp_si(i32 undef, i32 0)
%32 = icmp sgt i32 %31, 0
br i1 %32, label %33, label %35
33: ; preds = %1
%34 = tail call i32 @mpz_tdiv_r(i32 undef, i32 undef, i32 undef)
br label %41
35: ; preds = %1
%36 = icmp slt i32 %31, 0
br i1 %36, label %37, label %41
37: ; preds = %35
%38 = tail call i32 @mpz_neg(i32 undef, i32 undef)
%39 = tail call i32 @mpz_tdiv_r(i32 undef, i32 undef, i32 undef)
%40 = tail call i32 @mpz_sub(i32 undef, i32 undef, i32 undef)
br label %41
41: ; preds = %35, %37, %33
%42 = mul nsw i32 %0, 3
%43 = add nsw i32 %42, 128
%44 = tail call i64 @malloc(i32 %43)
%45 = inttoptr i64 %44 to i8*
%46 = tail call i32 @gmp_sprintf(i8* %45, i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str, i64 0, i64 0), i32 %0, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef)
%47 = tail call i32 @mpz_clear(i32 undef)
%48 = tail call i32 @mpz_clear(i32 undef)
%49 = tail call i32 @mpz_clear(i32 undef)
%50 = tail call i32 @mpz_clear(i32 undef)
%51 = tail call i32 @mpz_clear(i32 undef)
%52 = tail call i32 @mpz_clear(i32 undef)
%53 = tail call i32 @mpz_clear(i32 undef)
%54 = tail call i32 @mpz_clear(i32 undef)
%55 = tail call i32 @mpz_clear(i32 undef)
ret i8* %45
}