xunge/DecIR huggingface dataset:
unsigned char ntime(unsigned char n) {
  return (n << 1) ^ ((n & 0x80) ? 0x1b : 0x00);
}


x86 assembly (clang, -O0):
<ntime>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x1,%eax
movzbl -0x1(%rbp),%esi
and    $0x80,%esi
xor    %ecx,%ecx
mov    $0x1b,%edx
cmp    $0x0,%esi
cmovne %edx,%ecx
xor    %ecx,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ntime>:
lea    (%rdi,%rdi,1),%eax
sar    $0x7,%dil
and    $0x1b,%dil
xor    %dil,%al
ret

LLVM IR (-O0):
define zeroext i8 @ntime(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = shl i32 %4, 1
%6 = load i8, i8* %2
%7 = zext i8 %6 to i32
%8 = and i32 %7, 128
%9 = icmp ne i32 %8, 0
%10 = zext i1 %9 to i64
%11 = select i1 %9, i32 27, i32 0
%12 = xor i32 %5, %11
%13 = trunc i32 %12 to i8
ret i8 %13
}

LLVM IR (-O2):
define zeroext i8 @ntime(i8 zeroext %0) {
%2 = shl i8 %0, 1
%3 = icmp slt i8 %0, 0
%4 = select i1 %3, i8 27, i8 0
%5 = xor i8 %4, %2
ret i8 %5
}
/* Variables and functions */
int raptor_uri_uri_string_is_file_uri(unsigned char const *);
int raptor_uri_is_file_uri(const unsigned char *uri_string) {
  return raptor_uri_uri_string_is_file_uri(uri_string);
}


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

x86 assembly (clang, -O2):
<raptor_uri_is_file_uri>:
jmp    1030 <raptor_uri_uri_string_is_file_uri@plt>

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

LLVM IR (-O2):
define i32 @raptor_uri_is_file_uri(i8* %0) {
%2 = tail call i32 @raptor_uri_uri_string_is_file_uri(i8* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ TestM__Boot__booted();
void RealMainP__Boot__booted(void) { TestM__Boot__booted(); }


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

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

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

LLVM IR (-O2):
define void @RealMainP__Boot__booted() {
%1 = tail call i32 (...) @TestM__Boot__booted()
ret void
}
unsigned short safeAdd(unsigned short addend1, unsigned short addend2) {
  if ((0xFFFF - addend1) > addend2) {
    return addend1 + addend2;
  } else {
    return 0xFFFF;
  }
}


x86 assembly (clang, -O0):
<safeAdd>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x4(%rbp)
mov    %ax,-0x6(%rbp)
movzwl -0x4(%rbp),%ecx
mov    $0xffff,%eax
sub    %ecx,%eax
movzwl -0x6(%rbp),%ecx
cmp    %ecx,%eax
jle    113c <safeAdd+0x3c>
movzwl -0x4(%rbp),%eax
movzwl -0x6(%rbp),%ecx
add    %ecx,%eax
mov    %ax,-0x2(%rbp)
jmp    1142 <safeAdd+0x42>
movw   $0xffff,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<safeAdd>:
add    %si,%di
mov    $0xffff,%eax
cmovae %edi,%eax
ret

LLVM IR (-O0):
define zeroext i16 @safeAdd(i16 zeroext %0, i16 zeroext %1) {
%3 = alloca i16
%4 = alloca i16
%5 = alloca i16
store i16 %0, i16* %4
store i16 %1, i16* %5
%6 = load i16, i16* %4
%7 = zext i16 %6 to i32
%8 = sub nsw i32 65535, %7
%9 = load i16, i16* %5
%10 = zext i16 %9 to i32
%11 = icmp sgt i32 %8, %10
br i1 %11, label %12, label %19
12: ; preds = %2
%13 = load i16, i16* %4
%14 = zext i16 %13 to i32
%15 = load i16, i16* %5
%16 = zext i16 %15 to i32
%17 = add nsw i32 %14, %16
%18 = trunc i32 %17 to i16
store i16 %18, i16* %3
br label %20
19: ; preds = %2
store i16 -1, i16* %3
br label %20
20: ; preds = %19, %12
%21 = load i16, i16* %3
ret i16 %21
}

LLVM IR (-O2):
define zeroext i16 @safeAdd(i16 zeroext %0, i16 zeroext %1) {
%3 = tail call i16 @llvm.uadd.sat.i16(i16 %0, i16 %1)
ret i16 %3
}
/* Variables and functions */
int /*<<< orphan*/ gen(char *);
int /*<<< orphan*/ ngen(char *, char *, int);
void cgscale2by(int v) {
  gen("pushl\t%eax");
  ngen("%s\t$%d,%%eax", "movl", v);
  gen("mull\t%ecx");
  gen("movl\t%eax,%ecx");
  gen("popl\t%eax");
}


x86 assembly (clang, -O0):
<cgscale2by>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1040 <gen@plt>
mov    -0x4(%rbp),%edx
lea    0xeca(%rip),%rdi
lea    0xed0(%rip),%rsi
call   1030 <ngen@plt>
lea    0xec9(%rip),%rdi
call   1040 <gen@plt>
lea    0xec7(%rip),%rdi
call   1040 <gen@plt>
lea    0xeca(%rip),%rdi
call   1040 <gen@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cgscale2by>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
call   1040 <gen@plt>
lea    0xed5(%rip),%rdi
lea    0xedb(%rip),%rsi
mov    %ebx,%edx
call   1030 <ngen@plt>
lea    0xed2(%rip),%rdi
call   1040 <gen@plt>
lea    0xed0(%rip),%rdi
call   1040 <gen@plt>
lea    0xed3(%rip),%rdi
pop    %rbx
jmp    1040 <gen@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"pushl\09%eax\00"
@.str.1 = [13 x i8] c"%s\09$%d,%%eax\00"
@.str.2 = [5 x i8] c"movl\00"
@.str.3 = [10 x i8] c"mull\09%ecx\00"
@.str.4 = [15 x i8] c"movl\09%eax,%ecx\00"
@.str.5 = [10 x i8] c"popl\09%eax\00"
define void @cgscale2by(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @gen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* %2
%5 = call i32 @ngen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %4)
%6 = call i32 @gen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
%7 = call i32 @gen(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0))
%8 = call i32 @gen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"pushl\09%eax\00"
@.str.1 = [13 x i8] c"%s\09$%d,%%eax\00"
@.str.2 = [5 x i8] c"movl\00"
@.str.3 = [10 x i8] c"mull\09%ecx\00"
@.str.4 = [15 x i8] c"movl\09%eax,%ecx\00"
@.str.5 = [10 x i8] c"popl\09%eax\00"
define void @cgscale2by(i32 %0) {
%2 = tail call i32 @gen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @ngen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %0)
%4 = tail call i32 @gen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
%5 = tail call i32 @gen(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0))
%6 = tail call i32 @gen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ unlink(char const *);
void file_delete(const char *zFilename) { unlink(zFilename); }


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

