#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 /*<<< orphan*/ mpfr_exp_t;

/* Variables and functions */
int /*<<< orphan*/ MPFR_RNDN;
int /*<<< orphan*/ mpfr_clear(int /*<<< orphan*/);
int /*<<< orphan*/ mpfr_copysign(int /*<<< orphan*/, int /*<<< orphan*/,
                                 int /*<<< orphan*/, int /*<<< orphan*/);
char *mpfr_get_exp(int /*<<< orphan*/);
char *mpfr_get_version();
int /*<<< orphan*/ mpfr_init(int /*<<< orphan*/);
int /*<<< orphan*/ mpfr_max(int /*<<< orphan*/, int /*<<< orphan*/,
                            int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ mpfr_min(int /*<<< orphan*/, int /*<<< orphan*/,
                            int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ mpfr_nextabove(int /*<<< orphan*/);
int /*<<< orphan*/ mpfr_nextbelow(int /*<<< orphan*/);
int /*<<< orphan*/ mpfr_nexttoward(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ mpfr_printf(char *, int /*<<< orphan*/);
int /*<<< orphan*/ mpfr_set(int /*<<< orphan*/, int /*<<< orphan*/,
                            int /*<<< orphan*/);
int /*<<< orphan*/ mpfr_set_exp(int /*<<< orphan*/, int /*<<< orphan*/);
scalar_t__ mpfr_signbit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
void all(mpfr_t op1, mpfr_t op2, mpfr_exp_t exp) {
  mpfr_t rop;
  mpfr_init(rop);
  mpfr_set(rop, op1, MPFR_RNDN);
  mpfr_nexttoward(rop, op2);
  mpfr_printf("%.Re\n", rop);
  mpfr_set(rop, op1, MPFR_RNDN);
  mpfr_nextabove(rop);
  mpfr_printf("%.Re\n", rop);
  mpfr_set(rop, op1, MPFR_RNDN);
  mpfr_nextbelow(rop);
  mpfr_printf("%.Re\n", rop);
  mpfr_min(rop, op1, op2, MPFR_RNDN);
  mpfr_printf("%.Re\n", rop);
  mpfr_max(rop, op1, op2, MPFR_RNDN);
  mpfr_printf("%.Re\n", rop);
  printf("%ld\n", mpfr_get_exp(op1));
  mpfr_set(rop, op1, MPFR_RNDN);
  mpfr_set_exp(rop, exp);
  printf("%ld\n", mpfr_get_exp(rop));
  printf("%s\n", mpfr_signbit(op1) == 0 ? "Positive" : "Negative");
  mpfr_copysign(rop, op1, op2, MPFR_RNDN);
  mpfr_printf("%.Re\n", rop);
  printf("%s\n", mpfr_get_version());
  mpfr_clear(rop);
}


x86 assembly (clang, -O0):
<all>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x10(%rbp),%edi
call   1050 <mpfr_init@plt>
mov    -0x10(%rbp),%edi
mov    -0x4(%rbp),%esi
mov    0x2dd2(%rip),%rax
mov    (%rax),%edx
call   10d0 <mpfr_set@plt>
mov    -0x10(%rbp),%edi
mov    -0x8(%rbp),%esi
call   10f0 <mpfr_nexttoward@plt>
mov    -0x10(%rbp),%esi
lea    0xdce(%rip),%rdi
call   10b0 <mpfr_printf@plt>
mov    -0x10(%rbp),%edi
mov    -0x4(%rbp),%esi
mov    0x2da4(%rip),%rax
mov    (%rax),%edx
call   10d0 <mpfr_set@plt>
mov    -0x10(%rbp),%edi
call   10c0 <mpfr_nextabove@plt>
mov    -0x10(%rbp),%esi
lea    0xda3(%rip),%rdi
call   10b0 <mpfr_printf@plt>
mov    -0x10(%rbp),%edi
mov    -0x4(%rbp),%esi
mov    0x2d79(%rip),%rax
mov    (%rax),%edx
call   10d0 <mpfr_set@plt>
mov    -0x10(%rbp),%edi
call   1060 <mpfr_nextbelow@plt>
mov    -0x10(%rbp),%esi
lea    0xd78(%rip),%rdi
call   10b0 <mpfr_printf@plt>
mov    -0x10(%rbp),%edi
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    0x2d4b(%rip),%rax
mov    (%rax),%ecx
call   1110 <mpfr_min@plt>
mov    -0x10(%rbp),%esi
lea    0xd52(%rip),%rdi
call   10b0 <mpfr_printf@plt>
mov    -0x10(%rbp),%edi
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    0x2d25(%rip),%rax
mov    (%rax),%ecx
call   1040 <mpfr_max@plt>
mov    -0x10(%rbp),%esi
lea    0xd2c(%rip),%rdi
call   10b0 <mpfr_printf@plt>
mov    -0x4(%rbp),%edi
call   10e0 <mpfr_get_exp@plt>
mov    %rax,%rsi
lea    0xd1b(%rip),%rdi
call   1090 <printf@plt>
mov    -0x10(%rbp),%edi
mov    -0x4(%rbp),%esi
mov    0x2ceb(%rip),%rax
mov    (%rax),%edx
call   10d0 <mpfr_set@plt>
mov    -0x10(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1070 <mpfr_set_exp@plt>
mov    -0x10(%rbp),%edi
call   10e0 <mpfr_get_exp@plt>
mov    %rax,%rsi
lea    0xce5(%rip),%rdi
call   1090 <printf@plt>
mov    -0x4(%rbp),%edi
call   1080 <mpfr_signbit@plt>
mov    %rax,%rcx
lea    0xce0(%rip),%rsi
lea    0xcd0(%rip),%rax
cmp    $0x0,%rcx
cmove  %rax,%rsi
lea    0xcbd(%rip),%rdi
call   1090 <printf@plt>
mov    -0x10(%rbp),%edi
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    0x2c85(%rip),%rax
mov    (%rax),%ecx
call   1030 <mpfr_copysign@plt>
mov    -0x10(%rbp),%esi
lea    0xc8c(%rip),%rdi
call   10b0 <mpfr_printf@plt>
mov    $0x0,%al
call   1100 <mpfr_get_version@plt>
mov    %rax,%rsi
lea    0xc81(%rip),%rdi
call   1090 <printf@plt>
mov    -0x10(%rbp),%edi
call   10a0 <mpfr_clear@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<all>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %edx,%r15d
mov    %esi,%ebx
mov    %edi,%ebp
call   1050 <mpfr_init@plt>
mov    0x2dda(%rip),%r13
mov    0x0(%r13),%edx
mov    %ebp,%esi
call   10d0 <mpfr_set@plt>
mov    %ebx,%esi
call   10f0 <mpfr_nexttoward@plt>
lea    0xdd9(%rip),%r14
mov    %r14,%rdi
call   10b0 <mpfr_printf@plt>
mov    0x0(%r13),%edx
mov    %ebp,%esi
call   10d0 <mpfr_set@plt>
call   10c0 <mpfr_nextabove@plt>
mov    %r14,%rdi
call   10b0 <mpfr_printf@plt>
mov    0x0(%r13),%edx
mov    %ebp,%esi
call   10d0 <mpfr_set@plt>
call   1060 <mpfr_nextbelow@plt>
mov    %r14,%rdi
call   10b0 <mpfr_printf@plt>
mov    0x0(%r13),%ecx
mov    %ebp,%esi
mov    %ebx,%edx
call   1110 <mpfr_min@plt>
mov    %r14,%rdi
call   10b0 <mpfr_printf@plt>
mov    0x0(%r13),%ecx
mov    %ebp,%esi
mov    %ebx,%edx
call   1040 <mpfr_max@plt>
mov    %r14,%rdi
call   10b0 <mpfr_printf@plt>
mov    %ebp,%edi
call   10e0 <mpfr_get_exp@plt>
lea    0xd6f(%rip),%r12
mov    %r12,%rdi
mov    %rax,%rsi
call   1090 <printf@plt>
mov    0x0(%r13),%edx
mov    %ebp,%esi
call   10d0 <mpfr_set@plt>
mov    %r15d,%esi
call   1070 <mpfr_set_exp@plt>
call   10e0 <mpfr_get_exp@plt>
mov    %r12,%rdi
mov    %rax,%rsi
call   1090 <printf@plt>
mov    %ebp,%edi
call   1080 <mpfr_signbit@plt>
test   %rax,%rax
lea    0xd39(%rip),%rax
lea    0xd3b(%rip),%rsi
cmove  %rax,%rsi
lea    0xd23(%rip),%r15
mov    %r15,%rdi
call   1090 <printf@plt>
mov    0x0(%r13),%ecx
mov    %ebp,%esi
mov    %ebx,%edx
call   1030 <mpfr_copysign@plt>
mov    %r14,%rdi
call   10b0 <mpfr_printf@plt>
xor    %eax,%eax
call   1100 <mpfr_get_version@plt>
mov    %r15,%rdi
mov    %rax,%rsi
call   1090 <printf@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    10a0 <mpfr_clear@plt>

LLVM IR (-O0):
@MPFR_RNDN = global i32 0
@.str = [6 x i8] c"%.Re\0A\00"
@.str.1 = [5 x i8] c"%ld\0A\00"
@.str.2 = [4 x i8] c"%s\0A\00"
@.str.3 = [9 x i8] c"Positive\00"
@.str.4 = [9 x i8] c"Negative\00"
define void @all(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %7
%9 = call i32 @mpfr_init(i32 %8)
%10 = load i32, i32* %7
%11 = load i32, i32* %4
%12 = load i32, i32* @MPFR_RNDN
%13 = call i32 @mpfr_set(i32 %10, i32 %11, i32 %12)
%14 = load i32, i32* %7
%15 = load i32, i32* %5
%16 = call i32 @mpfr_nexttoward(i32 %14, i32 %15)
%17 = load i32, i32* %7
%18 = call i32 @mpfr_printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %17)
%19 = load i32, i32* %7
%20 = load i32, i32* %4
%21 = load i32, i32* @MPFR_RNDN
%22 = call i32 @mpfr_set(i32 %19, i32 %20, i32 %21)
%23 = load i32, i32* %7
%24 = call i32 @mpfr_nextabove(i32 %23)
%25 = load i32, i32* %7
%26 = call i32 @mpfr_printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %25)
%27 = load i32, i32* %7
%28 = load i32, i32* %4
%29 = load i32, i32* @MPFR_RNDN
%30 = call i32 @mpfr_set(i32 %27, i32 %28, i32 %29)
%31 = load i32, i32* %7
%32 = call i32 @mpfr_nextbelow(i32 %31)
%33 = load i32, i32* %7
%34 = call i32 @mpfr_printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %33)
%35 = load i32, i32* %7
%36 = load i32, i32* %4
%37 = load i32, i32* %5
%38 = load i32, i32* @MPFR_RNDN
%39 = call i32 @mpfr_min(i32 %35, i32 %36, i32 %37, i32 %38)
%40 = load i32, i32* %7
%41 = call i32 @mpfr_printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %40)
%42 = load i32, i32* %7
%43 = load i32, i32* %4
%44 = load i32, i32* %5
%45 = load i32, i32* @MPFR_RNDN
%46 = call i32 @mpfr_max(i32 %42, i32 %43, i32 %44, i32 %45)
%47 = load i32, i32* %7
%48 = call i32 @mpfr_printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %47)
%49 = load i32, i32* %4
%50 = call i8* @mpfr_get_exp(i32 %49)
%51 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %50)
%52 = load i32, i32* %7
%53 = load i32, i32* %4
%54 = load i32, i32* @MPFR_RNDN
%55 = call i32 @mpfr_set(i32 %52, i32 %53, i32 %54)
%56 = load i32, i32* %7
%57 = load i32, i32* %6
%58 = call i32 @mpfr_set_exp(i32 %56, i32 %57)
%59 = load i32, i32* %7
%60 = call i8* @mpfr_get_exp(i32 %59)
%61 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %60)
%62 = load i32, i32* %4
%63 = call i64 @mpfr_signbit(i32 %62)
%64 = icmp eq i64 %63, 0
%65 = zext i1 %64 to i64
%66 = select i1 %64, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0)
%67 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %66)
%68 = load i32, i32* %7
%69 = load i32, i32* %4
%70 = load i32, i32* %5
%71 = load i32, i32* @MPFR_RNDN
%72 = call i32 @mpfr_copysign(i32 %68, i32 %69, i32 %70, i32 %71)
%73 = load i32, i32* %7
%74 = call i32 @mpfr_printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %73)
%75 = call i8* (...) @mpfr_get_version()
%76 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %75)
%77 = load i32, i32* %7
%78 = call i32 @mpfr_clear(i32 %77)
ret void
}

