xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void cleanup_str(void *addr) {
  char *str = *(char **)addr;
  free(str);
}


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

x86 assembly (clang, -O2):
<cleanup_str>:
mov    (%rdi),%rdi
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @cleanup_str(i8* nocapture %0) {
%2 = bitcast i8* %0 to i8**
%3 = load i8*, i8** %2
%4 = tail call i32 @free(i8* %3)
ret void
}
void RFCAckIntClear(void) {
  (*((volatile unsigned long *)(0x40041000 + 0x0000001C))) = 0x0;
}


x86 assembly (clang, -O0):
<RFCAckIntClear>:
push   %rbp
mov    %rsp,%rbp
mov    $0x4004101c,%eax
movq   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<RFCAckIntClear>:
movq   $0x0,0x4004101c
ret

LLVM IR (-O0):
define void @RFCAckIntClear() {
store volatile i64 0, i64* inttoptr (i64 1074008092 to i64*)
ret void
}

LLVM IR (-O2):
define void @RFCAckIntClear() {
store volatile i64 0, i64* inttoptr (i64 1074008092 to i64*)
ret void
}
int g_is_lowerorequal_f(float s, float d) { return (s <= d); }


x86 assembly (clang, -O0):
<g_is_lowerorequal_f>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
ucomiss %xmm1,%xmm0
setae  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<g_is_lowerorequal_f>:
xor    %eax,%eax
ucomiss %xmm0,%xmm1
setae  %al
ret