x86 assembly (clang, -O2):
<file_delete>:
jmp    1030 <unlink@plt>

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

LLVM IR (-O2):
define void @file_delete(i8* nocapture %0) {
%2 = tail call i32 @unlink(i8* %0)
ret void
}
/* Variables and functions */
char *dialogNameOnly();
scalar_t__ isTerminalRunning();
scalar_t__ strlen(char const *);
scalar_t__ terminalName();
char const *dialogName() {
  char const *lDialogName;
  lDialogName = dialogNameOnly();
  if (strlen(lDialogName) && (isTerminalRunning() || terminalName())) {
    return lDialogName;
  } else {
    return NULL;
  }
}


x86 assembly (clang, -O0):
<dialogName>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <dialogNameOnly@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
cmp    $0x0,%rax
je     1195 <dialogName+0x55>
mov    $0x0,%al
call   1030 <isTerminalRunning@plt>
cmp    $0x0,%rax
jne    1188 <dialogName+0x48>
mov    $0x0,%al
call   1060 <terminalName@plt>
cmp    $0x0,%rax
je     1195 <dialogName+0x55>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    119d <dialogName+0x5d>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dialogName>:
push   %rbx
xor    %eax,%eax
call   1040 <dialogNameOnly@plt>
cmpb   $0x0,(%rax)
je     1158 <dialogName+0x28>
mov    %rax,%rbx
xor    %eax,%eax
call   1030 <isTerminalRunning@plt>
test   %rax,%rax
jne    115a <dialogName+0x2a>
xor    %eax,%eax
call   1050 <terminalName@plt>
test   %rax,%rax
jne    115a <dialogName+0x2a>
xor    %ebx,%ebx
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @dialogName() {
%1 = alloca i8*
%2 = alloca i8*
%3 = call i8* (...) @dialogNameOnly()
store i8* %3, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %15
7: ; preds = %0
%8 = call i64 (...) @isTerminalRunning()
%9 = icmp ne i64 %8, 0
br i1 %9, label %13, label %10
10: ; preds = %7
%11 = call i64 (...) @terminalName()
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %10, %7
%14 = load i8*, i8** %2
store i8* %14, i8** %1
br label %16
15: ; preds = %10, %0
store i8* null, i8** %1
br label %16
16: ; preds = %15, %13
%17 = load i8*, i8** %1
ret i8* %17
}

