#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*/ mpfr_t;
typedef int mpfr_exp_t;

/* Variables and functions */
int /*<<< orphan*/ MPFR_RNDN;
int /*<<< orphan*/ all(int /*<<< orphan*/, int /*<<< orphan*/, int);
int /*<<< orphan*/ mpfr_clears(int /*<<< orphan*/, int /*<<< orphan*/,
                               int /*<<< orphan*/ *);
int /*<<< orphan*/ mpfr_inits(int /*<<< orphan*/, int /*<<< orphan*/,
                              int /*<<< orphan*/ *);
int /*<<< orphan*/ mpfr_set_d(int /*<<< orphan*/, double, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int main() {
  mpfr_t op1, op2;
  mpfr_inits(op1, op2, NULL);
  mpfr_exp_t p;
  p = 321;
  mpfr_set_d(op1, 1. / 3, MPFR_RNDN);
  mpfr_set_d(op2, 1. / 10, MPFR_RNDN);
  all(op1, op2, p);
  printf("\n");
  mpfr_set_d(op1, -4. / 3, MPFR_RNDN);
  p = 3;
  all(op1, op2, p);
  printf("\n");
  mpfr_set_d(op1, 1. / 3, MPFR_RNDN);
  mpfr_set_d(op2, -113. / 10, MPFR_RNDN);
  p = 89045;
  all(op1, op2, p);
  printf("\n");
  mpfr_set_d(op1, +0.1, MPFR_RNDN);
  mpfr_set_d(op2, -1. / 10, MPFR_RNDN);
  p = 808;
  all(op1, op2, p);
  printf("\n");
  mpfr_set_d(op1, -0.1, MPFR_RNDN);
  mpfr_set_d(op2, -0.1, MPFR_RNDN);
  p = 7;
  all(op1, op2, p);
  mpfr_clears(op1, op2, NULL);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
xor    %eax,%eax
mov    %eax,%edx
call   1070 <mpfr_inits@plt>
movl   $0x141,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    0x2e69(%rip),%rax
mov    (%rax),%esi
movsd  0xe8f(%rip),%xmm0
call   1040 <mpfr_set_d@plt>
mov    -0xc(%rbp),%edi
mov    0x2e50(%rip),%rax
mov    (%rax),%esi
movsd  0xe66(%rip),%xmm0
call   1040 <mpfr_set_d@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <all@plt>
lea    0xe6c(%rip),%rdi
call   1050 <printf@plt>
mov    -0x8(%rbp),%edi
mov    0x2e1d(%rip),%rax
mov    (%rax),%esi
movsd  0xe4b(%rip),%xmm0
call   1040 <mpfr_set_d@plt>
movl   $0x3,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <all@plt>
lea    0xe32(%rip),%rdi
call   1050 <printf@plt>
mov    -0x8(%rbp),%edi
mov    0x2de3(%rip),%rax
mov    (%rax),%esi
movsd  0xe09(%rip),%xmm0
call   1040 <mpfr_set_d@plt>
mov    -0xc(%rbp),%edi
mov    0x2dca(%rip),%rax
mov    (%rax),%esi
movsd  0xde8(%rip),%xmm0
call   1040 <mpfr_set_d@plt>
movl   $0x15bd5,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <all@plt>
lea    0xddf(%rip),%rdi
call   1050 <printf@plt>
mov    -0x8(%rbp),%edi
mov    0x2d90(%rip),%rax
mov    (%rax),%esi
movsd  0xda6(%rip),%xmm0
call   1040 <mpfr_set_d@plt>
mov    -0xc(%rbp),%edi
mov    0x2d77(%rip),%rax
mov    (%rax),%esi
movsd  0xd85(%rip),%xmm0
call   1040 <mpfr_set_d@plt>
movl   $0x328,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <all@plt>
lea    0xd8c(%rip),%rdi
call   1050 <printf@plt>
mov    -0x8(%rbp),%edi
mov    0x2d3d(%rip),%rax
mov    (%rax),%esi
movsd  0xd4b(%rip),%xmm0
call   1040 <mpfr_set_d@plt>
mov    -0xc(%rbp),%edi
mov    0x2d24(%rip),%rax
mov    (%rax),%esi
movsd  0xd32(%rip),%xmm0
call   1040 <mpfr_set_d@plt>
movl   $0x7,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <all@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
xor    %eax,%eax
mov    %eax,%edx
call   1060 <mpfr_clears@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %edx,%edx
call   1070 <mpfr_inits@plt>
mov    0x2e89(%rip),%rbx
mov    (%rbx),%esi
movsd  0xe97(%rip),%xmm0
call   1050 <mpfr_set_d@plt>
mov    (%rbx),%esi
movsd  0xe90(%rip),%xmm0
call   1050 <mpfr_set_d@plt>
mov    $0x141,%edx
call   1040 <all@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    (%rbx),%esi
movsd  0xe75(%rip),%xmm0
call   1050 <mpfr_set_d@plt>
mov    $0x3,%edx
call   1040 <all@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    (%rbx),%esi
movsd  0xe42(%rip),%xmm0
call   1050 <mpfr_set_d@plt>
mov    (%rbx),%esi
movsd  0xe4b(%rip),%xmm0
call   1050 <mpfr_set_d@plt>
mov    $0x15bd5,%edx
call   1040 <all@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    (%rbx),%esi
movsd  0xe18(%rip),%xmm0
call   1050 <mpfr_set_d@plt>
mov    (%rbx),%esi
movsd  0xe21(%rip),%xmm0
call   1050 <mpfr_set_d@plt>
mov    $0x328,%edx
call   1040 <all@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    (%rbx),%esi
movsd  0xdfe(%rip),%xmm0
call   1050 <mpfr_set_d@plt>
mov    (%rbx),%esi
movsd  0xdef(%rip),%xmm0
call   1050 <mpfr_set_d@plt>
mov    $0x7,%edx
call   1040 <all@plt>
xor    %edx,%edx
call   1060 <mpfr_clears@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@MPFR_RNDN = global i32 0
@.str = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = load i32, i32* %2
%6 = load i32, i32* %3
%7 = call i32 @mpfr_inits(i32 %5, i32 %6, i32* null)
store i32 321, i32* %4
%8 = load i32, i32* %2
%9 = load i32, i32* @MPFR_RNDN
%10 = call i32 @mpfr_set_d(i32 %8, double 0x3FD5555555555555, i32 %9)
%11 = load i32, i32* %3
%12 = load i32, i32* @MPFR_RNDN
%13 = call i32 @mpfr_set_d(i32 %11, double 1.000000e-01, i32 %12)
%14 = load i32, i32* %2
%15 = load i32, i32* %3
%16 = load i32, i32* %4
%17 = call i32 @all(i32 %14, i32 %15, i32 %16)
%18 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%19 = load i32, i32* %2
%20 = load i32, i32* @MPFR_RNDN
%21 = call i32 @mpfr_set_d(i32 %19, double 0xBFF5555555555555, i32 %20)
store i32 3, i32* %4
%22 = load i32, i32* %2
%23 = load i32, i32* %3
%24 = load i32, i32* %4
%25 = call i32 @all(i32 %22, i32 %23, i32 %24)
%26 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%27 = load i32, i32* %2
%28 = load i32, i32* @MPFR_RNDN
%29 = call i32 @mpfr_set_d(i32 %27, double 0x3FD5555555555555, i32 %28)
%30 = load i32, i32* %3
%31 = load i32, i32* @MPFR_RNDN
%32 = call i32 @mpfr_set_d(i32 %30, double -1.130000e+01, i32 %31)
store i32 89045, i32* %4
%33 = load i32, i32* %2
%34 = load i32, i32* %3
%35 = load i32, i32* %4
%36 = call i32 @all(i32 %33, i32 %34, i32 %35)
%37 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%38 = load i32, i32* %2
%39 = load i32, i32* @MPFR_RNDN
%40 = call i32 @mpfr_set_d(i32 %38, double 1.000000e-01, i32 %39)
%41 = load i32, i32* %3
%42 = load i32, i32* @MPFR_RNDN
%43 = call i32 @mpfr_set_d(i32 %41, double -1.000000e-01, i32 %42)
store i32 808, i32* %4
%44 = load i32, i32* %2
%45 = load i32, i32* %3
%46 = load i32, i32* %4
%47 = call i32 @all(i32 %44, i32 %45, i32 %46)
%48 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%49 = load i32, i32* %2
%50 = load i32, i32* @MPFR_RNDN
%51 = call i32 @mpfr_set_d(i32 %49, double -1.000000e-01, i32 %50)
%52 = load i32, i32* %3
%53 = load i32, i32* @MPFR_RNDN
%54 = call i32 @mpfr_set_d(i32 %52, double -1.000000e-01, i32 %53)
store i32 7, i32* %4
%55 = load i32, i32* %2
%56 = load i32, i32* %3
%57 = load i32, i32* %4
%58 = call i32 @all(i32 %55, i32 %56, i32 %57)
%59 = load i32, i32* %2
%60 = load i32, i32* %3
%61 = call i32 @mpfr_clears(i32 %59, i32 %60, i32* null)
ret i32 0
}

LLVM IR (-O2):
@MPFR_RNDN = global i32 0
define i32 @main() {
%1 = tail call i32 @mpfr_inits(i32 undef, i32 undef, i32* null)
%2 = load i32, i32* @MPFR_RNDN
%3 = tail call i32 @mpfr_set_d(i32 undef, double 0x3FD5555555555555, i32 %2)
%4 = load i32, i32* @MPFR_RNDN
%5 = tail call i32 @mpfr_set_d(i32 undef, double 1.000000e-01, i32 %4)
%6 = tail call i32 @all(i32 undef, i32 undef, i32 321)
%7 = tail call i32 @putchar(i32 10)
%8 = load i32, i32* @MPFR_RNDN
%9 = tail call i32 @mpfr_set_d(i32 undef, double 0xBFF5555555555555, i32 %8)
%10 = tail call i32 @all(i32 undef, i32 undef, i32 3)
%11 = tail call i32 @putchar(i32 10)
%12 = load i32, i32* @MPFR_RNDN
%13 = tail call i32 @mpfr_set_d(i32 undef, double 0x3FD5555555555555, i32 %12)
%14 = load i32, i32* @MPFR_RNDN
%15 = tail call i32 @mpfr_set_d(i32 undef, double -1.130000e+01, i32 %14)
%16 = tail call i32 @all(i32 undef, i32 undef, i32 89045)
%17 = tail call i32 @putchar(i32 10)
%18 = load i32, i32* @MPFR_RNDN
%19 = tail call i32 @mpfr_set_d(i32 undef, double 1.000000e-01, i32 %18)
%20 = load i32, i32* @MPFR_RNDN
%21 = tail call i32 @mpfr_set_d(i32 undef, double -1.000000e-01, i32 %20)
%22 = tail call i32 @all(i32 undef, i32 undef, i32 808)
%23 = tail call i32 @putchar(i32 10)
%24 = load i32, i32* @MPFR_RNDN
%25 = tail call i32 @mpfr_set_d(i32 undef, double -1.000000e-01, i32 %24)
%26 = load i32, i32* @MPFR_RNDN
%27 = tail call i32 @mpfr_set_d(i32 undef, double -1.000000e-01, i32 %26)
%28 = tail call i32 @all(i32 undef, i32 undef, i32 7)
%29 = tail call i32 @mpfr_clears(i32 undef, i32 undef, i32* null)
ret i32 0
}