xunge/DecIR huggingface dataset:
void free_ucmatrix(unsigned char **m, int nr) {
  int i;
  for (i = 0; i < nr; i++)
    free(m[i]);
  free(m);
}


x86 assembly (clang, -O0):
<free_ucmatrix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1151 <free_ucmatrix+0x41>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <free_ucmatrix+0x16>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_ucmatrix>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
test   %esi,%esi
jle    1142 <free_ucmatrix+0x32>
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <free_ucmatrix+0x20>
mov    %r14,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @free_ucmatrix(i8** nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %12
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %10, %6 ]
%8 = getelementptr inbounds i8*, i8** %0, i64 %7
%9 = load i8*, i8** %8
tail call void @free(i8* %9)
%10 = add nuw nsw i64 %7, 1
%11 = icmp eq i64 %10, %5
br i1 %11, label %12, label %6
12: ; preds = %6, %2
%13 = bitcast i8** %0 to i8*
tail call void @free(i8* %13)
ret void
}
void clean(double x[], int n) {
  int i;
  for (i = 0; i < n; i++)
    x[i] = 0;
}


x86 assembly (clang, -O0):
<clean>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    113c <clean+0x3c>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1112 <clean+0x12>
pop    %rbp
ret

x86 assembly (clang, -O2):
<clean>:
test   %esi,%esi
jle    1126 <clean+0x16>
push   %rax
mov    %esi,%edx
shl    $0x3,%rdx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define void @clean(double* nocapture writeonly %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = bitcast double* %0 to i8*
%6 = zext i32 %1 to i64
%7 = shl nuw nsw i64 %6, 3
br label %8
8: ; preds = %4, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ japi_playsoundfile(char *);
void j_playsoundfile(char *arg0) { japi_playsoundfile(arg0); }


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

x86 assembly (clang, -O2):
<j_playsoundfile>:
jmp    1030 <japi_playsoundfile@plt>

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

LLVM IR (-O2):
define void @j_playsoundfile(i8* %0) {
%2 = tail call i32 @japi_playsoundfile(i8* %0)
ret void
}
double dl_o2_func2(double d1, double d2) { return d1 * d2; }


x86 assembly (clang, -O0):
<dl_o2_func2>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<dl_o2_func2>:
mulsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @dl_o2_func2(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fmul double %5, %6
ret double %7
}

LLVM IR (-O2):
define double @dl_o2_func2(double %0, double %1) {
%3 = fmul double %0, %1
ret double %3
}
const char *bar() { return "bar"; }


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"bar\00"
define i8* @bar() {
ret i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0)
}
unsigned long hash1(unsigned char *str) {
  unsigned int hash = 0;
  int c;
  while (c = *str++)
    hash += c;
  return hash;
}


x86 assembly (clang, -O0):
<hash1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movzbl (%rax),%eax
mov    %eax,-0x10(%rbp)
cmp    $0x0,%eax
je     113b <hash1+0x3b>
mov    -0x10(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    110f <hash1+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash1>:
mov    (%rdi),%cl
xor    %eax,%eax
test   %cl,%cl
je     1122 <hash1+0x22>
add    $0x1,%rdi
nopl   0x0(%rax)
movzbl %cl,%ecx
add    %ecx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <hash1+0x10>
mov    %eax,%eax
ret

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

LLVM IR (-O2):
define i64 @hash1(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %15, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %11, %4 ], [ %2, %1 ]
%6 = phi i8* [ %9, %4 ], [ %0, %1 ]
%7 = phi i32 [ %10, %4 ], [ 0, %1 ]
%8 = zext i8 %5 to i32
%9 = getelementptr inbounds i8, i8* %6, i64 1
%10 = add i32 %7, %8
%11 = load i8, i8* %9
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %4
13: ; preds = %4
%14 = zext i32 %10 to i64
br label %15
15: ; preds = %13, %1
%16 = phi i64 [ 0, %1 ], [ %14, %13 ]
ret i64 %16
}
/* Variables and functions */
int /*<<< orphan*/ STDOUT_FILENO;
int /*<<< orphan*/ editorDrawRows();
int /*<<< orphan*/ write(int /*<<< orphan*/, char *, int);
void editorRefreshScreen() {
  write(STDOUT_FILENO, "\x1b[2J", 4);
  write(STDOUT_FILENO, "\x1b[H", 3);
  editorDrawRows();
  write(STDOUT_FILENO, "\x1b[H", 3);
}