LLVM IR (-O2):
@MPFR_RNDN = global i32 0
@.str = [6 x i8] c"%.Re\0A\00"
@.str.1 = [5 x i8] c"%ld\0A\00"
@.str.2 = [4 x i8] c"%s\0A\00"
@.str.3 = [9 x i8] c"Positive\00"
@.str.4 = [9 x i8] c"Negative\00"
define void @all(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @mpfr_init(i32 undef)
%5 = load i32, i32* @MPFR_RNDN
%6 = tail call i32 @mpfr_set(i32 undef, i32 %0, i32 %5)
%7 = tail call i32 @mpfr_nexttoward(i32 undef, i32 %1)
%8 = tail call i32 @mpfr_printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 undef)
%9 = load i32, i32* @MPFR_RNDN
%10 = tail call i32 @mpfr_set(i32 undef, i32 %0, i32 %9)
%11 = tail call i32 @mpfr_nextabove(i32 undef)
%12 = tail call i32 @mpfr_printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 undef)
%13 = load i32, i32* @MPFR_RNDN
%14 = tail call i32 @mpfr_set(i32 undef, i32 %0, i32 %13)
%15 = tail call i32 @mpfr_nextbelow(i32 undef)
%16 = tail call i32 @mpfr_printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 undef)
%17 = load i32, i32* @MPFR_RNDN
%18 = tail call i32 @mpfr_min(i32 undef, i32 %0, i32 %1, i32 %17)
%19 = tail call i32 @mpfr_printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 undef)
%20 = load i32, i32* @MPFR_RNDN
%21 = tail call i32 @mpfr_max(i32 undef, i32 %0, i32 %1, i32 %20)
%22 = tail call i32 @mpfr_printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 undef)
%23 = tail call i8* @mpfr_get_exp(i32 %0)
%24 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %23)
%25 = load i32, i32* @MPFR_RNDN
%26 = tail call i32 @mpfr_set(i32 undef, i32 %0, i32 %25)
%27 = tail call i32 @mpfr_set_exp(i32 undef, i32 %2)
%28 = tail call i8* @mpfr_get_exp(i32 undef)
%29 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %28)
%30 = tail call i64 @mpfr_signbit(i32 %0)
%31 = icmp eq i64 %30, 0
%32 = select i1 %31, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0)
%33 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %32)
%34 = load i32, i32* @MPFR_RNDN
%35 = tail call i32 @mpfr_copysign(i32 undef, i32 %0, i32 %1, i32 %34)
%36 = tail call i32 @mpfr_printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 undef)
%37 = tail call i8* (...) @mpfr_get_version()
%38 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %37)
%39 = tail call i32 @mpfr_clear(i32 undef)
ret void
}