#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*/ 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_si(int /*<<< orphan*/, int);
int /*<<< orphan*/ mpz_gcd(int /*<<< orphan*/, int /*<<< orphan*/,
                           int /*<<< orphan*/);
int /*<<< orphan*/ mpz_init(int /*<<< orphan*/);
int /*<<< orphan*/ mpz_invert(int /*<<< orphan*/, int /*<<< orphan*/,
                              int /*<<< orphan*/);
int /*<<< orphan*/ mpz_mod(int /*<<< orphan*/, int /*<<< orphan*/,
                           int /*<<< orphan*/);
int /*<<< orphan*/ mpz_mul(int /*<<< orphan*/, int /*<<< orphan*/,
                           int /*<<< orphan*/);
int /*<<< orphan*/ mpz_mul_si(int /*<<< orphan*/, int /*<<< orphan*/, int);
int /*<<< orphan*/ mpz_mul_ui(int /*<<< orphan*/, int /*<<< orphan*/, int);
int /*<<< orphan*/ mpz_sub(int /*<<< orphan*/, int /*<<< orphan*/,
                           int /*<<< orphan*/);
int /*<<< orphan*/ mpz_urandomm(int /*<<< orphan*/, int /*<<< orphan*/,
                                int /*<<< orphan*/);
void Q(mpz_t a, mpz_t S, mpz_t s, mpz_t n, mpz_t x, mpz_t y,
       gmp_randstate_t r_state) {
  mpz_t t, tmp, inv_tmp, rgcd;
  mpz_init(t);
  mpz_init(tmp);
  mpz_init(inv_tmp);
  mpz_init(rgcd);
  do {
    do {
      mpz_urandomm(t, r_state, n);
      mpz_gcd(rgcd, t, n);
    } while (mpz_cmp_si(rgcd, 1) != 0);
    mpz_mod(t, t, n);
    mpz_mul(tmp, t, t);
    mpz_mul(tmp, tmp, S);
    mpz_add(tmp, tmp, a);
    mpz_gcd(rgcd, tmp, n);
  } while (mpz_cmp_si(rgcd, 1) != 0);
  mpz_mod(tmp, tmp, n);
  mpz_invert(inv_tmp, tmp, n);
  mpz_mul(x, inv_tmp, t);
  mpz_mod(x, x, n);
  mpz_mul(x, x, s);
  mpz_mod(x, x, n);
  mpz_mul_si(x, x, -2);
  mpz_mod(x, x, n);
  mpz_mul(inv_tmp, tmp, s);
  mpz_mod(inv_tmp, inv_tmp, n);
  mpz_invert(inv_tmp, inv_tmp, n);
  mpz_mul(y, t, t);
  mpz_mod(y, y, n);
  mpz_mul(y, y, S);
  mpz_mod(y, y, n);
  mpz_sub(y, a, y);
  mpz_mod(y, y, n);
  mpz_mul(y, y, inv_tmp);
  mpz_mod(y, y, n);
  mpz_t cx;
  mpz_init(cx);
  mpz_mul(cx, t, t);
  mpz_mod(cx, cx, n);
  mpz_mul(cx, cx, S);
  mpz_mod(cx, cx, n);
  mpz_sub(cx, a, cx);
  mpz_mod(cx, cx, n);
  mpz_invert(inv_tmp, tmp, n);
  mpz_mul(cx, cx, inv_tmp);
  mpz_mod(cx, cx, n);
  mpz_mul_ui(cx, cx, 2);
  mpz_mod(cx, cx, n);
  mpz_add_ui(cx, cx, 2);
  mpz_mod(cx, cx, n);
  mpz_clear(cx);
  mpz_clear(rgcd);
  mpz_clear(inv_tmp);
  mpz_clear(tmp);
  mpz_clear(t);
}


