xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(double *, double const *, int);
uint32_t __double_clone_array(const double *p, double *q, uint32_t elements) {
  uint32_t n = elements * sizeof(double);
  memcpy(q, p, n);
  return n;
}


x86 assembly (clang, -O0):
<__double_clone_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movslq -0x14(%rbp),%rax
shl    $0x3,%rax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x18(%rbp),%edx
call   1030 <memcpy@plt>
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__double_clone_array>:
push   %rbx
mov    %rdi,%rax
lea    0x0(,%rdx,8),%ebx
mov    %rsi,%rdi
mov    %rax,%rsi
mov    %ebx,%edx
call   1030 <memcpy@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @__double_clone_array(double* %0, double* %1, i32 %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca i32
%7 = alloca i32
store double* %0, double** %4
store double* %1, double** %5
store i32 %2, i32* %6
%8 = load i32, i32* %6
%9 = sext i32 %8 to i64
%10 = mul i64 %9, 8
%11 = trunc i64 %10 to i32
store i32 %11, i32* %7
%12 = load double*, double** %5
%13 = load double*, double** %4
%14 = load i32, i32* %7
%15 = call i32 @memcpy(double* %12, double* %13, i32 %14)
%16 = load i32, i32* %7
ret i32 %16
}

LLVM IR (-O2):
define i32 @__double_clone_array(double* %0, double* %1, i32 %2) {
%4 = shl i32 %2, 3
%5 = tail call i32 @memcpy(double* %1, double* %0, i32 %4)
ret i32 %4
}
void wpa_debug_close_syslog(void) {}


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

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

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

LLVM IR (-O2):
define void @wpa_debug_close_syslog() {
ret void
}
void lsxl_init(void) {}


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

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

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

LLVM IR (-O2):
define void @lsxl_init() {
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ subwindow;
};
typedef TYPE_1__ XButtonReleasedEvent;

/* Variables and functions */
unsigned long get_XButtonReleasedEvent_subwindow(void *_p) {
  return (unsigned long)((XButtonReleasedEvent *)_p)->subwindow;
}


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

