xunge/DecIR huggingface dataset:
/* Type definitions */
typedef scalar_t__ rlim_t;

/* Variables and functions */
int compare_rlimits(const void *ap, const void *bp) {
  rlim_t a = *(rlim_t *)ap;
  rlim_t b = *(rlim_t *)bp;
  if (a < b)
    return 1;
  else if (a > b)
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<compare_rlimits>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x28(%rbp),%rax
jge    113c <compare_rlimits+0x3c>
movl   $0x1,-0x4(%rbp)
jmp    1162 <compare_rlimits+0x62>
mov    -0x20(%rbp),%rax
cmp    -0x28(%rbp),%rax
jle    1156 <compare_rlimits+0x56>
movl   $0xffffffff,-0x4(%rbp)
jmp    1162 <compare_rlimits+0x62>
jmp    115b <compare_rlimits+0x5b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare_rlimits>:
mov    (%rdi),%rax
mov    (%rsi),%rcx
xor    %edx,%edx
cmp    %rcx,%rax
setg   %dl
neg    %edx
cmp    %rcx,%rax
mov    $0x1,%eax
cmovge %edx,%eax
ret

LLVM IR (-O0):
define i32 @compare_rlimits(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i64*
%10 = load i64, i64* %9
store i64 %10, i64* %6
%11 = load i8*, i8** %5
%12 = bitcast i8* %11 to i64*
%13 = load i64, i64* %12
store i64 %13, i64* %7
%14 = load i64, i64* %6
%15 = load i64, i64* %7
%16 = icmp slt i64 %14, %15
br i1 %16, label %17, label %18
17: ; preds = %2
store i32 1, i32* %3
br label %25
18: ; preds = %2
%19 = load i64, i64* %6
%20 = load i64, i64* %7
%21 = icmp sgt i64 %19, %20
br i1 %21, label %22, label %23
22: ; preds = %18
store i32 -1, i32* %3
br label %25
23: ; preds = %18
br label %24
24: ; preds = %23
store i32 0, i32* %3
br label %25
25: ; preds = %24, %22, %17
%26 = load i32, i32* %3
ret i32 %26
}

LLVM IR (-O2):
define i32 @compare_rlimits(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i64*
%4 = load i64, i64* %3
%5 = bitcast i8* %1 to i64*
%6 = load i64, i64* %5
%7 = icmp slt i64 %4, %6
%8 = icmp sgt i64 %4, %6
%9 = sext i1 %8 to i32
%10 = select i1 %7, i32 1, i32 %9
ret i32 %10
}
/* Type definitions */
struct i8x_object {
  int dummy;
};
struct i8x_func {
  int dummy;
};

/* Variables and functions */
void *i8x_ob_get_userdata(struct i8x_object *);
void *__attribute__((always_)) i8x_func_get_userdata(struct i8x_func *x) {
  return i8x_ob_get_userdata((struct i8x_object *)x);
}


x86 assembly (clang, -O0):
<i8x_func_get_userdata>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <i8x_ob_get_userdata@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i8x_func_get_userdata>:
jmp    1030 <i8x_ob_get_userdata@plt>

LLVM IR (-O0):
%struct.i8x_func = type { i32 }
%struct.i8x_object = type { i32 }
define i8* @i8x_func_get_userdata(%struct.i8x_func* %0) {
%2 = alloca %struct.i8x_func*
store %struct.i8x_func* %0, %struct.i8x_func** %2
%3 = load %struct.i8x_func*, %struct.i8x_func** %2
%4 = bitcast %struct.i8x_func* %3 to %struct.i8x_object*
%5 = call i8* @i8x_ob_get_userdata(%struct.i8x_object* %4)
ret i8* %5
}

LLVM IR (-O2):
%struct.i8x_func = type { i32 }
%struct.i8x_object = type { i32 }
define i8* @i8x_func_get_userdata(%struct.i8x_func* %0) {
%2 = bitcast %struct.i8x_func* %0 to %struct.i8x_object*
%3 = tail call i8* @i8x_ob_get_userdata(%struct.i8x_object* %2)
ret i8* %3
}
void gdk_pango_renderer_get_default() {}


x86 assembly (clang, -O0):
<gdk_pango_renderer_get_default>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gdk_pango_renderer_get_default>:
ret

LLVM IR (-O0):
define void @gdk_pango_renderer_get_default() {
ret void
}

LLVM IR (-O2):
define void @gdk_pango_renderer_get_default() {
ret void
}
int VL_NULL_GetActiveBufferId(void *surface) {
  (void)surface;
  return 0;
}


x86 assembly (clang, -O0):
<VL_NULL_GetActiveBufferId>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<VL_NULL_GetActiveBufferId>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @VL_NULL_GetActiveBufferId(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
ret i32 0
}

LLVM IR (-O2):
define i32 @VL_NULL_GetActiveBufferId(i8* nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
typedef unsigned long volatile uint32_t;

/* Variables and functions */
void RFCCpeIntDisable(uint32_t ui32Mask) {
  (*((volatile unsigned long *)(0x40041000 + 0x00000014))) &= ~ui32Mask;
}


x86 assembly (clang, -O0):
<RFCCpeIntDisable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
xor    $0xffffffffffffffff,%rax
mov    $0x40041014,%ecx
mov    (%rcx),%rcx
and    %rax,%rcx
mov    $0x40041014,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<RFCCpeIntDisable>:
mov    %rdi,-0x8(%rsp)
mov    -0x8(%rsp),%rax
not    %rax
and    %rax,0x40041014
40
ret

LLVM IR (-O0):
define void @RFCCpeIntDisable(i64 %0) {
%2 = alloca i64
store volatile i64 %0, i64* %2
%3 = load volatile i64, i64* %2
%4 = xor i64 %3, -1
%5 = load volatile i64, i64* inttoptr (i64 1074008084 to i64*)
%6 = and i64 %5, %4
store volatile i64 %6, i64* inttoptr (i64 1074008084 to i64*)
ret void
}

LLVM IR (-O2):
define void @RFCCpeIntDisable(i64 %0) {
%2 = alloca i64
store volatile i64 %0, i64* %2
%3 = load volatile i64, i64* %2
%4 = xor i64 %3, -1
%5 = load volatile i64, i64* inttoptr (i64 1074008084 to i64*)
%6 = and i64 %5, %4
store volatile i64 %6, i64* inttoptr (i64 1074008084 to i64*)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ reqbuf;

/* Variables and functions */
int ph_rpc(char *);
int /*<<< orphan*/ snprintf(char *, int, char *, int, char const *);
int phPlaySoundFile(const char *fileName, int loop) {
  char reqbuf[256];
  snprintf(reqbuf, sizeof(reqbuf), "PLAY LOOP=%d FILE=%s", loop, fileName);
  return ph_rpc(reqbuf);
}


x86 assembly (clang, -O0):
<phPlaySoundFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    -0x110(%rbp),%rdi
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%r8
mov    $0x100,%esi
lea    0xeb4(%rip),%rdx
call   1030 <snprintf@plt>
lea    -0x110(%rbp),%rdi
call   1040 <ph_rpc@plt>
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<phPlaySoundFile>:
push   %rbx
sub    $0x100,%rsp
mov    %esi,%ecx
mov    %rdi,%r8
lea    0xecc(%rip),%rdx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x100,%esi
call   1030 <snprintf@plt>
mov    %rbx,%rdi
call   1040 <ph_rpc@plt>
add    $0x100,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"PLAY LOOP=%d FILE=%s\00"
define i32 @phPlaySoundFile(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca [256 x i8]
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%7 = load i32, i32* %4
%8 = load i8*, i8** %3
%9 = call i32 @snprintf(i8* %6, i32 256, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %7, i8* %8)
%10 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%11 = call i32 @ph_rpc(i8* %10)
ret i32 %11
}

LLVM IR (-O2):
@.str = [21 x i8] c"PLAY LOOP=%d FILE=%s\00"
define i32 @phPlaySoundFile(i8* %0, i32 %1) {
%3 = alloca [256 x i8]
%4 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%5 = call i32 @snprintf(i8* %4, i32 256, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %1, i8* %0)
%6 = call i32 @ph_rpc(i8* %4)
ret i32 %6
}
int decrypt_block(int keytype, const unsigned char *IV,
                  const unsigned char *key, const unsigned char *aad,
                  unsigned int aadlen, unsigned char *src, unsigned int srclen,
                  unsigned char *dest, unsigned int *destlen) {
  return 0;
}


x86 assembly (clang, -O0):
<decrypt_block>:
push   %rbp
mov    %rsp,%rbp
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    %r9,-0x30(%rbp)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<decrypt_block>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @decrypt_block(i32 %0, i8* %1, i8* %2, i8* %3, i32 %4, i8* %5, i32 %6, i8* %7, i32* %8) {
%10 = alloca i32
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i8*
%14 = alloca i32
%15 = alloca i8*
%16 = alloca i32
%17 = alloca i8*
%18 = alloca i32*
store i32 %0, i32* %10
store i8* %1, i8** %11
store i8* %2, i8** %12
store i8* %3, i8** %13
store i32 %4, i32* %14
store i8* %5, i8** %15
store i32 %6, i32* %16
store i8* %7, i8** %17
store i32* %8, i32** %18
ret i32 0
}

LLVM IR (-O2):
define i32 @decrypt_block(i32 %0, i8* nocapture readnone %1, i8* nocapture readnone %2, i8* nocapture readnone %3, i32 %4, i8* nocapture readnone %5, i32 %6, i8* nocapture readnone %7, i32* nocapture readnone %8) {
ret i32 0
}
int test_imm_3Duint8_reg(unsigned char val) {
  return ((val) & (-0x3D << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_3Duint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edx
and    $0xffffffc3,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_3Duint8_reg>:
test   $0xc3,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_3Duint8_reg(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = and i32 %4, -61
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_3Duint8_reg(i8 zeroext %0) {
%2 = and i8 %0, -61
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_mutexattr_t;

/* Variables and functions */
int pthread_mutexattr_settype(pthread_mutexattr_t *a, int b) { return 0; }


x86 assembly (clang, -O0):
<pthread_mutexattr_settype>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pthread_mutexattr_settype>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @pthread_mutexattr_settype(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
ret i32 0
}

LLVM IR (-O2):
define i32 @pthread_mutexattr_settype(i32* nocapture readnone %0, i32 %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *);
int /*<<< orphan*/ stderr;
void PrintArgs(char *name) {
  fprintf(stderr,
          "                                                      \n"
          "Usage: %s <output_forward> <output_reverse> < input   \n"
          "                                                      \n"
          "It splits Paired End files according to the           \n"
          "direction of the strand ('/1' or '/2'). It writes by  \n"
          "default singleton reads as forward stands.            \n"
          "                                                      \n"
          "Example: ./%s HN_r1.fq HN_r2.fq < HN.fq               \n"
          "                                                      \n",
          name, name);
}


x86 assembly (clang, -O0):
<PrintArgs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x8(%rbp),%rcx
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PrintArgs>:
mov    %rdi,%rcx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
mov    %rcx,%rdx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [496 x i8] c" \0AUsage: %s <output_forward> <output_reverse> < input \0A \0AIt splits Paired End files according to the \0Adirection of the strand ('/1' or '/2'). It writes by \0Adefault singleton reads as forward stands. \0A \0AExample: ./%s HN_r1.fq HN_r2.fq < HN.fq \0A \0A\00"
define void @PrintArgs(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([496 x i8], [496 x i8]* @.str, i64 0, i64 0), i8* %4, i8* %5)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [496 x i8] c" \0AUsage: %s <output_forward> <output_reverse> < input \0A \0AIt splits Paired End files according to the \0Adirection of the strand ('/1' or '/2'). It writes by \0Adefault singleton reads as forward stands. \0A \0AExample: ./%s HN_r1.fq HN_r2.fq < HN.fq \0A \0A\00"
define void @PrintArgs(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([496 x i8], [496 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %0)
ret void
}
/* Variables and functions */
double DBETWEEN(double, double);
int /*<<< orphan*/ DSENSITIVITY(double);
int main(void) {
  double x, y, t, r;
  x = DBETWEEN(1.001, 2.0);
  y = DBETWEEN(1.001, 2.0);
  t = x * y;
  r = (t - 1.0) / (t * t - 1.0);
  DSENSITIVITY(r);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  0xee0(%rip),%xmm0
movsd  0xee0(%rip),%xmm1
call   1030 <DBETWEEN@plt>
movsd  %xmm0,-0x8(%rbp)
movsd  0xec6(%rip),%xmm0
movsd  0xec6(%rip),%xmm1
call   1030 <DBETWEEN@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  0xe90(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xe6e(%rip),%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
call   1040 <DSENSITIVITY@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movsd  0xed7(%rip),%xmm0
movsd  0xed7(%rip),%xmm1
call   1030 <DBETWEEN@plt>
movsd  %xmm0,(%rsp)
movsd  0xebd(%rip),%xmm0
movsd  0xebd(%rip),%xmm1
call   1030 <DBETWEEN@plt>
mulsd  (%rsp),%xmm0
movsd  0xeb3(%rip),%xmm2
movapd %xmm0,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm0,%xmm0
addsd  %xmm2,%xmm0
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
call   1040 <DSENSITIVITY@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = call double @DBETWEEN(double 1.001000e+00, double 2.000000e+00)
store double %5, double* %1
%6 = call double @DBETWEEN(double 1.001000e+00, double 2.000000e+00)
store double %6, double* %2
%7 = load double, double* %1
%8 = load double, double* %2
%9 = fmul double %7, %8
store double %9, double* %3
%10 = load double, double* %3
%11 = fsub double %10, 1.000000e+00
%12 = load double, double* %3
%13 = load double, double* %3
%14 = call double @llvm.fmuladd.f64(double %12, double %13, double -1.000000e+00)
%15 = fdiv double %11, %14
store double %15, double* %4
%16 = load double, double* %4
%17 = call i32 @DSENSITIVITY(double %16)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call double @DBETWEEN(double 1.001000e+00, double 2.000000e+00)
%2 = tail call double @DBETWEEN(double 1.001000e+00, double 2.000000e+00)
%3 = fmul double %1, %2
%4 = fadd double %3, -1.000000e+00
%5 = tail call double @llvm.fmuladd.f64(double %3, double %3, double -1.000000e+00)
%6 = fdiv double %4, %5
%7 = tail call i32 @DSENSITIVITY(double %6)
ret i32 0
}
void initTerm() {}


x86 assembly (clang, -O0):
<initTerm>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<initTerm>:
ret

LLVM IR (-O0):
define void @initTerm() {
ret void
}

LLVM IR (-O2):
define void @initTerm() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void throw_ussage_error() {
  fprintf(stderr, "Nejsou definovany nutne parametry, nebo jsou definovany "
                  "spatne. Pro napovedu pouzijte prepinac --help\n");
}


x86 assembly (clang, -O0):
<throw_ussage_error>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<throw_ussage_error>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [103 x i8] c"Nejsou definovany nutne parametry, nebo jsou definovany spatne. Pro napovedu pouzijte prepinac --help\0A\00"
define void @throw_ussage_error() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [103 x i8] c"Nejsou definovany nutne parametry, nebo jsou definovany spatne. Pro napovedu pouzijte prepinac --help\0A\00"
define void @throw_ussage_error() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct yaffs_obj {
  int dummy;
};

/* Variables and functions */
int yaffs_do_listxattr_reldir(struct yaffs_obj *, char const *, char *, int,
                              int /*<<< orphan*/);
int yaffs_llistxattr_reldir(struct yaffs_obj *reldir, const char *path,
                            char *data, int size) {
  return yaffs_do_listxattr_reldir(reldir, path, data, size, 0);
}


x86 assembly (clang, -O0):
<yaffs_llistxattr_reldir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
xor    %r8d,%r8d
call   1030 <yaffs_do_listxattr_reldir@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yaffs_llistxattr_reldir>:
xor    %r8d,%r8d
jmp    1030 <yaffs_do_listxattr_reldir@plt>

LLVM IR (-O0):
%struct.yaffs_obj = type { i32 }
define i32 @yaffs_llistxattr_reldir(%struct.yaffs_obj* %0, i8* %1, i8* %2, i32 %3) {
%5 = alloca %struct.yaffs_obj*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
store %struct.yaffs_obj* %0, %struct.yaffs_obj** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load %struct.yaffs_obj*, %struct.yaffs_obj** %5
%10 = load i8*, i8** %6
%11 = load i8*, i8** %7
%12 = load i32, i32* %8
%13 = call i32 @yaffs_do_listxattr_reldir(%struct.yaffs_obj* %9, i8* %10, i8* %11, i32 %12, i32 0)
ret i32 %13
}

LLVM IR (-O2):
%struct.yaffs_obj = type { i32 }
define i32 @yaffs_llistxattr_reldir(%struct.yaffs_obj* %0, i8* %1, i8* %2, i32 %3) {
%5 = tail call i32 @yaffs_do_listxattr_reldir(%struct.yaffs_obj* %0, i8* %1, i8* %2, i32 %3, i32 0)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ CONF_modules_unload(int);
int /*<<< orphan*/ CRYPTO_cleanup_all_ex_data();
int /*<<< orphan*/ ENGINE_cleanup();
int /*<<< orphan*/ ERR_free_strings();
int /*<<< orphan*/ ERR_remove_thread_state(int /*<<< orphan*/ *);
int /*<<< orphan*/ EVP_cleanup();
int /*<<< orphan*/ OBJ_cleanup();
int /*<<< orphan*/ destroy_ui_method();
void openssl_shutdown(void) {
  CONF_modules_unload(1);
  destroy_ui_method();
  OBJ_cleanup();
  EVP_cleanup();
  ENGINE_cleanup();
  CRYPTO_cleanup_all_ex_data();
  ERR_remove_thread_state(NULL);
  ERR_free_strings();
}


x86 assembly (clang, -O0):
<openssl_shutdown>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1060 <CONF_modules_unload@plt>
mov    $0x0,%al
call   10a0 <destroy_ui_method@plt>
mov    $0x0,%al
call   1070 <OBJ_cleanup@plt>
mov    $0x0,%al
call   1080 <EVP_cleanup@plt>
mov    $0x0,%al
call   1050 <ENGINE_cleanup@plt>
mov    $0x0,%al
call   1040 <CRYPTO_cleanup_all_ex_data@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1030 <ERR_remove_thread_state@plt>
mov    $0x0,%al
call   1090 <ERR_free_strings@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<openssl_shutdown>:
push   %rax
mov    $0x1,%edi
call   1060 <CONF_modules_unload@plt>
xor    %eax,%eax
call   10a0 <destroy_ui_method@plt>
xor    %eax,%eax
call   1070 <OBJ_cleanup@plt>
xor    %eax,%eax
call   1080 <EVP_cleanup@plt>
xor    %eax,%eax
call   1050 <ENGINE_cleanup@plt>
xor    %eax,%eax
call   1040 <CRYPTO_cleanup_all_ex_data@plt>
xor    %edi,%edi
call   1030 <ERR_remove_thread_state@plt>
xor    %eax,%eax
pop    %rcx
jmp    1090 <ERR_free_strings@plt>

LLVM IR (-O0):
define void @openssl_shutdown() {
%1 = call i32 @CONF_modules_unload(i32 1)
%2 = call i32 (...) @destroy_ui_method()
%3 = call i32 (...) @OBJ_cleanup()
%4 = call i32 (...) @EVP_cleanup()
%5 = call i32 (...) @ENGINE_cleanup()
%6 = call i32 (...) @CRYPTO_cleanup_all_ex_data()
%7 = call i32 @ERR_remove_thread_state(i32* null)
%8 = call i32 (...) @ERR_free_strings()
ret void
}

LLVM IR (-O2):
define void @openssl_shutdown() {
%1 = tail call i32 @CONF_modules_unload(i32 1)
%2 = tail call i32 (...) @destroy_ui_method()
%3 = tail call i32 (...) @OBJ_cleanup()
%4 = tail call i32 (...) @EVP_cleanup()
%5 = tail call i32 (...) @ENGINE_cleanup()
%6 = tail call i32 (...) @CRYPTO_cleanup_all_ex_data()
%7 = tail call i32 @ERR_remove_thread_state(i32* null)
%8 = tail call i32 (...) @ERR_free_strings()
ret void
}
/* Variables and functions */
int MPFR_VERSION_MAJOR;
int MPFR_VERSION_MINOR;
int MPFR_VERSION_PATCHLEVEL;
char *MPFR_VERSION_STRING;
char *mpfr_get_version();
int /*<<< orphan*/ printf(char *, char *, char *, int, int, int);
int main(void) {
  printf("MPFR library: %-12s\nMPFR header:  %s (based on %d.%d.%d)\n",
         mpfr_get_version(), MPFR_VERSION_STRING, MPFR_VERSION_MAJOR,
         MPFR_VERSION_MINOR, MPFR_VERSION_PATCHLEVEL);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <mpfr_get_version@plt>
mov    %rax,%rsi
mov    0x2eb8(%rip),%rax
mov    (%rax),%rdx
mov    0x2e96(%rip),%rax
mov    (%rax),%ecx
mov    0x2e7d(%rip),%rax
mov    (%rax),%r8d
mov    0x2e6b(%rip),%rax
mov    (%rax),%r9d
lea    0xe99(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <mpfr_get_version@plt>
mov    0x2ec9(%rip),%rcx
mov    (%rcx),%rdx
mov    0x2ea7(%rip),%rcx
mov    (%rcx),%ecx
mov    0x2e8e(%rip),%rsi
mov    (%rsi),%r8d
mov    0x2e7c(%rip),%rsi
mov    (%rsi),%r9d
lea    0xeaa(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [58 x i8] c"MPFR library: %-12s\0AMPFR header: %s (based on %d.%d.%d)\0A\00"
@MPFR_VERSION_STRING = global i8* null
@MPFR_VERSION_MAJOR = global i32 0
@MPFR_VERSION_MINOR = global i32 0
@MPFR_VERSION_PATCHLEVEL = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i8* (...) @mpfr_get_version()
%3 = load i8*, i8** @MPFR_VERSION_STRING
%4 = load i32, i32* @MPFR_VERSION_MAJOR
%5 = load i32, i32* @MPFR_VERSION_MINOR
%6 = load i32, i32* @MPFR_VERSION_PATCHLEVEL
%7 = call i32 @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0), i8* %2, i8* %3, i32 %4, i32 %5, i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [58 x i8] c"MPFR library: %-12s\0AMPFR header: %s (based on %d.%d.%d)\0A\00"
@MPFR_VERSION_STRING = global i8* null
@MPFR_VERSION_MAJOR = global i32 0
@MPFR_VERSION_MINOR = global i32 0
@MPFR_VERSION_PATCHLEVEL = global i32 0
define i32 @main() {
%1 = tail call i8* (...) @mpfr_get_version()
%2 = load i8*, i8** @MPFR_VERSION_STRING
%3 = load i32, i32* @MPFR_VERSION_MAJOR
%4 = load i32, i32* @MPFR_VERSION_MINOR
%5 = load i32, i32* @MPFR_VERSION_PATCHLEVEL
%6 = tail call i32 @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %2, i32 %3, i32 %4, i32 %5)
ret i32 0
}
/* Variables and functions */
int twoToThePowerOf(int);
int signExtend(int immediate) {
  if (immediate < twoToThePowerOf(15))
    return immediate;
  else
    return immediate - twoToThePowerOf(16);
}


x86 assembly (clang, -O0):
<signExtend>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    $0xf,%edi
call   1030 <twoToThePowerOf@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
cmp    %ecx,%eax
jge    1143 <signExtend+0x33>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    115d <signExtend+0x4d>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    $0x10,%edi
call   1030 <twoToThePowerOf@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<signExtend>:
push   %rbx
mov    %edi,%ebx
mov    $0xf,%edi
call   1030 <twoToThePowerOf@plt>
cmp    %ebx,%eax
jg     112d <signExtend+0x1d>
mov    $0x10,%edi
call   1030 <twoToThePowerOf@plt>
sub    %eax,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @signExtend(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = call i32 @twoToThePowerOf(i32 15)
%6 = icmp slt i32 %4, %5
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = load i32, i32* %3
store i32 %8, i32* %2
br label %13
9: ; preds = %1
%10 = load i32, i32* %3
%11 = call i32 @twoToThePowerOf(i32 16)
%12 = sub nsw i32 %10, %11
store i32 %12, i32* %2
br label %13
13: ; preds = %9, %7
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @signExtend(i32 %0) {
%2 = tail call i32 @twoToThePowerOf(i32 15)
%3 = icmp sgt i32 %2, %0
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = tail call i32 @twoToThePowerOf(i32 16)
%6 = sub nsw i32 %0, %5
br label %7
7: ; preds = %1, %4
%8 = phi i32 [ %6, %4 ], [ %0, %1 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ reverse(char *);
main() {
  char a[] = "Hello, World!";
  reverse(a);
  printf("%s\n", a);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xed1(%rip),%rax
mov    %rax,-0xe(%rbp)
mov    0xecf(%rip),%eax
mov    %eax,-0x6(%rbp)
mov    0xec9(%rip),%ax
mov    %ax,-0x2(%rbp)
lea    -0xe(%rbp),%rdi
call   1030 <reverse@plt>
lea    -0xe(%rbp),%rsi
lea    0xeb3(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movabs $0x21646c726f5720,%rax
mov    %rax,0x6(%rsp)
movabs $0x57202c6f6c6c6548,%rax
2c 20 57
mov    %rax,(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <reverse@plt>
lea    0xeba(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.a = [14 x i8] c"Hello, World!\00"
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [14 x i8]
%2 = bitcast [14 x i8]* %1 to i8*
%3 = getelementptr inbounds [14 x i8], [14 x i8]* %1, i64 0, i64 0
%4 = call i32 @reverse(i8* %3)
%5 = getelementptr inbounds [14 x i8], [14 x i8]* %1, i64 0, i64 0
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %5)
ret i32 0
}

LLVM IR (-O2):
@__const.main.a = [14 x i8] c"Hello, World!\00"
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [14 x i8]
%2 = getelementptr inbounds [14 x i8], [14 x i8]* %1, i64 0, i64 0
%3 = call i32 @reverse(i8* %2)
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void printUsage() {
  printf("Usage: test-talk-server host port command\n");
  exit(1);
}


x86 assembly (clang, -O0):
<printUsage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<printUsage>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [43 x i8] c"Usage: test-talk-server host port command\0A\00"
define void @printUsage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [42 x i8] c"Usage: test-talk-server host port command\00"
define void @printUsage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
scalar_t__ flock(int, int);
int /*<<< orphan*/ perror(char *);
int sw_flock(int fd, int operation) {
  if (flock(fd, operation) != 0) {
    perror("sw_flock");
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<sw_flock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <flock@plt>
cmp    $0x0,%rax
je     115b <sw_flock+0x3b>
lea    0xeb6(%rip),%rdi
call   1030 <perror@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1162 <sw_flock+0x42>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sw_flock>:
push   %rax
call   1040 <flock@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
jne    1132 <sw_flock+0x12>
pop    %rcx
ret
lea    0xec7(%rip),%rdi
call   1030 <perror@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"sw_flock\00"
define i32 @sw_flock(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %4
%7 = load i32, i32* %5
%8 = call i64 @flock(i32 %6, i32 %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = call i32 @perror(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %3
br label %13
12: ; preds = %2
store i32 0, i32* %3
br label %13
13: ; preds = %12, %10
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
@.str = [9 x i8] c"sw_flock\00"
define i32 @sw_flock(i32 %0, i32 %1) {
%3 = tail call i64 @flock(i32 %0, i32 %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @perror(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %2, %5
%8 = phi i32 [ -1, %5 ], [ 0, %2 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, char *, char *);
int /*<<< orphan*/ system(char *);
void gate_interface_ipv4(char *interface_id, char *address) {
  char output[256];
  sprintf(output, "iptables -I FORWARD -i %s -d %s -j DROP\n", interface_id,
          address);
  system(output);
}


x86 assembly (clang, -O0):
<gate_interface_ipv4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x110(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xeb7(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x110(%rbp),%rdi
call   1030 <system@plt>
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gate_interface_ipv4>:
push   %rbx
sub    $0x100,%rsp
mov    %rsi,%rcx
mov    %rdi,%rdx
lea    0xecb(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <system@plt>
add    $0x100,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [41 x i8] c"iptables -I FORWARD -i %s -d %s -j DROP\0A\00"
define void @gate_interface_ipv4(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [256 x i8]
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%7 = load i8*, i8** %3
%8 = load i8*, i8** %4
%9 = call i32 @sprintf(i8* %6, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8* %7, i8* %8)
%10 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%11 = call i32 @system(i8* %10)
ret void
}

LLVM IR (-O2):
@.str = [41 x i8] c"iptables -I FORWARD -i %s -d %s -j DROP\0A\00"
define void @gate_interface_ipv4(i8* %0, i8* %1) {
%3 = alloca [256 x i8]
%4 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%5 = call i32 @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
%6 = call i32 @system(i8* %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printIncSeq(int, int, int /*<<< orphan*/, int *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int i, n, m, arr[50];
  scanf("%d", &n);
  scanf("%d", &m);
  printIncSeq(n, m, 0, arr);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xec7(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1030 <scanf@plt>
lea    0xeb7(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1030 <scanf@plt>
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
lea    -0xe0(%rbp),%rcx
xor    %edx,%edx
call   1040 <printIncSeq@plt>
xor    %eax,%eax
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0xe0,%rsp
lea    0xed1(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1030 <scanf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1030 <scanf@plt>
mov    0xc(%rsp),%edi
mov    0x8(%rsp),%esi
lea    0x10(%rsp),%rcx
xor    %edx,%edx
call   1040 <printIncSeq@plt>
xor    %eax,%eax
add    $0xe0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca [50 x i32]
store i32 0, i32* %1
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %4)
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = getelementptr inbounds [50 x i32], [50 x i32]* %5, i64 0, i64 0
%11 = call i32 @printIncSeq(i32 %8, i32 %9, i32 0, i32* %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [50 x i32]
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast [50 x i32]* %3 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%9 = load i32, i32* %1
%10 = load i32, i32* %2
%11 = getelementptr inbounds [50 x i32], [50 x i32]* %3, i64 0, i64 0
%12 = call i32 @printIncSeq(i32 %9, i32 %10, i32 0, i32* %11)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ InitCache(int);
int main(int argc, char *argv[]) {
  InitCache(5);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x5,%edi
call   1030 <InitCache@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x5,%edi
call   1030 <InitCache@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
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 = call i32 @InitCache(i32 5)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @InitCache(i32 5)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/ *);
void fflush_nrv(void *fp) { fflush((FILE *)fp); }


x86 assembly (clang, -O0):
<fflush_nrv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <fflush@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fflush_nrv>:
jmp    1030 <fflush@plt>

LLVM IR (-O0):
define void @fflush_nrv(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to i32*
%5 = call i32 @fflush(i32* %4)
ret void
}

LLVM IR (-O2):
define void @fflush_nrv(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = tail call i32 @fflush(i32* %2)
ret void
}
int x0_setup() { return 0; }


x86 assembly (clang, -O0):
<x0_setup>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<x0_setup>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @x0_setup() {
ret i32 0
}

LLVM IR (-O2):
define i32 @x0_setup() {
ret i32 0
}
/* Type definitions */
typedef int uint32_t;
typedef int /*<<< orphan*/ mpz_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ mpz_mul_2exp(int /*<<< orphan*/, int /*<<< orphan*/, int);
int /*<<< orphan*/ mpz_set_si(int /*<<< orphan*/, int);
void mpz_set_min_int(mpz_t z, uint32_t k) {
  assert(k >= 1);
  mpz_set_si(z, -1);
  mpz_mul_2exp(z, z, k - 1);
}


x86 assembly (clang, -O0):
<mpz_set_min_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x4(%rbp),%edi
mov    $0xffffffff,%esi
call   1030 <mpz_set_si@plt>
mov    -0x4(%rbp),%edi
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
sub    $0x1,%edx
call   1050 <mpz_mul_2exp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mpz_set_min_int>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %edi,%edi
test   %esi,%esi
setg   %dil
call   1040 <assert@plt>
mov    %ebp,%edi
mov    $0xffffffff,%esi
call   1030 <mpz_set_si@plt>
add    $0xffffffff,%ebx
mov    %ebp,%edi
mov    %ebp,%esi
mov    %ebx,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <mpz_mul_2exp@plt>

LLVM IR (-O0):
define void @mpz_set_min_int(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp sge i32 %5, 1
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
%9 = load i32, i32* %3
%10 = call i32 @mpz_set_si(i32 %9, i32 -1)
%11 = load i32, i32* %3
%12 = load i32, i32* %3
%13 = load i32, i32* %4
%14 = sub nsw i32 %13, 1
%15 = call i32 @mpz_mul_2exp(i32 %11, i32 %12, i32 %14)
ret void
}

LLVM IR (-O2):
define void @mpz_set_min_int(i32 %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = tail call i32 @mpz_set_si(i32 %0, i32 -1)
%7 = add nsw i32 %1, -1
%8 = tail call i32 @mpz_mul_2exp(i32 %0, i32 %0, i32 %7)
ret void
}
__attribute__((noipa, optimize("Ofast"))) int f9(float x) {
  return __builtin_sqrtf(x) <= 0x1.4fc00cp-73f;
}


x86 assembly (clang, -O0):
<f9>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <sqrtf@plt>
movaps %xmm0,%xmm1
movss  0xece(%rip),%xmm0
ucomiss %xmm1,%xmm0
setae  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f9>:
push   %rax
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jb     111f <f9+0xf>
sqrtss %xmm0,%xmm0
jmp    1124 <f9+0x14>
call   1030 <sqrtf@plt>
movss  0xed4(%rip),%xmm1
xor    %eax,%eax
ucomiss %xmm0,%xmm1
setae  %al
pop    %rcx
ret

LLVM IR (-O0):
define i32 @f9(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @sqrtf(float %3)
%5 = fcmp ole float %4, 0x3B64FC00C0000000
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @f9(float %0) {
%2 = tail call float @sqrtf(float %0)
%3 = fcmp ole float %2, 0x3B64FC00C0000000
%4 = zext i1 %3 to i32
ret i32 %4
}
int precision_p(double value) {
  if (value < 100)
    if (value < 10)
      return (3);
    else
      return (2);
  else if (value < 10000)
    return (1);
  return (0);
}


x86 assembly (clang, -O0):
<precision_p>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  0xeef(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1147 <precision_p+0x47>
movsd  0xeec(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    113b <precision_p+0x3b>
movl   $0x3,-0x4(%rbp)
jmp    1172 <precision_p+0x72>
movl   $0x2,-0x4(%rbp)
jmp    1172 <precision_p+0x72>
movsd  0xeb9(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1166 <precision_p+0x66>
movl   $0x1,-0x4(%rbp)
jmp    1172 <precision_p+0x72>
jmp    116b <precision_p+0x6b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<precision_p>:
movsd  0xef8(%rip),%xmm1
xor    %ecx,%ecx
ucomisd %xmm0,%xmm1
seta   %cl
or     $0x2,%ecx
movsd  0xeec(%rip),%xmm1
xor    %eax,%eax
ucomisd %xmm0,%xmm1
seta   %al
movsd  0xee3(%rip),%xmm1
ucomisd %xmm0,%xmm1
cmova  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @precision_p(double %0) {
%2 = alloca i32
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp olt double %4, 1.000000e+02
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load double, double* %3
%8 = fcmp olt double %7, 1.000000e+01
br i1 %8, label %9, label %10
9: ; preds = %6
store i32 3, i32* %2
br label %17
10: ; preds = %6
store i32 2, i32* %2
br label %17
11: ; preds = %1
%12 = load double, double* %3
%13 = fcmp olt double %12, 1.000000e+04
br i1 %13, label %14, label %15
14: ; preds = %11
store i32 1, i32* %2
br label %17
15: ; preds = %11
br label %16
16: ; preds = %15
store i32 0, i32* %2
br label %17
17: ; preds = %16, %14, %10, %9
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @precision_p(double %0) {
%2 = fcmp olt double %0, 1.000000e+02
%3 = fcmp olt double %0, 1.000000e+01
%4 = select i1 %3, i32 3, i32 2
%5 = fcmp olt double %0, 1.000000e+04
%6 = zext i1 %5 to i32
%7 = select i1 %2, i32 %4, i32 %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ delete_spaces(char *, char *, int);
int /*<<< orphan*/ printf(char *, char *);
int main(void) {
  char src[] = "a b";
  char dst[10] = {0};
  delete_spaces(src, dst, 10);
  printf("dst: %s\n", dst);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xebb(%rip),%eax
mov    %eax,-0x8(%rbp)
lea    -0x12(%rbp),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1040 <memset@plt>
lea    -0x8(%rbp),%rdi
lea    -0x12(%rbp),%rsi
mov    $0xa,%edx
call   1050 <delete_spaces@plt>
lea    -0x12(%rbp),%rsi
lea    0xe8f(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
movl   $0x622061,0xc(%rsp)
movw   $0x0,0x18(%rsp)
movq   $0x0,0x10(%rsp)
lea    0xc(%rsp),%rdi
lea    0x10(%rsp),%rbx
mov    %rbx,%rsi
mov    $0xa,%edx
call   1040 <delete_spaces@plt>
lea    0xea5(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.src = [4 x i8] c"a b\00"
@.str = [9 x i8] c"dst: %s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [4 x i8]
%3 = alloca [10 x i8]
store i32 0, i32* %1
%4 = bitcast [4 x i8]* %2 to i8*
%5 = bitcast [10 x i8]* %3 to i8*
%6 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 0
%7 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%8 = call i32 @delete_spaces(i8* %6, i8* %7, i32 10)
%9 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%10 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"dst: %s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x i8]
%3 = bitcast i32* %1 to i8*
store i32 6430817, i32* %1
%4 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%5 = call i32 @delete_spaces(i8* %3, i8* %4, i32 10)
%6 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %4)
ret i32 0
}
double linlin(double x, double a, double b, double c, double d) {
  if (x <= a)
    return c;
  if (x >= b)
    return d;
  return (x - a) / (b - a) * (d - c) + c;
}


x86 assembly (clang, -O0):
<linlin>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  %xmm3,-0x28(%rbp)
movsd  %xmm4,-0x30(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     1140 <linlin+0x40>
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1193 <linlin+0x93>
movsd  -0x10(%rbp),%xmm0
ucomisd -0x20(%rbp),%xmm0
jb     115f <linlin+0x5f>
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1193 <linlin+0x93>
movsd  -0x10(%rbp),%xmm0
subsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
subsd  -0x18(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  -0x30(%rbp),%xmm2
subsd  -0x28(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<linlin>:
ucomisd %xmm0,%xmm1
jae    112c <linlin+0x2c>
ucomisd %xmm2,%xmm0
jae    1129 <linlin+0x29>
subsd  %xmm1,%xmm0
subsd  %xmm1,%xmm2
divsd  %xmm2,%xmm0
subsd  %xmm3,%xmm4
mulsd  %xmm0,%xmm4
addsd  %xmm3,%xmm4
movapd %xmm4,%xmm0
ret
movaps %xmm4,%xmm3
movaps %xmm3,%xmm0
ret

LLVM IR (-O0):
define double @linlin(double %0, double %1, double %2, double %3, double %4) {
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
store double %0, double* %7
store double %1, double* %8
store double %2, double* %9
store double %3, double* %10
store double %4, double* %11
%12 = load double, double* %7
%13 = load double, double* %8
%14 = fcmp ole double %12, %13
br i1 %14, label %15, label %17
15: ; preds = %5
%16 = load double, double* %10
store double %16, double* %6
br label %36
17: ; preds = %5
%18 = load double, double* %7
%19 = load double, double* %9
%20 = fcmp oge double %18, %19
br i1 %20, label %21, label %23
21: ; preds = %17
%22 = load double, double* %11
store double %22, double* %6
br label %36
23: ; preds = %17
%24 = load double, double* %7
%25 = load double, double* %8
%26 = fsub double %24, %25
%27 = load double, double* %9
%28 = load double, double* %8
%29 = fsub double %27, %28
%30 = fdiv double %26, %29
%31 = load double, double* %11
%32 = load double, double* %10
%33 = fsub double %31, %32
%34 = load double, double* %10
%35 = call double @llvm.fmuladd.f64(double %30, double %33, double %34)
store double %35, double* %6
br label %36
36: ; preds = %23, %21, %15
%37 = load double, double* %6
ret double %37
}

LLVM IR (-O2):
define double @linlin(double %0, double %1, double %2, double %3, double %4) {
%6 = fcmp ugt double %0, %1
br i1 %6, label %7, label %15
7: ; preds = %5
%8 = fcmp ult double %0, %2
br i1 %8, label %9, label %15
9: ; preds = %7
%10 = fsub double %0, %1
%11 = fsub double %2, %1
%12 = fdiv double %10, %11
%13 = fsub double %4, %3
%14 = tail call double @llvm.fmuladd.f64(double %12, double %13, double %3)
br label %15
15: ; preds = %7, %5, %9
%16 = phi double [ %14, %9 ], [ %3, %5 ], [ %4, %7 ]
ret double %16
}