x86 assembly (clang, -O0):
<editorRefreshScreen>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
mov    $0x4,%edx
call   1030 <write@plt>
mov    0x2eab(%rip),%rax
mov    (%rax),%edi
lea    0xeb7(%rip),%rsi
mov    $0x3,%edx
call   1030 <write@plt>
mov    $0x0,%al
call   1040 <editorDrawRows@plt>
mov    0x2e8a(%rip),%rax
mov    (%rax),%edi
lea    0xe96(%rip),%rsi
mov    $0x3,%edx
call   1030 <write@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<editorRefreshScreen>:
push   %r14
push   %rbx
push   %rax
mov    0x2ec5(%rip),%rbx
mov    (%rbx),%edi
lea    0xecc(%rip),%rsi
mov    $0x4,%edx
call   1030 <write@plt>
mov    (%rbx),%edi
lea    0xebe(%rip),%r14
mov    %r14,%rsi
mov    $0x3,%edx
call   1030 <write@plt>
xor    %eax,%eax
call   1040 <editorDrawRows@plt>
mov    (%rbx),%edi
mov    %r14,%rsi
mov    $0x3,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <write@plt>

LLVM IR (-O0):
@STDOUT_FILENO = global i32 0
@.str = [5 x i8] c"\1B[2J\00"
@.str.1 = [4 x i8] c"\1B[H\00"
define void @editorRefreshScreen() {
%1 = load i32, i32* @STDOUT_FILENO
%2 = call i32 @write(i32 %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 4)
%3 = load i32, i32* @STDOUT_FILENO
%4 = call i32 @write(i32 %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 3)
%5 = call i32 (...) @editorDrawRows()
%6 = load i32, i32* @STDOUT_FILENO
%7 = call i32 @write(i32 %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 3)
ret void
}