x86 assembly (clang, -O2):
<get_XButtonReleasedEvent_subwindow>:
mov    (%rdi),%rax
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i64 @get_XButtonReleasedEvent_subwindow(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @get_XButtonReleasedEvent_subwindow(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ yyparse();
main(void) { yyparse(); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <yyparse@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <yyparse@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @yyparse()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @yyparse()
ret i32 0
}
cbuf5(f, n) int f, n;
{ cbuf(f, n, 5); }


x86 assembly (clang, -O0):
<cbuf5>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    $0x5,%edx
mov    $0x0,%al
call   1030 <cbuf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cbuf5>:
mov    $0x5,%edx
xor    %eax,%eax
jmp    1030 <cbuf@plt>

LLVM IR (-O0):
define i32 @cbuf5(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 i32 (i32, i32, i32, ...) bitcast (i32 (...)* @cbuf to i32 (i32, i32, i32, ...)*)(i32 %6, i32 %7, i32 5)
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @cbuf5(i32 %0, i32 %1) {
%3 = tail call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @cbuf to i32 (i32, i32, i32, ...)*)(i32 %0, i32 %1, i32 5)
ret i32 undef
}
extern void z() {
  printf("hi from %s\n", __func__);
  printf("z calling x\n");
  x();
}


x86 assembly (clang, -O0):
<z>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xeda(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xece(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <x@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<z>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0xecd(%rip),%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xec1(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <x@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"hi from %s\0A\00"
@__func__.z = [2 x i8] c"z\00"
@.str.1 = [13 x i8] c"z calling x\0A\00"
define void @z() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @__func__.z, i64 0, i64 0))
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 (...) @x()
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"hi from %s\0A\00"
@__func__.z = [2 x i8] c"z\00"
@str = [12 x i8] c"z calling x\00"
define void @z() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @__func__.z, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 (...) @x()
ret void
}
void calc_load_nohz_start(void) {}


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

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

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

LLVM IR (-O2):
define void @calc_load_nohz_start() {
ret void
}
int intInit() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @intInit() {
ret i32 0
}
double s_dot3(const double x[3], const double y[3]) {
  int i;
  double dot = 0.0;
  for (i = 0; i < 3; ++i) {
    dot += x[i] * y[i];
  }
  return dot;
}


x86 assembly (clang, -O0):
<s_dot3>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x3,-0x14(%rbp)
jge    115f <s_dot3+0x5f>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x20(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    111b <s_dot3+0x1b>
movsd  -0x20(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<s_dot3>:
movsd  (%rdi),%xmm0
movsd  0x8(%rdi),%xmm1
mulsd  (%rsi),%xmm0
xorpd  %xmm2,%xmm2
addsd  %xmm0,%xmm2
mulsd  0x8(%rsi),%xmm1
addsd  %xmm2,%xmm1
movsd  0x10(%rdi),%xmm0
mulsd  0x10(%rsi),%xmm0
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @s_dot3(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
%5 = alloca i32
%6 = alloca double
store double* %0, double** %3
store double* %1, double** %4
store double 0.000000e+00, double* %6
store i32 0, i32* %5
br label %7
7: ; preds = %23, %2
%8 = load i32, i32* %5
%9 = icmp slt i32 %8, 3
br i1 %9, label %10, label %26
10: ; preds = %7
%11 = load double*, double** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds double, double* %11, i64 %13
%15 = load double, double* %14
%16 = load double*, double** %4
%17 = load i32, i32* %5
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds double, double* %16, i64 %18
%20 = load double, double* %19
%21 = load double, double* %6
%22 = call double @llvm.fmuladd.f64(double %15, double %20, double %21)
store double %22, double* %6
br label %23
23: ; preds = %10
%24 = load i32, i32* %5
%25 = add nsw i32 %24, 1
store i32 %25, i32* %5
br label %7
26: ; preds = %7
%27 = load double, double* %6
ret double %27
}

LLVM IR (-O2):
define double @s_dot3(double* nocapture %0, double* nocapture %1) {
%3 = load double, double* %0
%4 = load double, double* %1
%5 = tail call double @llvm.fmuladd.f64(double %3, double %4, double 0.000000e+00)
%6 = getelementptr inbounds double, double* %0, i64 1
%7 = load double, double* %6
%8 = getelementptr inbounds double, double* %1, i64 1
%9 = load double, double* %8
%10 = tail call double @llvm.fmuladd.f64(double %7, double %9, double %5)
%11 = getelementptr inbounds double, double* %0, i64 2
%12 = load double, double* %11
%13 = getelementptr inbounds double, double* %1, i64 2
%14 = load double, double* %13
%15 = tail call double @llvm.fmuladd.f64(double %12, double %14, double %10)
ret double %15
}
void fd72(int n) {
P0A:
  goto P0A;
  {
    typedef int(*b)[n];
  P01A:
    goto P01A;
    {
      typedef int(*c)[n];
    P012A:
      goto P012A;
      0;
    }
  P01B:
    goto P01B;
    {
      typedef int(*d)[n];
    p013A:
      goto p013A;
      goto a;
    a:
      0;
    }
  P01C:
    goto P01C;
    ;
    typedef int(*e)[n];
  P014A:
    goto P014A;
    0;
  };
P0B:
  goto P0B;
  {
    typedef int(*f)[n];
  P02A:
    goto P02A;
    {
      typedef int(*g)[n];
    P024A:
      goto P024A;
      0;
    };
  P02B:
    goto P02B;
    {
      typedef int(*h)[n];
    P025A:
      goto P025A;
      0;
    };
  P02C:
    goto P02C;
    ;
    typedef int(*i)[n];
  P026A:
    goto P026A;
    0;
  };
P0C:
  goto P0C;
  ;
  typedef int(*j)[n];
P03A:
  goto P03A;
  0;
P03B:
  goto P03B;
}


x86 assembly (clang, -O0):
<fd72>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
jmp    1107 <fd72+0x7>

x86 assembly (clang, -O2):
<fd72>:
jmp    1100 <fd72>

LLVM IR (-O0):
define void @fd72(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %3, %1
br label %3
4: ; No predecessors!
%5 = load i32, i32* %2
%6 = zext i32 %5 to i64
br label %7
7: ; preds = %7, %4
br label %7
8: ; No predecessors!
%9 = load i32, i32* %2
%10 = zext i32 %9 to i64
br label %11
11: ; preds = %11, %8
br label %11
12: ; preds = %12
br label %12
13: ; No predecessors!
%14 = load i32, i32* %2
%15 = zext i32 %14 to i64
br label %16
16: ; preds = %16, %13
br label %16
17: ; No predecessors!
br label %18
18: ; preds = %18, %17
br label %18
19: ; No predecessors!
%20 = load i32, i32* %2
%21 = zext i32 %20 to i64
br label %22
22: ; preds = %22, %19
br label %22
23: ; preds = %23
br label %23
24: ; No predecessors!
%25 = load i32, i32* %2
%26 = zext i32 %25 to i64
br label %27
27: ; preds = %27, %24
br label %27
28: ; No predecessors!
%29 = load i32, i32* %2
%30 = zext i32 %29 to i64
br label %31
31: ; preds = %31, %28
br label %31
32: ; preds = %32
br label %32
33: ; No predecessors!
%34 = load i32, i32* %2
%35 = zext i32 %34 to i64
br label %36
36: ; preds = %36, %33
br label %36
37: ; preds = %37
br label %37
38: ; No predecessors!
%39 = load i32, i32* %2
%40 = zext i32 %39 to i64
br label %41
41: ; preds = %41, %38
br label %41
42: ; preds = %42
br label %42
43: ; No predecessors!
%44 = load i32, i32* %2
%45 = zext i32 %44 to i64
br label %46
46: ; preds = %46, %43
br label %46
47: ; preds = %47
br label %47
}

LLVM IR (-O2):
define void @fd72(i32 %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
drawline(n, m, s) int m, n;
char *s;
{}


x86 assembly (clang, -O0):
<drawline>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @drawline(i32 %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
store i32 %0, i32* %5
store i32 %1, i32* %6
store i8* %2, i8** %7
%8 = load i32, i32* %4
ret i32 %8
}

LLVM IR (-O2):
define i32 @drawline(i32 %0, i32 %1, i8* nocapture readnone %2) {
ret i32 undef
}
unsigned long get_pmcs_ext_regs(int idx) { return 0; }


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

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

LLVM IR (-O0):
define i64 @get_pmcs_ext_regs(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret i64 0
}

LLVM IR (-O2):
define i64 @get_pmcs_ext_regs(i32 %0) {
ret i64 0
}
/* Variables and functions */
int add(int, int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int s;
  s = add(1, 2);
  printf("%d\n", s);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
mov    $0x2,%esi
call   1030 <add@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xeb5(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
mov    $0x2,%esi
call   1030 <add@plt>
lea    0xec9(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @add(i32 1, i32 2)
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @add(i32 1, i32 2)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
void drm_free_crtc(void *data) { (void)data; }


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

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

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

LLVM IR (-O2):
define void @drm_free_crtc(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int atol(char *);
int /*<<< orphan*/ printf(char *, int, void *, int);
int main(int argc, char *argv[]) {
  int foo, bar;
  void *foo_ptr;
  if (argc <= 1) {
    return 0;
  }
  foo = atol(argv[1]);
  foo_ptr = (void *)foo;
  bar = (int)foo_ptr;
  printf("foo is %d, foo_ptr is %p, bar is %d\n", foo, foo_ptr, bar);
  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)
cmpl   $0x1,-0x8(%rbp)
jg     114c <main+0x2c>
movl   $0x0,-0x4(%rbp)
jmp    1188 <main+0x68>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <atol@plt>
mov    %eax,-0x14(%rbp)
movslq -0x14(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%esi
mov    -0x20(%rbp),%rdx
mov    -0x18(%rbp),%ecx
lea    0xe84(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
cmp    $0x2,%edi
jl     1147 <main+0x27>
push   %rax
mov    0x8(%rsi),%rdi
call   1040 <atol@plt>
movslq %eax,%rcx
lea    0xec7(%rip),%rdi
mov    %ecx,%esi
mov    %rcx,%rdx
call   1030 <printf@plt>
add    $0x8,%rsp
xor    %eax,%eax
ret

LLVM IR (-O0):
@.str = [37 x i8] c"foo is %d, foo_ptr is %p, bar is %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = load i32, i32* %4
%10 = icmp sle i32 %9, 1
br i1 %10, label %11, label %12
11: ; preds = %2
store i32 0, i32* %3
br label %26
12: ; preds = %2
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 1
%15 = load i8*, i8** %14
%16 = call i32 @atol(i8* %15)
store i32 %16, i32* %6
%17 = load i32, i32* %6
%18 = sext i32 %17 to i64
%19 = inttoptr i64 %18 to i8*
store i8* %19, i8** %8
%20 = load i8*, i8** %8
%21 = ptrtoint i8* %20 to i32
store i32 %21, i32* %7
%22 = load i32, i32* %6
%23 = load i8*, i8** %8
%24 = load i32, i32* %7
%25 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i32 %22, i8* %23, i32 %24)
store i32 0, i32* %3
br label %26
26: ; preds = %12, %11
%27 = load i32, i32* %3
ret i32 %27
}

LLVM IR (-O2):
@.str = [37 x i8] c"foo is %d, foo_ptr is %p, bar is %d\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %11, label %4
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @atol(i8* %6)
%8 = sext i32 %7 to i64
%9 = inttoptr i64 %8 to i8*
%10 = tail call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i32 %7, i8* %9, i32 %7)
br label %11
11: ; preds = %2, %4
ret i32 0
}
void SwapChar(char *pOriginal, char cBad, char cGood) {
  int i;
  i = 0;
  while (pOriginal[i]) {
    if (pOriginal[i] == cBad)
      pOriginal[i] = cGood;
    i++;
  }
}


x86 assembly (clang, -O0):
<SwapChar>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1160 <SwapChar+0x60>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
movsbl -0x9(%rbp),%ecx
cmp    %ecx,%eax
jne    1152 <SwapChar+0x52>
mov    -0xa(%rbp),%dl
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    111a <SwapChar+0x1a>
pop    %rbp
ret

x86 assembly (clang, -O2):
<SwapChar>:
mov    (%rdi),%al
test   %al,%al
je     1125 <SwapChar+0x25>
add    $0x1,%rdi
jmp    111b <SwapChar+0x1b>
nopl   0x0(%rax)
movzbl (%rdi),%eax
add    $0x1,%rdi
test   %al,%al
je     1125 <SwapChar+0x25>
cmp    %sil,%al
jne    1110 <SwapChar+0x10>
mov    %dl,-0x1(%rdi)
jmp    1110 <SwapChar+0x10>
ret

LLVM IR (-O0):
define void @SwapChar(i8* %0, i8 signext %1, i8 signext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i32
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
store i32 0, i32* %7
br label %8
8: ; preds = %31, %3
%9 = load i8*, i8** %4
%10 = load i32, i32* %7
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i8, i8* %9, i64 %11
%13 = load i8, i8* %12
%14 = icmp ne i8 %13, 0
br i1 %14, label %15, label %34
15: ; preds = %8
%16 = load i8*, i8** %4
%17 = load i32, i32* %7
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i8, i8* %16, i64 %18
%20 = load i8, i8* %19
%21 = sext i8 %20 to i32
%22 = load i8, i8* %5
%23 = sext i8 %22 to i32
%24 = icmp eq i32 %21, %23
br i1 %24, label %25, label %31
25: ; preds = %15
%26 = load i8, i8* %6
%27 = load i8*, i8** %4
%28 = load i32, i32* %7
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds i8, i8* %27, i64 %29
store i8 %26, i8* %30
br label %31
31: ; preds = %25, %15
%32 = load i32, i32* %7
%33 = add nsw i32 %32, 1
store i32 %33, i32* %7
br label %8
34: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @SwapChar(i8* nocapture %0, i8 signext %1, i8 signext %2) {
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %17, label %6
6: ; preds = %3, %12
%7 = phi i64 [ %13, %12 ], [ 0, %3 ]
%8 = phi i8 [ %15, %12 ], [ %4, %3 ]
%9 = phi i8* [ %14, %12 ], [ %0, %3 ]
%10 = icmp eq i8 %8, %1
br i1 %10, label %11, label %12
11: ; preds = %6
store i8 %2, i8* %9
br label %12
12: ; preds = %11, %6
%13 = add nuw i64 %7, 1
%14 = getelementptr inbounds i8, i8* %0, i64 %13
%15 = load i8, i8* %14
%16 = icmp eq i8 %15, 0
br i1 %16, label %17, label %6
17: ; preds = %12, %3
ret void
}
int skip_spc(char *line, int position) {
  while ((line[position] == ' ') || (line[position] == '\t'))
    position++;
  return position;
}


x86 assembly (clang, -O0):
<skip_spc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0xd(%rbp)
je     113a <skip_spc+0x3a>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x9,%eax
sete   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    114a <skip_spc+0x4a>
jmp    1158 <skip_spc+0x58>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110b <skip_spc+0xb>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_spc>:
mov    %esi,%eax
movslq %esi,%rcx
add    %rdi,%rcx
jmp    1117 <skip_spc+0x17>
nopw   0x0(%rax,%rax,1)
add    $0x1,%eax
add    $0x1,%rcx
movzbl (%rcx),%edx
cmp    $0x20,%dl
je     1110 <skip_spc+0x10>
cmp    $0x9,%dl
je     1110 <skip_spc+0x10>
ret

LLVM IR (-O0):
define i32 @skip_spc(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
br label %5
5: ; preds = %23, %2
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %6, i64 %8
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %11, 32
br i1 %12, label %21, label %13
13: ; preds = %5
%14 = load i8*, i8** %3
%15 = load i32, i32* %4
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i8, i8* %14, i64 %16
%18 = load i8, i8* %17
%19 = sext i8 %18 to i32
%20 = icmp eq i32 %19, 9
br label %21
21: ; preds = %13, %5
%22 = phi i1 [ true, %5 ], [ %20, %13 ]
br i1 %22, label %23, label %26
23: ; preds = %21
%24 = load i32, i32* %4
%25 = add nsw i32 %24, 1
store i32 %25, i32* %4
br label %5
26: ; preds = %21
%27 = load i32, i32* %4
ret i32 %27
}

LLVM IR (-O2):
define i32 @skip_spc(i8* nocapture %0, i32 %1) {
%3 = sext i32 %1 to i64
br label %4
4: ; preds = %8, %2
%5 = phi i64 [ %9, %8 ], [ %3, %2 ]
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
switch i8 %7, label %10 [
i8 32, label %8
i8 9, label %8
]
8: ; preds = %4, %4
%9 = add i64 %5, 1
br label %4
10: ; preds = %4
%11 = trunc i64 %5 to i32
ret i32 %11
}
void gtk_alternative_dialog_button_order() {}


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

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

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

LLVM IR (-O2):
define void @gtk_alternative_dialog_button_order() {
ret void
}
/* Variables and functions */
char *strtok_r(char *, char const *, char **);
char *strtok_s(char *s, const char *delm, char **context) {
  return strtok_r(s, delm, context);
}


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

x86 assembly (clang, -O2):
<strtok_s>:
jmp    1030 <strtok_r@plt>

LLVM IR (-O0):
define i8* @strtok_s(i8* %0, i8* %1, i8** %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8**
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8** %2, i8*** %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i8**, i8*** %6
%10 = call i8* @strtok_r(i8* %7, i8* %8, i8** %9)
ret i8* %10
}

LLVM IR (-O2):
define i8* @strtok_s(i8* %0, i8* nocapture %1, i8** %2) {
%4 = tail call i8* @strtok_r(i8* %0, i8* %1, i8** %2)
ret i8* %4
}
int fun_coverage_if_le(int x) {
  if (x <= 5) {
    return 8;
  } else {
    return 18;
  }
}


x86 assembly (clang, -O0):
<fun_coverage_if_le>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jg     111d <fun_coverage_if_le+0x1d>
movl   $0x8,-0x4(%rbp)
jmp    1124 <fun_coverage_if_le+0x24>
movl   $0x12,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun_coverage_if_le>:
cmp    $0x6,%edi
mov    $0x8,%ecx
mov    $0x12,%eax
cmovl  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @fun_coverage_if_le(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sle i32 %4, 5
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 8, i32* %2
br label %8
7: ; preds = %1
store i32 18, i32* %2
br label %8
8: ; preds = %7, %6
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
define i32 @fun_coverage_if_le(i32 %0) {
%2 = icmp slt i32 %0, 6
%3 = select i1 %2, i32 8, i32 18
ret i32 %3
}
void print_privs(const char *message) {}


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

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

LLVM IR (-O0):
define void @print_privs(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret void
}

LLVM IR (-O2):
define void @print_privs(i8* nocapture %0) {
ret void
}
void atmel_atmega328_Mcu_cycle__E() { asm("nop"); }


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

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

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

LLVM IR (-O2):
define void @atmel_atmega328_Mcu_cycle__E() {
tail call void asm sideeffect "nop", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ draw_windows(int, int);
int /*<<< orphan*/ get_dims(int *, int *);
void draw_screen() {
  int rows, cols;
  get_dims(&rows, &cols);
  draw_windows(rows, cols);
}


x86 assembly (clang, -O0):
<draw_screen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x4(%rbp),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <get_dims@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <draw_windows@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<draw_screen>:
push   %rax
lea    0x4(%rsp),%rdi
mov    %rsp,%rsi
call   1040 <get_dims@plt>
mov    0x4(%rsp),%edi
mov    (%rsp),%esi
call   1030 <draw_windows@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @draw_screen() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 @get_dims(i32* %1, i32* %2)
%4 = load i32, i32* %1
%5 = load i32, i32* %2
%6 = call i32 @draw_windows(i32 %4, i32 %5)
ret void
}

LLVM IR (-O2):
define void @draw_screen() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @get_dims(i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = call i32 @draw_windows(i32 %6, i32 %7)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ vga_accel(int, int, int, int, int, int, int);
void __svgalib_driver8a_copybox(int x1, int y1, int w, int h, int x2, int y2) {
  vga_accel(2, x1, y1, x2, y2, w, h);
}


x86 assembly (clang, -O0):
<__svgalib_driver8a_copybox>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0x14(%rbp),%ecx
mov    -0x18(%rbp),%r8d
mov    -0xc(%rbp),%r9d
mov    -0x10(%rbp),%eax
mov    $0x2,%edi
mov    %eax,(%rsp)
call   1030 <vga_accel@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__svgalib_driver8a_copybox>:
push   %rax
mov    %edx,%eax
mov    %esi,%edx
mov    %edi,%esi
mov    %ecx,(%rsp)
mov    $0x2,%edi
mov    %r8d,%ecx
mov    %r9d,%r8d
mov    %eax,%r9d
call   1030 <vga_accel@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @__svgalib_driver8a_copybox(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store i32 %0, i32* %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%13 = load i32, i32* %7
%14 = load i32, i32* %8
%15 = load i32, i32* %11
%16 = load i32, i32* %12
%17 = load i32, i32* %9
%18 = load i32, i32* %10
%19 = call i32 @vga_accel(i32 2, i32 %13, i32 %14, i32 %15, i32 %16, i32 %17, i32 %18)
ret void
}

LLVM IR (-O2):
define void @__svgalib_driver8a_copybox(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = tail call i32 @vga_accel(i32 2, i32 %0, i32 %1, i32 %4, i32 %5, i32 %2, i32 %3)
ret void
}
void gtk_text_tag_set_priority() {}


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

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

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

LLVM IR (-O2):
define void @gtk_text_tag_set_priority() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __builtin_mtdr(unsigned int, unsigned long);
void __ocd_write(unsigned int reg, unsigned long value) {
  __builtin_mtdr(reg, value);
}


x86 assembly (clang, -O0):
<__ocd_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <__builtin_mtdr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__ocd_write>:
jmp    1030 <__builtin_mtdr@plt>

LLVM IR (-O0):
define void @__ocd_write(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
store i32 %0, i32* %3
store i64 %1, i64* %4
%5 = load i32, i32* %3
%6 = load i64, i64* %4
%7 = call i32 @__builtin_mtdr(i32 %5, i64 %6)
ret void
}

LLVM IR (-O2):
define void @__ocd_write(i32 %0, i64 %1) {
%3 = tail call i32 @__builtin_mtdr(i32 %0, i64 %1)
ret void
}
/* Type definitions */
typedef unsigned int uint32_t;

/* Variables and functions */
uint32_t rotr32(uint32_t n, unsigned int c) {
  const unsigned int mask = 31;
  c &= mask;
  unsigned int neg_c = (unsigned int)(-(int)c);
  return (n >> c) | (n << (neg_c & mask));
}


x86 assembly (clang, -O0):
<rotr32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x1f,-0xc(%rbp)
mov    -0x8(%rbp),%eax
and    $0x1f,%eax
mov    %eax,-0x8(%rbp)
xor    %eax,%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shr    %cl,%eax
mov    -0x4(%rbp),%edx
mov    -0x10(%rbp),%ecx
and    $0x1f,%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rotr32>:
mov    %esi,%ecx
mov    %edi,%eax
ror    %cl,%eax
ret

LLVM IR (-O0):
define i32 @rotr32(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
store i32 31, i32* %5
%7 = load i32, i32* %4
%8 = and i32 %7, 31
store i32 %8, i32* %4
%9 = load i32, i32* %4
%10 = sub nsw i32 0, %9
store i32 %10, i32* %6
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = lshr i32 %11, %12
%14 = load i32, i32* %3
%15 = load i32, i32* %6
%16 = and i32 %15, 31
%17 = shl i32 %14, %16
%18 = or i32 %13, %17
ret i32 %18
}

LLVM IR (-O2):
define i32 @rotr32(i32 %0, i32 %1) {
%3 = tail call i32 @llvm.fshr.i32(i32 %0, i32 %0, i32 %1)
ret i32 %3
}
void __clear_cache(char *beg, char *end) {}


x86 assembly (clang, -O0):
<__clear_cache>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @__clear_cache(i8* nocapture %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int a = 0;
  printf("%d", a);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
xor    %esi,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fs_logger(char *);
int /*<<< orphan*/ mkdir_attr(char *, int, int /*<<< orphan*/,
                              int /*<<< orphan*/);
int /*<<< orphan*/ selinux_relabel_path(char *, char *);
void empty_dev_shm(void) {
  mkdir_attr("/dev/shm", 01777, 0, 0);
  selinux_relabel_path("/dev/shm", "/dev/shm");
  fs_logger("mkdir /dev/shm");
  fs_logger("create /dev/shm");
}


x86 assembly (clang, -O0):
<empty_dev_shm>:
push   %rbp
mov    %rsp,%rbp
lea    0xedb(%rip),%rdi
mov    $0x3ff,%esi
xor    %ecx,%ecx
mov    %ecx,%edx
call   1040 <mkdir_attr@plt>
lea    0xec6(%rip),%rsi
mov    %rsi,%rdi
call   1050 <selinux_relabel_path@plt>
lea    0xea1(%rip),%rdi
call   1030 <fs_logger@plt>
lea    0xea4(%rip),%rdi
call   1030 <fs_logger@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<empty_dev_shm>:
push   %rbx
lea    0xede(%rip),%rbx
mov    %rbx,%rdi
mov    $0x3ff,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   1040 <mkdir_attr@plt>
mov    %rbx,%rdi
mov    %rbx,%rsi
call   1050 <selinux_relabel_path@plt>
lea    0xea5(%rip),%rdi
call   1030 <fs_logger@plt>
lea    0xea8(%rip),%rdi
pop    %rbx
jmp    1030 <fs_logger@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"/dev/shm\00"
@.str.1 = [15 x i8] c"mkdir /dev/shm\00"
@.str.2 = [16 x i8] c"create /dev/shm\00"
define void @empty_dev_shm() {
%1 = call i32 @mkdir_attr(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 1023, i32 0, i32 0)
%2 = call i32 @selinux_relabel_path(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @fs_logger(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @fs_logger(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"/dev/shm\00"
@.str.1 = [15 x i8] c"mkdir /dev/shm\00"
@.str.2 = [16 x i8] c"create /dev/shm\00"
define void @empty_dev_shm() {
%1 = tail call i32 @mkdir_attr(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 1023, i32 0, i32 0)
%2 = tail call i32 @selinux_relabel_path(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @fs_logger(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @fs_logger(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
ret void
}
unsigned int OP_std_modadd(int a, int b, int c) {
  return a + b < 0 ? a + b + c : a + b >= c ? a + b - c : a + b;
}


x86 assembly (clang, -O0):
<OP_std_modadd>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
cmp    $0x0,%eax
jge    112d <OP_std_modadd+0x2d>
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    115c <OP_std_modadd+0x5c>
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jl     114d <OP_std_modadd+0x4d>
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    1156 <OP_std_modadd+0x56>
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<OP_std_modadd>:
lea    (%rdi,%rsi,1),%ecx
xor    %eax,%eax
cmp    %edx,%ecx
cmovge %edx,%eax
neg    %eax
test   %ecx,%ecx
cmovs  %edx,%eax
add    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @OP_std_modadd(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* %5
%9 = add nsw i32 %7, %8
%10 = icmp slt i32 %9, 0
br i1 %10, label %11, label %17
11: ; preds = %3
%12 = load i32, i32* %4
%13 = load i32, i32* %5
%14 = add nsw i32 %12, %13
%15 = load i32, i32* %6
%16 = add nsw i32 %14, %15
br label %35
17: ; preds = %3
%18 = load i32, i32* %4
%19 = load i32, i32* %5
%20 = add nsw i32 %18, %19
%21 = load i32, i32* %6
%22 = icmp sge i32 %20, %21
br i1 %22, label %23, label %29
23: ; preds = %17
%24 = load i32, i32* %4
%25 = load i32, i32* %5
%26 = add nsw i32 %24, %25
%27 = load i32, i32* %6
%28 = sub nsw i32 %26, %27
br label %33
29: ; preds = %17
%30 = load i32, i32* %4
%31 = load i32, i32* %5
%32 = add nsw i32 %30, %31
br label %33
33: ; preds = %29, %23
%34 = phi i32 [ %28, %23 ], [ %32, %29 ]
br label %35
35: ; preds = %33, %11
%36 = phi i32 [ %16, %11 ], [ %34, %33 ]
ret i32 %36
}

LLVM IR (-O2):
define i32 @OP_std_modadd(i32 %0, i32 %1, i32 %2) {
%4 = add nsw i32 %1, %0
%5 = icmp slt i32 %4, 0
%6 = icmp slt i32 %4, %2
%7 = select i1 %6, i32 0, i32 %2
%8 = sub i32 0, %7
%9 = select i1 %5, i32 %2, i32 %8
%10 = add i32 %9, %4
ret i32 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ pem_password_cb;
typedef int /*<<< orphan*/ d2i_of_void;
typedef int /*<<< orphan*/ PKCS8_PRIV_KEY_INFO;
typedef int /*<<< orphan*/ BIO;

/* Variables and functions */
int /*<<< orphan*/ *PEM_ASN1_read_bio(int /*<<< orphan*/ *, int /*<<< orphan*/,
                                      int /*<<< orphan*/ *, void **,
                                      int /*<<< orphan*/ *, void *);
int /*<<< orphan*/ PEM_STRING_PKCS8INF;
scalar_t__ d2i_PKCS8_PRIV_KEY_INFO;
PKCS8_PRIV_KEY_INFO *PEM_read_bio_PKCS8_PRIV_KEY_INFO(BIO *bp,
                                                      PKCS8_PRIV_KEY_INFO **x,
                                                      pem_password_cb *cb,
                                                      void *u) {
  return PEM_ASN1_read_bio((d2i_of_void *)d2i_PKCS8_PRIV_KEY_INFO,
                           PEM_STRING_PKCS8INF, bp, (void **)x, cb, u);
}


x86 assembly (clang, -O0):
<PEM_read_bio_PKCS8_PRIV_KEY_INFO>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    0x2ec1(%rip),%rax
mov    (%rax),%rdi
mov    0x2e9f(%rip),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
mov    -0x20(%rbp),%r9
call   1030 <PEM_ASN1_read_bio@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PEM_read_bio_PKCS8_PRIV_KEY_INFO>:
mov    %rcx,%r9
mov    %rdx,%r8
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    0x2ecd(%rip),%rax
mov    (%rax),%rdi
mov    0x2eab(%rip),%rax
mov    (%rax),%esi
jmp    1030 <PEM_ASN1_read_bio@plt>

LLVM IR (-O0):
@d2i_PKCS8_PRIV_KEY_INFO = global i64 0
@PEM_STRING_PKCS8INF = global i32 0
define i32* @PEM_read_bio_PKCS8_PRIV_KEY_INFO(i32* %0, i32** %1, i32* %2, i8* %3) {
%5 = alloca i32*
%6 = alloca i32**
%7 = alloca i32*
%8 = alloca i8*
store i32* %0, i32** %5
store i32** %1, i32*** %6
store i32* %2, i32** %7
store i8* %3, i8** %8
%9 = load i64, i64* @d2i_PKCS8_PRIV_KEY_INFO
%10 = inttoptr i64 %9 to i32*
%11 = load i32, i32* @PEM_STRING_PKCS8INF
%12 = load i32*, i32** %5
%13 = load i32**, i32*** %6
%14 = bitcast i32** %13 to i8**
%15 = load i32*, i32** %7
%16 = load i8*, i8** %8
%17 = call i32* @PEM_ASN1_read_bio(i32* %10, i32 %11, i32* %12, i8** %14, i32* %15, i8* %16)
ret i32* %17
}

LLVM IR (-O2):
@d2i_PKCS8_PRIV_KEY_INFO = global i64 0
@PEM_STRING_PKCS8INF = global i32 0
define i32* @PEM_read_bio_PKCS8_PRIV_KEY_INFO(i32* %0, i32** %1, i32* %2, i8* %3) {
%5 = load i64, i64* @d2i_PKCS8_PRIV_KEY_INFO
%6 = inttoptr i64 %5 to i32*
%7 = load i32, i32* @PEM_STRING_PKCS8INF
%8 = bitcast i32** %1 to i8**
%9 = tail call i32* @PEM_ASN1_read_bio(i32* %6, i32 %7, i32* %0, i8** %8, i32* %2, i8* %3)
ret i32* %9
}
/* Variables and functions */
int firstuse();
int foo();
int main(void) {
  int tmp;
  int tmp___0;
  {
    tmp = foo();
    tmp___0 = firstuse();
    return (tmp + tmp___0);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <foo@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <firstuse@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <foo@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <firstuse@plt>
add    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (...) @foo()
store i32 %4, i32* %2
%5 = call i32 (...) @firstuse()
store i32 %5, i32* %3
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = add nsw i32 %6, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @foo()
%2 = tail call i32 (...) @firstuse()
%3 = add nsw i32 %2, %1
ret i32 %3
}
int test_imm_7Auint32_reg(unsigned int val) {
  return ((val) & (0x7A << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_7Auint32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0x7a,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_7Auint32_reg(i32 %0) {
%2 = and i32 %0, 122
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int XmbResetIC() {
  printf("XmbResetIC called\n");
  return 0;
}


x86 assembly (clang, -O0):
<XmbResetIC>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<XmbResetIC>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"XmbResetIC called\0A\00"
define i32 @XmbResetIC() {
%1 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [18 x i8] c"XmbResetIC called\00"
define i32 @XmbResetIC() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
scalar_t__ testColorSinglePixel0();
scalar_t__ testColorWholeImage0();
scalar_t__ testFilterConvolutionSmooth0();
int32_t main(void) {
  if (testColorSinglePixel0()) {
    if (testColorWholeImage0()) {
      if (testFilterConvolutionSmooth0()) {
        return 0;
      } else {
        return 1;
      }
    } else {
      return 1;
    }
  } else {
    return 1;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <testColorSinglePixel0@plt>
cmp    $0x0,%rax
je     1196 <main+0x66>
mov    $0x0,%al
call   1030 <testColorWholeImage0@plt>
cmp    $0x0,%rax
je     118a <main+0x5a>
mov    $0x0,%al
call   1050 <testFilterConvolutionSmooth0@plt>
cmp    $0x0,%rax
je     117e <main+0x4e>
movl   $0x0,-0x4(%rbp)
jmp    119d <main+0x6d>
movl   $0x1,-0x4(%rbp)
jmp    119d <main+0x6d>
movl   $0x1,-0x4(%rbp)
jmp    119d <main+0x6d>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <testColorSinglePixel0@plt>
mov    $0x1,%ebx
test   %rax,%rax
je     115d <main+0x2d>
xor    %eax,%eax
call   1030 <testColorWholeImage0@plt>
test   %rax,%rax
je     115d <main+0x2d>
xor    %eax,%eax
call   1050 <testFilterConvolutionSmooth0@plt>
xor    %ebx,%ebx
test   %rax,%rax
sete   %bl
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 (...) @testColorSinglePixel0()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %13
4: ; preds = %0
%5 = call i64 (...) @testColorWholeImage0()
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %4
%8 = call i64 (...) @testFilterConvolutionSmooth0()
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %7
store i32 0, i32* %1
br label %14
11: ; preds = %7
store i32 1, i32* %1
br label %14
12: ; preds = %4
store i32 1, i32* %1
br label %14
13: ; preds = %0
store i32 1, i32* %1
br label %14
14: ; preds = %13, %12, %11, %10
%15 = load i32, i32* %1
ret i32 %15
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 (...) @testColorSinglePixel0()
%2 = icmp eq i64 %1, 0
br i1 %2, label %10, label %3
3: ; preds = %0
%4 = tail call i64 (...) @testColorWholeImage0()
%5 = icmp eq i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %3
%7 = tail call i64 (...) @testFilterConvolutionSmooth0()
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %0, %3, %6
%11 = phi i32 [ %9, %6 ], [ 1, %3 ], [ 1, %0 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_206() {
  Assert_real((isqrt(206) == 14),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/stdlib/isqrt.c",
              1035, ("Integer square root of 206 should be 14"));
}


x86 assembly (clang, -O0):
<t_sqrt_206>:
push   %rbp
mov    %rsp,%rbp
mov    $0xce,%edi
call   1030 <isqrt@plt>
cmp    $0xe,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xec0(%rip),%rsi
mov    $0x40b,%edx
lea    0xf56(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_sqrt_206>:
push   %rax
mov    $0xce,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0xe,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0x40b,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [162 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/stdlib/isqrt.c\00"
@.str.1 = [40 x i8] c"Integer square root of 206 should be 14\00"
define void @t_sqrt_206() {
%1 = call i32 @isqrt(i32 206)
%2 = icmp eq i32 %1, 14
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 1035, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [162 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/stdlib/isqrt.c\00"
@.str.1 = [40 x i8] c"Integer square root of 206 should be 14\00"
define void @t_sqrt_206() {
%1 = tail call i32 @isqrt(i32 206)
%2 = icmp eq i32 %1, 14
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 1035, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}