xunge/DecIR huggingface dataset:
void natsSys_Init(void) {}


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

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

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

LLVM IR (-O2):
define void @natsSys_Init() {
ret void
}
/* Type definitions */
struct timeval {
  int dummy;
};

/* Variables and functions */
long getMicroseconds(struct timeval *);
long getTimeSpan(struct timeval *start_time, struct timeval *end_time) {
  long usec2 = getMicroseconds(end_time);
  long usec1 = getMicroseconds(start_time);
  return (usec2 - usec1);
}


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

x86 assembly (clang, -O2):
<getTimeSpan>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <getMicroseconds@plt>
mov    %rax,%rbx
mov    %r14,%rdi
call   1030 <getMicroseconds@plt>
sub    %rax,%rbx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.timeval = type { i32 }
define i64 @getTimeSpan(%struct.timeval* %0, %struct.timeval* %1) {
%3 = alloca %struct.timeval*
%4 = alloca %struct.timeval*
%5 = alloca i64
%6 = alloca i64
store %struct.timeval* %0, %struct.timeval** %3
store %struct.timeval* %1, %struct.timeval** %4
%7 = load %struct.timeval*, %struct.timeval** %4
%8 = call i64 @getMicroseconds(%struct.timeval* %7)
store i64 %8, i64* %5
%9 = load %struct.timeval*, %struct.timeval** %3
%10 = call i64 @getMicroseconds(%struct.timeval* %9)
store i64 %10, i64* %6
%11 = load i64, i64* %5
%12 = load i64, i64* %6
%13 = sub nsw i64 %11, %12
ret i64 %13
}

LLVM IR (-O2):
%struct.timeval = type { i32 }
define i64 @getTimeSpan(%struct.timeval* %0, %struct.timeval* %1) {
%3 = tail call i64 @getMicroseconds(%struct.timeval* %1)
%4 = tail call i64 @getMicroseconds(%struct.timeval* %0)
%5 = sub nsw i64 %3, %4
ret i64 %5
}
int get_index(int i, int j, int N) { return i * N + j; }


x86 assembly (clang, -O0):
<get_index>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
imul   -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_index>:
imul   %edx,%edi
lea    (%rdi,%rsi,1),%eax
ret

