xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int int16_t;

/* Variables and functions */
int16_t s2n_kyber_512_r3_csubq(int16_t a) {
  a -= 3329;
  a += (a >> 15) & 3329;
  return a;
}


x86 assembly (clang, -O0):
<s2n_kyber_512_r3_csubq>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0xd01,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0xf,%eax
and    $0xd01,%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<s2n_kyber_512_r3_csubq>:
lea    -0xd01(%rdi),%eax
shr    $0xf,%eax
and    $0xd01,%eax
add    %edi,%eax
add    $0xfffff2ff,%eax
ret

LLVM IR (-O0):
define i32 @s2n_kyber_512_r3_csubq(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sub nsw i32 %3, 3329
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = ashr i32 %5, 15
%7 = and i32 %6, 3329
%8 = load i32, i32* %2
%9 = add nsw i32 %8, %7
store i32 %9, i32* %2
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
define i32 @s2n_kyber_512_r3_csubq(i32 %0) {
%2 = add nsw i32 %0, -3329
%3 = lshr i32 %2, 15
%4 = and i32 %3, 3329
%5 = add nsw i32 %4, %2
ret i32 %5
}
/* Variables and functions */
scalar_t__ isdigit(char const);
unsigned int skip_atou(const char **s) {
  int i = 0;
  while (isdigit(**s))
    i = i * 10 + *((*s)++) - '0';
  return i;
}


x86 assembly (clang, -O0):
<skip_atou>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     1161 <skip_atou+0x51>
imul   $0xa,-0xc(%rbp),%eax
mov    -0x8(%rbp),%rdx
mov    (%rdx),%rcx
mov    %rcx,%rsi
add    $0x1,%rsi
mov    %rsi,(%rdx)
movsbl (%rcx),%ecx
add    %ecx,%eax
sub    $0x30,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <skip_atou+0x13>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_atou>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    (%rdi),%rax
movsbl (%rax),%edi
call   1030 <isdigit@plt>
xor    %ebx,%ebx
test   %rax,%rax
je     1154 <skip_atou+0x44>
nopl   0x0(%rax)
lea    (%rbx,%rbx,4),%eax
mov    (%r14),%rcx
lea    0x1(%rcx),%rdx
mov    %rdx,(%r14)
movsbl (%rcx),%edx
lea    (%rdx,%rax,2),%ebx
add    $0xffffffd0,%ebx
movsbl 0x1(%rcx),%edi
call   1030 <isdigit@plt>
test   %rax,%rax
jne    1130 <skip_atou+0x20>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @skip_atou(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = load i8, i8* %2
%4 = tail call i64 @isdigit(i8 signext %3)
%5 = icmp eq i64 %4, 0
br i1 %5, label %18, label %6
6: ; preds = %1, %6
%7 = phi i32 [ %14, %6 ], [ 0, %1 ]
%8 = mul nsw i32 %7, 10
%9 = load i8*, i8** %0
%10 = getelementptr inbounds i8, i8* %9, i64 1
store i8* %10, i8** %0
%11 = load i8, i8* %9
%12 = sext i8 %11 to i32
%13 = add i32 %8, -48
%14 = add i32 %13, %12
%15 = load i8, i8* %10
%16 = tail call i64 @isdigit(i8 signext %15)
%17 = icmp eq i64 %16, 0
br i1 %17, label %18, label %6
18: ; preds = %6, %1
%19 = phi i32 [ 0, %1 ], [ %14, %6 ]
ret i32 %19
}
char *main() { return "how are you"; }


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

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

LLVM IR (-O0):
@.str = [12 x i8] c"how are you\00"
define i8* @main() {
ret i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [12 x i8] c"how are you\00"
define i8* @main() {
ret i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0)
}
int execute_remap_file_pages() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_remap_file_pages() {
ret i32 0
}
/* Variables and functions */
int EOF;
int getchar();
int /*<<< orphan*/ printf(char *, int);
int main() {
  int in, lines;
  while ((in = getchar()) != EOF) {
    if (in == '\n') {
      ++lines;
    }
  }
  printf("lines is: %d\n", lines);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x8(%rbp)
mov    0x2ea8(%rip),%rcx
cmp    (%rcx),%eax
je     1160 <main+0x40>
cmpl   $0xa,-0x8(%rbp)
jne    115b <main+0x3b>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112f <main+0xf>
mov    -0xc(%rbp),%esi
lea    0xe96(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eb6(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %ecx,%ecx
cmp    $0xa,%eax
sete   %cl
add    %ecx,%ebx
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    (%r14),%eax
jne    1140 <main+0x20>
lea    0xea3(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@EOF = global i32 0
@.str = [14 x i8] c"lines is: %d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @getchar()
%2 = load i32, i32* @EOF
%3 = icmp ne i32 %1, %2
br label %4
4: ; preds = %0, %4
%5 = phi i32 [ %10, %4 ], [ %1, %0 ]
%6 = phi i32 [ %9, %4 ], [ undef, %0 ]
%7 = icmp eq i32 %5, 10
%8 = zext i1 %7 to i32
%9 = add nsw i32 %6, %8
%10 = tail call i32 (...) @getchar()
%11 = load i32, i32* @EOF
%12 = icmp eq i32 %10, %11
br i1 %12, label %13, label %4
13: ; preds = %4
%14 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %9)
ret i32 0
}
float constrain(float x, float lowerBound, float upperBound) {
  if (x < lowerBound) {
    return lowerBound;
  } else if (x > upperBound) {
    return upperBound;
  } else {
    return x;
  }
}


x86 assembly (clang, -O0):
<constrain>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  %xmm2,-0x10(%rbp)
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1135 <constrain+0x35>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    115d <constrain+0x5d>
movss  -0x8(%rbp),%xmm0
ucomiss -0x10(%rbp),%xmm0
jbe    1153 <constrain+0x53>
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    115d <constrain+0x5d>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<constrain>:
minss  %xmm0,%xmm2
cmpltss %xmm1,%xmm0
movaps %xmm0,%xmm3
andnps %xmm2,%xmm3
andps  %xmm1,%xmm0
orps   %xmm3,%xmm0
ret

LLVM IR (-O0):
define float @constrain(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
%8 = load float, float* %5
%9 = load float, float* %6
%10 = fcmp olt float %8, %9
br i1 %10, label %11, label %13
11: ; preds = %3
%12 = load float, float* %6
store float %12, float* %4
br label %21
13: ; preds = %3
%14 = load float, float* %5
%15 = load float, float* %7
%16 = fcmp ogt float %14, %15
br i1 %16, label %17, label %19
17: ; preds = %13
%18 = load float, float* %7
store float %18, float* %4
br label %21
19: ; preds = %13
%20 = load float, float* %5
store float %20, float* %4
br label %21
21: ; preds = %19, %17, %11
%22 = load float, float* %4
ret float %22
}

LLVM IR (-O2):
define float @constrain(float %0, float %1, float %2) {
%4 = fcmp olt float %0, %1
%5 = fcmp ogt float %0, %2
%6 = select i1 %5, float %2, float %0
%7 = select i1 %4, float %1, float %6
ret float %7
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void clickplc_exe_object_free(int object_code, void **pobject) {
  if (*pobject) {
    free(*pobject);
    *pobject = 0;
  }
  return;
}


x86 assembly (clang, -O0):
<clickplc_exe_object_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
je     1144 <clickplc_exe_object_free+0x34>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%rax
movq   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clickplc_exe_object_free>:
push   %rbx
mov    (%rsi),%rdi
test   %rdi,%rdi
je     1128 <clickplc_exe_object_free+0x18>
mov    %rsi,%rbx
call   1030 <free@plt>
movq   $0x0,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @clickplc_exe_object_free(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 = load i8*, i8** %5
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %13
8: ; preds = %2
%9 = load i8**, i8*** %4
%10 = load i8*, i8** %9
%11 = call i32 @free(i8* %10)
%12 = load i8**, i8*** %4
store i8* null, i8** %12
br label %13
13: ; preds = %8, %2
ret void
}

LLVM IR (-O2):
define void @clickplc_exe_object_free(i32 %0, i8** nocapture %1) {
%3 = load i8*, i8** %1
%4 = icmp eq i8* %3, null
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @free(i8* %3)
store i8* null, i8** %1
br label %7
7: ; preds = %5, %2
ret void
}
void test45_Q_reset__E() {}


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

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

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

LLVM IR (-O2):
define void @test45_Q_reset__E() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ getcwd(char *, int);
int strlen(char *);
void igetcwd(char *name, int *ln) {
  getcwd(name, 256);
  *ln = strlen(name);
}


x86 assembly (clang, -O0):
<igetcwd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x100,%esi
call   1040 <getcwd@plt>
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<igetcwd>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    $0x100,%esi
call   1040 <getcwd@plt>
mov    %rbx,%rdi
call   1030 <strlen@plt>
mov    %eax,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @igetcwd(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
store i8* %0, i8** %3
store i32* %1, i32** %4
%5 = load i8*, i8** %3
%6 = call i32 @getcwd(i8* %5, i32 256)
%7 = load i8*, i8** %3
%8 = call i32 @strlen(i8* %7)
%9 = load i32*, i32** %4
store i32 %8, i32* %9
ret void
}

LLVM IR (-O2):
define void @igetcwd(i8* %0, i32* nocapture writeonly %1) {
%3 = tail call i32 @getcwd(i8* %0, i32 256)
%4 = tail call i32 @strlen(i8* %0)
store i32 %4, i32* %1
ret void
}
/* Variables and functions */
size_t strlen(const char *s) {
  size_t length = 0;
  if (s != NULL) {
    for (; *s++ != '\0'; length++)
      ;
  }
  return length;
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1156 <strlen+0x56>
jmp    1120 <strlen+0x20>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1151 <strlen+0x51>
jmp    1140 <strlen+0x40>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1120 <strlen+0x20>
jmp    1156 <strlen+0x56>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
test   %rdi,%rdi
je     111f <strlen+0x1f>
cmpb   $0x0,(%rdi)
je     111f <strlen+0x1f>
xor    %ecx,%ecx
nopl   0x0(%rax)
lea    0x1(%rcx),%rax
cmpb   $0x0,0x1(%rdi,%rcx,1)
mov    %rax,%rcx
jne    1110 <strlen+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i64 @strlen(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %13, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %13, label %6
6: ; preds = %3, %6
%7 = phi i64 [ %10, %6 ], [ 0, %3 ]
%8 = phi i8* [ %9, %6 ], [ %0, %3 ]
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = add i64 %7, 1
%11 = load i8, i8* %9
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %6
13: ; preds = %6, %3, %1
%14 = phi i64 [ 0, %1 ], [ 0, %3 ], [ %10, %6 ]
ret i64 %14
}
/* Variables and functions */
int /*<<< orphan*/ write(int, char *, int);
int main(void) {
  write(1, "Z\n", 2);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
lea    0xed5(%rip),%rsi
mov    $0x2,%edx
call   1030 <write@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"Z\0A\00"
define i32 @main() {
%1 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 2)
ret i32 0
}
int main() {
  int a;
  int b;
  int c;
  if (a = b + a) {
    c = -a;
    b = 0;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
je     112c <main+0x2c>
xor    %eax,%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
movl   $0x0,-0xc(%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 i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = load i32, i32* %3
%6 = load i32, i32* %2
%7 = add nsw i32 %5, %6
store i32 %7, i32* %2
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %0
%10 = load i32, i32* %2
%11 = sub nsw i32 0, %10
store i32 %11, i32* %4
store i32 0, i32* %3
br label %12
12: ; preds = %9, %0
ret i32 0
}

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

/* Variables and functions */
int /*<<< orphan*/ glGetBooleanv(int /*<<< orphan*/, int /*<<< orphan*/ *);
void GetBooleanv(GLenum pname, GLboolean *params) {
  glGetBooleanv(pname, params);
}


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

x86 assembly (clang, -O2):
<GetBooleanv>:
jmp    1030 <glGetBooleanv@plt>

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

LLVM IR (-O2):
define void @GetBooleanv(i32 %0, i32* %1) {
%3 = tail call i32 @glGetBooleanv(i32 %0, i32* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ execve(char *, char **, int /*<<< orphan*/ *);
int /*<<< orphan*/ setuid(int /*<<< orphan*/);
int main() {
  char *args[2];
  setuid(0);
  args[0] = "/bin/sh";
  args[1] = NULL;
  execve(args[0], args, NULL);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %edi,%edi
call   1040 <setuid@plt>
lea    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
movq   $0x0,-0x8(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x10(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <execve@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
xor    %edi,%edi
call   1040 <setuid@plt>
lea    0xece(%rip),%rdi
mov    %rdi,(%rsp)
movq   $0x0,0x8(%rsp)
mov    %rsp,%rsi
xor    %edx,%edx
call   1030 <execve@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [8 x i8] c"/bin/sh\00"
define i32 @main() {
%1 = alloca [2 x i8*]
%2 = call i32 @setuid(i32 0)
%3 = getelementptr inbounds [2 x i8*], [2 x i8*]* %1, i64 0, i64 0
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8** %3
%4 = getelementptr inbounds [2 x i8*], [2 x i8*]* %1, i64 0, i64 1
store i8* null, i8** %4
%5 = getelementptr inbounds [2 x i8*], [2 x i8*]* %1, i64 0, i64 0
%6 = load i8*, i8** %5
%7 = getelementptr inbounds [2 x i8*], [2 x i8*]* %1, i64 0, i64 0
%8 = call i32 @execve(i8* %6, i8** %7, i32* null)
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"/bin/sh\00"
define i32 @main() {
%1 = alloca [2 x i8*]
%2 = bitcast [2 x i8*]* %1 to i8*
%3 = tail call i32 @setuid(i32 0)
%4 = getelementptr inbounds [2 x i8*], [2 x i8*]* %1, i64 0, i64 0
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8** %4
%5 = getelementptr inbounds [2 x i8*], [2 x i8*]* %1, i64 0, i64 1
store i8* null, i8** %5
%6 = call i32 @execve(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8** %4, i32* null)
ret i32 0
}
unsigned addval_416(unsigned x) { return x + 2425362552U; }


x86 assembly (clang, -O0):
<addval_416>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x90901878,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<addval_416>:
lea    -0x6f6fe788(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @addval_416(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add i32 %3, -1869604744
ret i32 %4
}

LLVM IR (-O2):
define i32 @addval_416(i32 %0) {
%2 = add i32 %0, -1869604744
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int i;
  while (1) {
    scanf("%d", &i);
    if (i == 42)
      return 0;
    else
      printf("%d\n", i);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x2a,-0x8(%rbp)
jne    1151 <main+0x31>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret
mov    -0x8(%rbp),%esi
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
jmp    112f <main+0xf>

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
lea    0xed0(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1040 <scanf@plt>
mov    0xc(%rsp),%esi
cmp    $0x2a,%esi
je     117c <main+0x5c>
lea    0xeb9(%rip),%r14
lea    0xeaf(%rip),%r15
lea    0xc(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
mov    0xc(%rsp),%esi
cmp    $0x2a,%esi
jne    1160 <main+0x40>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = icmp eq i32 %4, 42
br i1 %5, label %6, label %7
6: ; preds = %7, %0
ret i32 0
7: ; preds = %0, %7
%8 = phi i32 [ %11, %7 ], [ %4, %0 ]
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %8)
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%11 = load i32, i32* %1
%12 = icmp eq i32 %11, 42
br i1 %12, label %6, label %7
}
/* Type definitions */
struct omap1_cam_platform_data {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ omap1_camera_init(struct omap1_cam_platform_data *);
void omap1_set_camera_info(struct omap1_cam_platform_data *info) {
  omap1_camera_init(info);
}


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

x86 assembly (clang, -O2):
<omap1_set_camera_info>:
jmp    1030 <omap1_camera_init@plt>

LLVM IR (-O0):
%struct.omap1_cam_platform_data = type { i32 }
define void @omap1_set_camera_info(%struct.omap1_cam_platform_data* %0) {
%2 = alloca %struct.omap1_cam_platform_data*
store %struct.omap1_cam_platform_data* %0, %struct.omap1_cam_platform_data** %2
%3 = load %struct.omap1_cam_platform_data*, %struct.omap1_cam_platform_data** %2
%4 = call i32 @omap1_camera_init(%struct.omap1_cam_platform_data* %3)
ret void
}

LLVM IR (-O2):
%struct.omap1_cam_platform_data = type { i32 }
define void @omap1_set_camera_info(%struct.omap1_cam_platform_data* %0) {
%2 = tail call i32 @omap1_camera_init(%struct.omap1_cam_platform_data* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_memtrap_is_good() {
  printf("NOT IMPLEMENTED:"
         "pa_memtrap_is_good"
         "\n");
}


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

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

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

LLVM IR (-O2):
@str = [35 x i8] c"NOT IMPLEMENTED:pa_memtrap_is_good\00"
define i32 @pa_memtrap_is_good() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ two_symbolic_accesses(int);
void tsa_one_alarm_Bad() { two_symbolic_accesses(3); }


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

x86 assembly (clang, -O2):
<tsa_one_alarm_Bad>:
mov    $0x3,%edi
jmp    1030 <two_symbolic_accesses@plt>

LLVM IR (-O0):
define void @tsa_one_alarm_Bad() {
%1 = call i32 @two_symbolic_accesses(i32 3)
ret void
}

LLVM IR (-O2):
define void @tsa_one_alarm_Bad() {
%1 = tail call i32 @two_symbolic_accesses(i32 3)
ret void
}
void POLICYQUALINFO_new(void) {}


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

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

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

LLVM IR (-O2):
define void @POLICYQUALINFO_new() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void freeArgs(char *argv[], size_t n) {
  size_t i;
  for (i = 0; i < n; i++) {
    if (argv[i] != NULL) {
      free(argv[i]);
    }
  }
}


x86 assembly (clang, -O0):
<freeArgs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1170 <freeArgs+0x60>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     115a <freeArgs+0x4a>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
jmp    115f <freeArgs+0x4f>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1128 <freeArgs+0x18>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<freeArgs>:
push   %r15
push   %r14
push   %rbx
test   %rsi,%rsi
je     1149 <freeArgs+0x39>
mov    %rsi,%r15
mov    %rdi,%r14
xor    %ebx,%ebx
jmp    1139 <freeArgs+0x29>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x1,%rbx
cmp    %rbx,%r15
je     1149 <freeArgs+0x39>
mov    (%r14,%rbx,8),%rdi
test   %rdi,%rdi
je     1130 <freeArgs+0x20>
call   1030 <free@plt>
jmp    1130 <freeArgs+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @freeArgs(i8** nocapture %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %14, label %4
4: ; preds = %2, %11
%5 = phi i64 [ %12, %11 ], [ 0, %2 ]
%6 = getelementptr inbounds i8*, i8** %0, i64 %5
%7 = load i8*, i8** %6
%8 = icmp eq i8* %7, null
br i1 %8, label %11, label %9
9: ; preds = %4
%10 = tail call i32 @free(i8* %7)
br label %11
11: ; preds = %4, %9
%12 = add nuw i64 %5, 1
%13 = icmp eq i64 %12, %1
br i1 %13, label %14, label %4
14: ; preds = %11, %2
ret void
}
/* Type definitions */
struct statvfs {
  int dummy;
};
struct statfs {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ __statvfs_cvt(struct statfs *, struct statvfs *);
int statfs(char const *, struct statfs *);
int statvfs(const char *path, struct statvfs *sv) {
  struct statfs ss;
  if (statfs(path, &ss) == -1)
    return -1;
  __statvfs_cvt(&ss, sv);
  return 0;
}


x86 assembly (clang, -O0):
<statvfs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x20(%rbp),%rsi
call   1040 <statfs@plt>
cmp    $0xffffffff,%eax
jne    1152 <statvfs+0x32>
movl   $0xffffffff,-0x4(%rbp)
jmp    1166 <statvfs+0x46>
mov    -0x18(%rbp),%rsi
lea    -0x20(%rbp),%rdi
call   1030 <__statvfs_cvt@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<statvfs>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
lea    0x8(%rsp),%rsi
call   1040 <statfs@plt>
cmp    $0xffffffff,%eax
je     1148 <statvfs+0x28>
lea    0x8(%rsp),%rdi
mov    %rbx,%rsi
call   1030 <__statvfs_cvt@plt>
xor    %eax,%eax
jmp    114d <statvfs+0x2d>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.statvfs = type { i32 }
%struct.statfs = type { i32 }
define i32 @statvfs(i8* %0, %struct.statvfs* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca %struct.statvfs*
%6 = alloca %struct.statfs
store i8* %0, i8** %4
store %struct.statvfs* %1, %struct.statvfs** %5
%7 = load i8*, i8** %4
%8 = call i32 @statfs(i8* %7, %struct.statfs* %6)
%9 = icmp eq i32 %8, -1
br i1 %9, label %10, label %11
10: ; preds = %2
store i32 -1, i32* %3
br label %14
11: ; preds = %2
%12 = load %struct.statvfs*, %struct.statvfs** %5
%13 = call i32 @__statvfs_cvt(%struct.statfs* %6, %struct.statvfs* %12)
store i32 0, i32* %3
br label %14
14: ; preds = %11, %10
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
%struct.statvfs = type { i32 }
%struct.statfs = type { i32 }
define i32 @statvfs(i8* %0, %struct.statvfs* %1) {
%3 = alloca %struct.statfs
%4 = bitcast %struct.statfs* %3 to i8*
%5 = call i32 @statfs(i8* %0, %struct.statfs* %3)
%6 = icmp eq i32 %5, -1
br i1 %6, label %9, label %7
7: ; preds = %2
%8 = call i32 @__statvfs_cvt(%struct.statfs* %3, %struct.statvfs* %1)
br label %9
9: ; preds = %2, %7
%10 = phi i32 [ 0, %7 ], [ -1, %2 ]
ret i32 %10
}
int indexOfParent(int index) { return (index - 1) / 2; }


x86 assembly (clang, -O0):
<indexOfParent>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
pop    %rbp
ret

x86 assembly (clang, -O2):
<indexOfParent>:
mov    %edi,%eax
add    $0xffffffff,%eax
shr    $0x1f,%eax
add    %edi,%eax
add    $0xffffffff,%eax
sar    %eax
ret

LLVM IR (-O0):
define i32 @indexOfParent(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sub nsw i32 %3, 1
%5 = sdiv i32 %4, 2
ret i32 %5
}

LLVM IR (-O2):
define i32 @indexOfParent(i32 %0) {
%2 = add nsw i32 %0, -1
%3 = sdiv i32 %2, 2
ret i32 %3
}
void websils_dom_abi_0() {}


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

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

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

LLVM IR (-O2):
define void @websils_dom_abi_0() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ scanf(char *, char *);
void getCardName(char *ch, char *prompt) {
  puts(prompt);
  scanf("%2s", ch);
}


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

x86 assembly (clang, -O2):
<getCardName>:
push   %rbx
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1030 <puts@plt>
lea    0xecd(%rip),%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1040 <scanf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%2s\00"
define void @getCardName(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 = call i32 @puts(i8* %5)
%7 = load i8*, i8** %3
%8 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %7)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%2s\00"
define void @getCardName(i8* %0, i8* nocapture %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) %1)
%4 = tail call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Type definitions */
struct svc_req {
  int dummy;
};
struct rpc_msg {
  int dummy;
};
typedef enum auth_stat { ____Placeholder_auth_stat } auth_stat;

/* Variables and functions */
int AUTH_OK;
enum auth_stat _svcauth_null(struct svc_req *rqst, struct rpc_msg *msg) {
  return AUTH_OK;
}


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

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

LLVM IR (-O0):
%struct.svc_req = type { i32 }
%struct.rpc_msg = type { i32 }
@AUTH_OK = global i32 0
define i32 @_svcauth_null(%struct.svc_req* %0, %struct.rpc_msg* %1) {
%3 = alloca %struct.svc_req*
%4 = alloca %struct.rpc_msg*
store %struct.svc_req* %0, %struct.svc_req** %3
store %struct.rpc_msg* %1, %struct.rpc_msg** %4
%5 = load i32, i32* @AUTH_OK
ret i32 %5
}

LLVM IR (-O2):
%struct.svc_req = type { i32 }
%struct.rpc_msg = type { i32 }
@AUTH_OK = global i32 0
define i32 @_svcauth_null(%struct.svc_req* nocapture readnone %0, %struct.rpc_msg* nocapture readnone %1) {
%3 = load i32, i32* @AUTH_OK
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ SVCXPRT;

/* Variables and functions */
int /*<<< orphan*/ UDPMSGSIZE;
int /*<<< orphan*/ *svcudp_bufcreate(int, int /*<<< orphan*/,
                                     int /*<<< orphan*/);
SVCXPRT *svcudp_create(int sock) {
  return (svcudp_bufcreate(sock, UDPMSGSIZE, UDPMSGSIZE));
}


x86 assembly (clang, -O0):
<svcudp_create>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ebb(%rip),%rax
mov    (%rax),%esi
mov    0x2eb2(%rip),%rax
mov    (%rax),%edx
call   1030 <svcudp_bufcreate@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<svcudp_create>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edx
mov    %edx,%esi
jmp    1030 <svcudp_bufcreate@plt>

LLVM IR (-O0):
@UDPMSGSIZE = global i32 0
define i32* @svcudp_create(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @UDPMSGSIZE
%5 = load i32, i32* @UDPMSGSIZE
%6 = call i32* @svcudp_bufcreate(i32 %3, i32 %4, i32 %5)
ret i32* %6
}

LLVM IR (-O2):
@UDPMSGSIZE = global i32 0
define i32* @svcudp_create(i32 %0) {
%2 = load i32, i32* @UDPMSGSIZE
%3 = tail call i32* @svcudp_bufcreate(i32 %0, i32 %2, i32 %2)
ret i32* %3
}
char *GetNameFromNumber(NameList, index)
char **NameList;
int index;
{ return NameList[index]; }


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

x86 assembly (clang, -O2):
<GetNameFromNumber>:
movslq %esi,%rax
mov    (%rdi,%rax,8),%rax
ret

LLVM IR (-O0):
define i8* @GetNameFromNumber(i8** %0, i32 %1) {
%3 = alloca i8**
%4 = alloca i32
store i8** %0, i8*** %3
store i32 %1, i32* %4
%5 = load i8**, i8*** %3
%6 = load i32, i32* %4
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8*, i8** %5, i64 %7
%9 = load i8*, i8** %8
ret i8* %9
}

LLVM IR (-O2):
define i8* @GetNameFromNumber(i8** nocapture %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = getelementptr inbounds i8*, i8** %0, i64 %3
%5 = load i8*, i8** %4
ret i8* %5
}
double limlin(double x, double x0, double dx, double y0) {
  double Fangle(double x);
  return (y0 - dx * Fangle(-(x - x0) / dx));
}


x86 assembly (clang, -O0):
<limlin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x8(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
divsd  -0x18(%rbp),%xmm0
call   1030 <Fangle@plt>
movsd  -0x30(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x28(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<limlin>:
sub    $0x18,%rsp
movsd  %xmm3,0x10(%rsp)
movsd  %xmm2,0x8(%rsp)
subsd  %xmm1,%xmm0
xorpd  0xed4(%rip),%xmm0
divsd  %xmm2,%xmm0
call   1030 <Fangle@plt>
mulsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @limlin(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%9 = load double, double* %8
%10 = load double, double* %7
%11 = load double, double* %5
%12 = load double, double* %6
%13 = fsub double %11, %12
%14 = fneg double %13
%15 = load double, double* %7
%16 = fdiv double %14, %15
%17 = call double @Fangle(double %16)
%18 = fneg double %10
%19 = call double @llvm.fmuladd.f64(double %18, double %17, double %9)
ret double %19
}

LLVM IR (-O2):
define double @limlin(double %0, double %1, double %2, double %3) {
%5 = fsub double %0, %1
%6 = fneg double %5
%7 = fdiv double %6, %2
%8 = tail call double @Fangle(double %7)
%9 = fneg double %2
%10 = tail call double @llvm.fmuladd.f64(double %9, double %8, double %3)
ret double %10
}
/* Variables and functions */
int /*<<< orphan*/ uart_tx(char);
void uartputc(char c) { uart_tx(c); }


x86 assembly (clang, -O0):
<uartputc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <uart_tx@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uartputc>:
jmp    1030 <uart_tx@plt>

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

LLVM IR (-O2):
define void @uartputc(i8 signext %0) {
%2 = tail call i32 @uart_tx(i8 signext %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ RotMxMultiply(int *, int const *, int const *);
void RotateRotMx(int *RotMx, const int *RMx, const int *InvRMx) {
  int BufMx[9];
  RotMxMultiply(BufMx, RotMx, InvRMx);
  RotMxMultiply(RotMx, RMx, BufMx);
}


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

x86 assembly (clang, -O2):
<RotateRotMx>:
push   %r15
push   %r14
push   %rbx
sub    $0x30,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %rsp,%r15
mov    %r15,%rdi
mov    %rbx,%rsi
call   1030 <RotMxMultiply@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1030 <RotMxMultiply@plt>
add    $0x30,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @RotateRotMx(i32* %0, i32* %1, i32* %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca [9 x i32]
store i32* %0, i32** %4
store i32* %1, i32** %5
store i32* %2, i32** %6
%8 = getelementptr inbounds [9 x i32], [9 x i32]* %7, i64 0, i64 0
%9 = load i32*, i32** %4
%10 = load i32*, i32** %6
%11 = call i32 @RotMxMultiply(i32* %8, i32* %9, i32* %10)
%12 = load i32*, i32** %4
%13 = load i32*, i32** %5
%14 = getelementptr inbounds [9 x i32], [9 x i32]* %7, i64 0, i64 0
%15 = call i32 @RotMxMultiply(i32* %12, i32* %13, i32* %14)
ret void
}

LLVM IR (-O2):
define void @RotateRotMx(i32* %0, i32* %1, i32* %2) {
%4 = alloca [9 x i32]
%5 = bitcast [9 x i32]* %4 to i8*
%6 = getelementptr inbounds [9 x i32], [9 x i32]* %4, i64 0, i64 0
%7 = call i32 @RotMxMultiply(i32* %6, i32* %0, i32* %2)
%8 = call i32 @RotMxMultiply(i32* %0, i32* %1, i32* %6)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_spinlock_t;

/* Variables and functions */
int o_pthread_spin_trylock(int /*<<< orphan*/ *);
int pthread_spin_trylock(pthread_spinlock_t *spin) {
  return o_pthread_spin_trylock(spin);
}


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

x86 assembly (clang, -O2):
<pthread_spin_trylock>:
jmp    1030 <o_pthread_spin_trylock@plt>

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

LLVM IR (-O2):
define i32 @pthread_spin_trylock(i32* %0) {
%2 = tail call i32 @o_pthread_spin_trylock(i32* %0)
ret i32 %2
}
void ioinit_sim(void) {}


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

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

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

LLVM IR (-O2):
define void @ioinit_sim() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
void *malloc(size_t);
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, size_t);
int /*<<< orphan*/ stderr;
void *xmalloc(size_t sz) {
  void *m = malloc(sz);
  if (!m) {
    fputs("xcond_malloc\n", stderr);
    abort();
  }
  memset(m, 0, sz);
  return m;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1060 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1180 <xmalloc+0x40>
mov    0x2e75(%rip),%rax
mov    (%rax),%esi
lea    0xe8c(%rip),%rdi
call   1040 <fputs@plt>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rdx
xor    %esi,%esi
call   1050 <memset@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1060 <malloc@plt>
test   %rax,%rax
je     116c <xmalloc+0x2c>
mov    %rax,%rbx
mov    %rax,%rdi
xor    %esi,%esi
mov    %r14,%rdx
call   1050 <memset@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    0x2e6d(%rip),%rax
mov    (%rax),%esi
lea    0xe84(%rip),%rdi
call   1040 <fputs@plt>
xor    %eax,%eax
call   1030 <abort@plt>

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

LLVM IR (-O2):
@.str = [14 x i8] c"xcond_malloc\0A\00"
@stderr = global i32 0
define i8* @xmalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fputs(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = tail call i32 (...) @abort()
unreachable
8: ; preds = %1
%9 = tail call i32 @memset(i8* %2, i32 0, i64 %0)
ret i8* %2
}
void handle_PHONE(sig) int sig;
{}


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

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

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

LLVM IR (-O2):
define void @handle_PHONE(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ aaa();
int /*<<< orphan*/ printf(char *);
int main(void) {
  aaa();
  printf("frobnicating\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [13 x i8] c"frobnicating\00"
define i32 @main() {
%1 = tail call i32 (...) @aaa()
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ SXNETID;
typedef int /*<<< orphan*/ ASN1_VALUE;

/* Variables and functions */
scalar_t__ ASN1_item_d2i(int /*<<< orphan*/ **, unsigned char const **, long,
                         int /*<<< orphan*/ *);
int /*<<< orphan*/ SXNETID_it;
SXNETID *d2i_SXNETID(SXNETID **a, const unsigned char **in, long len) {
  return (SXNETID *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, &SXNETID_it);
}


x86 assembly (clang, -O0):
<d2i_SXNETID>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    0x2ea1(%rip),%rcx
call   1030 <ASN1_item_d2i@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<d2i_SXNETID>:
mov    0x2ec1(%rip),%rcx
jmp    1030 <ASN1_item_d2i@plt>

LLVM IR (-O0):
@SXNETID_it = global i32 0
define i32* @d2i_SXNETID(i32** %0, i8** %1, i64 %2) {
%4 = alloca i32**
%5 = alloca i8**
%6 = alloca i64
store i32** %0, i32*** %4
store i8** %1, i8*** %5
store i64 %2, i64* %6
%7 = load i32**, i32*** %4
%8 = load i8**, i8*** %5
%9 = load i64, i64* %6
%10 = call i64 @ASN1_item_d2i(i32** %7, i8** %8, i64 %9, i32* @SXNETID_it)
%11 = inttoptr i64 %10 to i32*
ret i32* %11
}

LLVM IR (-O2):
@SXNETID_it = global i32 0
define i32* @d2i_SXNETID(i32** %0, i8** %1, i64 %2) {
%4 = tail call i64 @ASN1_item_d2i(i32** %0, i8** %1, i64 %2, i32* @SXNETID_it)
%5 = inttoptr i64 %4 to i32*
ret i32* %5
}
int HelpItem95(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @HelpItem95() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void start(int sample_rate) {
  printf("i2s audio output started at Fs=%d Hz\n", sample_rate);
}


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

x86 assembly (clang, -O2):
<start>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [38 x i8] c"i2s audio output started at Fs=%d Hz\0A\00"
define void @start(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [38 x i8] c"i2s audio output started at Fs=%d Hz\0A\00"
define void @start(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}