#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;

/* Variables and functions */
int /*<<< orphan*/ MPFR_RNDN;
int /*<<< orphan*/ mpfr_add_d(int /*<<< orphan*/, int /*<<< orphan*/, double,
                              int /*<<< orphan*/);
int /*<<< orphan*/ mpfr_get_default_prec();
int /*<<< orphan*/ mpfr_init2(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ mpfr_sub_d(int /*<<< orphan*/, int /*<<< orphan*/, double,
                              int /*<<< orphan*/);
void getBound(mpfr_t *bound, mpfr_t valueToBoundAround, int isLowerBound) {
  mpfr_init2(*bound, mpfr_get_default_prec());
  if (isLowerBound) {
    mpfr_sub_d(*bound, valueToBoundAround, 5.0 / 100.0, MPFR_RNDN);
  } else {
    mpfr_add_d(*bound, valueToBoundAround, 5.0 / 100.0, MPFR_RNDN);
  }
}


x86 assembly (clang, -O0):
<getBound>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1050 <mpfr_get_default_prec@plt>
mov    -0x14(%rbp),%edi
mov    %eax,%esi
call   1060 <mpfr_init2@plt>
cmpl   $0x0,-0x10(%rbp)
je     119a <getBound+0x5a>
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
mov    -0xc(%rbp),%esi
mov    0x2e62(%rip),%rax
mov    (%rax),%edx
movsd  0xe70(%rip),%xmm0
call   1030 <mpfr_sub_d@plt>
jmp    11b9 <getBound+0x79>
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
mov    -0xc(%rbp),%esi
mov    0x2e3e(%rip),%rax
mov    (%rax),%edx
movsd  0xe4c(%rip),%xmm0
call   1040 <mpfr_add_d@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getBound>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edx,%r15d
mov    %esi,%r14d
mov    %rdi,%rbx
mov    (%rdi),%ebp
xor    %eax,%eax
call   1050 <mpfr_get_default_prec@plt>
mov    %ebp,%edi
mov    %eax,%esi
call   1060 <mpfr_init2@plt>
mov    (%rbx),%edi
mov    0x2e7d(%rip),%rax
mov    (%rax),%edx
movsd  0xe8b(%rip),%xmm0
mov    %r14d,%esi
add    $0x8,%rsp
test   %r15d,%r15d
je     118c <getBound+0x4c>
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <mpfr_sub_d@plt>
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <mpfr_add_d@plt>

LLVM IR (-O0):
@MPFR_RNDN = global i32 0
define void @getBound(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32*, i32** %4
%8 = load i32, i32* %7
%9 = call i32 (...) @mpfr_get_default_prec()
%10 = call i32 @mpfr_init2(i32 %8, i32 %9)
%11 = load i32, i32* %6
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %19
13: ; preds = %3
%14 = load i32*, i32** %4
%15 = load i32, i32* %14
%16 = load i32, i32* %5
%17 = load i32, i32* @MPFR_RNDN
%18 = call i32 @mpfr_sub_d(i32 %15, i32 %16, double 5.000000e-02, i32 %17)
br label %25
19: ; preds = %3
%20 = load i32*, i32** %4
%21 = load i32, i32* %20
%22 = load i32, i32* %5
%23 = load i32, i32* @MPFR_RNDN
%24 = call i32 @mpfr_add_d(i32 %21, i32 %22, double 5.000000e-02, i32 %23)
br label %25
25: ; preds = %19, %13
ret void
}

LLVM IR (-O2):
@MPFR_RNDN = global i32 0
define void @getBound(i32* nocapture %0, i32 %1, i32 %2) {
%4 = load i32, i32* %0
%5 = tail call i32 (...) @mpfr_get_default_prec()
%6 = tail call i32 @mpfr_init2(i32 %4, i32 %5)
%7 = icmp eq i32 %2, 0
%8 = load i32, i32* %0
%9 = load i32, i32* @MPFR_RNDN
br i1 %7, label %12, label %10
10: ; preds = %3
%11 = tail call i32 @mpfr_sub_d(i32 %8, i32 %1, double 5.000000e-02, i32 %9)
br label %14
12: ; preds = %3
%13 = tail call i32 @mpfr_add_d(i32 %8, i32 %1, double 5.000000e-02, i32 %9)
br label %14
14: ; preds = %12, %10
ret void
}