xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ sleep(int);
int /*<<< orphan*/ stdout;
void count(int c) {
  while (c > 0) {
    printf("\b\b\b %d...", c);
    fflush(stdout);
    sleep(1);
    c--;
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<count>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    117c <count+0x4c>
mov    -0x4(%rbp),%esi
lea    0xeb1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e83(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
jmp    113b <count+0xb>
lea    0xe87(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<count>:
push   %r15
push   %r14
push   %rbx
test   %edi,%edi
jle    1188 <count+0x48>
mov    %edi,%ebx
lea    0xeae(%rip),%r14
mov    0x2e87(%rip),%r15
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    (%r15),%edi
call   1050 <fflush@plt>
mov    $0x1,%edi
call   1060 <sleep@plt>
lea    -0x1(%rbx),%eax
cmp    $0x1,%ebx
mov    %eax,%ebx
ja     1160 <count+0x20>
mov    $0xa,%edi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"\08\08\08 %d...\00"
@stdout = global i32 0
@.str.1 = [2 x i8] c"\0A\00"
define void @count(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %6, %1
%4 = load i32, i32* %2
%5 = icmp sgt i32 %4, 0
br i1 %5, label %6, label %14
6: ; preds = %3
%7 = load i32, i32* %2
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = load i32, i32* @stdout
%10 = call i32 @fflush(i32 %9)
%11 = call i32 @sleep(i32 1)
%12 = load i32, i32* %2
%13 = add nsw i32 %12, -1
store i32 %13, i32* %2
br label %3
14: ; preds = %3
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"\08\08\08 %d...\00"
@stdout = global i32 0
define void @count(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %11
3: ; preds = %1, %3
%4 = phi i32 [ %9, %3 ], [ %0, %1 ]
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = load i32, i32* @stdout
%7 = tail call i32 @fflush(i32 %6)
%8 = tail call i32 @sleep(i32 1)
%9 = add nsw i32 %4, -1
%10 = icmp ugt i32 %4, 1
br i1 %10, label %3, label %11
11: ; preds = %3, %1
%12 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
extern void shmem_collect32(void *target, const void *source, size_t nlong,
                            int PE_start, int logPE_stride, int PE_size,
                            long *pSync) {
  printf("\nOpenSHMEM Analyzer\n");
}


x86 assembly (clang, -O0):
<shmem_collect32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [21 x i8] c"\0AOpenSHMEM Analyzer\0A\00"
define void @shmem_collect32(i8* %0, i8* %1, i64 %2, i32 %3, i32 %4, i32 %5, i64* %6) {
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i64
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i64*
store i8* %0, i8** %8
store i8* %1, i8** %9
store i64 %2, i64* %10
store i32 %3, i32* %11
store i32 %4, i32* %12
store i32 %5, i32* %13
store i64* %6, i64** %14
%15 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [20 x i8] c"\0AOpenSHMEM Analyzer\00"
define void @shmem_collect32(i8* nocapture readnone %0, i8* nocapture readnone %1, i64 %2, i32 %3, i32 %4, i32 %5, i64* nocapture readnone %6) {
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_case(int *, int, int);
int main(void) {
  int ret;
  int i;
  int array1[] = {0, 1, 2, 3, 4, 5};
  int array2[] = {1};
  int array3[] = {3, 1};
  test_case(array3, 2, 1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeda(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xed7(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xed4(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xed2(%rip),%eax
mov    %eax,-0x34(%rbp)
mov    0xecc(%rip),%rax
mov    %rax,-0x3c(%rbp)
lea    -0x3c(%rbp),%rdi
mov    $0x2,%esi
mov    $0x1,%edx
call   1030 <test_case@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movabs $0x100000003,%rax
mov    %rax,(%rsp)
mov    %rsp,%rdi
mov    $0x2,%esi
mov    $0x1,%edx
call   1030 <test_case@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@__const.main.array1 = [6 x i32] [i32 0, i32 1, i32 2, i32 3, i32 4, i32 5]
@__const.main.array2 = [1 x i32] [i32 1]
@__const.main.array3 = [2 x i32] [i32 3, i32 1]
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca [6 x i32]
%5 = alloca [1 x i32]
%6 = alloca [2 x i32]
store i32 0, i32* %1
%7 = bitcast [6 x i32]* %4 to i8*
%8 = bitcast [1 x i32]* %5 to i8*
%9 = bitcast [2 x i32]* %6 to i8*
%10 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 0
%11 = call i32 @test_case(i32* %10, i32 2, i32 1)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
store i64 4294967299, i64* %1
%3 = bitcast i64* %1 to i32*
%4 = call i32 @test_case(i32* %3, i32 2, i32 1)
ret i32 0
}
void glutSetCursor(int cursor) {}


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

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

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

LLVM IR (-O2):
define void @glutSetCursor(i32 %0) {
ret void
}
int am_implied(void) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @am_implied() {
ret i32 1
}
/* Variables and functions */
double cos(double);
double cos_dec(double dec_sun) { return cos(dec_sun); }


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

x86 assembly (clang, -O2):
<cos_dec>:
jmp    1030 <cos@plt>

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

LLVM IR (-O2):
define double @cos_dec(double %0) {
%2 = tail call double @cos(double %0)
ret double %2
}
void CFGMR3InsertStringW(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ printBits(int, int *);
int setbits(unsigned int, int, int, unsigned int);
int main(void) {
  unsigned int x, y;
  int p, n;
  x = 255;
  y = 168;
  p = 4;
  n = 2;
  int res = setbits(x, p, n, y);
  printBits(sizeof(res), &res);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xff,-0x8(%rbp)
movl   $0xa8,-0xc(%rbp)
movl   $0x4,-0x10(%rbp)
movl   $0x2,-0x14(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0xc(%rbp),%ecx
call   1040 <setbits@plt>
mov    %eax,-0x18(%rbp)
mov    $0x4,%edi
lea    -0x18(%rbp),%rsi
call   1030 <printBits@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xff,%edi
mov    $0x4,%esi
mov    $0x2,%edx
mov    $0xa8,%ecx
call   1040 <setbits@plt>
mov    %eax,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x4,%edi
call   1030 <printBits@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
store i32 255, i32* %2
store i32 168, i32* %3
store i32 4, i32* %4
store i32 2, i32* %5
%7 = load i32, i32* %2
%8 = load i32, i32* %4
%9 = load i32, i32* %5
%10 = load i32, i32* %3
%11 = call i32 @setbits(i32 %7, i32 %8, i32 %9, i32 %10)
store i32 %11, i32* %6
%12 = call i32 @printBits(i32 4, i32* %6)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @setbits(i32 255, i32 4, i32 2, i32 168)
store i32 %3, i32* %1
%4 = call i32 @printBits(i32 4, i32* %1)
ret i32 0
}
/* Type definitions */
struct sembuf {
  int sem_op;
  scalar_t__ sem_flg;
  scalar_t__ sem_num;
};

/* Variables and functions */
int /*<<< orphan*/ perror(char *);
int semop(int, struct sembuf *, int);
void pv(int id, int operation) {
  static struct sembuf semaphor;
  semaphor.sem_num = 0;
  semaphor.sem_op = operation;
  semaphor.sem_flg = 0;
  if (semop(id, &semaphor, 1) == -1)
    perror("semop-Fehler");
}


x86 assembly (clang, -O0):
<pv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movq   $0x0,0x2f0f(%rip)
mov    -0x8(%rbp),%eax
mov    %eax,0x2ef6(%rip)
movq   $0x0,0x2ef3(%rip)
mov    -0x4(%rbp),%edi
lea    0x2ee1(%rip),%rsi
mov    $0x1,%edx
call   1040 <semop@plt>
cmp    $0xffffffff,%eax
jne    1176 <pv+0x56>
lea    0xe8f(%rip),%rdi
call   1030 <perror@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pv>:
push   %rax
mov    %esi,0x2f11(%rip)
lea    0x2f0a(%rip),%rsi
xorps  %xmm0,%xmm0
movups %xmm0,0x2f08(%rip)
mov    $0x1,%edx
call   1040 <semop@plt>
cmp    $0xffffffff,%eax
je     1149 <pv+0x29>
pop    %rax
ret
lea    0xeb0(%rip),%rdi
pop    %rax
jmp    1030 <perror@plt>

LLVM IR (-O0):
%struct.sembuf = type { i32, i64, i64 }
@pv.semaphor = internal global %struct.sembuf zeroinitializer
@.str = [13 x i8] c"semop-Fehler\00"
define void @pv(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
store i64 0, i64* getelementptr inbounds (%struct.sembuf, %struct.sembuf* @pv.semaphor, i32 0, i32 2)
%5 = load i32, i32* %4
store i32 %5, i32* getelementptr inbounds (%struct.sembuf, %struct.sembuf* @pv.semaphor, i32 0, i32 0)
store i64 0, i64* getelementptr inbounds (%struct.sembuf, %struct.sembuf* @pv.semaphor, i32 0, i32 1)
%6 = load i32, i32* %3
%7 = call i32 @semop(i32 %6, %struct.sembuf* @pv.semaphor, i32 1)
%8 = icmp eq i32 %7, -1
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = call i32 @perror(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %9, %2
ret void
}

LLVM IR (-O2):
%struct.sembuf = type { i32, i64, i64 }
@pv.semaphor = internal global %struct.sembuf zeroinitializer
@.str = [13 x i8] c"semop-Fehler\00"
define void @pv(i32 %0, i32 %1) {
store i32 %1, i32* getelementptr inbounds (%struct.sembuf, %struct.sembuf* @pv.semaphor, i64 0, i32 0)
store <2 x i64> zeroinitializer, <2 x i64>* bitcast (i64* getelementptr inbounds (%struct.sembuf, %struct.sembuf* @pv.semaphor, i64 0, i32 1) to <2 x i64>*)
%3 = tail call i32 @semop(i32 %0, %struct.sembuf* @pv.semaphor, i32 1)
%4 = icmp eq i32 %3, -1
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @perror(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %2
ret void
}
int fun977() { return 977; }


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

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

LLVM IR (-O0):
define i32 @fun977() {
ret i32 977
}

LLVM IR (-O2):
define i32 @fun977() {
ret i32 977
}
void fc2a(x) const int x;
{}


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

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

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

LLVM IR (-O2):
define void @fc2a(i32 %0) {
ret void
}
/* Variables and functions */
int is_first_in_group_MsgTypes(size_t __tag) {
  return (__tag == (372)) ? 1 : 0;
}


x86 assembly (clang, -O0):
<is_first_in_group_MsgTypes>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x174,%rdx
cmove  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_first_in_group_MsgTypes>:
xor    %eax,%eax
cmp    $0x174,%rdi
sete   %al
ret

LLVM IR (-O0):
define i32 @is_first_in_group_MsgTypes(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp eq i64 %3, 372
%5 = zext i1 %4 to i64
%6 = select i1 %4, i32 1, i32 0
ret i32 %6
}

LLVM IR (-O2):
define i32 @is_first_in_group_MsgTypes(i64 %0) {
%2 = icmp eq i64 %0, 372
%3 = zext i1 %2 to i32
ret i32 %3
}
void gtk_action_group_add_actions() {}


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

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

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

LLVM IR (-O2):
define void @gtk_action_group_add_actions() {
ret void
}
void crypto_init(int set_sys_key) {}


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

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

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

LLVM IR (-O2):
define void @crypto_init(i32 %0) {
ret void
}
void f(void) {
  int a, b, c, d;
  d = a ? b : c;
  d = a ? +b : +c;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
cmpl   $0x0,-0x4(%rbp)
je     1119 <f+0x19>
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    111f <f+0x1f>
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     113a <f+0x3a>
mov    -0x8(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    1140 <f+0x40>
mov    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x10(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @f() {
ret void
}
/* Variables and functions */
bool is_operator(char input) {
  if (input == '+' || input == '-' || input == '*' || input == '/' ||
      input == '%')
    return true;
  return false;
}


x86 assembly (clang, -O0):
<is_operator>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x2b,%eax
je     114b <is_operator+0x4b>
movsbl -0x5(%rbp),%eax
cmp    $0x2d,%eax
je     114b <is_operator+0x4b>
movsbl -0x5(%rbp),%eax
cmp    $0x2a,%eax
je     114b <is_operator+0x4b>
movsbl -0x5(%rbp),%eax
cmp    $0x2f,%eax
je     114b <is_operator+0x4b>
movsbl -0x5(%rbp),%eax
cmp    $0x25,%eax
jne    1157 <is_operator+0x57>
movl   $0x1,-0x4(%rbp)
jmp    115e <is_operator+0x5e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_operator>:
add    $0xdb,%dil
xor    %eax,%eax
cmp    $0xa,%dil
ja     111a <is_operator+0x1a>
movsbq %dil,%rax
lea    0xee9(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @is_operator(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp eq i32 %5, 43
br i1 %6, label %23, label %7
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 45
br i1 %10, label %23, label %11
11: ; preds = %7
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 42
br i1 %14, label %23, label %15
15: ; preds = %11
%16 = load i8, i8* %3
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %17, 47
br i1 %18, label %23, label %19
19: ; preds = %15
%20 = load i8, i8* %3
%21 = sext i8 %20 to i32
%22 = icmp eq i32 %21, 37
br i1 %22, label %23, label %24
23: ; preds = %19, %15, %11, %7, %1
store i32 1, i32* %2
br label %25
24: ; preds = %19
store i32 0, i32* %2
br label %25
25: ; preds = %24, %23
%26 = load i32, i32* %2
ret i32 %26
}

LLVM IR (-O2):
@switch.table.is_operator = [11 x i32] [i32 1, i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1, i32 0, i32 1]
define i32 @is_operator(i8 signext %0) {
%2 = add i8 %0, -37
%3 = icmp ult i8 %2, 11
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = sext i8 %2 to i64
%6 = getelementptr inbounds [11 x i32], [11 x i32]* @switch.table.is_operator, i64 0, i64 %5
%7 = load i32, i32* %6
br label %8
8: ; preds = %1, %4
%9 = phi i32 [ %7, %4 ], [ 0, %1 ]
ret i32 %9
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_mode;
};

/* Variables and functions */
int S_ISFIFO(int /*<<< orphan*/);
scalar_t__ stat(char const *, struct stat *);
int fsop_path_isfifo(const char *path) {
  struct stat st;
  if (stat(path, &st) < 0)
    return -1;
  return S_ISFIFO(st.st_mode);
}


x86 assembly (clang, -O0):
<fsop_path_isfifo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <stat@plt>
cmp    $0x0,%rax
jge    114f <fsop_path_isfifo+0x2f>
movl   $0xffffffff,-0x4(%rbp)
jmp    115a <fsop_path_isfifo+0x3a>
mov    -0x18(%rbp),%edi
call   1030 <S_ISFIFO@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fsop_path_isfifo>:
push   %rax
mov    %rsp,%rsi
call   1040 <stat@plt>
test   %rax,%rax
js     1138 <fsop_path_isfifo+0x18>
mov    (%rsp),%edi
call   1030 <S_ISFIFO@plt>
pop    %rcx
ret
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @fsop_path_isfifo(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca %struct.stat
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i64 @stat(i8* %5, %struct.stat* %4)
%7 = icmp slt i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %1
store i32 -1, i32* %2
br label %13
9: ; preds = %1
%10 = getelementptr inbounds %struct.stat, %struct.stat* %4, i32 0, i32 0
%11 = load i32, i32* %10
%12 = call i32 @S_ISFIFO(i32 %11)
store i32 %12, i32* %2
br label %13
13: ; preds = %9, %8
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @fsop_path_isfifo(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp slt i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%8 = load i32, i32* %7
%9 = call i32 @S_ISFIFO(i32 %8)
br label %10
10: ; preds = %1, %6
%11 = phi i32 [ %9, %6 ], [ -1, %1 ]
ret i32 %11
}
void set_drq_line(int irqline, int state) {}


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

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

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

LLVM IR (-O2):
define void @set_drq_line(i32 %0, i32 %1) {
ret void
}
int DummyCDGetStatus(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @DummyCDGetStatus() {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ c2_addr_read();
int /*<<< orphan*/ usleep(int);
uint8_t _c2_addr_read(void) {
  uint8_t x;
  usleep(1000);
  x = c2_addr_read();
  return x;
}


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

x86 assembly (clang, -O2):
<_c2_addr_read>:
push   %rax
mov    $0x3e8,%edi
call   1040 <usleep@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <c2_addr_read@plt>

LLVM IR (-O0):
define i32 @_c2_addr_read() {
%1 = alloca i32
%2 = call i32 @usleep(i32 1000)
%3 = call i32 (...) @c2_addr_read()
store i32 %3, i32* %1
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
define i32 @_c2_addr_read() {
%1 = tail call i32 @usleep(i32 1000)
%2 = tail call i32 (...) @c2_addr_read()
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ fatal(char *, int);
void *malloc(int);
void *xmalloc(int size) {
  void *ptr;
  ptr = malloc(size);
  if (ptr)
    return ptr;
  fatal("malloc(%d) failed", size);
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     114f <xmalloc+0x2f>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    115e <xmalloc+0x3e>
mov    -0xc(%rbp),%esi
lea    0xea7(%rip),%rdi
call   1040 <fatal@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
call   1030 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1140 <xmalloc+0x20>
lea    0xec7(%rip),%rdi
mov    %ebp,%esi
call   1040 <fatal@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [18 x i8] c"malloc(%d) failed\00"
define noalias i8* @xmalloc(i32 %0) {
%2 = tail call i8* @malloc(i32 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @fatal(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %0)
br label %6
6: ; preds = %1, %4
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ SIGQUIT;
int /*<<< orphan*/ SIG_DFL;
scalar_t__ SIG_ERR;
int /*<<< orphan*/ err_sys(char *);
int /*<<< orphan*/ printf(char *);
scalar_t__ signal(int /*<<< orphan*/, int /*<<< orphan*/);
void sig_quit(int signo) {
  printf("caught SIGQUIT\n");
  if (signal(SIGQUIT, SIG_DFL) == SIG_ERR) {
    err_sys("cannot reest SIGQUIT");
  }
  return;
}


x86 assembly (clang, -O0):
<sig_quit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xebe(%rip),%rdi
call   1040 <printf@plt>
mov    0x2e9a(%rip),%rax
mov    (%rax),%edi
mov    0x2e79(%rip),%rax
mov    (%rax),%esi
call   1050 <signal@plt>
mov    0x2e73(%rip),%rcx
cmp    (%rcx),%rax
jne    117a <sig_quit+0x4a>
lea    0xe9b(%rip),%rdi
call   1030 <err_sys@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sig_quit>:
push   %rax
lea    0xedd(%rip),%rdi
call   1030 <puts@plt>
mov    0x2ea4(%rip),%rax
mov    (%rax),%edi
mov    0x2e83(%rip),%rax
mov    (%rax),%esi
call   1050 <signal@plt>
mov    0x2e7d(%rip),%rcx
cmp    (%rcx),%rax
jne    116d <sig_quit+0x3d>
lea    0xe99(%rip),%rdi
pop    %rax
jmp    1040 <err_sys@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [16 x i8] c"caught SIGQUIT\0A\00"
@SIGQUIT = global i32 0
@SIG_DFL = global i32 0
@SIG_ERR = global i64 0
@.str.1 = [21 x i8] c"cannot reest SIGQUIT\00"
define void @sig_quit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @SIGQUIT
%5 = load i32, i32* @SIG_DFL
%6 = call i64 @signal(i32 %4, i32 %5)
%7 = load i64, i64* @SIG_ERR
%8 = icmp eq i64 %6, %7
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = call i32 @err_sys(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
br label %11
11: ; preds = %9, %1
ret void
}

LLVM IR (-O2):
@SIGQUIT = global i32 0
@SIG_DFL = global i32 0
@SIG_ERR = global i64 0
@.str.1 = [21 x i8] c"cannot reest SIGQUIT\00"
@str = [15 x i8] c"caught SIGQUIT\00"
define void @sig_quit(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
%3 = load i32, i32* @SIGQUIT
%4 = load i32, i32* @SIG_DFL
%5 = tail call i64 @signal(i32 %3, i32 %4)
%6 = load i64, i64* @SIG_ERR
%7 = icmp eq i64 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = tail call i32 @err_sys(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
br label %10
10: ; preds = %8, %1
ret void
}
int main() {
  int a, b, c;
  if (a) {
    goto A;
    c = 0;
  }
A:
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     111a <main+0x1a>
jmp    111f <main+0x1f>
jmp    111f <main+0x1f>
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
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = load i32, i32* %2
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %0
br label %9
8: ; preds = %0
br label %9
9: ; preds = %8, %7
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
unsigned int _hrt_div_up(unsigned int a, unsigned int b) {
  return (a + b - 1) / b;
}


x86 assembly (clang, -O0):
<_hrt_div_up>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
sub    $0x1,%eax
xor    %edx,%edx
divl   -0x8(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<_hrt_div_up>:
lea    (%rdi,%rsi,1),%eax
add    $0xffffffff,%eax
xor    %edx,%edx
div    %esi
ret

LLVM IR (-O0):
define i32 @_hrt_div_up(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 = add i32 %5, %6
%8 = sub i32 %7, 1
%9 = load i32, i32* %4
%10 = udiv i32 %8, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @_hrt_div_up(i32 %0, i32 %1) {
%3 = add i32 %0, -1
%4 = add i32 %3, %1
%5 = udiv i32 %4, %1
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main() {
  int i;
  int f;
  f = 1;
  for (i = 1; i <= 3; i++)
    f *= i;
  printf("El factorial de 3 es = %d", f);
  printf("\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0xc(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x3,-0x8(%rbp)
jg     114f <main+0x3f>
mov    -0x8(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    112d <main+0x1d>
mov    -0xc(%rbp),%esi
lea    0xea7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeb3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [26 x i8] c"El factorial de 3 es = %d\00"
@.str.1 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %3
store i32 1, i32* %2
br label %4
4: ; preds = %11, %0
%5 = load i32, i32* %2
%6 = icmp sle i32 %5, 3
br i1 %6, label %7, label %14
7: ; preds = %4
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = mul nsw i32 %9, %8
store i32 %10, i32* %3
br label %11
11: ; preds = %7
%12 = load i32, i32* %2
%13 = add nsw i32 %12, 1
store i32 %13, i32* %2
br label %4
14: ; preds = %4
%15 = load i32, i32* %3
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %15)
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [26 x i8] c"El factorial de 3 es = %d\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 6)
%2 = tail call i32 @putchar(i32 10)
ret i32 0
}
float f_rectangle(float b_num, float c_num) {
  float x;
  x = (b_num * 2.0) + (c_num * 2.0);
  return x;
}


x86 assembly (clang, -O0):
<f_rectangle>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x8(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  0xed8(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_rectangle>:
cvtss2sd %xmm0,%xmm0
cvtss2sd %xmm1,%xmm1
addsd  %xmm1,%xmm1
addsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @f_rectangle(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
store float %0, float* %3
store float %1, float* %4
%6 = load float, float* %3
%7 = fpext float %6 to double
%8 = load float, float* %4
%9 = fpext float %8 to double
%10 = fmul double %9, 2.000000e+00
%11 = call double @llvm.fmuladd.f64(double %7, double 2.000000e+00, double %10)
%12 = fptrunc double %11 to float
store float %12, float* %5
%13 = load float, float* %5
ret float %13
}

LLVM IR (-O2):
define float @f_rectangle(float %0, float %1) {
%3 = fpext float %0 to double
%4 = fpext float %1 to double
%5 = fmul double %4, 2.000000e+00
%6 = tail call double @llvm.fmuladd.f64(double %3, double 2.000000e+00, double %5)
%7 = fptrunc double %6 to float
ret float %7
}
/* Variables and functions */
bool bool_reverse_val(bool value) { return value ? false : true; }


x86 assembly (clang, -O0):
<bool_reverse_val>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
mov    $0x1,%eax
xor    %ecx,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @bool_reverse_val(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ random_uint32();
uint16_t random_uint16(void) { return random_uint32(); }


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

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

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

LLVM IR (-O2):
define i32 @random_uint16() {
%1 = tail call i32 (...) @random_uint32()
ret i32 %1
}
int thermal_notify_tz_trip_up(int tz_id, int id) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @thermal_notify_tz_trip_up(i32 %0, i32 %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void klee_make_symbolic(void *addr, size_t len, char const *name) { abort(); }


x86 assembly (clang, -O0):
<klee_make_symbolic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<klee_make_symbolic>:
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @klee_make_symbolic(i8* %0, i64 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i8*
store i8* %0, i8** %4
store i64 %1, i64* %5
store i8* %2, i8** %6
%7 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
define void @klee_make_symbolic(i8* nocapture readnone %0, i64 %1, i8* nocapture readnone %2) {
%4 = tail call i32 (...) @abort()
unreachable
}
int test_imm_6Dint64_highword_reg(long long val) {
  return ((val >> 32) & (0x6D << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_6Dint64_highword_reg>:
movabs $0x6d00000000,%rax
test   %rax,%rdi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_6Dint64_highword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = ashr i64 %3, 32
%5 = and i64 %4, 109
%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_6Dint64_highword_reg(i64 %0) {
%2 = and i64 %0, 468151435264
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
double min(double a, double b) { return (a <= b ? a : b); }


x86 assembly (clang, -O0):
<min>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     1131 <min+0x31>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    113b <min+0x3b>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<min>:
movapd %xmm0,%xmm2
cmplesd %xmm1,%xmm2
andpd  %xmm2,%xmm0
andnpd %xmm1,%xmm2
orpd   %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @min(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* %4
%7 = fcmp ole double %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load double, double* %3
br label %12
10: ; preds = %2
%11 = load double, double* %4
br label %12
12: ; preds = %10, %8
%13 = phi double [ %9, %8 ], [ %11, %10 ]
ret double %13
}

LLVM IR (-O2):
define double @min(double %0, double %1) {
%3 = fcmp ole double %0, %1
%4 = select i1 %3, double %0, double %1
ret double %4
}
int main() {
  int x, sorted;
  x = 20;
  int a[5];
  a[0] = 10;
  printf(x);
  x = a[0];
  printf(x);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x14,-0x4(%rbp)
movl   $0xa,-0x20(%rbp)
movslq -0x4(%rbp),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%eax
mov    %eax,-0x4(%rbp)
movslq -0x4(%rbp),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [5 x i32]
store i32 20, i32* %1
%4 = getelementptr inbounds [5 x i32], [5 x i32]* %3, i64 0, i64 0
store i32 10, i32* %4
%5 = load i32, i32* %1
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to i8*
%8 = call i32 (i8*, ...) @printf(i8* %7)
%9 = getelementptr inbounds [5 x i32], [5 x i32]* %3, i64 0, i64 0
%10 = load i32, i32* %9
store i32 %10, i32* %1
%11 = load i32, i32* %1
%12 = sext i32 %11 to i64
%13 = inttoptr i64 %12 to i8*
%14 = call i32 (i8*, ...) @printf(i8* %13)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* inttoptr (i64 20 to i8*))
%2 = tail call i32 (i8*, ...) @printf(i8* inttoptr (i64 10 to i8*))
ret i32 0
}
int Stub(int argc, char *argv[]) { return 0; }


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

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

LLVM IR (-O0):
define i32 @Stub(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 @Stub(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
uint8_t bootloader_common_get_chip_revision(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @bootloader_common_get_chip_revision() {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ WNOHANG;
int waitpid(int /*<<< orphan*/, int /*<<< orphan*/ *, int /*<<< orphan*/);
int check_pid(pid_t pid) { return waitpid(pid, NULL, WNOHANG); }


x86 assembly (clang, -O0):
<check_pid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ec3(%rip),%rax
mov    (%rax),%edx
xor    %eax,%eax
mov    %eax,%esi
call   1030 <waitpid@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_pid>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
jmp    1030 <waitpid@plt>

LLVM IR (-O0):
@WNOHANG = global i32 0
define i32 @check_pid(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @WNOHANG
%5 = call i32 @waitpid(i32 %3, i32* null, i32 %4)
ret i32 %5
}

LLVM IR (-O2):
@WNOHANG = global i32 0
define i32 @check_pid(i32 %0) {
%2 = load i32, i32* @WNOHANG
%3 = tail call i32 @waitpid(i32 %0, i32* null, i32 %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
int /*<<< orphan*/ scanf(char *, int *, int *, int *);
int main() {
  int month = 0;
  int day = 0;
  int year = 0;
  scanf("%d/%d/%d", &month, &day, &year);
  printf("%02d.%02d.%d\n", day, month, year);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movl   $0x0,0x14(%rsp)
movl   $0x0,0x10(%rsp)
movl   $0x0,0xc(%rsp)
lea    0xebd(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1040 <scanf@plt>
mov    0x10(%rsp),%esi
mov    0x14(%rsp),%edx
mov    0xc(%rsp),%ecx
lea    0xe9f(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
@.str = [9 x i8] c"%d/%d/%d\00"
@.str.1 = [14 x i8] c"%02d.%02d.%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%5 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%6 = bitcast i32* %3 to i8*
store i32 0, i32* %3
%7 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2, i32* %3)
%8 = load i32, i32* %2
%9 = load i32, i32* %1
%10 = load i32, i32* %3
%11 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %8, i32 %9, i32 %10)
ret i32 0
}
int mlt_version_get_int() { return ((6 << 16) + (23 << 8) + 0); }


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

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

LLVM IR (-O0):
define i32 @mlt_version_get_int() {
ret i32 399104
}

LLVM IR (-O2):
define i32 @mlt_version_get_int() {
ret i32 399104
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
main() {
  int i;
  i = 0;
start:
  if (i == 5)
    goto fin;
  printf("i = %d\n", i);
  i++;
  goto start;
fin:
  return 3;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jne    1135 <main+0x25>
jmp    1152 <main+0x42>
mov    -0x8(%rbp),%esi
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
mov    $0x3,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
mov    $0x3,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [8 x i8] c"i = %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 0)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 1)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 2)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 3)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 4)
ret i32 3
}
/* Variables and functions */
char *medusaReceiveDataInternal(int, int *, int, int, int);
char *medusaReceiveLineDelay(int socket, int *nBufferSize, int nReceiveDelay1,
                             int nReceiveDelay2) {
  return medusaReceiveDataInternal(socket, nBufferSize, 1, nReceiveDelay1,
                                   nReceiveDelay2);
}


x86 assembly (clang, -O0):
<medusaReceiveLineDelay>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%ecx
mov    -0x18(%rbp),%r8d
mov    $0x1,%edx
call   1030 <medusaReceiveDataInternal@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<medusaReceiveLineDelay>:
mov    %ecx,%r8d
mov    %edx,%ecx
mov    $0x1,%edx
jmp    1030 <medusaReceiveDataInternal@plt>

LLVM IR (-O0):
define i8* @medusaReceiveLineDelay(i32 %0, i32* %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32* %1, i32** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = load i32*, i32** %6
%11 = load i32, i32* %7
%12 = load i32, i32* %8
%13 = call i8* @medusaReceiveDataInternal(i32 %9, i32* %10, i32 1, i32 %11, i32 %12)
ret i8* %13
}

LLVM IR (-O2):
define i8* @medusaReceiveLineDelay(i32 %0, i32* %1, i32 %2, i32 %3) {
%5 = tail call i8* @medusaReceiveDataInternal(i32 %0, i32* %1, i32 1, i32 %2, i32 %3)
ret i8* %5
}
/* Variables and functions */
int AF_INET;
int /*<<< orphan*/ err(char *);
int rresvport(int *);
int p_rresvport_af(int *port, int family) {
  if (family != AF_INET)
    err("%p: rresvport called with family != AF_INET!\n");
  return rresvport(port);
}


x86 assembly (clang, -O0):
<p_rresvport_af>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    0x2eaf(%rip),%rcx
cmp    (%rcx),%eax
je     114d <p_rresvport_af+0x2d>
lea    0xeb8(%rip),%rdi
call   1040 <err@plt>
mov    -0x8(%rbp),%rdi
call   1030 <rresvport@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<p_rresvport_af>:
push   %rbx
mov    %rdi,%rbx
mov    0x2ebd(%rip),%rax
cmp    %esi,(%rax)
je     113b <p_rresvport_af+0x1b>
lea    0xeca(%rip),%rdi
call   1040 <err@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <rresvport@plt>

LLVM IR (-O0):
@AF_INET = global i32 0
@.str = [46 x i8] c"%p: rresvport called with family != AF_INET!\0A\00"
define i32 @p_rresvport_af(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 = load i32, i32* @AF_INET
%7 = icmp ne i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = call i32 @err(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %2
%11 = load i32*, i32** %3
%12 = call i32 @rresvport(i32* %11)
ret i32 %12
}

LLVM IR (-O2):
@AF_INET = global i32 0
@.str = [46 x i8] c"%p: rresvport called with family != AF_INET!\0A\00"
define i32 @p_rresvport_af(i32* %0, i32 %1) {
%3 = load i32, i32* @AF_INET
%4 = icmp eq i32 %3, %1
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @err(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %2
%8 = tail call i32 @rresvport(i32* %0)
ret i32 %8
}