LLVM IR (-O2):
define i8* @dialogName() {
%1 = tail call i8* (...) @dialogNameOnly()
%2 = load i8, i8* %1
%3 = icmp eq i8 %2, 0
br i1 %3, label %10, label %4
4: ; preds = %0
%5 = tail call i64 (...) @isTerminalRunning()
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %4
%8 = tail call i64 (...) @terminalName()
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %7, %0
br label %11
11: ; preds = %4, %7, %10
%12 = phi i8* [ null, %10 ], [ %1, %7 ], [ %1, %4 ]
ret i8* %12
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fwrite(unsigned char *, int, int, int /*<<< orphan*/ *);
int write_midi_eot(FILE *fp) {
  unsigned char eot[] = {0xff, 0x2f, 0x00};
  return fwrite(eot, 1, 3, fp);
}


x86 assembly (clang, -O0):
<write_midi_eot>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0xedd(%rip),%ax
mov    %ax,-0xb(%rbp)
mov    0xed5(%rip),%al
mov    %al,-0x9(%rbp)
lea    -0xb(%rbp),%rdi
mov    -0x8(%rbp),%rcx
mov    $0x1,%esi
mov    $0x3,%edx
call   1030 <fwrite@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_midi_eot>:
push   %rax
mov    %rdi,%rcx
movb   $0x0,0x6(%rsp)
movw   $0x2fff,0x4(%rsp)
lea    0x4(%rsp),%rdi
mov    $0x1,%esi
mov    $0x3,%edx
call   1030 <fwrite@plt>
pop    %rcx
ret

LLVM IR (-O0):
@__const.write_midi_eot.eot = [3 x i8] c"\FF/\00"
define i32 @write_midi_eot(i32* %0) {
%2 = alloca i32*
%3 = alloca [3 x i8]
store i32* %0, i32** %2
%4 = bitcast [3 x i8]* %3 to i8*
%5 = getelementptr inbounds [3 x i8], [3 x i8]* %3, i64 0, i64 0
%6 = load i32*, i32** %2
%7 = call i32 @fwrite(i8* %5, i32 1, i32 3, i32* %6)
ret i32 %7
}

LLVM IR (-O2):
@__const.write_midi_eot.eot = [3 x i8] c"\FF/\00"
define i32 @write_midi_eot(i32* nocapture %0) {
%2 = alloca [3 x i8]
%3 = getelementptr inbounds [3 x i8], [3 x i8]* %2, i64 0, i64 0
%4 = call i32 @fwrite(i8* %3, i32 1, i32 3, i32* %0)
ret i32 %4
}
__attribute__((visibility("hidden"))) int is_stackable(const int symbology) {
  if (symbology < 55) {
    return 1;
  }
  switch (symbology) {
  case 60:
  case 69:
  case 72:
  case 75:
  case 77:
  case 86:
  case 87:
  case 89:
  case 129:
  case 74:
  case 110:
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<is_stackable>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x37,-0x8(%rbp)
jge    111d <is_stackable+0x1d>
movl   $0x1,-0x4(%rbp)
jmp    1159 <is_stackable+0x59>
mov    -0x8(%rbp),%eax
add    $0xffffffc4,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x45,%eax
ja     1152 <is_stackable+0x52>
mov    -0x10(%rbp),%rax
lea    0xec3(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x1,-0x4(%rbp)
jmp    1159 <is_stackable+0x59>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_stackable>:
mov    $0x1,%eax
cmp    $0x37,%edi
jl     1122 <is_stackable+0x22>
add    $0xffffffc4,%edi
cmp    $0x45,%edi
ja     1123 <is_stackable+0x23>
lea    0xee7(%rip),%rcx
movslq (%rcx,%rdi,4),%rdx
add    %rcx,%rdx
jmp    *%rdx
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define hidden i32 @is_stackable(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp slt i32 %4, 55
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 1, i32* %2
br label %11
7: ; preds = %1
%8 = load i32, i32* %3
switch i32 %8, label %10 [
i32 60, label %9
i32 69, label %9
i32 72, label %9
i32 75, label %9
i32 77, label %9
i32 86, label %9
i32 87, label %9
i32 89, label %9
i32 129, label %9
i32 74, label %9
i32 110, label %9
]
9: ; preds = %7, %7, %7, %7, %7, %7, %7, %7, %7, %7, %7
store i32 1, i32* %2
br label %11
10: ; preds = %7
store i32 0, i32* %2
br label %11
11: ; preds = %10, %9, %6
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define hidden i32 @is_stackable(i32 %0) {
%2 = icmp slt i32 %0, 55
br i1 %2, label %5, label %3
3: ; preds = %1
switch i32 %0, label %4 [
i32 60, label %5
i32 69, label %5
i32 72, label %5
i32 75, label %5
i32 77, label %5
i32 86, label %5
i32 87, label %5
i32 89, label %5
i32 129, label %5
i32 74, label %5
i32 110, label %5
]
4: ; preds = %3
br label %5
5: ; preds = %3, %3, %3, %3, %3, %3, %3, %3, %3, %3, %3, %1, %4
%6 = phi i32 [ 0, %4 ], [ 1, %1 ], [ 1, %3 ], [ 1, %3 ], [ 1, %3 ], [ 1, %3 ], [ 1, %3 ], [ 1, %3 ], [ 1, %3 ], [ 1, %3 ], [ 1, %3 ], [ 1, %3 ], [ 1, %3 ]
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
void cpy4(void *a, const void *b) { *(uint32_t *)a = *(uint32_t *)b; }


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

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

LLVM IR (-O0):
define void @cpy4(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 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = load i8*, i8** %3
%9 = bitcast i8* %8 to i32*
store i32 %7, i32* %9
ret void
}

LLVM IR (-O2):
define void @cpy4(i8* nocapture writeonly %0, i8* nocapture %1) {
%3 = bitcast i8* %1 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %0 to i32*
store i32 %4, i32* %5
ret void
}
long int longint_ignoring_longlong(long int x, long long y) { return x; }


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

x86 assembly (clang, -O2):
<longint_ignoring_longlong>:
mov    %rdi,%rax
ret

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

LLVM IR (-O2):
define i64 @longint_ignoring_longlong(i64 returned %0, i64 %1) {
ret i64 %0
}
void set_u32(void *vd, unsigned int v) {
  unsigned char *d = (unsigned char *)vd;
  d[0] = v >> 24;
  d[1] = v >> 16;
  d[2] = v >> 8;
  d[3] = v >> 0;
}


x86 assembly (clang, -O0):
<set_u32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
shr    $0x18,%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
mov    -0xc(%rbp),%eax
shr    $0x10,%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0xc(%rbp),%eax
shr    $0x8,%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0xc(%rbp),%eax
shr    $0x0,%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x3(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_u32>:
bswap  %esi
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
define void @set_u32(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
store i8* %6, i8** %5
%7 = load i32, i32* %4
%8 = lshr i32 %7, 24
%9 = trunc i32 %8 to i8
%10 = load i8*, i8** %5
%11 = getelementptr inbounds i8, i8* %10, i64 0
store i8 %9, i8* %11
%12 = load i32, i32* %4
%13 = lshr i32 %12, 16
%14 = trunc i32 %13 to i8
%15 = load i8*, i8** %5
%16 = getelementptr inbounds i8, i8* %15, i64 1
store i8 %14, i8* %16
%17 = load i32, i32* %4
%18 = lshr i32 %17, 8
%19 = trunc i32 %18 to i8
%20 = load i8*, i8** %5
%21 = getelementptr inbounds i8, i8* %20, i64 2
store i8 %19, i8* %21
%22 = load i32, i32* %4
%23 = lshr i32 %22, 0
%24 = trunc i32 %23 to i8
%25 = load i8*, i8** %5
%26 = getelementptr inbounds i8, i8* %25, i64 3
store i8 %24, i8* %26
ret void
}

LLVM IR (-O2):
define void @set_u32(i8* nocapture writeonly %0, i32 %1) {
%3 = lshr i32 %1, 24
%4 = trunc i32 %3 to i8
store i8 %4, i8* %0
%5 = lshr i32 %1, 16
%6 = trunc i32 %5 to i8
%7 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %6, i8* %7
%8 = lshr i32 %1, 8
%9 = trunc i32 %8 to i8
%10 = getelementptr inbounds i8, i8* %0, i64 2
store i8 %9, i8* %10
%11 = trunc i32 %1 to i8
%12 = getelementptr inbounds i8, i8* %0, i64 3
store i8 %11, i8* %12
ret void
}
int get_world_height(void) { return 20; }


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

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

LLVM IR (-O0):
define i32 @get_world_height() {
ret i32 20
}

LLVM IR (-O2):
define i32 @get_world_height() {
ret i32 20
}
void foo388() {}


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

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

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

LLVM IR (-O2):
define void @foo388() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ds_set_int(int /*<<< orphan*/, int /*<<< orphan*/, int);
void snmp_set_mib_warnings(int warn) { ds_set_int(0, 0, warn); }


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

x86 assembly (clang, -O2):
<snmp_set_mib_warnings>:
mov    %edi,%edx
xor    %edi,%edi
xor    %esi,%esi
jmp    1030 <ds_set_int@plt>

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

LLVM IR (-O2):
define void @snmp_set_mib_warnings(i32 %0) {
%2 = tail call i32 @ds_set_int(i32 0, i32 0, i32 %0)
ret void
}
/* Variables and functions */
scalar_t__ bswap_32(unsigned long long);
unsigned long long bswap_64(unsigned long long val) {
  return ((((unsigned long long)bswap_32(val)) << 32) |
          (((unsigned long long)bswap_32(val >> 32)) & 0xffffffffULL));
}


x86 assembly (clang, -O0):
<bswap_64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <bswap_32@plt>
shl    $0x20,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
shr    $0x20,%rdi
call   1030 <bswap_32@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
movabs $0xffffffff,%rdx
and    %rdx,%rcx
or     %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bswap_64>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <bswap_32@plt>
mov    %rax,%r14
shl    $0x20,%r14
shr    $0x20,%rbx
mov    %rbx,%rdi
call   1030 <bswap_32@plt>
mov    %eax,%eax
or     %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i64 @bswap_64(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i64 @bswap_32(i64 %3)
%5 = shl i64 %4, 32
%6 = load i64, i64* %2
%7 = lshr i64 %6, 32
%8 = call i64 @bswap_32(i64 %7)
%9 = and i64 %8, 4294967295
%10 = or i64 %5, %9
ret i64 %10
}

LLVM IR (-O2):
define i64 @bswap_64(i64 %0) {
%2 = tail call i64 @bswap_32(i64 %0)
%3 = shl i64 %2, 32
%4 = lshr i64 %0, 32
%5 = tail call i64 @bswap_32(i64 %4)
%6 = and i64 %5, 4294967295
%7 = or i64 %6, %3
ret i64 %7
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void test1(int a, long long value, int after) {
  if (a != 1 || value != 0x123456789abcdefLL || after != 0x55)
    abort();
}


x86 assembly (clang, -O0):
<test1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
cmpl   $0x1,-0x4(%rbp)
jne    114a <test1+0x3a>
movabs $0x123456789abcdef,%rax
45 23 01
cmp    %rax,-0x10(%rbp)
jne    114a <test1+0x3a>
cmpl   $0x55,-0x14(%rbp)
je     1151 <test1+0x41>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test1>:
cmp    $0x1,%edi
jne    112a <test1+0x1a>
movabs $0x123456789abcdef,%rax
45 23 01
cmp    %rax,%rsi
jne    112a <test1+0x1a>
cmp    $0x55,%edx
jne    112a <test1+0x1a>
ret
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @test1(i32 %0, i64 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i64
%6 = alloca i32
store i32 %0, i32* %4
store i64 %1, i64* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = icmp ne i32 %7, 1
br i1 %8, label %15, label %9
9: ; preds = %3
%10 = load i64, i64* %5
%11 = icmp ne i64 %10, 81985529216486895
br i1 %11, label %15, label %12
12: ; preds = %9
%13 = load i32, i32* %6
%14 = icmp ne i32 %13, 85
br i1 %14, label %15, label %17
15: ; preds = %12, %9, %3
%16 = call i32 (...) @abort()
unreachable
17: ; preds = %12
ret void
}

LLVM IR (-O2):
define void @test1(i32 %0, i64 %1, i32 %2) {
%4 = icmp ne i32 %0, 1
%5 = icmp ne i64 %1, 81985529216486895
%6 = or i1 %4, %5
%7 = icmp ne i32 %2, 85
%8 = or i1 %6, %7
br i1 %8, label %9, label %11
9: ; preds = %3
%10 = tail call i32 (...) @abort()
unreachable
11: ; preds = %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  printf("Welcome to Telegrimgramgrom\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [28 x i8] c"Welcome to Telegrimgramgrom\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str, i64 0, i64 0))
ret i32 0
}
int is_identifier(char *s) {
  return ((*s >= 'a' && *s <= 'z') || (*s >= 'A' && *s <= 'Z') ||
          (*s >= '0' && *s <= '9') || *s == '_');
}


x86 assembly (clang, -O0):
<is_identifier>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x61,%eax
jl     112d <is_identifier+0x2d>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x7a,%ecx
mov    %al,-0x9(%rbp)
jle    1187 <is_identifier+0x87>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x41,%eax
jl     1152 <is_identifier+0x52>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x5a,%ecx
mov    %al,-0x9(%rbp)
jle    1187 <is_identifier+0x87>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x30,%eax
jl     1177 <is_identifier+0x77>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x39,%ecx
mov    %al,-0x9(%rbp)
jle    1187 <is_identifier+0x87>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5f,%eax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_identifier>:
mov    (%rdi),%al
mov    %eax,%ecx
and    $0xdf,%cl
add    $0xbf,%cl
cmp    $0x1a,%cl
setb   %cl
lea    -0x30(%rax),%edx
cmp    $0xa,%dl
setb   %dl
cmp    $0x5f,%al
sete   %al
or     %dl,%al
or     %cl,%al
movzbl %al,%eax
ret

LLVM IR (-O0):
define i32 @is_identifier(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 97
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = icmp sle i32 %10, 122
br i1 %11, label %37, label %12
12: ; preds = %7, %1
%13 = load i8*, i8** %2
%14 = load i8, i8* %13
%15 = sext i8 %14 to i32
%16 = icmp sge i32 %15, 65
br i1 %16, label %17, label %22
17: ; preds = %12
%18 = load i8*, i8** %2
%19 = load i8, i8* %18
%20 = sext i8 %19 to i32
%21 = icmp sle i32 %20, 90
br i1 %21, label %37, label %22
22: ; preds = %17, %12
%23 = load i8*, i8** %2
%24 = load i8, i8* %23
%25 = sext i8 %24 to i32
%26 = icmp sge i32 %25, 48
br i1 %26, label %27, label %32
27: ; preds = %22
%28 = load i8*, i8** %2
%29 = load i8, i8* %28
%30 = sext i8 %29 to i32
%31 = icmp sle i32 %30, 57
br i1 %31, label %37, label %32
32: ; preds = %27, %22
%33 = load i8*, i8** %2
%34 = load i8, i8* %33
%35 = sext i8 %34 to i32
%36 = icmp eq i32 %35, 95
br label %37
37: ; preds = %32, %27, %17, %7
%38 = phi i1 [ true, %27 ], [ true, %17 ], [ true, %7 ], [ %36, %32 ]
%39 = zext i1 %38 to i32
ret i32 %39
}

LLVM IR (-O2):
define i32 @is_identifier(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -33
%4 = add i8 %3, -65
%5 = icmp ult i8 %4, 26
%6 = add i8 %2, -48
%7 = icmp ult i8 %6, 10
%8 = select i1 %5, i1 true, i1 %7
%9 = icmp eq i8 %2, 95
%10 = select i1 %8, i1 true, i1 %9
%11 = zext i1 %10 to i32
ret i32 %11
}
int main() {
  void (*b)(int arg, const char *format, ...) __attribute__((__sentinel__));
  void (*z)(int arg, const char *format, ...) __attribute__((__sentinel__(2)));
  void (*y)(int arg, const char *format, ...) __attribute__((__sentinel__(5)));
  b(1, "%s", (void *)0);
  b(1, "%s", 0);
  z(1, "%s", 4, 1, 0);
  z(1, "%s", (void *)0, 1, 0);
  y(1, "%s", 1, 2, 3, 4, 5, 6, 7);
  y(1, "%s", (void *)0, 3, 4, 5, 6, 7);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    $0x1,%edi
lea    0xeec(%rip),%rsi
xor    %eax,%eax
mov    %eax,%edx
mov    $0x0,%al
call   *-0x8(%rbp)
mov    $0x1,%edi
lea    0xed7(%rip),%rsi
xor    %edx,%edx
mov    $0x0,%al
call   *-0x8(%rbp)
mov    $0x1,%ecx
lea    0xec4(%rip),%rsi
mov    $0x4,%edx
xor    %r8d,%r8d
mov    %ecx,%edi
mov    $0x0,%al
call   *-0x10(%rbp)
mov    $0x1,%ecx
lea    0xea9(%rip),%rsi
xor    %eax,%eax
mov    %eax,%edx
xor    %r8d,%r8d
mov    %ecx,%edi
mov    $0x0,%al
call   *-0x10(%rbp)
mov    $0x1,%edx
lea    0xe8f(%rip),%rsi
mov    $0x2,%ecx
mov    $0x3,%r8d
mov    $0x4,%r9d
mov    %edx,%edi
movl   $0x5,(%rsp)
movl   $0x6,0x8(%rsp)
movl   $0x7,0x10(%rsp)
mov    $0x0,%al
call   *-0x18(%rbp)
mov    $0x1,%edi
lea    0xe54(%rip),%rsi
xor    %eax,%eax
mov    %eax,%edx
mov    $0x3,%ecx
mov    $0x4,%r8d
mov    $0x5,%r9d
movl   $0x6,(%rsp)
movl   $0x7,0x8(%rsp)
mov    $0x0,%al
call   *-0x18(%rbp)
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca void (i32, i8*, ...)*
%2 = alloca void (i32, i8*, ...)*
%3 = alloca void (i32, i8*, ...)*
%4 = load void (i32, i8*, ...)*, void (i32, i8*, ...)** %1
%5 = load void (i32, i8*, ...)*, void (i32, i8*, ...)** %1
%6 = load void (i32, i8*, ...)*, void (i32, i8*, ...)** %2
%7 = load void (i32, i8*, ...)*, void (i32, i8*, ...)** %2
%8 = load void (i32, i8*, ...)*, void (i32, i8*, ...)** %3
%9 = load void (i32, i8*, ...)*, void (i32, i8*, ...)** %3
ret i32 0
}

LLVM IR (-O2):
/* Type definitions */
struct __test_metadata {
  int dummy;
};
struct __fixture_variant_metadata {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ epoll47(struct __test_metadata *);
void wrapper_epoll47(struct __test_metadata *_metadata,
                     struct __fixture_variant_metadata *variant) {
  epoll47(_metadata);
}


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

x86 assembly (clang, -O2):
<wrapper_epoll47>:
jmp    1030 <epoll47@plt>

LLVM IR (-O0):
%struct.__test_metadata = type { i32 }
%struct.__fixture_variant_metadata = type { i32 }
define void @wrapper_epoll47(%struct.__test_metadata* %0, %struct.__fixture_variant_metadata* %1) {
%3 = alloca %struct.__test_metadata*
%4 = alloca %struct.__fixture_variant_metadata*
store %struct.__test_metadata* %0, %struct.__test_metadata** %3
store %struct.__fixture_variant_metadata* %1, %struct.__fixture_variant_metadata** %4
%5 = load %struct.__test_metadata*, %struct.__test_metadata** %3
%6 = call i32 @epoll47(%struct.__test_metadata* %5)
ret void
}

LLVM IR (-O2):
%struct.__test_metadata = type { i32 }
%struct.__fixture_variant_metadata = type { i32 }
define void @wrapper_epoll47(%struct.__test_metadata* %0, %struct.__fixture_variant_metadata* nocapture readnone %1) {
%3 = tail call i32 @epoll47(%struct.__test_metadata* %0)
ret void
}
/* Variables and functions */
char *get_heading_string(char *, char *);
int /*<<< orphan*/ sprintf(char *, char *, char *, char *);
char *get_heading_sys_string(char *output_filename, char *application_name,
                             char *datatype) {
  static char sys_string[1024];
  sprintf(sys_string, "echo \"#%s\" >> %s",
          get_heading_string(application_name, datatype), output_filename);
  return sys_string;
}


x86 assembly (clang, -O0):
<get_heading_sys_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <get_heading_string@plt>
mov    %rax,%rdx
mov    -0x8(%rbp),%rcx
lea    0x2ef1(%rip),%rdi
lea    0xeaa(%rip),%rsi
call   1040 <sprintf@plt>
lea    0x2ede(%rip),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_heading_sys_string>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    %rsi,%rdi
mov    %rdx,%rsi
call   1030 <get_heading_string@plt>
lea    0x2f07(%rip),%r14
lea    0xec0(%rip),%rsi
mov    %r14,%rdi
mov    %rax,%rdx
mov    %rbx,%rcx
call   1040 <sprintf@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@get_heading_sys_string.sys_string = internal global [1024 x i8] zeroinitializer
@.str = [17 x i8] c"echo \22#%s\22 >> %s\00"
define i8* @get_heading_sys_string(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %5
%8 = load i8*, i8** %6
%9 = call i8* @get_heading_string(i8* %7, i8* %8)
%10 = load i8*, i8** %4
%11 = call i32 @sprintf(i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @get_heading_sys_string.sys_string, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %9, i8* %10)
ret i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @get_heading_sys_string.sys_string, i64 0, i64 0)
}

LLVM IR (-O2):
@get_heading_sys_string.sys_string = internal global [1024 x i8] zeroinitializer
@.str = [17 x i8] c"echo \22#%s\22 >> %s\00"
define i8* @get_heading_sys_string(i8* %0, i8* %1, i8* %2) {
%4 = tail call i8* @get_heading_string(i8* %1, i8* %2)
%5 = tail call i32 @sprintf(i8* dereferenceable(1) getelementptr inbounds ([1024 x i8], [1024 x i8]* @get_heading_sys_string.sys_string, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %4, i8* %0)
ret i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @get_heading_sys_string.sys_string, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ clear_io_bit(int, int);
void TOSH_MAKE_CC_VREN_INPUT() { clear_io_bit(-6, 4); }


x86 assembly (clang, -O0):
<TOSH_MAKE_CC_VREN_INPUT>:
push   %rbp
mov    %rsp,%rbp
mov    $0xfffffffa,%edi
mov    $0x4,%esi
call   1030 <clear_io_bit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<TOSH_MAKE_CC_VREN_INPUT>:
mov    $0xfffffffa,%edi
mov    $0x4,%esi
jmp    1030 <clear_io_bit@plt>

LLVM IR (-O0):
define void @TOSH_MAKE_CC_VREN_INPUT() {
%1 = call i32 @clear_io_bit(i32 -6, i32 4)
ret void
}

LLVM IR (-O2):
define void @TOSH_MAKE_CC_VREN_INPUT() {
%1 = tail call i32 @clear_io_bit(i32 -6, i32 4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ASPI_Init();
int /*<<< orphan*/ FILE_Init();
int Init_CD_Driver(void) {
  ASPI_Init();
  FILE_Init();
  return 0;
}


x86 assembly (clang, -O0):
<Init_CD_Driver>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <ASPI_Init@plt>
mov    $0x0,%al
call   1030 <FILE_Init@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Init_CD_Driver>:
push   %rax
xor    %eax,%eax
call   1040 <ASPI_Init@plt>
xor    %eax,%eax
call   1030 <FILE_Init@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @Init_CD_Driver() {
%1 = call i32 (...) @ASPI_Init()
%2 = call i32 (...) @FILE_Init()
ret i32 0
}

LLVM IR (-O2):
define i32 @Init_CD_Driver() {
%1 = tail call i32 (...) @ASPI_Init()
%2 = tail call i32 (...) @FILE_Init()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ write_instr(int);
void eval_bit_or(void) { write_instr(0x21); }


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

x86 assembly (clang, -O2):
<eval_bit_or>:
mov    $0x21,%edi
jmp    1030 <write_instr@plt>

LLVM IR (-O0):
define void @eval_bit_or() {
%1 = call i32 @write_instr(i32 33)
ret void
}

LLVM IR (-O2):
define void @eval_bit_or() {
%1 = tail call i32 @write_instr(i32 33)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Inst_Printf(char *, char *, char *);
void Jump_If_Equal(char *label) {
  Inst_Printf("beq",
              "cr"
              "1"
              ","
              "_"
              "%s",
              label);
}


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"beq\00"
@.str.1 = [8 x i8] c"cr1,_%s\00"
define void @Jump_If_Equal(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @Inst_Printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"beq\00"
@.str.1 = [8 x i8] c"cr1,_%s\00"
define void @Jump_If_Equal(i8* %0) {
%2 = tail call i32 @Inst_Printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int atoi(char *);
char *getenv(char *);
int sysconf(int numProcessors) {
  char *envsys = getenv("NUMBER_OF_PROCESSORS");
  if (envsys) {
    numProcessors = atoi(envsys);
  }
  return numProcessors;
}


x86 assembly (clang, -O0):
<sysconf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1152 <sysconf+0x32>
mov    -0x10(%rbp),%rdi
call   1040 <atoi@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sysconf>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
call   1030 <getenv@plt>
test   %rax,%rax
je     113d <sysconf+0x1d>
mov    %rax,%rdi
pop    %rbx
jmp    1040 <atoi@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"NUMBER_OF_PROCESSORS\00"
define i32 @sysconf(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = call i8* @getenv(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
store i8* %4, i8** %3
%5 = load i8*, i8** %3
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i8*, i8** %3
%9 = call i32 @atoi(i8* %8)
store i32 %9, i32* %2
br label %10
10: ; preds = %7, %1
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
@.str = [21 x i8] c"NUMBER_OF_PROCESSORS\00"
define i32 @sysconf(i32 %0) {
%2 = tail call i8* @getenv(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i8* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @atoi(i8* %2)
br label %6
6: ; preds = %4, %1
%7 = phi i32 [ %5, %4 ], [ %0, %1 ]
ret i32 %7
}
double MB(double vi, double m, double T) {
  double K = 1.3806504e-23;
  double Fmb;
  Fmb = sqrt(m / (2 * K * T)) * exp(-m * (vi) * (vi) / (2 * K * T));
  return Fmb;
}


x86 assembly (clang, -O0):
<MB>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  0xec9(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xeaf(%rip),%xmm1
mulsd  -0x20(%rbp),%xmm1
mulsd  -0x18(%rbp),%xmm1
divsd  %xmm1,%xmm0
call   1040 <sqrt@plt>
movsd  %xmm0,-0x30(%rbp)
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  0xe69(%rip),%xmm1
mulsd  -0x20(%rbp),%xmm1
mulsd  -0x18(%rbp),%xmm1
divsd  %xmm1,%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MB>:
sub    $0x38,%rsp
movapd %xmm1,%xmm3
movapd %xmm0,%xmm4
mulsd  0xecc(%rip),%xmm2
movapd %xmm1,%xmm0
divsd  %xmm2,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     114c <MB+0x2c>
sqrtsd %xmm0,%xmm0
jmp    1175 <MB+0x55>
movapd %xmm3,0x20(%rsp)
movsd  %xmm2,0x18(%rsp)
movsd  %xmm4,0x10(%rsp)
call   1040 <sqrt@plt>
movsd  0x10(%rsp),%xmm4
movsd  0x18(%rsp),%xmm2
movapd 0x20(%rsp),%xmm3
movsd  %xmm0,0x8(%rsp)
xorpd  0xe8d(%rip),%xmm3
mulsd  %xmm4,%xmm3
mulsd  %xmm4,%xmm3
divsd  %xmm2,%xmm3
movapd %xmm3,%xmm0
call   1030 <exp@plt>
mulsd  0x8(%rsp),%xmm0
add    $0x38,%rsp
ret

LLVM IR (-O0):
define double @MB(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
store double 0x3B30B0E7F1528C6D, double* %7
%9 = load double, double* %5
%10 = load double, double* %7
%11 = fmul double 2.000000e+00, %10
%12 = load double, double* %6
%13 = fmul double %11, %12
%14 = fdiv double %9, %13
%15 = call double @sqrt(double %14)
%16 = load double, double* %5
%17 = fneg double %16
%18 = load double, double* %4
%19 = fmul double %17, %18
%20 = load double, double* %4
%21 = fmul double %19, %20
%22 = load double, double* %7
%23 = fmul double 2.000000e+00, %22
%24 = load double, double* %6
%25 = fmul double %23, %24
%26 = fdiv double %21, %25
%27 = call double @exp(double %26)
%28 = fmul double %15, %27
store double %28, double* %8
%29 = load double, double* %8
ret double %29
}

LLVM IR (-O2):
define double @MB(double %0, double %1, double %2) {
%4 = fmul double %2, 0x3B40B0E7F1528C6D
%5 = fdiv double %1, %4
%6 = tail call double @sqrt(double %5)
%7 = fneg double %1
%8 = fmul double %7, %0
%9 = fmul double %8, %0
%10 = fdiv double %9, %4
%11 = tail call double @exp(double %10)
%12 = fmul double %6, %11
ret double %12
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, void *, size_t);
void mmio_readn(void *addr, uint8_t *buf, size_t len) {
  memcpy(buf, addr, len);
  return;
}


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

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

LLVM IR (-O0):
define void @mmio_readn(i8* %0, i32* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i64
store i8* %0, i8** %4
store i32* %1, i32** %5
store i64 %2, i64* %6
%7 = load i32*, i32** %5
%8 = load i8*, i8** %4
%9 = load i64, i64* %6
%10 = call i32 @memcpy(i32* %7, i8* %8, i64 %9)
ret void
}

LLVM IR (-O2):
define void @mmio_readn(i8* %0, i32* %1, i64 %2) {
%4 = tail call i32 @memcpy(i32* %1, i8* %0, i64 %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ header;

/* Variables and functions */
int /*<<< orphan*/ kannotate_write(char const *, int);
int strlen(char const *);
void gator_annotate_channel(int channel, const char *str) {
  int str_size = strlen(str) & 0xffff;
  long long header =
      0x1c | (0x06 << 8) | (channel << 16) | ((long long)str_size << 48);
  kannotate_write((char *)&header, sizeof(header));
  kannotate_write(str, str_size);
}


x86 assembly (clang, -O0):
<gator_annotate_channel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
and    $0xffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x10,%eax
or     $0x61c,%eax
cltq
movslq -0x14(%rbp),%rcx
shl    $0x30,%rcx
or     %rcx,%rax
mov    %rax,-0x20(%rbp)
lea    -0x20(%rbp),%rdi
mov    $0x8,%esi
call   1040 <kannotate_write@plt>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1040 <kannotate_write@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gator_annotate_channel>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
mov    %edi,%ebp
mov    %rsi,%rdi
call   1030 <strlen@plt>
movzwl %ax,%r14d
shl    $0x10,%ebp
or     $0x61c,%ebp
movslq %ebp,%rcx
shl    $0x30,%rax
or     %rcx,%rax
mov    %rax,0x8(%rsp)
lea    0x8(%rsp),%rdi
mov    $0x8,%esi
call   1040 <kannotate_write@plt>
mov    %rbx,%rdi
mov    %r14d,%esi
call   1040 <kannotate_write@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @gator_annotate_channel(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i64
store i32 %0, i32* %3
store i8* %1, i8** %4
%7 = load i8*, i8** %4
%8 = call i32 @strlen(i8* %7)
%9 = and i32 %8, 65535
store i32 %9, i32* %5
%10 = load i32, i32* %3
%11 = shl i32 %10, 16
%12 = or i32 1564, %11
%13 = sext i32 %12 to i64
%14 = load i32, i32* %5
%15 = sext i32 %14 to i64
%16 = shl i64 %15, 48
%17 = or i64 %13, %16
store i64 %17, i64* %6
%18 = bitcast i64* %6 to i8*
%19 = call i32 @kannotate_write(i8* %18, i32 8)
%20 = load i8*, i8** %4
%21 = load i32, i32* %5
%22 = call i32 @kannotate_write(i8* %20, i32 %21)
ret void
}

LLVM IR (-O2):
define void @gator_annotate_channel(i32 %0, i8* %1) {
%3 = alloca i64
%4 = tail call i32 @strlen(i8* %1)
%5 = and i32 %4, 65535
%6 = bitcast i64* %3 to i8*
%7 = shl i32 %0, 16
%8 = or i32 %7, 1564
%9 = sext i32 %8 to i64
%10 = zext i32 %4 to i64
%11 = shl i64 %10, 48
%12 = or i64 %11, %9
store i64 %12, i64* %3
%13 = call i32 @kannotate_write(i8* %6, i32 8)
%14 = call i32 @kannotate_write(i8* %1, i32 %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Send_MPlayer_Command(int, int /*<<< orphan*/);
void MPlayer_Pause() { Send_MPlayer_Command(0x10, 0); }


x86 assembly (clang, -O0):
<MPlayer_Pause>:
push   %rbp
mov    %rsp,%rbp
mov    $0x10,%edi
xor    %esi,%esi
call   1030 <Send_MPlayer_Command@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<MPlayer_Pause>:
mov    $0x10,%edi
xor    %esi,%esi
jmp    1030 <Send_MPlayer_Command@plt>

LLVM IR (-O0):
define void @MPlayer_Pause() {
%1 = call i32 @Send_MPlayer_Command(i32 16, i32 0)
ret void
}

LLVM IR (-O2):
define void @MPlayer_Pause() {
%1 = tail call i32 @Send_MPlayer_Command(i32 16, i32 0)
ret void
}
/* Type definitions */
struct v4l_fd {
  int dummy;
};
struct v4l2_capability {
  int dummy;
};
typedef int /*<<< orphan*/ __u32;

/* Variables and functions */
int /*<<< orphan*/ v4l_capability_g_caps(struct v4l2_capability *);
scalar_t__ v4l_querycap(struct v4l_fd *, struct v4l2_capability *);
__u32 v4l_querycap_g_caps(struct v4l_fd *f) {
  struct v4l2_capability cap;
  return v4l_querycap(f, &cap) ? 0 : v4l_capability_g_caps(&cap);
}


x86 assembly (clang, -O0):
<v4l_querycap_g_caps>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <v4l_querycap@plt>
cmp    $0x0,%rax
je     114d <v4l_querycap_g_caps+0x2d>
xor    %eax,%eax
mov    %eax,-0x14(%rbp)
jmp    1159 <v4l_querycap_g_caps+0x39>
lea    -0x10(%rbp),%rdi
call   1030 <v4l_capability_g_caps@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<v4l_querycap_g_caps>:
push   %rax
mov    %rsp,%rsi
call   1040 <v4l_querycap@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
je     1135 <v4l_querycap_g_caps+0x15>
pop    %rcx
ret
mov    %rsp,%rdi
call   1030 <v4l_capability_g_caps@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.v4l_fd = type { i32 }
%struct.v4l2_capability = type { i32 }
define i32 @v4l_querycap_g_caps(%struct.v4l_fd* %0) {
%2 = alloca %struct.v4l_fd*
%3 = alloca %struct.v4l2_capability
store %struct.v4l_fd* %0, %struct.v4l_fd** %2
%4 = load %struct.v4l_fd*, %struct.v4l_fd** %2
%5 = call i64 @v4l_querycap(%struct.v4l_fd* %4, %struct.v4l2_capability* %3)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
br label %10
8: ; preds = %1
%9 = call i32 @v4l_capability_g_caps(%struct.v4l2_capability* %3)
br label %10
10: ; preds = %8, %7
%11 = phi i32 [ 0, %7 ], [ %9, %8 ]
ret i32 %11
}

LLVM IR (-O2):
%struct.v4l_fd = type { i32 }
%struct.v4l2_capability = type { i32 }
define i32 @v4l_querycap_g_caps(%struct.v4l_fd* %0) {
%2 = alloca %struct.v4l2_capability
%3 = bitcast %struct.v4l2_capability* %2 to i8*
%4 = call i64 @v4l_querycap(%struct.v4l_fd* %0, %struct.v4l2_capability* %2)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @v4l_capability_g_caps(%struct.v4l2_capability* %2)
br label %8
8: ; preds = %1, %6
%9 = phi i32 [ %7, %6 ], [ 0, %1 ]
ret i32 %9
}
/* Variables and functions */
float __llvm_amdgcn_rsq_f32(float);
float __frsqrt_rn(float x) { return __llvm_amdgcn_rsq_f32(x); }


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

x86 assembly (clang, -O2):
<__frsqrt_rn>:
jmp    1030 <__llvm_amdgcn_rsq_f32@plt>

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

LLVM IR (-O2):
define float @__frsqrt_rn(float %0) {
%2 = tail call float @__llvm_amdgcn_rsq_f32(float %0)
ret float %2
}