xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int main() {
  int x;
  int y;
  if (!(x == y && y == 0))
    return 0;
  while (1) {
    x += 4;
    y++;
    assert(x == 4 * y && x >= 0);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    1135 <main+0x25>
cmpl   $0x0,-0xc(%rbp)
je     113d <main+0x2d>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret
jmp    1142 <main+0x32>
mov    -0x8(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%ecx
mov    -0xc(%rbp),%edx
shl    $0x2,%edx
xor    %eax,%eax
cmp    %edx,%ecx
mov    %al,-0xd(%rbp)
jne    1174 <main+0x64>
cmpl   $0x0,-0x8(%rbp)
setge  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
jmp    1142 <main+0x32>

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
void do_nothing(void *none) {}


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

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

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

LLVM IR (-O2):
define void @do_nothing(i8* nocapture %0) {
ret void
}
void gdk_gc_set_ts_origin() {}


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

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

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

LLVM IR (-O2):
define void @gdk_gc_set_ts_origin() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ LogDateTime();
int /*<<< orphan*/ printf(char *, char *, int, int);
void LogMessageInt(int status, char *message, int address, int data) {
  LogDateTime();
  if (!status)
    printf("%s on %#02x to %d: error.\n", message, address, data);
  else
    printf("%s on %#02x to %d: done.\n", message, address, data);
}


x86 assembly (clang, -O0):
<LogMessageInt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    $0x0,%al
call   1040 <LogDateTime@plt>
cmpl   $0x0,-0x4(%rbp)
jne    1161 <LogMessageInt+0x41>
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
jmp    1177 <LogMessageInt+0x57>
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LogMessageInt>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %ecx,%r14d
mov    %edx,%r15d
mov    %rsi,%rbx
mov    %edi,%ebp
xor    %eax,%eax
call   1040 <LogDateTime@plt>
test   %ebp,%ebp
lea    0xebe(%rip),%rax
lea    0xed2(%rip),%rdi
cmove  %rax,%rdi
mov    %rbx,%rsi
mov    %r15d,%edx
mov    %r14d,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [27 x i8] c"%s on %x to %d: error.\0A\00"
@.str.1 = [26 x i8] c"%s on %x to %d: done.\0A\00"
define void @LogMessageInt(i32 %0, i8* %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = call i32 (...) @LogDateTime()
%10 = load i32, i32* %5
%11 = icmp ne i32 %10, 0
br i1 %11, label %17, label %12
12: ; preds = %4
%13 = load i8*, i8** %6
%14 = load i32, i32* %7
%15 = load i32, i32* %8
%16 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %13, i32 %14, i32 %15)
br label %22
17: ; preds = %4
%18 = load i8*, i8** %6
%19 = load i32, i32* %7
%20 = load i32, i32* %8
%21 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i8* %18, i32 %19, i32 %20)
br label %22
22: ; preds = %17, %12
ret void
}

LLVM IR (-O2):
@.str = [27 x i8] c"%s on %x to %d: error.\0A\00"
@.str.1 = [26 x i8] c"%s on %x to %d: done.\0A\00"
define void @LogMessageInt(i32 %0, i8* %1, i32 %2, i32 %3) {
%5 = tail call i32 (...) @LogDateTime()
%6 = icmp eq i32 %0, 0
%7 = select i1 %6, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0)
%8 = tail call i32 @printf(i8* %7, i8* %1, i32 %2, i32 %3)
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned long subwindow;
};
typedef TYPE_1__ XButtonEvent;

/* Variables and functions */
void set_XButtonEvent_subwindow(void *_p, unsigned long _v) {
  ((XButtonEvent *)_p)->subwindow = (unsigned long)_v;
}


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

x86 assembly (clang, -O2):
<set_XButtonEvent_subwindow>:
mov    %rsi,(%rdi)
ret

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

