xunge/DecIR huggingface dataset:
int subs_si_test1(int a, int b, int c) {
  int d = a - c;
  if (d == 0)
    return a + c;
  else
    return d;
}


x86 assembly (clang, -O0):
<subs_si_test1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
sub    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    112e <subs_si_test1+0x2e>
mov    -0x8(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1134 <subs_si_test1+0x34>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<subs_si_test1>:
lea    (%rdx,%rdi,1),%eax
mov    %edi,%ecx
sub    %edx,%ecx
test   %ecx,%ecx
cmovne %ecx,%eax
ret

LLVM IR (-O0):
define i32 @subs_si_test1(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%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
%9 = load i32, i32* %5
%10 = load i32, i32* %7
%11 = sub nsw i32 %9, %10
store i32 %11, i32* %8
%12 = load i32, i32* %8
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %18
14: ; preds = %3
%15 = load i32, i32* %5
%16 = load i32, i32* %7
%17 = add nsw i32 %15, %16
store i32 %17, i32* %4
br label %20
18: ; preds = %3
%19 = load i32, i32* %8
store i32 %19, i32* %4
br label %20
20: ; preds = %18, %14
%21 = load i32, i32* %4
ret i32 %21
}

LLVM IR (-O2):
define i32 @subs_si_test1(i32 %0, i32 %1, i32 %2) {
%4 = sub nsw i32 %0, %2
%5 = icmp eq i32 %4, 0
%6 = add nsw i32 %2, %0
%7 = select i1 %5, i32 %6, i32 %4
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ one_three();
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("starting now:\n");
  one_three();
  printf("done!\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <one_three@plt>
lea    0xec6(%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
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <one_three@plt>
lea    0xed3(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@str = [14 x i8] c"starting now:\00"
@str.2 = [6 x i8] c"done!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @one_three()
%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 mkdir(char *, int);
int file_mkdir(char const *const path) { return mkdir((char *)path, 0777); }


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

x86 assembly (clang, -O2):
<file_mkdir>:
mov    $0x1ff,%esi
jmp    1030 <mkdir@plt>

LLVM IR (-O0):
define i32 @file_mkdir(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @mkdir(i8* %3, i32 511)
ret i32 %4
}

LLVM IR (-O2):
define i32 @file_mkdir(i8* nocapture %0) {
%2 = tail call i32 @mkdir(i8* %0, i32 511)
ret i32 %2
}
/* Variables and functions */
int memcmp(void const *, void const *, int);
int username_compare(const void *desc, int dlen, const void *src, int slen) {
  if (dlen != slen) {
    return dlen - slen;
  }
  return memcmp(desc, src, slen);
}


x86 assembly (clang, -O0):
<username_compare>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %ecx,-0x24(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x24(%rbp),%eax
je     1140 <username_compare+0x30>
mov    -0x14(%rbp),%eax
sub    -0x24(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1153 <username_compare+0x43>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x24(%rbp),%edx
call   1030 <memcmp@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<username_compare>:
mov    %esi,%eax
sub    %ecx,%eax
jne    1124 <username_compare+0x14>
mov    %esi,%r8d
mov    %rdx,%rsi
mov    %r8d,%edx
jmp    1030 <memcmp@plt>
ret

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

LLVM IR (-O2):
define i32 @username_compare(i8* %0, i32 %1, i8* %2, i32 %3) {
%5 = icmp eq i32 %1, %3
br i1 %5, label %8, label %6
6: ; preds = %4
%7 = sub nsw i32 %1, %3
br label %10
8: ; preds = %4
%9 = tail call i32 @memcmp(i8* %0, i8* %2, i32 %1)
br label %10
10: ; preds = %8, %6
%11 = phi i32 [ %7, %6 ], [ %9, %8 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalpha(int);
void t_isalpha_0x16() {
  Assert_real((isalpha(22) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isalpha.c",
              115, ("isalpha should be 0 for 0x16"));
}


x86 assembly (clang, -O0):
<t_isalpha_0x16>:
push   %rbp
mov    %rsp,%rbp
mov    $0x16,%edi
call   1030 <isalpha@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x73,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isalpha_0x16>:
push   %rax
mov    $0x16,%edi
call   1030 <isalpha@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x73,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalpha.c\00"
@.str.1 = [29 x i8] c"isalpha should be 0 for 0x16\00"
define void @t_isalpha_0x16() {
%1 = call i64 @isalpha(i32 22)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 115, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalpha.c\00"
@.str.1 = [29 x i8] c"isalpha should be 0 for 0x16\00"
define void @t_isalpha_0x16() {
%1 = tail call i64 @isalpha(i32 22)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 115, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
b() { return 'b'; }


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

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

LLVM IR (-O0):
define i32 @b() {
ret i32 98
}

LLVM IR (-O2):
define i32 @b() {
ret i32 98
}
int foo() {
  static int i = 42;
  return i;
}


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

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

LLVM IR (-O0):
@foo.i = internal global i32 42
define i32 @foo() {
%1 = load i32, i32* @foo.i
ret i32 %1
}

LLVM IR (-O2):
define i32 @foo() {
ret i32 42
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_error();
void assert(_Bool arg) {
  {
    if (!arg) {
      {
      ERROR:
        __VERIFIER_error();
      }
    }
  }
}


x86 assembly (clang, -O0):
<assert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
and    $0x1,%al
mov    %al,-0x1(%rbp)
testb  $0x1,-0x1(%rbp)
jne    1136 <assert+0x26>
jmp    112f <assert+0x1f>
mov    $0x0,%al
call   1030 <__VERIFIER_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<assert>:
test   %edi,%edi
je     1115 <assert+0x5>
ret
xor    %eax,%eax
jmp    1030 <__VERIFIER_error@plt>

LLVM IR (-O0):
define void @assert(i1 zeroext %0) {
%2 = alloca i8
%3 = zext i1 %0 to i8
store i8 %3, i8* %2
%4 = load i8, i8* %2
%5 = trunc i8 %4 to i1
br i1 %5, label %9, label %6
6: ; preds = %1
br label %7
7: ; preds = %6
%8 = call i32 (...) @__VERIFIER_error()
br label %9
9: ; preds = %7, %1
ret void
}

LLVM IR (-O2):
define void @assert(i1 zeroext %0) {
br i1 %0, label %4, label %2
2: ; preds = %1
%3 = tail call i32 (...) @__VERIFIER_error()
br label %4
4: ; preds = %2, %1
ret void
}
void htextsize_(width, height) float *width, *height;
{ htextsize(*width, *height); }


x86 assembly (clang, -O0):
<htextsize_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
cvtss2sd %xmm0,%xmm0
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm1
cvtss2sd %xmm1,%xmm1
mov    $0x2,%al
call   1030 <htextsize@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<htextsize_>:
movss  (%rdi),%xmm0
cvtss2sd %xmm0,%xmm0
movss  (%rsi),%xmm1
cvtss2sd %xmm1,%xmm1
mov    $0x2,%al
jmp    1030 <htextsize@plt>

LLVM IR (-O0):
define void @htextsize_(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* %5
%7 = fpext float %6 to double
%8 = load float*, float** %4
%9 = load float, float* %8
%10 = fpext float %9 to double
%11 = call i32 (double, double, ...) bitcast (i32 (...)* @htextsize to i32 (double, double, ...)*)(double %7, double %10)
ret void
}

LLVM IR (-O2):
define void @htextsize_(float* nocapture %0, float* nocapture %1) {
%3 = load float, float* %0
%4 = fpext float %3 to double
%5 = load float, float* %1
%6 = fpext float %5 to double
%7 = tail call i32 (double, double, ...) bitcast (i32 (...)* @htextsize to i32 (double, double, ...)*)(double %4, double %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
scalar_t__ test_neg();
int main(void) {
  if (sizeof(char) != 1)
    return 0;
  if (test_neg() != 0)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <test_neg@plt>
cmp    $0x0,%rax
je     1147 <main+0x27>
mov    $0x0,%al
call   1040 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <test_neg@plt>
test   %rax,%rax
jne    1131 <main+0x11>
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1040 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 (...) @test_neg()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @abort()
unreachable
6: ; preds = %0
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 (...) @test_neg()
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
ret i32 0
}
/* Variables and functions */
size_t strlen(const char *string) {
  size_t index = 0;
  while (string[index] != 0)
    index++;
  return index;
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1136 <strlen+0x36>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <strlen+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
mov    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <strlen+0x10>
ret

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

LLVM IR (-O2):
define i64 @strlen(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ 0, %1 ], [ %7, %2 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char **argv) {
  fprintf(stderr, "Usage: %s [-o outfile] [-u] file ...\n", argv[0]);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
lea    0xebd(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e89(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%eax
mov    (%rdi),%rdx
lea    0xecc(%rip),%rsi
mov    %eax,%edi
call   1030 <fprintf@plt>
mov    0x2e96(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [38 x i8] c"Usage: %s [-o outfile] [-u] file ...\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i32, i32* @stderr
%4 = load i8**, i8*** %2
%5 = getelementptr inbounds i8*, i8** %4, i64 0
%6 = load i8*, i8** %5
%7 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = load i32, i32* @EXIT_FAILURE
%9 = call i32 @exit(i32 %8)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [38 x i8] c"Usage: %s [-o outfile] [-u] file ...\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage(i8** nocapture %0) {
%2 = load i32, i32* @stderr
%3 = load i8*, i8** %0
%4 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = load i32, i32* @EXIT_FAILURE
%6 = tail call i32 @exit(i32 %5)
unreachable
}
void wait_event(_Bool e1, _Bool *e2) {
  __ESBMC_atomic_begin();
  _Bool unlocked = (e1 == 0);
  if (unlocked)
    __ESBMC_assume(0);
  else
    e2 = 0;
  __ESBMC_atomic_end();
}


x86 assembly (clang, -O0):
<wait_event>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dil,%al
and    $0x1,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1050 <__ESBMC_atomic_begin@plt>
mov    -0x1(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
mov    %al,-0x11(%rbp)
testb  $0x1,-0x11(%rbp)
je     1176 <wait_event+0x46>
xor    %edi,%edi
mov    $0x0,%al
call   1040 <__ESBMC_assume@plt>
jmp    117e <wait_event+0x4e>
movq   $0x0,-0x10(%rbp)
mov    $0x0,%al
call   1030 <__ESBMC_atomic_end@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wait_event>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1050 <__ESBMC_atomic_begin@plt>
test   %ebx,%ebx
jne    1147 <wait_event+0x17>
xor    %edi,%edi
xor    %eax,%eax
call   1040 <__ESBMC_assume@plt>
xor    %eax,%eax
pop    %rbx
jmp    1030 <__ESBMC_atomic_end@plt>

LLVM IR (-O0):
define void @wait_event(i1 zeroext %0, i8* %1) {
%3 = alloca i8
%4 = alloca i8*
%5 = alloca i8
%6 = zext i1 %0 to i8
store i8 %6, i8* %3
store i8* %1, i8** %4
%7 = call i32 (...) @__ESBMC_atomic_begin()
%8 = load i8, i8* %3
%9 = trunc i8 %8 to i1
%10 = zext i1 %9 to i32
%11 = icmp eq i32 %10, 0
%12 = zext i1 %11 to i8
store i8 %12, i8* %5
%13 = load i8, i8* %5
%14 = trunc i8 %13 to i1
br i1 %14, label %15, label %17
15: ; preds = %2
%16 = call i32 (i32, ...) bitcast (i32 (...)* @__ESBMC_assume to i32 (i32, ...)*)(i32 0)
br label %18
17: ; preds = %2
store i8* null, i8** %4
br label %18
18: ; preds = %17, %15
%19 = call i32 (...) @__ESBMC_atomic_end()
ret void
}

LLVM IR (-O2):
define void @wait_event(i1 zeroext %0, i8* nocapture readnone %1) {
%3 = tail call i32 (...) @__ESBMC_atomic_begin()
br i1 %0, label %6, label %4
4: ; preds = %2
%5 = tail call i32 (i32, ...) bitcast (i32 (...)* @__ESBMC_assume to i32 (i32, ...)*)(i32 0)
br label %6
6: ; preds = %2, %4
%7 = tail call i32 (...) @__ESBMC_atomic_end()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ reply(int, char *, char *);
void ack(char *s) { reply(250, "%s command successful.", s); }


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

x86 assembly (clang, -O2):
<ack>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rsi
mov    $0xfa,%edi
jmp    1030 <reply@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"%s command successful.\00"
define void @ack(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @reply(i32 250, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"%s command successful.\00"
define void @ack(i8* %0) {
%2 = tail call i32 @reply(i32 250, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
void PerrorExit(char *str) {
  perror(str);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<PerrorExit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <perror@plt>
mov    0x2ea4(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<PerrorExit>:
push   %rax
call   1030 <perror@plt>
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
define void @PerrorExit(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @perror(i8* %3)
%5 = load i32, i32* @EXIT_FAILURE
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
define void @PerrorExit(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = load i32, i32* @EXIT_FAILURE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
int DestroyWindow(HWND) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @DestroyWindow(i32 %0) {
ret i32 0
}
/* Type definitions */
struct wl_shm {
  int dummy;
};
struct wl_proxy {
  int dummy;
};

/* Variables and functions */
void *wl_proxy_get_user_data(struct wl_proxy *);
void *wl_shm_get_user_data(struct wl_shm *wl_shm) {
  return wl_proxy_get_user_data((struct wl_proxy *)wl_shm);
}


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

x86 assembly (clang, -O2):
<wl_shm_get_user_data>:
jmp    1030 <wl_proxy_get_user_data@plt>

LLVM IR (-O0):
%struct.wl_shm = type { i32 }
%struct.wl_proxy = type { i32 }
define i8* @wl_shm_get_user_data(%struct.wl_shm* %0) {
%2 = alloca %struct.wl_shm*
store %struct.wl_shm* %0, %struct.wl_shm** %2
%3 = load %struct.wl_shm*, %struct.wl_shm** %2
%4 = bitcast %struct.wl_shm* %3 to %struct.wl_proxy*
%5 = call i8* @wl_proxy_get_user_data(%struct.wl_proxy* %4)
ret i8* %5
}

LLVM IR (-O2):
%struct.wl_shm = type { i32 }
%struct.wl_proxy = type { i32 }
define i8* @wl_shm_get_user_data(%struct.wl_shm* %0) {
%2 = bitcast %struct.wl_shm* %0 to %struct.wl_proxy*
%3 = tail call i8* @wl_proxy_get_user_data(%struct.wl_proxy* %2)
ret i8* %3
}
short int netlink_loop(unsigned short int queuenum) {}


x86 assembly (clang, -O0):
<netlink_loop>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x4(%rbp)
movswl -0x2(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define signext i16 @netlink_loop(i16 zeroext %0) {
%2 = alloca i16
%3 = alloca i16
store i16 %0, i16* %3
%4 = load i16, i16* %2
ret i16 %4
}

LLVM IR (-O2):
define signext i16 @netlink_loop(i16 zeroext %0) {
ret i16 undef
}
int getNum(char ch) {
  switch (ch) {
  case 'A':
    return 0;
  case '0':
    return 9;
  case 'J':
    return 10;
  case 'Q':
    return 11;
  case 'K':
    return 12;
  default:
    return ch - '0' - 1;
  }
}


x86 assembly (clang, -O0):
<getNum>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
add    $0xffffffd0,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x21,%eax
ja     1170 <getNum+0x70>
mov    -0x10(%rbp),%rax
lea    0xed5(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x0,-0x4(%rbp)
jmp    117d <getNum+0x7d>
movl   $0x9,-0x4(%rbp)
jmp    117d <getNum+0x7d>
movl   $0xa,-0x4(%rbp)
jmp    117d <getNum+0x7d>
movl   $0xb,-0x4(%rbp)
jmp    117d <getNum+0x7d>
movl   $0xc,-0x4(%rbp)
jmp    117d <getNum+0x7d>
movsbl -0x5(%rbp),%eax
sub    $0x30,%eax
sub    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getNum>:
lea    -0x30(%rdi),%ecx
cmp    $0x21,%ecx
ja     1120 <getNum+0x20>
xor    %eax,%eax
lea    0xeef(%rip),%rdx
movslq (%rdx,%rcx,4),%rcx
add    %rdx,%rcx
jmp    *%rcx
mov    $0x9,%eax
ret
add    $0xffffffcf,%edi
mov    %edi,%eax
ret
mov    $0xa,%eax
ret
mov    $0xc,%eax
ret
mov    $0xb,%eax
ret

LLVM IR (-O0):
define i32 @getNum(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
switch i32 %5, label %11 [
i32 65, label %6
i32 48, label %7
i32 74, label %8
i32 81, label %9
i32 75, label %10
]
6: ; preds = %1
store i32 0, i32* %2
br label %16
7: ; preds = %1
store i32 9, i32* %2
br label %16
8: ; preds = %1
store i32 10, i32* %2
br label %16
9: ; preds = %1
store i32 11, i32* %2
br label %16
10: ; preds = %1
store i32 12, i32* %2
br label %16
11: ; preds = %1
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = sub nsw i32 %13, 48
%15 = sub nsw i32 %14, 1
store i32 %15, i32* %2
br label %16
16: ; preds = %11, %10, %9, %8, %7, %6
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
define i32 @getNum(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %7 [
i32 65, label %9
i32 48, label %3
i32 74, label %4
i32 81, label %5
i32 75, label %6
]
3: ; preds = %1
br label %9
4: ; preds = %1
br label %9
5: ; preds = %1
br label %9
6: ; preds = %1
br label %9
7: ; preds = %1
%8 = add nsw i32 %2, -49
br label %9
9: ; preds = %1, %7, %6, %5, %4, %3
%10 = phi i32 [ %8, %7 ], [ 12, %6 ], [ 11, %5 ], [ 10, %4 ], [ 9, %3 ], [ 0, %1 ]
ret i32 %10
}
/* Variables and functions */
int read(int /*<<< orphan*/, char **, int);
void clearBuffer(void) {
  char buf[100];
  while (read(0, &buf, 100) == 1)
    ;
}


x86 assembly (clang, -O0):
<clearBuffer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
lea    -0x70(%rbp),%rsi
xor    %edi,%edi
mov    $0x64,%edx
call   1030 <read@plt>
cmp    $0x1,%eax
jne    1136 <clearBuffer+0x26>
jmp    1118 <clearBuffer+0x8>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clearBuffer>:
push   %rbx
sub    $0x70,%rsp
mov    %rsp,%rbx
nopl   0x0(%rax,%rax,1)
xor    %edi,%edi
mov    %rbx,%rsi
mov    $0x64,%edx
call   1030 <read@plt>
cmp    $0x1,%eax
je     1120 <clearBuffer+0x10>
add    $0x70,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @clearBuffer() {
%1 = alloca [100 x i8]
br label %2
2: ; preds = %6, %0
%3 = bitcast [100 x i8]* %1 to i8**
%4 = call i32 @read(i32 0, i8** %3, i32 100)
%5 = icmp eq i32 %4, 1
br i1 %5, label %6, label %7
6: ; preds = %2
br label %2
7: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @clearBuffer() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = bitcast [100 x i8]* %1 to i8**
br label %4
4: ; preds = %4, %0
%5 = call i32 @read(i32 0, i8** %3, i32 100)
%6 = icmp eq i32 %5, 1
br i1 %6, label %4, label %7
7: ; preds = %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ft_strdel(char **);
void ft_free_tab(char **tab, int tab_size) {
  int i;
  i = 0;
  while (i < tab_size) {
    ft_strdel(&tab[i]);
    i++;
  }
  ft_strdel(tab);
}


x86 assembly (clang, -O0):
<ft_free_tab>:
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    1154 <ft_free_tab+0x44>
mov    -0x8(%rbp),%rdi
movslq -0x10(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
call   1030 <ft_strdel@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <ft_free_tab+0x16>
mov    -0x8(%rbp),%rdi
call   1030 <ft_strdel@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_free_tab>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
test   %esi,%esi
jle    1142 <ft_free_tab+0x32>
mov    %esi,%r15d
mov    %r14,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rbx,%rdi
call   1030 <ft_strdel@plt>
add    $0x8,%rbx
add    $0xffffffffffffffff,%r15
jne    1130 <ft_free_tab+0x20>
mov    %r14,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <ft_strdel@plt>

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

LLVM IR (-O2):
define void @ft_free_tab(i8** %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %12
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %10, %6 ]
%8 = getelementptr inbounds i8*, i8** %0, i64 %7
%9 = tail call i32 @ft_strdel(i8** %8)
%10 = add nuw nsw i64 %7, 1
%11 = icmp eq i64 %10, %5
br i1 %11, label %12, label %6
12: ; preds = %6, %2
%13 = tail call i32 @ft_strdel(i8** %0)
ret void
}
int fun958() { return 958; }


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

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

LLVM IR (-O0):
define i32 @fun958() {
ret i32 958
}

LLVM IR (-O2):
define i32 @fun958() {
ret i32 958
}
/* Variables and functions */
float fabsf(float);
float abs_fun_float(float a) { return fabsf(a); }


x86 assembly (clang, -O0):
<abs_fun_float>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movaps 0xeeb(%rip),%xmm1
pand   %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<abs_fun_float>:
andps  0xef9(%rip),%xmm0
ret

LLVM IR (-O0):
define float @abs_fun_float(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @llvm.fabs.f32(float %3)
ret float %4
}

LLVM IR (-O2):
define float @abs_fun_float(float %0) {
%2 = tail call float @llvm.fabs.f32(float %0)
ret float %2
}
int sbmask(int j) { return j >> 30 & 3; }


x86 assembly (clang, -O0):
<sbmask>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1e,%eax
and    $0x3,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sbmask>:
mov    %edi,%eax
shr    $0x1e,%eax
ret

LLVM IR (-O0):
define i32 @sbmask(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 30
%5 = and i32 %4, 3
ret i32 %5
}

LLVM IR (-O2):
define i32 @sbmask(i32 %0) {
%2 = lshr i32 %0, 30
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ mallocx();
int f2() {
  mallocx();
  return 1;
}


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

x86 assembly (clang, -O2):
<f2>:
push   %rax
xor    %eax,%eax
call   1030 <mallocx@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @f2() {
%1 = call i32 (...) @mallocx()
ret i32 1
}

LLVM IR (-O2):
define i32 @f2() {
%1 = tail call i32 (...) @mallocx()
ret i32 1
}
/* Type definitions */
struct tree {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ object_copy(void const *);
int tree_insert_(struct tree *, int /*<<< orphan*/);
int tree_insert(struct tree *tree, const void *obj) {
  return tree_insert_(tree, object_copy(obj));
}


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

x86 assembly (clang, -O2):
<tree_insert>:
push   %rbx
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1040 <object_copy@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1030 <tree_insert_@plt>

LLVM IR (-O0):
%struct.tree = type { i32 }
define i32 @tree_insert(%struct.tree* %0, i8* %1) {
%3 = alloca %struct.tree*
%4 = alloca i8*
store %struct.tree* %0, %struct.tree** %3
store i8* %1, i8** %4
%5 = load %struct.tree*, %struct.tree** %3
%6 = load i8*, i8** %4
%7 = call i32 @object_copy(i8* %6)
%8 = call i32 @tree_insert_(%struct.tree* %5, i32 %7)
ret i32 %8
}

LLVM IR (-O2):
%struct.tree = type { i32 }
define i32 @tree_insert(%struct.tree* %0, i8* %1) {
%3 = tail call i32 @object_copy(i8* %1)
%4 = tail call i32 @tree_insert_(%struct.tree* %0, i32 %3)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
char *asctime(struct tm *);
struct tm *gmtime(int /*<<< orphan*/ *);
int strlen(char *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
char *getCurrentDateTime() {
  time_t rawtime;
  struct tm *timeinfo;
  time(&rawtime);
  timeinfo = gmtime(&rawtime);
  char *dateTime = asctime(timeinfo);
  dateTime[strlen(dateTime) - 1] = '\0';
  return dateTime;
}


x86 assembly (clang, -O0):
<getCurrentDateTime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x4(%rbp),%rdi
call   1050 <time@plt>
lea    -0x4(%rbp),%rdi
call   1060 <gmtime@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <asctime@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%rax
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getCurrentDateTime>:
push   %rbx
sub    $0x10,%rsp
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
call   1050 <time@plt>
mov    %rbx,%rdi
call   1060 <gmtime@plt>
mov    %rax,%rdi
call   1040 <asctime@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1030 <strlen@plt>
cltq
movb   $0x0,-0x1(%rax,%rbx,1)
mov    %rbx,%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
define i8* @getCurrentDateTime() {
%1 = alloca i32
%2 = alloca %struct.tm*
%3 = alloca i8*
%4 = call i32 @time(i32* %1)
%5 = call %struct.tm* @gmtime(i32* %1)
store %struct.tm* %5, %struct.tm** %2
%6 = load %struct.tm*, %struct.tm** %2
%7 = call i8* @asctime(%struct.tm* %6)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = load i8*, i8** %3
%10 = call i32 @strlen(i8* %9)
%11 = sub nsw i32 %10, 1
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i8, i8* %8, i64 %12
store i8 0, i8* %13
%14 = load i8*, i8** %3
ret i8* %14
}

LLVM IR (-O2):
%struct.tm = type { i32 }
define i8* @getCurrentDateTime() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @time(i32* %1)
%4 = call %struct.tm* @gmtime(i32* %1)
%5 = call i8* @asctime(%struct.tm* %4)
%6 = call i32 @strlen(i8* %5)
%7 = add nsw i32 %6, -1
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %5, i64 %8
store i8 0, i8* %9
ret i8* %5
}
void ff_hevc_put_hevc_bi_epel_hv8_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_epel_hv8_10_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printSepuku(int **);
void restoreHonor(int tab[9][9]) { printSepuku(tab); }


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

x86 assembly (clang, -O2):
<restoreHonor>:
jmp    1030 <printSepuku@plt>

LLVM IR (-O0):
define void @restoreHonor([9 x i32]* %0) {
%2 = alloca [9 x i32]*
store [9 x i32]* %0, [9 x i32]** %2
%3 = load [9 x i32]*, [9 x i32]** %2
%4 = bitcast [9 x i32]* %3 to i32**
%5 = call i32 @printSepuku(i32** %4)
ret void
}

LLVM IR (-O2):
define void @restoreHonor([9 x i32]* %0) {
%2 = bitcast [9 x i32]* %0 to i32**
%3 = tail call i32 @printSepuku(i32** %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ GLint;

/* Variables and functions */
void glcRemoveCatalog(GLint index) {}


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

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

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

LLVM IR (-O2):
define void @glcRemoveCatalog(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
unsigned int readInt();
int /*<<< orphan*/ writeCommand1parm(char *, unsigned int);
unsigned int ambiantLight(unsigned int sensor) {
  unsigned int light = 0;
  if ((sensor <= 6) && (sensor > 0)) {
    writeCommand1parm("AL", sensor);
    light = readInt();
  } else {
    printf("Error sensor number \n");
  }
  return light;
}


x86 assembly (clang, -O0):
<ambiantLight>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x6,-0x4(%rbp)
ja     1174 <ambiantLight+0x44>
cmpl   $0x0,-0x4(%rbp)
jbe    1174 <ambiantLight+0x44>
mov    -0x4(%rbp),%esi
lea    0xea0(%rip),%rdi
call   1030 <writeCommand1parm@plt>
mov    $0x0,%al
call   1050 <readInt@plt>
mov    %eax,-0x8(%rbp)
jmp    1180 <ambiantLight+0x50>
lea    0xe88(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ambiantLight>:
push   %rax
mov    %edi,%esi
lea    -0x1(%rsi),%eax
cmp    $0x5,%eax
ja     114f <ambiantLight+0x1f>
lea    0xebe(%rip),%rdi
call   1040 <writeCommand1parm@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <readInt@plt>
lea    0xead(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"AL\00"
@.str.1 = [22 x i8] c"Error sensor number \0A\00"
define i32 @ambiantLight(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
%4 = load i32, i32* %2
%5 = icmp ule i32 %4, 6
br i1 %5, label %6, label %13
6: ; preds = %1
%7 = load i32, i32* %2
%8 = icmp ugt i32 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %6
%10 = load i32, i32* %2
%11 = call i32 @writeCommand1parm(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = call i32 (...) @readInt()
store i32 %12, i32* %3
br label %15
13: ; preds = %6, %1
%14 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
br label %15
15: ; preds = %13, %9
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
@.str = [3 x i8] c"AL\00"
@str = [21 x i8] c"Error sensor number \00"
define i32 @ambiantLight(i32 %0) {
%2 = add i32 %0, -1
%3 = icmp ult i32 %2, 6
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 @writeCommand1parm(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %0)
%6 = tail call i32 (...) @readInt()
br label %9
7: ; preds = %1
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
br label %9
9: ; preds = %7, %4
%10 = phi i32 [ %6, %4 ], [ 0, %7 ]
ret i32 %10
}
double valueOfFunctionInSqrt(double (*func)(double)) {
  return (*func)(3.1) * (*func)(3.1);
}


x86 assembly (clang, -O0):
<valueOfFunctionInSqrt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movsd  0xeec(%rip),%xmm0
call   *-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  0xedc(%rip),%xmm0
call   *-0x8(%rbp)
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
mulsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<valueOfFunctionInSqrt>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
movsd  0xef0(%rip),%xmm0
call   *%rdi
movsd  %xmm0,0x8(%rsp)
movsd  0xee0(%rip),%xmm0
call   *%rbx
mulsd  0x8(%rsp),%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @valueOfFunctionInSqrt(double (double)* %0) {
%2 = alloca double (double)*
store double (double)* %0, double (double)** %2
%3 = load double (double)*, double (double)** %2
%4 = call double %3(double 3.100000e+00)
%5 = load double (double)*, double (double)** %2
%6 = call double %5(double 3.100000e+00)
%7 = fmul double %4, %6
ret double %7
}

LLVM IR (-O2):
define double @valueOfFunctionInSqrt(double (double)* nocapture %0) {
%2 = tail call double %0(double 3.100000e+00)
%3 = tail call double %0(double 3.100000e+00)
%4 = fmul double %2, %3
ret double %4
}
void dummy_put(int x __attribute__((unused)), int y __attribute__((unused)),
               const struct bogl_pixmap *pixmap __attribute__((unused)),
               const int color_map[] __attribute__((unused))) {}


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

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

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

LLVM IR (-O2):
%struct.bogl_pixmap = type opaque
define void @dummy_put(i32 %0, i32 %1, %struct.bogl_pixmap* nocapture %2, i32* nocapture %3) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __poet_fail();
int nondet(int, int);
int main(void) {
  int x = nondet(1, 10);
  if (x >= 15)
    __poet_fail();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
mov    $0xa,%esi
call   1040 <nondet@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0xf,-0x8(%rbp)
jl     1152 <main+0x32>
mov    $0x0,%al
call   1030 <__poet_fail@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
mov    $0xa,%esi
call   1040 <nondet@plt>
cmp    $0xf,%eax
jl     113c <main+0x1c>
xor    %eax,%eax
call   1030 <__poet_fail@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @nondet(i32 1, i32 10)
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = icmp sge i32 %4, 15
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 (...) @__poet_fail()
br label %8
8: ; preds = %6, %0
%9 = load i32, i32* %1
ret i32 %9
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @nondet(i32 1, i32 10)
%2 = icmp sgt i32 %1, 14
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 (...) @__poet_fail()
br label %5
5: ; preds = %3, %0
ret i32 0
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
int /*<<< orphan*/ IntEnable(scalar_t__);
int /*<<< orphan*/ IntRegister(scalar_t__, void (*)());
scalar_t__ _HibernateIntNumberGet();
void HibernateIntRegister(void (*pfnHandler)(void)) {
  uint32_t ui32Int;
  ui32Int = _HibernateIntNumberGet();
  ASSERT(ui32Int != 0);
  IntRegister(ui32Int, pfnHandler);
  IntEnable(ui32Int);
}


x86 assembly (clang, -O0):
<HibernateIntRegister>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1050 <_HibernateIntNumberGet@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <ASSERT@plt>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1040 <IntRegister@plt>
mov    -0x10(%rbp),%rdi
call   1030 <IntEnable@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<HibernateIntRegister>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %eax,%eax
call   1050 <_HibernateIntNumberGet@plt>
mov    %rax,%rbx
xor    %edi,%edi
test   %rax,%rax
setne  %dil
call   1060 <ASSERT@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <IntRegister@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <IntEnable@plt>

LLVM IR (-O0):
define void @HibernateIntRegister(void ()* %0) {
%2 = alloca void ()*
%3 = alloca i64
store void ()* %0, void ()** %2
%4 = call i64 (...) @_HibernateIntNumberGet()
store i64 %4, i64* %3
%5 = load i64, i64* %3
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
%8 = call i32 @ASSERT(i32 %7)
%9 = load i64, i64* %3
%10 = load void ()*, void ()** %2
%11 = bitcast void ()* %10 to void (...)*
%12 = call i32 @IntRegister(i64 %9, void (...)* %11)
%13 = load i64, i64* %3
%14 = call i32 @IntEnable(i64 %13)
ret void
}

LLVM IR (-O2):
define void @HibernateIntRegister(void ()* %0) {
%2 = tail call i64 (...) @_HibernateIntNumberGet()
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i32
%5 = tail call i32 @ASSERT(i32 %4)
%6 = bitcast void ()* %0 to void (...)*
%7 = tail call i32 @IntRegister(i64 %2, void (...)* %6)
%8 = tail call i32 @IntEnable(i64 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ERR_get_error();
int /*<<< orphan*/ ERR_load_crypto_strings();
int /*<<< orphan*/ ERR_reason_error_string(int /*<<< orphan*/);
int /*<<< orphan*/ abort();
int /*<<< orphan*/ warnx(char *, char const *, int /*<<< orphan*/);
void _bnerr(const char *msg) {
  ERR_load_crypto_strings();
  do {
    warnx("%s: %s", msg, ERR_reason_error_string(ERR_get_error()));
    abort();
  } while (0);
}


x86 assembly (clang, -O0):
<_bnerr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1070 <ERR_load_crypto_strings@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1060 <ERR_get_error@plt>
mov    %eax,%edi
call   1050 <ERR_reason_error_string@plt>
mov    -0x10(%rbp),%rsi
mov    %eax,%edx
lea    0xe7a(%rip),%rdi
call   1040 <warnx@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<_bnerr>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1070 <ERR_load_crypto_strings@plt>
xor    %eax,%eax
call   1060 <ERR_get_error@plt>
mov    %eax,%edi
call   1050 <ERR_reason_error_string@plt>
lea    0xe90(%rip),%rdi
mov    %rbx,%rsi
mov    %eax,%edx
call   1040 <warnx@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"%s: %s\00"
define void @_bnerr(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @ERR_load_crypto_strings()
br label %4
4: ; preds = %1
%5 = load i8*, i8** %2
%6 = call i32 (...) @ERR_get_error()
%7 = call i32 @ERR_reason_error_string(i32 %6)
%8 = call i32 @warnx(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %5, i32 %7)
%9 = call i32 (...) @abort()
unreachable
10: ; No predecessors!
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"%s: %s\00"
define void @_bnerr(i8* %0) {
%2 = tail call i32 (...) @ERR_load_crypto_strings()
%3 = tail call i32 (...) @ERR_get_error()
%4 = tail call i32 @ERR_reason_error_string(i32 %3)
%5 = tail call i32 @warnx(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %4)
%6 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ uart_putchar(int /*<<< orphan*/);
void uart_puts(const char *str) {
  while (*str)
    uart_putchar(*str++);
}


x86 assembly (clang, -O0):
<uart_puts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1145 <uart_puts+0x35>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
call   1030 <uart_putchar@plt>
jmp    111c <uart_puts+0xc>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @uart_puts(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %10, %4 ], [ %2, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = sext i8 %5 to i32
%9 = tail call i32 @uart_putchar(i32 %8)
%10 = load i8, i8* %7
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ f(int *, int);
int /*<<< orphan*/ free(int *);
scalar_t__ malloc(int);
int main() {
  int *p = (int *)malloc(5 * sizeof(int));
  f(p, 5);
  free(p);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x14,%edi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x5,%esi
call   1040 <f@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x14,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    $0x5,%esi
call   1040 <f@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
store i32 0, i32* %1
%3 = call i64 @malloc(i32 20)
%4 = inttoptr i64 %3 to i32*
store i32* %4, i32** %2
%5 = load i32*, i32** %2
%6 = call i32 @f(i32* %5, i32 5)
%7 = load i32*, i32** %2
%8 = call i32 @free(i32* %7)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 @malloc(i32 20)
%2 = inttoptr i64 %1 to i32*
%3 = tail call i32 @f(i32* %2, i32 5)
%4 = tail call i32 @free(i32* %2)
ret i32 0
}