xunge/DecIR huggingface dataset:
void fill(char *buf, int size) {
  volatile int i;
  for (i = 0; i < size; i++) {
    buf[i] = i;
  }
}


x86 assembly (clang, -O0):
<fill>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    113e <fill+0x3e>
mov    -0x10(%rbp),%eax
mov    %al,%dl
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
movslq %ecx,%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1112 <fill+0x12>
pop    %rbp
ret

x86 assembly (clang, -O2):
<fill>:
movl   $0x0,-0x4(%rsp)
nopl   0x0(%rax,%rax,1)
mov    -0x4(%rsp),%eax
cmp    %esi,%eax
jge    112b <fill+0x2b>
mov    -0x4(%rsp),%eax
movslq -0x4(%rsp),%rcx
mov    %al,(%rdi,%rcx,1)
addl   $0x1,-0x4(%rsp)
jmp    1110 <fill+0x10>
ret

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

LLVM IR (-O2):
define void @fill(i8* nocapture writeonly %0, i32 %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
store volatile i32 0, i32* %3
%5 = load volatile i32, i32* %3
%6 = icmp slt i32 %5, %1
br i1 %6, label %7, label %17
7: ; preds = %2, %7
%8 = load volatile i32, i32* %3
%9 = trunc i32 %8 to i8
%10 = load volatile i32, i32* %3
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i8, i8* %0, i64 %11
store i8 %9, i8* %12
%13 = load volatile i32, i32* %3
%14 = add nsw i32 %13, 1
store volatile i32 %14, i32* %3
%15 = load volatile i32, i32* %3
%16 = icmp slt i32 %15, %1
br i1 %16, label %7, label %17
17: ; preds = %7, %2
ret void
}
int main() {
  int *x;
  if (x != 0)
    ;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     111b <main+0x1b>
jmp    111b <main+0x1b>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
void create_null_path_ok(int *p) {
  if (p) {
    *p = 32;
  }
}


x86 assembly (clang, -O0):
<create_null_path_ok>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     111d <create_null_path_ok+0x1d>
mov    -0x8(%rbp),%rax
movl   $0x20,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_null_path_ok>:
test   %rdi,%rdi
je     110b <create_null_path_ok+0xb>
movl   $0x20,(%rdi)
ret

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

LLVM IR (-O2):
define void @create_null_path_ok(i32* writeonly %0) {
%2 = icmp eq i32* %0, null
br i1 %2, label %4, label %3
3: ; preds = %1
store i32 32, i32* %0
br label %4
4: ; preds = %3, %1
ret void
}
/* Type definitions */
struct aatree_node {
  int dummy;
};

/* Variables and functions */
struct aatree_node *__aatree_end(struct aatree_node *, int);
struct aatree_node *aatree_last(struct aatree_node *tree) {
  return __aatree_end(tree, 1);
}


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

x86 assembly (clang, -O2):
<aatree_last>:
mov    $0x1,%esi
jmp    1030 <__aatree_end@plt>

LLVM IR (-O0):
%struct.aatree_node = type { i32 }
define %struct.aatree_node* @aatree_last(%struct.aatree_node* %0) {
%2 = alloca %struct.aatree_node*
store %struct.aatree_node* %0, %struct.aatree_node** %2
%3 = load %struct.aatree_node*, %struct.aatree_node** %2
%4 = call %struct.aatree_node* @__aatree_end(%struct.aatree_node* %3, i32 1)
ret %struct.aatree_node* %4
}

LLVM IR (-O2):
%struct.aatree_node = type { i32 }
define %struct.aatree_node* @aatree_last(%struct.aatree_node* %0) {
%2 = tail call %struct.aatree_node* @__aatree_end(%struct.aatree_node* %0, i32 1)
ret %struct.aatree_node* %2
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t strlen(const char *str) {
  const char *src = str;
  while (*src++)
    ;
  return (src - str) - 1;
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
cmpb   $0x0,(%rax)
je     112d <strlen+0x2d>
jmp    1110 <strlen+0x10>
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
sub    $0x1,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <strlen+0x10>
ret

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

LLVM IR (-O2):
define i32 @strlen(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %4, %2 ]
%4 = getelementptr inbounds i8, i8* %3, i64 1
%5 = load i8, i8* %3
%6 = icmp eq i8 %5, 0
br i1 %6, label %7, label %2
7: ; preds = %2
%8 = ptrtoint i8* %4 to i64
%9 = ptrtoint i8* %0 to i64
%10 = xor i64 %9, -1
%11 = add i64 %8, %10
%12 = trunc i64 %11 to i32
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ adc_setup();
int /*<<< orphan*/ dac_setup();
void d_dac_setup(void) {
  dac_setup();
  adc_setup();
}


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

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

LLVM IR (-O0):
define void @d_dac_setup() {
%1 = call i32 (...) @dac_setup()
%2 = call i32 (...) @adc_setup()
ret void
}

LLVM IR (-O2):
define void @d_dac_setup() {
%1 = tail call i32 (...) @dac_setup()
%2 = tail call i32 (...) @adc_setup()
ret void
}
void __cpu_die(unsigned int cpu) {
  while (1)
    ;
}


x86 assembly (clang, -O0):
<__cpu_die>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
jmp    1107 <__cpu_die+0x7>

x86 assembly (clang, -O2):
<__cpu_die>:
jmp    1100 <__cpu_die>

LLVM IR (-O0):
define void @__cpu_die(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %1, %3
br label %3
}

LLVM IR (-O2):
define void @__cpu_die(i32 %0) {
br label %2
2: ; preds = %1, %2
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void main() {
  printf("%ld\n", sizeof(void *));
  printf("%ld\n", sizeof(unsigned int));
  printf("%ld\n", sizeof(unsigned long));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
lea    0xed4(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
lea    0xec3(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x8,%esi
pop    %rbx
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"%ld\0A\00"
define void @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 8)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 4)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 8)
ret void
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_mode;
};

/* Variables and functions */
scalar_t__ S_ISREG(int /*<<< orphan*/);
scalar_t__ stat(char *, struct stat *);
int file_exists(char *path) {
  struct stat st;
  return stat(path, &st) == 0 && S_ISREG(st.st_mode);
}


x86 assembly (clang, -O0):
<file_exists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1030 <stat@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x11(%rbp)
jne    115d <file_exists+0x3d>
mov    -0x10(%rbp),%edi
call   1040 <S_ISREG@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<file_exists>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
je     1135 <file_exists+0x15>
pop    %rcx
ret
mov    (%rsp),%edi
call   1040 <S_ISREG@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rcx
ret

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

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @file_exists(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%8 = load i32, i32* %7
%9 = call i64 @S_ISREG(i32 %8)
%10 = icmp ne i64 %9, 0
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %6, %1
%13 = phi i32 [ 0, %1 ], [ %11, %6 ]
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage() { printf("USAGE:\n random file\n"); }


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [21 x i8] c"USAGE:\0A random file\0A\00"
define void @usage() {
%1 = 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"USAGE:\0A random file\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret void
}
int dtoi(double d) { return d; }


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

x86 assembly (clang, -O2):
<dtoi>:
cvttsd2si %xmm0,%eax
ret

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

LLVM IR (-O2):
define i32 @dtoi(double %0) {
%2 = fptosi double %0 to i32
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, char *);
void genAgpsFilePathName(char *filename, char *pathname) {
  sprintf(pathname, "/usr/RServer/agps_data/%s_agps.dat", filename);
}


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

x86 assembly (clang, -O2):
<genAgpsFilePathName>:
mov    %rsi,%rax
mov    %rdi,%rdx
lea    0xee3(%rip),%rsi
mov    %rax,%rdi
jmp    1030 <sprintf@plt>

LLVM IR (-O0):
@.str = [35 x i8] c"/usr/RServer/agps_data/%s_agps.dat\00"
define void @genAgpsFilePathName(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = load i8*, i8** %3
%7 = call i32 @sprintf(i8* %5, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [35 x i8] c"/usr/RServer/agps_data/%s_agps.dat\00"
define void @genAgpsFilePathName(i8* %0, i8* nocapture writeonly %1) {
%3 = tail call i32 @sprintf(i8* dereferenceable(1) %1, i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ end_uls();
void end_ols() { end_uls(); }


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

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

LLVM IR (-O0):
define void @end_ols() {
%1 = call i32 (...) @end_uls()
ret void
}

LLVM IR (-O2):
define void @end_ols() {
%1 = tail call i32 (...) @end_uls()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void gtk_drag_source_set_icon_gicon(void *widget, void *icon) {
  printf("gtk_drag_source_set_icon_gicon not implemented");
}


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

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

LLVM IR (-O0):
@.str = [47 x i8] c"gtk_drag_source_set_icon_gicon not implemented\00"
define void @gtk_drag_source_set_icon_gicon(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [47 x i8] c"gtk_drag_source_set_icon_gicon not implemented\00"
define void @gtk_drag_source_set_icon_gicon(i8* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct hostent {
  int dummy;
};

/* Variables and functions */
struct hostent *gethostbyname(const char *name) {
  return (struct hostent *)NULL;
}


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

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

LLVM IR (-O0):
%struct.hostent = type { i32 }
define %struct.hostent* @gethostbyname(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret %struct.hostent* null
}

LLVM IR (-O2):
%struct.hostent = type { i32 }
define noalias %struct.hostent* @gethostbyname(i8* nocapture readnone %0) {
ret %struct.hostent* null
}
/* Variables and functions */
float inToCm(int);
float ftToCm(float ft) { return inToCm(12 * ft); }


x86 assembly (clang, -O0):
<ftToCm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  0xedb(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
cvttss2si %xmm0,%edi
call   1030 <inToCm@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ftToCm>:
mulss  0xee8(%rip),%xmm0
cvttss2si %xmm0,%edi
jmp    1030 <inToCm@plt>

LLVM IR (-O0):
define float @ftToCm(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fmul float 1.200000e+01, %3
%5 = fptosi float %4 to i32
%6 = call float @inToCm(i32 %5)
ret float %6
}

LLVM IR (-O2):
define float @ftToCm(float %0) {
%2 = fmul float %0, 1.200000e+01
%3 = fptosi float %2 to i32
%4 = tail call float @inToCm(i32 %3)
ret float %4
}
void handle_write(int epollfd, int fd) {}


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

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

LLVM IR (-O0):
define void @handle_write(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 @handle_write(i32 %0, i32 %1) {
ret void
}
/* Variables and functions */
scalar_t__ malloc(int);
int random(int start, int end) {
  int h;
  float k;
  h = (int)malloc(sizeof(int));
  h = h % 10000;
  k = ((float)h) / 10000;
  k = start + (end - start) * k;
  return k;
}


x86 assembly (clang, -O0):
<random>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x4,%edi
call   1030 <malloc@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x2710,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
cvtsi2ssl -0xc(%rbp),%xmm0
movss  0xeba(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x10(%rbp)
cvtsi2ssl -0x4(%rbp),%xmm1
mov    -0x8(%rbp),%eax
sub    -0x4(%rbp),%eax
cvtsi2ss %eax,%xmm0
movss  -0x10(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x10(%rbp)
cvttss2si -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<random>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    $0x4,%edi
call   1030 <malloc@plt>
cltq
imul   $0x68db8bad,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x2c,%rcx
add    %edx,%ecx
imul   $0x2710,%ecx,%ecx
sub    %ecx,%eax
cvtsi2ss %eax,%xmm0
divss  0xeb5(%rip),%xmm0
cvtsi2ss %ebp,%xmm1
sub    %ebp,%ebx
cvtsi2ss %ebx,%xmm2
mulss  %xmm0,%xmm2
addss  %xmm1,%xmm2
cvttss2si %xmm2,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @random(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca float
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = call i64 @malloc(i32 4)
%8 = trunc i64 %7 to i32
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = srem i32 %9, 10000
store i32 %10, i32* %5
%11 = load i32, i32* %5
%12 = sitofp i32 %11 to float
%13 = fdiv float %12, 1.000000e+04
store float %13, float* %6
%14 = load i32, i32* %3
%15 = sitofp i32 %14 to float
%16 = load i32, i32* %4
%17 = load i32, i32* %3
%18 = sub nsw i32 %16, %17
%19 = sitofp i32 %18 to float
%20 = load float, float* %6
%21 = call float @llvm.fmuladd.f32(float %19, float %20, float %15)
store float %21, float* %6
%22 = load float, float* %6
%23 = fptosi float %22 to i32
ret i32 %23
}

LLVM IR (-O2):
define i32 @random(i32 %0, i32 %1) {
%3 = tail call i64 @malloc(i32 4)
%4 = trunc i64 %3 to i32
%5 = srem i32 %4, 10000
%6 = sitofp i32 %5 to float
%7 = fdiv float %6, 1.000000e+04
%8 = sitofp i32 %0 to float
%9 = sub nsw i32 %1, %0
%10 = sitofp i32 %9 to float
%11 = tail call float @llvm.fmuladd.f32(float %10, float %7, float %8)
%12 = fptosi float %11 to i32
ret i32 %12
}
int countOptionName(const char *pRead) {
  const char *pStart = pRead;
  while (*pRead != '=' && *pRead > ' ') {
    pRead++;
  }
  return pRead - pStart;
}


x86 assembly (clang, -O0):
<countOptionName>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x3d,%ecx
mov    %al,-0x11(%rbp)
je     1135 <countOptionName+0x35>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
setg   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1145 <countOptionName+0x45>
jmp    1156 <countOptionName+0x56>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1110 <countOptionName+0x10>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<countOptionName>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
movzbl (%rdi),%ecx
add    $0x1,%eax
cmp    $0x3d,%cl
je     1124 <countOptionName+0x24>
add    $0x1,%rdi
cmp    $0x20,%cl
jg     1110 <countOptionName+0x10>
ret

LLVM IR (-O0):
define i32 @countOptionName(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
store i8* %4, i8** %3
br label %5
5: ; preds = %17, %1
%6 = load i8*, i8** %2
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = icmp ne i32 %8, 61
br i1 %9, label %10, label %15
10: ; preds = %5
%11 = load i8*, i8** %2
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp sgt i32 %13, 32
br label %15
15: ; preds = %10, %5
%16 = phi i1 [ false, %5 ], [ %14, %10 ]
br i1 %16, label %17, label %20
17: ; preds = %15
%18 = load i8*, i8** %2
%19 = getelementptr inbounds i8, i8* %18, i32 1
store i8* %19, i8** %2
br label %5
20: ; preds = %15
%21 = load i8*, i8** %2
%22 = load i8*, i8** %3
%23 = ptrtoint i8* %21 to i64
%24 = ptrtoint i8* %22 to i64
%25 = sub i64 %23, %24
%26 = trunc i64 %25 to i32
ret i32 %26
}

LLVM IR (-O2):
define i32 @countOptionName(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %8, %2 ]
%4 = load i8, i8* %3
%5 = icmp ne i8 %4, 61
%6 = icmp sgt i8 %4, 32
%7 = and i1 %5, %6
%8 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %7, label %2, label %9
9: ; preds = %2
%10 = ptrtoint i8* %3 to i64
%11 = ptrtoint i8* %0 to i64
%12 = sub i64 %10, %11
%13 = trunc i64 %12 to i32
ret i32 %13
}
int isdigit(int c) {
  return ((unsigned char)c >= '0') && ((unsigned char)c <= '9');
}


x86 assembly (clang, -O0):
<isdigit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
movzbl %al,%ecx
xor    %eax,%eax
cmp    $0x30,%ecx
mov    %al,-0x5(%rbp)
jl     112a <isdigit+0x2a>
mov    -0x4(%rbp),%eax
movzbl %al,%eax
cmp    $0x39,%eax
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isdigit>:
movzbl %dil,%ecx
add    $0xffffffd0,%ecx
xor    %eax,%eax
cmp    $0xa,%ecx
setb   %al
ret

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

LLVM IR (-O2):
define i32 @isdigit(i32 %0) {
%2 = and i32 %0, 255
%3 = add nsw i32 %2, -48
%4 = icmp ult i32 %3, 10
%5 = zext i1 %4 to i32
ret i32 %5
}
int b64_encsize(unsigned n) { return ((4 * n) / 3) + 4; }


x86 assembly (clang, -O0):
<b64_encsize>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x2,%eax
mov    $0x3,%ecx
xor    %edx,%edx
div    %ecx
add    $0x4,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<b64_encsize>:
lea    0x0(,%rdi,4),%ecx
mov    $0xaaaaaaab,%eax
imul   %rcx,%rax
shr    $0x21,%rax
add    $0x4,%eax
ret

LLVM IR (-O0):
define i32 @b64_encsize(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul i32 4, %3
%5 = udiv i32 %4, 3
%6 = add i32 %5, 4
ret i32 %6
}

LLVM IR (-O2):
define i32 @b64_encsize(i32 %0) {
%2 = shl i32 %0, 2
%3 = udiv i32 %2, 3
%4 = add nuw nsw i32 %3, 4
ret i32 %4
}
/* Type definitions */
struct List_t {
  int dummy;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int List_dump(struct List_t *list_p, FILE *dump_file) { return 0; }


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

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

LLVM IR (-O0):
%struct.List_t = type { i32 }
define i32 @List_dump(%struct.List_t* %0, i32* %1) {
%3 = alloca %struct.List_t*
%4 = alloca i32*
store %struct.List_t* %0, %struct.List_t** %3
store i32* %1, i32** %4
ret i32 0
}

LLVM IR (-O2):
%struct.List_t = type { i32 }
define i32 @List_dump(%struct.List_t* nocapture readnone %0, i32* nocapture readnone %1) {
ret i32 0
}
double cpm_c(const double qt) { return (1.0 - qt) * 1004.0 + qt * 1859.0; }


x86 assembly (clang, -O0):
<cpm_c>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeff(%rip),%xmm0
subsd  -0x8(%rbp),%xmm0
movsd  0xeea(%rip),%xmm1
mulsd  -0x8(%rbp),%xmm1
movsd  0xed5(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpm_c>:
movsd  0xef8(%rip),%xmm1
subsd  %xmm0,%xmm1
mulsd  0xef4(%rip),%xmm0
mulsd  0xef4(%rip),%xmm1
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @cpm_c(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fsub double 1.000000e+00, %3
%5 = load double, double* %2
%6 = fmul double %5, 1.859000e+03
%7 = call double @llvm.fmuladd.f64(double %4, double 1.004000e+03, double %6)
ret double %7
}

LLVM IR (-O2):
define double @cpm_c(double %0) {
%2 = fsub double 1.000000e+00, %0
%3 = fmul double %0, 1.859000e+03
%4 = tail call double @llvm.fmuladd.f64(double %2, double 1.004000e+03, double %3)
ret double %4
}
void foo719(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo719(i32 %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ mqd_t;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
mqd_t __mq_open(const char *name, int oflag, ...) {
  __set_errno(ENOSYS);
  return (mqd_t)-1;
}


x86 assembly (clang, -O0):
<__mq_open>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2ec2(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__mq_open>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
define i32 @__mq_open(i8* %0, i32 %1, ...) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @ENOSYS
%6 = call i32 @__set_errno(i32 %5)
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @__mq_open(i8* nocapture readnone %0, i32 %1, ...) {
%3 = load i32, i32* @ENOSYS
%4 = tail call i32 @__set_errno(i32 %3)
ret i32 -1
}
int main(void) {
  double abc = 40.4567;
  abc = abc / -8.25;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movsd  0xef5(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xedb(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca double
store i32 0, i32* %1
store double 4.045670e+01, double* %2
%3 = load double, double* %2
%4 = fdiv double %3, -8.250000e+00
store double %4, double* %2
ret i32 0
}

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

/* Variables and functions */
int /*<<< orphan*/ localtime(int /*<<< orphan*/ *);
char *malloc(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ strftime(char *, int, char *, int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/);
int main(int argc, char **argv) {
  char *buf = malloc(4096);
  time_t t = time(0);
  strftime(buf, 4096, "%c\n", localtime(&t));
  printf(buf);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x1000,%edi
call   1060 <malloc@plt>
mov    %rax,-0x18(%rbp)
xor    %edi,%edi
call   1050 <time@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
lea    -0x1c(%rbp),%rdi
call   1030 <localtime@plt>
mov    -0x28(%rbp),%rdi
mov    %eax,%ecx
mov    $0x1000,%esi
lea    0xe5f(%rip),%rdx
call   1070 <strftime@plt>
mov    -0x18(%rbp),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
mov    $0x1000,%edi
call   1060 <malloc@plt>
mov    %rax,%rbx
xor    %edi,%edi
call   1050 <time@plt>
mov    %eax,0xc(%rsp)
lea    0xc(%rsp),%rdi
call   1030 <localtime@plt>
lea    0xe82(%rip),%rdx
mov    %rbx,%rdi
mov    $0x1000,%esi
mov    %eax,%ecx
call   1070 <strftime@plt>
mov    %rbx,%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%c\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = call i8* @malloc(i32 4096)
store i8* %8, i8** %6
%9 = call i32 @time(i32 0)
store i32 %9, i32* %7
%10 = load i8*, i8** %6
%11 = call i32 @localtime(i32* %7)
%12 = call i32 @strftime(i8* %10, i32 4096, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = load i8*, i8** %6
%14 = call i32 @printf(i8* %13)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%c\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = tail call dereferenceable_or_null(4096) i8* @malloc(i32 4096)
%5 = bitcast i32* %3 to i8*
%6 = tail call i32 @time(i32 0)
store i32 %6, i32* %3
%7 = call i32 @localtime(i32* %3)
%8 = call i32 @strftime(i8* %4, i32 4096, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = call i32 @printf(i8* dereferenceable(1) %4)
ret i32 0
}
/* Variables and functions */
int Fib(int);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  printf("%d\n", Fib(5));
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @Fib(i32 5)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
void view_destroy(struct view *v) { (void)v; }


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

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

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

LLVM IR (-O2):
%struct.view = type opaque
define void @view_destroy(%struct.view* nocapture %0) {
ret void
}
/* Variables and functions */
int getlinelength(char *, int);
int removetrailingspaces(char *, int);
int trimstr(char line[], int limit) {
  int length = getlinelength(line, limit);
  return removetrailingspaces(line, length);
}


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

x86 assembly (clang, -O2):
<trimstr>:
push   %rbx
mov    %rdi,%rbx
call   1040 <getlinelength@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1030 <removetrailingspaces@plt>

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

LLVM IR (-O2):
define i32 @trimstr(i8* %0, i32 %1) {
%3 = tail call i32 @getlinelength(i8* %0, i32 %1)
%4 = tail call i32 @removetrailingspaces(i8* %0, i32 %3)
ret i32 %4
}
void ReverseGPIOP$1$In$makeOutput(void) { HplMcs51GeneralIOC$P13$makeOutput(); }


x86 assembly (clang, -O0):
<ReverseGPIOP$1$In$makeOutput>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <HplMcs51GeneralIOC$P13$makeOutput@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ReverseGPIOP$1$In$makeOutput>:
xor    %eax,%eax
jmp    1030 <HplMcs51GeneralIOC$P13$makeOutput@plt>

LLVM IR (-O0):
define void @"ReverseGPIOP$1$In$makeOutput"() {
%1 = call i32 (...) @"HplMcs51GeneralIOC$P13$makeOutput"()
ret void
}

LLVM IR (-O2):
define void @"ReverseGPIOP$1$In$makeOutput"() {
%1 = tail call i32 (...) @"HplMcs51GeneralIOC$P13$makeOutput"()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ sqlite3_vtab;
typedef int /*<<< orphan*/ sqlite3_index_info;

/* Variables and functions */
int SQLITE_OK;
int intarrayBestIndex(sqlite3_vtab *tab, sqlite3_index_info *pIdxInfo) {
  return SQLITE_OK;
}


x86 assembly (clang, -O0):
<intarrayBestIndex>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ed5(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<intarrayBestIndex>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
ret

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

LLVM IR (-O2):
@SQLITE_OK = global i32 0
define i32 @intarrayBestIndex(i32* nocapture readnone %0, i32* nocapture readnone %1) {
%3 = load i32, i32* @SQLITE_OK
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void free_fn(char *des[3]) {
  int i;
  for (i = 0; i < 3; i++)
    free(des[i]);
}


x86 assembly (clang, -O0):
<free_fn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x3,-0xc(%rbp)
jge    114c <free_fn+0x3c>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <free_fn+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_fn>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1030 <free@plt>
mov    0x8(%rbx),%rdi
call   1030 <free@plt>
mov    0x10(%rbx),%rdi
pop    %rbx
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @free_fn(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = tail call i32 @free(i8* %2)
%4 = getelementptr inbounds i8*, i8** %0, i64 1
%5 = load i8*, i8** %4
%6 = tail call i32 @free(i8* %5)
%7 = getelementptr inbounds i8*, i8** %0, i64 2
%8 = load i8*, i8** %7
%9 = tail call i32 @free(i8* %8)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int main() {
  char z = *(const char *)0;
  printf("I read from location zero\n");
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
mov    (%rax),%al
xor    %ecx,%ecx
mov    %al,-0x5(%rbp)
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e95(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@.str = [27 x i8] c"I read from location zero\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
%3 = load i8, i8* null
store i8 %3, i8* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* @EXIT_SUCCESS
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
@str = [26 x i8] c"I read from location zero\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
%2 = load i32, i32* @EXIT_SUCCESS
%3 = tail call i32 @exit(i32 %2)
unreachable
}
/* Variables and functions */
int shim_enosys(int /*<<< orphan*/, int *, unsigned long *, unsigned long,
                unsigned long, unsigned long);
int shim_get_mempolicy(int *mode, unsigned long *nodemask,
                       unsigned long maxnode, unsigned long addr,
                       unsigned long flags) {
  return shim_enosys(0, mode, nodemask, maxnode, addr, flags);
}


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

x86 assembly (clang, -O2):
<shim_get_mempolicy>:
mov    %r8,%r9
mov    %rcx,%r8
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %rdi,%rsi
xor    %edi,%edi
jmp    1030 <shim_enosys@plt>

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

LLVM IR (-O2):
define i32 @shim_get_mempolicy(i32* %0, i64* %1, i64 %2, i64 %3, i64 %4) {
%6 = tail call i32 @shim_enosys(i32 0, i32* %0, i64* %1, i64 %2, i64 %3, i64 %4)
ret i32 %6
}
unsigned xrop3_59_1_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  stk3 = ~D;
  stk2 = T | stk3;
  stk1 = S & stk2;
  stk1 = ~stk1;
  return (stk1 & (~S)) | (D & S);
}


x86 assembly (clang, -O0):
<xrop3_59_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%eax
or     -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
and    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_59_1_0>:
mov    %edi,%eax
shl    $0x8,%eax
not    %eax
ret

LLVM IR (-O0):
define i32 @xrop3_59_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%11 = load i8, i8* %3
%12 = zext i8 %11 to i32
%13 = shl i32 %12, 8
%14 = load i8, i8* %3
%15 = zext i8 %14 to i32
%16 = or i32 %13, %15
store i32 %16, i32* %6
%17 = load i8, i8* %4
%18 = zext i8 %17 to i32
%19 = shl i32 %18, 8
%20 = load i8, i8* %4
%21 = zext i8 %20 to i32
%22 = or i32 %19, %21
store i32 %22, i32* %7
%23 = load i32, i32* %5
%24 = xor i32 %23, -1
store i32 %24, i32* %10
%25 = load i32, i32* %7
%26 = load i32, i32* %10
%27 = or i32 %25, %26
store i32 %27, i32* %9
%28 = load i32, i32* %6
%29 = load i32, i32* %9
%30 = and i32 %28, %29
store i32 %30, i32* %8
%31 = load i32, i32* %8
%32 = xor i32 %31, -1
store i32 %32, i32* %8
%33 = load i32, i32* %8
%34 = load i32, i32* %6
%35 = xor i32 %34, -1
%36 = and i32 %33, %35
%37 = load i32, i32* %5
%38 = load i32, i32* %6
%39 = and i32 %37, %38
%40 = or i32 %36, %39
ret i32 %40
}

LLVM IR (-O2):
define i32 @xrop3_59_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = shl nuw nsw i32 %3, 8
%5 = xor i32 %4, -1
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ chaz_ConfWriter_append_conf(char *);
void chaz_ConfWriter_start_short_names(void) {
  chaz_ConfWriter_append_conf("\n#if defined(CHY_USE_SHORT_NAMES) "
                              "|| defined(CHAZ_USE_SHORT_NAMES)\n");
}


x86 assembly (clang, -O0):
<chaz_ConfWriter_start_short_names>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <chaz_ConfWriter_append_conf@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [68 x i8] c"\0A#if defined(CHY_USE_SHORT_NAMES) || defined(CHAZ_USE_SHORT_NAMES)\0A\00"
define void @chaz_ConfWriter_start_short_names() {
%1 = call i32 @chaz_ConfWriter_append_conf(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [68 x i8] c"\0A#if defined(CHY_USE_SHORT_NAMES) || defined(CHAZ_USE_SHORT_NAMES)\0A\00"
define void @chaz_ConfWriter_start_short_names() {
%1 = tail call i32 @chaz_ConfWriter_append_conf(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str, i64 0, i64 0))
ret void
}
void App_Spurious_ISR(void) {
  for (;;)
    ;
}


x86 assembly (clang, -O0):
<App_Spurious_ISR>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <App_Spurious_ISR+0x9>
jmp    1109 <App_Spurious_ISR+0x9>

x86 assembly (clang, -O2):
<App_Spurious_ISR>:
jmp    1100 <App_Spurious_ISR>

LLVM IR (-O0):
define void @App_Spurious_ISR() {
br label %1
1: ; preds = %1, %0
br label %1
}

LLVM IR (-O2):
define void @App_Spurious_ISR() {
br label %1
1: ; preds = %1, %0
br label %1
}
float ct_mixf(const float a, const float b, const float t) {
  return a + (b - a) * t;
}


x86 assembly (clang, -O0):
<ct_mixf>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
subss  -0x4(%rbp),%xmm0
movss  -0xc(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<ct_mixf>:
subss  %xmm0,%xmm1
mulss  %xmm2,%xmm1
addss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @ct_mixf(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %4
%8 = load float, float* %5
%9 = load float, float* %4
%10 = fsub float %8, %9
%11 = load float, float* %6
%12 = call float @llvm.fmuladd.f32(float %10, float %11, float %7)
ret float %12
}

LLVM IR (-O2):
define float @ct_mixf(float %0, float %1, float %2) {
%4 = fsub float %1, %0
%5 = tail call float @llvm.fmuladd.f32(float %4, float %2, float %0)
ret float %5
}
void gtk_about_dialog_set_license() {}


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

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

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

LLVM IR (-O2):
define void @gtk_about_dialog_set_license() {
ret void
}
/* Variables and functions */
float tanh(float);
float f_tanh(float x) { return tanh(x); }


x86 assembly (clang, -O0):
<f_tanh>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <tanh@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_tanh>:
jmp    1030 <tanh@plt>

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

LLVM IR (-O2):
define float @f_tanh(float %0) {
%2 = tail call float @tanh(float %0)
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ ft_putchar(char const);
void ft_putendl(char const *str) {
  while (*str) {
    ft_putchar(*str);
    str++;
  }
  ft_putchar('\n');
}


x86 assembly (clang, -O0):
<ft_putendl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1146 <ft_putendl+0x36>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <ft_putchar@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <ft_putendl+0xc>
mov    $0xa,%edi
call   1030 <ft_putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_putendl>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <ft_putendl+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <ft_putchar@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <ft_putendl+0x10>
mov    $0xa,%edi
pop    %rbx
jmp    1030 <ft_putchar@plt>

LLVM IR (-O0):
define void @ft_putendl(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %7, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = icmp ne i8 %5, 0
br i1 %6, label %7, label %13
7: ; preds = %3
%8 = load i8*, i8** %2
%9 = load i8, i8* %8
%10 = call i32 @ft_putchar(i8 signext %9)
%11 = load i8*, i8** %2
%12 = getelementptr inbounds i8, i8* %11, i32 1
store i8* %12, i8** %2
br label %3
13: ; preds = %3
%14 = call i32 @ft_putchar(i8 signext 10)
ret void
}

LLVM IR (-O2):
define void @ft_putendl(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %9, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = tail call i32 @ft_putchar(i8 signext %5)
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = tail call i32 @ft_putchar(i8 signext 10)
ret void
}
const char *aom_codec_version_str(void) { return "3.1.0-309-g12287adee"; }


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

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

LLVM IR (-O0):
@.str = [21 x i8] c"3.1.0-309-g12287adee\00"
define i8* @aom_codec_version_str() {
ret i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [21 x i8] c"3.1.0-309-g12287adee\00"
define i8* @aom_codec_version_str() {
ret i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0)
}