xunge/DecIR huggingface dataset:
/* Variables and functions */
int is_prime(unsigned int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, unsigned int *);
int main() {
  unsigned int input = 0;
  scanf("%d", &input);
  printf("%d", is_prime(input));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movl   $0x0,0xc(%rsp)
lea    0xebc(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
mov    0xc(%rsp),%edi
call   1040 <is_prime@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @is_prime(i32 %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}
int _dt_set_vpu_vector64() { return 1; }


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

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

LLVM IR (-O0):
define i32 @_dt_set_vpu_vector64() {
ret i32 1
}

LLVM IR (-O2):
define i32 @_dt_set_vpu_vector64() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
char *strrchr(char *, char);
void usage(char **argv) {
  char *progname;
  if ((progname = strrchr(argv[0], '/')) != NULL)
    progname++;
  else
    progname = argv[0];
  printf("Usage: %s NROOT_DIRS NDIRS NFILES [NDEL]\n", progname);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
mov    $0x2f,%esi
call   1040 <strrchr@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
je     115c <usage+0x3c>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1167 <usage+0x47>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xe8e(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    (%rdi),%rbx
mov    %rbx,%rdi
mov    $0x2f,%esi
call   1040 <strrchr@plt>
lea    0x1(%rax),%rsi
test   %rax,%rax
cmove  %rbx,%rsi
lea    0xebd(%rip),%rdi
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [42 x i8] c"Usage: %s NROOT_DIRS NDIRS NFILES [NDEL]\0A\00"
define void @usage(i8** %0) {
%2 = alloca i8**
%3 = alloca i8*
store i8** %0, i8*** %2
%4 = load i8**, i8*** %2
%5 = getelementptr inbounds i8*, i8** %4, i64 0
%6 = load i8*, i8** %5
%7 = call i8* @strrchr(i8* %6, i8 signext 47)
store i8* %7, i8** %3
%8 = icmp ne i8* %7, null
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i32 1
store i8* %11, i8** %3
br label %16
12: ; preds = %1
%13 = load i8**, i8*** %2
%14 = getelementptr inbounds i8*, i8** %13, i64 0
%15 = load i8*, i8** %14
store i8* %15, i8** %3
br label %16
16: ; preds = %12, %9
%17 = load i8*, i8** %3
%18 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i8* %17)
ret void
}

LLVM IR (-O2):
@.str = [42 x i8] c"Usage: %s NROOT_DIRS NDIRS NFILES [NDEL]\0A\00"
define void @usage(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = tail call i8* @strrchr(i8* dereferenceable(1) %2, i8 signext 47)
%4 = icmp eq i8* %3, null
%5 = getelementptr inbounds i8, i8* %3, i64 1
%6 = select i1 %4, i8* %2, i8* %5
%7 = tail call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i8* %6)
ret void
}
/* Type definitions */
struct timespec {
  double tv_nsec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
double timespec_to_double(const struct timespec *time) {
  return time->tv_nsec * 0.000000001 + (double)time->tv_sec;
}


x86 assembly (clang, -O0):
<timespec_to_double>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
cvtsi2sdq 0x8(%rax),%xmm1
movsd  0xede(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<timespec_to_double>:
cvtsi2sdq 0x8(%rdi),%xmm1
movsd  (%rdi),%xmm0
mulsd  0xeee(%rip),%xmm0
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
%struct.timespec = type { double, i64 }
define double @timespec_to_double(%struct.timespec* %0) {
%2 = alloca %struct.timespec*
store %struct.timespec* %0, %struct.timespec** %2
%3 = load %struct.timespec*, %struct.timespec** %2
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 0
%5 = load double, double* %4
%6 = load %struct.timespec*, %struct.timespec** %2
%7 = getelementptr inbounds %struct.timespec, %struct.timespec* %6, i32 0, i32 1
%8 = load i64, i64* %7
%9 = sitofp i64 %8 to double
%10 = call double @llvm.fmuladd.f64(double %5, double 1.000000e-09, double %9)
ret double %10
}

LLVM IR (-O2):
%struct.timespec = type { double, i64 }
define double @timespec_to_double(%struct.timespec* nocapture %0) {
%2 = getelementptr inbounds %struct.timespec, %struct.timespec* %0, i64 0, i32 0
%3 = load double, double* %2
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %0, i64 0, i32 1
%5 = load i64, i64* %4
%6 = sitofp i64 %5 to double
%7 = tail call double @llvm.fmuladd.f64(double %3, double 1.000000e-09, double %6)
ret double %7
}
int test_01(int x, int y) {
  if (y)
    --x;
  return x;
}


x86 assembly (clang, -O0):
<test_01>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     111d <test_01+0x1d>
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_01>:
mov    %edi,%eax
cmp    $0x1,%esi
adc    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @test_01(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i32, i32* %3
%9 = add nsw i32 %8, -1
store i32 %9, i32* %3
br label %10
10: ; preds = %7, %2
%11 = load i32, i32* %3
ret i32 %11
}

LLVM IR (-O2):
define i32 @test_01(i32 %0, i32 %1) {
%3 = icmp ne i32 %1, 0
%4 = sext i1 %3 to i32
%5 = add nsw i32 %4, %0
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ testNewScape();
int /*<<< orphan*/ testScapeContents();
int /*<<< orphan*/ testScapeLookup();
void testScape() {
  testNewScape();
  testScapeContents();
  testScapeLookup();
}


x86 assembly (clang, -O0):
<testScape>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <testNewScape@plt>
mov    $0x0,%al
call   1030 <testScapeContents@plt>
mov    $0x0,%al
call   1040 <testScapeLookup@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<testScape>:
push   %rax
xor    %eax,%eax
call   1050 <testNewScape@plt>
xor    %eax,%eax
call   1030 <testScapeContents@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <testScapeLookup@plt>

LLVM IR (-O0):
define void @testScape() {
%1 = call i32 (...) @testNewScape()
%2 = call i32 (...) @testScapeContents()
%3 = call i32 (...) @testScapeLookup()
ret void
}

LLVM IR (-O2):
define void @testScape() {
%1 = tail call i32 (...) @testNewScape()
%2 = tail call i32 (...) @testScapeContents()
%3 = tail call i32 (...) @testScapeLookup()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ putchar(int /*<<< orphan*/);
void *outfunc(void *op, const char *buf, size_t n) {
  while (n--)
    putchar(*buf++);
  return (void *)(!NULL);
}


x86 assembly (clang, -O0):
<outfunc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x18(%rbp)
cmp    $0x0,%rax
je     1159 <outfunc+0x49>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%edi
call   1030 <putchar@plt>
jmp    1124 <outfunc+0x14>
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<outfunc>:
push   %r15
push   %r14
push   %rbx
test   %rdx,%rdx
je     1143 <outfunc+0x33>
mov    %rdx,%r15
mov    %rsi,%r14
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl (%r14,%rbx,1),%edi
call   1030 <putchar@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <outfunc+0x20>
mov    $0x1,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @outfunc(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
br label %7
7: ; preds = %11, %3
%8 = load i64, i64* %6
%9 = add i64 %8, -1
store i64 %9, i64* %6
%10 = icmp ne i64 %8, 0
br i1 %10, label %11, label %17
11: ; preds = %7
%12 = load i8*, i8** %5
%13 = getelementptr inbounds i8, i8* %12, i32 1
store i8* %13, i8** %5
%14 = load i8, i8* %12
%15 = sext i8 %14 to i32
%16 = call i32 @putchar(i32 %15)
br label %7
17: ; preds = %7
ret i8* inttoptr (i64 1 to i8*)
}

LLVM IR (-O2):
define i8* @outfunc(i8* nocapture readnone %0, i8* nocapture %1, i64 %2) {
%4 = icmp eq i64 %2, 0
br i1 %4, label %14, label %5
5: ; preds = %3, %5
%6 = phi i64 [ %8, %5 ], [ %2, %3 ]
%7 = phi i8* [ %9, %5 ], [ %1, %3 ]
%8 = add i64 %6, -1
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = load i8, i8* %7
%11 = sext i8 %10 to i32
%12 = tail call i32 @putchar(i32 %11)
%13 = icmp eq i64 %8, 0
br i1 %13, label %14, label %5
14: ; preds = %5, %3
ret i8* inttoptr (i64 1 to i8*)
}
void av_xtea_crypt() {}


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

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

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

LLVM IR (-O2):
define void @av_xtea_crypt() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ GLint;

/* Variables and functions */
int /*<<< orphan*/ glTexCoord3iv(int /*<<< orphan*/ *);
void TexCoord3iv(GLint v[3]) { glTexCoord3iv(v); }


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

x86 assembly (clang, -O2):
<TexCoord3iv>:
jmp    1030 <glTexCoord3iv@plt>

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

LLVM IR (-O2):
define void @TexCoord3iv(i32* %0) {
%2 = tail call i32 @glTexCoord3iv(i32* %0)
ret void
}
int reverseNumber(int number) {
  int result = 0;
  if (number != 0) {
    while (number) {
      int temp = number % 10;
      result = result * 10 + temp;
      number /= 10;
    }
  }
  return result;
}


x86 assembly (clang, -O0):
<reverseNumber>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1157 <reverseNumber+0x57>
jmp    111d <reverseNumber+0x1d>
cmpl   $0x0,-0x4(%rbp)
je     1152 <reverseNumber+0x52>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
imul   $0xa,-0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
jmp    111d <reverseNumber+0x1d>
jmp    1157 <reverseNumber+0x57>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<reverseNumber>:
xor    %eax,%eax
test   %edi,%edi
je     113f <reverseNumber+0x3f>
cs nopw 0x0(%rax,%rax,1)
lea    (%rax,%rax,4),%eax
movslq %edi,%rcx
imul   $0x66666667,%rcx,%rdi
mov    %rdi,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rdi
add    %edx,%edi
lea    (%rdi,%rdi,1),%edx
lea    (%rdx,%rdx,4),%edx
mov    %ecx,%esi
sub    %edx,%esi
lea    (%rsi,%rax,2),%eax
add    $0x9,%ecx
cmp    $0x12,%ecx
ja     1110 <reverseNumber+0x10>
ret

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

LLVM IR (-O2):
define i32 @reverseNumber(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %12, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %8, %3 ], [ 0, %1 ]
%5 = phi i32 [ %9, %3 ], [ %0, %1 ]
%6 = srem i32 %5, 10
%7 = mul nsw i32 %4, 10
%8 = add nsw i32 %6, %7
%9 = sdiv i32 %5, 10
%10 = add i32 %5, 9
%11 = icmp ult i32 %10, 19
br i1 %11, label %12, label %3
12: ; preds = %3, %1
%13 = phi i32 [ 0, %1 ], [ %8, %3 ]
ret i32 %13
}
void outputs_init(void) { return; }


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

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

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

LLVM IR (-O2):
define void @outputs_init() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int_fast16_t;

/* Variables and functions */
void SHAREMIND_MAP_KEY_FREE_int_fast16_t(int_fast16_t *const dest) {
  (void)dest;
}


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

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

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

LLVM IR (-O2):
define void @SHAREMIND_MAP_KEY_FREE_int_fast16_t(i32* nocapture %0) {
ret void
}
void GC_version(void) {}


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

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

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

LLVM IR (-O2):
define void @GC_version() {
ret void
}
/* Variables and functions */
void *calloc(unsigned long, int);
int /*<<< orphan*/ free(void *);
void f2() {
  int i;
  unsigned long j;
  void *ptr = calloc(j, i);
  free(ptr);
}


x86 assembly (clang, -O0):
<f2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%esi
call   1040 <calloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f2>:
push   %rax
call   1040 <calloc@plt>
mov    %rax,%rdi
pop    %rax
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @f2() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i8*
%4 = load i64, i64* %2
%5 = load i32, i32* %1
%6 = call i8* @calloc(i64 %4, i32 %5)
store i8* %6, i8** %3
%7 = load i8*, i8** %3
%8 = call i32 @free(i8* %7)
ret void
}

LLVM IR (-O2):
define void @f2() {
%1 = tail call i8* @calloc(i64 undef, i32 undef)
%2 = tail call i32 @free(i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_aupdate_free() {
  printf("NOT IMPLEMENTED:"
         "pa_aupdate_free"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [33 x i8] c"NOT IMPLEMENTED:pa_aupdate_free\0A\00"
define i32 @pa_aupdate_free() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [32 x i8] c"NOT IMPLEMENTED:pa_aupdate_free\00"
define i32 @pa_aupdate_free() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
unsigned elifer(unsigned x, unsigned y, unsigned z) {
  unsigned ret = 0;
  if (x < 10) {
    ret = 0;
  } else if (x > 100) {
    if (y) {
      ret = 100;
    } else if (z) {
      ret = 200;
    }
  } else {
    ret = 50;
  }
  return ret;
}


x86 assembly (clang, -O0):
<elifer>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0xa,-0x4(%rbp)
jae    112a <elifer+0x2a>
movl   $0x0,-0x10(%rbp)
jmp    1171 <elifer+0x71>
cmpl   $0x64,-0x4(%rbp)
jbe    1165 <elifer+0x65>
cmpl   $0x0,-0x8(%rbp)
je     114a <elifer+0x4a>
movl   $0x64,-0x10(%rbp)
jmp    1160 <elifer+0x60>
cmpl   $0x0,-0xc(%rbp)
je     115b <elifer+0x5b>
movl   $0xc8,-0x10(%rbp)
jmp    1160 <elifer+0x60>
jmp    116c <elifer+0x6c>
movl   $0x32,-0x10(%rbp)
jmp    1171 <elifer+0x71>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<elifer>:
xor    %eax,%eax
cmp    $0xa,%edi
jb     111a <elifer+0x1a>
mov    $0x32,%eax
cmp    $0x65,%edi
jb     111a <elifer+0x1a>
mov    $0x64,%eax
test   %esi,%esi
je     111b <elifer+0x1b>
ret
test   %edx,%edx
mov    $0xc8,%eax
cmove  %edx,%eax
ret

LLVM IR (-O0):
define i32 @elifer(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
store i32 0, i32* %7
%8 = load i32, i32* %4
%9 = icmp ult i32 %8, 10
br i1 %9, label %10, label %11
10: ; preds = %3
store i32 0, i32* %7
br label %26
11: ; preds = %3
%12 = load i32, i32* %4
%13 = icmp ugt i32 %12, 100
br i1 %13, label %14, label %24
14: ; preds = %11
%15 = load i32, i32* %5
%16 = icmp ne i32 %15, 0
br i1 %16, label %17, label %18
17: ; preds = %14
store i32 100, i32* %7
br label %23
18: ; preds = %14
%19 = load i32, i32* %6
%20 = icmp ne i32 %19, 0
br i1 %20, label %21, label %22
21: ; preds = %18
store i32 200, i32* %7
br label %22
22: ; preds = %21, %18
br label %23
23: ; preds = %22, %17
br label %25
24: ; preds = %11
store i32 50, i32* %7
br label %25
25: ; preds = %24, %23
br label %26
26: ; preds = %25, %10
%27 = load i32, i32* %7
ret i32 %27
}

LLVM IR (-O2):
define i32 @elifer(i32 %0, i32 %1, i32 %2) {
%4 = icmp ult i32 %0, 10
br i1 %4, label %12, label %5
5: ; preds = %3
%6 = icmp ugt i32 %0, 100
br i1 %6, label %7, label %12
7: ; preds = %5
%8 = icmp eq i32 %1, 0
br i1 %8, label %9, label %12
9: ; preds = %7
%10 = icmp eq i32 %2, 0
%11 = select i1 %10, i32 0, i32 200
br label %12
12: ; preds = %9, %5, %7, %3
%13 = phi i32 [ 0, %3 ], [ 100, %7 ], [ %11, %9 ], [ 50, %5 ]
ret i32 %13
}
/* Variables and functions */
double __infer_nondet_double();
double nan(const char *tagp) { return __infer_nondet_double(); }


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

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

LLVM IR (-O0):
define double @nan(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call double (...) @__infer_nondet_double()
ret double %3
}

LLVM IR (-O2):
define double @nan(i8* nocapture readnone %0) {
%2 = tail call double (...) @__infer_nondet_double()
ret double %2
}
/* Variables and functions */
char *strcat(char *, char const *);
char *c_strcat(char *dest, const char *src) { return strcat(dest, src); }


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

x86 assembly (clang, -O2):
<c_strcat>:
jmp    1030 <strcat@plt>

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

LLVM IR (-O2):
define i8* @c_strcat(i8* returned %0, i8* nocapture %1) {
%3 = tail call i8* @strcat(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i8* %0
}
int clearbit(int x, int i) { return x & ~(1 << i); }


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

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

LLVM IR (-O0):
define i32 @clearbit(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = shl i32 1, %6
%8 = xor i32 %7, -1
%9 = and i32 %5, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @clearbit(i32 %0, i32 %1) {
%3 = shl nuw i32 1, %1
%4 = xor i32 %3, -1
%5 = and i32 %4, %0
ret i32 %5
}
int get_value2(int *B[4], int i, int j) { return B[i][j]; }


x86 assembly (clang, -O0):
<get_value2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_value2>:
movslq %esi,%rax
mov    (%rdi,%rax,8),%rax
movslq %edx,%rcx
mov    (%rax,%rcx,4),%eax
ret

LLVM IR (-O0):
define i32 @get_value2(i32** %0, i32 %1, i32 %2) {
%4 = alloca i32**
%5 = alloca i32
%6 = alloca i32
store i32** %0, i32*** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32**, i32*** %4
%8 = load i32, i32* %5
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i32*, i32** %7, i64 %9
%11 = load i32*, i32** %10
%12 = load i32, i32* %6
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i32, i32* %11, i64 %13
%15 = load i32, i32* %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @get_value2(i32** nocapture %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i32*, i32** %0, i64 %4
%6 = load i32*, i32** %5
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i32, i32* %6, i64 %7
%9 = load i32, i32* %8
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ die(char *);
void *malloc(long);
void *smalloc(long amount) {
  void *p = 0;
  p = malloc(amount);
  if (!p)
    die("Out of memory!");
  return p;
}


x86 assembly (clang, -O0):
<smalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1158 <smalloc+0x38>
lea    0xead(%rip),%rdi
call   1040 <die@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<smalloc>:
push   %rbx
call   1030 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113a <smalloc+0x1a>
lea    0xecb(%rip),%rdi
call   1040 <die@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"Out of memory!\00"
define i8* @smalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
store i8* null, i8** %3
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %10, label %8
8: ; preds = %1
%9 = call i32 @die(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %1
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
@.str = [15 x i8] c"Out of memory!\00"
define noalias i8* @smalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @die(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret i8* %2
}
/* Type definitions */
typedef int int64_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
double stdlib_strided_dsvariancepn(int, int, float *, int);
int main() {
  float 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_dsvariancepn(N, 1, x, stride);
  printf("sample variance: %lf\n", v);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0xed1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xece(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xecb(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xec8(%rip),%rax
mov    %rax,-0x8(%rbp)
movl   $0x4,-0x24(%rbp)
movl   $0x2,-0x28(%rbp)
mov    -0x24(%rbp),%edi
lea    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%ecx
mov    $0x1,%esi
call   1040 <stdlib_strided_dsvariancepn@plt>
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
lea    0xe99(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
movaps 0xee5(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xec9(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdx
mov    $0x4,%edi
mov    $0x1,%esi
mov    $0x2,%ecx
call   1040 <stdlib_strided_dsvariancepn@plt>
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

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

LLVM IR (-O2):
@__const.main.x = [8 x float] [float 1.000000e+00, float 2.000000e+00, float 3.000000e+00, float 4.000000e+00, float 5.000000e+00, float 6.000000e+00, float 7.000000e+00, float 8.000000e+00]
@.str = [22 x i8] c"sample variance: %lf\0A\00"
define i32 @main() {
%1 = alloca [8 x float]
%2 = bitcast [8 x float]* %1 to i8*
%3 = getelementptr inbounds [8 x float], [8 x float]* %1, i64 0, i64 0
%4 = call double @stdlib_strided_dsvariancepn(i32 4, i32 1, float* %3, i32 2)
%5 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), double %4)
ret i32 0
}
/* Type definitions */
struct timespec {
  scalar_t__ tv_nsec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ monotime_ts(struct timespec *);
double monotime_double(void) {
  struct timespec ts;
  monotime_ts(&ts);
  return (double)ts.tv_sec + (double)ts.tv_nsec / 1000000000.0;
}


x86 assembly (clang, -O0):
<monotime_double>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%rdi
call   1030 <monotime_ts@plt>
cvtsi2sdq -0x8(%rbp),%xmm0
cvtsi2sdq -0x10(%rbp),%xmm1
movsd  0xecb(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<monotime_double>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
call   1030 <monotime_ts@plt>
cvtsi2sdq 0x10(%rsp),%xmm1
cvtsi2sdq 0x8(%rsp),%xmm0
divsd  0xecc(%rip),%xmm0
addsd  %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timespec = type { i64, i64 }
define double @monotime_double() {
%1 = alloca %struct.timespec
%2 = call i32 @monotime_ts(%struct.timespec* %1)
%3 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 1
%4 = load i64, i64* %3
%5 = sitofp i64 %4 to double
%6 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 0
%7 = load i64, i64* %6
%8 = sitofp i64 %7 to double
%9 = fdiv double %8, 1.000000e+09
%10 = fadd double %5, %9
ret double %10
}

LLVM IR (-O2):
%struct.timespec = type { i64, i64 }
define double @monotime_double() {
%1 = alloca %struct.timespec
%2 = bitcast %struct.timespec* %1 to i8*
%3 = call i32 @monotime_ts(%struct.timespec* %1)
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 1
%5 = load i64, i64* %4
%6 = sitofp i64 %5 to double
%7 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
%8 = load i64, i64* %7
%9 = sitofp i64 %8 to double
%10 = fdiv double %9, 1.000000e+09
%11 = fadd double %10, %6
ret double %11
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
unsigned int WORD(int /*<<< orphan*/ const, int /*<<< orphan*/ const);
int /*<<< orphan*/ decode_hiscoa_band_data(int /*<<< orphan*/ const *, size_t,
                                           unsigned int);
void decode_hiscoa_band(const uint8_t *buf, size_t size) {
  unsigned lines = WORD(buf[2], buf[3]);
  decode_hiscoa_band_data(buf + 4, size - 4, lines);
}


x86 assembly (clang, -O0):
<decode_hiscoa_band>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%edi
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%esi
call   1030 <WORD@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
add    $0x10,%rdi
mov    -0x10(%rbp),%rsi
sub    $0x4,%rsi
mov    -0x14(%rbp),%edx
call   1040 <decode_hiscoa_band_data@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<decode_hiscoa_band>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    0x8(%rdi),%edi
mov    0xc(%rbx),%esi
call   1030 <WORD@plt>
add    $0x10,%rbx
add    $0xfffffffffffffffc,%r14
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <decode_hiscoa_band_data@plt>

LLVM IR (-O0):
define void @decode_hiscoa_band(i32* %0, i64 %1) {
%3 = alloca i32*
%4 = alloca i64
%5 = alloca i32
store i32* %0, i32** %3
store i64 %1, i64* %4
%6 = load i32*, i32** %3
%7 = getelementptr inbounds i32, i32* %6, i64 2
%8 = load i32, i32* %7
%9 = load i32*, i32** %3
%10 = getelementptr inbounds i32, i32* %9, i64 3
%11 = load i32, i32* %10
%12 = call i32 @WORD(i32 %8, i32 %11)
store i32 %12, i32* %5
%13 = load i32*, i32** %3
%14 = getelementptr inbounds i32, i32* %13, i64 4
%15 = load i64, i64* %4
%16 = sub i64 %15, 4
%17 = load i32, i32* %5
%18 = call i32 @decode_hiscoa_band_data(i32* %14, i64 %16, i32 %17)
ret void
}

LLVM IR (-O2):
define void @decode_hiscoa_band(i32* %0, i64 %1) {
%3 = getelementptr inbounds i32, i32* %0, i64 2
%4 = load i32, i32* %3
%5 = getelementptr inbounds i32, i32* %0, i64 3
%6 = load i32, i32* %5
%7 = tail call i32 @WORD(i32 %4, i32 %6)
%8 = getelementptr inbounds i32, i32* %0, i64 4
%9 = add i64 %1, -4
%10 = tail call i32 @decode_hiscoa_band_data(i32* %8, i64 %9, i32 %7)
ret void
}
/* Variables and functions */
unsigned char ComputeColor(unsigned int, unsigned int, int);
unsigned int Give_i(unsigned int, unsigned int);
int PlotPoint(unsigned char A[], unsigned int ix, unsigned int iy,
              int IterationMax) {
  unsigned i;
  unsigned char iColor;
  i = Give_i(ix, iy);
  iColor = ComputeColor(ix, iy, IterationMax);
  A[i] = iColor;
  return 0;
}


x86 assembly (clang, -O0):
<PlotPoint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
call   1040 <Give_i@plt>
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
call   1030 <ComputeColor@plt>
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%dl
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%ecx
mov    %dl,(%rax,%rcx,1)
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PlotPoint>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %ecx,%r14d
mov    %edx,%ebp
mov    %esi,%ebx
mov    %rdi,%r15
mov    %esi,%edi
mov    %edx,%esi
call   1040 <Give_i@plt>
mov    %eax,%r12d
mov    %ebx,%edi
mov    %ebp,%esi
mov    %r14d,%edx
call   1030 <ComputeColor@plt>
mov    %r12d,%ecx
mov    %al,(%r15,%rcx,1)
xor    %eax,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @PlotPoint(i8* %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i8
store i8* %0, i8** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%11 = load i32, i32* %6
%12 = load i32, i32* %7
%13 = call i32 @Give_i(i32 %11, i32 %12)
store i32 %13, i32* %9
%14 = load i32, i32* %6
%15 = load i32, i32* %7
%16 = load i32, i32* %8
%17 = call zeroext i8 @ComputeColor(i32 %14, i32 %15, i32 %16)
store i8 %17, i8* %10
%18 = load i8, i8* %10
%19 = load i8*, i8** %5
%20 = load i32, i32* %9
%21 = zext i32 %20 to i64
%22 = getelementptr inbounds i8, i8* %19, i64 %21
store i8 %18, i8* %22
ret i32 0
}

LLVM IR (-O2):
define i32 @PlotPoint(i8* nocapture writeonly %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @Give_i(i32 %1, i32 %2)
%6 = tail call zeroext i8 @ComputeColor(i32 %1, i32 %2, i32 %3)
%7 = zext i32 %5 to i64
%8 = getelementptr inbounds i8, i8* %0, i64 %7
store i8 %6, i8* %8
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char, int);
int /*<<< orphan*/ stderr;
void j(int x) { fprintf(stderr, "%c%d\n", 'j', x); }


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

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

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [6 x i8] c"%c%d\0A\00"
define void @j(i32 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8 signext 106, i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(double *);
void hDpVectFree(double *arr, int len) { free(arr); }


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

x86 assembly (clang, -O2):
<hDpVectFree>:
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @hDpVectFree(double* %0, i32 %1) {
%3 = alloca double*
%4 = alloca i32
store double* %0, double** %3
store i32 %1, i32* %4
%5 = load double*, double** %3
%6 = call i32 @free(double* %5)
ret void
}

LLVM IR (-O2):
define void @hDpVectFree(double* nocapture %0, i32 %1) {
%3 = tail call i32 @free(double* %0)
ret void
}
/* Variables and functions */
unsigned char __VERIFIER_nondet_U8();
unsigned char ecrobot_get_sonar_sensor(unsigned char port) {
  unsigned char tmp;
  {
    tmp = __VERIFIER_nondet_U8();
    return (tmp);
  }
}


x86 assembly (clang, -O0):
<ecrobot_get_sonar_sensor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_U8@plt>
mov    %al,-0x2(%rbp)
movzbl -0x2(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define zeroext i8 @ecrobot_get_sonar_sensor(i8 zeroext %0) {
%2 = tail call zeroext i8 (...) @__VERIFIER_nondet_U8()
ret i8 %2
}
/* Type definitions */
struct wpa_ctrl {
  int dummy;
};

/* Variables and functions */
int wpa_ctrl_command(struct wpa_ctrl *, char *);
int wpa_cli_cmd_ping(struct wpa_ctrl *ctrl, int argc, const char *argv[]) {
  return wpa_ctrl_command(ctrl, "PING");
}


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

x86 assembly (clang, -O2):
<wpa_cli_cmd_ping>:
lea    0xee9(%rip),%rsi
jmp    1030 <wpa_ctrl_command@plt>

LLVM IR (-O0):
%struct.wpa_ctrl = type { i32 }
@.str = [5 x i8] c"PING\00"
define i32 @wpa_cli_cmd_ping(%struct.wpa_ctrl* %0, i32 %1, i8** %2) {
%4 = alloca %struct.wpa_ctrl*
%5 = alloca i32
%6 = alloca i8**
store %struct.wpa_ctrl* %0, %struct.wpa_ctrl** %4
store i32 %1, i32* %5
store i8** %2, i8*** %6
%7 = load %struct.wpa_ctrl*, %struct.wpa_ctrl** %4
%8 = call i32 @wpa_ctrl_command(%struct.wpa_ctrl* %7, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i32 %8
}

LLVM IR (-O2):
%struct.wpa_ctrl = type { i32 }
@.str = [5 x i8] c"PING\00"
define i32 @wpa_cli_cmd_ping(%struct.wpa_ctrl* %0, i32 %1, i8** nocapture readnone %2) {
%4 = tail call i32 @wpa_ctrl_command(%struct.wpa_ctrl* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i32 %4
}
/* Type definitions */
typedef int uint32_t;
typedef int int32_t;

/* Variables and functions */
__attribute__((always_)) uint32_t __PKHTB(uint32_t val1, uint32_t val2,
                                          uint32_t val3) {
  return ((((int32_t)(val1) << 0) & (int32_t)0xFFFF0000) |
          (((int32_t)(val2) >> val3) & (int32_t)0x0000FFFF));
}


x86 assembly (clang, -O0):
<__PKHTB>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x0,%eax
and    $0xffff0000,%eax
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
sar    %cl,%edx
mov    %edx,%ecx
and    $0xffff,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__PKHTB>:
mov    %edx,%ecx
sar    %cl,%esi
and    $0xffff0000,%edi
movzwl %si,%eax
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @__PKHTB(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = shl i32 %7, 0
%9 = and i32 %8, -65536
%10 = load i32, i32* %5
%11 = load i32, i32* %6
%12 = ashr i32 %10, %11
%13 = and i32 %12, 65535
%14 = or i32 %9, %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @__PKHTB(i32 %0, i32 %1, i32 %2) {
%4 = and i32 %0, -65536
%5 = ashr i32 %1, %2
%6 = and i32 %5, 65535
%7 = or i32 %6, %4
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ __setCHRBank0High(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ vrc2_4_SetChrROMBank0();
void vrc2_4_setParamsBXX1(uint16_t addr, uint8_t val) {
  __setCHRBank0High(addr, val);
  vrc2_4_SetChrROMBank0();
}


x86 assembly (clang, -O0):
<vrc2_4_setParamsBXX1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <__setCHRBank0High@plt>
mov    $0x0,%al
call   1030 <vrc2_4_SetChrROMBank0@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @vrc2_4_setParamsBXX1(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 @__setCHRBank0High(i32 %5, i32 %6)
%8 = call i32 (...) @vrc2_4_SetChrROMBank0()
ret void
}

LLVM IR (-O2):
define void @vrc2_4_setParamsBXX1(i32 %0, i32 %1) {
%3 = tail call i32 @__setCHRBank0High(i32 %0, i32 %1)
%4 = tail call i32 (...) @vrc2_4_SetChrROMBank0()
ret void
}
void ARGBExtractAlphaRow_Any_AVX2() {}


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

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

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

LLVM IR (-O2):
define void @ARGBExtractAlphaRow_Any_AVX2() {
ret void
}
/* Variables and functions */
int sort_partition(int *, int, int);
void sort_quick(int a[], int lo, int hi) {
  if (lo < hi) {
    int dp = sort_partition(a, lo, hi);
    sort_quick(a, lo, dp - 1);
    sort_quick(a, dp + 1, hi);
  }
}


x86 assembly (clang, -O0):
<sort_quick>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1174 <sort_quick+0x54>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1040 <sort_partition@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
sub    $0x1,%edx
call   1030 <sort_quick@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
add    $0x1,%esi
mov    -0x10(%rbp),%edx
call   1030 <sort_quick@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sort_quick>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
cmp    %edx,%esi
jge    1166 <sort_quick+0x46>
mov    %edx,%r14d
mov    %esi,%ebp
mov    %rdi,%r15
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r15,%rdi
mov    %ebp,%esi
mov    %r14d,%edx
call   1040 <sort_partition@plt>
mov    %eax,%ebx
lea    -0x1(%rbx),%edx
mov    %r15,%rdi
mov    %ebp,%esi
call   1030 <sort_quick@plt>
add    $0x1,%ebx
mov    %ebx,%ebp
cmp    %r14d,%ebx
jl     1140 <sort_quick+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @sort_quick(i32* %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, %2
br i1 %4, label %5, label %11
5: ; preds = %3, %5
%6 = phi i32 [ %9, %5 ], [ %1, %3 ]
%7 = tail call i32 @sort_partition(i32* %0, i32 %6, i32 %2)
%8 = add nsw i32 %7, -1
tail call void @sort_quick(i32* %0, i32 %6, i32 %8)
%9 = add nsw i32 %7, 1
%10 = icmp slt i32 %9, %2
br i1 %10, label %5, label %11
11: ; preds = %5, %3
ret void
}
char *HostName() {
  static char host_name[512];
  return "localhost";
}


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

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

LLVM IR (-O0):
@HostName.host_name = internal global [512 x i8] zeroinitializer
@.str = [10 x i8] c"localhost\00"
define i8* @HostName() {
ret i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [10 x i8] c"localhost\00"
define i8* @HostName() {
ret i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
typedef int /*<<< orphan*/ WINDOW;

/* Variables and functions */
int mvwscanw(int /*<<< orphan*/ *, int, int, char *, short *);
int i2_mvwscanw(WINDOW *win, int y, int x, char *fmt, short *i) {
  return (mvwscanw(win, y, x, fmt, i));
}


x86 assembly (clang, -O0):
<i2_mvwscanw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
call   1030 <mvwscanw@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2_mvwscanw>:
jmp    1030 <mvwscanw@plt>

LLVM IR (-O0):
define i32 @i2_mvwscanw(i32* %0, i32 %1, i32 %2, i8* %3, i16* %4) {
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i16*
store i32* %0, i32** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i8* %3, i8** %9
store i16* %4, i16** %10
%11 = load i32*, i32** %6
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = load i8*, i8** %9
%15 = load i16*, i16** %10
%16 = call i32 @mvwscanw(i32* %11, i32 %12, i32 %13, i8* %14, i16* %15)
ret i32 %16
}

LLVM IR (-O2):
define i32 @i2_mvwscanw(i32* %0, i32 %1, i32 %2, i8* %3, i16* %4) {
%6 = tail call i32 @mvwscanw(i32* %0, i32 %1, i32 %2, i8* %3, i16* %4)
ret i32 %6
}
int snd_seq_change_bit(int nr, void *array) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @snd_seq_change_bit(i32 %0, i8* nocapture readnone %1) {
ret i32 0
}
int test_imm_5Euint8_reg(unsigned char val) {
  return ((val) & (0x5E << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_5Euint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edx
and    $0x5e,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_5Euint8_reg>:
test   $0x5e,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_5Euint8_reg(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = and i32 %4, 94
%6 = icmp ne i32 %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_5Euint8_reg(i8 zeroext %0) {
%2 = and i8 %0, 94
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
void *realloc(void *, size_t);
void *Crealloc(void *p, size_t size) { return realloc(p, size); }


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

x86 assembly (clang, -O2):
<Crealloc>:
jmp    1030 <realloc@plt>

LLVM IR (-O0):
define i8* @Crealloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = load i64, i64* %4
%7 = call i8* @realloc(i8* %5, i64 %6)
ret i8* %7
}

LLVM IR (-O2):
define noalias i8* @Crealloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void signal_deal_with(int sig) { exit(0); }


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

x86 assembly (clang, -O2):
<signal_deal_with>:
push   %rax
xor    %edi,%edi
call   1030 <exit@plt>

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

LLVM IR (-O2):
define void @signal_deal_with(i32 %0) {
%2 = tail call i32 @exit(i32 0)
unreachable
}