xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int int64_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
double stdlib_strided_dmaxabssorted(int, double *, int);
int main() {
  double x[] = {-1.0, -2.0, -3.0, -4.0, -5.0, -6.0, -7.0, -8.0};
  int64_t N = 4;
  int64_t stride = 2;
  double v = stdlib_strided_dmaxabssorted(N, x, stride);
  printf("maxabs: %lf\n", v);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
lea    -0x40(%rbp),%rdi
lea    0xebd(%rip),%rsi
mov    $0x40,%edx
call   1040 <memcpy@plt>
movl   $0x4,-0x44(%rbp)
movl   $0x2,-0x48(%rbp)
mov    -0x44(%rbp),%edi
lea    -0x40(%rbp),%rsi
mov    -0x48(%rbp),%edx
call   1050 <stdlib_strided_dmaxabssorted@plt>
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x48,%rsp
movaps 0xf05(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xee9(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xecd(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xeb1(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rsi
mov    $0x4,%edi
mov    $0x2,%edx
call   1040 <stdlib_strided_dmaxabssorted@plt>
lea    0xed4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x48,%rsp
ret

LLVM IR (-O0):
@__const.main.x = [8 x double] [double -1.000000e+00, double -2.000000e+00, double -3.000000e+00, double -4.000000e+00, double -5.000000e+00, double -6.000000e+00, double -7.000000e+00, double -8.000000e+00]
@.str = [13 x i8] c"maxabs: %lf\0A\00"
define i32 @main() {
%1 = alloca [8 x double]
%2 = alloca i32
%3 = alloca i32
%4 = alloca double
%5 = bitcast [8 x double]* %1 to i8*
store i32 4, i32* %2
store i32 2, i32* %3
%6 = load i32, i32* %2
%7 = getelementptr inbounds [8 x double], [8 x double]* %1, i64 0, i64 0
%8 = load i32, i32* %3
%9 = call double @stdlib_strided_dmaxabssorted(i32 %6, double* %7, i32 %8)
store double %9, double* %4
%10 = load double, double* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), double %10)
ret i32 0
}

LLVM IR (-O2):
@__const.main.x = [8 x double] [double -1.000000e+00, double -2.000000e+00, double -3.000000e+00, double -4.000000e+00, double -5.000000e+00, double -6.000000e+00, double -7.000000e+00, double -8.000000e+00]
@.str = [13 x i8] c"maxabs: %lf\0A\00"
define i32 @main() {
%1 = alloca [8 x double]
%2 = bitcast [8 x double]* %1 to i8*
%3 = getelementptr inbounds [8 x double], [8 x double]* %1, i64 0, i64 0
%4 = call double @stdlib_strided_dmaxabssorted(i32 4, double* %3, i32 2)
%5 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), double %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void test_func60(int foo) { printf("%d", foo); }


x86 assembly (clang, -O0):
<test_func60>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xedb(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_func60>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @test_func60(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
int uniphier_sbc_init_admulti(const struct uniphier_board_data *bd) {
  return 0;
}


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

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

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

LLVM IR (-O2):
%struct.uniphier_board_data = type opaque
define i32 @uniphier_sbc_init_admulti(%struct.uniphier_board_data* nocapture readnone %0) {
ret i32 0
}
circlearea(int r) {
  float result;
  result = (3.14) * r * r;
}


x86 assembly (clang, -O0):
<circlearea>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cvtsi2sdl -0x8(%rbp),%xmm1
movsd  0xeec(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsi2sdl -0x8(%rbp),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @circlearea(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca float
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = sitofp i32 %5 to double
%7 = fmul double 3.140000e+00, %6
%8 = load i32, i32* %3
%9 = sitofp i32 %8 to double
%10 = fmul double %7, %9
%11 = fptrunc double %10 to float
store float %11, float* %4
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @circlearea(i32 %0) {
ret i32 undef
}
void icaldirset_unlock(const char *dir) {}


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

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

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

LLVM IR (-O2):
define void @icaldirset_unlock(i8* nocapture %0) {
ret void
}
void pushBack(char **str, int count) { (*str) -= count; }


x86 assembly (clang, -O0):
<pushBack>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%edx
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
movslq %edx,%rsi
xor    %edx,%edx
sub    %rsi,%rdx
add    %rdx,%rcx
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<pushBack>:
movslq %esi,%rax
sub    %rax,(%rdi)
ret

LLVM IR (-O0):
define void @pushBack(i8** %0, i32 %1) {
%3 = alloca i8**
%4 = alloca i32
store i8** %0, i8*** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8**, i8*** %3
%7 = load i8*, i8** %6
%8 = sext i32 %5 to i64
%9 = sub i64 0, %8
%10 = getelementptr inbounds i8, i8* %7, i64 %9
store i8* %10, i8** %6
ret void
}

LLVM IR (-O2):
define void @pushBack(i8** nocapture %0, i32 %1) {
%3 = load i8*, i8** %0
%4 = sext i32 %1 to i64
%5 = sub nsw i64 0, %4
%6 = getelementptr inbounds i8, i8* %3, i64 %5
store i8* %6, i8** %0
ret void
}
void lvmlockd_init(struct cmd_context *cmd) {}


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

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

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

LLVM IR (-O2):
%struct.cmd_context = type opaque
define void @lvmlockd_init(%struct.cmd_context* nocapture %0) {
ret void
}
int test_imm_ADint64_midword_reg(long long val) {
  return ((val >> 16) & (0xAD << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_ADint64_midword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
sar    $0x10,%rdx
and    $0xad,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_ADint64_midword_reg>:
test   $0xad0000,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_ADint64_midword_reg(i64 %0) {
%2 = and i64 %0, 11337728
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int ip;
  printf("Enter Number:\n");
  scanf("%d", &ip);
  if (ip % 2 == 0) {
    printf("Number is Even");
  } else {
    printf("Number is Odd");
  }
  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>
lea    0xecd(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1170 <main+0x50>
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
jmp    117c <main+0x5c>
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xebc(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
testb  $0x1,0x4(%rsp)
lea    0xea9(%rip),%rax
lea    0xeb1(%rip),%rdi
cmove  %rax,%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [15 x i8] c"Number is Even\00"
@.str.3 = [14 x i8] c"Number is Odd\00"
@str = [14 x i8] c"Enter Number:\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = and i32 %5, 1
%7 = icmp eq i32 %6, 0
%8 = select i1 %7, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0)
%9 = call i32 @printf(i8* dereferenceable(1) %8)
ret i32 0
}
int main() {
  int s;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
char *malloc(scalar_t__);
int /*<<< orphan*/ strcpy(char *, char const *);
scalar_t__ strlen(char const *);
char *strdup(const char *str) {
  char *cpy = NULL;
  if (str) {
    cpy = malloc(strlen(str) + 1);
    if (cpy)
      strcpy(cpy, str);
  }
  return cpy;
}


x86 assembly (clang, -O0):
<strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1185 <strdup+0x55>
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1180 <strdup+0x50>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
jmp    1185 <strdup+0x55>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strdup>:
push   %r14
push   %rbx
push   %rax
test   %rdi,%rdi
je     115f <strdup+0x2f>
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <malloc@plt>
test   %rax,%rax
je     115f <strdup+0x2f>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
jmp    1161 <strdup+0x31>
xor    %ebx,%ebx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @strdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
store i8* null, i8** %3
%4 = load i8*, i8** %2
%5 = icmp ne i8* %4, null
br i1 %5, label %6, label %18
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = call i64 @strlen(i8* %7)
%9 = add nsw i64 %8, 1
%10 = call i8* @malloc(i64 %9)
store i8* %10, i8** %3
%11 = load i8*, i8** %3
%12 = icmp ne i8* %11, null
br i1 %12, label %13, label %17
13: ; preds = %6
%14 = load i8*, i8** %3
%15 = load i8*, i8** %2
%16 = call i32 @strcpy(i8* %14, i8* %15)
br label %17
17: ; preds = %13, %6
br label %18
18: ; preds = %17, %1
%19 = load i8*, i8** %3
ret i8* %19
}

LLVM IR (-O2):
define i8* @strdup(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %10, label %3
3: ; preds = %1
%4 = tail call i64 @strlen(i8* %0)
%5 = add nsw i64 %4, 1
%6 = tail call i8* @malloc(i64 %5)
%7 = icmp eq i8* %6, null
br i1 %7, label %10, label %8
8: ; preds = %3
%9 = tail call i32 @strcpy(i8* %6, i8* %0)
br label %10
10: ; preds = %3, %8, %1
%11 = phi i8* [ %6, %8 ], [ null, %3 ], [ null, %1 ]
ret i8* %11
}
int vmi_stop_hz_timer(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @vmi_stop_hz_timer() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ RTLD_NOW;
void *dlopen(char const *, int /*<<< orphan*/);
void *open_library(const char *lib) { return dlopen(lib, RTLD_NOW); }


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

x86 assembly (clang, -O2):
<open_library>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%esi
jmp    1030 <dlopen@plt>

LLVM IR (-O0):
@RTLD_NOW = global i32 0
define i8* @open_library(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @RTLD_NOW
%5 = call i8* @dlopen(i8* %3, i32 %4)
ret i8* %5
}

LLVM IR (-O2):
@RTLD_NOW = global i32 0
define i8* @open_library(i8* %0) {
%2 = load i32, i32* @RTLD_NOW
%3 = tail call i8* @dlopen(i8* %0, i32 %2)
ret i8* %3
}
/* Type definitions */
struct fmt_main {
  int dummy;
};

/* Variables and functions */
scalar_t__ valid_cisco(char *);
scalar_t__ valid_hex(char *);
int valid(char *ciphertext, struct fmt_main *self) {
  return (valid_hex(ciphertext) || valid_cisco(ciphertext));
}


x86 assembly (clang, -O0):
<valid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <valid_hex@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x11(%rbp)
jne    115e <valid+0x3e>
mov    -0x8(%rbp),%rdi
call   1040 <valid_cisco@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<valid>:
push   %rbx
mov    %rdi,%rbx
call   1030 <valid_hex@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1138 <valid+0x18>
pop    %rbx
ret
mov    %rbx,%rdi
call   1040 <valid_cisco@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

LLVM IR (-O0):
%struct.fmt_main = type { i32 }
define i32 @valid(i8* %0, %struct.fmt_main* %1) {
%3 = alloca i8*
%4 = alloca %struct.fmt_main*
store i8* %0, i8** %3
store %struct.fmt_main* %1, %struct.fmt_main** %4
%5 = load i8*, i8** %3
%6 = call i64 @valid_hex(i8* %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %12, label %8
8: ; preds = %2
%9 = load i8*, i8** %3
%10 = call i64 @valid_cisco(i8* %9)
%11 = icmp ne i64 %10, 0
br label %12
12: ; preds = %8, %2
%13 = phi i1 [ true, %2 ], [ %11, %8 ]
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
%struct.fmt_main = type { i32 }
define i32 @valid(i8* %0, %struct.fmt_main* nocapture readnone %1) {
%3 = tail call i64 @valid_hex(i8* %0)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = tail call i64 @valid_cisco(i8* %0)
%7 = icmp ne i64 %6, 0
%8 = zext i1 %7 to i32
br label %9
9: ; preds = %5, %2
%10 = phi i32 [ 1, %2 ], [ %8, %5 ]
ret i32 %10
}
/* Type definitions */
struct roadmap_history_log_entry {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/
roadmap_history_remove_entry(struct roadmap_history_log_entry *);
void roadmap_history_delete_entry(void *cursor) {
  struct roadmap_history_log_entry *entry = cursor;
  roadmap_history_remove_entry(entry);
}


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

x86 assembly (clang, -O2):
<roadmap_history_delete_entry>:
jmp    1030 <roadmap_history_remove_entry@plt>

LLVM IR (-O0):
%struct.roadmap_history_log_entry = type { i32 }
define void @roadmap_history_delete_entry(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.roadmap_history_log_entry*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to %struct.roadmap_history_log_entry*
store %struct.roadmap_history_log_entry* %5, %struct.roadmap_history_log_entry** %3
%6 = load %struct.roadmap_history_log_entry*, %struct.roadmap_history_log_entry** %3
%7 = call i32 @roadmap_history_remove_entry(%struct.roadmap_history_log_entry* %6)
ret void
}

LLVM IR (-O2):
%struct.roadmap_history_log_entry = type { i32 }
define void @roadmap_history_delete_entry(i8* %0) {
%2 = bitcast i8* %0 to %struct.roadmap_history_log_entry*
%3 = tail call i32 @roadmap_history_remove_entry(%struct.roadmap_history_log_entry* %2)
ret void
}
int all_pits_empty(int *pit) {
  int i;
  for (i = 0; i < 6; ++i)
    if (*pit++)
      return (0);
  return (1);
}


x86 assembly (clang, -O0):
<all_pits_empty>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x6,-0x14(%rbp)
jge    1150 <all_pits_empty+0x50>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x10(%rbp)
cmpl   $0x0,(%rax)
je     113d <all_pits_empty+0x3d>
movl   $0x0,-0x4(%rbp)
jmp    1157 <all_pits_empty+0x57>
jmp    1142 <all_pits_empty+0x42>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    110f <all_pits_empty+0xf>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<all_pits_empty>:
xor    %eax,%eax
cmpl   $0x0,(%rdi)
je     1108 <all_pits_empty+0x8>
ret
cmpl   $0x0,0x4(%rdi)
jne    1107 <all_pits_empty+0x7>
cmpl   $0x0,0x8(%rdi)
jne    1107 <all_pits_empty+0x7>
cmpl   $0x0,0xc(%rdi)
jne    1107 <all_pits_empty+0x7>
cmpl   $0x0,0x10(%rdi)
jne    1107 <all_pits_empty+0x7>
xor    %eax,%eax
cmpl   $0x0,0x14(%rdi)
sete   %al
ret

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

LLVM IR (-O2):
define i32 @all_pits_empty(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %25
4: ; preds = %1
%5 = getelementptr inbounds i32, i32* %0, i64 1
%6 = load i32, i32* %5
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %25
8: ; preds = %4
%9 = getelementptr inbounds i32, i32* %0, i64 2
%10 = load i32, i32* %9
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %25
12: ; preds = %8
%13 = getelementptr inbounds i32, i32* %0, i64 3
%14 = load i32, i32* %13
%15 = icmp eq i32 %14, 0
br i1 %15, label %16, label %25
16: ; preds = %12
%17 = getelementptr inbounds i32, i32* %0, i64 4
%18 = load i32, i32* %17
%19 = icmp eq i32 %18, 0
br i1 %19, label %20, label %25
20: ; preds = %16
%21 = getelementptr inbounds i32, i32* %0, i64 5
%22 = load i32, i32* %21
%23 = icmp eq i32 %22, 0
%24 = zext i1 %23 to i32
br label %25
25: ; preds = %20, %16, %12, %8, %4, %1
%26 = phi i32 [ 0, %1 ], [ 0, %4 ], [ 0, %8 ], [ 0, %12 ], [ 0, %16 ], [ %24, %20 ]
ret i32 %26
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fread(unsigned char *, int, int, int /*<<< orphan*/ *);
short interpret_int16(unsigned char *);
signed short read_int16(FILE *in) {
  unsigned char buffer[2];
  fread(buffer, 1, 2, in);
  return interpret_int16(buffer);
}


x86 assembly (clang, -O0):
<read_int16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0xa(%rbp),%rdi
mov    -0x8(%rbp),%rcx
mov    $0x1,%esi
mov    $0x2,%edx
call   1030 <fread@plt>
lea    -0xa(%rbp),%rdi
call   1040 <interpret_int16@plt>
cwtl
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_int16>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rcx
lea    0xe(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x2,%edx
call   1030 <fread@plt>
mov    %rbx,%rdi
call   1040 <interpret_int16@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define signext i16 @read_int16(i32* %0) {
%2 = alloca i32*
%3 = alloca [2 x i8]
store i32* %0, i32** %2
%4 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 0
%5 = load i32*, i32** %2
%6 = call i32 @fread(i8* %4, i32 1, i32 2, i32* %5)
%7 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 0
%8 = call signext i16 @interpret_int16(i8* %7)
ret i16 %8
}

LLVM IR (-O2):
define signext i16 @read_int16(i32* nocapture %0) {
%2 = alloca [2 x i8]
%3 = getelementptr inbounds [2 x i8], [2 x i8]* %2, i64 0, i64 0
%4 = call i32 @fread(i8* %3, i32 1, i32 2, i32* %0)
%5 = call signext i16 @interpret_int16(i8* %3)
ret i16 %5
}
/* Variables and functions */
int /*<<< orphan*/ CompileLoop(int);
void DoLoop(void) { CompileLoop(56); }


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

x86 assembly (clang, -O2):
<DoLoop>:
mov    $0x38,%edi
jmp    1030 <CompileLoop@plt>

LLVM IR (-O0):
define void @DoLoop() {
%1 = call i32 @CompileLoop(i32 56)
ret void
}

LLVM IR (-O2):
define void @DoLoop() {
%1 = tail call i32 @CompileLoop(i32 56)
ret void
}
int min(int i, int j) { return i <= j ? i : j; }


x86 assembly (clang, -O0):
<min>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     1121 <min+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <min+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<min>:
mov    %edi,%eax
cmp    %esi,%edi
cmovg  %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @min(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %1, i32 %0
ret i32 %4
}
void rop3_83_0_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk3 = *D ^ S;
  stk2 = T & stk3;
  stk1 = S ^ stk2;
  stk1 = ~stk1;
  *D = stk1;
}


x86 assembly (clang, -O0):
<rop3_83_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0x9(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xd(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0xd(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xb(%rbp)
mov    -0xb(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_83_0_0>:
mov    (%rdi),%al
xor    %sil,%al
and    %dl,%al
xor    %sil,%al
not    %al
mov    %al,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_83_0_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%10 = load i8*, i8** %4
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = load i8, i8* %5
%14 = zext i8 %13 to i32
%15 = xor i32 %12, %14
%16 = trunc i32 %15 to i8
store i8 %16, i8* %9
%17 = load i8, i8* %6
%18 = zext i8 %17 to i32
%19 = load i8, i8* %9
%20 = zext i8 %19 to i32
%21 = and i32 %18, %20
%22 = trunc i32 %21 to i8
store i8 %22, i8* %8
%23 = load i8, i8* %5
%24 = zext i8 %23 to i32
%25 = load i8, i8* %8
%26 = zext i8 %25 to i32
%27 = xor i32 %24, %26
%28 = trunc i32 %27 to i8
store i8 %28, i8* %7
%29 = load i8, i8* %7
%30 = zext i8 %29 to i32
%31 = xor i32 %30, -1
%32 = trunc i32 %31 to i8
store i8 %32, i8* %7
%33 = load i8, i8* %7
%34 = load i8*, i8** %4
store i8 %33, i8* %34
ret void
}

LLVM IR (-O2):
define void @rop3_83_0_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = xor i8 %4, %1
%6 = and i8 %5, %2
%7 = xor i8 %6, %1
%8 = xor i8 %7, -1
store i8 %8, i8* %0
ret void
}
/* Variables and functions */
int execve(char *, char **, char **);
int run_process(char *filename) {
  char *new_argv[] = {filename, NULL};
  char *new_env[] = {"TERM=linux", NULL};
  return execve(filename, new_argv, new_env);
}


x86 assembly (clang, -O0):
<run_process>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
movq   $0x0,-0x18(%rbp)
mov    0x2cdd(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0x2cda(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x20(%rbp),%rsi
lea    -0x30(%rbp),%rdx
call   1030 <execve@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<run_process>:
sub    $0x28,%rsp
mov    %rdi,(%rsp)
movq   $0x0,0x8(%rsp)
movaps 0x2ce8(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
mov    %rsp,%rsi
lea    0x10(%rsp),%rdx
call   1030 <execve@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
@.str = [11 x i8] c"TERM=linux\00"
@__const.run_process.new_env = [2 x i8*] [i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i32 0, i32 0), i8* null]
define i32 @run_process(i8* %0) {
%2 = alloca i8*
%3 = alloca [2 x i8*]
%4 = alloca [2 x i8*]
store i8* %0, i8** %2
%5 = getelementptr inbounds [2 x i8*], [2 x i8*]* %3, i64 0, i64 0
%6 = load i8*, i8** %2
store i8* %6, i8** %5
%7 = getelementptr inbounds i8*, i8** %5, i64 1
store i8* null, i8** %7
%8 = bitcast [2 x i8*]* %4 to i8*
%9 = load i8*, i8** %2
%10 = getelementptr inbounds [2 x i8*], [2 x i8*]* %3, i64 0, i64 0
%11 = getelementptr inbounds [2 x i8*], [2 x i8*]* %4, i64 0, i64 0
%12 = call i32 @execve(i8* %9, i8** %10, i8** %11)
ret i32 %12
}

LLVM IR (-O2):
@.str = [11 x i8] c"TERM=linux\00"
@__const.run_process.new_env = [2 x i8*] [i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i32 0, i32 0), i8* null]
define i32 @run_process(i8* %0) {
%2 = alloca [2 x i8*]
%3 = alloca [2 x i8*]
%4 = bitcast [2 x i8*]* %2 to i8*
%5 = getelementptr inbounds [2 x i8*], [2 x i8*]* %2, i64 0, i64 0
store i8* %0, i8** %5
%6 = getelementptr inbounds [2 x i8*], [2 x i8*]* %2, i64 0, i64 1
store i8* null, i8** %6
%7 = bitcast [2 x i8*]* %3 to i8*
%8 = getelementptr inbounds [2 x i8*], [2 x i8*]* %3, i64 0, i64 0
%9 = call i32 @execve(i8* %0, i8** %5, i8** %8)
ret i32 %9
}
void __stp_stack_print(struct pt_regs *regs, int verbose, int levels,
                       struct task_struct *tsk, struct unwind_context *context,
                       struct uretprobe_instance *ri, int uregs_valid) {}


x86 assembly (clang, -O0):
<__stp_stack_print>:
push   %rbp
mov    %rsp,%rbp
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.pt_regs = type opaque
%struct.task_struct = type opaque
%struct.unwind_context = type opaque
%struct.uretprobe_instance = type opaque
define void @__stp_stack_print(%struct.pt_regs* %0, i32 %1, i32 %2, %struct.task_struct* %3, %struct.unwind_context* %4, %struct.uretprobe_instance* %5, i32 %6) {
%8 = alloca %struct.pt_regs*
%9 = alloca i32
%10 = alloca i32
%11 = alloca %struct.task_struct*
%12 = alloca %struct.unwind_context*
%13 = alloca %struct.uretprobe_instance*
%14 = alloca i32
store %struct.pt_regs* %0, %struct.pt_regs** %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store %struct.task_struct* %3, %struct.task_struct** %11
store %struct.unwind_context* %4, %struct.unwind_context** %12
store %struct.uretprobe_instance* %5, %struct.uretprobe_instance** %13
store i32 %6, i32* %14
ret void
}

LLVM IR (-O2):
%struct.pt_regs = type opaque
%struct.task_struct = type opaque
%struct.unwind_context = type opaque
%struct.uretprobe_instance = type opaque
define void @__stp_stack_print(%struct.pt_regs* nocapture %0, i32 %1, i32 %2, %struct.task_struct* nocapture %3, %struct.unwind_context* nocapture %4, %struct.uretprobe_instance* nocapture %5, i32 %6) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int8_t;

/* Variables and functions */
void test_vmvn_s8x8(int8_t *__restrict__ dest, int8_t *a) {
  int i;
  for (i = 0; i < 8; i++) {
    dest[i] = ~a[i];
  }
}


x86 assembly (clang, -O0):
<test_vmvn_s8x8>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x8,-0x14(%rbp)
jge    1144 <test_vmvn_s8x8+0x44>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
xor    $0xffffffff,%edx
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <test_vmvn_s8x8+0x13>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_vmvn_s8x8>:
movdqu (%rsi),%xmm0
pcmpeqd %xmm1,%xmm1
pxor   %xmm1,%xmm0
movdqu %xmm0,(%rdi)
movdqu 0x10(%rsi),%xmm0
pxor   %xmm1,%xmm0
movdqu %xmm0,0x10(%rdi)
ret

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

LLVM IR (-O2):
define void @test_vmvn_s8x8(i32* noalias nocapture writeonly %0, i32* nocapture %1) {
%3 = bitcast i32* %1 to <4 x i32>*
%4 = load <4 x i32>, <4 x i32>* %3
%5 = xor <4 x i32> %4, <i32 -1, i32 -1, i32 -1, i32 -1>
%6 = bitcast i32* %0 to <4 x i32>*
store <4 x i32> %5, <4 x i32>* %6
%7 = getelementptr inbounds i32, i32* %1, i64 4
%8 = getelementptr inbounds i32, i32* %0, i64 4
%9 = bitcast i32* %7 to <4 x i32>*
%10 = load <4 x i32>, <4 x i32>* %9
%11 = xor <4 x i32> %10, <i32 -1, i32 -1, i32 -1, i32 -1>
%12 = bitcast i32* %8 to <4 x i32>*
store <4 x i32> %11, <4 x i32>* %12
ret void
}
void dsi_wait_dsi1_pll_active(void) {}


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

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

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

LLVM IR (-O2):
define void @dsi_wait_dsi1_pll_active() {
ret void
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int IoQueryDeviceDescription(int BusType, int BusNumber, int ControllerType,
                             int ControllerNumber, int PeripheralType,
                             int PeripheralNumber, int CalloutRoutine,
                             int Context) {
  {
    int tmp_ndt_7;
    tmp_ndt_7 = __VERIFIER_nondet_int();
    if (tmp_ndt_7 == 0) {
      goto switch_5_0;
    } else {
      goto switch_5_default;
      if (0) {
      switch_5_0:
        return (0);
      switch_5_default:;
        return (-1073741823);
      } else {
      }
    }
  }
}


x86 assembly (clang, -O0):
<IoQueryDeviceDescription>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    %r9d,-0x1c(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x20(%rbp)
cmpl   $0x0,-0x20(%rbp)
jne    114b <IoQueryDeviceDescription+0x3b>
jmp    1150 <IoQueryDeviceDescription+0x40>
jmp    115c <IoQueryDeviceDescription+0x4c>
movl   $0x0,-0x4(%rbp)
jmp    1163 <IoQueryDeviceDescription+0x53>
movl   $0xc0000001,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IoQueryDeviceDescription>:
push   %rax
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
test   %eax,%eax
mov    $0xc0000001,%ecx
cmovne %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @IoQueryDeviceDescription(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7) {
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
store i32 %0, i32* %10
store i32 %1, i32* %11
store i32 %2, i32* %12
store i32 %3, i32* %13
store i32 %4, i32* %14
store i32 %5, i32* %15
store i32 %6, i32* %16
store i32 %7, i32* %17
%19 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %19, i32* %18
%20 = load i32, i32* %18
%21 = icmp eq i32 %20, 0
br i1 %21, label %22, label %23
22: ; preds = %8
br label %26
23: ; preds = %8
br label %27
24: ; No predecessors!
br i1 false, label %25, label %28
25: ; preds = %24
br label %26
26: ; preds = %25, %22
store i32 0, i32* %9
br label %30
27: ; preds = %23
store i32 -1073741823, i32* %9
br label %30
28: ; preds = %24
br label %29
29: ; preds = %28
br label %30
30: ; preds = %26, %27, %29
%31 = load i32, i32* %9
ret i32 %31
}

LLVM IR (-O2):
define i32 @IoQueryDeviceDescription(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7) {
%9 = tail call i32 (...) @__VERIFIER_nondet_int()
%10 = icmp eq i32 %9, 0
%11 = select i1 %10, i32 0, i32 -1073741823
ret i32 %11
}
/* Type definitions */
struct list_head {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ insert_top(struct list_head *);
void create_top(struct list_head *top) {
  int c = 0;
  do {
    insert_top(top);
    c = c + 1;
  } while (c < 3);
}


x86 assembly (clang, -O0):
<create_top>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <insert_top@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x3,-0xc(%rbp)
jl     1123 <create_top+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_top>:
push   %rbx
mov    %rdi,%rbx
call   1030 <insert_top@plt>
mov    %rbx,%rdi
call   1030 <insert_top@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <insert_top@plt>

LLVM IR (-O0):
%struct.list_head = type { i32 }
define void @create_top(%struct.list_head* %0) {
%2 = alloca %struct.list_head*
%3 = alloca i32
store %struct.list_head* %0, %struct.list_head** %2
store i32 0, i32* %3
br label %4
4: ; preds = %9, %1
%5 = load %struct.list_head*, %struct.list_head** %2
%6 = call i32 @insert_top(%struct.list_head* %5)
%7 = load i32, i32* %3
%8 = add nsw i32 %7, 1
store i32 %8, i32* %3
br label %9
9: ; preds = %4
%10 = load i32, i32* %3
%11 = icmp slt i32 %10, 3
br i1 %11, label %4, label %12
12: ; preds = %9
ret void
}

LLVM IR (-O2):
%struct.list_head = type { i32 }
define void @create_top(%struct.list_head* %0) {
%2 = tail call i32 @insert_top(%struct.list_head* %0)
%3 = tail call i32 @insert_top(%struct.list_head* %0)
%4 = tail call i32 @insert_top(%struct.list_head* %0)
ret void
}
int divide_by_zero() {
  int x = 0;
  int y = 5;
  return y / x;
}


x86 assembly (clang, -O0):
<divide_by_zero>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cltd
idivl  -0x4(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @divide_by_zero() {
ret i32 poison
}
void d2i_X509_ALGOR(void) {}


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

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

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

LLVM IR (-O2):
define void @d2i_X509_ALGOR() {
ret void
}
double msec_diff(double *end, double *begin) { return (*end - *begin); }


x86 assembly (clang, -O0):
<msec_diff>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
subsd  (%rax),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<msec_diff>:
movsd  (%rdi),%xmm0
subsd  (%rsi),%xmm0
ret

LLVM IR (-O0):
define double @msec_diff(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
store double* %0, double** %3
store double* %1, double** %4
%5 = load double*, double** %3
%6 = load double, double* %5
%7 = load double*, double** %4
%8 = load double, double* %7
%9 = fsub double %6, %8
ret double %9
}

LLVM IR (-O2):
define double @msec_diff(double* nocapture %0, double* nocapture %1) {
%3 = load double, double* %0
%4 = load double, double* %1
%5 = fsub double %3, %4
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ verify_madd(int, int, int, int);
int main() {
  verify_madd(13, 17, 19, 336);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0xd,%edi
mov    $0x11,%esi
mov    $0x13,%edx
mov    $0x150,%ecx
call   1030 <verify_madd@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xd,%edi
mov    $0x11,%esi
mov    $0x13,%edx
mov    $0x150,%ecx
call   1030 <verify_madd@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @verify_madd(i32 13, i32 17, i32 19, i32 336)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @verify_madd(i32 13, i32 17, i32 19, i32 336)
ret i32 0
}
/* Variables and functions */
int divide(int, int);
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  printf("%d\n", divide(2147483647, 2));
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x7fffffff,%edi
mov    $0x2,%esi
call   1030 <divide@plt>
mov    %eax,%esi
lea    0xeb9(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x7fffffff,%edi
mov    $0x2,%esi
call   1030 <divide@plt>
lea    0xec9(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @divide(i32 2147483647, i32 2)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ACMP2_DriverIRQHandler();
__attribute__((weak)) void ACMP2_IRQHandler(void) { ACMP2_DriverIRQHandler(); }


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

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

LLVM IR (-O0):
define weak void @ACMP2_IRQHandler() {
%1 = call i32 (...) @ACMP2_DriverIRQHandler()
ret void
}

LLVM IR (-O2):
define weak void @ACMP2_IRQHandler() {
%1 = tail call i32 (...) @ACMP2_DriverIRQHandler()
ret void
}
float sqrss(float x) {
  float z;
  __asm__("rsqrtss %0, %%xmm0\n\t"
          "rcpss   %%xmm0, %%xmm0\n\t"
          "movss   %1, %%xmm0\n\t"
          : "=m"(z)
          : "m"(x));
  return z;
}


x86 assembly (clang, -O0):
<sqrss>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
rsqrtss -0x8(%rbp),%xmm0
rcpss  %xmm0,%xmm0
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<sqrss>:
movss  %xmm0,-0x4(%rsp)
rsqrtss -0x8(%rsp),%xmm0
rcpss  %xmm0,%xmm0
movss  -0x4(%rsp),%xmm0
movss  -0x8(%rsp),%xmm0
ret

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

LLVM IR (-O2):
define float @sqrss(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %2
%4 = bitcast float* %3 to i8*
%5 = load float, float* %3
ret float %5
}
void g_type_name_from_instance() {}


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

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

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

LLVM IR (-O2):
define void @g_type_name_from_instance() {
ret void
}
/* Variables and functions */
double RAND_MAX;
scalar_t__ rand();
double rand01() { return (double)rand() / RAND_MAX; }


x86 assembly (clang, -O0):
<rand01>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <rand@plt>
cvtsi2sd %rax,%xmm0
mov    0x2ec1(%rip),%rax
divsd  (%rax),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<rand01>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
cvtsi2sd %rax,%xmm0
mov    0x2ec4(%rip),%rax
divsd  (%rax),%xmm0
pop    %rax
ret

LLVM IR (-O0):
@RAND_MAX = global double 0.000000e+00
define double @rand01() {
%1 = call i64 (...) @rand()
%2 = sitofp i64 %1 to double
%3 = load double, double* @RAND_MAX
%4 = fdiv double %2, %3
ret double %4
}

LLVM IR (-O2):
@RAND_MAX = global double 0.000000e+00
define double @rand01() {
%1 = tail call i64 (...) @rand()
%2 = sitofp i64 %1 to double
%3 = load double, double* @RAND_MAX
%4 = fdiv double %2, %3
ret double %4
}
int c(int x) { return (x > 0 ? x : -x) != 0; }


x86 assembly (clang, -O0):
<c>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    111c <c+0x1c>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1124 <c+0x24>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<c>:
xor    %eax,%eax
test   %edi,%edi
setne  %al
ret

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

LLVM IR (-O2):
define i32 @c(i32 %0) {
%2 = icmp ne i32 %0, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Type definitions */
struct Cyc_Lexing_lexbuf {
  int dummy;
};

/* Variables and functions */
int Cyc_snarfsymbols_rec(struct Cyc_Lexing_lexbuf *, int);
int Cyc_snarfsymbols(struct Cyc_Lexing_lexbuf *lexbuf) {
  int _T0;
  _T0 = Cyc_snarfsymbols_rec(lexbuf, 15);
  return _T0;
}


x86 assembly (clang, -O0):
<Cyc_snarfsymbols>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0xf,%esi
call   1030 <Cyc_snarfsymbols_rec@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cyc_snarfsymbols>:
mov    $0xf,%esi
jmp    1030 <Cyc_snarfsymbols_rec@plt>

LLVM IR (-O0):
%struct.Cyc_Lexing_lexbuf = type { i32 }
define i32 @Cyc_snarfsymbols(%struct.Cyc_Lexing_lexbuf* %0) {
%2 = alloca %struct.Cyc_Lexing_lexbuf*
%3 = alloca i32
store %struct.Cyc_Lexing_lexbuf* %0, %struct.Cyc_Lexing_lexbuf** %2
%4 = load %struct.Cyc_Lexing_lexbuf*, %struct.Cyc_Lexing_lexbuf** %2
%5 = call i32 @Cyc_snarfsymbols_rec(%struct.Cyc_Lexing_lexbuf* %4, i32 15)
store i32 %5, i32* %3
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
%struct.Cyc_Lexing_lexbuf = type { i32 }
define i32 @Cyc_snarfsymbols(%struct.Cyc_Lexing_lexbuf* %0) {
%2 = tail call i32 @Cyc_snarfsymbols_rec(%struct.Cyc_Lexing_lexbuf* %0, i32 15)
ret i32 %2
}
double inv(double x) { return 1.0 / x; }


x86 assembly (clang, -O0):
<inv>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
divsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<inv>:
movsd  0xef8(%rip),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @inv(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fdiv double 1.000000e+00, %3
ret double %4
}

LLVM IR (-O2):
define double @inv(double %0) {
%2 = fdiv double 1.000000e+00, %0
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(float *, float const *, int);
void copyMat4(float *dest, const float *source) {
  memcpy(dest, source, sizeof(float) * 16);
}


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

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

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

LLVM IR (-O2):
define void @copyMat4(float* %0, float* %1) {
%3 = tail call i32 @memcpy(float* %0, float* %1, i32 64)
ret void
}