#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_divexact(int /*<<< orphan*/, int /*<<< orphan*/,
                                int /*<<< orphan*/);
int /*<<< orphan*/ mpz_fac_ui(int /*<<< orphan*/, int);
int /*<<< orphan*/ mpz_init(int /*<<< orphan*/);
int /*<<< orphan*/ mpz_out_str(int /*<<< orphan*/, int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdout;
int main(int argc, char **argv) {
  mpz_t f, f20;
  mpz_init(f);
  mpz_init(f20);
  mpz_fac_ui(f20, 20);
  mpz_fac_ui(f, 40);
  mpz_divexact(f, f, f20);
  mpz_divexact(f, f, f20);
  mpz_out_str(stdout, 10, f);
  printf("\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x14(%rbp),%edi
call   1040 <mpz_init@plt>
mov    -0x18(%rbp),%edi
call   1040 <mpz_init@plt>
mov    -0x18(%rbp),%edi
mov    $0x14,%esi
call   1050 <mpz_fac_ui@plt>
mov    -0x14(%rbp),%edi
mov    $0x28,%esi
call   1050 <mpz_fac_ui@plt>
mov    -0x14(%rbp),%edi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
call   1070 <mpz_divexact@plt>
mov    -0x14(%rbp),%edi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
call   1070 <mpz_divexact@plt>
mov    0x2e2d(%rip),%rax
mov    (%rax),%edi
mov    -0x14(%rbp),%edx
mov    $0xa,%esi
call   1060 <mpz_out_str@plt>
lea    0xe37(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1040 <mpz_init@plt>
call   1040 <mpz_init@plt>
mov    $0x14,%esi
call   1050 <mpz_fac_ui@plt>
mov    $0x28,%esi
call   1050 <mpz_fac_ui@plt>
call   1070 <mpz_divexact@plt>
call   1070 <mpz_divexact@plt>
mov    0x2e60(%rip),%rax
mov    (%rax),%edi
mov    $0xa,%esi
call   1060 <mpz_out_str@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [2 x i8] c"\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i32, i32* %6
%9 = call i32 @mpz_init(i32 %8)
%10 = load i32, i32* %7
%11 = call i32 @mpz_init(i32 %10)
%12 = load i32, i32* %7
%13 = call i32 @mpz_fac_ui(i32 %12, i32 20)
%14 = load i32, i32* %6
%15 = call i32 @mpz_fac_ui(i32 %14, i32 40)
%16 = load i32, i32* %6
%17 = load i32, i32* %6
%18 = load i32, i32* %7
%19 = call i32 @mpz_divexact(i32 %16, i32 %17, i32 %18)
%20 = load i32, i32* %6
%21 = load i32, i32* %6
%22 = load i32, i32* %7
%23 = call i32 @mpz_divexact(i32 %20, i32 %21, i32 %22)
%24 = load i32, i32* @stdout
%25 = load i32, i32* %6
%26 = call i32 @mpz_out_str(i32 %24, i32 10, i32 %25)
%27 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
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_fac_ui(i32 undef, i32 20)
%6 = tail call i32 @mpz_fac_ui(i32 undef, i32 40)
%7 = tail call i32 @mpz_divexact(i32 undef, i32 undef, i32 undef)
%8 = tail call i32 @mpz_divexact(i32 undef, i32 undef, i32 undef)
%9 = load i32, i32* @stdout
%10 = tail call i32 @mpz_out_str(i32 %9, i32 10, i32 undef)
%11 = tail call i32 @putchar(i32 10)
ret i32 0
}