xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ isspace(char const);
char *skip_non_whitespace(const char *str) {
  while (!isspace(*str) && *str != '\0')
    str++;
  return (char *)str;
}


x86 assembly (clang, -O0):
<skip_non_whitespace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
jne    1148 <skip_non_whitespace+0x38>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1158 <skip_non_whitespace+0x48>
jmp    1169 <skip_non_whitespace+0x59>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <skip_non_whitespace+0xc>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_non_whitespace>:
push   %rbx
mov    %rdi,%rbx
movsbl (%rdi),%edi
nopw   0x0(%rax,%rax,1)
call   1030 <isspace@plt>
test   %eax,%eax
jne    1138 <skip_non_whitespace+0x28>
cmpb   $0x0,(%rbx)
je     1138 <skip_non_whitespace+0x28>
movsbl 0x1(%rbx),%edi
add    $0x1,%rbx
jmp    1120 <skip_non_whitespace+0x10>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @skip_non_whitespace(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %15, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = call i32 @isspace(i8 signext %5)
%7 = icmp ne i32 %6, 0
br i1 %7, label %13, label %8
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp ne i32 %11, 0
br label %13
13: ; preds = %8, %3
%14 = phi i1 [ false, %3 ], [ %12, %8 ]
br i1 %14, label %15, label %18
15: ; preds = %13
%16 = load i8*, i8** %2
%17 = getelementptr inbounds i8, i8* %16, i32 1
store i8* %17, i8** %2
br label %3
18: ; preds = %13
%19 = load i8*, i8** %2
ret i8* %19
}

LLVM IR (-O2):
define i8* @skip_non_whitespace(i8* %0) {
%2 = load i8, i8* %0
%3 = tail call i32 @isspace(i8 signext %2)
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %14
5: ; preds = %1, %9
%6 = phi i8* [ %10, %9 ], [ %0, %1 ]
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 0
br i1 %8, label %14, label %9
9: ; preds = %5
%10 = getelementptr inbounds i8, i8* %6, i64 1
%11 = load i8, i8* %10
%12 = tail call i32 @isspace(i8 signext %11)
%13 = icmp eq i32 %12, 0
br i1 %13, label %5, label %14
14: ; preds = %5, %9, %1
%15 = phi i8* [ %0, %1 ], [ %10, %9 ], [ %6, %5 ]
ret i8* %15
}
/* Variables and functions */
void *do_malloc(size_t, size_t);
void *ps_memalign(size_t align, size_t size) {
  void *ret = do_malloc(size, align);
  return ret;
}


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

x86 assembly (clang, -O2):
<ps_memalign>:
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
jmp    1030 <do_malloc@plt>

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

LLVM IR (-O2):
define i8* @ps_memalign(i64 %0, i64 %1) {
%3 = tail call i8* @do_malloc(i64 %1, i64 %0)
ret i8* %3
}
char ffiTestChars(char c1, char c2, char c3, char c4) {
  ;
  return 'C';
}


x86 assembly (clang, -O0):
<ffiTestChars>:
push   %rbp
mov    %rsp,%rbp
mov    %cl,%al
mov    %dl,%cl
mov    %sil,%dl
mov    %dil,%sil
mov    %sil,-0x1(%rbp)
mov    %dl,-0x2(%rbp)
mov    %cl,-0x3(%rbp)
mov    %al,-0x4(%rbp)
mov    $0x43,%al
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ffiTestChars>:
mov    $0x43,%al
ret

LLVM IR (-O0):
define signext i8 @ffiTestChars(i8 signext %0, i8 signext %1, i8 signext %2, i8 signext %3) {
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store i8 %0, i8* %5
store i8 %1, i8* %6
store i8 %2, i8* %7
store i8 %3, i8* %8
ret i8 67
}

LLVM IR (-O2):
define signext i8 @ffiTestChars(i8 signext %0, i8 signext %1, i8 signext %2, i8 signext %3) {
ret i8 67
}
void CumulativeSumToAverageRow_SSE2() {}


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

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

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

LLVM IR (-O2):
define void @CumulativeSumToAverageRow_SSE2() {
ret void
}
int main() {
  int var1;
  char var2[10];
  printf("Address of var1 variable: %x\n", &var1);
  printf("Address of var2 variable: %x\n", &var2);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xee5(%rip),%rdi
lea    0x8(%rsp),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xef0(%rip),%rdi
lea    0xe(%rsp),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [30 x i8] c"Address of var1 variable: %x\0A\00"
@.str.1 = [30 x i8] c"Address of var2 variable: %x\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [10 x i8]
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32* %2)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), [10 x i8]* %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [30 x i8] c"Address of var1 variable: %x\0A\00"
@.str.1 = [30 x i8] c"Address of var2 variable: %x\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x i8]
%3 = bitcast i32* %1 to i8*
%4 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32* %1)
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), [10 x i8]* %2)
ret i32 0
}
/* Variables and functions */
char *read_param(int *argc, char ***argv) {
  if (!*argc)
    return NULL;
  char *ret = **argv;
  (*argv)++;
  (*argc)--;
  return ret;
}