LLVM IR (-O2):
@STDOUT_FILENO = global i32 0
@.str = [5 x i8] c"\1B[2J\00"
@.str.1 = [4 x i8] c"\1B[H\00"
define void @editorRefreshScreen() {
%1 = load i32, i32* @STDOUT_FILENO
%2 = tail call i32 @write(i32 %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 4)
%3 = load i32, i32* @STDOUT_FILENO
%4 = tail call i32 @write(i32 %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 3)
%5 = tail call i32 (...) @editorDrawRows()
%6 = load i32, i32* @STDOUT_FILENO
%7 = tail call i32 @write(i32 %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ doit(void *);
int /*<<< orphan*/ sleep(int);
int main(void) {
  doit((void *)1024);
  sleep(60);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x400,%edi
call   1030 <doit@plt>
mov    $0x3c,%edi
call   1040 <sleep@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x400,%edi
call   1030 <doit@plt>
mov    $0x3c,%edi
call   1040 <sleep@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @doit(i8* inttoptr (i64 1024 to i8*))
%2 = call i32 @sleep(i32 60)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @doit(i8* inttoptr (i64 1024 to i8*))
%2 = tail call i32 @sleep(i32 60)
ret i32 0
}
/* Variables and functions */
void skip_packed_integer(const unsigned char *s, size_t *i) {
  while ((s[*i] & 0x80) != 0)
    (*i)++;
  (*i)++;
}


x86 assembly (clang, -O0):
<skip_packed_integer>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    (%rcx),%rcx
movzbl (%rax,%rcx,1),%eax
and    $0x80,%eax
cmp    $0x0,%eax
je     113c <skip_packed_integer+0x3c>
mov    -0x10(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
jmp    110c <skip_packed_integer+0xc>
mov    -0x10(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_packed_integer>:
mov    (%rsi),%rax
cmpb   $0x0,(%rdi,%rax,1)
js     1110 <skip_packed_integer+0x10>
mov    %rax,%rcx
jmp    1121 <skip_packed_integer+0x21>
xchg   %ax,%ax
lea    0x1(%rax),%rcx
mov    %rcx,(%rsi)
cmpb   $0x0,0x1(%rdi,%rax,1)
mov    %rcx,%rax
js     1110 <skip_packed_integer+0x10>
add    $0x1,%rcx
mov    %rcx,(%rsi)
ret

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

LLVM IR (-O2):
define void @skip_packed_integer(i8* nocapture %0, i64* nocapture %1) {
%3 = load i64, i64* %1
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp sgt i8 %5, -1
br i1 %6, label %13, label %7
7: ; preds = %2, %7
%8 = phi i64 [ %9, %7 ], [ %3, %2 ]
%9 = add i64 %8, 1
store i64 %9, i64* %1
%10 = getelementptr inbounds i8, i8* %0, i64 %9
%11 = load i8, i8* %10
%12 = icmp sgt i8 %11, -1
br i1 %12, label %13, label %7
13: ; preds = %7, %2
%14 = phi i64 [ %3, %2 ], [ %9, %7 ]
%15 = add i64 %14, 1
store i64 %15, i64* %1
ret void
}
void common_read_revolution(int drive) { return; }


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

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

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

LLVM IR (-O2):
define void @common_read_revolution(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ NoDepAFunction();
int /*<<< orphan*/ OneFunction();
int /*<<< orphan*/ TwoFunction();
void FourFunction() {
  static int count = 0;
  if (count == 0) {
    ++count;
    TwoFunction();
  }
  OneFunction();
  NoDepAFunction();
}


x86 assembly (clang, -O0):
<FourFunction>:
push   %rbp
mov    %rsp,%rbp
cmpl   $0x0,0x2f01(%rip)
jne    1157 <FourFunction+0x27>
mov    0x2ef5(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2eec(%rip)
mov    $0x0,%al
call   1050 <TwoFunction@plt>
mov    $0x0,%al
call   1030 <OneFunction@plt>
mov    $0x0,%al
call   1040 <NoDepAFunction@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<FourFunction>:
push   %rax
cmpb   $0x0,0x2f04(%rip)
jne    1148 <FourFunction+0x18>
movb   $0x1,0x2efb(%rip)
xor    %eax,%eax
call   1050 <TwoFunction@plt>
xor    %eax,%eax
call   1030 <OneFunction@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <NoDepAFunction@plt>

LLVM IR (-O0):
@FourFunction.count = internal global i32 0
define void @FourFunction() {
%1 = load i32, i32* @FourFunction.count
%2 = icmp eq i32 %1, 0
br i1 %2, label %3, label %7
3: ; preds = %0
%4 = load i32, i32* @FourFunction.count
%5 = add nsw i32 %4, 1
store i32 %5, i32* @FourFunction.count
%6 = call i32 (...) @TwoFunction()
br label %7
7: ; preds = %3, %0
%8 = call i32 (...) @OneFunction()
%9 = call i32 (...) @NoDepAFunction()
ret void
}

LLVM IR (-O2):
@FourFunction.count = internal unnamed_addr global i1 false
define void @FourFunction() {
%1 = load i1, i1* @FourFunction.count
br i1 %1, label %4, label %2
2: ; preds = %0
store i1 true, i1* @FourFunction.count
%3 = tail call i32 (...) @TwoFunction()
br label %4
4: ; preds = %2, %0
%5 = tail call i32 (...) @OneFunction()
%6 = tail call i32 (...) @NoDepAFunction()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ curs_set(int /*<<< orphan*/);
int /*<<< orphan*/ endwin();
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ init_colors();
int /*<<< orphan*/ initscr();
int /*<<< orphan*/ printf(char *);
void init_screen() {
  initscr();
  curs_set(0);
  if (!init_colors()) {
    endwin();
    printf(
        "Your terminal unfortunately does not support colors. What a shame.");
    exit(1);
  }
}


x86 assembly (clang, -O0):
<init_screen>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <initscr@plt>
xor    %edi,%edi
call   1080 <curs_set@plt>
mov    $0x0,%al
call   1070 <init_colors@plt>
cmp    $0x0,%eax
jne    119f <init_screen+0x3f>
mov    $0x0,%al
call   1050 <endwin@plt>
lea    0xe70(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1060 <exit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_screen>:
push   %rax
xor    %eax,%eax
call   1040 <initscr@plt>
xor    %edi,%edi
call   1080 <curs_set@plt>
xor    %eax,%eax
call   1070 <init_colors@plt>
test   %eax,%eax
je     117c <init_screen+0x1c>
pop    %rax
ret
xor    %eax,%eax
call   1050 <endwin@plt>
lea    0xe76(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [67 x i8] c"Your terminal unfortunately does not support colors. What a shame.\00"
define void @init_screen() {
%1 = call i32 (...) @initscr()
%2 = call i32 @curs_set(i32 0)
%3 = call i32 (...) @init_colors()
%4 = icmp ne i32 %3, 0
br i1 %4, label %9, label %5
5: ; preds = %0
%6 = call i32 (...) @endwin()
%7 = call i32 @printf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @exit(i32 1)
unreachable
9: ; preds = %0
ret void
}

LLVM IR (-O2):
@.str = [67 x i8] c"Your terminal unfortunately does not support colors. What a shame.\00"
define void @init_screen() {
%1 = tail call i32 (...) @initscr()
%2 = tail call i32 @curs_set(i32 0)
%3 = tail call i32 (...) @init_colors()
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %0
%6 = tail call i32 (...) @endwin()
%7 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([67 x i8], [67 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %0
ret void
}
OP(dd, d5) { op_d5(); }


x86 assembly (clang, -O0):
<OP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <op_d5@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @op_d5()
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ Cffempty();
extern void ftbdef_(void) {
  ;
  Cffempty();
  return;
}


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

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

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

LLVM IR (-O2):
define void @ftbdef_() {
%1 = tail call i32 (...) @Cffempty()
ret void
}
/* Type definitions */
struct navi_port {
  int dummy;
};

/* Variables and functions */
int navi_port_is_input_port(struct navi_port *);
int navi_extern_port_is_input_port(struct navi_port *p) {
  return navi_port_is_input_port(p);
}


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

x86 assembly (clang, -O2):
<navi_extern_port_is_input_port>:
jmp    1030 <navi_port_is_input_port@plt>

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

LLVM IR (-O2):
%struct.navi_port = type { i32 }
define i32 @navi_extern_port_is_input_port(%struct.navi_port* %0) {
%2 = tail call i32 @navi_port_is_input_port(%struct.navi_port* %0)
ret i32 %2
}
unsigned xrop3_219_1_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk1 = S ^ T;
  stk2 = D ^ S;
  stk1 = stk1 & stk2;
  stk1 = ~stk1;
  return (stk1 & (~S)) | (D & S);
}


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

x86 assembly (clang, -O2):
<xrop3_219_1_0>:
mov    %edi,%ecx
shl    $0x8,%ecx
or     %edi,%ecx
mov    %esi,%edx
shl    $0x8,%edx
or     %esi,%edx
xor    %ecx,%edx
mov    %ecx,%eax
xor    $0xff,%eax
and    %edx,%eax
or     %ecx,%eax
not    %eax
or     %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @xrop3_219_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = xor i32 %6, %4
%8 = xor i32 %4, 255
%9 = and i32 %7, %8
%10 = or i32 %9, %4
%11 = xor i32 %10, -1
%12 = or i32 %11, %3
ret i32 %12
}
const char *deviceI2cSlaveDebugGetName(void) { return "i2cSlaveDebug"; }


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

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

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

LLVM IR (-O2):
@.str = [14 x i8] c"i2cSlaveDebug\00"
define i8* @deviceI2cSlaveDebugGetName() {
ret i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
double gammacdf(double, double, double);
double chi2cdf(double x, double k) { return gammacdf(x, k / 2.0, 2.0); }


x86 assembly (clang, -O0):
<chi2cdf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  0xecc(%rip),%xmm2
divsd  %xmm2,%xmm1
movsd  0xec0(%rip),%xmm2
call   1030 <gammacdf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chi2cdf>:
mulsd  0xee8(%rip),%xmm1
movsd  0xee8(%rip),%xmm2
jmp    1030 <gammacdf@plt>

LLVM IR (-O0):
define double @chi2cdf(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fdiv double %6, 2.000000e+00
%8 = call double @gammacdf(double %5, double %7, double 2.000000e+00)
ret double %8
}

LLVM IR (-O2):
define double @chi2cdf(double %0, double %1) {
%3 = fmul double %1, 5.000000e-01
%4 = tail call double @gammacdf(double %0, double %3, double 2.000000e+00)
ret double %4
}
int codepoint_to_charindex(const unsigned int codepoint) {
  if (codepoint == 32) {
    return codepoint - 32;
  } else if (codepoint == 46) {
    return codepoint - 45;
  } else if ((codepoint >= 48) && (codepoint <= 57)) {
    return codepoint - 46;
  } else {
    return -1;
  }
}


x86 assembly (clang, -O0):
<codepoint_to_charindex>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x20,-0x8(%rbp)
jne    111f <codepoint_to_charindex+0x1f>
mov    -0x8(%rbp),%eax
sub    $0x20,%eax
mov    %eax,-0x4(%rbp)
jmp    1160 <codepoint_to_charindex+0x60>
cmpl   $0x2e,-0x8(%rbp)
jne    1137 <codepoint_to_charindex+0x37>
mov    -0x8(%rbp),%eax
sub    $0x2d,%eax
mov    %eax,-0x4(%rbp)
jmp    1160 <codepoint_to_charindex+0x60>
cmpl   $0x30,-0x8(%rbp)
jb     1159 <codepoint_to_charindex+0x59>
cmpl   $0x39,-0x8(%rbp)
ja     1159 <codepoint_to_charindex+0x59>
mov    -0x8(%rbp),%eax
sub    $0x2e,%eax
mov    %eax,-0x4(%rbp)
jmp    1160 <codepoint_to_charindex+0x60>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<codepoint_to_charindex>:
cmp    $0x20,%edi
je     1110 <codepoint_to_charindex+0x10>
cmp    $0x2e,%edi
jne    1113 <codepoint_to_charindex+0x13>
mov    $0x1,%eax
ret
xor    %eax,%eax
ret
lea    -0x30(%rdi),%eax
add    $0xffffffd2,%edi
cmp    $0xa,%eax
mov    $0xffffffff,%eax
cmovb  %edi,%eax
ret

LLVM IR (-O0):
define i32 @codepoint_to_charindex(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 32
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* %3
%8 = sub i32 %7, 32
store i32 %8, i32* %2
br label %25
9: ; preds = %1
%10 = load i32, i32* %3
%11 = icmp eq i32 %10, 46
br i1 %11, label %12, label %15
12: ; preds = %9
%13 = load i32, i32* %3
%14 = sub i32 %13, 45
store i32 %14, i32* %2
br label %25
15: ; preds = %9
%16 = load i32, i32* %3
%17 = icmp uge i32 %16, 48
br i1 %17, label %18, label %24
18: ; preds = %15
%19 = load i32, i32* %3
%20 = icmp ule i32 %19, 57
br i1 %20, label %21, label %24
21: ; preds = %18
%22 = load i32, i32* %3
%23 = sub i32 %22, 46
store i32 %23, i32* %2
br label %25
24: ; preds = %18, %15
store i32 -1, i32* %2
br label %25
25: ; preds = %24, %21, %12, %6
%26 = load i32, i32* %2
ret i32 %26
}

LLVM IR (-O2):
define i32 @codepoint_to_charindex(i32 %0) {
switch i32 %0, label %3 [
i32 32, label %8
i32 46, label %2
]
2: ; preds = %1
br label %8
3: ; preds = %1
%4 = add i32 %0, -48
%5 = icmp ult i32 %4, 10
%6 = add i32 %0, -46
%7 = select i1 %5, i32 %6, i32 -1
br label %8
8: ; preds = %3, %1, %2
%9 = phi i32 [ 1, %2 ], [ 0, %1 ], [ %7, %3 ]
ret i32 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ gid_t;

/* Variables and functions */
int /*<<< orphan*/ getgid();
int /*<<< orphan*/ setregid(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ system(char *);
int main(int argc, char **argv) {
  gid_t gidUser = getgid();
  setregid(gidUser, gidUser);
  system(argv[1]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <getgid@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x14(%rbp),%esi
call   1050 <setregid@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %rsi,%rbx
xor    %eax,%eax
call   1040 <getgid@plt>
mov    %eax,%edi
mov    %eax,%esi
call   1050 <setregid@plt>
mov    0x8(%rbx),%rdi
call   1030 <system@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 (...) @getgid()
store i32 %7, i32* %6
%8 = load i32, i32* %6
%9 = load i32, i32* %6
%10 = call i32 @setregid(i32 %8, i32 %9)
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 1
%13 = load i8*, i8** %12
%14 = call i32 @system(i8* %13)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = tail call i32 (...) @getgid()
%4 = tail call i32 @setregid(i32 %3, i32 %3)
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @system(i8* %6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ pushNarray(char *, unsigned int);
void pushcomplex8array(char *x, int n) {
  pushNarray((char *)x, (unsigned int)(n * 8));
}


x86 assembly (clang, -O0):
<pushcomplex8array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
shl    $0x3,%esi
call   1030 <pushNarray@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pushcomplex8array>:
shl    $0x3,%esi
jmp    1030 <pushNarray@plt>

LLVM IR (-O0):
define void @pushcomplex8array(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 = mul nsw i32 %6, 8
%8 = call i32 @pushNarray(i8* %5, i32 %7)
ret void
}

LLVM IR (-O2):
define void @pushcomplex8array(i8* %0, i32 %1) {
%3 = shl nsw i32 %1, 3
%4 = tail call i32 @pushNarray(i8* %0, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void DisplayView_printTeacherUpdateSubMenu() {
  printf("Update\n");
  printf("  1) Update Student Grade\n");
  printf("  2) Update Subjects\n");
  printf("  3) Exit\n");
}


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

x86 assembly (clang, -O2):
<DisplayView_printTeacherUpdateSubMenu>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xee3(%rip),%rdi
call   1030 <puts@plt>
lea    0xef1(%rip),%rdi
call   1030 <puts@plt>
lea    0xefa(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"Update\0A\00"
@.str.1 = [27 x i8] c" 1) Update Student Grade\0A\00"
@.str.2 = [22 x i8] c" 2) Update Subjects\0A\00"
@.str.3 = [11 x i8] c" 3) Exit\0A\00"
define void @DisplayView_printTeacherUpdateSubMenu() {
%1 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [7 x i8] c"Update\00"
@str.4 = [26 x i8] c" 1) Update Student Grade\00"
@str.5 = [21 x i8] c" 2) Update Subjects\00"
@str.6 = [10 x i8] c" 3) Exit\00"
define void @DisplayView_printTeacherUpdateSubMenu() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.4, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.5, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.6, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int uint8_t;
struct pci_dev {
  int dummy;
};

/* Variables and functions */
int pci_read_byte(struct pci_dev *, int);
int /*<<< orphan*/ rpci_write_byte(struct pci_dev *, int, int);
int enable_flash_sis85c496(struct pci_dev *dev, const char *name) {
  uint8_t tmp;
  tmp = pci_read_byte(dev, 0xd0);
  tmp |= 0xf8;
  rpci_write_byte(dev, 0xd0, tmp);
  return 0;
}


x86 assembly (clang, -O0):
<enable_flash_sis85c496>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0xd0,%esi
call   1030 <pci_read_byte@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
or     $0xf8,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%edx
mov    $0xd0,%esi
call   1040 <rpci_write_byte@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<enable_flash_sis85c496>:
push   %rbx
mov    %rdi,%rbx
mov    $0xd0,%esi
call   1030 <pci_read_byte@plt>
or     $0xf8,%eax
mov    %rbx,%rdi
mov    $0xd0,%esi
mov    %eax,%edx
call   1040 <rpci_write_byte@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.pci_dev = type { i32 }
define i32 @enable_flash_sis85c496(%struct.pci_dev* %0, i8* %1) {
%3 = alloca %struct.pci_dev*
%4 = alloca i8*
%5 = alloca i32
store %struct.pci_dev* %0, %struct.pci_dev** %3
store i8* %1, i8** %4
%6 = load %struct.pci_dev*, %struct.pci_dev** %3
%7 = call i32 @pci_read_byte(%struct.pci_dev* %6, i32 208)
store i32 %7, i32* %5
%8 = load i32, i32* %5
%9 = or i32 %8, 248
store i32 %9, i32* %5
%10 = load %struct.pci_dev*, %struct.pci_dev** %3
%11 = load i32, i32* %5
%12 = call i32 @rpci_write_byte(%struct.pci_dev* %10, i32 208, i32 %11)
ret i32 0
}

LLVM IR (-O2):
%struct.pci_dev = type { i32 }
define i32 @enable_flash_sis85c496(%struct.pci_dev* %0, i8* nocapture readnone %1) {
%3 = tail call i32 @pci_read_byte(%struct.pci_dev* %0, i32 208)
%4 = or i32 %3, 248
%5 = tail call i32 @rpci_write_byte(%struct.pci_dev* %0, i32 208, i32 %4)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ sd_hash_64(int /*<<< orphan*/);
uint64_t sd_hash_oid(uint64_t oid) { return sd_hash_64(oid); }


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

x86 assembly (clang, -O2):
<sd_hash_oid>:
jmp    1030 <sd_hash_64@plt>

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

LLVM IR (-O2):
define i32 @sd_hash_oid(i32 %0) {
%2 = tail call i32 @sd_hash_64(i32 %0)
ret i32 %2
}
unsigned int max(unsigned int x, unsigned int y) { return (x > y) ? x : y; }


x86 assembly (clang, -O0):
<max>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jbe    1121 <max+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <max+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<max>:
mov    %esi,%eax
cmp    %esi,%edi
cmova  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @max(i32 %0, i32 %1) {
%3 = icmp ugt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
int iwlist(void) {
  system("./iwlist"
         " "
         "wlan0 scanning"
         " > /tmp/tmpname");
}


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

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

LLVM IR (-O0):
@.str = [39 x i8] c"./iwlist wlan0 scanning > /tmp/tmpname\00"
define i32 @iwlist() {
%1 = alloca i32
%2 = call i32 @system(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@.str = [39 x i8] c"./iwlist wlan0 scanning > /tmp/tmpname\00"
define i32 @iwlist() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
unsigned char f31(unsigned char x, unsigned int y) {
  return (x >> (8 * sizeof(unsigned char) - y)) ^ (x << y);
}


x86 assembly (clang, -O0):
<f31>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
mov    -0x8(%rbp),%ecx
mov    %ecx,%edx
mov    $0x8,%ecx
sub    %rdx,%rcx
sar    %cl,%eax
movzbl -0x1(%rbp),%edx
mov    -0x8(%rbp),%ecx
shl    %cl,%edx
mov    %edx,%ecx
xor    %ecx,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f31>:
mov    $0x8,%cl
sub    %sil,%cl
mov    %edi,%eax
shr    %cl,%eax
mov    %esi,%ecx
shl    %cl,%edi
xor    %edi,%eax
ret

LLVM IR (-O0):
define zeroext i8 @f31(i8 zeroext %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 = zext i8 %5 to i32
%7 = load i32, i32* %4
%8 = zext i32 %7 to i64
%9 = sub i64 8, %8
%10 = trunc i64 %9 to i32
%11 = ashr i32 %6, %10
%12 = load i8, i8* %3
%13 = zext i8 %12 to i32
%14 = load i32, i32* %4
%15 = shl i32 %13, %14
%16 = xor i32 %11, %15
%17 = trunc i32 %16 to i8
ret i8 %17
}

LLVM IR (-O2):
define zeroext i8 @f31(i8 zeroext %0, i32 %1) {
%3 = zext i8 %0 to i32
%4 = sub i32 8, %1
%5 = lshr i32 %3, %4
%6 = shl i32 %3, %1
%7 = xor i32 %5, %6
%8 = trunc i32 %7 to i8
ret i8 %8
}
void __attribute__((always_, noreturn)) x86_hlt(void) {
  while (1) {
    asm volatile("cli");
    asm volatile("hlt");
  }
}


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

x86 assembly (clang, -O2):
<x86_hlt>:
cli
hlt
jmp    1100 <x86_hlt>

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

LLVM IR (-O2):
define void @x86_hlt() {
br label %1
1: ; preds = %0, %1
tail call void asm sideeffect "cli", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect "hlt", "~{dirflag},~{fpsr},~{flags}"()
br label %1
}
int allocate_checksum_pages(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @allocate_checksum_pages() {
ret i32 0
}
void motion_test3(int *data) {
  int i = 0;
  int k = data[2];
  int j = data[0];
  do
    i = 21 * j + i + 1;
  while (i < k);
  data[4] = i;
}


x86 assembly (clang, -O0):
<motion_test3>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
imul   $0x15,-0x14(%rbp),%eax
add    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jl     1122 <motion_test3+0x22>
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x10(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<motion_test3>:
mov    (%rdi),%ecx
mov    0x8(%rdi),%eax
lea    (%rcx,%rcx,4),%edx
lea    (%rcx,%rdx,4),%edx
add    $0x1,%edx
xor    %ecx,%ecx
add    %edx,%ecx
cmp    %eax,%ecx
jl     1110 <motion_test3+0x10>
mov    %ecx,0x10(%rdi)
ret

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

LLVM IR (-O2):
define void @motion_test3(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 2
%3 = load i32, i32* %2
%4 = load i32, i32* %0
%5 = mul nsw i32 %4, 21
%6 = add i32 %5, 1
br label %7
7: ; preds = %7, %1
%8 = phi i32 [ 0, %1 ], [ %9, %7 ]
%9 = add i32 %6, %8
%10 = icmp slt i32 %9, %3
br i1 %10, label %7, label %11
11: ; preds = %7
%12 = getelementptr inbounds i32, i32* %0, i64 4
store i32 %9, i32* %12
ret void
}
/* Variables and functions */
scalar_t__ isspace(unsigned char);
void skip_whitespace(const char **p) {
  while (isspace((unsigned char)**p))
    (*p)++;
}


x86 assembly (clang, -O0):
<skip_whitespace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movzbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
je     1148 <skip_whitespace+0x38>
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
jmp    111c <skip_whitespace+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_whitespace>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rax
movzbl (%rax),%edi
nopw   0x0(%rax,%rax,1)
call   1030 <isspace@plt>
test   %rax,%rax
je     113a <skip_whitespace+0x2a>
mov    (%rbx),%rax
lea    0x1(%rax),%rcx
mov    %rcx,(%rbx)
movzbl 0x1(%rax),%edi
jmp    1120 <skip_whitespace+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @skip_whitespace(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = load i8, i8* %2
%4 = tail call i64 @isspace(i8 zeroext %3)
%5 = icmp eq i64 %4, 0
br i1 %5, label %12, label %6
6: ; preds = %1, %6
%7 = load i8*, i8** %0
%8 = getelementptr inbounds i8, i8* %7, i64 1
store i8* %8, i8** %0
%9 = load i8, i8* %8
%10 = tail call i64 @isspace(i8 zeroext %9)
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %6
12: ; preds = %6, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  extern char *__progname;
  fprintf(stderr, "usage: %s <keyfile> <datafile>\n", __progname);
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
mov    0x2e9c(%rip),%rax
mov    (%rax),%rdx
lea    0xec2(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
mov    0x2e9f(%rip),%rax
mov    (%rax),%rdx
lea    0xec5(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [32 x i8] c"usage: %s <keyfile> <datafile>\0A\00"
@__progname = external global i8*
define void @usage() {
%1 = load i32, i32* @stderr
%2 = load i8*, i8** @__progname
%3 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [32 x i8] c"usage: %s <keyfile> <datafile>\0A\00"
@__progname = external global i8*
define void @usage() {
%1 = load i32, i32* @stderr
%2 = load i8*, i8** @__progname
%3 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;

/* Variables and functions */
bool jis_is_halfwidth(uint16_t jis) {
  uint8_t row = jis >> 8;
  return row == 0x29 || row == 0x2a;
}


x86 assembly (clang, -O0):
<jis_is_halfwidth>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x8,%eax
mov    %eax,-0x8(%rbp)
mov    $0x1,%al
cmpl   $0x29,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     1129 <jis_is_halfwidth+0x29>
cmpl   $0x2a,-0x8(%rbp)
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<jis_is_halfwidth>:
sar    $0x8,%edi
add    $0xffffffd7,%edi
xor    %eax,%eax
cmp    $0x2,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @jis_is_halfwidth(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = ashr i32 %4, 8
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp eq i32 %6, 41
br i1 %7, label %11, label %8
8: ; preds = %1
%9 = load i32, i32* %3
%10 = icmp eq i32 %9, 42
br label %11
11: ; preds = %8, %1
%12 = phi i1 [ true, %1 ], [ %10, %8 ]
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @jis_is_halfwidth(i32 %0) {
%2 = ashr i32 %0, 8
%3 = add nsw i32 %2, -41
%4 = icmp ult i32 %3, 2
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
double __builtin_wasm_max_f64(double, double);
scalar_t__ isnan(double);
double fmax(double x, double y) {
  if (isnan(x))
    return y;
  if (isnan(y))
    return x;
  return __builtin_wasm_max_f64(x, y);
}


x86 assembly (clang, -O0):
<fmax>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1040 <isnan@plt>
cmp    $0x0,%rax
je     1155 <fmax+0x35>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    118c <fmax+0x6c>
movsd  -0x18(%rbp),%xmm0
call   1040 <isnan@plt>
cmp    $0x0,%rax
je     1178 <fmax+0x58>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    118c <fmax+0x6c>
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
call   1030 <__builtin_wasm_max_f64@plt>
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fmax>:
sub    $0x18,%rsp
movsd  %xmm1,0x8(%rsp)
movsd  %xmm0,0x10(%rsp)
call   1040 <isnan@plt>
test   %rax,%rax
je     1145 <fmax+0x25>
movsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
ret
movsd  0x8(%rsp),%xmm0
call   1040 <isnan@plt>
test   %rax,%rax
je     1160 <fmax+0x40>
movsd  0x10(%rsp),%xmm0
add    $0x18,%rsp
ret
movsd  0x10(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
add    $0x18,%rsp
jmp    1030 <__builtin_wasm_max_f64@plt>

LLVM IR (-O0):
define double @fmax(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %4
store double %1, double* %5
%6 = load double, double* %4
%7 = call i64 @isnan(double %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load double, double* %5
store double %10, double* %3
br label %21
11: ; preds = %2
%12 = load double, double* %5
%13 = call i64 @isnan(double %12)
%14 = icmp ne i64 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %11
%16 = load double, double* %4
store double %16, double* %3
br label %21
17: ; preds = %11
%18 = load double, double* %4
%19 = load double, double* %5
%20 = call double @__builtin_wasm_max_f64(double %18, double %19)
store double %20, double* %3
br label %21
21: ; preds = %17, %15, %9
%22 = load double, double* %3
ret double %22
}

LLVM IR (-O2):
define double @fmax(double %0, double %1) {
%3 = tail call i64 @isnan(double %0)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %10
5: ; preds = %2
%6 = tail call i64 @isnan(double %1)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = tail call double @__builtin_wasm_max_f64(double %0, double %1)
br label %10
10: ; preds = %5, %2, %8
%11 = phi double [ %9, %8 ], [ %1, %2 ], [ %0, %5 ]
ret double %11
}