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

/* Variables and functions */
char *MPFR_VERSION_STRING;
int __GNU_MP_VERSION;
int __GNU_MP_VERSION_MINOR;
int __GNU_MP_VERSION_PATCHLEVEL;
char *gmp_version;
char *mpfr_get_version();
int /*<<< orphan*/ printf(char *, char *, ...);
int main(int argc, char **argv) {
  printf("%s: Compiled with mpfr version %s; using %s\n", argv[0],
         MPFR_VERSION_STRING, mpfr_get_version());
  printf("%s: Compiled with gmp version %d.%d.%d; using %s\n", argv[0],
         __GNU_MP_VERSION, __GNU_MP_VERSION_MINOR, __GNU_MP_VERSION_PATCHLEVEL,
         gmp_version);
  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    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    0x2eb0(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    $0x0,%al
call   1040 <mpfr_get_version@plt>
mov    -0x20(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    %rax,%rcx
lea    0xe98(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
mov    0x2e63(%rip),%rax
mov    (%rax),%edx
mov    0x2e42(%rip),%rax
mov    (%rax),%ecx
mov    0x2e41(%rip),%rax
mov    (%rax),%r8d
mov    0x2e27(%rip),%rax
mov    (%rax),%r9
lea    0xe8a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    (%rsi),%r14
mov    0x2ec6(%rip),%rax
mov    (%rax),%r15
xor    %eax,%eax
call   1040 <mpfr_get_version@plt>
lea    0xebd(%rip),%rdi
mov    %r14,%rsi
mov    %r15,%rdx
mov    %rax,%rcx
xor    %eax,%eax
call   1030 <printf@plt>
mov    (%rbx),%rsi
mov    0x2e83(%rip),%rax
mov    (%rax),%edx
mov    0x2e62(%rip),%rax
mov    (%rax),%ecx
mov    0x2e61(%rip),%rax
mov    (%rax),%r8d
mov    0x2e47(%rip),%rax
mov    (%rax),%r9
lea    0xeaa(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [45 x i8] c"%s: Compiled with mpfr version %s; using %s\0A\00"
@MPFR_VERSION_STRING = global i8* null
@.str.1 = [50 x i8] c"%s: Compiled with gmp version %d.%d.%d; using %s\0A\00"
@__GNU_MP_VERSION = global i32 0
@__GNU_MP_VERSION_MINOR = global i32 0
@__GNU_MP_VERSION_PATCHLEVEL = global i32 0
@gmp_version = global i8* null
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i8**, i8*** %5
%7 = getelementptr inbounds i8*, i8** %6, i64 0
%8 = load i8*, i8** %7
%9 = load i8*, i8** @MPFR_VERSION_STRING
%10 = call i8* (...) @mpfr_get_version()
%11 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i8* %8, i8* %9, i8* %10)
%12 = load i8**, i8*** %5
%13 = getelementptr inbounds i8*, i8** %12, i64 0
%14 = load i8*, i8** %13
%15 = load i32, i32* @__GNU_MP_VERSION
%16 = load i32, i32* @__GNU_MP_VERSION_MINOR
%17 = load i32, i32* @__GNU_MP_VERSION_PATCHLEVEL
%18 = load i8*, i8** @gmp_version
%19 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.1, i64 0, i64 0), i8* %14, i32 %15, i32 %16, i32 %17, i8* %18)
ret i32 0
}

LLVM IR (-O2):
@.str = [45 x i8] c"%s: Compiled with mpfr version %s; using %s\0A\00"
@MPFR_VERSION_STRING = global i8* null
@.str.1 = [50 x i8] c"%s: Compiled with gmp version %d.%d.%d; using %s\0A\00"
@__GNU_MP_VERSION = global i32 0
@__GNU_MP_VERSION_MINOR = global i32 0
@__GNU_MP_VERSION_PATCHLEVEL = global i32 0
@gmp_version = global i8* null
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = load i8*, i8** %1
%4 = load i8*, i8** @MPFR_VERSION_STRING
%5 = tail call i8* (...) @mpfr_get_version()
%6 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i8* %3, i8* %4, i8* %5)
%7 = load i8*, i8** %1
%8 = load i32, i32* @__GNU_MP_VERSION
%9 = load i32, i32* @__GNU_MP_VERSION_MINOR
%10 = load i32, i32* @__GNU_MP_VERSION_PATCHLEVEL
%11 = load i8*, i8** @gmp_version
%12 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.1, i64 0, i64 0), i8* %7, i32 %8, i32 %9, i32 %10, i8* %11)
ret i32 0
}