x86 assembly (clang, -O0):
<read_param>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmpl   $0x0,(%rax)
jne    1126 <read_param+0x26>
movq   $0x0,-0x8(%rbp)
jmp    1155 <read_param+0x55>
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rcx
add    $0x8,%rcx
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
add    $0xffffffff,%ecx
mov    %ecx,(%rax)
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_param>:
mov    (%rdi),%ecx
test   %ecx,%ecx
je     1119 <read_param+0x19>
mov    (%rsi),%rdx
mov    (%rdx),%rax
add    $0x8,%rdx
mov    %rdx,(%rsi)
add    $0xffffffff,%ecx
mov    %ecx,(%rdi)
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i8* @read_param(i32* nocapture %0, i8*** nocapture %1) {
%3 = load i32, i32* %0
%4 = icmp eq i32 %3, 0
br i1 %4, label %10, label %5
5: ; preds = %2
%6 = load i8**, i8*** %1
%7 = load i8*, i8** %6
%8 = getelementptr inbounds i8*, i8** %6, i64 1
store i8** %8, i8*** %1
%9 = add nsw i32 %3, -1
store i32 %9, i32* %0
br label %10
10: ; preds = %2, %5
%11 = phi i8* [ %7, %5 ], [ null, %2 ]
ret i8* %11
}
/* Variables and functions */
int /*<<< orphan*/ fill_array(double *, int);
double *malloc(int);
double sum_array(double *, int);
double malloc_test() {
  double *x = malloc(sizeof(double) * 100);
  fill_array(x, 100);
  return sum_array(x, 100);
}


x86 assembly (clang, -O0):
<malloc_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x320,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x64,%esi
call   1050 <fill_array@plt>
mov    -0x8(%rbp),%rdi
mov    $0x64,%esi
call   1030 <sum_array@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<malloc_test>:
push   %rbx
mov    $0x320,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    $0x64,%esi
call   1050 <fill_array@plt>
mov    %rbx,%rdi
mov    $0x64,%esi
pop    %rbx
jmp    1030 <sum_array@plt>

LLVM IR (-O0):
define double @malloc_test() {
%1 = alloca double*
%2 = call double* @malloc(i32 800)
store double* %2, double** %1
%3 = load double*, double** %1
%4 = call i32 @fill_array(double* %3, i32 100)
%5 = load double*, double** %1
%6 = call double @sum_array(double* %5, i32 100)
ret double %6
}

LLVM IR (-O2):
define double @malloc_test() {
%1 = tail call double* @malloc(i32 800)
%2 = tail call i32 @fill_array(double* %1, i32 100)
%3 = tail call double @sum_array(double* %1, i32 100)
ret double %3
}
void ___typeof() { return; }


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

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

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