LLVM IR (-O0):
define i32 @get_index(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* %6
%9 = mul nsw i32 %7, %8
%10 = load i32, i32* %5
%11 = add nsw i32 %9, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @get_index(i32 %0, i32 %1, i32 %2) {
%4 = mul nsw i32 %2, %0
%5 = add nsw i32 %4, %1
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ toto();
int main() {
  toto();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @toto()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @toto()
ret i32 0
}
unsigned setbits(unsigned x, int p, int n, unsigned y) {
  int i, j, mask;
  i = (x >> (y + 1 - n)) & ~(~0 << n);
  mask = ~(((1 << n) - 1) << (p + 1 - n));
  j = mask & x;
  return j | i << (p + 1 - n);
}


x86 assembly (clang, -O0):
<setbits>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x10(%rbp),%ecx
add    $0x1,%ecx
sub    -0xc(%rbp),%ecx
shr    %cl,%eax
mov    -0xc(%rbp),%ecx
mov    $0xffffffff,%edx
shl    %cl,%edx
mov    %edx,%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
sub    $0x1,%eax
mov    -0x8(%rbp),%ecx
add    $0x1,%ecx
sub    -0xc(%rbp),%ecx
shl    %cl,%eax
xor    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
and    -0x4(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%ecx
add    $0x1,%ecx
sub    -0xc(%rbp),%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<setbits>:
mov    %edx,%r8d
sub    %edx,%ecx
add    $0x1,%cl
mov    %edi,%eax
shr    %cl,%eax
mov    $0xffffffff,%edx
mov    %r8d,%ecx
shl    %cl,%edx
not    %edx
and    %edx,%eax
sub    %r8d,%esi
lea    0x1(%rsi),%ecx
shl    %cl,%edx
not    %edx
and    %edi,%edx
shl    %cl,%eax
or     %edx,%eax
ret

LLVM IR (-O0):
define i32 @setbits(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%12 = load i32, i32* %5
%13 = load i32, i32* %8
%14 = add i32 %13, 1
%15 = load i32, i32* %7
%16 = sub i32 %14, %15
%17 = lshr i32 %12, %16
%18 = load i32, i32* %7
%19 = shl i32 -1, %18
%20 = xor i32 %19, -1
%21 = and i32 %17, %20
store i32 %21, i32* %9
%22 = load i32, i32* %7
%23 = shl i32 1, %22
%24 = sub nsw i32 %23, 1
%25 = load i32, i32* %6
%26 = add nsw i32 %25, 1
%27 = load i32, i32* %7
%28 = sub nsw i32 %26, %27
%29 = shl i32 %24, %28
%30 = xor i32 %29, -1
store i32 %30, i32* %11
%31 = load i32, i32* %11
%32 = load i32, i32* %5
%33 = and i32 %31, %32
store i32 %33, i32* %10
%34 = load i32, i32* %10
%35 = load i32, i32* %9
%36 = load i32, i32* %6
%37 = add nsw i32 %36, 1
%38 = load i32, i32* %7
%39 = sub nsw i32 %37, %38
%40 = shl i32 %35, %39
%41 = or i32 %34, %40
ret i32 %41
}

LLVM IR (-O2):
define i32 @setbits(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = sub i32 1, %2
%6 = add i32 %5, %3
%7 = lshr i32 %0, %6
%8 = shl nsw i32 -1, %2
%9 = xor i32 %8, -1
%10 = and i32 %7, %9
%11 = add nsw i32 %1, 1
%12 = sub i32 %11, %2
%13 = shl i32 %9, %12
%14 = xor i32 %13, -1
%15 = and i32 %14, %0
%16 = shl i32 %10, %12
%17 = or i32 %16, %15
ret i32 %17
}
void swap_int(int *a, int *b) {
  int temp;
  temp = *a;
  *a = *b;
  *b = temp;
}


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

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

LLVM IR (-O0):
define void @swap_int(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
%6 = load i32*, i32** %3
%7 = load i32, i32* %6
store i32 %7, i32* %5
%8 = load i32*, i32** %4
%9 = load i32, i32* %8
%10 = load i32*, i32** %3
store i32 %9, i32* %10
%11 = load i32, i32* %5
%12 = load i32*, i32** %4
store i32 %11, i32* %12
ret void
}

LLVM IR (-O2):
define void @swap_int(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
store i32 %4, i32* %0
store i32 %3, i32* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *, int, int);
void print_help(const char *prg) {
  printf("Usage: %s -i <input video> -o <output video> "
         "-f <filter xml> "
         "-d <output dir> "
         "[ -x <output x resolution> ] "
         "[ -y <output y resolution> ] "
         "[ -s <random seed> ] "
         "[ -sp <salt and pepper %d-%d> ] "
         "[ -edge] "
         "[ -med ]\n",
         prg, 1, 100);
}


x86 assembly (clang, -O0):
<print_help>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
mov    $0x1,%edx
mov    $0x64,%ecx
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_help>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
mov    $0x1,%edx
mov    $0x64,%ecx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [207 x i8] c"Usage: %s -i <input video> -o <output video> -f <filter xml> -d <output dir> [ -x <output x resolution> ] [ -y <output y resolution> ] [ -s <random seed> ] [ -sp <salt and pepper %d-%d> ] [ -edge] [ -med ]\0A\00"
define void @print_help(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([207 x i8], [207 x i8]* @.str, i64 0, i64 0), i8* %3, i32 1, i32 100)
ret void
}

LLVM IR (-O2):
@.str = [207 x i8] c"Usage: %s -i <input video> -o <output video> -f <filter xml> -d <output dir> [ -x <output x resolution> ] [ -y <output y resolution> ] [ -s <random seed> ] [ -sp <salt and pepper %d-%d> ] [ -edge] [ -med ]\0A\00"
define void @print_help(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([207 x i8], [207 x i8]* @.str, i64 0, i64 0), i8* %0, i32 1, i32 100)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ IPC_RMID;
int shmctl(int, int /*<<< orphan*/, int /*<<< orphan*/ *);
int IPC_DelShm(int shmhdl) {
  int rv;
  rv = shmctl(shmhdl, IPC_RMID, NULL);
  if (rv < 0)
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<IPC_DelShm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    0x2ebb(%rip),%rax
mov    (%rax),%esi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <shmctl@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jge    1149 <IPC_DelShm+0x39>
movl   $0xffffffff,-0x4(%rbp)
jmp    1150 <IPC_DelShm+0x40>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IPC_DelShm>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <shmctl@plt>
sar    $0x1f,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@IPC_RMID = global i32 0
define i32 @IPC_DelShm(i32 %0) {
%2 = load i32, i32* @IPC_RMID
%3 = tail call i32 @shmctl(i32 %0, i32 %2, i32* null)
%4 = ashr i32 %3, 31
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ _hmt_register_covercase(char *, char *);
void _hmt_covercase_HMM_FastNormalizeVec4_init(void) {
  _hmt_register_covercase("HMM_FastNormalizeVec4", "1");
}


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

x86 assembly (clang, -O2):
<_hmt_covercase_HMM_FastNormalizeVec4_init>:
lea    0xee9(%rip),%rdi
lea    0xef8(%rip),%rsi
jmp    1030 <_hmt_register_covercase@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"HMM_FastNormalizeVec4\00"
@.str.1 = [2 x i8] c"1\00"
define void @_hmt_covercase_HMM_FastNormalizeVec4_init() {
%1 = call i32 @_hmt_register_covercase(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"HMM_FastNormalizeVec4\00"
@.str.1 = [2 x i8] c"1\00"
define void @_hmt_covercase_HMM_FastNormalizeVec4_init() {
%1 = tail call i32 @_hmt_register_covercase(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void gprsharp_convert_clock_type() {
  fprintf(stderr, "Should never reach here");
  abort();
}


x86 assembly (clang, -O0):
<gprsharp_convert_clock_type>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<gprsharp_convert_clock_type>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [24 x i8] c"Should never reach here\00"
define void @gprsharp_convert_clock_type() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [24 x i8] c"Should never reach here\00"
define void @gprsharp_convert_clock_type() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @abort()
unreachable
}
int stackFillEntryLength(void) { return 3; }


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

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

LLVM IR (-O0):
define i32 @stackFillEntryLength() {
ret i32 3
}

LLVM IR (-O2):
define i32 @stackFillEntryLength() {
ret i32 3
}
int answer_to_everything() { return 42; }


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

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

LLVM IR (-O0):
define i32 @answer_to_everything() {
ret i32 42
}

LLVM IR (-O2):
define i32 @answer_to_everything() {
ret i32 42
}
/* Variables and functions */
double lngamm(int);
double lnfact(int n) {
  if (n <= 1)
    return (0);
  return (lngamm(n + 1));
}


x86 assembly (clang, -O0):
<lnfact>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
jg     1132 <lnfact+0x22>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1142 <lnfact+0x32>
mov    -0xc(%rbp),%edi
add    $0x1,%edi
call   1030 <lngamm@plt>
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lnfact>:
cmp    $0x2,%edi
jge    1119 <lnfact+0x9>
xorps  %xmm0,%xmm0
ret
add    $0x1,%edi
jmp    1030 <lngamm@plt>

LLVM IR (-O0):
define double @lnfact(i32 %0) {
%2 = alloca double
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sle i32 %4, 1
br i1 %5, label %6, label %7
6: ; preds = %1
store double 0.000000e+00, double* %2
br label %11
7: ; preds = %1
%8 = load i32, i32* %3
%9 = add nsw i32 %8, 1
%10 = call double @lngamm(i32 %9)
store double %10, double* %2
br label %11
11: ; preds = %7, %6
%12 = load double, double* %2
ret double %12
}

LLVM IR (-O2):
define double @lnfact(i32 %0) {
%2 = icmp slt i32 %0, 2
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = add nuw nsw i32 %0, 1
%5 = tail call double @lngamm(i32 %4)
br label %6
6: ; preds = %1, %3
%7 = phi double [ %5, %3 ], [ 0.000000e+00, %1 ]
ret double %7
}
void walt_dec_cumulative_runnable_avg(struct rq *rq, struct task_struct *p) {}


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

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

LLVM IR (-O0):
%struct.rq = type opaque
%struct.task_struct = type opaque
define void @walt_dec_cumulative_runnable_avg(%struct.rq* %0, %struct.task_struct* %1) {
%3 = alloca %struct.rq*
%4 = alloca %struct.task_struct*
store %struct.rq* %0, %struct.rq** %3
store %struct.task_struct* %1, %struct.task_struct** %4
ret void
}

LLVM IR (-O2):
%struct.rq = type opaque
%struct.task_struct = type opaque
define void @walt_dec_cumulative_runnable_avg(%struct.rq* nocapture %0, %struct.task_struct* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(int *);
void free_ivector(int *m, int minx) { free(m + minx); }


x86 assembly (clang, -O0):
<free_ivector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_ivector>:
movslq %esi,%rax
lea    (%rdi,%rax,4),%rdi
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @free_ivector(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 = sext i32 %6 to i64
%8 = getelementptr inbounds i32, i32* %5, i64 %7
%9 = call i32 @free(i32* %8)
ret void
}

LLVM IR (-O2):
define void @free_ivector(i32* nocapture %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = getelementptr inbounds i32, i32* %0, i64 %3
%5 = tail call i32 @free(i32* %4)
ret void
}
int testdynfail() { return 0; }


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

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

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

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

/* Variables and functions */
double GetUint();
double GetUniform() {
  uint32_t u = GetUint();
  return (u + 1.0) * 2.328306435454494e-10;
}


x86 assembly (clang, -O0):
<GetUniform>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <GetUint@plt>
movsd  %xmm0,-0x8(%rbp)
movsd  0xedc(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
movsd  0xec7(%rip),%xmm1
mulsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetUniform>:
push   %rax
xor    %eax,%eax
call   1030 <GetUint@plt>
addsd  0xee0(%rip),%xmm0
mulsd  0xee0(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @GetUniform() {
%1 = alloca double
%2 = call double (...) @GetUint()
store double %2, double* %1
%3 = load double, double* %1
%4 = fadd double %3, 1.000000e+00
%5 = fmul double %4, 0x3DEFFFFFFFC00000
ret double %5
}

LLVM IR (-O2):
define double @GetUniform() {
%1 = tail call double (...) @GetUint()
%2 = fadd double %1, 1.000000e+00
%3 = fmul double %2, 0x3DEFFFFFFFC00000
ret double %3
}
int unaligned32_be(const void *v) {
  return ((((unaligned32(v)) & 0xff000000) >> 24) |
          (((unaligned32(v)) & 0x00ff0000) >> 8) |
          (((unaligned32(v)) & 0x0000ff00) << 8) |
          (((unaligned32(v)) & 0x000000ff) << 24));
}


x86 assembly (clang, -O0):
<unaligned32_be>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1030 <unaligned32@plt>
and    $0xff000000,%eax
shr    $0x18,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1030 <unaligned32@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
and    $0xff0000,%ecx
sar    $0x8,%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1030 <unaligned32@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
and    $0xff00,%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1030 <unaligned32@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
and    $0xff,%ecx
shl    $0x18,%ecx
or     %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unaligned32_be>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%r14
xor    %eax,%eax
call   1030 <unaligned32@plt>
mov    %eax,%ebp
shr    $0x18,%ebp
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <unaligned32@plt>
mov    %eax,%ebx
shr    $0x8,%ebx
and    $0xff00,%ebx
or     %ebp,%ebx
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <unaligned32@plt>
mov    %eax,%ebp
shl    $0x8,%ebp
and    $0xff0000,%ebp
or     %ebx,%ebp
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <unaligned32@plt>
shl    $0x18,%eax
or     %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @unaligned32_be(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) bitcast (i32 (...)* @unaligned32 to i32 (i8*, ...)*)(i8* %3)
%5 = and i32 %4, -16777216
%6 = lshr i32 %5, 24
%7 = load i8*, i8** %2
%8 = call i32 (i8*, ...) bitcast (i32 (...)* @unaligned32 to i32 (i8*, ...)*)(i8* %7)
%9 = and i32 %8, 16711680
%10 = ashr i32 %9, 8
%11 = or i32 %6, %10
%12 = load i8*, i8** %2
%13 = call i32 (i8*, ...) bitcast (i32 (...)* @unaligned32 to i32 (i8*, ...)*)(i8* %12)
%14 = and i32 %13, 65280
%15 = shl i32 %14, 8
%16 = or i32 %11, %15
%17 = load i8*, i8** %2
%18 = call i32 (i8*, ...) bitcast (i32 (...)* @unaligned32 to i32 (i8*, ...)*)(i8* %17)
%19 = and i32 %18, 255
%20 = shl i32 %19, 24
%21 = or i32 %16, %20
ret i32 %21
}

LLVM IR (-O2):
define i32 @unaligned32_be(i8* %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @unaligned32 to i32 (i8*, ...)*)(i8* %0)
%3 = lshr i32 %2, 24
%4 = tail call i32 (i8*, ...) bitcast (i32 (...)* @unaligned32 to i32 (i8*, ...)*)(i8* %0)
%5 = lshr i32 %4, 8
%6 = and i32 %5, 65280
%7 = or i32 %6, %3
%8 = tail call i32 (i8*, ...) bitcast (i32 (...)* @unaligned32 to i32 (i8*, ...)*)(i8* %0)
%9 = shl i32 %8, 8
%10 = and i32 %9, 16711680
%11 = or i32 %7, %10
%12 = tail call i32 (i8*, ...) bitcast (i32 (...)* @unaligned32 to i32 (i8*, ...)*)(i8* %0)
%13 = shl i32 %12, 24
%14 = or i32 %11, %13
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void get_subdirname(void) { printf("ia64"); }


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

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"ia64\00"
define void @get_subdirname() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ rint(double);
double wrapi(double x) {
  double r;
  extern double round();
  signed char c;
  c = (signed char)rint(256.0 * x / 6.28318530717958647692);
  r = (double)c;
  r = r * 6.28318530717958647692 / 256.0;
  return (r);
}


x86 assembly (clang, -O0):
<wrapi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xed6(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xed2(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1030 <rint@plt>
mov    %al,-0x11(%rbp)
movsbl -0x11(%rbp),%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xeb1(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  0xe9c(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wrapi>:
push   %rax
mulsd  0xee7(%rip),%xmm0
divsd  0xee7(%rip),%xmm0
call   1030 <rint@plt>
movsbl %al,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0xed0(%rip),%xmm0
mulsd  0xed0(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @wrapi(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca i8
store double %0, double* %2
%5 = load double, double* %2
%6 = fmul double 2.560000e+02, %5
%7 = fdiv double %6, 0x401921FB54442D18
%8 = call i64 @rint(double %7)
%9 = trunc i64 %8 to i8
store i8 %9, i8* %4
%10 = load i8, i8* %4
%11 = sitofp i8 %10 to double
store double %11, double* %3
%12 = load double, double* %3
%13 = fmul double %12, 0x401921FB54442D18
%14 = fdiv double %13, 2.560000e+02
store double %14, double* %3
%15 = load double, double* %3
ret double %15
}

LLVM IR (-O2):
define double @wrapi(double %0) {
%2 = fmul double %0, 2.560000e+02
%3 = fdiv double %2, 0x401921FB54442D18
%4 = tail call i64 @rint(double %3)
%5 = trunc i64 %4 to i8
%6 = sitofp i8 %5 to double
%7 = fmul double %6, 0x401921FB54442D18
%8 = fmul double %7, 3.906250e-03
ret double %8
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *);
void Error(char *text) {
  printf("\nERROR: %s\n", text);
  exit(1);
}


x86 assembly (clang, -O0):
<Error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@.str = [12 x i8] c"\0AERROR: %s\0A\00"
define void @Error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [12 x i8] c"\0AERROR: %s\0A\00"
define void @Error(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int f(int);
int main(void) {
  int *x, *y;
  int N, i;
  for (int j = 0; i < N; ++j) {
    x[j] = f(y[j]);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    115d <main+0x4d>
mov    -0x18(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
call   1030 <f@plt>
mov    %eax,%edx
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1126 <main+0x16>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ utest_sf_array();
int main(void) {
  utest_sf_array();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @utest_sf_array()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @utest_sf_array()
ret i32 0
}
void handler_sigusr2() { return; }


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

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

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

LLVM IR (-O2):
define void @handler_sigusr2() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, double const);
void show_double(FILE *fp, const double f) { fprintf(fp, "%f", f); }


x86 assembly (clang, -O0):
<show_double>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
movsd  -0x10(%rbp),%xmm0
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_double>:
lea    0xee9(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%f\00"
define void @show_double(i32* %0, double %1) {
%3 = alloca i32*
%4 = alloca double
store i32* %0, i32** %3
store double %1, double* %4
%5 = load i32*, i32** %3
%6 = load double, double* %4
%7 = call i32 @fprintf(i32* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), double %6)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%f\00"
define void @show_double(i32* nocapture %0, double %1) {
%3 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), double %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int putc(unsigned char, int /*<<< orphan*/ *);
int aiger_default_put(char ch, FILE *file) {
  return putc((unsigned char)ch, file);
}


x86 assembly (clang, -O0):
<aiger_default_put>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x1(%rbp),%al
mov    -0x10(%rbp),%rsi
movzbl %al,%edi
call   1030 <putc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aiger_default_put>:
movzbl %dil,%edi
jmp    1030 <putc@plt>

LLVM IR (-O0):
define i32 @aiger_default_put(i8 signext %0, i32* %1) {
%3 = alloca i8
%4 = alloca i32*
store i8 %0, i8* %3
store i32* %1, i32** %4
%5 = load i8, i8* %3
%6 = load i32*, i32** %4
%7 = call i32 @putc(i8 zeroext %5, i32* %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @aiger_default_put(i8 signext %0, i32* nocapture %1) {
%3 = tail call i32 @putc(i8 zeroext %0, i32* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ unlink(char *);
void del_tmpfile() { unlink("mytmp"); }


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"mytmp\00"
define void @del_tmpfile() {
%1 = tail call i32 @unlink(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}
void gtk_cell_editable_start_editing() {}


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

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

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

LLVM IR (-O2):
define void @gtk_cell_editable_start_editing() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isprint(int);
void t_isprint_0x35() {
  Assert_real((isprint(53)),
              "/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/ctype/test_isprint.c",
              270, ("isprint should be 1 for 5"));
}


x86 assembly (clang, -O0):
<t_isprint_0x35>:
push   %rbp
mov    %rsp,%rbp
mov    $0x35,%edi
call   1030 <isprint@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x10e,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isprint_0x35>:
push   %rax
mov    $0x35,%edi
call   1030 <isprint@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x10e,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 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/ctype/test_isprint.c\00"
@.str.1 = [26 x i8] c"isprint should be 1 for 5\00"
define void @t_isprint_0x35() {
%1 = call i32 @isprint(i32 53)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 270, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 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/ctype/test_isprint.c\00"
@.str.1 = [26 x i8] c"isprint should be 1 for 5\00"
define void @t_isprint_0x35() {
%1 = tail call i32 @isprint(i32 53)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 270, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int inverte(int);
int /*<<< orphan*/ printf(char *, int);
void main() { printf("%d", inverte(123)); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7b,%edi
call   1030 <inverte@plt>
mov    %eax,%esi
lea    0xec9(%rip),%rdi
call   1040 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x7b,%edi
call   1030 <inverte@plt>
lea    0xece(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    1040 <printf@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @main() {
%1 = tail call i32 @inverte(i32 123)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int, int);
int /*<<< orphan*/ stderr;
int testcode(int code, int want) {
  if (code != want) {
    fprintf(stderr, "  FAIL: expected si_code==%d, not %d\n", want, code);
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<testcode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
je     1151 <testcode+0x41>
mov    0x2eaf(%rip),%rax
mov    (%rax),%edi
mov    -0xc(%rbp),%edx
mov    -0x8(%rbp),%ecx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1158 <testcode+0x48>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testcode>:
mov    $0x1,%eax
cmp    %esi,%edi
je     1139 <testcode+0x29>
push   %rax
mov    %esi,%edx
mov    %edi,%ecx
mov    0x2ebb(%rip),%rax
mov    (%rax),%edi
lea    0xed2(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x8,%rsp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [38 x i8] c" FAIL: expected si_code==%d, not %d\0A\00"
define i32 @testcode(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 = icmp ne i32 %6, %7
br i1 %8, label %9, label %14
9: ; preds = %2
%10 = load i32, i32* @stderr
%11 = load i32, i32* %5
%12 = load i32, i32* %4
%13 = call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i32 %11, i32 %12)
store i32 0, i32* %3
br label %15
14: ; preds = %2
store i32 1, i32* %3
br label %15
15: ; preds = %14, %9
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [38 x i8] c" FAIL: expected si_code==%d, not %d\0A\00"
define i32 @testcode(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, %1
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %0)
br label %7
7: ; preds = %2, %4
%8 = phi i32 [ 0, %4 ], [ 1, %2 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
void form_output_generic_button(char *onclick_control_string,
                                char *button_label) {
  printf("<td><input type=button value=\"%s\" "
         "onClick=\"%s;\">\n",
         button_label, onclick_control_string);
}


x86 assembly (clang, -O0):
<form_output_generic_button>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x8(%rbp),%rdx
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<form_output_generic_button>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [50 x i8] c"<td><input type=button value=\22%s\22 onClick=\22%s;\22>\0A\00"
define void @form_output_generic_button(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = load i8*, i8** %3
%7 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i8* %5, i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [50 x i8] c"<td><input type=button value=\22%s\22 onClick=\22%s;\22>\0A\00"
define void @form_output_generic_button(i8* %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %0)
ret void
}
int copystring(char *store, char *original) {
  while (*store++ = *original++)
    ;
  return 0;
}


x86 assembly (clang, -O0):
<copystring>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %al,(%rcx)
cmp    $0x0,%al
je     113b <copystring+0x3b>
jmp    110c <copystring+0xc>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<copystring>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rsi,%rax,1),%ecx
mov    %cl,(%rdi,%rax,1)
add    $0x1,%rax
test   %cl,%cl
jne    1110 <copystring+0x10>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @copystring(i8* nocapture writeonly %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %8, %3 ]
%5 = phi i8* [ %1, %2 ], [ %6, %3 ]
%6 = getelementptr inbounds i8, i8* %5, i64 1
%7 = load i8, i8* %5
%8 = getelementptr inbounds i8, i8* %4, i64 1
store i8 %7, i8* %4
%9 = icmp eq i8 %7, 0
br i1 %9, label %10, label %3
10: ; preds = %3
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ fusion(int const, int const, int const,
                          int /*<<< orphan*/ const *, int /*<<< orphan*/ *,
                          int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                          int /*<<< orphan*/ *);
void pencil_fusion(const int rows, const int cols, const int step,
                   const uint8_t src[], uint8_t f[], uint8_t g[], uint8_t h[],
                   uint8_t k[]) {
  fusion(rows, cols, step, src, f, g, h, k);
}


x86 assembly (clang, -O0):
<pencil_fusion>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
mov    -0x28(%rbp),%r9
mov    0x10(%rbp),%r10
mov    0x18(%rbp),%rax
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1030 <fusion@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pencil_fusion>:
jmp    1030 <fusion@plt>

LLVM IR (-O0):
define void @pencil_fusion(i32 %0, i32 %1, i32 %2, i32* %3, i32* %4, i32* %5, i32* %6, i32* %7) {
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32*
%13 = alloca i32*
%14 = alloca i32*
%15 = alloca i32*
%16 = alloca i32*
store i32 %0, i32* %9
store i32 %1, i32* %10
store i32 %2, i32* %11
store i32* %3, i32** %12
store i32* %4, i32** %13
store i32* %5, i32** %14
store i32* %6, i32** %15
store i32* %7, i32** %16
%17 = load i32, i32* %9
%18 = load i32, i32* %10
%19 = load i32, i32* %11
%20 = load i32*, i32** %12
%21 = load i32*, i32** %13
%22 = load i32*, i32** %14
%23 = load i32*, i32** %15
%24 = load i32*, i32** %16
%25 = call i32 @fusion(i32 %17, i32 %18, i32 %19, i32* %20, i32* %21, i32* %22, i32* %23, i32* %24)
ret void
}

LLVM IR (-O2):
define void @pencil_fusion(i32 %0, i32 %1, i32 %2, i32* %3, i32* %4, i32* %5, i32* %6, i32* %7) {
%9 = tail call i32 @fusion(i32 %0, i32 %1, i32 %2, i32* %3, i32* %4, i32* %5, i32* %6, i32* %7)
ret void
}
unsigned int test(unsigned int a, int b, int c) {
  unsigned char r = b == c;
  return ((a >> 31) | (r << 31));
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %al,-0xd(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x1f,%eax
movzbl -0xd(%rbp),%ecx
shl    $0x1f,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
xor    %eax,%eax
cmp    %edx,%esi
sete   %al
shr    $0x1f,%edi
shl    $0x1f,%eax
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @test(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = icmp eq i32 %8, %9
%11 = zext i1 %10 to i32
%12 = trunc i32 %11 to i8
store i8 %12, i8* %7
%13 = load i32, i32* %4
%14 = lshr i32 %13, 31
%15 = load i8, i8* %7
%16 = zext i8 %15 to i32
%17 = shl i32 %16, 31
%18 = or i32 %14, %17
ret i32 %18
}

LLVM IR (-O2):
define i32 @test(i32 %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %1, %2
%5 = lshr i32 %0, 31
%6 = select i1 %4, i32 -2147483648, i32 0
%7 = or i32 %6, %5
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ SendInterrupt(int, int, int, int);
void ScuSendExternalInterrupt10(void) {
  SendInterrupt(0x5A, 0x1, 0x8000, 0x04000000);
}


x86 assembly (clang, -O0):
<ScuSendExternalInterrupt10>:
push   %rbp
mov    %rsp,%rbp
mov    $0x5a,%edi
mov    $0x1,%esi
mov    $0x8000,%edx
mov    $0x4000000,%ecx
call   1030 <SendInterrupt@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ScuSendExternalInterrupt10>:
mov    $0x5a,%edi
mov    $0x1,%esi
mov    $0x8000,%edx
mov    $0x4000000,%ecx
jmp    1030 <SendInterrupt@plt>

LLVM IR (-O0):
define void @ScuSendExternalInterrupt10() {
%1 = call i32 @SendInterrupt(i32 90, i32 1, i32 32768, i32 67108864)
ret void
}

LLVM IR (-O2):
define void @ScuSendExternalInterrupt10() {
%1 = tail call i32 @SendInterrupt(i32 90, i32 1, i32 32768, i32 67108864)
ret void
}
int test_imm_94int8_reg(signed char val) {
  return ((val) & (0x94 << 0)) ? -20 : -40;
}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ __atomic_exchange_4(int /*<<< orphan*/ volatile *,
                                       int /*<<< orphan*/, int);
uint32_t rte_atomic32_exchange(volatile uint32_t *dst, uint32_t val) {
  return __atomic_exchange_4(dst, val, 5);
}


x86 assembly (clang, -O0):
<rte_atomic32_exchange>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    $0x5,%edx
call   1030 <__atomic_exchange_4@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rte_atomic32_exchange>:
mov    $0x5,%edx
jmp    1030 <__atomic_exchange_4@plt>

LLVM IR (-O0):
define i32 @rte_atomic32_exchange(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 = call i32 @__atomic_exchange_4(i32* %5, i32 %6, i32 5)
ret i32 %7
}

LLVM IR (-O2):
define i32 @rte_atomic32_exchange(i32* %0, i32 %1) {
%3 = tail call i32 @__atomic_exchange_4(i32* %0, i32 %1, i32 5)
ret i32 %3
}
/* Variables and functions */
scalar_t__ SD_GetTimeCount();
int /*<<< orphan*/ SD_SetTimeCount(scalar_t__);
void VL_NULL_WaitVBLs(int vbls) {
  SD_SetTimeCount(SD_GetTimeCount() + ((vbls) < (1) ? (1) : (vbls)));
}


x86 assembly (clang, -O0):
<VL_NULL_WaitVBLs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <SD_GetTimeCount@plt>
mov    %rax,-0x10(%rbp)
cmpl   $0x1,-0x4(%rbp)
jge    114d <VL_NULL_WaitVBLs+0x2d>
mov    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1153 <VL_NULL_WaitVBLs+0x33>
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%eax
cltq
add    %rax,%rdi
call   1040 <SD_SetTimeCount@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<VL_NULL_WaitVBLs>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <SD_GetTimeCount@plt>
test   %ebx,%ebx
mov    $0x1,%edi
cmovg  %ebx,%edi
add    %rax,%rdi
pop    %rbx
jmp    1040 <SD_SetTimeCount@plt>

LLVM IR (-O0):
define void @VL_NULL_WaitVBLs(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i64 (...) @SD_GetTimeCount()
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 1
br i1 %5, label %6, label %7
6: ; preds = %1
br label %9
7: ; preds = %1
%8 = load i32, i32* %2
br label %9
9: ; preds = %7, %6
%10 = phi i32 [ 1, %6 ], [ %8, %7 ]
%11 = sext i32 %10 to i64
%12 = add nsw i64 %3, %11
%13 = call i32 @SD_SetTimeCount(i64 %12)
ret void
}

LLVM IR (-O2):
define void @VL_NULL_WaitVBLs(i32 %0) {
%2 = tail call i64 (...) @SD_GetTimeCount()
%3 = icmp sgt i32 %0, 1
%4 = select i1 %3, i32 %0, i32 1
%5 = zext i32 %4 to i64
%6 = add nsw i64 %2, %5
%7 = tail call i32 @SD_SetTimeCount(i64 %6)
ret void
}