LLVM IR (-O2):
define void @set_XButtonEvent_subwindow(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int main() {
  void mystrcpy(char *, char *);
  char t[] = "Hello, World!";
  char s[100];
  mystrcpy(s, t);
  printf("%s\n", s);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x12(%rbp)
mov    0xec5(%rip),%eax
mov    %eax,-0xa(%rbp)
mov    0xebf(%rip),%ax
mov    %ax,-0x6(%rbp)
lea    -0x80(%rbp),%rdi
lea    -0x12(%rbp),%rsi
call   1040 <mystrcpy@plt>
lea    -0x80(%rbp),%rsi
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@__const.main.t = [14 x i8] c"Hello, World!\00"
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [14 x i8]
%2 = alloca [100 x i8]
%3 = getelementptr inbounds [14 x i8], [14 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
ret i32 0
}
void SensorSetContrast_FUJITSU(unsigned char val) {}


x86 assembly (clang, -O0):
<SensorSetContrast_FUJITSU>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @SensorSetContrast_FUJITSU(i8 zeroext %0) {
ret void
}
/* Variables and functions */
unsigned long rint(double);
unsigned long F_to_mkelvin(double f) {
  return rint((f - 32) * 1000 / 1.8 + 273150);
}


x86 assembly (clang, -O0):
<F_to_mkelvin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xeee(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xeda(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xec6(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xeb2(%rip),%xmm1
addsd  %xmm1,%xmm0
call   1030 <rint@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<F_to_mkelvin>:
addsd  0xee8(%rip),%xmm0
mulsd  0xee8(%rip),%xmm0
divsd  0xee8(%rip),%xmm0
addsd  0xee8(%rip),%xmm0
jmp    1030 <rint@plt>

LLVM IR (-O0):
define i64 @F_to_mkelvin(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fsub double %3, 3.200000e+01
%5 = fmul double %4, 1.000000e+03
%6 = fdiv double %5, 1.800000e+00
%7 = fadd double %6, 2.731500e+05
%8 = call i64 @rint(double %7)
ret i64 %8
}

LLVM IR (-O2):
define i64 @F_to_mkelvin(double %0) {
%2 = fadd double %0, -3.200000e+01
%3 = fmul double %2, 1.000000e+03
%4 = fdiv double %3, 1.800000e+00
%5 = fadd double %4, 2.731500e+05
%6 = tail call i64 @rint(double %5)
ret i64 %6
}
void palm27x_ac97_init(int minv, int maxv, int jack, int reset) {}


x86 assembly (clang, -O0):
<palm27x_ac97_init>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @palm27x_ac97_init(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
ret void
}

LLVM IR (-O2):
define void @palm27x_ac97_init(i32 %0, i32 %1, i32 %2, i32 %3) {
ret void
}
int fun1166() { return 1166; }


x86 assembly (clang, -O0):
<fun1166>:
push   %rbp
mov    %rsp,%rbp
mov    $0x48e,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun1166>:
mov    $0x48e,%eax
ret

LLVM IR (-O0):
define i32 @fun1166() {
ret i32 1166
}

LLVM IR (-O2):
define i32 @fun1166() {
ret i32 1166
}
int tst_avl_max(int a, int b) { return a < b ? b : a; }


x86 assembly (clang, -O0):
<tst_avl_max>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1121 <tst_avl_max+0x21>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <tst_avl_max+0x27>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tst_avl_max>:
mov    %edi,%eax
cmp    %esi,%edi
cmovl  %esi,%eax
ret

LLVM IR (-O0):
define i32 @tst_avl_max(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = icmp slt i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %4
br label %12
10: ; preds = %2
%11 = load i32, i32* %3
br label %12
12: ; preds = %10, %8
%13 = phi i32 [ %9, %8 ], [ %11, %10 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @tst_avl_max(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %1, i32 %0
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ static_assert(int);
void main() {
  int i, j, k, n;
  for (i = 0; i < n; i++)
    for (j = i; j < n; j++)
      for (k = j; k < n; k++)
        static_assert(k >= i);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1196 <main+0x86>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1183 <main+0x73>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1170 <main+0x60>
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <static_assert@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1143 <main+0x33>
jmp    1175 <main+0x65>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1131 <main+0x21>
jmp    1188 <main+0x78>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <main+0xf>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
br label %5
5: ; preds = %35, %0
%6 = load i32, i32* %1
%7 = load i32, i32* %4
%8 = icmp slt i32 %6, %7
br i1 %8, label %9, label %38
9: ; preds = %5
%10 = load i32, i32* %1
store i32 %10, i32* %2
br label %11
11: ; preds = %31, %9
%12 = load i32, i32* %2
%13 = load i32, i32* %4
%14 = icmp slt i32 %12, %13
br i1 %14, label %15, label %34
15: ; preds = %11
%16 = load i32, i32* %2
store i32 %16, i32* %3
br label %17
17: ; preds = %27, %15
%18 = load i32, i32* %3
%19 = load i32, i32* %4
%20 = icmp slt i32 %18, %19
br i1 %20, label %21, label %30
21: ; preds = %17
%22 = load i32, i32* %3
%23 = load i32, i32* %1
%24 = icmp sge i32 %22, %23
%25 = zext i1 %24 to i32
%26 = call i32 @static_assert(i32 %25)
br label %27
27: ; preds = %21
%28 = load i32, i32* %3
%29 = add nsw i32 %28, 1
store i32 %29, i32* %3
br label %17
30: ; preds = %17
br label %31
31: ; preds = %30
%32 = load i32, i32* %2
%33 = add nsw i32 %32, 1
store i32 %33, i32* %2
br label %11
34: ; preds = %11
br label %35
35: ; preds = %34
%36 = load i32, i32* %1
%37 = add nsw i32 %36, 1
store i32 %37, i32* %1
br label %5
38: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @main() {
ret void
}
/* Variables and functions */
char *closureContent(char *, char, char);
char *bracketContent(char *start) { return closureContent(start, '{', '}'); }


x86 assembly (clang, -O0):
<bracketContent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x7b,%esi
mov    $0x7d,%edx
call   1030 <closureContent@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bracketContent>:
mov    $0x7b,%esi
mov    $0x7d,%edx
jmp    1030 <closureContent@plt>

LLVM IR (-O0):
define i8* @bracketContent(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* @closureContent(i8* %3, i8 signext 123, i8 signext 125)
ret i8* %4
}

LLVM IR (-O2):
define i8* @bracketContent(i8* %0) {
%2 = tail call i8* @closureContent(i8* %0, i8 signext 123, i8 signext 125)
ret i8* %2
}
int fun572() { return 572; }


x86 assembly (clang, -O0):
<fun572>:
push   %rbp
mov    %rsp,%rbp
mov    $0x23c,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun572>:
mov    $0x23c,%eax
ret

LLVM IR (-O0):
define i32 @fun572() {
ret i32 572
}

LLVM IR (-O2):
define i32 @fun572() {
ret i32 572
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ jenkins_hash_byte_var(int /*<<< orphan*/ const *, int);
uint32_t jenkins_hash_string(const char *s) {
  return jenkins_hash_byte_var((const uint8_t *)s, 0x17838abc);
}


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

x86 assembly (clang, -O2):
<jenkins_hash_string>:
mov    $0x17838abc,%esi
jmp    1030 <jenkins_hash_byte_var@plt>

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

LLVM IR (-O2):
define i32 @jenkins_hash_string(i8* %0) {
%2 = bitcast i8* %0 to i32*
%3 = tail call i32 @jenkins_hash_byte_var(i32* %2, i32 394496700)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int EOF;
int getc(int /*<<< orphan*/ *);
int /*<<< orphan*/ isprint(int);
scalar_t__ isspace(int);
int getch(FILE *f) {
  int ch;
  ch = getc(f);
  if (ch != EOF && !isprint(ch) && ch < 128) {
    ch = '*';
  }
  if (isspace(ch)) {
    ch = '_';
  }
  return ch;
}


x86 assembly (clang, -O0):
<getch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <getc@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    0x2e96(%rip),%rcx
cmp    (%rcx),%eax
je     117f <getch+0x4f>
mov    -0xc(%rbp),%edi
call   1040 <isprint@plt>
cmp    $0x0,%eax
jne    117f <getch+0x4f>
cmpl   $0x80,-0xc(%rbp)
jge    117f <getch+0x4f>
movl   $0x2a,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
je     1198 <getch+0x68>
movl   $0x5f,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getch>:
push   %rbx
call   1050 <getc@plt>
mov    %eax,%ebx
mov    0x2ea9(%rip),%rax
cmp    (%rax),%ebx
je     115d <getch+0x2d>
mov    %ebx,%edi
call   1040 <isprint@plt>
test   %eax,%eax
mov    $0x2a,%eax
cmovne %ebx,%eax
cmp    $0x80,%ebx
cmovl  %eax,%ebx
mov    %ebx,%edi
call   1030 <isspace@plt>
test   %rax,%rax
mov    $0x5f,%eax
cmove  %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@EOF = global i32 0
define i32 @getch(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 @getc(i32* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = load i32, i32* @EOF
%8 = icmp ne i32 %6, %7
br i1 %8, label %9, label %17
9: ; preds = %1
%10 = load i32, i32* %3
%11 = call i32 @isprint(i32 %10)
%12 = icmp ne i32 %11, 0
br i1 %12, label %17, label %13
13: ; preds = %9
%14 = load i32, i32* %3
%15 = icmp slt i32 %14, 128
br i1 %15, label %16, label %17
16: ; preds = %13
store i32 42, i32* %3
br label %17
17: ; preds = %16, %13, %9, %1
%18 = load i32, i32* %3
%19 = call i64 @isspace(i32 %18)
%20 = icmp ne i64 %19, 0
br i1 %20, label %21, label %22
21: ; preds = %17
store i32 95, i32* %3
br label %22
22: ; preds = %21, %17
%23 = load i32, i32* %3
ret i32 %23
}

LLVM IR (-O2):
@EOF = global i32 0
define i32 @getch(i32* nocapture %0) {
%2 = tail call i32 @getc(i32* %0)
%3 = load i32, i32* @EOF
%4 = icmp eq i32 %2, %3
br i1 %4, label %11, label %5
5: ; preds = %1
%6 = tail call i32 @isprint(i32 %2)
%7 = icmp eq i32 %6, 0
%8 = icmp slt i32 %2, 128
%9 = and i1 %8, %7
%10 = select i1 %9, i32 42, i32 %2
br label %11
11: ; preds = %5, %1
%12 = phi i32 [ %10, %5 ], [ %2, %1 ]
%13 = tail call i64 @isspace(i32 %12)
%14 = icmp eq i64 %13, 0
%15 = select i1 %14, i32 %12, i32 95
ret i32 %15
}
/* Variables and functions */
int inb_p(int);
void kb_wait(void) {
  int i;
  for (i = 0; i < 0x10000; i++)
    if ((inb_p(0x64) & 0x02) == 0)
      break;
}


x86 assembly (clang, -O0):
<kb_wait>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x10000,-0x4(%rbp)
jge    115a <kb_wait+0x4a>
mov    $0x64,%edi
call   1030 <inb_p@plt>
and    $0x2,%eax
cmp    $0x0,%eax
jne    1147 <kb_wait+0x37>
jmp    115a <kb_wait+0x4a>
jmp    114c <kb_wait+0x3c>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <kb_wait+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kb_wait>:
push   %rbx
mov    $0xffff,%ebx
cs nopw 0x0(%rax,%rax,1)
mov    $0x64,%edi
call   1030 <inb_p@plt>
sub    $0x1,%ebx
setb   %cl
test   $0x2,%al
je     1138 <kb_wait+0x28>
test   %cl,%cl
je     1120 <kb_wait+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @kb_wait() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %11, %0
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 65536
br i1 %4, label %5, label %14
5: ; preds = %2
%6 = call i32 @inb_p(i32 100)
%7 = and i32 %6, 2
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %5
br label %14
10: ; preds = %5
br label %11
11: ; preds = %10
%12 = load i32, i32* %1
%13 = add nsw i32 %12, 1
store i32 %13, i32* %1
br label %2
14: ; preds = %9, %2
ret void
}

LLVM IR (-O2):
define void @kb_wait() {
br label %1
1: ; preds = %1, %0
%2 = phi i32 [ 0, %0 ], [ %6, %1 ]
%3 = tail call i32 @inb_p(i32 100)
%4 = and i32 %3, 2
%5 = icmp eq i32 %4, 0
%6 = add nuw nsw i32 %2, 1
%7 = icmp eq i32 %6, 65536
%8 = select i1 %5, i1 true, i1 %7
br i1 %8, label %9, label %1
9: ; preds = %1
ret void
}
int registerbgidriver(void *driver) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @registerbgidriver(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int PAPI_read_counters(long long *, int);
void PAPIF_READ_COUNTERS(long long *values, int *array_len, int *check) {
  *check = PAPI_read_counters(values, *array_len);
}


x86 assembly (clang, -O0):
<PAPIF_READ_COUNTERS>:
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),%rax
mov    (%rax),%esi
call   1030 <PAPI_read_counters@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PAPIF_READ_COUNTERS>:
push   %rbx
mov    %rdx,%rbx
mov    (%rsi),%esi
call   1030 <PAPI_read_counters@plt>
mov    %eax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @PAPIF_READ_COUNTERS(i64* %0, i32* %1, i32* %2) {
%4 = alloca i64*
%5 = alloca i32*
%6 = alloca i32*
store i64* %0, i64** %4
store i32* %1, i32** %5
store i32* %2, i32** %6
%7 = load i64*, i64** %4
%8 = load i32*, i32** %5
%9 = load i32, i32* %8
%10 = call i32 @PAPI_read_counters(i64* %7, i32 %9)
%11 = load i32*, i32** %6
store i32 %10, i32* %11
ret void
}

LLVM IR (-O2):
define void @PAPIF_READ_COUNTERS(i64* %0, i32* nocapture %1, i32* nocapture writeonly %2) {
%4 = load i32, i32* %1
%5 = tail call i32 @PAPI_read_counters(i64* %0, i32 %4)
store i32 %5, i32* %2
ret void
}
int security_inode_getattr(struct vfsmount *mnt, struct dentry *dentry) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.vfsmount = type opaque
%struct.dentry = type opaque
define i32 @security_inode_getattr(%struct.vfsmount* %0, %struct.dentry* %1) {
%3 = alloca %struct.vfsmount*
%4 = alloca %struct.dentry*
store %struct.vfsmount* %0, %struct.vfsmount** %3
store %struct.dentry* %1, %struct.dentry** %4
ret i32 0
}

LLVM IR (-O2):
%struct.vfsmount = type opaque
%struct.dentry = type opaque
define i32 @security_inode_getattr(%struct.vfsmount* nocapture readnone %0, %struct.dentry* nocapture readnone %1) {
ret i32 0
}
void add_to_table(string) {}


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

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

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

LLVM IR (-O2):
define void @add_to_table(i32 %0) {
ret void
}
unsigned long cadd(unsigned long color, int dx, unsigned long mask, int shift) {
  int x;
  color >>= shift;
  x = (color & mask);
  x += dx;
  if (x < 0)
    x = 0;
  else if (x > (int)mask)
    x = mask;
  color = x;
  return color << shift;
}


x86 assembly (clang, -O0):
<cadd>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x1c(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,%ecx
shr    %cl,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
and    -0x18(%rbp),%rax
mov    %eax,-0x20(%rbp)
mov    -0xc(%rbp),%eax
add    -0x20(%rbp),%eax
mov    %eax,-0x20(%rbp)
cmpl   $0x0,-0x20(%rbp)
jge    114c <cadd+0x4c>
movl   $0x0,-0x20(%rbp)
jmp    1167 <cadd+0x67>
mov    -0x20(%rbp),%eax
mov    -0x18(%rbp),%rcx
cmp    %ecx,%eax
jle    1162 <cadd+0x62>
mov    -0x18(%rbp),%rax
mov    %eax,-0x20(%rbp)
jmp    1167 <cadd+0x67>
movslq -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x1c(%rbp),%ecx
shl    %cl,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cadd>:
shr    %cl,%rdi
and    %edx,%edi
add    %esi,%edi
cmp    %edx,%edi
cmovle %edi,%edx
xor    %eax,%eax
test   %edi,%edi
cmovns %edx,%eax
cltq
shl    %cl,%rax
ret

LLVM IR (-O0):
define i64 @cadd(i64 %0, i32 %1, i64 %2, i32 %3) {
%5 = alloca i64
%6 = alloca i32
%7 = alloca i64
%8 = alloca i32
%9 = alloca i32
store i64 %0, i64* %5
store i32 %1, i32* %6
store i64 %2, i64* %7
store i32 %3, i32* %8
%10 = load i32, i32* %8
%11 = load i64, i64* %5
%12 = zext i32 %10 to i64
%13 = lshr i64 %11, %12
store i64 %13, i64* %5
%14 = load i64, i64* %5
%15 = load i64, i64* %7
%16 = and i64 %14, %15
%17 = trunc i64 %16 to i32
store i32 %17, i32* %9
%18 = load i32, i32* %6
%19 = load i32, i32* %9
%20 = add nsw i32 %19, %18
store i32 %20, i32* %9
%21 = load i32, i32* %9
%22 = icmp slt i32 %21, 0
br i1 %22, label %23, label %24
23: ; preds = %4
store i32 0, i32* %9
br label %33
24: ; preds = %4
%25 = load i32, i32* %9
%26 = load i64, i64* %7
%27 = trunc i64 %26 to i32
%28 = icmp sgt i32 %25, %27
br i1 %28, label %29, label %32
29: ; preds = %24
%30 = load i64, i64* %7
%31 = trunc i64 %30 to i32
store i32 %31, i32* %9
br label %32
32: ; preds = %29, %24
br label %33
33: ; preds = %32, %23
%34 = load i32, i32* %9
%35 = sext i32 %34 to i64
store i64 %35, i64* %5
%36 = load i64, i64* %5
%37 = load i32, i32* %8
%38 = zext i32 %37 to i64
%39 = shl i64 %36, %38
ret i64 %39
}

LLVM IR (-O2):
define i64 @cadd(i64 %0, i32 %1, i64 %2, i32 %3) {
%5 = zext i32 %3 to i64
%6 = lshr i64 %0, %5
%7 = and i64 %6, %2
%8 = trunc i64 %7 to i32
%9 = add nsw i32 %8, %1
%10 = icmp slt i32 %9, 0
%11 = trunc i64 %2 to i32
%12 = icmp sgt i32 %9, %11
%13 = select i1 %12, i32 %11, i32 %9
%14 = select i1 %10, i32 0, i32 %13
%15 = sext i32 %14 to i64
%16 = shl i64 %15, %5
ret i64 %16
}
void *rt_alloc_box_s(void *p_mpool) { return ((void *)0); }


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

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

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

LLVM IR (-O2):
define noalias i8* @rt_alloc_box_s(i8* nocapture readnone %0) {
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ do_test(int);
int main(int argc, char **argv) {
  do_test(-150);
  do_test(-10);
  do_test(0);
  do_test(+150);
  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    $0xffffff6a,%edi
call   1030 <do_test@plt>
mov    $0xfffffff6,%edi
call   1030 <do_test@plt>
xor    %edi,%edi
call   1030 <do_test@plt>
mov    $0x96,%edi
call   1030 <do_test@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xffffff6a,%edi
call   1030 <do_test@plt>
mov    $0xfffffff6,%edi
call   1030 <do_test@plt>
xor    %edi,%edi
call   1030 <do_test@plt>
mov    $0x96,%edi
call   1030 <do_test@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 @do_test(i32 -150)
%7 = call i32 @do_test(i32 -10)
%8 = call i32 @do_test(i32 0)
%9 = call i32 @do_test(i32 150)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @do_test(i32 -150)
%4 = tail call i32 @do_test(i32 -10)
%5 = tail call i32 @do_test(i32 0)
%6 = tail call i32 @do_test(i32 150)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void utf8_clean(void *str) {
  if (str)
    free(str);
}


x86 assembly (clang, -O0):
<utf8_clean>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <utf8_clean+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<utf8_clean>:
test   %rdi,%rdi
je     111a <utf8_clean+0xa>
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
define void @utf8_clean(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i32 @free(i8* %6)
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @utf8_clean(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Variables and functions */
scalar_t__ malloc(int);
int /*<<< orphan*/ memset(char *, char, int);
char *createDiskData() {
  char *data = (char *)malloc(sizeof(char) * (32 * 64 * 256));
  if (data) {
    memset(data, '\0', (32 * 64 * 256));
  }
  return data;
}


x86 assembly (clang, -O0):
<createDiskData>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x80000,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1151 <createDiskData+0x31>
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x80000,%edx
call   1030 <memset@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<createDiskData>:
push   %rbx
mov    $0x80000,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1142 <createDiskData+0x22>
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x80000,%edx
call   1030 <memset@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @createDiskData() {
%1 = alloca i8*
%2 = call i64 @malloc(i32 524288)
%3 = inttoptr i64 %2 to i8*
store i8* %3, i8** %1
%4 = load i8*, i8** %1
%5 = icmp ne i8* %4, null
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = load i8*, i8** %1
%8 = call i32 @memset(i8* %7, i8 signext 0, i32 524288)
br label %9
9: ; preds = %6, %0
%10 = load i8*, i8** %1
ret i8* %10
}

LLVM IR (-O2):
define i8* @createDiskData() {
%1 = tail call i64 @malloc(i32 524288)
%2 = inttoptr i64 %1 to i8*
%3 = icmp eq i64 %1, 0
br i1 %3, label %6, label %4
4: ; preds = %0
%5 = tail call i32 @memset(i8* %2, i8 signext 0, i32 524288)
br label %6
6: ; preds = %4, %0
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
int /*<<< orphan*/ scanf(char *, float *);
int main() {
  float r;
  scanf("%f", &r);
  printf("%f\n", r - 1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xece(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
movss  0xeb4(%rip),%xmm1
subss  %xmm1,%xmm0
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xedc(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
movss  0x4(%rsp),%xmm0
addss  0xec0(%rip),%xmm0
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%f\00"
@.str.1 = [4 x i8] c"%f\0A\00"
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %1)
%4 = load float, float* %1
%5 = fadd float %4, -1.000000e+00
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), float %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ outb(unsigned char, unsigned int);
void nsp_write(unsigned int base, unsigned int index, unsigned char val) {
  outb(val, (base + index));
}


x86 assembly (clang, -O0):
<nsp_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dl,%al
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
mov    -0x4(%rbp),%esi
add    -0x8(%rbp),%esi
movzbl %al,%edi
call   1030 <outb@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nsp_write>:
add    %edi,%esi
mov    %edx,%edi
jmp    1030 <outb@plt>

LLVM IR (-O0):
define void @nsp_write(i32 %0, i32 %1, i8 zeroext %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8 %2, i8* %6
%7 = load i8, i8* %6
%8 = load i32, i32* %4
%9 = load i32, i32* %5
%10 = add i32 %8, %9
%11 = call i32 @outb(i8 zeroext %7, i32 %10)
ret void
}

LLVM IR (-O2):
define void @nsp_write(i32 %0, i32 %1, i8 zeroext %2) {
%4 = add i32 %1, %0
%5 = tail call i32 @outb(i8 zeroext %2, i32 %4)
ret void
}
int execute_delete_module() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_delete_module() {
ret i32 0
}
void ETH_IRQHandler() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define i32 @startSSDP() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ puts(char *);
scalar_t__ send(int, void *, size_t, int /*<<< orphan*/);
void sendstuff(int conn, void *stuff, size_t size) {
  if (send(conn, stuff, size, 0) < 0) {
    puts("Communication Error");
    exit(-1);
  }
}


x86 assembly (clang, -O0):
<sendstuff>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
xor    %ecx,%ecx
call   1040 <send@plt>
cmp    $0x0,%rax
jge    1175 <sendstuff+0x45>
lea    0xe9a(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sendstuff>:
push   %rax
xor    %ecx,%ecx
call   1040 <send@plt>
test   %rax,%rax
js     113f <sendstuff+0xf>
pop    %rax
ret
lea    0xeba(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"Communication Error\00"
define void @sendstuff(i32 %0, i8* %1, i64 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64
store i32 %0, i32* %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i32, i32* %4
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
%10 = call i64 @send(i32 %7, i8* %8, i64 %9, i32 0)
%11 = icmp slt i64 %10, 0
br i1 %11, label %12, label %15
12: ; preds = %3
%13 = call i32 @puts(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%14 = call i32 @exit(i32 -1)
unreachable
15: ; preds = %3
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"Communication Error\00"
define void @sendstuff(i32 %0, i8* %1, i64 %2) {
%4 = tail call i64 @send(i32 %0, i8* %1, i64 %2, i32 0)
%5 = icmp slt i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 @exit(i32 -1)
unreachable
9: ; preds = %3
ret void
}
extern void pinio_watchdog_reset(void) {}


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

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

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

LLVM IR (-O2):
define void @pinio_watchdog_reset() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  int x;
  if (x == 0) {
    printf("X is zero");
  }
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [10 x i8] c"X is zero\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %0
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ analyze_zone_recurse(scalar_t__, int);
int /*<<< orphan*/ rapl_sysfs_zone_exists(scalar_t__, int /*<<< orphan*/,
                                          int /*<<< orphan*/);
void analyze_all_zones_recurse(int verbose) {
  uint32_t zone;
  for (zone = 0; !rapl_sysfs_zone_exists(zone, 0, 0); zone++) {
    analyze_zone_recurse(zone, verbose);
  }
}


x86 assembly (clang, -O0):
<analyze_all_zones_recurse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
xor    %edx,%edx
mov    %edx,%esi
call   1040 <rapl_sysfs_zone_exists@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1155 <analyze_all_zones_recurse+0x35>
jmp    1172 <analyze_all_zones_recurse+0x52>
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%esi
call   1030 <analyze_zone_recurse@plt>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1133 <analyze_all_zones_recurse+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<analyze_all_zones_recurse>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1040 <rapl_sysfs_zone_exists@plt>
test   %eax,%eax
jne    115e <analyze_all_zones_recurse+0x3e>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    %ebp,%esi
call   1030 <analyze_zone_recurse@plt>
add    $0x1,%rbx
mov    %rbx,%rdi
xor    %esi,%esi
xor    %edx,%edx
call   1040 <rapl_sysfs_zone_exists@plt>
test   %eax,%eax
je     1140 <analyze_all_zones_recurse+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @analyze_all_zones_recurse(i32 %0) {
%2 = alloca i32
%3 = alloca i64
store i32 %0, i32* %2
store i64 0, i64* %3
br label %4
4: ; preds = %13, %1
%5 = load i64, i64* %3
%6 = call i32 @rapl_sysfs_zone_exists(i64 %5, i32 0, i32 0)
%7 = icmp ne i32 %6, 0
%8 = xor i1 %7, true
br i1 %8, label %9, label %16
9: ; preds = %4
%10 = load i64, i64* %3
%11 = load i32, i32* %2
%12 = call i32 @analyze_zone_recurse(i64 %10, i32 %11)
br label %13
13: ; preds = %9
%14 = load i64, i64* %3
%15 = add nsw i64 %14, 1
store i64 %15, i64* %3
br label %4
16: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @analyze_all_zones_recurse(i32 %0) {
%2 = tail call i32 @rapl_sysfs_zone_exists(i64 0, i32 0, i32 0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %10
4: ; preds = %1, %4
%5 = phi i64 [ %7, %4 ], [ 0, %1 ]
%6 = tail call i32 @analyze_zone_recurse(i64 %5, i32 %0)
%7 = add nuw nsw i64 %5, 1
%8 = tail call i32 @rapl_sysfs_zone_exists(i64 %7, i32 0, i32 0)
%9 = icmp eq i32 %8, 0
br i1 %9, label %4, label %10
10: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
void clsrc() { system("clear"); }


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

x86 assembly (clang, -O2):
<clsrc>:
lea    0xee9(%rip),%rdi
jmp    1030 <system@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"clear\00"
define void @clsrc() {
%1 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"clear\00"
define void @clsrc() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ USB_Disable(int);
int /*<<< orphan*/ USB_Enable(int /*<<< orphan*/, int);
int /*<<< orphan*/ wait_press();
int /*<<< orphan*/ wait_release();
void USB_Connect() {
  USB_Enable(0, 1);
  wait_release();
  wait_press();
  wait_release();
  USB_Disable(1);
}


x86 assembly (clang, -O0):
<USB_Connect>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
mov    $0x1,%esi
call   1060 <USB_Enable@plt>
mov    $0x0,%al
call   1050 <wait_release@plt>
mov    $0x0,%al
call   1030 <wait_press@plt>
mov    $0x0,%al
call   1050 <wait_release@plt>
mov    $0x1,%edi
call   1040 <USB_Disable@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<USB_Connect>:
push   %rax
xor    %edi,%edi
mov    $0x1,%esi
call   1060 <USB_Enable@plt>
xor    %eax,%eax
call   1050 <wait_release@plt>
xor    %eax,%eax
call   1030 <wait_press@plt>
xor    %eax,%eax
call   1050 <wait_release@plt>
mov    $0x1,%edi
pop    %rax
jmp    1040 <USB_Disable@plt>

LLVM IR (-O0):
define void @USB_Connect() {
%1 = call i32 @USB_Enable(i32 0, i32 1)
%2 = call i32 (...) @wait_release()
%3 = call i32 (...) @wait_press()
%4 = call i32 (...) @wait_release()
%5 = call i32 @USB_Disable(i32 1)
ret void
}

LLVM IR (-O2):
define void @USB_Connect() {
%1 = tail call i32 @USB_Enable(i32 0, i32 1)
%2 = tail call i32 (...) @wait_release()
%3 = tail call i32 (...) @wait_press()
%4 = tail call i32 (...) @wait_release()
%5 = tail call i32 @USB_Disable(i32 1)
ret void
}
/* Variables and functions */
char *decimal_to_base_n(int, int);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int decimal_num, n_base_num;
  scanf("%d", &decimal_num);
  scanf("%d", &n_base_num);
  printf("%s", decimal_to_base_n(decimal_num, n_base_num));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xeaa(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1050 <decimal_to_base_n@plt>
mov    %rax,%rsi
lea    0xe8f(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xec4(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    0xc(%rsp),%edi
mov    0x8(%rsp),%esi
call   1050 <decimal_to_base_n@plt>
lea    0xe99(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = call i8* @decimal_to_base_n(i32 %7, i32 %8)
%10 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %9)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ INT32_MAX;
int strtonum(char const *, int /*<<< orphan*/, int /*<<< orphan*/,
             char const **);
int atonum(const char *str) {
  int val = -1;
  const char *errstr;
  if (str) {
    val = strtonum(str, 0, INT32_MAX, &errstr);
    if (errstr)
      return -1;
  }
  return val;
}


x86 assembly (clang, -O0):
<atonum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0xffffffff,-0x14(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1165 <atonum+0x55>
mov    -0x10(%rbp),%rdi
mov    0x2ea7(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
lea    -0x20(%rbp),%rcx
call   1030 <strtonum@plt>
mov    %eax,-0x14(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     1160 <atonum+0x50>
movl   $0xffffffff,-0x4(%rbp)
jmp    116b <atonum+0x5b>
jmp    1165 <atonum+0x55>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<atonum>:
test   %rdi,%rdi
je     113d <atonum+0x2d>
push   %rax
mov    0x2ec3(%rip),%rax
mov    (%rax),%edx
mov    %rsp,%rcx
xor    %esi,%esi
call   1030 <strtonum@plt>
mov    %eax,%ecx
mov    $0xffffffff,%eax
cmpq   $0x0,(%rsp)
lea    0x8(%rsp),%rsp
je     1143 <atonum+0x33>
ret
mov    $0xffffffff,%eax
ret
mov    %ecx,%eax
ret

LLVM IR (-O0):
@INT32_MAX = global i32 0
define i32 @atonum(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
store i8* %0, i8** %3
store i32 -1, i32* %4
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %16
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = load i32, i32* @INT32_MAX
%11 = call i32 @strtonum(i8* %9, i32 0, i32 %10, i8** %5)
store i32 %11, i32* %4
%12 = load i8*, i8** %5
%13 = icmp ne i8* %12, null
br i1 %13, label %14, label %15
14: ; preds = %8
store i32 -1, i32* %2
br label %18
15: ; preds = %8
br label %16
16: ; preds = %15, %1
%17 = load i32, i32* %4
store i32 %17, i32* %2
br label %18
18: ; preds = %16, %14
%19 = load i32, i32* %2
ret i32 %19
}

LLVM IR (-O2):
@INT32_MAX = global i32 0
define i32 @atonum(i8* %0) {
%2 = alloca i8*
%3 = bitcast i8** %2 to i8*
%4 = icmp eq i8* %0, null
br i1 %4, label %10, label %5
5: ; preds = %1
%6 = load i32, i32* @INT32_MAX
%7 = call i32 @strtonum(i8* %0, i32 0, i32 %6, i8** %2)
%8 = load i8*, i8** %2
%9 = icmp eq i8* %8, null
br i1 %9, label %10, label %12
10: ; preds = %5, %1
%11 = phi i32 [ %7, %5 ], [ -1, %1 ]
br label %12
12: ; preds = %5, %10
%13 = phi i32 [ %11, %10 ], [ -1, %5 ]
ret i32 %13
}
unsigned char setDDRAMAddress(unsigned char address) { return 0x80 | address; }


x86 assembly (clang, -O0):
<setDDRAMAddress>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
or     $0x80,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<setDDRAMAddress>:
mov    %edi,%eax
or     $0x80,%al
ret

LLVM IR (-O0):
define zeroext i8 @setDDRAMAddress(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = or i32 128, %4
%6 = trunc i32 %5 to i8
ret i8 %6
}

LLVM IR (-O2):
define zeroext i8 @setDDRAMAddress(i8 zeroext %0) {
%2 = or i8 %0, -128
ret i8 %2
}