LLVM IR (-O2):
define void @___typeof() {
ret void
}
int compara_int(void *a, void *b) {
  int *pa = (int *)a;
  int *pb = (int *)b;
  if (*pa > *pb)
    return 1;
  if (*pa < *pb)
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<compara_int>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%eax
mov    -0x28(%rbp),%rcx
cmp    (%rcx),%eax
jle    113a <compara_int+0x3a>
movl   $0x1,-0x4(%rbp)
jmp    115f <compara_int+0x5f>
mov    -0x20(%rbp),%rax
mov    (%rax),%eax
mov    -0x28(%rbp),%rcx
cmp    (%rcx),%eax
jge    1158 <compara_int+0x58>
movl   $0xffffffff,-0x4(%rbp)
jmp    115f <compara_int+0x5f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compara_int>:
mov    (%rdi),%eax
mov    (%rsi),%ecx
xor    %edx,%edx
cmp    %ecx,%eax
setl   %dl
neg    %edx
cmp    %ecx,%eax
mov    $0x1,%eax
cmovle %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @compara_int(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = bitcast i8* %1 to i32*
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = icmp sgt i32 %5, %6
%8 = icmp slt i32 %5, %6
%9 = sext i1 %8 to i32
%10 = select i1 %7, i32 1, i32 %9
ret i32 %10
}
/* Variables and functions */
int sync_barrier(int, int);
int sync_barrier_parent(int fd[2], int seq) { return sync_barrier(fd[0], seq); }


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

x86 assembly (clang, -O2):
<sync_barrier_parent>:
mov    (%rdi),%edi
jmp    1030 <sync_barrier@plt>

LLVM IR (-O0):
define i32 @sync_barrier_parent(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 = getelementptr inbounds i32, i32* %5, i64 0
%7 = load i32, i32* %6
%8 = load i32, i32* %4
%9 = call i32 @sync_barrier(i32 %7, i32 %8)
ret i32 %9
}

LLVM IR (-O2):
define i32 @sync_barrier_parent(i32* nocapture %0, i32 %1) {
%3 = load i32, i32* %0
%4 = tail call i32 @sync_barrier(i32 %3, i32 %1)
ret i32 %4
}
/* Variables and functions */
int runtime_pagesize();
int getpagesize(void) { return runtime_pagesize(); }


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

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

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

LLVM IR (-O2):
define i32 @getpagesize() {
%1 = tail call i32 (...) @runtime_pagesize()
ret i32 %1
}
/* Variables and functions */
void *dlsym(void *, char const *);
void *lookup(void *handle, const char *functionName) {
  void *rv = 0;
  rv = dlsym(handle, functionName);
  return rv;
}


x86 assembly (clang, -O0):
<lookup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <dlsym@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lookup>:
jmp    1030 <dlsym@plt>

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

LLVM IR (-O2):
define i8* @lookup(i8* %0, i8* %1) {
%3 = tail call i8* @dlsym(i8* %0, i8* %1)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ Inst_Printf(char *, char *, char *);
int /*<<< orphan*/ Label_Printf(char *, char *, int);
void Dico_String(int str_no, char *asciiz) {
  Label_Printf("%s%d:", "$LC", str_no);
  Inst_Printf(".ascii", "%s", asciiz);
}


x86 assembly (clang, -O0):
<Dico_String>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edx
lea    0xec7(%rip),%rdi
lea    0xec6(%rip),%rsi
call   1040 <Label_Printf@plt>
mov    -0x10(%rbp),%rdx
lea    0xeba(%rip),%rdi
lea    0xeba(%rip),%rsi
call   1030 <Inst_Printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Dico_String>:
push   %rbx
mov    %rsi,%rbx
mov    %edi,%edx
lea    0xed3(%rip),%rdi
lea    0xed2(%rip),%rsi
call   1040 <Label_Printf@plt>
lea    0xeca(%rip),%rdi
lea    0xeca(%rip),%rsi
mov    %rbx,%rdx
pop    %rbx
jmp    1030 <Inst_Printf@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"%s%d:\00"
@.str.1 = [4 x i8] c"$LC\00"
@.str.2 = [7 x i8] c".ascii\00"
@.str.3 = [3 x i8] c"%s\00"
define void @Dico_String(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = call i32 @Label_Printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %5)
%7 = load i8*, i8** %4
%8 = call i32 @Inst_Printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %7)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"%s%d:\00"
@.str.1 = [4 x i8] c"$LC\00"
@.str.2 = [7 x i8] c".ascii\00"
@.str.3 = [3 x i8] c"%s\00"
define void @Dico_String(i32 %0, i8* %1) {
%3 = tail call i32 @Label_Printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %0)
%4 = tail call i32 @Inst_Printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ rc_findvar(char *);
int *rc_getvec_n(int /*<<< orphan*/);
int *rc_getvec(char *name) { return rc_getvec_n(rc_findvar(name)); }


x86 assembly (clang, -O0):
<rc_getvec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <rc_findvar@plt>
mov    %eax,%edi
call   1030 <rc_getvec_n@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rc_getvec>:
push   %rax
call   1040 <rc_findvar@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <rc_getvec_n@plt>

LLVM IR (-O0):
define i32* @rc_getvec(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @rc_findvar(i8* %3)
%5 = call i32* @rc_getvec_n(i32 %4)
ret i32* %5
}

LLVM IR (-O2):
define i32* @rc_getvec(i8* %0) {
%2 = tail call i32 @rc_findvar(i8* %0)
%3 = tail call i32* @rc_getvec_n(i32 %2)
ret i32* %3
}
int moose_function() {}


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

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

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

LLVM IR (-O2):
define i32 @moose_function() {
ret i32 undef
}
/* Variables and functions */
size_t base16_encoded_len(size_t raw_len) { return (2 * raw_len); }


x86 assembly (clang, -O0):
<base16_encoded_len>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shl    $0x1,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<base16_encoded_len>:
lea    (%rdi,%rdi,1),%rax
ret

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

LLVM IR (-O2):
define i64 @base16_encoded_len(i64 %0) {
%2 = shl i64 %0, 1
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main(void) {
  int num, m;
  scanf("%d", &num);
  scanf("%d", &m);
  printf("%d", num >> m);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xec1(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%ecx
sar    %cl,%esi
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xed4(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    0xc(%rsp),%esi
mov    0x8(%rsp),%cl
sar    %cl,%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = ashr i32 %7, %8
%10 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %9)
ret i32 0
}
/* Variables and functions */
int readint(int *);
int readmend();
int readmsg(int);
int readmint(int msg, int *buf) {
  int x;
  x = readmsg(msg);
  if (x == (1))
    x = readint(buf);
  if (x == (1))
    x = readmend();
  return (x);
}


x86 assembly (clang, -O0):
<readmint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <readmsg@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x1,-0x14(%rbp)
jne    1160 <readmint+0x30>
mov    -0x10(%rbp),%rdi
call   1040 <readint@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x1,-0x14(%rbp)
jne    1174 <readmint+0x44>
mov    $0x0,%al
call   1050 <readmend@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readmint>:
push   %rbx
mov    %rsi,%rbx
call   1030 <readmsg@plt>
cmp    $0x1,%eax
jne    1153 <readmint+0x23>
mov    %rbx,%rdi
call   1040 <readint@plt>
cmp    $0x1,%eax
jne    1153 <readmint+0x23>
xor    %eax,%eax
pop    %rbx
jmp    1050 <readmend@plt>
pop    %rbx
ret

LLVM IR (-O0):
define i32 @readmint(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32
store i32 %0, i32* %3
store i32* %1, i32** %4
%6 = load i32, i32* %3
%7 = call i32 @readmsg(i32 %6)
store i32 %7, i32* %5
%8 = load i32, i32* %5
%9 = icmp eq i32 %8, 1
br i1 %9, label %10, label %13
10: ; preds = %2
%11 = load i32*, i32** %4
%12 = call i32 @readint(i32* %11)
store i32 %12, i32* %5
br label %13
13: ; preds = %10, %2
%14 = load i32, i32* %5
%15 = icmp eq i32 %14, 1
br i1 %15, label %16, label %18
16: ; preds = %13
%17 = call i32 (...) @readmend()
store i32 %17, i32* %5
br label %18
18: ; preds = %16, %13
%19 = load i32, i32* %5
ret i32 %19
}

LLVM IR (-O2):
define i32 @readmint(i32 %0, i32* %1) {
%3 = tail call i32 @readmsg(i32 %0)
%4 = icmp eq i32 %3, 1
br i1 %4, label %5, label %10
5: ; preds = %2
%6 = tail call i32 @readint(i32* %1)
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = tail call i32 (...) @readmend()
br label %10
10: ; preds = %2, %8, %5
%11 = phi i32 [ %9, %8 ], [ %6, %5 ], [ %3, %2 ]
ret i32 %11
}
void defbasis_(id, array) int *id;
float array[4][4];
{ defbasis((short)*id, array); }


x86 assembly (clang, -O0):
<defbasis_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
movswl %ax,%edi
mov    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1030 <defbasis@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<defbasis_>:
movswl (%rdi),%edi
xor    %eax,%eax
jmp    1030 <defbasis@plt>

LLVM IR (-O0):
define void @defbasis_(i32* %0, [4 x float]* %1) {
%3 = alloca i32*
%4 = alloca [4 x float]*
store i32* %0, i32** %3
store [4 x float]* %1, [4 x float]** %4
%5 = load i32*, i32** %3
%6 = load i32, i32* %5
%7 = trunc i32 %6 to i16
%8 = sext i16 %7 to i32
%9 = load [4 x float]*, [4 x float]** %4
%10 = call i32 (i32, [4 x float]*, ...) bitcast (i32 (...)* @defbasis to i32 (i32, [4 x float]*, ...)*)(i32 %8, [4 x float]* %9)
ret void
}

LLVM IR (-O2):
define void @defbasis_(i32* nocapture %0, [4 x float]* %1) {
%3 = load i32, i32* %0
%4 = shl i32 %3, 16
%5 = ashr exact i32 %4, 16
%6 = tail call i32 (i32, [4 x float]*, ...) bitcast (i32 (...)* @defbasis to i32 (i32, [4 x float]*, ...)*)(i32 %5, [4 x float]* %1)
ret void
}
int length(char *s) {
  char c;
  int i = 0;
  c = s[i];
  while (c != '\0') {
    c = s[++i];
  }
  return i;
}


x86 assembly (clang, -O0):
<length>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x9(%rbp)
movsbl -0x9(%rbp),%eax
cmp    $0x0,%eax
je     1145 <length+0x45>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
add    $0x1,%ecx
mov    %ecx,-0x10(%rbp)
movslq %ecx,%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x9(%rbp)
jmp    111d <length+0x1d>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<length>:
cmpb   $0x0,(%rdi)
je     111c <length+0x1c>
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <length+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @length(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %6, %4 ], [ 0, %1 ]
%6 = add nuw nsw i64 %5, 1
%7 = getelementptr inbounds i8, i8* %0, i64 %6
%8 = load i8, i8* %7
%9 = icmp eq i8 %8, 0
br i1 %9, label %10, label %4
10: ; preds = %4
%11 = trunc i64 %6 to i32
br label %12
12: ; preds = %10, %1
%13 = phi i32 [ 0, %1 ], [ %11, %10 ]
ret i32 %13
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ border_clr_mask(int /*<<< orphan*/ volatile, int);
void border_clr_bit(volatile uint32_t reg, uint8_t bit) {
  border_clr_mask(reg, 1 << bit);
}


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

x86 assembly (clang, -O2):
<border_clr_bit>:
mov    %esi,%ecx
mov    %edi,-0x4(%rsp)
mov    -0x4(%rsp),%edi
mov    $0x1,%esi
shl    %cl,%esi
jmp    1030 <border_clr_mask@plt>

LLVM IR (-O0):
define void @border_clr_bit(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store volatile i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load volatile i32, i32* %3
%6 = load i32, i32* %4
%7 = shl i32 1, %6
%8 = call i32 @border_clr_mask(i32 %5, i32 %7)
ret void
}

LLVM IR (-O2):
define void @border_clr_bit(i32 %0, i32 %1) {
%3 = alloca i32
store volatile i32 %0, i32* %3
%4 = load volatile i32, i32* %3
%5 = shl nuw i32 1, %1
%6 = tail call i32 @border_clr_mask(i32 %4, i32 %5)
ret void
}
adrreg0regx1(r0, r1, x0, x1, p0, p1) double r0, r1;
double *p0, *p1;
{
  if ((p0[10000000]) <= (p1[x1]))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<adrreg0regx1>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
mov    %edi,-0x1c(%rbp)
mov    %esi,-0x20(%rbp)
mov    %rdx,-0x28(%rbp)
mov    %rcx,-0x30(%rbp)
mov    -0x28(%rbp),%rax
movsd  0x4c4b400(%rax),%xmm1
04
mov    -0x30(%rbp),%rax
movslq -0x20(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
ucomisd %xmm1,%xmm0
jb     114b <adrreg0regx1+0x4b>
movl   $0x1,-0x4(%rbp)
jmp    1152 <adrreg0regx1+0x52>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<adrreg0regx1>:
movslq %esi,%rax
movsd  (%rcx,%rax,8),%xmm0
xor    %eax,%eax
ucomisd 0x4c4b400(%rdx),%xmm0
04
setae  %al
ret

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

LLVM IR (-O2):
define i32 @adrreg0regx1(double %0, double %1, i32 %2, i32 %3, double* nocapture %4, double* nocapture %5) {
%7 = getelementptr inbounds double, double* %4, i64 10000000
%8 = load double, double* %7
%9 = sext i32 %3 to i64
%10 = getelementptr inbounds double, double* %5, i64 %9
%11 = load double, double* %10
%12 = fcmp ole double %8, %11
%13 = zext i1 %12 to i32
ret i32 %13
}
char reverseBits_fun_char(char x) {
  char r = x;
  int i = 7;
  for (x = x >> 1 & 0x7f; x; x >>= 1) {
    r = (r << 1) | (x & 1);
    --i;
  }
  return r << i;
}


x86 assembly (clang, -O0):
<reverseBits_fun_char>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
mov    %al,-0x2(%rbp)
movl   $0x7,-0x8(%rbp)
movsbl -0x1(%rbp),%eax
sar    $0x1,%eax
and    $0x7f,%eax
mov    %al,-0x1(%rbp)
cmpb   $0x0,-0x1(%rbp)
je     1159 <reverseBits_fun_char+0x59>
movsbl -0x2(%rbp),%eax
shl    $0x1,%eax
movsbl -0x1(%rbp),%ecx
and    $0x1,%ecx
or     %ecx,%eax
mov    %al,-0x2(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
movsbl -0x1(%rbp),%eax
sar    $0x1,%eax
mov    %al,-0x1(%rbp)
jmp    1124 <reverseBits_fun_char+0x24>
movsbl -0x2(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    %cl,%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<reverseBits_fun_char>:
mov    $0x7,%ecx
cmp    $0x2,%dil
jae    110f <reverseBits_fun_char+0xf>
mov    %edi,%eax
jmp    1137 <reverseBits_fun_char+0x37>
mov    $0x7,%ecx
mov    %edi,%eax
mov    %edi,%esi
nopl   0x0(%rax,%rax,1)
shr    %sil
add    %al,%al
mov    %esi,%edx
and    $0x1,%dl
or     %dl,%al
add    $0xffffffff,%ecx
cmp    $0x3,%dil
mov    %esi,%edi
ja     1120 <reverseBits_fun_char+0x20>
movzbl %al,%eax
shl    %cl,%eax
ret

LLVM IR (-O0):
define signext i8 @reverseBits_fun_char(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
%4 = alloca i32
store i8 %0, i8* %2
%5 = load i8, i8* %2
store i8 %5, i8* %3
store i32 7, i32* %4
%6 = load i8, i8* %2
%7 = sext i8 %6 to i32
%8 = ashr i32 %7, 1
%9 = and i32 %8, 127
%10 = trunc i32 %9 to i8
store i8 %10, i8* %2
br label %11
11: ; preds = %25, %1
%12 = load i8, i8* %2
%13 = icmp ne i8 %12, 0
br i1 %13, label %14, label %30
14: ; preds = %11
%15 = load i8, i8* %3
%16 = sext i8 %15 to i32
%17 = shl i32 %16, 1
%18 = load i8, i8* %2
%19 = sext i8 %18 to i32
%20 = and i32 %19, 1
%21 = or i32 %17, %20
%22 = trunc i32 %21 to i8
store i8 %22, i8* %3
%23 = load i32, i32* %4
%24 = add nsw i32 %23, -1
store i32 %24, i32* %4
br label %25
25: ; preds = %14
%26 = load i8, i8* %2
%27 = sext i8 %26 to i32
%28 = ashr i32 %27, 1
%29 = trunc i32 %28 to i8
store i8 %29, i8* %2
br label %11
30: ; preds = %11
%31 = load i8, i8* %3
%32 = sext i8 %31 to i32
%33 = load i32, i32* %4
%34 = shl i32 %32, %33
%35 = trunc i32 %34 to i8
ret i8 %35
}

LLVM IR (-O2):
define signext i8 @reverseBits_fun_char(i8 signext %0) {
%2 = icmp ult i8 %0, 2
br i1 %2, label %13, label %3
3: ; preds = %1, %3
%4 = phi i8 [ %7, %3 ], [ %0, %1 ]
%5 = phi i32 [ %11, %3 ], [ 7, %1 ]
%6 = phi i8 [ %10, %3 ], [ %0, %1 ]
%7 = lshr i8 %4, 1
%8 = shl i8 %6, 1
%9 = and i8 %7, 1
%10 = or i8 %8, %9
%11 = add nsw i32 %5, -1
%12 = icmp ult i8 %4, 4
br i1 %12, label %13, label %3
13: ; preds = %3, %1
%14 = phi i8 [ %0, %1 ], [ %10, %3 ]
%15 = phi i32 [ 7, %1 ], [ %11, %3 ]
%16 = zext i8 %14 to i32
%17 = shl i32 %16, %15
%18 = trunc i32 %17 to i8
ret i8 %18
}
/* Type definitions */
struct kbuffer {
  int dummy;
};

/* Variables and functions */
unsigned int read_4(struct kbuffer *, void *);
unsigned int ts4host(struct kbuffer *, unsigned int);
unsigned int kbuffer_ptr_delta(struct kbuffer *kbuf, void *ptr) {
  unsigned int type_len_ts;
  type_len_ts = read_4(kbuf, ptr);
  return ts4host(kbuf, type_len_ts);
}


x86 assembly (clang, -O0):
<kbuffer_ptr_delta>:
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   1040 <read_4@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <ts4host@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.kbuffer = type { i32 }
define i32 @kbuffer_ptr_delta(%struct.kbuffer* %0, i8* %1) {
%3 = alloca %struct.kbuffer*
%4 = alloca i8*
%5 = alloca i32
store %struct.kbuffer* %0, %struct.kbuffer** %3
store i8* %1, i8** %4
%6 = load %struct.kbuffer*, %struct.kbuffer** %3
%7 = load i8*, i8** %4
%8 = call i32 @read_4(%struct.kbuffer* %6, i8* %7)
store i32 %8, i32* %5
%9 = load %struct.kbuffer*, %struct.kbuffer** %3
%10 = load i32, i32* %5
%11 = call i32 @ts4host(%struct.kbuffer* %9, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
%struct.kbuffer = type { i32 }
define i32 @kbuffer_ptr_delta(%struct.kbuffer* %0, i8* %1) {
%3 = tail call i32 @read_4(%struct.kbuffer* %0, i8* %1)
%4 = tail call i32 @ts4host(%struct.kbuffer* %0, i32 %3)
ret i32 %4
}
/* Variables and functions */
size_t GetOpenMPMaximumThreads(void) { return (1); }


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

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

LLVM IR (-O0):
define i64 @GetOpenMPMaximumThreads() {
ret i64 1
}

LLVM IR (-O2):
define i64 @GetOpenMPMaximumThreads() {
ret i64 1
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
int /*<<< orphan*/ ctime_r(int /*<<< orphan*/ *, char *);
char *strchr(char *, char);
int /*<<< orphan*/ time(int /*<<< orphan*/);
char *get_current_time(char *tbuf) {
  time_t t = time(0);
  ctime_r(&t, tbuf);
  char *p = strchr(tbuf, '\n');
  if (p) {
    *p = 0;
  }
  return tbuf;
}


x86 assembly (clang, -O0):
<get_current_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdi
call   1050 <ctime_r@plt>
mov    -0x8(%rbp),%rdi
mov    $0xa,%esi
call   1030 <strchr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1177 <get_current_time+0x47>
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_current_time>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,0xc(%rsp)
lea    0xc(%rsp),%rdi
mov    %rbx,%rsi
call   1050 <ctime_r@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
call   1030 <strchr@plt>
test   %rax,%rax
je     1165 <get_current_time+0x35>
movb   $0x0,(%rax)
mov    %rbx,%rax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @get_current_time(i8* returned %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = tail call i32 @time(i32 0)
store i32 %4, i32* %2
%5 = call i32 @ctime_r(i32* %2, i8* %0)
%6 = call i8* @strchr(i8* dereferenceable(1) %0, i8 signext 10)
%7 = icmp eq i8* %6, null
br i1 %7, label %9, label %8
8: ; preds = %1
store i8 0, i8* %6
br label %9
9: ; preds = %8, %1
ret i8* %0
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ detail;
};
typedef TYPE_1__ XCrossingEvent;

/* Variables and functions */
int get_XCrossingEvent_detail(void *_p) {
  return (int)((XCrossingEvent *)_p)->detail;
}


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

x86 assembly (clang, -O2):
<get_XCrossingEvent_detail>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i32 @get_XCrossingEvent_detail(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @get_XCrossingEvent_detail(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
int extrarestartfunction_new(void) { return (0); }


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

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

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

LLVM IR (-O2):
define i32 @extrarestartfunction_new() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void usage(int argc, char *argv[]) {
  printf("Usage:\n%s: [-c <count>] [-p <port>]\n    -c  Send <count> "
         "deliver_sm packets to the receiver.\n    -p  Listen for connections "
         "on TCP port <port>.\n",
         argv[0]);
}


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

x86 assembly (clang, -O2):
<usage>:
mov    (%rsi),%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [145 x i8] c"Usage:\0A%s: [-c <count>] [-p <port>]\0A -c Send <count> deliver_sm packets to the receiver.\0A -p Listen for connections on TCP port <port>.\0A\00"
define void @usage(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i8**, i8*** %4
%6 = getelementptr inbounds i8*, i8** %5, i64 0
%7 = load i8*, i8** %6
%8 = call i32 @printf(i8* getelementptr inbounds ([145 x i8], [145 x i8]* @.str, i64 0, i64 0), i8* %7)
ret void
}

LLVM IR (-O2):
@.str = [145 x i8] c"Usage:\0A%s: [-c <count>] [-p <port>]\0A -c Send <count> deliver_sm packets to the receiver.\0A -p Listen for connections on TCP port <port>.\0A\00"
define void @usage(i32 %0, i8** nocapture %1) {
%3 = load i8*, i8** %1
%4 = tail call i32 @printf(i8* getelementptr inbounds ([145 x i8], [145 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}
void debug_func() {}


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

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

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

LLVM IR (-O2):
define void @debug_func() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Platform_Halt(int);
unsigned char Reals_ToHex(int i) {
  unsigned char _o_result;
  if (i < 10) {
    _o_result = (unsigned char)(i + 48);
    return _o_result;
  } else {
    _o_result = (unsigned char)(i + 55);
    return _o_result;
  }
__retchk:
  Platform_Halt(-3);
  return 0;
  ;
}


x86 assembly (clang, -O0):
<Reals_ToHex>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    1125 <Reals_ToHex+0x25>
mov    -0x8(%rbp),%eax
add    $0x30,%eax
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
mov    %al,-0x1(%rbp)
jmp    1134 <Reals_ToHex+0x34>
mov    -0x8(%rbp),%eax
add    $0x37,%eax
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Reals_ToHex>:
cmp    $0xa,%edi
mov    $0x30,%ecx
mov    $0x37,%eax
cmovl  %ecx,%eax
add    %dil,%al
ret

LLVM IR (-O0):
define zeroext i8 @Reals_ToHex(i32 %0) {
%2 = alloca i8
%3 = alloca i32
%4 = alloca i8
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 10
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i32, i32* %3
%9 = add nsw i32 %8, 48
%10 = trunc i32 %9 to i8
store i8 %10, i8* %4
%11 = load i8, i8* %4
store i8 %11, i8* %2
br label %19
12: ; preds = %1
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 55
%15 = trunc i32 %14 to i8
store i8 %15, i8* %4
%16 = load i8, i8* %4
store i8 %16, i8* %2
br label %19
17: ; No predecessors!
%18 = call i32 @Platform_Halt(i32 -3)
store i8 0, i8* %2
br label %19
19: ; preds = %17, %12, %7
%20 = load i8, i8* %2
ret i8 %20
}

LLVM IR (-O2):
define zeroext i8 @Reals_ToHex(i32 %0) {
%2 = icmp slt i32 %0, 10
%3 = trunc i32 %0 to i8
%4 = select i1 %2, i8 48, i8 55
%5 = add i8 %4, %3
ret i8 %5
}
/* Type definitions */
typedef scalar_t__ int64_t;
typedef scalar_t__ const int32_t;

/* Variables and functions */
scalar_t__ const INT32_MAX;
scalar_t__ const INT32_MIN;
int32_t __stdfix_sat_k(const int64_t x) {
  if (x > INT32_MAX)
    return (INT32_MAX);
  if (x < INT32_MIN)
    return (INT32_MIN);
  return ((int32_t)x);
}


x86 assembly (clang, -O0):
<__stdfix_sat_k>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x2ecd(%rip),%rcx
cmp    (%rcx),%rax
jle    112f <__stdfix_sat_k+0x2f>
mov    0x2ebd(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x8(%rbp)
jmp    115e <__stdfix_sat_k+0x5e>
mov    -0x10(%rbp),%rax
mov    0x2e9e(%rip),%rcx
cmp    (%rcx),%rax
jge    1156 <__stdfix_sat_k+0x56>
mov    0x2e8e(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x8(%rbp)
jmp    115e <__stdfix_sat_k+0x5e>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
@INT32_MAX = constant i64 0
@INT32_MIN = constant i64 0
define i64 @__stdfix_sat_k(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i64, i64* %3
%5 = load i64, i64* @INT32_MAX
%6 = icmp sgt i64 %4, %5
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = load i64, i64* @INT32_MAX
store i64 %8, i64* %2
br label %17
9: ; preds = %1
%10 = load i64, i64* %3
%11 = load i64, i64* @INT32_MIN
%12 = icmp slt i64 %10, %11
br i1 %12, label %13, label %15
13: ; preds = %9
%14 = load i64, i64* @INT32_MIN
store i64 %14, i64* %2
br label %17
15: ; preds = %9
%16 = load i64, i64* %3
store i64 %16, i64* %2
br label %17
17: ; preds = %15, %13, %7
%18 = load i64, i64* %2
ret i64 %18
}

LLVM IR (-O2):
@INT32_MAX = constant i64 0
@INT32_MIN = constant i64 0
define i64 @__stdfix_sat_k(i64 %0) {
ret i64 0
}
unsigned ZSTD_64bits(void) { return sizeof(void *) == 8; }


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

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

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

LLVM IR (-O2):
define i32 @ZSTD_64bits() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ isdigit(char const);
unsigned int IsNumeric(const char *str, size_t len) {
  while (len-- > 0) {
    if (!isdigit(str[len])) {
      return (0);
    }
  }
  return (1);
}


x86 assembly (clang, -O0):
<IsNumeric>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x18(%rbp)
cmp    $0x0,%rax
jbe    1164 <IsNumeric+0x54>
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%eax
jne    115f <IsNumeric+0x4f>
movl   $0x0,-0x4(%rbp)
jmp    116b <IsNumeric+0x5b>
jmp    1120 <IsNumeric+0x10>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IsNumeric>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    %rsi,%rbx
nopw   0x0(%rax,%rax,1)
sub    $0x1,%rbx
jb     113c <IsNumeric+0x2c>
movsbl -0x1(%r14,%rsi,1),%edi
call   1030 <isdigit@plt>
mov    %rbx,%rsi
test   %eax,%eax
jne    1120 <IsNumeric+0x10>
xor    %eax,%eax
jmp    1141 <IsNumeric+0x31>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @IsNumeric(i8* nocapture %0, i64 %1) {
br label %3
3: ; preds = %7, %2
%4 = phi i64 [ %1, %2 ], [ %5, %7 ]
%5 = add i64 %4, -1
%6 = icmp eq i64 %4, 0
br i1 %6, label %12, label %7
7: ; preds = %3
%8 = getelementptr inbounds i8, i8* %0, i64 %5
%9 = load i8, i8* %8
%10 = tail call i32 @isdigit(i8 signext %9)
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %3
12: ; preds = %3, %7
%13 = phi i32 [ 0, %7 ], [ 1, %3 ]
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ handleNewConnections();
int /*<<< orphan*/ handleNewServiceDiscoveryRequests();
void run() {
  handleNewServiceDiscoveryRequests();
  handleNewConnections();
}


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

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

LLVM IR (-O0):
define void @run() {
%1 = call i32 (...) @handleNewServiceDiscoveryRequests()
%2 = call i32 (...) @handleNewConnections()
ret void
}

LLVM IR (-O2):
define void @run() {
%1 = tail call i32 (...) @handleNewServiceDiscoveryRequests()
%2 = tail call i32 (...) @handleNewConnections()
ret void
}
/* Variables and functions */
int gpio_write(int, int);
int gpio_setscl_val(int val) { return gpio_write(27, val); }


x86 assembly (clang, -O0):
<gpio_setscl_val>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    $0x1b,%edi
call   1030 <gpio_write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gpio_setscl_val>:
mov    %edi,%esi
mov    $0x1b,%edi
jmp    1030 <gpio_write@plt>

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

LLVM IR (-O2):
define i32 @gpio_setscl_val(i32 %0) {
%2 = tail call i32 @gpio_write(i32 27, i32 %0)
ret i32 %2
}
void sqls_arfw_define_blog(void) {}


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

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

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

LLVM IR (-O2):
define void @sqls_arfw_define_blog() {
ret void
}
const char *eraSofaVersion() { return "20170420"; }


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

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

LLVM IR (-O0):
@.str = [9 x i8] c"20170420\00"
define i8* @eraSofaVersion() {
ret i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [9 x i8] c"20170420\00"
define i8* @eraSofaVersion() {
ret i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0)
}