LLVM IR (-O0):
define i32 @g_is_lowerorequal_f(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fcmp ole float %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @g_is_lowerorequal_f(float %0, float %1) {
%3 = fcmp ole float %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  const int ANSWER = 3;
  int guess;
  int i = 1;
  while (i > 0) {
  }
  scanf("%d", &guess);
  if (guess == ANSWER)
    printf("true");
  else
    printf("false");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x3,-0x8(%rbp)
movl   $0x1,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jle    114c <main+0x2c>
jmp    113d <main+0x1d>
lea    0xead(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x3,-0xc(%rbp)
jne    1177 <main+0x57>
lea    0xe96(%rip),%rdi
call   1030 <printf@plt>
jmp    1183 <main+0x63>
lea    0xe8a(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [5 x i8] c"true\00"
@.str.2 = [6 x i8] c"false\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 3, i32* %2
store i32 1, i32* %4
br label %5
5: ; preds = %8, %0
%6 = load i32, i32* %4
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %5
br label %5
9: ; preds = %5
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%11 = load i32, i32* %3
%12 = icmp eq i32 %11, 3
br i1 %12, label %13, label %15
13: ; preds = %9
%14 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %17
15: ; preds = %9
%16 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
br label %17
17: ; preds = %15, %13
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %1, %0
br label %1
}
void cprop_test8(int *data) {
  int j, k;
  if (data[0]) {
    j = 4;
    k = 6;
    data[1] = j;
  } else {
    j = 7;
    k = 3;
    data[2] = k;
  }
  data[3] = (j + k) * 21;
}


x86 assembly (clang, -O0):
<cprop_test8>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpl   $0x0,(%rax)
je     1132 <cprop_test8+0x32>
movl   $0x4,-0xc(%rbp)
movl   $0x6,-0x10(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x4(%rax)
jmp    114a <cprop_test8+0x4a>
movl   $0x7,-0xc(%rbp)
movl   $0x3,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x8(%rax)
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
imul   $0x15,%eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0xc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<cprop_test8>:
xor    %eax,%eax
cmpl   $0x0,(%rdi)
sete   %al
mov    $0x4,%ecx
sub    %eax,%ecx
mov    %ecx,0x4(%rdi,%rax,4)
movl   $0xd2,0xc(%rdi)
ret

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

LLVM IR (-O2):
define void @cprop_test8(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i64 2, i64 1
%5 = select i1 %3, i32 3, i32 4
%6 = getelementptr inbounds i32, i32* %0, i64 %4
store i32 %5, i32* %6
%7 = getelementptr inbounds i32, i32* %0, i64 3
store i32 210, i32* %7
ret void
}
int foo(a, b)
int a, b;
{ return a + b; }


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

x86 assembly (clang, -O2):
<foo>:
lea    (%rdi,%rsi,1),%eax
ret

LLVM IR (-O0):
define i32 @foo(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 = add nsw i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @foo(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
int wpa_debug_reopen_file(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @wpa_debug_reopen_file() {
ret i32 0
}
unsigned Kit_CubeSharp(unsigned uCube, unsigned uMask) {
  return uCube & ~uMask;
}


x86 assembly (clang, -O0):
<Kit_CubeSharp>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Kit_CubeSharp>:
mov    %esi,%eax
not    %eax
and    %edi,%eax
ret

LLVM IR (-O0):
define i32 @Kit_CubeSharp(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 = xor i32 %6, -1
%8 = and i32 %5, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @Kit_CubeSharp(i32 %0, i32 %1) {
%3 = xor i32 %1, -1
%4 = and i32 %3, %0
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ daemon(int, int);
int /*<<< orphan*/ execv(char *, char **);
int main(int argc, char **argv) {
  daemon(1, 1);
  execv(argv[1], argv + 1);
  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    $0x1,%esi
mov    %esi,%edi
call   1030 <daemon@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x10(%rbp),%rsi
add    $0x8,%rsi
call   1040 <execv@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %rsi,%rbx
mov    $0x1,%edi
mov    $0x1,%esi
call   1030 <daemon@plt>
mov    0x8(%rbx),%rdi
add    $0x8,%rbx
mov    %rbx,%rsi
call   1040 <execv@plt>
xor    %eax,%eax
pop    %rbx
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 @daemon(i32 1, i32 1)
%7 = load i8**, i8*** %5
%8 = getelementptr inbounds i8*, i8** %7, i64 1
%9 = load i8*, i8** %8
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i64 1
%12 = call i32 @execv(i8* %9, i8** %11)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @daemon(i32 1, i32 1)
%4 = getelementptr inbounds i8*, i8** %1, i64 1
%5 = load i8*, i8** %4
%6 = tail call i32 @execv(i8* %5, i8** %4)
ret i32 0
}
/* Variables and functions */
double fabs(float);
double f(float f) {
  double t1 = fabs(f);
  double t2 = f / t1;
  return t2;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <fabs@plt>
movsd  %xmm0,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
divsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %rax
movss  %xmm0,0x4(%rsp)
call   1030 <fabs@plt>
movss  0x4(%rsp),%xmm1
cvtss2sd %xmm1,%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @f(float %0) {
%2 = alloca float
%3 = alloca double
%4 = alloca double
store float %0, float* %2
%5 = load float, float* %2
%6 = call double @fabs(float %5)
store double %6, double* %3
%7 = load float, float* %2
%8 = fpext float %7 to double
%9 = load double, double* %3
%10 = fdiv double %8, %9
store double %10, double* %4
%11 = load double, double* %4
ret double %11
}

LLVM IR (-O2):
define double @f(float %0) {
%2 = tail call double @fabs(float %0)
%3 = fpext float %0 to double
%4 = fdiv double %3, %2
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, unsigned long);
void *malloc(size_t);
int /*<<< orphan*/ stderr;
void *mlr_malloc_or_die(size_t size) {
  void *p = malloc(size);
  if (p == NULL) {
    fprintf(stderr, "malloc(%lu) failed.\n", (unsigned long)size);
    exit(1);
  }
  return p;
}


x86 assembly (clang, -O0):
<mlr_malloc_or_die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1177 <mlr_malloc_or_die+0x47>
mov    0x2e85(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xe98(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mlr_malloc_or_die>:
push   %rbx
mov    %rdi,%rbx
call   1040 <malloc@plt>
test   %rax,%rax
je     1140 <mlr_malloc_or_die+0x10>
pop    %rbx
ret
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
lea    0xeb0(%rip),%rsi
mov    %rbx,%rdx
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [21 x i8] c"malloc(%lu) failed.\0A\00"
define i8* @mlr_malloc_or_die(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %13
8: ; preds = %1
%9 = load i32, i32* @stderr
%10 = load i64, i64* %2
%11 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i64 %10)
%12 = call i32 @exit(i32 1)
unreachable
13: ; preds = %1
%14 = load i8*, i8** %3
ret i8* %14
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [21 x i8] c"malloc(%lu) failed.\0A\00"
define noalias i8* @mlr_malloc_or_die(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i64 %0)
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %1
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int a, b;
  b = 3;
  a = b;
  b = b * 2;
  printf("a=%d \n", a);
  printf("b=%d \n", b);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [7 x i8] c"a=%d \0A\00"
@.str.1 = [7 x i8] c"b=%d \0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 3)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 6)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int uint16_t;

/* Variables and functions */
int /*<<< orphan*/ m231SetPrgROMBank(int);
int /*<<< orphan*/ ppuSetNameTblHorizontal();
int /*<<< orphan*/ ppuSetNameTblVertical();
void m231_setParams(uint16_t addr, uint8_t val) {
  (void)val;
  m231SetPrgROMBank(((addr & 0x1E) | ((addr >> 5) & 1)) << 14);
  if ((addr & 0x80) != 0)
    ppuSetNameTblHorizontal();
  else
    ppuSetNameTblVertical();
}


x86 assembly (clang, -O0):
<m231_setParams>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
and    $0x1e,%edi
mov    -0x4(%rbp),%eax
sar    $0x5,%eax
and    $0x1,%eax
or     %eax,%edi
shl    $0xe,%edi
call   1030 <m231SetPrgROMBank@plt>
mov    -0x4(%rbp),%eax
and    $0x80,%eax
cmp    $0x0,%eax
je     1174 <m231_setParams+0x44>
mov    $0x0,%al
call   1040 <ppuSetNameTblHorizontal@plt>
jmp    117b <m231_setParams+0x4b>
mov    $0x0,%al
call   1050 <ppuSetNameTblVertical@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m231_setParams>:
push   %rbx
mov    %edi,%ebx
mov    %edi,%eax
and    $0x1e,%eax
shr    $0x5,%edi
and    $0x1,%edi
or     %eax,%edi
shl    $0xe,%edi
call   1030 <m231SetPrgROMBank@plt>
xor    %eax,%eax
test   $0x80,%bl
jne    1155 <m231_setParams+0x25>
pop    %rbx
jmp    1050 <ppuSetNameTblVertical@plt>
pop    %rbx
jmp    1040 <ppuSetNameTblHorizontal@plt>

LLVM IR (-O0):
define void @m231_setParams(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32, i32* %3
%7 = and i32 %6, 30
%8 = load i32, i32* %3
%9 = ashr i32 %8, 5
%10 = and i32 %9, 1
%11 = or i32 %7, %10
%12 = shl i32 %11, 14
%13 = call i32 @m231SetPrgROMBank(i32 %12)
%14 = load i32, i32* %3
%15 = and i32 %14, 128
%16 = icmp ne i32 %15, 0
br i1 %16, label %17, label %19
17: ; preds = %2
%18 = call i32 (...) @ppuSetNameTblHorizontal()
br label %21
19: ; preds = %2
%20 = call i32 (...) @ppuSetNameTblVertical()
br label %21
21: ; preds = %19, %17
ret void
}

LLVM IR (-O2):
define void @m231_setParams(i32 %0, i32 %1) {
%3 = and i32 %0, 30
%4 = lshr i32 %0, 5
%5 = and i32 %4, 1
%6 = or i32 %5, %3
%7 = shl nuw nsw i32 %6, 14
%8 = tail call i32 @m231SetPrgROMBank(i32 %7)
%9 = and i32 %0, 128
%10 = icmp eq i32 %9, 0
br i1 %10, label %13, label %11
11: ; preds = %2
%12 = tail call i32 (...) @ppuSetNameTblHorizontal()
br label %15
13: ; preds = %2
%14 = tail call i32 (...) @ppuSetNameTblVertical()
br label %15
15: ; preds = %13, %11
ret void
}
void ASN1_OBJECT_new(void) {}


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

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

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

LLVM IR (-O2):
define void @ASN1_OBJECT_new() {
ret void
}
int encrypt_block(int keytype, const unsigned char *IV,
                  const unsigned char *key, const unsigned char *src,
                  unsigned int srclen, unsigned char *dest,
                  unsigned int *destlen) {
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @encrypt_block(i32 %0, i8* nocapture readnone %1, i8* nocapture readnone %2, i8* nocapture readnone %3, i32 %4, i8* nocapture readnone %5, i32* nocapture readnone %6) {
ret i32 0
}
/* Type definitions */
struct io_type_infos {
  int dummy;
};
struct fat_header {
  int dummy;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
void write_sect(FILE *fat_file, struct fat_header *h,
                struct io_type_infos *io_infos) {}


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

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

LLVM IR (-O0):
%struct.fat_header = type { i32 }
%struct.io_type_infos = type { i32 }
define void @write_sect(i32* %0, %struct.fat_header* %1, %struct.io_type_infos* %2) {
%4 = alloca i32*
%5 = alloca %struct.fat_header*
%6 = alloca %struct.io_type_infos*
store i32* %0, i32** %4
store %struct.fat_header* %1, %struct.fat_header** %5
store %struct.io_type_infos* %2, %struct.io_type_infos** %6
ret void
}

LLVM IR (-O2):
%struct.fat_header = type { i32 }
%struct.io_type_infos = type { i32 }
define void @write_sect(i32* nocapture %0, %struct.fat_header* nocapture %1, %struct.io_type_infos* nocapture %2) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ testerAjout1();
int /*<<< orphan*/ testerAjout2();
int /*<<< orphan*/ testerCreation();
int /*<<< orphan*/ testerNombre();
int /*<<< orphan*/ testerRetrait1();
int /*<<< orphan*/ testerRetrait2();
void pile_runTests() {
  testerCreation();
  testerAjout1();
  testerAjout2();
  testerRetrait1();
  testerRetrait2();
  testerNombre();
}


x86 assembly (clang, -O0):
<pile_runTests>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1060 <testerCreation@plt>
mov    $0x0,%al
call   1070 <testerAjout1@plt>
mov    $0x0,%al
call   1030 <testerAjout2@plt>
mov    $0x0,%al
call   1040 <testerRetrait1@plt>
mov    $0x0,%al
call   1080 <testerRetrait2@plt>
mov    $0x0,%al
call   1050 <testerNombre@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pile_runTests>:
push   %rax
xor    %eax,%eax
call   1060 <testerCreation@plt>
xor    %eax,%eax
call   1070 <testerAjout1@plt>
xor    %eax,%eax
call   1030 <testerAjout2@plt>
xor    %eax,%eax
call   1040 <testerRetrait1@plt>
xor    %eax,%eax
call   1080 <testerRetrait2@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <testerNombre@plt>

LLVM IR (-O0):
define void @pile_runTests() {
%1 = call i32 (...) @testerCreation()
%2 = call i32 (...) @testerAjout1()
%3 = call i32 (...) @testerAjout2()
%4 = call i32 (...) @testerRetrait1()
%5 = call i32 (...) @testerRetrait2()
%6 = call i32 (...) @testerNombre()
ret void
}

LLVM IR (-O2):
define void @pile_runTests() {
%1 = tail call i32 (...) @testerCreation()
%2 = tail call i32 (...) @testerAjout1()
%3 = tail call i32 (...) @testerAjout2()
%4 = tail call i32 (...) @testerRetrait1()
%5 = tail call i32 (...) @testerRetrait2()
%6 = tail call i32 (...) @testerNombre()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ decHex(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int num;
  printf("Introduzca un valor decimal:");
  scanf("%d", &num);
  decHex(num);
  printf("\n");
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1050 <printf@plt>
lea    0xec9(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1060 <scanf@plt>
mov    0x4(%rsp),%edi
call   1040 <decHex@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [29 x i8] c"Introduzca un valor decimal:\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @decHex(i32 %5)
%7 = call i32 @putchar(i32 10)
ret i32 0
}
void ce_read(void) {}


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

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

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

LLVM IR (-O2):
define void @ce_read() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ nat64_is_stateful();
int nat64_is_stateless(void) { return !nat64_is_stateful(); }


x86 assembly (clang, -O0):
<nat64_is_stateless>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <nat64_is_stateful@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nat64_is_stateless>:
push   %rax
xor    %eax,%eax
call   1030 <nat64_is_stateful@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @nat64_is_stateless() {
%1 = call i32 (...) @nat64_is_stateful()
%2 = icmp ne i32 %1, 0
%3 = xor i1 %2, true
%4 = zext i1 %3 to i32
ret i32 %4
}

LLVM IR (-O2):
define i32 @nat64_is_stateless() {
%1 = tail call i32 (...) @nat64_is_stateful()
%2 = icmp eq i32 %1, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
void imx6q_cpuidle_fec_irqs_used(void) {}


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

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

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

LLVM IR (-O2):
define void @imx6q_cpuidle_fec_irqs_used() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ run_pilot();
int main(int argc, char *argv[]) {
  run_pilot();
  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    $0x0,%al
call   1030 <run_pilot@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <run_pilot@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 (...) @run_pilot()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @run_pilot()
ret i32 0
}
void sys_close_midi(void) {}


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

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

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

LLVM IR (-O2):
define void @sys_close_midi() {
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
uint8_t complementBit_fun_uint8_t(uint8_t x, uint32_t i) { return x ^ 1 << i; }


x86 assembly (clang, -O0):
<complementBit_fun_uint8_t>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
xor    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<complementBit_fun_uint8_t>:
mov    %edi,%eax
btc    %esi,%eax
ret

LLVM IR (-O0):
define i32 @complementBit_fun_uint8_t(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 = shl i32 1, %6
%8 = xor i32 %5, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @complementBit_fun_uint8_t(i32 %0, i32 %1) {
%3 = shl nuw i32 1, %1
%4 = xor i32 %3, %0
ret i32 %4
}
/* Type definitions */
struct UPnPService {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, char *);
void MSCP_ResponseSink_ContentDirectory_GetSearchCapabilities(
    struct UPnPService *Service, int ErrorCode, void *User, char *SearchCaps) {
  printf("MSCP_ Invoke Response: "
         "ContentDirectory/GetSearchCapabilities[ErrorCode:%d](%s)\r\n",
         ErrorCode, SearchCaps);
}


x86 assembly (clang, -O0):
<MSCP_ResponseSink_ContentDirectory_GetSearchCapabilities>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0xc(%rbp),%esi
mov    -0x20(%rbp),%rdx
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.UPnPService = type { i32 }
@.str = [82 x i8] c"MSCP_ Invoke Response: ContentDirectory/GetSearchCapabilities[ErrorCode:%d](%s)\0D\0A\00"
define void @MSCP_ResponseSink_ContentDirectory_GetSearchCapabilities(%struct.UPnPService* %0, i32 %1, i8* %2, i8* %3) {
%5 = alloca %struct.UPnPService*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
store %struct.UPnPService* %0, %struct.UPnPService** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i32, i32* %6
%10 = load i8*, i8** %8
%11 = call i32 @printf(i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str, i64 0, i64 0), i32 %9, i8* %10)
ret void
}

LLVM IR (-O2):
%struct.UPnPService = type { i32 }
@.str = [82 x i8] c"MSCP_ Invoke Response: ContentDirectory/GetSearchCapabilities[ErrorCode:%d](%s)\0D\0A\00"
define void @MSCP_ResponseSink_ContentDirectory_GetSearchCapabilities(%struct.UPnPService* nocapture readnone %0, i32 %1, i8* nocapture readnone %2, i8* %3) {
%5 = tail call i32 @printf(i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str, i64 0, i64 0), i32 %1, i8* %3)
ret void
}
/* Forward declarations */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
typedef int /*<<< orphan*/ xcb_intern_atom_reply_t;
struct TYPE_3__ {
  int /*<<< orphan*/ sequence;
};
typedef TYPE_1__ xcb_intern_atom_cookie_t;
typedef int /*<<< orphan*/ xcb_generic_error_t;
typedef int /*<<< orphan*/ xcb_connection_t;

/* Variables and functions */
scalar_t__ __xcb_wait_for_event_timeo(int /*<<< orphan*/ *, int /*<<< orphan*/,
                                      int /*<<< orphan*/ **, int);
xcb_intern_atom_reply_t *
xcb_intern_atom_reply_timeo(xcb_connection_t *c,
                            xcb_intern_atom_cookie_t cookie,
                            xcb_generic_error_t **e) {
  return (xcb_intern_atom_reply_t *)__xcb_wait_for_event_timeo(
      c, cookie.sequence, e, 50);
}


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

x86 assembly (clang, -O2):
<xcb_intern_atom_reply_timeo>:
mov    $0x32,%ecx
jmp    1030 <__xcb_wait_for_event_timeo@plt>

LLVM IR (-O0):
%struct.TYPE_3__ = type { i32 }
define i32* @xcb_intern_atom_reply_timeo(i32* %0, i32 %1, i32** %2) {
%4 = alloca %struct.TYPE_3__
%5 = alloca i32*
%6 = alloca i32**
%7 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %4, i32 0, i32 0
store i32 %1, i32* %7
store i32* %0, i32** %5
store i32** %2, i32*** %6
%8 = load i32*, i32** %5
%9 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %4, i32 0, i32 0
%10 = load i32, i32* %9
%11 = load i32**, i32*** %6
%12 = call i64 @__xcb_wait_for_event_timeo(i32* %8, i32 %10, i32** %11, i32 50)
%13 = inttoptr i64 %12 to i32*
ret i32* %13
}

LLVM IR (-O2):
define i32* @xcb_intern_atom_reply_timeo(i32* %0, i32 %1, i32** %2) {
%4 = tail call i64 @__xcb_wait_for_event_timeo(i32* %0, i32 %1, i32** %2, i32 50)
%5 = inttoptr i64 %4 to i32*
ret i32* %5
}
void gdk_rgb_cmap_new() {}


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

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

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

LLVM IR (-O2):
define void @gdk_rgb_cmap_new() {
ret void
}
/* Variables and functions */
int atoi(char *);
int startClient(char *, int, char *);
int main(int argc, char *argv[]) {
  int port;
  if (argc < 4)
    return 1;
  port = atoi(argv[2]);
  return startClient(argv[1], port, argv[3]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x4,-0x8(%rbp)
jge    114c <main+0x2c>
movl   $0x1,-0x4(%rbp)
jmp    1177 <main+0x57>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1030 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdx
call   1040 <startClient@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
cmp    $0x4,%edi
jge    112b <main+0xb>
mov    $0x1,%eax
ret
push   %rbx
mov    %rsi,%rbx
mov    0x10(%rsi),%rdi
call   1030 <atoi@plt>
mov    0x8(%rbx),%rdi
mov    0x18(%rbx),%rdx
mov    %eax,%esi
pop    %rbx
jmp    1040 <startClient@plt>

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 4
br i1 %3, label %13, label %4
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 2
%6 = load i8*, i8** %5
%7 = tail call i32 @atoi(i8* %6)
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
%10 = getelementptr inbounds i8*, i8** %1, i64 3
%11 = load i8*, i8** %10
%12 = tail call i32 @startClient(i8* %9, i32 %7, i8* %11)
br label %13
13: ; preds = %2, %4
%14 = phi i32 [ %12, %4 ], [ 1, %2 ]
ret i32 %14
}
int rcu_preempt_pending(int cpu) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @rcu_preempt_pending(i32 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void print_version(void) {
  fprintf(stderr, "/***********************************************/\n"
                  " *   Kvazaar HEVC Encoder v. "
                  "0.7.1"
                  "             *\n"
                  " *     Tampere University of Technology 2015   *\n"
                  "/***********************************************/\n\n");
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [200 x i8] c"/***********************************************/\0A * Kvazaar HEVC Encoder v. 0.7.1 *\0A * Tampere University of Technology 2015 *\0A/***********************************************/\0A\0A\00"
define void @print_version() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([200 x i8], [200 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [200 x i8] c"/***********************************************/\0A * Kvazaar HEVC Encoder v. 0.7.1 *\0A * Tampere University of Technology 2015 *\0A/***********************************************/\0A\0A\00"
define void @print_version() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([200 x i8], [200 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ uri_reserved(int);
scalar_t__ uri_unreserved(int);
int uri_uric(int c) { return uri_unreserved(c) || uri_reserved(c); }


x86 assembly (clang, -O0):
<uri_uric>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <uri_unreserved@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
jne    1157 <uri_uric+0x37>
mov    -0x4(%rbp),%edi
call   1030 <uri_reserved@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uri_uric>:
push   %rbx
mov    %edi,%ebx
call   1040 <uri_unreserved@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1137 <uri_uric+0x17>
pop    %rbx
ret
mov    %ebx,%edi
call   1030 <uri_reserved@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @uri_uric(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @uri_unreserved(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i32, i32* %2
%8 = call i64 @uri_reserved(i32 %7)
%9 = icmp ne i64 %8, 0
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @uri_uric(i32 %0) {
%2 = tail call i64 @uri_unreserved(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i64 @uri_reserved(i32 %0)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
void _Z80SimProtectedCodeBegins(void) {}


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

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

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

LLVM IR (-O2):
define void @_Z80SimProtectedCodeBegins() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ int8_t;
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int8_t stdlib_ndarray_get_ptr_int32(const uint8_t *idx, int32_t *out) {
  *out = *(int32_t *)idx;
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @stdlib_ndarray_get_ptr_int32(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* %5
%7 = load i32*, i32** %4
store i32 %6, i32* %7
ret i32 0
}

LLVM IR (-O2):
define i32 @stdlib_ndarray_get_ptr_int32(i32* nocapture %0, i32* nocapture writeonly %1) {
%3 = load i32, i32* %0
store i32 %3, i32* %1
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, long);
int wypisz(long int *tab, int dlug) {
  for (int i = 0; i < dlug; ++i) {
    printf("%li\n", tab[i]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<wypisz>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1158 <wypisz+0x48>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <wypisz+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wypisz>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1145 <wypisz+0x35>
mov    %rdi,%r15
mov    %esi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,8),%rsi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <wypisz+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%li\0A\00"
define i32 @wypisz(i64* %0, i32 %1) {
%3 = alloca i64*
%4 = alloca i32
%5 = alloca i32
store i64* %0, i64** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %17, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %20
10: ; preds = %6
%11 = load i64*, i64** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i64, i64* %11, i64 %13
%15 = load i64, i64* %14
%16 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 %15)
br label %17
17: ; preds = %10
%18 = load i32, i32* %5
%19 = add nsw i32 %18, 1
store i32 %19, i32* %5
br label %6
20: ; preds = %6
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%li\0A\00"
define i32 @wypisz(i64* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %7
6: ; preds = %7, %2
ret i32 0
7: ; preds = %4, %7
%8 = phi i64 [ 0, %4 ], [ %12, %7 ]
%9 = getelementptr inbounds i64, i64* %0, i64 %8
%10 = load i64, i64* %9
%11 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 %10)
%12 = add nuw nsw i64 %8, 1
%13 = icmp eq i64 %12, %5
br i1 %13, label %6, label %7
}
int PDC_get_rows() {}


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

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

LLVM IR (-O0):
define i32 @PDC_get_rows() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @PDC_get_rows() {
ret i32 undef
}
/* Variables and functions */
int EINVAL;
int sysfs_get_freq_hardware_limits(unsigned int, unsigned long *,
                                   unsigned long *);
int cpufreq_get_hardware_limits(unsigned int cpu, unsigned long *min,
                                unsigned long *max) {
  if ((!min) || (!max))
    return -EINVAL;
  return sysfs_get_freq_hardware_limits(cpu, min, max);
}


x86 assembly (clang, -O0):
<cpufreq_get_hardware_limits>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1139 <cpufreq_get_hardware_limits+0x29>
cmpq   $0x0,-0x18(%rbp)
jne    114c <cpufreq_get_hardware_limits+0x3c>
xor    %eax,%eax
mov    0x2e9e(%rip),%rcx
sub    (%rcx),%eax
mov    %eax,-0x4(%rbp)
jmp    115f <cpufreq_get_hardware_limits+0x4f>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <sysfs_get_freq_hardware_limits@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpufreq_get_hardware_limits>:
test   %rsi,%rsi
je     111f <cpufreq_get_hardware_limits+0xf>
test   %rdx,%rdx
je     111f <cpufreq_get_hardware_limits+0xf>
jmp    1030 <sysfs_get_freq_hardware_limits@plt>
mov    0x2eba(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@EINVAL = global i32 0
define i32 @cpufreq_get_hardware_limits(i32 %0, i64* %1, i64* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i64*
%7 = alloca i64*
store i32 %0, i32* %5
store i64* %1, i64** %6
store i64* %2, i64** %7
%8 = load i64*, i64** %6
%9 = icmp ne i64* %8, null
br i1 %9, label %10, label %13
10: ; preds = %3
%11 = load i64*, i64** %7
%12 = icmp ne i64* %11, null
br i1 %12, label %16, label %13
13: ; preds = %10, %3
%14 = load i32, i32* @EINVAL
%15 = sub nsw i32 0, %14
store i32 %15, i32* %4
br label %21
16: ; preds = %10
%17 = load i32, i32* %5
%18 = load i64*, i64** %6
%19 = load i64*, i64** %7
%20 = call i32 @sysfs_get_freq_hardware_limits(i32 %17, i64* %18, i64* %19)
store i32 %20, i32* %4
br label %21
21: ; preds = %16, %13
%22 = load i32, i32* %4
ret i32 %22
}

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @cpufreq_get_hardware_limits(i32 %0, i64* %1, i64* %2) {
%4 = icmp ne i64* %1, null
%5 = icmp ne i64* %2, null
%6 = and i1 %4, %5
br i1 %6, label %10, label %7
7: ; preds = %3
%8 = load i32, i32* @EINVAL
%9 = sub nsw i32 0, %8
br label %12
10: ; preds = %3
%11 = tail call i32 @sysfs_get_freq_hardware_limits(i32 %0, i64* %1, i64* %2)
br label %12
12: ; preds = %10, %7
%13 = phi i32 [ %11, %10 ], [ %9, %7 ]
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ qsort(void *, size_t, size_t,
                         int (*)(void const *, void const *));
void LibTomQsort(void *base, size_t nmemb, size_t size,
                 int (*compar)(const void *, const void *)) {
  qsort(base, nmemb, size, compar);
}


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

x86 assembly (clang, -O2):
<LibTomQsort>:
jmp    1030 <qsort@plt>

LLVM IR (-O0):
define void @LibTomQsort(i8* %0, i64 %1, i64 %2, i32 (i8*, i8*)* %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
%8 = alloca i32 (i8*, i8*)*
store i8* %0, i8** %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i32 (i8*, i8*)* %3, i32 (i8*, i8*)** %8
%9 = load i8*, i8** %5
%10 = load i64, i64* %6
%11 = load i64, i64* %7
%12 = load i32 (i8*, i8*)*, i32 (i8*, i8*)** %8
%13 = call i32 @qsort(i8* %9, i64 %10, i64 %11, i32 (i8*, i8*)* %12)
ret void
}

LLVM IR (-O2):
define void @LibTomQsort(i8* %0, i64 %1, i64 %2, i32 (i8*, i8*)* nocapture %3) {
%5 = tail call i32 @qsort(i8* %0, i64 %1, i64 %2, i32 (i8*, i8*)* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test(int *, int);
int main(void) {
  int list[6] = {-1, -2, -3, -4, -5, -4};
  test(list, 6);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0xee1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xede(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xedb(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    -0x20(%rbp),%rdi
mov    $0x6,%esi
call   1030 <test@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
mov    0xef5(%rip),%rax
mov    %rax,0x10(%rsp)
movaps 0xed9(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x6,%esi
call   1030 <test@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.list = [6 x i32] [i32 -1, i32 -2, i32 -3, i32 -4, i32 -5, i32 -4]
define i32 @main() {
%1 = alloca [6 x i32]
%2 = bitcast [6 x i32]* %1 to i8*
%3 = getelementptr inbounds [6 x i32], [6 x i32]* %1, i64 0, i64 0
%4 = call i32 @test(i32* %3, i32 6)
ret i32 0
}

LLVM IR (-O2):
@__const.main.list = [6 x i32] [i32 -1, i32 -2, i32 -3, i32 -4, i32 -5, i32 -4]
define i32 @main() {
%1 = alloca [6 x i32]
%2 = bitcast [6 x i32]* %1 to i8*
%3 = getelementptr inbounds [6 x i32], [6 x i32]* %1, i64 0, i64 0
%4 = call i32 @test(i32* %3, i32 6)
ret i32 0
}
void *threadFun3(void *arg) {
  while (1) {
    sleep(15);
    printf(" %s\n", arg);
  }
}


x86 assembly (clang, -O0):
<threadFun3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0xf,%edi
mov    $0x0,%al
call   1040 <sleep@plt>
mov    -0x8(%rbp),%rsi
lea    0xebd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    112c <threadFun3+0xc>

x86 assembly (clang, -O2):
<threadFun3>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0xed2(%rip),%r14
xchg   %ax,%ax
mov    $0xf,%edi
xor    %eax,%eax
call   1040 <sleep@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
jmp    1130 <threadFun3+0x10>

LLVM IR (-O0):
@.str = [5 x i8] c" %s\0A\00"
define i8* @threadFun3(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %1, %3
%4 = call i32 (i32, ...) bitcast (i32 (...)* @sleep to i32 (i32, ...)*)(i32 15)
%5 = load i8*, i8** %2
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %5)
br label %3
}

LLVM IR (-O2):
@.str = [5 x i8] c" %s\0A\00"
define i8* @threadFun3(i8* %0) {
br label %2
2: ; preds = %1, %2
%3 = tail call i32 (i32, ...) bitcast (i32 (...)* @sleep to i32 (i32, ...)*)(i32 15)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %2
}