x86 assembly (clang, -O0):
<Q>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
mov    -0x1c(%rbp),%edi
call   1070 <mpz_init@plt>
mov    -0x20(%rbp),%edi
call   1070 <mpz_init@plt>
mov    -0x24(%rbp),%edi
call   1070 <mpz_init@plt>
mov    -0x28(%rbp),%edi
call   1070 <mpz_init@plt>
jmp    1214 <Q+0x44>
mov    -0x1c(%rbp),%edi
mov    0x10(%rbp),%esi
mov    -0x10(%rbp),%edx
call   10f0 <mpz_urandomm@plt>
mov    -0x28(%rbp),%edi
mov    -0x1c(%rbp),%esi
mov    -0x10(%rbp),%edx
call   10d0 <mpz_gcd@plt>
mov    -0x28(%rbp),%edi
mov    $0x1,%esi
call   10a0 <mpz_cmp_si@plt>
cmp    $0x0,%rax
jne    1214 <Q+0x44>
mov    -0x1c(%rbp),%edi
mov    -0x1c(%rbp),%esi
mov    -0x10(%rbp),%edx
call   10b0 <mpz_mod@plt>
mov    -0x20(%rbp),%edi
mov    -0x1c(%rbp),%esi
mov    -0x1c(%rbp),%edx
call   1090 <mpz_mul@plt>
mov    -0x20(%rbp),%edi
mov    -0x20(%rbp),%esi
mov    -0x8(%rbp),%edx
call   1090 <mpz_mul@plt>
mov    -0x20(%rbp),%edi
mov    -0x20(%rbp),%esi
mov    -0x4(%rbp),%edx
call   1080 <mpz_add@plt>
mov    -0x28(%rbp),%edi
mov    -0x20(%rbp),%esi
mov    -0x10(%rbp),%edx
call   10d0 <mpz_gcd@plt>
mov    -0x28(%rbp),%edi
mov    $0x1,%esi
call   10a0 <mpz_cmp_si@plt>
cmp    $0x0,%rax
jne    120f <Q+0x3f>
mov    -0x20(%rbp),%edi
mov    -0x20(%rbp),%esi
mov    -0x10(%rbp),%edx
call   10b0 <mpz_mod@plt>
mov    -0x24(%rbp),%edi
mov    -0x20(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1060 <mpz_invert@plt>
mov    -0x14(%rbp),%edi
mov    -0x24(%rbp),%esi
mov    -0x1c(%rbp),%edx
call   1090 <mpz_mul@plt>
mov    -0x14(%rbp),%edi
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%edx
call   10b0 <mpz_mod@plt>
mov    -0x14(%rbp),%edi
mov    -0x14(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1090 <mpz_mul@plt>
mov    -0x14(%rbp),%edi
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%edx
call   10b0 <mpz_mod@plt>
mov    -0x14(%rbp),%edi
mov    -0x14(%rbp),%esi
mov    $0xfffffffe,%edx
call   1050 <mpz_mul_si@plt>
mov    -0x14(%rbp),%edi
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%edx
call   10b0 <mpz_mod@plt>
mov    -0x24(%rbp),%edi
mov    -0x20(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1090 <mpz_mul@plt>
mov    -0x24(%rbp),%edi
mov    -0x24(%rbp),%esi
mov    -0x10(%rbp),%edx
call   10b0 <mpz_mod@plt>
mov    -0x24(%rbp),%edi
mov    -0x24(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1060 <mpz_invert@plt>
mov    -0x18(%rbp),%edi
mov    -0x1c(%rbp),%esi
mov    -0x1c(%rbp),%edx
call   1090 <mpz_mul@plt>
mov    -0x18(%rbp),%edi
mov    -0x18(%rbp),%esi
mov    -0x10(%rbp),%edx
call   10b0 <mpz_mod@plt>
mov    -0x18(%rbp),%edi
mov    -0x18(%rbp),%esi
mov    -0x8(%rbp),%edx
call   1090 <mpz_mul@plt>
mov    -0x18(%rbp),%edi
mov    -0x18(%rbp),%esi
mov    -0x10(%rbp),%edx
call   10b0 <mpz_mod@plt>
mov    -0x18(%rbp),%edi
mov    -0x4(%rbp),%esi
mov    -0x18(%rbp),%edx
call   1030 <mpz_sub@plt>
mov    -0x18(%rbp),%edi
mov    -0x18(%rbp),%esi
mov    -0x10(%rbp),%edx
call   10b0 <mpz_mod@plt>
mov    -0x18(%rbp),%edi
mov    -0x18(%rbp),%esi
mov    -0x24(%rbp),%edx
call   1090 <mpz_mul@plt>
mov    -0x18(%rbp),%edi
mov    -0x18(%rbp),%esi
mov    -0x10(%rbp),%edx
call   10b0 <mpz_mod@plt>
mov    -0x2c(%rbp),%edi
call   1070 <mpz_init@plt>
mov    -0x2c(%rbp),%edi
mov    -0x1c(%rbp),%esi
mov    -0x1c(%rbp),%edx
call   1090 <mpz_mul@plt>
mov    -0x2c(%rbp),%edi
mov    -0x2c(%rbp),%esi
mov    -0x10(%rbp),%edx
call   10b0 <mpz_mod@plt>
mov    -0x2c(%rbp),%edi
mov    -0x2c(%rbp),%esi
mov    -0x8(%rbp),%edx
call   1090 <mpz_mul@plt>
mov    -0x2c(%rbp),%edi
mov    -0x2c(%rbp),%esi
mov    -0x10(%rbp),%edx
call   10b0 <mpz_mod@plt>
mov    -0x2c(%rbp),%edi
mov    -0x4(%rbp),%esi
mov    -0x2c(%rbp),%edx
call   1030 <mpz_sub@plt>
mov    -0x2c(%rbp),%edi
mov    -0x2c(%rbp),%esi
mov    -0x10(%rbp),%edx
call   10b0 <mpz_mod@plt>
mov    -0x24(%rbp),%edi
mov    -0x20(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1060 <mpz_invert@plt>
mov    -0x2c(%rbp),%edi
mov    -0x2c(%rbp),%esi
mov    -0x24(%rbp),%edx
call   1090 <mpz_mul@plt>
mov    -0x2c(%rbp),%edi
mov    -0x2c(%rbp),%esi
mov    -0x10(%rbp),%edx
call   10b0 <mpz_mod@plt>
mov    -0x2c(%rbp),%edi
mov    -0x2c(%rbp),%esi
mov    $0x2,%edx
call   10e0 <mpz_mul_ui@plt>
mov    -0x2c(%rbp),%edi
mov    -0x2c(%rbp),%esi
mov    -0x10(%rbp),%edx
call   10b0 <mpz_mod@plt>
mov    -0x2c(%rbp),%edi
mov    -0x2c(%rbp),%esi
mov    $0x2,%edx
call   1040 <mpz_add_ui@plt>
mov    -0x2c(%rbp),%edi
mov    -0x2c(%rbp),%esi
mov    -0x10(%rbp),%edx
call   10b0 <mpz_mod@plt>
mov    -0x2c(%rbp),%edi
call   10c0 <mpz_clear@plt>
mov    -0x28(%rbp),%edi
call   10c0 <mpz_clear@plt>
mov    -0x24(%rbp),%edi
call   10c0 <mpz_clear@plt>
mov    -0x20(%rbp),%edi
call   10c0 <mpz_clear@plt>
mov    -0x1c(%rbp),%edi
call   10c0 <mpz_clear@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Q>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r9d,%r15d
mov    %r8d,%r13d
mov    %ecx,%ebx
mov    %edx,0x4(%rsp)
mov    %esi,%ebp
mov    %edi,%r14d
mov    0x40(%rsp),%r12d
call   1070 <mpz_init@plt>
call   1070 <mpz_init@plt>
call   1070 <mpz_init@plt>
call   1070 <mpz_init@plt>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r12d,%esi
mov    %ebx,%edx
call   10f0 <mpz_urandomm@plt>
mov    %ebx,%edx
call   10d0 <mpz_gcd@plt>
mov    $0x1,%esi
call   10a0 <mpz_cmp_si@plt>
test   %rax,%rax
jne    1210 <Q+0x40>
mov    %ebx,%edx
call   10b0 <mpz_mod@plt>
call   1090 <mpz_mul@plt>
mov    %ebp,%edx
call   1090 <mpz_mul@plt>
mov    %r14d,%edx
call   1080 <mpz_add@plt>
mov    %ebx,%edx
call   10d0 <mpz_gcd@plt>
mov    $0x1,%esi
call   10a0 <mpz_cmp_si@plt>
test   %rax,%rax
jne    1210 <Q+0x40>
mov    %ebx,%edx
call   10b0 <mpz_mod@plt>
mov    %ebx,%edx
call   1060 <mpz_invert@plt>
mov    %r13d,%edi
call   1090 <mpz_mul@plt>
mov    %r13d,%edi
mov    %r13d,%esi
mov    %ebx,%edx
call   10b0 <mpz_mod@plt>
mov    %r13d,%edi
mov    %r13d,%esi
mov    0x4(%rsp),%r12d
mov    %r12d,%edx
call   1090 <mpz_mul@plt>
mov    %r13d,%edi
mov    %r13d,%esi
mov    %ebx,%edx
call   10b0 <mpz_mod@plt>
mov    %r13d,%edi
mov    %r13d,%esi
mov    $0xfffffffe,%edx
call   1050 <mpz_mul_si@plt>
mov    %r13d,%edi
mov    %r13d,%esi
mov    %ebx,%edx
call   10b0 <mpz_mod@plt>
mov    %r12d,%edx
call   1090 <mpz_mul@plt>
mov    %ebx,%edx
call   10b0 <mpz_mod@plt>
mov    %ebx,%edx
call   1060 <mpz_invert@plt>
mov    %r15d,%edi
call   1090 <mpz_mul@plt>
mov    %r15d,%edi
mov    %r15d,%esi
mov    %ebx,%edx
call   10b0 <mpz_mod@plt>
mov    %r15d,%edi
mov    %r15d,%esi
mov    %ebp,%edx
call   1090 <mpz_mul@plt>
mov    %r15d,%edi
mov    %r15d,%esi
mov    %ebx,%edx
call   10b0 <mpz_mod@plt>
mov    %r15d,%edi
mov    %r14d,%esi
mov    %r15d,%edx
call   1030 <mpz_sub@plt>
mov    %r15d,%edi
mov    %r15d,%esi
mov    %ebx,%edx
call   10b0 <mpz_mod@plt>
mov    %r15d,%edi
mov    %r15d,%esi
call   1090 <mpz_mul@plt>
mov    %r15d,%edi
mov    %r15d,%esi
mov    %ebx,%edx
call   10b0 <mpz_mod@plt>
call   1070 <mpz_init@plt>
call   1090 <mpz_mul@plt>
mov    %ebx,%edx
call   10b0 <mpz_mod@plt>
mov    %ebp,%edx
call   1090 <mpz_mul@plt>
mov    %ebx,%edx
call   10b0 <mpz_mod@plt>
mov    %r14d,%esi
call   1030 <mpz_sub@plt>
mov    %ebx,%edx
call   10b0 <mpz_mod@plt>
mov    %ebx,%edx
call   1060 <mpz_invert@plt>
call   1090 <mpz_mul@plt>
mov    %ebx,%edx
call   10b0 <mpz_mod@plt>
mov    $0x2,%edx
call   10e0 <mpz_mul_ui@plt>
mov    %ebx,%edx
call   10b0 <mpz_mod@plt>
mov    $0x2,%edx
call   1040 <mpz_add_ui@plt>
mov    %ebx,%edx
call   10b0 <mpz_mod@plt>
call   10c0 <mpz_clear@plt>
call   10c0 <mpz_clear@plt>
call   10c0 <mpz_clear@plt>
call   10c0 <mpz_clear@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    10c0 <mpz_clear@plt>

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

LLVM IR (-O2):
define void @Q(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6) {
%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)
br label %12
12: ; preds = %17, %7
%13 = tail call i32 @mpz_urandomm(i32 undef, i32 %6, i32 %3)
%14 = tail call i32 @mpz_gcd(i32 undef, i32 undef, i32 %3)
%15 = tail call i64 @mpz_cmp_si(i32 undef, i32 1)
%16 = icmp eq i64 %15, 0
br i1 %16, label %18, label %17
17: ; preds = %12, %18
br label %12
18: ; preds = %12
%19 = tail call i32 @mpz_mod(i32 undef, i32 undef, i32 %3)
%20 = tail call i32 @mpz_mul(i32 undef, i32 undef, i32 undef)
%21 = tail call i32 @mpz_mul(i32 undef, i32 undef, i32 %1)
%22 = tail call i32 @mpz_add(i32 undef, i32 undef, i32 %0)
%23 = tail call i32 @mpz_gcd(i32 undef, i32 undef, i32 %3)
%24 = tail call i64 @mpz_cmp_si(i32 undef, i32 1)
%25 = icmp eq i64 %24, 0
br i1 %25, label %26, label %17
26: ; preds = %18
%27 = tail call i32 @mpz_mod(i32 undef, i32 undef, i32 %3)
%28 = tail call i32 @mpz_invert(i32 undef, i32 undef, i32 %3)
%29 = tail call i32 @mpz_mul(i32 %4, i32 undef, i32 undef)
%30 = tail call i32 @mpz_mod(i32 %4, i32 %4, i32 %3)
%31 = tail call i32 @mpz_mul(i32 %4, i32 %4, i32 %2)
%32 = tail call i32 @mpz_mod(i32 %4, i32 %4, i32 %3)
%33 = tail call i32 @mpz_mul_si(i32 %4, i32 %4, i32 -2)
%34 = tail call i32 @mpz_mod(i32 %4, i32 %4, i32 %3)
%35 = tail call i32 @mpz_mul(i32 undef, i32 undef, i32 %2)
%36 = tail call i32 @mpz_mod(i32 undef, i32 undef, i32 %3)
%37 = tail call i32 @mpz_invert(i32 undef, i32 undef, i32 %3)
%38 = tail call i32 @mpz_mul(i32 %5, i32 undef, i32 undef)
%39 = tail call i32 @mpz_mod(i32 %5, i32 %5, i32 %3)
%40 = tail call i32 @mpz_mul(i32 %5, i32 %5, i32 %1)
%41 = tail call i32 @mpz_mod(i32 %5, i32 %5, i32 %3)
%42 = tail call i32 @mpz_sub(i32 %5, i32 %0, i32 %5)
%43 = tail call i32 @mpz_mod(i32 %5, i32 %5, i32 %3)
%44 = tail call i32 @mpz_mul(i32 %5, i32 %5, i32 undef)
%45 = tail call i32 @mpz_mod(i32 %5, i32 %5, i32 %3)
%46 = tail call i32 @mpz_init(i32 undef)
%47 = tail call i32 @mpz_mul(i32 undef, i32 undef, i32 undef)
%48 = tail call i32 @mpz_mod(i32 undef, i32 undef, i32 %3)
%49 = tail call i32 @mpz_mul(i32 undef, i32 undef, i32 %1)
%50 = tail call i32 @mpz_mod(i32 undef, i32 undef, i32 %3)
%51 = tail call i32 @mpz_sub(i32 undef, i32 %0, i32 undef)
%52 = tail call i32 @mpz_mod(i32 undef, i32 undef, i32 %3)
%53 = tail call i32 @mpz_invert(i32 undef, i32 undef, i32 %3)
%54 = tail call i32 @mpz_mul(i32 undef, i32 undef, i32 undef)
%55 = tail call i32 @mpz_mod(i32 undef, i32 undef, i32 %3)
%56 = tail call i32 @mpz_mul_ui(i32 undef, i32 undef, i32 2)
%57 = tail call i32 @mpz_mod(i32 undef, i32 undef, i32 %3)
%58 = tail call i32 @mpz_add_ui(i32 undef, i32 undef, i32 2)
%59 = tail call i32 @mpz_mod(i32 undef, i32 undef, i32 %3)
%60 = tail call i32 @mpz_clear(i32 undef)
%61 = tail call i32 @mpz_clear(i32 undef)
%62 = tail call i32 @mpz_clear(i32 undef)
%63 = tail call i32 @mpz_clear(i32 undef)
%64 = tail call i32 @mpz_clear(i32 undef)
ret void
}