xunge/DecIR huggingface dataset:
void termop_index(struct ansiseq *s) {
  tnc_log_log(
      7, 4, -1,
      "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
      "2022-01-22/02-19-57/repos/fstd/telnetcat/refs/heads/devel/src/xterm.c",
      331, __func__, "unhandled");
  ansiseq_dump(s);
}


x86 assembly (clang, -O0):
<termop_index>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x7,%edi
mov    $0x4,%esi
mov    $0xffffffff,%edx
lea    0xebe(%rip),%rcx
mov    $0x14b,%r8d
lea    0xf37(%rip),%r9
lea    0xf3d(%rip),%rax
mov    %rax,(%rsp)
mov    $0x0,%al
call   1030 <tnc_log_log@plt>
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1040 <ansiseq_dump@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<termop_index>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
lea    0xf64(%rip),%rax
mov    %rax,(%rsp)
lea    0xec6(%rip),%rcx
lea    0xf45(%rip),%r9
mov    $0x7,%edi
mov    $0x4,%esi
mov    $0xffffffff,%edx
mov    $0x14b,%r8d
xor    %eax,%eax
call   1030 <tnc_log_log@plt>
mov    %rbx,%rdi
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
jmp    1040 <ansiseq_dump@plt>

LLVM IR (-O0):
%struct.ansiseq = type opaque
@.str = [134 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/fstd/telnetcat/refs/heads/devel/src/xterm.c\00"
@__func__.termop_index = [13 x i8] c"termop_index\00"
@.str.1 = [10 x i8] c"unhandled\00"
define void @termop_index(%struct.ansiseq* %0) {
%2 = alloca %struct.ansiseq*
store %struct.ansiseq* %0, %struct.ansiseq** %2
%3 = call i32 (i32, i32, i32, i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @tnc_log_log to i32 (i32, i32, i32, i8*, i32, i8*, i8*, ...)*)(i32 7, i32 4, i32 -1, i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str, i64 0, i64 0), i32 331, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @__func__.termop_index, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%4 = load %struct.ansiseq*, %struct.ansiseq** %2
%5 = call i32 (%struct.ansiseq*, ...) bitcast (i32 (...)* @ansiseq_dump to i32 (%struct.ansiseq*, ...)*)(%struct.ansiseq* %4)
ret void
}

LLVM IR (-O2):
%struct.ansiseq = type opaque
@.str = [134 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/fstd/telnetcat/refs/heads/devel/src/xterm.c\00"
@__func__.termop_index = [13 x i8] c"termop_index\00"
@.str.1 = [10 x i8] c"unhandled\00"
define void @termop_index(%struct.ansiseq* %0) {
%2 = tail call i32 (i32, i32, i32, i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @tnc_log_log to i32 (i32, i32, i32, i8*, i32, i8*, i8*, ...)*)(i32 7, i32 4, i32 -1, i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str, i64 0, i64 0), i32 331, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @__func__.termop_index, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 (%struct.ansiseq*, ...) bitcast (i32 (...)* @ansiseq_dump to i32 (%struct.ansiseq*, ...)*)(%struct.ansiseq* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ example1();
int /*<<< orphan*/ example2();
int /*<<< orphan*/ example3();
int /*<<< orphan*/ example4();
int /*<<< orphan*/ example5();
int /*<<< orphan*/ example6();
int /*<<< orphan*/ example7();
int main(void) {
  example1();
  example2();
  example3();
  example4();
  example5();
  example6();
  example7();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1080 <example1@plt>
mov    $0x0,%al
call   1050 <example2@plt>
mov    $0x0,%al
call   1090 <example3@plt>
mov    $0x0,%al
call   1030 <example4@plt>
mov    $0x0,%al
call   1060 <example5@plt>
mov    $0x0,%al
call   1040 <example6@plt>
mov    $0x0,%al
call   1070 <example7@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1080 <example1@plt>
xor    %eax,%eax
call   1050 <example2@plt>
xor    %eax,%eax
call   1090 <example3@plt>
xor    %eax,%eax
call   1030 <example4@plt>
xor    %eax,%eax
call   1060 <example5@plt>
xor    %eax,%eax
call   1040 <example6@plt>
xor    %eax,%eax
call   1070 <example7@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @example1()
%3 = call i32 (...) @example2()
%4 = call i32 (...) @example3()
%5 = call i32 (...) @example4()
%6 = call i32 (...) @example5()
%7 = call i32 (...) @example6()
%8 = call i32 (...) @example7()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @example1()
%2 = tail call i32 (...) @example2()
%3 = tail call i32 (...) @example3()
%4 = tail call i32 (...) @example4()
%5 = tail call i32 (...) @example5()
%6 = tail call i32 (...) @example6()
%7 = tail call i32 (...) @example7()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ Display;

/* Variables and functions */
int /*<<< orphan*/ coords(int /*<<< orphan*/ *, int *, int *);
int /*<<< orphan*/ move(int /*<<< orphan*/ *, int, int);
void moveReset(Display *display) {
  int xTmp = 0, yTmp = 0;
  coords(display, &xTmp, &yTmp);
  move(display, -xTmp, -yTmp);
}


x86 assembly (clang, -O0):
<moveReset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
lea    -0x10(%rbp),%rdx
call   1030 <coords@plt>
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
sub    -0xc(%rbp),%esi
xor    %edx,%edx
sub    -0x10(%rbp),%edx
call   1040 <move@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<moveReset>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
movl   $0x0,0xc(%rsp)
movl   $0x0,0x8(%rsp)
lea    0xc(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1030 <coords@plt>
xor    %edx,%edx
xor    %esi,%esi
sub    0xc(%rsp),%esi
sub    0x8(%rsp),%edx
mov    %rbx,%rdi
call   1040 <move@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @moveReset(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
store i32* %0, i32** %2
store i32 0, i32* %3
store i32 0, i32* %4
%5 = load i32*, i32** %2
%6 = call i32 @coords(i32* %5, i32* %3, i32* %4)
%7 = load i32*, i32** %2
%8 = load i32, i32* %3
%9 = sub nsw i32 0, %8
%10 = load i32, i32* %4
%11 = sub nsw i32 0, %10
%12 = call i32 @move(i32* %7, i32 %9, i32 %11)
ret void
}

LLVM IR (-O2):
define void @moveReset(i32* %0) {
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%5 = bitcast i32* %3 to i8*
store i32 0, i32* %3
%6 = call i32 @coords(i32* %0, i32* %2, i32* %3)
%7 = load i32, i32* %2
%8 = sub nsw i32 0, %7
%9 = load i32, i32* %3
%10 = sub nsw i32 0, %9
%11 = call i32 @move(i32* %0, i32 %8, i32 %10)
ret void
}
void fa181(void) {
P0A:
  goto P0A;
  ({
    P01A:
      goto P01A;
      ({
        P012A:
          goto P012A;
          0;
      });
    P01B:
      goto P01B;
      ({
        P013A:
          goto P013A;
          0;
      });
    P01C:
      goto P01C;
      0;
  });
P0B:
  goto P0B;
  ({
    P02A:
      goto P02A;
      ({
        P024A:
          goto P024A;
          0;
      });
    P02B:
      goto P02B;
      ({
        P025A:
          goto P025A;
          0;
      });
    P02C:
      goto P02C;
      0;
  });
a:
  goto a;
P0C:
  goto P0C;
  0;
P0D:
  goto P0D;
}


x86 assembly (clang, -O0):
<fa181>:
push   %rbp
mov    %rsp,%rbp
jmp    1104 <fa181+0x4>

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

LLVM IR (-O0):
define void @fa181() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
br label %7
7: ; preds = %7, %0
br label %7
8: ; No predecessors!
br label %9
9: ; preds = %9, %8
br label %9
10: ; No predecessors!
br label %11
11: ; preds = %11, %10
br label %11
12: ; preds = %12
br label %12
13: ; No predecessors!
br label %14
14: ; preds = %14, %13
br label %14
15: ; preds = %15
br label %15
16: ; preds = %16
br label %16
17: ; No predecessors!
br label %18
18: ; preds = %18, %17
br label %18
19: ; No predecessors!
br label %20
20: ; preds = %20, %19
br label %20
21: ; preds = %21
br label %21
22: ; No predecessors!
br label %23
23: ; preds = %23, %22
br label %23
24: ; preds = %24
br label %24
25: ; preds = %25
br label %25
26: ; preds = %26
br label %26
27: ; preds = %27
br label %27
}

LLVM IR (-O2):
define void @fa181() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
size_t strncpy_from_user(char *addr, const char *user_name, size_t size) {
  assert(0);
}


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

x86 assembly (clang, -O2):
<strncpy_from_user>:
xor    %edi,%edi
jmp    1030 <assert@plt>

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

LLVM IR (-O2):
define i64 @strncpy_from_user(i8* nocapture readnone %0, i8* nocapture readnone %1, i64 %2) {
%4 = tail call i32 @assert(i32 0)
ret i64 undef
}
/* Type definitions */
typedef int uint16_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fputc(int, int /*<<< orphan*/ *);
void fput16b(FILE *fp, uint16_t v) {
  fputc((v >> 8), fp);
  fputc((v & 0xff), fp);
}


x86 assembly (clang, -O0):
<fput16b>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
sar    $0x8,%edi
mov    -0x8(%rbp),%rsi
call   1030 <fputc@plt>
mov    -0xc(%rbp),%edi
and    $0xff,%edi
mov    -0x8(%rbp),%rsi
call   1030 <fputc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fput16b>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
mov    %esi,%edi
sar    $0x8,%edi
mov    %r14,%rsi
call   1030 <fputc@plt>
movzbl %bl,%edi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <fputc@plt>

LLVM IR (-O0):
define void @fput16b(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 = ashr i32 %5, 8
%7 = load i32*, i32** %3
%8 = call i32 @fputc(i32 %6, i32* %7)
%9 = load i32, i32* %4
%10 = and i32 %9, 255
%11 = load i32*, i32** %3
%12 = call i32 @fputc(i32 %10, i32* %11)
ret void
}

LLVM IR (-O2):
define void @fput16b(i32* nocapture %0, i32 %1) {
%3 = ashr i32 %1, 8
%4 = tail call i32 @fputc(i32 %3, i32* %0)
%5 = and i32 %1, 255
%6 = tail call i32 @fputc(i32 %5, i32* %0)
ret void
}
int Operand_xt_wbr18_label_decode(unsigned int *valp) {
  unsigned xt_wbr18_label_0, xt_wbr18_imm_0;
  xt_wbr18_imm_0 = *valp & 0x3ffff;
  xt_wbr18_label_0 = 0x4 + (((int)xt_wbr18_imm_0 << 14) >> 14);
  *valp = xt_wbr18_label_0;
  return 0;
}


x86 assembly (clang, -O0):
<Operand_xt_wbr18_label_decode>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
and    $0x3ffff,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
shl    $0xe,%eax
sar    $0xe,%eax
add    $0x4,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Operand_xt_wbr18_label_decode>:
mov    (%rdi),%eax
shl    $0xe,%eax
sar    $0xe,%eax
add    $0x4,%eax
mov    %eax,(%rdi)
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @Operand_xt_wbr18_label_decode(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
store i32* %0, i32** %2
%5 = load i32*, i32** %2
%6 = load i32, i32* %5
%7 = and i32 %6, 262143
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = shl i32 %8, 14
%10 = ashr i32 %9, 14
%11 = add nsw i32 4, %10
store i32 %11, i32* %3
%12 = load i32, i32* %3
%13 = load i32*, i32** %2
store i32 %12, i32* %13
ret i32 0
}

LLVM IR (-O2):
define i32 @Operand_xt_wbr18_label_decode(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = shl i32 %2, 14
%4 = ashr exact i32 %3, 14
%5 = add nsw i32 %4, 4
store i32 %5, i32* %0
ret i32 0
}
/* Type definitions */
struct SHA1_CTX {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct SHA1_CTX *);
void SHA1_Free(struct SHA1_CTX **s) {
  if (!s || !*s) {
    return;
  }
  free(*s);
  *s = NULL;
}


x86 assembly (clang, -O0):
<SHA1_Free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1135 <SHA1_Free+0x25>
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
jne    113a <SHA1_Free+0x2a>
jmp    1151 <SHA1_Free+0x41>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SHA1_Free>:
push   %rbx
test   %rdi,%rdi
je     112d <SHA1_Free+0x1d>
mov    %rdi,%rbx
mov    (%rdi),%rdi
test   %rdi,%rdi
je     112d <SHA1_Free+0x1d>
call   1030 <free@plt>
movq   $0x0,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
%struct.SHA1_CTX = type { i32 }
define void @SHA1_Free(%struct.SHA1_CTX** %0) {
%2 = alloca %struct.SHA1_CTX**
store %struct.SHA1_CTX** %0, %struct.SHA1_CTX*** %2
%3 = load %struct.SHA1_CTX**, %struct.SHA1_CTX*** %2
%4 = icmp ne %struct.SHA1_CTX** %3, null
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load %struct.SHA1_CTX**, %struct.SHA1_CTX*** %2
%7 = load %struct.SHA1_CTX*, %struct.SHA1_CTX** %6
%8 = icmp ne %struct.SHA1_CTX* %7, null
br i1 %8, label %10, label %9
9: ; preds = %5, %1
br label %15
10: ; preds = %5
%11 = load %struct.SHA1_CTX**, %struct.SHA1_CTX*** %2
%12 = load %struct.SHA1_CTX*, %struct.SHA1_CTX** %11
%13 = call i32 @free(%struct.SHA1_CTX* %12)
%14 = load %struct.SHA1_CTX**, %struct.SHA1_CTX*** %2
store %struct.SHA1_CTX* null, %struct.SHA1_CTX** %14
br label %15
15: ; preds = %10, %9
ret void
}

LLVM IR (-O2):
%struct.SHA1_CTX = type { i32 }
define void @SHA1_Free(%struct.SHA1_CTX** %0) {
%2 = icmp eq %struct.SHA1_CTX** %0, null
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = load %struct.SHA1_CTX*, %struct.SHA1_CTX** %0
%5 = icmp eq %struct.SHA1_CTX* %4, null
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @free(%struct.SHA1_CTX* %4)
store %struct.SHA1_CTX* null, %struct.SHA1_CTX** %0
br label %8
8: ; preds = %1, %3, %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ assert(int);
int *malloc(int);
int /*<<< orphan*/ perror(char *);
int main() {
  int *p, *q;
  q = p = malloc(2 * sizeof *p);
  if (!p) {
    perror("malloc()");
    abort();
  }
  *p = 4;
  q++;
  *q = 5;
  assert(*q + *p == 9);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x8,%edi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    117f <main+0x3f>
lea    0xe8d(%rip),%rdi
call   1060 <perror@plt>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x10(%rbp),%rax
movl   $0x4,(%rax)
mov    -0x18(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movl   $0x5,(%rax)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    -0x10(%rbp),%rcx
add    (%rcx),%eax
cmp    $0x9,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x8,%edi
call   1050 <malloc@plt>
test   %rax,%rax
je     115e <main+0x1e>
mov    $0x1,%edi
call   1040 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret
lea    0xe9b(%rip),%rdi
call   1060 <perror@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"malloc()\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i32*
store i32 0, i32* %1
%4 = call i32* @malloc(i32 8)
store i32* %4, i32** %2
store i32* %4, i32** %3
%5 = load i32*, i32** %2
%6 = icmp ne i32* %5, null
br i1 %6, label %10, label %7
7: ; preds = %0
%8 = call i32 @perror(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%9 = call i32 (...) @abort()
unreachable
10: ; preds = %0
%11 = load i32*, i32** %2
store i32 4, i32* %11
%12 = load i32*, i32** %3
%13 = getelementptr inbounds i32, i32* %12, i32 1
store i32* %13, i32** %3
%14 = load i32*, i32** %3
store i32 5, i32* %14
%15 = load i32*, i32** %3
%16 = load i32, i32* %15
%17 = load i32*, i32** %2
%18 = load i32, i32* %17
%19 = add nsw i32 %16, %18
%20 = icmp eq i32 %19, 9
%21 = zext i1 %20 to i32
%22 = call i32 @assert(i32 %21)
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"malloc()\00"
define i32 @main() {
%1 = tail call i32* @malloc(i32 8)
%2 = icmp eq i32* %1, null
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = tail call i32 @perror(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 (...) @abort()
unreachable
6: ; preds = %0
%7 = tail call i32 @assert(i32 1)
ret i32 0
}
/* Variables and functions */
float powf(float, float);
float db2lin(float db) {
  if (db <= -200.0f)
    return 0.0f;
  else {
    return powf(10.0f, db * 0.05f);
  }
}


x86 assembly (clang, -O0):
<db2lin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x8(%rbp)
movss  0xedb(%rip),%xmm0
ucomiss -0x8(%rbp),%xmm0
jb     113c <db2lin+0x2c>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    115b <db2lin+0x4b>
movss  0xec4(%rip),%xmm1
mulss  -0x8(%rbp),%xmm1
movss  0xeb3(%rip),%xmm0
call   1030 <powf@plt>
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<db2lin>:
movaps %xmm0,%xmm1
movss  0xee5(%rip),%xmm0
ucomiss %xmm1,%xmm0
jae    1135 <db2lin+0x25>
mulss  0xedc(%rip),%xmm1
movss  0xed8(%rip),%xmm0
jmp    1030 <powf@plt>
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @db2lin(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %3
%4 = load float, float* %3
%5 = fcmp ole float %4, -2.000000e+02
br i1 %5, label %6, label %7
6: ; preds = %1
store float 0.000000e+00, float* %2
br label %11
7: ; preds = %1
%8 = load float, float* %3
%9 = fmul float %8, 0x3FA99999A0000000
%10 = call float @powf(float 1.000000e+01, float %9)
store float %10, float* %2
br label %11
11: ; preds = %7, %6
%12 = load float, float* %2
ret float %12
}

LLVM IR (-O2):
define float @db2lin(float %0) {
%2 = fcmp ugt float %0, -2.000000e+02
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = fmul float %0, 0x3FA99999A0000000
%5 = tail call float @powf(float 1.000000e+01, float %4)
br label %6
6: ; preds = %1, %3
%7 = phi float [ %5, %3 ], [ 0.000000e+00, %1 ]
ret float %7
}
int enclave_link() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @enclave_link() {
ret i32 0
}
void BSP_L1DWriteback(void) {
  unsigned long tmp;
  tmp = ({
    unsigned long __v = (*(volatile unsigned long *)(0x01845040));
    __v;
  });
  tmp |= 0x1;
  ({
    unsigned long __v = tmp;
    (*(volatile unsigned long *)(0x01845040) = (__v));
    __v;
  });
}


x86 assembly (clang, -O0):
<BSP_L1DWriteback>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1845040,%eax
mov    (%rax),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
or     $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rcx
mov    $0x1845040,%eax
mov    %rcx,(%rax)
mov    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<BSP_L1DWriteback>:
orq    $0x1,0x1845040
01 01
ret

LLVM IR (-O0):
define void @BSP_L1DWriteback() {
%1 = alloca i64
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = load volatile i64, i64* inttoptr (i64 25448512 to i64*)
store i64 %6, i64* %2
%7 = load i64, i64* %2
store i64 %7, i64* %3
%8 = load i64, i64* %3
store i64 %8, i64* %1
%9 = load i64, i64* %1
%10 = or i64 %9, 1
store i64 %10, i64* %1
%11 = load i64, i64* %1
store i64 %11, i64* %4
%12 = load i64, i64* %4
store volatile i64 %12, i64* inttoptr (i64 25448512 to i64*)
%13 = load i64, i64* %4
store i64 %13, i64* %5
%14 = load i64, i64* %5
ret void
}

LLVM IR (-O2):
define void @BSP_L1DWriteback() {
%1 = load volatile i64, i64* inttoptr (i64 25448512 to i64*)
%2 = or i64 %1, 1
store volatile i64 %2, i64* inttoptr (i64 25448512 to i64*)
ret void
}
void __attribute__((no)) HEX00_lazy_restDatInit(void) {}


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

x86 assembly (clang, -O2):
ret

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

LLVM IR (-O2):
define void @HEX00_lazy_restDatInit() {
ret void
}
const char *dcgettext(const char *domain, const char *msg, int category) {
  return msg;
}


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

x86 assembly (clang, -O2):
<dcgettext>:
mov    %rsi,%rax
ret

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

LLVM IR (-O2):
define i8* @dcgettext(i8* nocapture readnone %0, i8* readnone returned %1, i32 %2) {
ret i8* %1
}
unsigned dips_read(void) { return 0xF & *(volatile unsigned *)0x03ff5008; }


x86 assembly (clang, -O0):
<dips_read>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3ff5008,%eax
mov    (%rax),%eax
and    $0xf,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dips_read>:
mov    0x3ff5008,%eax
and    $0xf,%eax
ret

LLVM IR (-O0):
define i32 @dips_read() {
%1 = load volatile i32, i32* inttoptr (i64 67063816 to i32*)
%2 = and i32 15, %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @dips_read() {
%1 = load volatile i32, i32* inttoptr (i64 67063816 to i32*)
%2 = and i32 %1, 15
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ __coverity_panic__();
void clar__assert(int condition, const char *file, int line, const char *error,
                  const char *description, int should_abort) {
  if (!condition && should_abort)
    __coverity_panic__();
}


x86 assembly (clang, -O0):
<clar__assert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1149 <clar__assert+0x39>
cmpl   $0x0,-0x2c(%rbp)
je     1149 <clar__assert+0x39>
mov    $0x0,%al
call   1030 <__coverity_panic__@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clar__assert>:
test   %edi,%edi
jne    1120 <clar__assert+0x10>
test   %r9d,%r9d
je     1120 <clar__assert+0x10>
xor    %eax,%eax
jmp    1030 <__coverity_panic__@plt>
ret

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

LLVM IR (-O2):
define void @clar__assert(i32 %0, i8* nocapture readnone %1, i32 %2, i8* nocapture readnone %3, i8* nocapture readnone %4, i32 %5) {
%7 = icmp eq i32 %0, 0
%8 = icmp ne i32 %5, 0
%9 = and i1 %7, %8
br i1 %9, label %10, label %12
10: ; preds = %6
%11 = tail call i32 (...) @__coverity_panic__()
br label %12
12: ; preds = %10, %6
ret void
}
void test12() {}


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

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

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

LLVM IR (-O2):
define void @test12() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char, int);
int /*<<< orphan*/ stderr;
void r(int x) { fprintf(stderr, "%c%d\n", 'r', x); }


x86 assembly (clang, -O0):
<r>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ebe(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%ecx
lea    0xed2(%rip),%rsi
mov    $0x72,%edx
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<r>:
mov    %edi,%ecx
mov    0x2ec7(%rip),%rax
mov    (%rax),%edi
lea    0xede(%rip),%rsi
mov    $0x72,%edx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [6 x i8] c"%c%d\0A\00"
define void @r(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stderr
%4 = load i32, i32* %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8 signext 114, i32 %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [6 x i8] c"%c%d\0A\00"
define void @r(i32 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8 signext 114, i32 %0)
ret void
}
const char *exported_file_function() { return "exported_file_function"; }


x86 assembly (clang, -O0):
<exported_file_function>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<exported_file_function>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [23 x i8] c"exported_file_function\00"
define i8* @exported_file_function() {
ret i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [23 x i8] c"exported_file_function\00"
define i8* @exported_file_function() {
ret i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, void *, int);
void __attribute__((regparm(3))) memcpy_9(void *dest, void *src) {
  memcpy(dest, src, 9);
}


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

x86 assembly (clang, -O2):
<memcpy_9>:
mov    $0x9,%edx
jmp    1030 <memcpy@plt>

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

LLVM IR (-O2):
define void @memcpy_9(i8* %0, i8* %1) {
%3 = tail call i32 @memcpy(i8* %0, i8* %1, i32 9)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ s_putch(char);
void s_putstr(const char *str) {
  char c;
  while ((c = *str++) != '\0')
    s_putch(c);
}


x86 assembly (clang, -O0):
<s_putstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%al
mov    %al,-0x9(%rbp)
movsbl %al,%eax
cmp    $0x0,%eax
je     114a <s_putstr+0x3a>
movsbl -0x9(%rbp),%edi
call   1030 <s_putch@plt>
jmp    111c <s_putstr+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<s_putstr>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <s_putstr+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <s_putch@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <s_putstr+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @s_putstr(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %9, %4 ], [ %2, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = tail call i32 @s_putch(i8 signext %5)
%9 = load i8, i8* %7
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
ret void
}
/* Variables and functions */
int mul8bit(int, int);
unsigned short pack_rgb5a1(int r, int g, int b, int a) {
  return ((((a >> 7) & 0x01) << 15) | (mul8bit(r, 31) << 10) |
          (mul8bit(g, 31) << 5) | (mul8bit(b, 31)));
}


x86 assembly (clang, -O0):
<pack_rgb5a1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x10(%rbp),%eax
sar    $0x7,%eax
and    $0x1,%eax
shl    $0xf,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x1f,%esi
call   1030 <mul8bit@plt>
mov    %eax,%ecx
mov    -0x1c(%rbp),%eax
shl    $0xa,%ecx
or     %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%edi
mov    $0x1f,%esi
call   1030 <mul8bit@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%eax
shl    $0x5,%ecx
or     %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%edi
mov    $0x1f,%esi
call   1030 <mul8bit@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
or     %ecx,%eax
movzwl %ax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pack_rgb5a1>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %ecx,%ebx
mov    %edx,%r14d
mov    %esi,%r15d
shl    $0x8,%ebx
and    $0x8000,%ebx
mov    $0x1f,%esi
call   1030 <mul8bit@plt>
mov    %eax,%ebp
shl    $0xa,%ebp
or     %ebx,%ebp
mov    %r15d,%edi
mov    $0x1f,%esi
call   1030 <mul8bit@plt>
mov    %eax,%ebx
shl    $0x5,%ebx
mov    %r14d,%edi
mov    $0x1f,%esi
call   1030 <mul8bit@plt>
or     %ebx,%eax
or     %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define zeroext i16 @pack_rgb5a1(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %8
%10 = ashr i32 %9, 7
%11 = and i32 %10, 1
%12 = shl i32 %11, 15
%13 = load i32, i32* %5
%14 = call i32 @mul8bit(i32 %13, i32 31)
%15 = shl i32 %14, 10
%16 = or i32 %12, %15
%17 = load i32, i32* %6
%18 = call i32 @mul8bit(i32 %17, i32 31)
%19 = shl i32 %18, 5
%20 = or i32 %16, %19
%21 = load i32, i32* %7
%22 = call i32 @mul8bit(i32 %21, i32 31)
%23 = or i32 %20, %22
%24 = trunc i32 %23 to i16
ret i16 %24
}

LLVM IR (-O2):
define zeroext i16 @pack_rgb5a1(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = shl i32 %3, 8
%6 = and i32 %5, 32768
%7 = tail call i32 @mul8bit(i32 %0, i32 31)
%8 = shl i32 %7, 10
%9 = or i32 %8, %6
%10 = tail call i32 @mul8bit(i32 %1, i32 31)
%11 = shl i32 %10, 5
%12 = or i32 %9, %11
%13 = tail call i32 @mul8bit(i32 %2, i32 31)
%14 = or i32 %12, %13
%15 = trunc i32 %14 to i16
ret i16 %15
}
int hdd_dpm_unregister_dev(struct hdd_dpm_ops *dpm_ops) { return 0; }


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

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

LLVM IR (-O0):
%struct.hdd_dpm_ops = type opaque
define i32 @hdd_dpm_unregister_dev(%struct.hdd_dpm_ops* %0) {
%2 = alloca %struct.hdd_dpm_ops*
store %struct.hdd_dpm_ops* %0, %struct.hdd_dpm_ops** %2
ret i32 0
}

LLVM IR (-O2):
%struct.hdd_dpm_ops = type opaque
define i32 @hdd_dpm_unregister_dev(%struct.hdd_dpm_ops* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ get_unit_number();
int /*<<< orphan*/ test();
extern int dummy1() {
  test();
  get_unit_number();
}


x86 assembly (clang, -O0):
<dummy1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <test@plt>
mov    $0x0,%al
call   1030 <get_unit_number@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dummy1>:
push   %rax
xor    %eax,%eax
call   1040 <test@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <get_unit_number@plt>

LLVM IR (-O0):
define i32 @dummy1() {
%1 = alloca i32
%2 = call i32 (...) @test()
%3 = call i32 (...) @get_unit_number()
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
define i32 @dummy1() {
%1 = tail call i32 (...) @test()
%2 = tail call i32 (...) @get_unit_number()
ret i32 undef
}
unsigned char Hal_PNL_SkipTimingChange_GetCaps(void) { return 1; }


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

x86 assembly (clang, -O2):
<Hal_PNL_SkipTimingChange_GetCaps>:
mov    $0x1,%al
ret

LLVM IR (-O0):
define zeroext i8 @Hal_PNL_SkipTimingChange_GetCaps() {
ret i8 1
}

LLVM IR (-O2):
define zeroext i8 @Hal_PNL_SkipTimingChange_GetCaps() {
ret i8 1
}
/* Variables and functions */
int /*<<< orphan*/ bcm2835_i2c_end();
int /*<<< orphan*/ lcdClear();
extern int lcdClose() {
  lcdClear();
  bcm2835_i2c_end();
}


x86 assembly (clang, -O0):
<lcdClose>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <lcdClear@plt>
mov    $0x0,%al
call   1030 <bcm2835_i2c_end@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lcdClose>:
push   %rax
xor    %eax,%eax
call   1040 <lcdClear@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <bcm2835_i2c_end@plt>

LLVM IR (-O0):
define i32 @lcdClose() {
%1 = alloca i32
%2 = call i32 (...) @lcdClear()
%3 = call i32 (...) @bcm2835_i2c_end()
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
define i32 @lcdClose() {
%1 = tail call i32 (...) @lcdClear()
%2 = tail call i32 (...) @bcm2835_i2c_end()
ret i32 undef
}
void TRNGReset(void) {
  (*((volatile unsigned long *)(0x40028000 + 0x00001FF0))) = 1;
}


x86 assembly (clang, -O0):
<TRNGReset>:
push   %rbp
mov    %rsp,%rbp
mov    $0x40029ff0,%eax
movq   $0x1,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<TRNGReset>:
movq   $0x1,0x40029ff0
ret

LLVM IR (-O0):
define void @TRNGReset() {
store volatile i64 1, i64* inttoptr (i64 1073913840 to i64*)
ret void
}

LLVM IR (-O2):
define void @TRNGReset() {
store volatile i64 1, i64* inttoptr (i64 1073913840 to i64*)
ret void
}
unsigned char Avi_StopRecorder(void) {
  unsigned char result = 0;
  return result;
}


x86 assembly (clang, -O0):
<Avi_StopRecorder>:
push   %rbp
mov    %rsp,%rbp
movb   $0x0,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define zeroext i8 @Avi_StopRecorder() {
ret i8 0
}
/* Variables and functions */
int test_sat_parser_should_fail(char *);
int test15(void) {
  return test_sat_parser_should_fail("(a or -bc)and (-a or c)");
}


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

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

LLVM IR (-O0):
@.str = [24 x i8] c"(a or -bc)and (-a or c)\00"
define i32 @test15() {
%1 = call i32 @test_sat_parser_should_fail(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [24 x i8] c"(a or -bc)and (-a or c)\00"
define i32 @test15() {
%1 = tail call i32 @test_sat_parser_should_fail(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
int foo() {
  int x;
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @foo() {
%1 = alloca i32
ret i32 0
}

LLVM IR (-O2):
define i32 @foo() {
ret i32 0
}
int test_imm_64int8_mem(signed char *val) {
  return ((*val) & (0x64 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_64int8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edx
and    $0x64,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_64int8_mem>:
testb  $0x64,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_64int8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 100
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int _rl_find_prev_mbchar(string, seed, flags)
char *string __attribute__((unused));
int seed, flags __attribute__((unused));
{ return ((seed == 0) ? seed : seed - 1); }


x86 assembly (clang, -O0):
<_rl_find_prev_mbchar>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1123 <_rl_find_prev_mbchar+0x23>
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    112c <_rl_find_prev_mbchar+0x2c>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_rl_find_prev_mbchar>:
xor    %eax,%eax
sub    $0x1,%esi
cmovae %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @_rl_find_prev_mbchar(i8* nocapture readnone %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %1, 0
%5 = add nsw i32 %1, -1
%6 = select i1 %4, i32 0, i32 %5
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ __m64;

/* Variables and functions */
int /*<<< orphan*/ _mm_mulhi_pi16(int /*<<< orphan*/, int /*<<< orphan*/);
__m64 __attribute__((no, unused)) test(__m64 s1, __m64 s2) {
  return _mm_mulhi_pi16(s1, s2);
}


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

x86 assembly (clang, -O2):
<test>:
jmp    1030 <_mm_mulhi_pi16@plt>

LLVM IR (-O0):
define i32 @test(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 @_mm_mulhi_pi16(i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @test(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_mulhi_pi16(i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main(int argc, char **argv) {
  int foo = 3;
  switch (foo) {
  case 1:
    puts("one");
    break;
  case 2:
    puts("two");
    break;
  case 3:
    puts("three");
    break;
  case 4:
    puts("four");
    break;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x3,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x20(%rbp)
sub    $0x3,%eax
ja     1195 <main+0x85>
mov    -0x20(%rbp),%rax
lea    0xeb3(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xeb3(%rip),%rdi
call   1030 <puts@plt>
jmp    1195 <main+0x85>
lea    0xea6(%rip),%rdi
call   1030 <puts@plt>
jmp    1195 <main+0x85>
lea    0xe99(%rip),%rdi
call   1030 <puts@plt>
jmp    1195 <main+0x85>
lea    0xe8e(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [4 x i8] c"one\00"
@.str.1 = [4 x i8] c"two\00"
@.str.2 = [6 x i8] c"three\00"
@.str.3 = [5 x i8] c"four\00"
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
store i32 3, i32* %6
%7 = load i32, i32* %6
switch i32 %7, label %16 [
i32 1, label %8
i32 2, label %10
i32 3, label %12
i32 4, label %14
]
8: ; preds = %2
%9 = call i32 @puts(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
br label %16
10: ; preds = %2
%11 = call i32 @puts(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
br label %16
12: ; preds = %2
%13 = call i32 @puts(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
br label %16
14: ; preds = %2
%15 = call i32 @puts(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
br label %16
16: ; preds = %2, %14, %12, %10, %8
ret i32 0
}

LLVM IR (-O2):
@.str.2 = [6 x i8] c"three\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ strlen(char const *);
int /*<<< orphan*/ strncmp(char const *, char const *, int /*<<< orphan*/);
bool str_startswith(const char *s, const char *ss) {
  return (!strncmp(s, ss, strlen(ss)));
}


x86 assembly (clang, -O0):
<str_startswith>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_startswith>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1040 <strlen@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <strncmp@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @str_startswith(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = load i8*, i8** %4
%8 = call i32 @strlen(i8* %7)
%9 = call i32 @strncmp(i8* %5, i8* %6, i32 %8)
%10 = icmp ne i32 %9, 0
%11 = xor i1 %10, true
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @str_startswith(i8* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i32 @strncmp(i8* %0, i8* %1, i32 %3)
%5 = icmp eq i32 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
int device_remove(struct udevice *dev) { return 0; }


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

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

LLVM IR (-O0):
%struct.udevice = type opaque
define i32 @device_remove(%struct.udevice* %0) {
%2 = alloca %struct.udevice*
store %struct.udevice* %0, %struct.udevice** %2
ret i32 0
}

LLVM IR (-O2):
%struct.udevice = type opaque
define i32 @device_remove(%struct.udevice* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int a, b;
  scanf("%d %d", &a, &b);
  printf("%d", ((b >> a) & 1));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%ecx
sar    %cl,%esi
and    $0x1,%esi
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    (%rsp),%esi
mov    0x4(%rsp),%cl
shr    %cl,%esi
and    $0x1,%esi
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%6 = load i32, i32* %2
%7 = load i32, i32* %1
%8 = lshr i32 %6, %7
%9 = and i32 %8, 1
%10 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %9)
ret i32 0
}
char *scope_get_type(struct scope *v) { return "Scope"; }


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

x86 assembly (clang, -O2):
<scope_get_type>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
%struct.scope = type opaque
@.str = [6 x i8] c"Scope\00"
define i8* @scope_get_type(%struct.scope* %0) {
%2 = alloca %struct.scope*
store %struct.scope* %0, %struct.scope** %2
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
%struct.scope = type opaque
@.str = [6 x i8] c"Scope\00"
define i8* @scope_get_type(%struct.scope* nocapture readnone %0) {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int strnlen(char *, int);
int main(void) { return strnlen("/", 1); }


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

x86 assembly (clang, -O2):
<main>:
lea    0xee9(%rip),%rdi
mov    $0x1,%esi
jmp    1030 <strnlen@plt>

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

LLVM IR (-O2):
@.str = [2 x i8] c"/\00"
define i32 @main() {
%1 = tail call i32 @strnlen(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ notYet(char *);
int /*<<< orphan*/ pushNumber(int /*<<< orphan*/);
void basQuickSort() {
  notYet("QuickSort");
  pushNumber(0);
}


x86 assembly (clang, -O0):
<basQuickSort>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <notYet@plt>
xor    %edi,%edi
call   1040 <pushNumber@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<basQuickSort>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <notYet@plt>
xor    %edi,%edi
pop    %rax
jmp    1040 <pushNumber@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"QuickSort\00"
define void @basQuickSort() {
%1 = call i32 @notYet(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @pushNumber(i32 0)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"QuickSort\00"
define void @basQuickSort() {
%1 = tail call i32 @notYet(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @pushNumber(i32 0)
ret void
}