xunge/DecIR huggingface dataset:
char STORAGE_IsWriteProtected(void) { return 0; }


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

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

LLVM IR (-O0):
define signext i8 @STORAGE_IsWriteProtected() {
ret i8 0
}

LLVM IR (-O2):
define signext i8 @STORAGE_IsWriteProtected() {
ret i8 0
}
int gcd(int x, int y) {
  if (y == 0)
    return x;
  return gcd(y, x % y);
}


x86 assembly (clang, -O0):
<gcd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1133 <gcd+0x23>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1147 <gcd+0x37>
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,%esi
call   1030 <gcd@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gcd>:
mov    %edi,%eax
test   %esi,%esi
je     111d <gcd+0x1d>
mov    %esi,%edx
nopl   0x0(%rax,%rax,1)
mov    %edx,%ecx
cltd
idiv   %ecx
mov    %ecx,%eax
test   %edx,%edx
jne    1110 <gcd+0x10>
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @gcd(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %5
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %4
store i32 %9, i32* %3
br label %16
10: ; preds = %2
%11 = load i32, i32* %5
%12 = load i32, i32* %4
%13 = load i32, i32* %5
%14 = srem i32 %12, %13
%15 = call i32 @gcd(i32 %11, i32 %14)
store i32 %15, i32* %3
br label %16
16: ; preds = %10, %8
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
define i32 @gcd(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %9, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %7, %4 ], [ %1, %2 ]
%6 = phi i32 [ %5, %4 ], [ %0, %2 ]
%7 = srem i32 %6, %5
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %4
9: ; preds = %4, %2
%10 = phi i32 [ %0, %2 ], [ %5, %4 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ __console_tx_hex32(int, unsigned int);
void print_warning_hex32(unsigned int value) { __console_tx_hex32(4, value); }


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

x86 assembly (clang, -O2):
<print_warning_hex32>:
mov    %edi,%esi
mov    $0x4,%edi
jmp    1030 <__console_tx_hex32@plt>

LLVM IR (-O0):
define void @print_warning_hex32(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @__console_tx_hex32(i32 4, i32 %3)
ret void
}

LLVM IR (-O2):
define void @print_warning_hex32(i32 %0) {
%2 = tail call i32 @__console_tx_hex32(i32 4, i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0x11() {
  Assert_real((isodigit(17) == 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_isodigit.c",
              90, ("isodigit should be 0 for 0x11"));
}


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

x86 assembly (clang, -O2):
<t_isodigit_0x11>:
push   %rax
mov    $0x11,%edi
call   1040 <isodigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x5a,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 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_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0x11\00"
define void @t_isodigit_0x11() {
%1 = call i64 @isodigit(i32 17)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 90, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 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_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0x11\00"
define void @t_isodigit_0x11() {
%1 = tail call i64 @isodigit(i32 17)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 90, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
char *fixit(char *, char *);
char *fixtype(char *type) { return (fixit(type, type)); }


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

x86 assembly (clang, -O2):
<fixtype>:
mov    %rdi,%rsi
jmp    1030 <fixit@plt>

LLVM IR (-O0):
define i8* @fixtype(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @fixit(i8* %3, i8* %4)
ret i8* %5
}

LLVM IR (-O2):
define i8* @fixtype(i8* %0) {
%2 = tail call i8* @fixit(i8* %0, i8* %0)
ret i8* %2
}
double pathcon_nm9_sq(double x) { return x * x; }


x86 assembly (clang, -O0):
<pathcon_nm9_sq>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<pathcon_nm9_sq>:
mulsd  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @pathcon_nm9_sq(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = fmul double %3, %4
ret double %5
}

LLVM IR (-O2):
define double @pathcon_nm9_sq(double %0) {
%2 = fmul double %0, %0
ret double %2
}
int shlib_overriddencall2() { return 8; }


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

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

LLVM IR (-O0):
define i32 @shlib_overriddencall2() {
ret i32 8
}

LLVM IR (-O2):
define i32 @shlib_overriddencall2() {
ret i32 8
}
/* Variables and functions */
void *ft_memset(void *dest, int c, size_t length) {
  unsigned char *dst;
  size_t i;
  i = 0;
  dst = (unsigned char *)dest;
  if (length && dest) {
    while (i < length) {
      dst[i] = (unsigned char)c;
      i++;
    }
  }
  return (dest);
}


x86 assembly (clang, -O0):
<ft_memset>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
movq   $0x0,-0x28(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     116e <ft_memset+0x6e>
cmpq   $0x0,-0x8(%rbp)
je     116e <ft_memset+0x6e>
jmp    113a <ft_memset+0x3a>
mov    -0x28(%rbp),%rax
cmp    -0x18(%rbp),%rax
jae    1169 <ft_memset+0x69>
mov    -0xc(%rbp),%eax
mov    %al,%dl
mov    -0x20(%rbp),%rax
mov    -0x28(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
jmp    113a <ft_memset+0x3a>
jmp    116e <ft_memset+0x6e>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_memset>:
push   %rbx
mov    %rdi,%rbx
test   %rdi,%rdi
je     1126 <ft_memset+0x16>
test   %rdx,%rdx
je     1126 <ft_memset+0x16>
mov    %rbx,%rdi
call   1030 <memset@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @ft_memset(i8* %0, i32 %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i64
%7 = alloca i8*
%8 = alloca i64
store i8* %0, i8** %4
store i32 %1, i32* %5
store i64 %2, i64* %6
store i64 0, i64* %8
%9 = load i8*, i8** %4
store i8* %9, i8** %7
%10 = load i64, i64* %6
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %29
12: ; preds = %3
%13 = load i8*, i8** %4
%14 = icmp ne i8* %13, null
br i1 %14, label %15, label %29
15: ; preds = %12
br label %16
16: ; preds = %20, %15
%17 = load i64, i64* %8
%18 = load i64, i64* %6
%19 = icmp ult i64 %17, %18
br i1 %19, label %20, label %28
20: ; preds = %16
%21 = load i32, i32* %5
%22 = trunc i32 %21 to i8
%23 = load i8*, i8** %7
%24 = load i64, i64* %8
%25 = getelementptr inbounds i8, i8* %23, i64 %24
store i8 %22, i8* %25
%26 = load i64, i64* %8
%27 = add i64 %26, 1
store i64 %27, i64* %8
br label %16
28: ; preds = %16
br label %29
29: ; preds = %28, %12, %3
%30 = load i8*, i8** %4
ret i8* %30
}

LLVM IR (-O2):
define i8* @ft_memset(i8* returned writeonly %0, i32 %1, i64 %2) {
%4 = icmp ne i64 %2, 0
%5 = icmp ne i8* %0, null
%6 = and i1 %5, %4
br i1 %6, label %7, label %9
7: ; preds = %3
%8 = trunc i32 %1 to i8
br label %9
9: ; preds = %7, %3
ret i8* %0
}
int lshifts(int val, int cnt) {
  if (val < 0)
    return val;
  return val << cnt;
}


x86 assembly (clang, -O0):
<lshifts>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    111f <lshifts+0x1f>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    112a <lshifts+0x2a>
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
shl    %cl,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lshifts>:
mov    %edi,%eax
xor    %ecx,%ecx
test   %edi,%edi
cmovns %esi,%ecx
shl    %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @lshifts(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, 0
%4 = select i1 %3, i32 0, i32 %1
%5 = shl i32 %0, %4
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ the_function();
int /*<<< orphan*/ the_hidden_function();
int /*<<< orphan*/ the_static_function();
int /*<<< orphan*/ the_used_function();
int /*<<< orphan*/ the_visible_function();
int main() {
  the_function();
  the_static_function();
  the_used_function();
  the_hidden_function();
  the_visible_function();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <the_function@plt>
mov    $0x0,%al
call   1070 <the_static_function@plt>
mov    $0x0,%al
call   1030 <the_used_function@plt>
mov    $0x0,%al
call   1050 <the_hidden_function@plt>
mov    $0x0,%al
call   1060 <the_visible_function@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <the_function@plt>
xor    %eax,%eax
call   1070 <the_static_function@plt>
xor    %eax,%eax
call   1030 <the_used_function@plt>
xor    %eax,%eax
call   1050 <the_hidden_function@plt>
xor    %eax,%eax
call   1060 <the_visible_function@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @the_function()
%2 = call i32 (...) @the_static_function()
%3 = call i32 (...) @the_used_function()
%4 = call i32 (...) @the_hidden_function()
%5 = call i32 (...) @the_visible_function()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @the_function()
%2 = tail call i32 (...) @the_static_function()
%3 = tail call i32 (...) @the_used_function()
%4 = tail call i32 (...) @the_hidden_function()
%5 = tail call i32 (...) @the_visible_function()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ test_erlang_comment_entities();
int /*<<< orphan*/ test_erlang_comments();
void all_erlang_tests() {
  test_erlang_comments();
  test_erlang_comment_entities();
}


x86 assembly (clang, -O0):
<all_erlang_tests>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <test_erlang_comments@plt>
mov    $0x0,%al
call   1030 <test_erlang_comment_entities@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @all_erlang_tests() {
%1 = call i32 (...) @test_erlang_comments()
%2 = call i32 (...) @test_erlang_comment_entities()
ret void
}

LLVM IR (-O2):
define void @all_erlang_tests() {
%1 = tail call i32 (...) @test_erlang_comments()
%2 = tail call i32 (...) @test_erlang_comment_entities()
ret void
}
void test_108(unsigned short *x, unsigned int *y) { y[0] = x[1] >> 9; }


x86 assembly (clang, -O0):
<test_108>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movzwl 0x2(%rax),%ecx
sar    $0x9,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_108>:
movzwl 0x2(%rdi),%eax
shr    $0x9,%eax
mov    %eax,(%rsi)
ret

LLVM IR (-O0):
define void @test_108(i16* %0, i32* %1) {
%3 = alloca i16*
%4 = alloca i32*
store i16* %0, i16** %3
store i32* %1, i32** %4
%5 = load i16*, i16** %3
%6 = getelementptr inbounds i16, i16* %5, i64 1
%7 = load i16, i16* %6
%8 = zext i16 %7 to i32
%9 = ashr i32 %8, 9
%10 = load i32*, i32** %4
%11 = getelementptr inbounds i32, i32* %10, i64 0
store i32 %9, i32* %11
ret void
}

LLVM IR (-O2):
define void @test_108(i16* nocapture %0, i32* nocapture writeonly %1) {
%3 = getelementptr inbounds i16, i16* %0, i64 1
%4 = load i16, i16* %3
%5 = lshr i16 %4, 9
%6 = zext i16 %5 to i32
store i32 %6, i32* %1
ret void
}
/* Variables and functions */
bool bxor(bool a, bool b) { return (a && !b) || (!a && b); }


x86 assembly (clang, -O0):
<bxor>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1123 <bxor+0x23>
mov    $0x1,%al
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     1142 <bxor+0x42>
xor    %eax,%eax
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0xa(%rbp)
jne    113c <bxor+0x3c>
cmpl   $0x0,-0x8(%rbp)
setne  %al
mov    %al,-0xa(%rbp)
mov    -0xa(%rbp),%al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bxor>:
test   %edi,%edi
setne  %al
test   %esi,%esi
setne  %cl
xor    %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @bxor(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 = icmp ne i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i32, i32* %4
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %18
10: ; preds = %7, %2
%11 = load i32, i32* %3
%12 = icmp ne i32 %11, 0
br i1 %12, label %16, label %13
13: ; preds = %10
%14 = load i32, i32* %4
%15 = icmp ne i32 %14, 0
br label %16
16: ; preds = %13, %10
%17 = phi i1 [ false, %10 ], [ %15, %13 ]
br label %18
18: ; preds = %16, %7
%19 = phi i1 [ true, %7 ], [ %17, %16 ]
%20 = zext i1 %19 to i32
ret i32 %20
}

LLVM IR (-O2):
define i32 @bxor(i32 %0, i32 %1) {
%3 = icmp ne i32 %0, 0
%4 = icmp ne i32 %1, 0
%5 = xor i1 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ eval_string(char *);
char *pop_string();
void eval_tos(void) {
  char *p;
  p = pop_string();
  if (p == NULL)
    return;
  eval_string(p);
}


x86 assembly (clang, -O0):
<eval_tos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <pop_string@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1143 <eval_tos+0x23>
jmp    114c <eval_tos+0x2c>
mov    -0x8(%rbp),%rdi
call   1030 <eval_string@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eval_tos>:
push   %rax
xor    %eax,%eax
call   1040 <pop_string@plt>
test   %rax,%rax
je     1136 <eval_tos+0x16>
mov    %rax,%rdi
pop    %rax
jmp    1030 <eval_string@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @eval_tos() {
%1 = tail call i8* (...) @pop_string()
%2 = icmp eq i8* %1, null
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @eval_string(i8* %1)
br label %5
5: ; preds = %0, %3
ret void
}
void CRYPTO_dup_ex_data(void) {}


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

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

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

LLVM IR (-O2):
define void @CRYPTO_dup_ex_data() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ debug(char *, ...);
int M82_f(char *s) {
  debug("M82_f(const char *s) is not yet implemented!\n");
  debug("%s\n", s);
  return 1;
}


x86 assembly (clang, -O0):
<M82_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    -0x8(%rbp),%rsi
lea    0xef9(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<M82_f>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
xor    %eax,%eax
call   1030 <debug@plt>
lea    0xf05(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <debug@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [46 x i8] c"M82_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M82_f(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 1
}

LLVM IR (-O2):
@.str = [46 x i8] c"M82_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M82_f(i8* %0) {
%2 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret i32 1
}
/* Variables and functions */
void *malloc(size_t);
void *MALLOC(size_t n) { return malloc(n); }


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

x86 assembly (clang, -O2):
<MALLOC>:
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define i8* @MALLOC(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i8* @malloc(i64 %3)
ret i8* %4
}

LLVM IR (-O2):
define noalias i8* @MALLOC(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
ret i8* %2
}
/* Variables and functions */
float pow(float, double);
float sin(float);
float g(float x) { return (pow(x, 2.0) * sin(x)); }


x86 assembly (clang, -O0):
<g>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movsd  0xec6(%rip),%xmm1
call   1040 <pow@plt>
movss  %xmm0,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <sin@plt>
movaps %xmm0,%xmm1
movss  -0x8(%rbp),%xmm0
mulss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<g>:
push   %rax
movss  %xmm0,(%rsp)
movsd  0xed2(%rip),%xmm1
call   1040 <pow@plt>
movss  %xmm0,0x4(%rsp)
movss  (%rsp),%xmm0
call   1030 <sin@plt>
mulss  0x4(%rsp),%xmm0
pop    %rax
ret

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

LLVM IR (-O2):
define float @g(float %0) {
%2 = tail call float @pow(float %0, double 2.000000e+00)
%3 = tail call float @sin(float %0)
%4 = fmul float %2, %3
ret float %4
}
int cdm_db_create(const char *dbname) {}


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

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

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

LLVM IR (-O2):
define i32 @cdm_db_create(i8* nocapture readnone %0) {
ret i32 undef
}
/* Type definitions */
struct REOProblem {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ REOProblem_reset_variables(struct REOProblem *);
void REOProblem_set_initial_assignment(struct REOProblem *self) {
  REOProblem_reset_variables(self);
}


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

x86 assembly (clang, -O2):
<REOProblem_set_initial_assignment>:
jmp    1030 <REOProblem_reset_variables@plt>

LLVM IR (-O0):
%struct.REOProblem = type { i32 }
define void @REOProblem_set_initial_assignment(%struct.REOProblem* %0) {
%2 = alloca %struct.REOProblem*
store %struct.REOProblem* %0, %struct.REOProblem** %2
%3 = load %struct.REOProblem*, %struct.REOProblem** %2
%4 = call i32 @REOProblem_reset_variables(%struct.REOProblem* %3)
ret void
}

LLVM IR (-O2):
%struct.REOProblem = type { i32 }
define void @REOProblem_set_initial_assignment(%struct.REOProblem* %0) {
%2 = tail call i32 @REOProblem_reset_variables(%struct.REOProblem* %0)
ret void
}
void hw_gsm_deinit(void) {}


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

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

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

LLVM IR (-O2):
define void @hw_gsm_deinit() {
ret void
}
int compare_int(int a, int b) {
  if (a < b) {
    return -1;
  }
  if (a == b) {
    return 0;
  }
  if (a > b) {
    return 1;
  }
}


x86 assembly (clang, -O0):
<compare_int>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1122 <compare_int+0x22>
movl   $0xffffffff,-0x4(%rbp)
jmp    114d <compare_int+0x4d>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    113a <compare_int+0x3a>
movl   $0x0,-0x4(%rbp)
jmp    114d <compare_int+0x4d>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    114d <compare_int+0x4d>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare_int>:
xor    %ecx,%ecx
cmp    %esi,%edi
setne  %cl
mov    $0xffffffff,%eax
cmovge %ecx,%eax
ret

LLVM IR (-O0):
define i32 @compare_int(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %4
%7 = load i32, i32* %5
%8 = icmp slt i32 %6, %7
br i1 %8, label %9, label %10
9: ; preds = %2
store i32 -1, i32* %3
br label %20
10: ; preds = %2
%11 = load i32, i32* %4
%12 = load i32, i32* %5
%13 = icmp eq i32 %11, %12
br i1 %13, label %14, label %15
14: ; preds = %10
store i32 0, i32* %3
br label %20
15: ; preds = %10
%16 = load i32, i32* %4
%17 = load i32, i32* %5
%18 = icmp sgt i32 %16, %17
br i1 %18, label %19, label %20
19: ; preds = %15
store i32 1, i32* %3
br label %20
20: ; preds = %9, %14, %19, %15
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
define i32 @compare_int(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = icmp ne i32 %0, %1
%5 = zext i1 %4 to i32
%6 = select i1 %3, i32 -1, i32 %5
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ g5_set_xmjMC(int, int, int, double **, double *);
void(g5_set_xmjMC_)(int *devid, int *adr, int *nj, double (*xj)[3],
                    double *mj) {
  g5_set_xmjMC(*devid, *adr, *nj, xj, mj);
}


x86 assembly (clang, -O0):
<g5_set_xmjMC_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
mov    -0x18(%rbp),%rax
mov    (%rax),%edx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
call   1030 <g5_set_xmjMC@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<g5_set_xmjMC_>:
mov    (%rdi),%edi
mov    (%rsi),%esi
mov    (%rdx),%edx
jmp    1030 <g5_set_xmjMC@plt>

LLVM IR (-O0):
define void @g5_set_xmjMC_(i32* %0, i32* %1, i32* %2, [3 x double]* %3, double* %4) {
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca [3 x double]*
%10 = alloca double*
store i32* %0, i32** %6
store i32* %1, i32** %7
store i32* %2, i32** %8
store [3 x double]* %3, [3 x double]** %9
store double* %4, double** %10
%11 = load i32*, i32** %6
%12 = load i32, i32* %11
%13 = load i32*, i32** %7
%14 = load i32, i32* %13
%15 = load i32*, i32** %8
%16 = load i32, i32* %15
%17 = load [3 x double]*, [3 x double]** %9
%18 = bitcast [3 x double]* %17 to double**
%19 = load double*, double** %10
%20 = call i32 @g5_set_xmjMC(i32 %12, i32 %14, i32 %16, double** %18, double* %19)
ret void
}

LLVM IR (-O2):
define void @g5_set_xmjMC_(i32* nocapture %0, i32* nocapture %1, i32* nocapture %2, [3 x double]* %3, double* %4) {
%6 = load i32, i32* %0
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = bitcast [3 x double]* %3 to double**
%10 = tail call i32 @g5_set_xmjMC(i32 %6, i32 %7, i32 %8, double** %9, double* %4)
ret void
}
/* Type definitions */
struct utmpx {
  int dummy;
};

/* Variables and functions */
scalar_t__ __getutent();
struct utmpx *__getutxent(void) {
  return (struct utmpx *)__getutent();
}


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

x86 assembly (clang, -O2):
<__getutxent>:
xor    %eax,%eax
jmp    1030 <__getutent@plt>

LLVM IR (-O0):
%struct.utmpx = type { i32 }
define %struct.utmpx* @__getutxent() {
%1 = call i64 (...) @__getutent()
%2 = inttoptr i64 %1 to %struct.utmpx*
ret %struct.utmpx* %2
}

LLVM IR (-O2):
%struct.utmpx = type { i32 }
define %struct.utmpx* @__getutxent() {
%1 = tail call i64 (...) @__getutent()
%2 = inttoptr i64 %1 to %struct.utmpx*
ret %struct.utmpx* %2
}
/* Variables and functions */
int /*<<< orphan*/ bar();
void foo(int x) {
  if (x)
    bar();
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     112c <foo+0x1c>
mov    $0x0,%al
call   1030 <bar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
test   %edi,%edi
je     111b <foo+0xb>
xor    %eax,%eax
jmp    1030 <bar@plt>
ret

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

LLVM IR (-O2):
define void @foo(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 (...) @bar()
br label %5
5: ; preds = %3, %1
ret void
}
void SobelToPlaneRow_Any_NEON() {}


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

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

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

LLVM IR (-O2):
define void @SobelToPlaneRow_Any_NEON() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bar(int);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int main() {
  bar(1);
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
call   1030 <bar@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1030 <bar@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @bar(i32 1)
%3 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @bar(i32 1)
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
char getchar();
void clean(void) {
  while (getchar() != '\n')
    continue;
}


x86 assembly (clang, -O0):
<clean>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <clean+0x9>
mov    $0x0,%al
call   1030 <getchar@plt>
movsbl %al,%eax
cmp    $0xa,%eax
je     1131 <clean+0x21>
jmp    1119 <clean+0x9>
pop    %rbp
ret

x86 assembly (clang, -O2):
<clean>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <getchar@plt>
cmp    $0xa,%al
jne    1120 <clean+0x10>
pop    %rax
ret

LLVM IR (-O0):
define void @clean() {
br label %1
1: ; preds = %5, %0
%2 = call signext i8 (...) @getchar()
%3 = sext i8 %2 to i32
%4 = icmp ne i32 %3, 10
br i1 %4, label %5, label %6
5: ; preds = %1
br label %1
6: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @clean() {
br label %1
1: ; preds = %1, %0
%2 = tail call signext i8 (...) @getchar()
%3 = icmp eq i8 %2, 10
br i1 %3, label %4, label %1
4: ; preds = %1
ret void
}
/* Variables and functions */
float sla_rvgalc_(float *, float *);
float slaRvgalc(float ra, float dec) {
  float RA;
  float DEC;
  float result;
  RA = ra;
  DEC = dec;
  result = sla_rvgalc_(&RA, &DEC);
  return result;
}


x86 assembly (clang, -O0):
<slaRvgalc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
lea    -0xc(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1030 <sla_rvgalc_@plt>
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<slaRvgalc>:
push   %rax
movss  %xmm0,0x4(%rsp)
movss  %xmm1,(%rsp)
lea    0x4(%rsp),%rdi
mov    %rsp,%rsi
call   1030 <sla_rvgalc_@plt>
pop    %rax
ret

LLVM IR (-O0):
define float @slaRvgalc(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
store float %0, float* %3
store float %1, float* %4
%8 = load float, float* %3
store float %8, float* %5
%9 = load float, float* %4
store float %9, float* %6
%10 = call float @sla_rvgalc_(float* %5, float* %6)
store float %10, float* %7
%11 = load float, float* %7
ret float %11
}

LLVM IR (-O2):
define float @slaRvgalc(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = bitcast float* %3 to i8*
%6 = bitcast float* %4 to i8*
store float %0, float* %3
store float %1, float* %4
%7 = call float @sla_rvgalc_(float* %3, float* %4)
ret float %7
}
/* Variables and functions */
unsigned long GetInteger322();
unsigned long getinteger() { return GetInteger322(); }


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

x86 assembly (clang, -O2):
<getinteger>:
xor    %eax,%eax
jmp    1030 <GetInteger322@plt>

LLVM IR (-O0):
define i64 @getinteger() {
%1 = call i64 (...) @GetInteger322()
ret i64 %1
}

LLVM IR (-O2):
define i64 @getinteger() {
%1 = tail call i64 (...) @GetInteger322()
ret i64 %1
}
void clear_str(char str[]) {
  short int i = 0;
  for (i = 0; i < 800; i++) {
    str[i] = 0;
  }
}


x86 assembly (clang, -O0):
<clear_str>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movw   $0x0,-0xa(%rbp)
movw   $0x0,-0xa(%rbp)
movswl -0xa(%rbp),%eax
cmp    $0x320,%eax
jge    1141 <clear_str+0x41>
mov    -0x8(%rbp),%rax
movswq -0xa(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0xa(%rbp),%ax
add    $0x1,%ax
mov    %ax,-0xa(%rbp)
jmp    1114 <clear_str+0x14>
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_str>:
push   %rax
mov    $0x320,%edx
xor    %esi,%esi
call   1030 <memset@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @clear_str(i8* nocapture writeonly %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_assert(int);
int main(void) {
  unsigned int x = 0;
  unsigned short N;
  while (x < N) {
    x += 2;
  }
  __VERIFIER_assert(!(x % 2));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
movzwl -0xa(%rbp),%ecx
cmp    %ecx,%eax
jae    1143 <main+0x33>
mov    -0x8(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
mov    -0x8(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__VERIFIER_assert@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i16
store i32 0, i32* %1
store i32 0, i32* %2
br label %4
4: ; preds = %9, %0
%5 = load i32, i32* %2
%6 = load i16, i16* %3
%7 = zext i16 %6 to i32
%8 = icmp ult i32 %5, %7
br i1 %8, label %9, label %12
9: ; preds = %4
%10 = load i32, i32* %2
%11 = add i32 %10, 2
store i32 %11, i32* %2
br label %4
12: ; preds = %4
%13 = load i32, i32* %2
%14 = urem i32 %13, 2
%15 = icmp ne i32 %14, 0
%16 = xor i1 %15, true
%17 = zext i1 %16 to i32
%18 = call i32 @__VERIFIER_assert(i32 %17)
%19 = load i32, i32* %1
ret i32 %19
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @__VERIFIER_assert(i32 1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ sleep(int);
void processo() { sleep(3); }


x86 assembly (clang, -O0):
<processo>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3,%edi
call   1030 <sleep@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<processo>:
mov    $0x3,%edi
jmp    1030 <sleep@plt>

LLVM IR (-O0):
define void @processo() {
%1 = call i32 @sleep(i32 3)
ret void
}

LLVM IR (-O2):
define void @processo() {
%1 = tail call i32 @sleep(i32 3)
ret void
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
int raw_ctz(scalar_t__);
int ctz32(uint32_t n) { return n ? raw_ctz(n) : 32; }


x86 assembly (clang, -O0):
<ctz32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1138 <ctz32+0x28>
mov    -0x8(%rbp),%rdi
call   1030 <raw_ctz@plt>
mov    %eax,-0xc(%rbp)
jmp    1145 <ctz32+0x35>
mov    $0x20,%eax
mov    %eax,-0xc(%rbp)
jmp    1145 <ctz32+0x35>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ctz32>:
test   %rdi,%rdi
je     111a <ctz32+0xa>
jmp    1030 <raw_ctz@plt>
mov    $0x20,%eax
ret

LLVM IR (-O0):
define i32 @ctz32(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i64, i64* %2
%7 = call i32 @raw_ctz(i64 %6)
br label %9
8: ; preds = %1
br label %9
9: ; preds = %8, %5
%10 = phi i32 [ %7, %5 ], [ 32, %8 ]
ret i32 %10
}

LLVM IR (-O2):
define i32 @ctz32(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @raw_ctz(i64 %0)
br label %5
5: ; preds = %1, %3
%6 = phi i32 [ %4, %3 ], [ 32, %1 ]
ret i32 %6
}
/* Type definitions */
typedef int uint8_t;
typedef scalar_t__ uint32_t;

/* Variables and functions */
void USBHostResume(uint32_t ui32Base, bool bStart) {
  ;
  if (bStart) {
    (*((volatile uint8_t *)(ui32Base + 0x00000001))) |= 0x00000004;
  } else {
    (*((volatile uint8_t *)(ui32Base + 0x00000001))) &= ~0x00000004;
  }
}


x86 assembly (clang, -O0):
<USBHostResume>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1127 <USBHostResume+0x27>
mov    -0x8(%rbp),%rax
mov    0x1(%rax),%ecx
or     $0x4,%ecx
mov    %ecx,0x1(%rax)
jmp    1134 <USBHostResume+0x34>
mov    -0x8(%rbp),%rax
mov    0x1(%rax),%ecx
and    $0xfffffffb,%ecx
mov    %ecx,0x1(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<USBHostResume>:
xor    %eax,%eax
test   %esi,%esi
setne  %al
mov    0x1(%rdi),%ecx
and    $0xfffffffb,%ecx
lea    (%rcx,%rax,4),%eax
mov    %eax,0x1(%rdi)
ret

LLVM IR (-O0):
define void @USBHostResume(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
store i64 %0, i64* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %13
7: ; preds = %2
%8 = load i64, i64* %3
%9 = add nsw i64 %8, 1
%10 = inttoptr i64 %9 to i32*
%11 = load volatile i32, i32* %10
%12 = or i32 %11, 4
store volatile i32 %12, i32* %10
br label %19
13: ; preds = %2
%14 = load i64, i64* %3
%15 = add nsw i64 %14, 1
%16 = inttoptr i64 %15 to i32*
%17 = load volatile i32, i32* %16
%18 = and i32 %17, -5
store volatile i32 %18, i32* %16
br label %19
19: ; preds = %13, %7
ret void
}

LLVM IR (-O2):
define void @USBHostResume(i64 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
%4 = add nsw i64 %0, 1
%5 = inttoptr i64 %4 to i32*
%6 = load volatile i32, i32* %5
%7 = and i32 %6, -5
%8 = select i1 %3, i32 0, i32 4
%9 = or i32 %7, %8
store volatile i32 %9, i32* %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write(char *, char *, char *);
void function_uname(char *uname) { write("csv-task.csv", "%s,", uname); }


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

x86 assembly (clang, -O2):
<function_uname>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
lea    0xeec(%rip),%rsi
jmp    1030 <write@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"csv-task.csv\00"
@.str.1 = [4 x i8] c"%s,\00"
define void @function_uname(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @write(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"csv-task.csv\00"
@.str.1 = [4 x i8] c"%s,\00"
define void @function_uname(i8* %0) {
%2 = tail call i32 @write(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
char *parse_read_int(FILE *f) { return NULL; }


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

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

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

LLVM IR (-O2):
define noalias i8* @parse_read_int(i32* nocapture readnone %0) {
ret i8* null
}
__attribute__((always_)) int func8b(int x) { return x < 7 ? 11 : 9; }


x86 assembly (clang, -O0):
<func8b>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
mov    $0x9,%eax
mov    $0xb,%ecx
cmp    $0x7,%edx
cmovl  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<func8b>:
xor    %eax,%eax
cmp    $0x7,%edi
setl   %al
add    %eax,%eax
add    $0x9,%eax
ret

LLVM IR (-O0):
define i32 @func8b(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 7
%5 = zext i1 %4 to i64
%6 = select i1 %4, i32 11, i32 9
ret i32 %6
}

LLVM IR (-O2):
define i32 @func8b(i32 %0) {
%2 = icmp slt i32 %0, 7
%3 = select i1 %2, i32 11, i32 9
ret i32 %3
}
void test_31_0(char *mem) { __atomic_or_fetch(mem, 1, 4); }


x86 assembly (clang, -O0):
<test_31_0>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
movb   $0x1,-0x9(%rbp)
mov    -0x9(%rbp),%cl
mov    %cl,-0xc(%rbp)
mov    (%rax),%al
mov    %al,-0xb(%rbp)
mov    -0xb(%rbp),%al
mov    -0x18(%rbp),%rcx
mov    -0xc(%rbp),%sil
mov    %al,%dl
or     %sil,%dl
lock cmpxchg %dl,(%rcx)
sete   %cl
mov    %al,-0x19(%rbp)
test   $0x1,%cl
mov    %al,-0xb(%rbp)
jne    114a <test_31_0+0x4a>
jmp    111f <test_31_0+0x1f>
mov    -0xc(%rbp),%cl
mov    -0x19(%rbp),%al
or     %cl,%al
mov    %al,-0xa(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_31_0>:
lock orb $0x1,(%rdi)
ret

LLVM IR (-O0):
define void @test_31_0(i8* %0) {
%2 = alloca i8*
%3 = alloca i8
%4 = alloca i8
store i8* %0, i8** %2
%5 = load i8*, i8** %2
store i8 1, i8* %3
%6 = load i8, i8* %3
%7 = atomicrmw or i8* %5, i8 %6 acq_rel
%8 = or i8 %7, %6
store i8 %8, i8* %4
%9 = load i8, i8* %4
ret void
}

LLVM IR (-O2):
define void @test_31_0(i8* nocapture %0) {
%2 = atomicrmw or i8* %0, i8 1 acq_rel
ret void
}
putchar(unsigned ch) {
  if (ch == '\n')
    putchar('\r');
  while ((*(volatile unsigned *)0xFF000000 != 0))
    ;
  (*(volatile unsigned *)0xFF000000 = (ch));
}


x86 assembly (clang, -O0):
<putchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jne    112f <putchar+0x1f>
mov    $0xd,%edi
call   1030 <putchar@plt>
jmp    1134 <putchar+0x24>
mov    $0xff000000,%eax
mov    (%rax),%eax
cmp    $0x0,%eax
je     1149 <putchar+0x39>
jmp    1134 <putchar+0x24>
mov    -0x8(%rbp),%ecx
mov    $0xff000000,%eax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putchar>:
mov    $0xff000000,%eax
cmp    $0xa,%edi
jne    1120 <putchar+0x20>
nopw   0x0(%rax,%rax,1)
cmpl   $0x0,(%rax)
jne    1110 <putchar+0x10>
movl   $0xd,(%rax)
nopl   0x0(%rax,%rax,1)
cmpl   $0x0,(%rax)
jne    1120 <putchar+0x20>
mov    %edi,(%rax)
ret

LLVM IR (-O0):
define i32 @putchar(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 10
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @putchar(i32 13)
br label %8
8: ; preds = %6, %1
br label %9
9: ; preds = %12, %8
%10 = load volatile i32, i32* inttoptr (i64 4278190080 to i32*)
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %9
br label %9
13: ; preds = %9
%14 = load i32, i32* %3
store volatile i32 %14, i32* inttoptr (i64 4278190080 to i32*)
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @putchar(i32 %0) {
%2 = icmp eq i32 %0, 10
br i1 %2, label %3, label %7
3: ; preds = %1, %3
%4 = load volatile i32, i32* inttoptr (i64 4278190080 to i32*)
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %3
6: ; preds = %3
store volatile i32 13, i32* inttoptr (i64 4278190080 to i32*)
br label %7
7: ; preds = %6, %1
br label %8
8: ; preds = %7, %8
%9 = load volatile i32, i32* inttoptr (i64 4278190080 to i32*)
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %8
11: ; preds = %8
store volatile i32 %0, i32* inttoptr (i64 4278190080 to i32*)
ret i32 undef
}
/* Variables and functions */
int getgid();
int g_getgid(void) { return getgid(); }


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

x86 assembly (clang, -O2):
<g_getgid>:
xor    %eax,%eax
jmp    1030 <getgid@plt>

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

LLVM IR (-O2):
define i32 @g_getgid() {
%1 = tail call i32 (...) @getgid()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
void uninitvar_putchar(void) {
  char c;
  putchar(c);
}


x86 assembly (clang, -O0):
<uninitvar_putchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsbl -0x1(%rbp),%edi
call   1030 <putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @uninitvar_putchar() {
%1 = alloca i8
%2 = load i8, i8* %1
%3 = call i32 @putchar(i8 signext %2)
ret void
}

LLVM IR (-O2):
define void @uninitvar_putchar() {
%1 = tail call i32 @putchar(i8 signext undef)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SHA512_d(unsigned char const *, size_t, unsigned char *);
void crypto_hash_sha512(unsigned char *hash, const unsigned char *in,
                        size_t inlen) {
  SHA512_d(in, inlen, hash);
}


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

x86 assembly (clang, -O2):
<crypto_hash_sha512>:
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rdx,%rsi
mov    %rax,%rdx
jmp    1030 <SHA512_d@plt>

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

LLVM IR (-O2):
define void @crypto_hash_sha512(i8* %0, i8* %1, i64 %2) {
%4 = tail call i32 @SHA512_d(i8* %1, i64 %2, i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ disp_color_str(char *, int);
int /*<<< orphan*/ disp_str(char *);
void panic(char *msg) {
  disp_color_str("kenos panic: ", 4);
  disp_str(msg);
  disp_str("\n\r");
  for (;;)
    ;
}


x86 assembly (clang, -O0):
<panic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
mov    $0x4,%esi
call   1040 <disp_color_str@plt>
mov    -0x8(%rbp),%rdi
call   1030 <disp_str@plt>
lea    0xec1(%rip),%rdi
call   1030 <disp_str@plt>
jmp    1152 <panic+0x32>

x86 assembly (clang, -O2):
<panic>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
mov    $0x4,%esi
call   1040 <disp_color_str@plt>
mov    %rbx,%rdi
call   1030 <disp_str@plt>
lea    0xeca(%rip),%rdi
call   1030 <disp_str@plt>
nopl   0x0(%rax)
jmp    1150 <panic+0x30>

LLVM IR (-O0):
@.str = [14 x i8] c"kenos panic: \00"
@.str.1 = [3 x i8] c"\0A\0D\00"
define void @panic(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @disp_color_str(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 4)
%4 = load i8*, i8** %2
%5 = call i32 @disp_str(i8* %4)
%6 = call i32 @disp_str(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
br label %7
7: ; preds = %7, %1
br label %7
}

LLVM IR (-O2):
@.str = [14 x i8] c"kenos panic: \00"
@.str.1 = [3 x i8] c"\0A\0D\00"
define void @panic(i8* %0) {
%2 = tail call i32 @disp_color_str(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 4)
%3 = tail call i32 @disp_str(i8* %0)
%4 = tail call i32 @disp_str(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
br label %5
5: ; preds = %5, %1
br label %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, short);
int main(void) {
  short int numprocs = -1;
  printf("%d\n", numprocs);
  if (numprocs < 0) {
    exit(1);
  } else {
    exit(0);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movw   $0xffff,-0x6(%rbp)
lea    0xec4(%rip),%rdi
movswl -0x6(%rbp),%esi
call   1030 <printf@plt>
movswl -0x6(%rbp),%eax
cmp    $0x0,%eax
jge    115c <main+0x3c>
mov    $0x1,%edi
call   1040 <exit@plt>
xor    %edi,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i16
store i32 0, i32* %1
store i16 -1, i16* %2
%3 = load i16, i16* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i16 signext %3)
%5 = load i16, i16* %2
%6 = sext i16 %5 to i32
%7 = icmp slt i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %0
%9 = call i32 @exit(i32 1)
unreachable
10: ; preds = %0
%11 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i16 signext -1)
%2 = tail call i32 @exit(i32 1)
unreachable
}