#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*/ gmp_printf(char *, int /*<<< orphan*/);
int /*<<< orphan*/ mpz_clear(int /*<<< orphan*/);
int /*<<< orphan*/ mpz_divexact(int /*<<< orphan*/, int /*<<< orphan*/,
                                int /*<<< orphan*/);
int /*<<< orphan*/ mpz_fac_ui(int /*<<< orphan*/, int);
int /*<<< orphan*/ mpz_init(int /*<<< orphan*/);
int /*<<< orphan*/ mpz_pow_ui(int /*<<< orphan*/, int /*<<< orphan*/, int);
int Problem015() {
  mpz_t a, n;
  mpz_init(a);
  mpz_init(n);
  mpz_fac_ui(a, 40);
  mpz_fac_ui(n, 20);
  mpz_pow_ui(n, n, 2);
  mpz_divexact(n, a, n);
  gmp_printf("%30Zd", n);
  mpz_clear(a);
  mpz_clear(n);
  return 0;
}


x86 assembly (clang, -O0):
<Problem015>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    -0x4(%rbp),%edi
call   1030 <mpz_init@plt>
mov    -0x8(%rbp),%edi
call   1030 <mpz_init@plt>
mov    -0x4(%rbp),%edi
mov    $0x28,%esi
call   1040 <mpz_fac_ui@plt>
mov    -0x8(%rbp),%edi
mov    $0x14,%esi
call   1040 <mpz_fac_ui@plt>
mov    -0x8(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    $0x2,%edx
call   1060 <mpz_pow_ui@plt>
mov    -0x8(%rbp),%edi
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
call   1050 <mpz_divexact@plt>
mov    -0x8(%rbp),%esi
lea    0xe46(%rip),%rdi
call   1080 <gmp_printf@plt>
mov    -0x4(%rbp),%edi
call   1070 <mpz_clear@plt>
mov    -0x8(%rbp),%edi
call   1070 <mpz_clear@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Problem015>:
push   %rax
call   1030 <mpz_init@plt>
call   1030 <mpz_init@plt>
mov    $0x28,%esi
call   1040 <mpz_fac_ui@plt>
mov    $0x14,%esi
call   1040 <mpz_fac_ui@plt>
mov    $0x2,%edx
call   1060 <mpz_pow_ui@plt>
call   1050 <mpz_divexact@plt>
lea    0xe6b(%rip),%rdi
call   1080 <gmp_printf@plt>
call   1070 <mpz_clear@plt>
call   1070 <mpz_clear@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%30Zd\00"
define i32 @Problem015() {
%1 = alloca i32
%2 = alloca i32
%3 = load i32, i32* %1
%4 = call i32 @mpz_init(i32 %3)
%5 = load i32, i32* %2
%6 = call i32 @mpz_init(i32 %5)
%7 = load i32, i32* %1
%8 = call i32 @mpz_fac_ui(i32 %7, i32 40)
%9 = load i32, i32* %2
%10 = call i32 @mpz_fac_ui(i32 %9, i32 20)
%11 = load i32, i32* %2
%12 = load i32, i32* %2
%13 = call i32 @mpz_pow_ui(i32 %11, i32 %12, i32 2)
%14 = load i32, i32* %2
%15 = load i32, i32* %1
%16 = load i32, i32* %2
%17 = call i32 @mpz_divexact(i32 %14, i32 %15, i32 %16)
%18 = load i32, i32* %2
%19 = call i32 @gmp_printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %18)
%20 = load i32, i32* %1
%21 = call i32 @mpz_clear(i32 %20)
%22 = load i32, i32* %2
%23 = call i32 @mpz_clear(i32 %22)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"%30Zd\00"
define i32 @Problem015() {
%1 = tail call i32 @mpz_init(i32 undef)
%2 = tail call i32 @mpz_init(i32 undef)
%3 = tail call i32 @mpz_fac_ui(i32 undef, i32 40)
%4 = tail call i32 @mpz_fac_ui(i32 undef, i32 20)
%5 = tail call i32 @mpz_pow_ui(i32 undef, i32 undef, i32 2)
%6 = tail call i32 @mpz_divexact(i32 undef, i32 undef, i32 undef)
%7 = tail call i32 @gmp_printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 undef)
%8 = tail call i32 @mpz_clear(i32 undef)
%9 = tail call i32 @mpz_clear(i32 undef)
ret i32 0
}