xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
char *asctime(int /*<<< orphan*/);
int /*<<< orphan*/ localtime(int /*<<< orphan*/ const *);
int /*<<< orphan*/ strcpy(char *, char *);
char *ctime_r(const time_t *t, char *buf) {
  char *temp;
  temp = asctime(localtime(t));
  strcpy(buf, temp);
  return (buf);
}


x86 assembly (clang, -O0):
<ctime_r>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <localtime@plt>
mov    %eax,%edi
call   1050 <asctime@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ctime_r>:
push   %rbx
mov    %rsi,%rbx
call   1030 <localtime@plt>
mov    %eax,%edi
call   1050 <asctime@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
call   1040 <strcpy@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @ctime_r(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
%5 = alloca i8*
store i32* %0, i32** %3
store i8* %1, i8** %4
%6 = load i32*, i32** %3
%7 = call i32 @localtime(i32* %6)
%8 = call i8* @asctime(i32 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %4
%10 = load i8*, i8** %5
%11 = call i32 @strcpy(i8* %9, i8* %10)
%12 = load i8*, i8** %4
ret i8* %12
}

LLVM IR (-O2):
define i8* @ctime_r(i32* %0, i8* returned %1) {
%3 = tail call i32 @localtime(i32* %0)
%4 = tail call i8* @asctime(i32 %3)
%5 = tail call i32 @strcpy(i8* %1, i8* %4)
ret i8* %1
}
/* Type definitions */
typedef int /*<<< orphan*/ volatile uint32_t;

/* Variables and functions */
uint32_t EEPROMStatusGet(void) {
  return ((*((volatile uint32_t *)(0x400AF018))));
}


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

x86 assembly (clang, -O2):
<EEPROMStatusGet>:
mov    0x400af018,%eax
ret

LLVM IR (-O0):
define i32 @EEPROMStatusGet() {
%1 = load volatile i32, i32* inttoptr (i64 1074458648 to i32*)
ret i32 %1
}

LLVM IR (-O2):
define i32 @EEPROMStatusGet() {
%1 = load volatile i32, i32* inttoptr (i64 1074458648 to i32*)
ret i32 %1
}
void dbg_write_custom(void *arg, const char *str) {
  if (arg)
    (*(void (*)(const char *))(arg))(str);
}


x86 assembly (clang, -O0):
<dbg_write_custom>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1125 <dbg_write_custom+0x25>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rdi
call   *%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dbg_write_custom>:
test   %rdi,%rdi
je     110d <dbg_write_custom+0xd>
mov    %rdi,%rax
mov    %rsi,%rdi
jmp    *%rax
ret

LLVM IR (-O0):
define void @dbg_write_custom(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 = icmp ne i8* %5, null
br i1 %6, label %7, label %11
7: ; preds = %2
%8 = load i8*, i8** %3
%9 = bitcast i8* %8 to void (i8*)*
%10 = load i8*, i8** %4
br label %11
11: ; preds = %7, %2
ret void
}

LLVM IR (-O2):
define void @dbg_write_custom(i8* %0, i8* %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = bitcast i8* %0 to void (i8*)*
tail call void %5(i8* %1)
br label %6
6: ; preds = %4, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(int argc, const char *argv[]) {
  int age = 10;
  int height = 72;
  printf("I am %d years old.\n", age);
  printf("I am %d inches tall.\n", height);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0xa,-0x14(%rbp)
movl   $0x48,-0x18(%rbp)
mov    -0x14(%rbp),%esi
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%esi
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [20 x i8] c"I am %d years old.\0A\00"
@.str.1 = [22 x i8] c"I am %d inches tall.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 10, i32* %6
store i32 72, i32* %7
%8 = load i32, i32* %6
%9 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = load i32, i32* %7
%11 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"I am %d years old.\0A\00"
@.str.1 = [22 x i8] c"I am %d inches tall.\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 10)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 72)
ret i32 0
}
void pointerArray3() {
  char *arr[20];
  char **parr = arr;
}


x86 assembly (clang, -O0):
<pointerArray3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    -0xa0(%rbp),%rax
mov    %rax,-0xa8(%rbp)
add    $0x30,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @pointerArray3() {
%1 = alloca [20 x i8*]
%2 = alloca i8**
%3 = getelementptr inbounds [20 x i8*], [20 x i8*]* %1, i64 0, i64 0
store i8** %3, i8*** %2
ret void
}

LLVM IR (-O2):
define void @pointerArray3() {
ret void
}
/* Variables and functions */
char *malloc(int);
size_t read(int /*<<< orphan*/, char *, int);
char *readLine() {
  size_t ret;
  char *buff;
  if ((buff = malloc(sizeof(*buff) * (50 + 1))) == NULL)
    return (NULL);
  if ((ret = read(0, buff, 50)) > 1) {
    buff[ret - 1] = '\0';
    return (buff);
  }
  buff[0] = '\0';
  return (buff);
}


x86 assembly (clang, -O0):
<readLine>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    $0x33,%edi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    114d <readLine+0x2d>
movq   $0x0,-0x8(%rbp)
jmp    1197 <readLine+0x77>
mov    -0x18(%rbp),%rsi
xor    %edi,%edi
mov    $0x32,%edx
call   1030 <read@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x1,%rax
jbe    1188 <readLine+0x68>
mov    -0x18(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    $0x1,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1197 <readLine+0x77>
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readLine>:
push   %r14
push   %rbx
push   %rax
mov    $0x33,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1155 <readLine+0x35>
xor    %r14d,%r14d
xor    %edi,%edi
mov    %rbx,%rsi
mov    $0x32,%edx
call   1030 <read@plt>
sub    $0x1,%rax
cmovae %rax,%r14
movb   $0x0,(%rbx,%r14,1)
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @readLine() {
%1 = alloca i8*
%2 = alloca i64
%3 = alloca i8*
%4 = call i8* @malloc(i32 51)
store i8* %4, i8** %3
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %7
6: ; preds = %0
store i8* null, i8** %1
br label %21
7: ; preds = %0
%8 = load i8*, i8** %3
%9 = call i64 @read(i32 0, i8* %8, i32 50)
store i64 %9, i64* %2
%10 = icmp ugt i64 %9, 1
br i1 %10, label %11, label %17
11: ; preds = %7
%12 = load i8*, i8** %3
%13 = load i64, i64* %2
%14 = sub i64 %13, 1
%15 = getelementptr inbounds i8, i8* %12, i64 %14
store i8 0, i8* %15
%16 = load i8*, i8** %3
store i8* %16, i8** %1
br label %21
17: ; preds = %7
%18 = load i8*, i8** %3
%19 = getelementptr inbounds i8, i8* %18, i64 0
store i8 0, i8* %19
%20 = load i8*, i8** %3
store i8* %20, i8** %1
br label %21
21: ; preds = %17, %11, %6
%22 = load i8*, i8** %1
ret i8* %22
}

LLVM IR (-O2):
define noalias i8* @readLine() {
%1 = tail call dereferenceable_or_null(51) i8* @malloc(i32 51)
%2 = icmp eq i8* %1, null
br i1 %2, label %7, label %3
3: ; preds = %0
%4 = tail call i64 @read(i32 0, i8* %1, i32 50)
%5 = call i64 @llvm.usub.sat.i64(i64 %4, i64 1)
%6 = getelementptr i8, i8* %1, i64 %5
store i8 0, i8* %6
br label %7
7: ; preds = %3, %0
ret i8* %1
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ stdout;
main() {
  int x;
  char y;
  x = 1;
  y = '1';
  x = x + y;
  fprintf(stdout, "%d\n", x);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x4(%rbp)
movb   $0x31,-0x5(%rbp)
mov    -0x4(%rbp),%eax
movsbl -0x5(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%edx
lea    0xebe(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
lea    0xedf(%rip),%rsi
mov    $0x32,%edx
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 1, i32* %1
store i8 49, i8* %2
%3 = load i32, i32* %1
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
%6 = add nsw i32 %3, %5
store i32 %6, i32* %1
%7 = load i32, i32* @stdout
%8 = load i32, i32* %1
%9 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %8)
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 50)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int, int, int, int, int, int, int,
                          int, int, int);
int main() {
  printf("sizeof(char)    = %d\n"
         "sizeof(short)   = %d\n"
         "sizeof(int)     = %d\n"
         "sizeof(long)    = %d\n"
         "sizeof(lg int)  = %d\n"
         "sizeof(lg long) = %d\n"
         "sizeof(float)   = %d\n"
         "sizeof(double)  = %d\n"
         "sizeof(void*)   = %d\n"
         "sizeof(char*)   = %d\n"
         "sizeof(size_t)  = %d\n"
         "sizeof(size_t*) = %d\n",
         sizeof(char), sizeof(short), sizeof(int), sizeof(long),
         sizeof(long int), sizeof(long long), sizeof(float), sizeof(double),
         sizeof(void *), sizeof(char *), sizeof(size_t), sizeof(size_t *));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x1,%esi
mov    $0x2,%edx
mov    $0x4,%ecx
mov    $0x8,%r9d
mov    %r9d,%r8d
movl   $0x8,(%rsp)
movl   $0x4,0x8(%rsp)
movl   $0x8,0x10(%rsp)
movl   $0x8,0x18(%rsp)
movl   $0x8,0x20(%rsp)
movl   $0x8,0x28(%rsp)
movl   $0x8,0x30(%rsp)
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
sub    $0x8,%rsp
lea    0xee4(%rip),%rdi
mov    $0x1,%esi
mov    $0x2,%edx
mov    $0x4,%ecx
mov    $0x8,%r8d
mov    $0x8,%r9d
push   $0x8
push   $0x8
push   $0x8
push   $0x8
push   $0x8
push   $0x4
push   $0x8
call   1030 <printf@plt>
add    $0x40,%rsp
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [253 x i8] c"sizeof(char) = %d\0Asizeof(short) = %d\0Asizeof(int) = %d\0Asizeof(long) = %d\0Asizeof(lg int) = %d\0Asizeof(lg long) = %d\0Asizeof(float) = %d\0Asizeof(double) = %d\0Asizeof(void*) = %d\0Asizeof(char*) = %d\0Asizeof(size_t) = %d\0Asizeof(size_t*) = %d\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([253 x i8], [253 x i8]* @.str, i64 0, i64 0), i32 1, i32 2, i32 4, i32 8, i32 8, i32 8, i32 4, i32 8, i32 8, i32 8, i32 8, i32 8)
ret i32 0
}

LLVM IR (-O2):
@.str = [253 x i8] c"sizeof(char) = %d\0Asizeof(short) = %d\0Asizeof(int) = %d\0Asizeof(long) = %d\0Asizeof(lg int) = %d\0Asizeof(lg long) = %d\0Asizeof(float) = %d\0Asizeof(double) = %d\0Asizeof(void*) = %d\0Asizeof(char*) = %d\0Asizeof(size_t) = %d\0Asizeof(size_t*) = %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([253 x i8], [253 x i8]* @.str, i64 0, i64 0), i32 1, i32 2, i32 4, i32 8, i32 8, i32 8, i32 4, i32 8, i32 8, i32 8, i32 8, i32 8)
ret i32 0
}
int find_f(int x, int *arr, int size) {
  int i;
  for (i = 0; i < size; ++i)
    if (arr[i] == x)
      return i;
  return -1;
}


x86 assembly (clang, -O0):
<find_f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1153 <find_f+0x53>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0x8(%rbp),%eax
jne    1140 <find_f+0x40>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    115a <find_f+0x5a>
jmp    1145 <find_f+0x45>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1115 <find_f+0x15>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<find_f>:
mov    $0xffffffff,%eax
test   %edx,%edx
jle    111e <find_f+0x1e>
mov    %edx,%edx
xor    %ecx,%ecx
nopl   (%rax)
cmp    %edi,(%rsi,%rcx,4)
je     111f <find_f+0x1f>
add    $0x1,%rcx
cmp    %rcx,%rdx
jne    1110 <find_f+0x10>
ret
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @find_f(i32 %0, i32* nocapture %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %17
5: ; preds = %3
%6 = zext i32 %2 to i64
br label %7
7: ; preds = %5, %12
%8 = phi i64 [ 0, %5 ], [ %13, %12 ]
%9 = getelementptr inbounds i32, i32* %1, i64 %8
%10 = load i32, i32* %9
%11 = icmp eq i32 %10, %0
br i1 %11, label %15, label %12
12: ; preds = %7
%13 = add nuw nsw i64 %8, 1
%14 = icmp eq i64 %13, %6
br i1 %14, label %17, label %7
15: ; preds = %7
%16 = trunc i64 %8 to i32
br label %17
17: ; preds = %12, %15, %3
%18 = phi i32 [ -1, %3 ], [ %16, %15 ], [ -1, %12 ]
ret i32 %18
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
int /*<<< orphan*/ usleep(int);
void pwmOn() {
  system("echo 1 > /sys/class/pwm/pwmchip0/pwm0/enable");
  system("echo 1 > /sys/class/pwm/pwmchip0/pwm1/enable");
  usleep(10000);
}


x86 assembly (clang, -O0):
<pwmOn>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <system@plt>
lea    0xef6(%rip),%rdi
call   1030 <system@plt>
mov    $0x2710,%edi
call   1040 <usleep@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pwmOn>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <system@plt>
lea    0xef9(%rip),%rdi
call   1030 <system@plt>
mov    $0x2710,%edi
pop    %rax
jmp    1040 <usleep@plt>

LLVM IR (-O0):
@.str = [45 x i8] c"echo 1 > /sys/class/pwm/pwmchip0/pwm0/enable\00"
@.str.1 = [45 x i8] c"echo 1 > /sys/class/pwm/pwmchip0/pwm1/enable\00"
define void @pwmOn() {
%1 = call i32 @system(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @system(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @usleep(i32 10000)
ret void
}

LLVM IR (-O2):
@.str = [45 x i8] c"echo 1 > /sys/class/pwm/pwmchip0/pwm0/enable\00"
@.str.1 = [45 x i8] c"echo 1 > /sys/class/pwm/pwmchip0/pwm1/enable\00"
define void @pwmOn() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @system(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @usleep(i32 10000)
ret void
}
/* Variables and functions */
float M_PI;
float sin(float);
float backEaseInf(float p) { return p * p * p - p * sin(p * M_PI); }


x86 assembly (clang, -O0):
<backEaseInf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
mov    0x2e9c(%rip),%rax
mulss  (%rax),%xmm0
call   1030 <sin@plt>
movss  -0x10(%rbp),%xmm1
movss  -0xc(%rbp),%xmm2
movaps %xmm0,%xmm3
movss  -0x8(%rbp),%xmm0
mulss  %xmm3,%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<backEaseInf>:
push   %rax
movaps %xmm0,%xmm1
movss  %xmm0,(%rsp)
mulss  %xmm0,%xmm0
movss  %xmm0,0x4(%rsp)
mov    0x2ebe(%rip),%rax
movss  (%rax),%xmm0
mulss  %xmm1,%xmm0
call   1030 <sin@plt>
movss  (%rsp),%xmm2
mulss  %xmm2,%xmm0
movss  0x4(%rsp),%xmm1
mulss  %xmm2,%xmm1
subss  %xmm0,%xmm1
movaps %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@M_PI = global float 0.000000e+00
define float @backEaseInf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = load float, float* %2
%5 = fmul float %3, %4
%6 = load float, float* %2
%7 = load float, float* %2
%8 = load float, float* %2
%9 = load float, float* @M_PI
%10 = fmul float %8, %9
%11 = call float @sin(float %10)
%12 = fmul float %7, %11
%13 = fneg float %12
%14 = call float @llvm.fmuladd.f32(float %5, float %6, float %13)
ret float %14
}

LLVM IR (-O2):
@M_PI = global float 0.000000e+00
define float @backEaseInf(float %0) {
%2 = fmul float %0, %0
%3 = load float, float* @M_PI
%4 = fmul float %3, %0
%5 = tail call float @sin(float %4)
%6 = fneg float %5
%7 = fmul float %6, %0
%8 = tail call float @llvm.fmuladd.f32(float %2, float %0, float %7)
ret float %8
}
/* Variables and functions */
int intExp(char *text) { return ((int)((doubleExp(text)) + 0.5)); }


x86 assembly (clang, -O0):
<intExp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1030 <doubleExp@plt>
cvtsi2sd %eax,%xmm0
movsd  0xecd(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<intExp>:
push   %rax
xor    %eax,%eax
call   1030 <doubleExp@plt>
cvtsi2sd %eax,%xmm0
addsd  0xedc(%rip),%xmm0
cvttsd2si %xmm0,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @intExp(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) bitcast (i32 (...)* @doubleExp to i32 (i8*, ...)*)(i8* %3)
%5 = sitofp i32 %4 to double
%6 = fadd double %5, 5.000000e-01
%7 = fptosi double %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @intExp(i8* %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @doubleExp to i32 (i8*, ...)*)(i8* %0)
%3 = sitofp i32 %2 to double
%4 = fadd double %3, 5.000000e-01
%5 = fptosi double %4 to i32
ret i32 %5
}
/* Variables and functions */
scalar_t__ modules_extensionindex(char const *);
int modules_knownextension(const char *extension) {
  return modules_extensionindex(extension) >= 0;
}


x86 assembly (clang, -O0):
<modules_knownextension>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <modules_extensionindex@plt>
cmp    $0x0,%rax
setge  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<modules_knownextension>:
push   %rax
call   1030 <modules_extensionindex@plt>
shr    $0x3f,%rax
xor    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @modules_knownextension(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @modules_extensionindex(i8* %3)
%5 = icmp sge i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @modules_knownextension(i8* %0) {
%2 = tail call i64 @modules_extensionindex(i8* %0)
%3 = lshr i64 %2, 63
%4 = trunc i64 %3 to i32
%5 = xor i32 %4, 1
ret i32 %5
}
double iterations_to_selection(int part, int n, int cycle_size, int occurrences,
                               int sos_size) {
  double x = n * ((double)cycle_size / part);
  return x / ((double)occurrences / sos_size);
}


x86 assembly (clang, -O0):
<iterations_to_selection>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
cvtsi2sdl -0x8(%rbp),%xmm0
cvtsi2sdl -0xc(%rbp),%xmm1
cvtsi2sdl -0x4(%rbp),%xmm2
divsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
cvtsi2sdl -0x10(%rbp),%xmm1
cvtsi2sdl -0x14(%rbp),%xmm2
divsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<iterations_to_selection>:
cvtsi2sd %esi,%xmm0
movd   %ecx,%xmm1
movd   %edx,%xmm2
punpckldq %xmm1,%xmm2
cvtdq2pd %xmm2,%xmm1
movd   %r8d,%xmm2
movd   %edi,%xmm3
punpckldq %xmm2,%xmm3
cvtdq2pd %xmm3,%xmm2
divpd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
unpckhpd %xmm1,%xmm1
divsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @iterations_to_selection(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca double
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%12 = load i32, i32* %7
%13 = sitofp i32 %12 to double
%14 = load i32, i32* %8
%15 = sitofp i32 %14 to double
%16 = load i32, i32* %6
%17 = sitofp i32 %16 to double
%18 = fdiv double %15, %17
%19 = fmul double %13, %18
store double %19, double* %11
%20 = load double, double* %11
%21 = load i32, i32* %9
%22 = sitofp i32 %21 to double
%23 = load i32, i32* %10
%24 = sitofp i32 %23 to double
%25 = fdiv double %22, %24
%26 = fdiv double %20, %25
ret double %26
}

LLVM IR (-O2):
define double @iterations_to_selection(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = sitofp i32 %1 to double
%7 = insertelement <2 x i32> poison, i32 %2, i64 0
%8 = insertelement <2 x i32> %7, i32 %3, i64 1
%9 = sitofp <2 x i32> %8 to <2 x double>
%10 = insertelement <2 x i32> poison, i32 %0, i64 0
%11 = insertelement <2 x i32> %10, i32 %4, i64 1
%12 = sitofp <2 x i32> %11 to <2 x double>
%13 = fdiv <2 x double> %9, %12
%14 = extractelement <2 x double> %13, i64 0
%15 = fmul double %14, %6
%16 = extractelement <2 x double> %13, i64 1
%17 = fdiv double %15, %16
ret double %17
}
void swr_convert() {}


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

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

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

LLVM IR (-O2):
define void @swr_convert() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ TerminalCommands_Execute(char *);
int /*<<< orphan*/ Terminal_PrintPrompt();
void ExecuteCommand(char *cmd, unsigned int cmdLen) {
  TerminalCommands_Execute(cmd);
  Terminal_PrintPrompt();
}


x86 assembly (clang, -O0):
<ExecuteCommand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <TerminalCommands_Execute@plt>
mov    $0x0,%al
call   1040 <Terminal_PrintPrompt@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @ExecuteCommand(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = call i32 @TerminalCommands_Execute(i8* %5)
%7 = call i32 (...) @Terminal_PrintPrompt()
ret void
}

LLVM IR (-O2):
define void @ExecuteCommand(i8* %0, i32 %1) {
%3 = tail call i32 @TerminalCommands_Execute(i8* %0)
%4 = tail call i32 (...) @Terminal_PrintPrompt()
ret void
}
void i2d_GENERAL_NAMES(void) {}


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

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

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

LLVM IR (-O2):
define void @i2d_GENERAL_NAMES() {
ret void
}
void update_deviance(double *deviance, int cur, double var, double thrd_m) {
  double mean = thrd_m / var;
  *deviance = ((double)(cur - 1) * (*deviance) + mean) / (double)cur;
}


x86 assembly (clang, -O0):
<update_deviance>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movsd  %xmm0,-0x18(%rbp)
movsd  %xmm1,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
divsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
cvtsi2sd %eax,%xmm0
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm2
movsd  -0x28(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsi2sdl -0xc(%rbp),%xmm1
divsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<update_deviance>:
lea    -0x1(%rsi),%eax
cvtsi2sd %eax,%xmm2
divsd  %xmm0,%xmm1
mulsd  (%rdi),%xmm2
addsd  %xmm1,%xmm2
xorps  %xmm0,%xmm0
cvtsi2sd %esi,%xmm0
divsd  %xmm0,%xmm2
movsd  %xmm2,(%rdi)
ret

LLVM IR (-O0):
define void @update_deviance(double* %0, i32 %1, double %2, double %3) {
%5 = alloca double*
%6 = alloca i32
%7 = alloca double
%8 = alloca double
%9 = alloca double
store double* %0, double** %5
store i32 %1, i32* %6
store double %2, double* %7
store double %3, double* %8
%10 = load double, double* %8
%11 = load double, double* %7
%12 = fdiv double %10, %11
store double %12, double* %9
%13 = load i32, i32* %6
%14 = sub nsw i32 %13, 1
%15 = sitofp i32 %14 to double
%16 = load double*, double** %5
%17 = load double, double* %16
%18 = load double, double* %9
%19 = call double @llvm.fmuladd.f64(double %15, double %17, double %18)
%20 = load i32, i32* %6
%21 = sitofp i32 %20 to double
%22 = fdiv double %19, %21
%23 = load double*, double** %5
store double %22, double* %23
ret void
}

LLVM IR (-O2):
define void @update_deviance(double* nocapture %0, i32 %1, double %2, double %3) {
%5 = fdiv double %3, %2
%6 = add nsw i32 %1, -1
%7 = sitofp i32 %6 to double
%8 = load double, double* %0
%9 = tail call double @llvm.fmuladd.f64(double %7, double %8, double %5)
%10 = sitofp i32 %1 to double
%11 = fdiv double %9, %10
store double %11, double* %0
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ RC4_KEY;

/* Variables and functions */
int /*<<< orphan*/ RC4(int /*<<< orphan*/ *, int, unsigned char const *,
                       unsigned char *);
int /*<<< orphan*/ RC4_set_key(int /*<<< orphan*/ *, int,
                               unsigned char const *);
void hash_proto_rc4_encrypt(const unsigned char *key, int keysize,
                            const unsigned char *in, int len,
                            unsigned char *out) {
  RC4_KEY rc4key;
  RC4_set_key(&rc4key, keysize, key);
  RC4(&rc4key, len, in, out);
}


x86 assembly (clang, -O0):
<hash_proto_rc4_encrypt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%rdx
lea    -0x2c(%rbp),%rdi
call   1040 <RC4_set_key@plt>
mov    -0x1c(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x28(%rbp),%rcx
lea    -0x2c(%rbp),%rdi
call   1030 <RC4@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_proto_rc4_encrypt>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %r8,%r14
mov    %ecx,%ebp
mov    %rdx,%rbx
mov    %rdi,%rdx
lea    0x4(%rsp),%r15
mov    %r15,%rdi
call   1040 <RC4_set_key@plt>
mov    %r15,%rdi
mov    %ebp,%esi
mov    %rbx,%rdx
mov    %r14,%rcx
call   1030 <RC4@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @hash_proto_rc4_encrypt(i8* %0, i32 %1, i8* %2, i32 %3, i8* %4) {
%6 = alloca i32
%7 = bitcast i32* %6 to i8*
%8 = call i32 @RC4_set_key(i32* %6, i32 %1, i8* %0)
%9 = call i32 @RC4(i32* %6, i32 %3, i8* %2, i8* %4)
ret void
}
void stm_init(void) {}


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

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

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

LLVM IR (-O2):
define void @stm_init() {
ret void
}
/* Variables and functions */
char *datetime_str(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
char *current_time_str() { return datetime_str(time(NULL)); }


x86 assembly (clang, -O0):
<current_time_str>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    %eax,%edi
call   1030 <time@plt>
mov    %eax,%edi
call   1040 <datetime_str@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<current_time_str>:
push   %rax
xor    %edi,%edi
call   1030 <time@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <datetime_str@plt>

LLVM IR (-O0):
define i8* @current_time_str() {
%1 = call i32 @time(i32* null)
%2 = call i8* @datetime_str(i32 %1)
ret i8* %2
}

LLVM IR (-O2):
define i8* @current_time_str() {
%1 = tail call i32 @time(i32* null)
%2 = tail call i8* @datetime_str(i32 %1)
ret i8* %2
}
/* Variables and functions */
scalar_t__ malloc(int const);
float *new_lp(const int m, const int n) {
  return (float *)malloc(m * n * sizeof(float));
}


x86 assembly (clang, -O0):
<new_lp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x8(%rbp),%eax
cltq
shl    $0x2,%rax
mov    %eax,%edi
call   1030 <malloc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<new_lp>:
imul   %esi,%edi
shl    $0x2,%edi
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define float* @new_lp(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 = mul nsw i32 %5, %6
%8 = sext i32 %7 to i64
%9 = mul i64 %8, 4
%10 = trunc i64 %9 to i32
%11 = call i64 @malloc(i32 %10)
%12 = inttoptr i64 %11 to float*
ret float* %12
}

LLVM IR (-O2):
define float* @new_lp(i32 %0, i32 %1) {
%3 = shl i32 %0, 2
%4 = mul i32 %3, %1
%5 = tail call i64 @malloc(i32 %4)
%6 = inttoptr i64 %5 to float*
ret float* %6
}
int HelpItem21(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @HelpItem21() {
ret i32 0
}
int is_bigendian() {
  int i = 1;
  char *p = (char *)&i;
  if (p[0] == 1)
    return 0;
  else
    return 1;
}


x86 assembly (clang, -O0):
<is_bigendian>:
push   %rbp
mov    %rsp,%rbp
movl   $0x1,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x1,%eax
jne    112f <is_bigendian+0x2f>
movl   $0x0,-0x4(%rbp)
jmp    1136 <is_bigendian+0x36>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @is_bigendian() {
ret i32 0
}
/* Variables and functions */
scalar_t__ CStrings__cmp(char *, char *);
int CStrings__ne(char *A, char *B) {
  return (CStrings__cmp(A, B) == 0) ? 0 : 1;
}


x86 assembly (clang, -O0):
<CStrings__ne>:
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 <CStrings__cmp@plt>
mov    %rax,%rdx
mov    $0x1,%eax
xor    %ecx,%ecx
cmp    $0x0,%rdx
cmove  %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CStrings__ne>:
push   %rax
call   1030 <CStrings__cmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @CStrings__ne(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 i64 @CStrings__cmp(i8* %5, i8* %6)
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i64
%10 = select i1 %8, i32 0, i32 1
ret i32 %10
}

LLVM IR (-O2):
define i32 @CStrings__ne(i8* %0, i8* %1) {
%3 = tail call i64 @CStrings__cmp(i8* %0, i8* %1)
%4 = icmp ne i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Type definitions */
struct BitMatrix {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ BitMatrixCopy(struct BitMatrix *, struct BitMatrix *);
int /*<<< orphan*/ BitMatrixFree(struct BitMatrix *);
struct BitMatrix *BitMatrixMulMatrix(struct BitMatrix *, struct BitMatrix *);
void BitMatrixMulMatrixLeft(struct BitMatrix *mat1, struct BitMatrix *mat2) {
  struct BitMatrix *matTmp = BitMatrixMulMatrix(mat1, mat2);
  BitMatrixCopy(mat2, matTmp);
  BitMatrixFree(matTmp);
}


x86 assembly (clang, -O0):
<BitMatrixMulMatrixLeft>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <BitMatrixMulMatrix@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1050 <BitMatrixCopy@plt>
mov    -0x18(%rbp),%rdi
call   1040 <BitMatrixFree@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BitMatrixMulMatrixLeft>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
call   1030 <BitMatrixMulMatrix@plt>
mov    %rax,%rbx
mov    %r14,%rdi
mov    %rax,%rsi
call   1050 <BitMatrixCopy@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <BitMatrixFree@plt>

LLVM IR (-O0):
%struct.BitMatrix = type { i32 }
define void @BitMatrixMulMatrixLeft(%struct.BitMatrix* %0, %struct.BitMatrix* %1) {
%3 = alloca %struct.BitMatrix*
%4 = alloca %struct.BitMatrix*
%5 = alloca %struct.BitMatrix*
store %struct.BitMatrix* %0, %struct.BitMatrix** %3
store %struct.BitMatrix* %1, %struct.BitMatrix** %4
%6 = load %struct.BitMatrix*, %struct.BitMatrix** %3
%7 = load %struct.BitMatrix*, %struct.BitMatrix** %4
%8 = call %struct.BitMatrix* @BitMatrixMulMatrix(%struct.BitMatrix* %6, %struct.BitMatrix* %7)
store %struct.BitMatrix* %8, %struct.BitMatrix** %5
%9 = load %struct.BitMatrix*, %struct.BitMatrix** %4
%10 = load %struct.BitMatrix*, %struct.BitMatrix** %5
%11 = call i32 @BitMatrixCopy(%struct.BitMatrix* %9, %struct.BitMatrix* %10)
%12 = load %struct.BitMatrix*, %struct.BitMatrix** %5
%13 = call i32 @BitMatrixFree(%struct.BitMatrix* %12)
ret void
}

LLVM IR (-O2):
%struct.BitMatrix = type { i32 }
define void @BitMatrixMulMatrixLeft(%struct.BitMatrix* %0, %struct.BitMatrix* %1) {
%3 = tail call %struct.BitMatrix* @BitMatrixMulMatrix(%struct.BitMatrix* %0, %struct.BitMatrix* %1)
%4 = tail call i32 @BitMatrixCopy(%struct.BitMatrix* %1, %struct.BitMatrix* %3)
%5 = tail call i32 @BitMatrixFree(%struct.BitMatrix* %3)
ret void
}
void _ea_nop(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ chr1setBank6(int);
void m80setParams7EF4(uint16_t addr, uint8_t val) {
  (void)addr;
  chr1setBank6(val << 10);
}


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

x86 assembly (clang, -O2):
<m80setParams7EF4>:
mov    %esi,%edi
shl    $0xa,%edi
jmp    1030 <chr1setBank6@plt>

LLVM IR (-O0):
define void @m80setParams7EF4(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 %6, 10
%8 = call i32 @chr1setBank6(i32 %7)
ret void
}

LLVM IR (-O2):
define void @m80setParams7EF4(i32 %0, i32 %1) {
%3 = shl i32 %1, 10
%4 = tail call i32 @chr1setBank6(i32 %3)
ret void
}
int $Sub$$_sys_open(const char *name, int openmode) { return 0; }


x86 assembly (clang, -O0):
<$Sub$$_sys_open>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<$Sub$$_sys_open>:
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @"$Sub$$_sys_open"(i8* nocapture readnone %0, i32 %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("In the main func\n");
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@str = [17 x i8] c"In the main func\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ doit();
int main() {
  if (sizeof(int) != 4 || sizeof(long long) != 8)
    return 0;
  doit();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <doit@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @doit()
ret i32 0
}
/* Variables and functions */
double Add(double, double);
int /*<<< orphan*/ printf(char *, double, double, double);
int main() {
  double x = 3;
  double y = 4;
  double result = Add(x, y);
  printf("%.1f+%.1f=%.1f", x, y, result);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  0xed8(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  0xec3(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1040 <Add@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
lea    0xea4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movsd  0xed7(%rip),%xmm0
movsd  0xed7(%rip),%xmm1
call   1040 <Add@plt>
movaps %xmm0,%xmm2
lea    0xed0(%rip),%rdi
movsd  0xeb8(%rip),%xmm0
movsd  0xeb8(%rip),%xmm1
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"%.1f+%.1f=%.1f\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = alloca double
store double 3.000000e+00, double* %1
store double 4.000000e+00, double* %2
%4 = load double, double* %1
%5 = load double, double* %2
%6 = call double @Add(double %4, double %5)
store double %6, double* %3
%7 = load double, double* %1
%8 = load double, double* %2
%9 = load double, double* %3
%10 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), double %7, double %8, double %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"%.1f+%.1f=%.1f\00"
define i32 @main() {
%1 = tail call double @Add(double 3.000000e+00, double 4.000000e+00)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), double 3.000000e+00, double 4.000000e+00, double %1)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
scalar_t__ fprintf(int /*<<< orphan*/ *, char *, int, char const *);
int /*<<< orphan*/ perror(char *);
void send_status(FILE *client, int code, const char *reason_phrase) {
  if (fprintf(client, "HTTP/1.1 %d %s\r\n", code, reason_phrase) < 0) {
    perror("bug fprintf");
  }
}


x86 assembly (clang, -O0):
<send_status>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
lea    0xebb(%rip),%rsi
call   1030 <fprintf@plt>
cmp    $0x0,%rax
jge    1160 <send_status+0x40>
lea    0xeb6(%rip),%rdi
call   1040 <perror@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<send_status>:
push   %rax
mov    %rdx,%rcx
mov    %esi,%edx
lea    0xed3(%rip),%rsi
call   1030 <fprintf@plt>
test   %rax,%rax
js     1139 <send_status+0x19>
pop    %rax
ret
lea    0xed1(%rip),%rdi
pop    %rax
jmp    1040 <perror@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"HTTP/1.1 %d %s\0D\0A\00"
@.str.1 = [12 x i8] c"bug fprintf\00"
define void @send_status(i32* %0, i32 %1, i8* %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i8*
store i32* %0, i32** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i32*, i32** %4
%8 = load i32, i32* %5
%9 = load i8*, i8** %6
%10 = call i64 @fprintf(i32* %7, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %8, i8* %9)
%11 = icmp slt i64 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %3
%13 = call i32 @perror(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
br label %14
14: ; preds = %12, %3
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"HTTP/1.1 %d %s\0D\0A\00"
@.str.1 = [12 x i8] c"bug fprintf\00"
define void @send_status(i32* nocapture %0, i32 %1, i8* %2) {
%4 = tail call i64 @fprintf(i32* %0, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %1, i8* %2)
%5 = icmp slt i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @perror(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
br label %8
8: ; preds = %6, %3
ret void
}
void d2i_PKCS7_SIGNED(void) {}


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

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

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

LLVM IR (-O2):
define void @d2i_PKCS7_SIGNED() {
ret void
}
int hpfq_parse_opt(struct qdisc_util *qu, int argc, char **argv,
                   struct nlmsghdr *n) {
  return -1;
}


x86 assembly (clang, -O0):
<hpfq_parse_opt>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
%struct.qdisc_util = type opaque
%struct.nlmsghdr = type opaque
define i32 @hpfq_parse_opt(%struct.qdisc_util* nocapture readnone %0, i32 %1, i8** nocapture readnone %2, %struct.nlmsghdr* nocapture readnone %3) {
ret i32 -1
}
void foo591(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo591(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ delay_ms(int);
void tempom() { delay_ms(2000); }


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

x86 assembly (clang, -O2):
<tempom>:
mov    $0x7d0,%edi
jmp    1030 <delay_ms@plt>

LLVM IR (-O0):
define void @tempom() {
%1 = call i32 @delay_ms(i32 2000)
ret void
}

LLVM IR (-O2):
define void @tempom() {
%1 = tail call i32 @delay_ms(i32 2000)
ret void
}
/* Type definitions */
struct crk5_exl_err {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct crk5_exl_err *);
void crk5_exl_err_delete(struct crk5_exl_err *exl) {
  if (!exl)
    return;
  free(exl);
}


x86 assembly (clang, -O0):
<crk5_exl_err_delete>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    112c <crk5_exl_err_delete+0x1c>
jmp    1135 <crk5_exl_err_delete+0x25>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<crk5_exl_err_delete>:
test   %rdi,%rdi
je     111a <crk5_exl_err_delete+0xa>
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
%struct.crk5_exl_err = type { i32 }
define void @crk5_exl_err_delete(%struct.crk5_exl_err* %0) {
%2 = alloca %struct.crk5_exl_err*
store %struct.crk5_exl_err* %0, %struct.crk5_exl_err** %2
%3 = load %struct.crk5_exl_err*, %struct.crk5_exl_err** %2
%4 = icmp ne %struct.crk5_exl_err* %3, null
br i1 %4, label %6, label %5
5: ; preds = %1
br label %9
6: ; preds = %1
%7 = load %struct.crk5_exl_err*, %struct.crk5_exl_err** %2
%8 = call i32 @free(%struct.crk5_exl_err* %7)
br label %9
9: ; preds = %6, %5
ret void
}

LLVM IR (-O2):
%struct.crk5_exl_err = type { i32 }
define void @crk5_exl_err_delete(%struct.crk5_exl_err* %0) {
%2 = icmp eq %struct.crk5_exl_err* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(%struct.crk5_exl_err* %0)
br label %5
5: ; preds = %1, %3
ret void
}