xunge/DecIR huggingface dataset:
/* Variables and functions */
int fun4(int, int);
int fun3(int g, int h) {
  if (g > h) {
    return fun4(g - 1, h + 1);
  } else {
    return h - g;
  }
}


x86 assembly (clang, -O0):
<fun3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1143 <fun3+0x33>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
mov    -0xc(%rbp),%esi
add    $0x1,%esi
call   1030 <fun4@plt>
mov    %eax,-0x4(%rbp)
jmp    114c <fun3+0x3c>
mov    -0xc(%rbp),%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun3>:
mov    %esi,%eax
sub    %edi,%eax
jge    1121 <fun3+0x11>
add    $0xffffffff,%edi
add    $0x1,%esi
jmp    1030 <fun4@plt>
ret

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

LLVM IR (-O2):
define i32 @fun3(i32 %0, i32 %1) {
%3 = icmp slt i32 %1, %0
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = add nsw i32 %0, -1
%6 = add nsw i32 %1, 1
%7 = tail call i32 @fun4(i32 %5, i32 %6)
br label %10
8: ; preds = %2
%9 = sub nsw i32 %1, %0
br label %10
10: ; preds = %8, %4
%11 = phi i32 [ %7, %4 ], [ %9, %8 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ sscanf(char *, char *, double *);
float StringToDouble(char *in) {
  double num;
  sscanf(in, "%lf", &num);
  return num;
}


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

x86 assembly (clang, -O2):
<StringToDouble>:
push   %rax
lea    0xee8(%rip),%rsi
mov    %rsp,%rdx
call   1030 <sscanf@plt>
movsd  (%rsp),%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%lf\00"
define float @StringToDouble(i8* %0) {
%2 = alloca i8*
%3 = alloca double
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @sscanf(i8* %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %3)
%6 = load double, double* %3
%7 = fptrunc double %6 to float
ret float %7
}

LLVM IR (-O2):
@.str = [4 x i8] c"%lf\00"
define float @StringToDouble(i8* nocapture %0) {
%2 = alloca double
%3 = bitcast double* %2 to i8*
%4 = call i32 @sscanf(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %2)
%5 = load double, double* %2
%6 = fptrunc double %5 to float
ret float %6
}
/* Variables and functions */
void *calloc(size_t, size_t);
void *xcalloc(size_t n, size_t s) { return calloc(n, s); }


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

x86 assembly (clang, -O2):
<xcalloc>:
jmp    1030 <calloc@plt>

LLVM IR (-O0):
define i8* @xcalloc(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
%6 = load i64, i64* %4
%7 = call i8* @calloc(i64 %5, i64 %6)
ret i8* %7
}

LLVM IR (-O2):
define noalias i8* @xcalloc(i64 %0, i64 %1) {
%3 = tail call i8* @calloc(i64 %0, i64 %1)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ die(int);
int /*<<< orphan*/ perror(char *);
char *strdup(char const *);
char *xstrdup(const char *s) {
  char *ret = strdup(s);
  if (!ret) {
    perror("runawk: strdup(3) failed");
    die(33);
  }
  return ret;
}


x86 assembly (clang, -O0):
<xstrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <strdup@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    116a <xstrdup+0x3a>
lea    0xea5(%rip),%rdi
call   1040 <perror@plt>
mov    $0x21,%edi
call   1030 <die@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrdup>:
push   %rbx
call   1050 <strdup@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1143 <xstrdup+0x13>
mov    %rbx,%rax
pop    %rbx
ret
lea    0xeb6(%rip),%rdi
call   1040 <perror@plt>
mov    $0x21,%edi
call   1030 <die@plt>
jmp    113e <xstrdup+0xe>

LLVM IR (-O0):
@.str = [25 x i8] c"runawk: strdup(3) failed\00"
define i8* @xstrdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strdup(i8* %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %11, label %8
8: ; preds = %1
%9 = call i32 @perror(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @die(i32 33)
br label %11
11: ; preds = %8, %1
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
@.str = [25 x i8] c"runawk: strdup(3) failed\00"
define noalias i8* @xstrdup(i8* nocapture %0) {
%2 = tail call i8* @strdup(i8* %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 @perror(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @die(i32 33)
br label %7
7: ; preds = %4, %1
ret i8* %2
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ root;
};
typedef TYPE_1__ XKeyPressedEvent;

/* Variables and functions */
unsigned long get_XKeyPressedEvent_root(void *_p) {
  return (unsigned long)((XKeyPressedEvent *)_p)->root;
}


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

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

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

LLVM IR (-O2):
define i64 @get_XKeyPressedEvent_root(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
void ucdF(char *x) { unsigned char *y = x; }


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

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

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

LLVM IR (-O2):
define void @ucdF(i8* nocapture %0) {
ret void
}
int roi_set_drive(char *buff, short v, short r) {
  char *vel;
  char *rad;
  vel = (char *)&v;
  rad = (char *)&r;
  buff[0] = (137);
  buff[1] = vel[1];
  buff[2] = vel[0];
  buff[3] = rad[1];
  buff[4] = rad[0];
  return 5;
}


x86 assembly (clang, -O0):
<roi_set_drive>:
push   %rbp
mov    %rsp,%rbp
mov    %dx,%ax
mov    %si,%cx
mov    %rdi,-0x8(%rbp)
mov    %cx,-0xa(%rbp)
mov    %ax,-0xc(%rbp)
lea    -0xa(%rbp),%rax
mov    %rax,-0x18(%rbp)
lea    -0xc(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rax
movb   $0x89,(%rax)
mov    -0x18(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0x18(%rbp),%rax
mov    (%rax),%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0x20(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x3(%rax)
mov    -0x20(%rbp),%rax
mov    (%rax),%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x4(%rax)
mov    $0x5,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<roi_set_drive>:
mov    %esi,%eax
movb   $0x89,(%rdi)
mov    %ah,0x1(%rdi)
mov    %al,0x2(%rdi)
mov    %dh,0x3(%rdi)
mov    %dl,0x4(%rdi)
mov    $0x5,%eax
ret

LLVM IR (-O0):
define i32 @roi_set_drive(i8* %0, i16 signext %1, i16 signext %2) {
%4 = alloca i8*
%5 = alloca i16
%6 = alloca i16
%7 = alloca i8*
%8 = alloca i8*
store i8* %0, i8** %4
store i16 %1, i16* %5
store i16 %2, i16* %6
%9 = bitcast i16* %5 to i8*
store i8* %9, i8** %7
%10 = bitcast i16* %6 to i8*
store i8* %10, i8** %8
%11 = load i8*, i8** %4
%12 = getelementptr inbounds i8, i8* %11, i64 0
store i8 -119, i8* %12
%13 = load i8*, i8** %7
%14 = getelementptr inbounds i8, i8* %13, i64 1
%15 = load i8, i8* %14
%16 = load i8*, i8** %4
%17 = getelementptr inbounds i8, i8* %16, i64 1
store i8 %15, i8* %17
%18 = load i8*, i8** %7
%19 = getelementptr inbounds i8, i8* %18, i64 0
%20 = load i8, i8* %19
%21 = load i8*, i8** %4
%22 = getelementptr inbounds i8, i8* %21, i64 2
store i8 %20, i8* %22
%23 = load i8*, i8** %8
%24 = getelementptr inbounds i8, i8* %23, i64 1
%25 = load i8, i8* %24
%26 = load i8*, i8** %4
%27 = getelementptr inbounds i8, i8* %26, i64 3
store i8 %25, i8* %27
%28 = load i8*, i8** %8
%29 = getelementptr inbounds i8, i8* %28, i64 0
%30 = load i8, i8* %29
%31 = load i8*, i8** %4
%32 = getelementptr inbounds i8, i8* %31, i64 4
store i8 %30, i8* %32
ret i32 5
}

LLVM IR (-O2):
define i32 @roi_set_drive(i8* nocapture writeonly %0, i16 signext %1, i16 signext %2) {
%4 = trunc i16 %1 to i8
%5 = lshr i16 %1, 8
%6 = trunc i16 %5 to i8
%7 = trunc i16 %2 to i8
%8 = lshr i16 %2, 8
%9 = trunc i16 %8 to i8
store i8 -119, i8* %0
%10 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %6, i8* %10
%11 = getelementptr inbounds i8, i8* %0, i64 2
store i8 %4, i8* %11
%12 = getelementptr inbounds i8, i8* %0, i64 3
store i8 %9, i8* %12
%13 = getelementptr inbounds i8, i8* %0, i64 4
store i8 %7, i8* %13
ret i32 5
}
int getbitfield(unsigned char *pageaddr, int shift, int mask) {
  return ((*pageaddr >> shift) & mask);
}


x86 assembly (clang, -O0):
<getbitfield>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
mov    -0xc(%rbp),%ecx
sar    %cl,%eax
and    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getbitfield>:
mov    %esi,%ecx
movzbl (%rdi),%eax
shr    %cl,%eax
and    %edx,%eax
ret

LLVM IR (-O0):
define i32 @getbitfield(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i8, i8* %7
%9 = zext i8 %8 to i32
%10 = load i32, i32* %5
%11 = ashr i32 %9, %10
%12 = load i32, i32* %6
%13 = and i32 %11, %12
ret i32 %13
}

LLVM IR (-O2):
define i32 @getbitfield(i8* nocapture %0, i32 %1, i32 %2) {
%4 = load i8, i8* %0
%5 = zext i8 %4 to i32
%6 = lshr i32 %5, %1
%7 = and i32 %6, %2
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ serial_write(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char const *);
void serial_writestring(const char *data) { serial_write(data, strlen(data)); }


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

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

LLVM IR (-O0):
define void @serial_writestring(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
%6 = call i32 @serial_write(i8* %3, i32 %5)
ret void
}

LLVM IR (-O2):
define void @serial_writestring(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = tail call i32 @serial_write(i8* %0, i32 %2)
ret void
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_mode;
};
typedef int /*<<< orphan*/ mode_t;

/* Variables and functions */
scalar_t__ stat(char const *, struct stat *);
mode_t StatFile(const char *psz_arg) {
  struct stat sb;
  if (stat(psz_arg, &sb) < 0)
    return 0;
  return sb.st_mode;
}


x86 assembly (clang, -O0):
<StatFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <stat@plt>
cmp    $0x0,%rax
jge    113f <StatFile+0x2f>
movl   $0x0,-0x4(%rbp)
jmp    1145 <StatFile+0x35>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<StatFile>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
js     1126 <StatFile+0x16>
mov    (%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @StatFile(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp slt i64 %4, 0
%6 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%7 = load i32, i32* %6
%8 = select i1 %5, i32 0, i32 %7
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void test_function() { printf("*** test_function()\n"); }


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

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

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

LLVM IR (-O2):
@str = [20 x i8] c"*** test_function()\00"
define void @test_function() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void usage(const char *progname) {
  fprintf(stderr,
          "usage: %s [-n numfiles] [-s seed] [-v] [-x] [dir]\n"
          "\t-c: only do the create step of first loop\n"
          "\t-f: number of files to create/rename/unlink per loop\n"
          "\t-n: number of test loops (0 to run forever)\n"
          "\t-r: only do the rename step of first loop\n"
          "\t-s: starting seed (equals loop number by default)\n"
          "\t-v: verbose\n"
          "\t-x: don't exit on error\n",
          progname);
}


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

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [325 x i8] c"usage: %s [-n numfiles] [-s seed] [-v] [-x] [dir]\0A\09-c: only do the create step of first loop\0A\09-f: number of files to create/rename/unlink per loop\0A\09-n: number of test loops (0 to run forever)\0A\09-r: only do the rename step of first loop\0A\09-s: starting seed (equals loop number by default)\0A\09-v: verbose\0A\09-x: don't exit on error\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([325 x i8], [325 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [325 x i8] c"usage: %s [-n numfiles] [-s seed] [-v] [-x] [dir]\0A\09-c: only do the create step of first loop\0A\09-f: number of files to create/rename/unlink per loop\0A\09-n: number of test loops (0 to run forever)\0A\09-r: only do the rename step of first loop\0A\09-s: starting seed (equals loop number by default)\0A\09-v: verbose\0A\09-x: don't exit on error\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([325 x i8], [325 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
int audio_flush(int a) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @audio_flush(i32 %0) {
ret i32 0
}
/* Variables and functions */
char uart_read();
char getchar() { return uart_read(); }


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

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

LLVM IR (-O0):
define signext i8 @getchar() {
%1 = call signext i8 (...) @uart_read()
ret i8 %1
}

LLVM IR (-O2):
define signext i8 @getchar() {
%1 = tail call signext i8 (...) @uart_read()
ret i8 %1
}
cfree(ptr) { free(ptr); }


x86 assembly (clang, -O0):
<cfree>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
movslq -0x8(%rbp),%rdi
call   1030 <free@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cfree>:
movslq %edi,%rdi
jmp    1030 <free@plt>

LLVM IR (-O0):
define i32 @cfree(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i8*
%7 = load i32, i32* %2
ret i32 %7
}

LLVM IR (-O2):
define i32 @cfree(i32 %0) {
%2 = sext i32 %0 to i64
%3 = inttoptr i64 %2 to i8*
tail call void @free(i8* %3)
ret i32 undef
}
/* Variables and functions */
char *getenv(char *);
scalar_t__ strstr(char *, char *);
int cgi_content(void) {
  char *c;
  c = getenv("CONTENT_TYPE");
  if (c) {
    if (strstr(c, "multipart/form-data"))
      return (1);
  }
  return (0);
}


x86 assembly (clang, -O0):
<cgi_content>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     116e <cgi_content+0x4e>
mov    -0x10(%rbp),%rdi
lea    0xebf(%rip),%rsi
call   1040 <strstr@plt>
cmp    $0x0,%rax
je     1169 <cgi_content+0x49>
movl   $0x1,-0x4(%rbp)
jmp    1175 <cgi_content+0x55>
jmp    116e <cgi_content+0x4e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cgi_content>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <getenv@plt>
test   %rax,%rax
je     1150 <cgi_content+0x30>
lea    0xed4(%rip),%rsi
mov    %rax,%rdi
call   1040 <strstr@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1150 <cgi_content+0x30>
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"CONTENT_TYPE\00"
@.str.1 = [20 x i8] c"multipart/form-data\00"
define i32 @cgi_content() {
%1 = alloca i32
%2 = alloca i8*
%3 = call i8* @getenv(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
store i8* %3, i8** %2
%4 = load i8*, i8** %2
%5 = icmp ne i8* %4, null
br i1 %5, label %6, label %12
6: ; preds = %0
%7 = load i8*, i8** %2
%8 = call i64 @strstr(i8* %7, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %6
store i32 1, i32* %1
br label %13
11: ; preds = %6
br label %12
12: ; preds = %11, %0
store i32 0, i32* %1
br label %13
13: ; preds = %12, %10
%14 = load i32, i32* %1
ret i32 %14
}

LLVM IR (-O2):
@.str = [13 x i8] c"CONTENT_TYPE\00"
@.str.1 = [20 x i8] c"multipart/form-data\00"
define i32 @cgi_content() {
%1 = tail call i8* @getenv(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i8* %1, null
br i1 %2, label %6, label %3
3: ; preds = %0
%4 = tail call i64 @strstr(i8* %1, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %3, %0
br label %7
7: ; preds = %3, %6
%8 = phi i32 [ 0, %6 ], [ 1, %3 ]
ret i32 %8
}
void literal_string2_bad() {
  int a[1];
  char s[] = "hello";
  for (int i = 0; i < 5; i++) {
    if (s[i] > 'n') {
      a[s[i]] = 0;
    }
  }
}


x86 assembly (clang, -O0):
<literal_string2_bad>:
push   %rbp
mov    %rsp,%rbp
mov    0xef6(%rip),%eax
mov    %eax,-0xa(%rbp)
mov    0xef0(%rip),%ax
mov    %ax,-0x6(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x5,-0x10(%rbp)
jge    1160 <literal_string2_bad+0x60>
movslq -0x10(%rbp),%rax
movsbl -0xa(%rbp,%rax,1),%eax
cmp    $0x6e,%eax
jle    114d <literal_string2_bad+0x4d>
movslq -0x10(%rbp),%rax
movsbq -0xa(%rbp,%rax,1),%rax
movl   $0x0,-0x4(%rbp,%rax,4)
jmp    1152 <literal_string2_bad+0x52>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    111f <literal_string2_bad+0x1f>
pop    %rbp
ret

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

LLVM IR (-O0):
@__const.literal_string2_bad.s = [6 x i8] c"hello\00"
define void @literal_string2_bad() {
%1 = alloca [1 x i32]
%2 = alloca [6 x i8]
%3 = alloca i32
%4 = bitcast [6 x i8]* %2 to i8*
store i32 0, i32* %3
br label %5
5: ; preds = %23, %0
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 5
br i1 %7, label %8, label %26
8: ; preds = %5
%9 = load i32, i32* %3
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 %10
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp sgt i32 %13, 110
br i1 %14, label %15, label %22
15: ; preds = %8
%16 = load i32, i32* %3
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 %17
%19 = load i8, i8* %18
%20 = sext i8 %19 to i64
%21 = getelementptr inbounds [1 x i32], [1 x i32]* %1, i64 0, i64 %20
store i32 0, i32* %21
br label %22
22: ; preds = %15, %8
br label %23
23: ; preds = %22
%24 = load i32, i32* %3
%25 = add nsw i32 %24, 1
store i32 %25, i32* %3
br label %5
26: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @literal_string2_bad() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;
typedef int /*<<< orphan*/ Elf32_Ehdr;

/* Variables and functions */
int /*<<< orphan*/ read_file_offset(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                                    int /*<<< orphan*/, int);
Elf32_Ehdr elf_header(FILE *program) {
  Elf32_Ehdr ehdr;
  read_file_offset(&ehdr, program, 0, sizeof(Elf32_Ehdr));
  return ehdr;
}


x86 assembly (clang, -O0):
<elf_header>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdi
xor    %edx,%edx
mov    $0x4,%ecx
call   1030 <read_file_offset@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<elf_header>:
push   %rax
mov    %rdi,%rsi
lea    0x4(%rsp),%rdi
xor    %edx,%edx
mov    $0x4,%ecx
call   1030 <read_file_offset@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @elf_header(i32* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @read_file_offset(i32* %2, i32* %0, i32 0, i32 4)
%5 = load i32, i32* %2
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ DSENSITIVITY(double);
double __BUILTIN_DAED_DBETWEEN_WITH_ULP(double, double);
int main(void) {
  double x;
  double res;
  x = __BUILTIN_DAED_DBETWEEN_WITH_ULP(-2.0, 2.0);
  res = 0.954929658551372 * x - 0.12900613773279798 * (x * x * x);
  DSENSITIVITY(res);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xed9(%rip),%xmm0
movsd  0xed9(%rip),%xmm1
call   1030 <__BUILTIN_DAED_DBETWEEN_WITH_ULP@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
mulsd  -0x10(%rbp),%xmm2
mulsd  -0x10(%rbp),%xmm2
movsd  0xea3(%rip),%xmm1
mulsd  %xmm2,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
movsd  0xe78(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1040 <DSENSITIVITY@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movsd  0xed7(%rip),%xmm0
movsd  0xed7(%rip),%xmm1
call   1030 <__BUILTIN_DAED_DBETWEEN_WITH_ULP@plt>
movapd %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  0xec6(%rip),%xmm1
mulsd  0xec6(%rip),%xmm0
addsd  %xmm1,%xmm0
call   1040 <DSENSITIVITY@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
store i32 0, i32* %1
%4 = call double @__BUILTIN_DAED_DBETWEEN_WITH_ULP(double -2.000000e+00, double 2.000000e+00)
store double %4, double* %2
%5 = load double, double* %2
%6 = load double, double* %2
%7 = load double, double* %2
%8 = fmul double %6, %7
%9 = load double, double* %2
%10 = fmul double %8, %9
%11 = fmul double 0x3FC08345EB45D77F, %10
%12 = fneg double %11
%13 = call double @llvm.fmuladd.f64(double 0x3FEE8EC8A4AEACC4, double %5, double %12)
store double %13, double* %3
%14 = load double, double* %3
%15 = call i32 @DSENSITIVITY(double %14)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call double @__BUILTIN_DAED_DBETWEEN_WITH_ULP(double -2.000000e+00, double 2.000000e+00)
%2 = fmul double %1, %1
%3 = fmul double %1, %2
%4 = fmul double %3, 0xBFC08345EB45D77F
%5 = tail call double @llvm.fmuladd.f64(double %1, double 0x3FEE8EC8A4AEACC4, double %4)
%6 = tail call i32 @DSENSITIVITY(double %5)
ret i32 0
}
void sem_wait() {}


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

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

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

LLVM IR (-O2):
define void @sem_wait() {
ret void
}
void inc_zcache_eph_zbytes(unsigned clen) {}


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

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

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

LLVM IR (-O2):
define void @inc_zcache_eph_zbytes(i32 %0) {
ret void
}
/* Variables and functions */
char *strchr(char *, char);
void chomp_line(char *word) {
  char *p;
  if ((p = strchr(word, '\r'))) {
    *p = '\0';
  }
  if ((p = strchr(word, '\n'))) {
    *p = '\0';
  }
}


x86 assembly (clang, -O0):
<chomp_line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0xd,%esi
call   1030 <strchr@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
je     113f <chomp_line+0x2f>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rdi
mov    $0xa,%esi
call   1030 <strchr@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
je     1162 <chomp_line+0x52>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chomp_line>:
push   %rbx
mov    %rdi,%rbx
mov    $0xd,%esi
call   1030 <strchr@plt>
test   %rax,%rax
je     1126 <chomp_line+0x16>
movb   $0x0,(%rax)
mov    %rbx,%rdi
mov    $0xa,%esi
call   1030 <strchr@plt>
test   %rax,%rax
je     113b <chomp_line+0x2b>
movb   $0x0,(%rax)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @chomp_line(i8* %0) {
%2 = tail call i8* @strchr(i8* dereferenceable(1) %0, i8 signext 13)
%3 = icmp eq i8* %2, null
br i1 %3, label %5, label %4
4: ; preds = %1
store i8 0, i8* %2
br label %5
5: ; preds = %4, %1
%6 = tail call i8* @strchr(i8* dereferenceable(1) %0, i8 signext 10)
%7 = icmp eq i8* %6, null
br i1 %7, label %9, label %8
8: ; preds = %5
store i8 0, i8* %6
br label %9
9: ; preds = %8, %5
ret void
}
float rad2deg(float rad) {
  return (rad * 180.0f) / (float)3.14159265358979323846264338327;
}


x86 assembly (clang, -O0):
<rad2deg>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xef3(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  0xee2(%rip),%xmm1
divss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<rad2deg>:
mulss  0xef8(%rip),%xmm0
divss  0xef4(%rip),%xmm0
ret

LLVM IR (-O0):
define float @rad2deg(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fmul float %3, 1.800000e+02
%5 = fdiv float %4, 0x400921FB60000000
ret float %5
}

LLVM IR (-O2):
define float @rad2deg(float %0) {
%2 = fmul float %0, 1.800000e+02
%3 = fdiv float %2, 0x400921FB60000000
ret float %3
}
XSetForeground() {}


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

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

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

LLVM IR (-O2):
define i32 @XSetForeground() {
ret i32 undef
}
int even_ones(unsigned x) {
  unsigned p16 = (x >> 16) ^ x;
  unsigned p8 = (p16 >> 8) ^ p16;
  unsigned p4 = (p8 >> 4) ^ p8;
  unsigned p2 = (p4 >> 2) ^ p4;
  unsigned p1 = (p2 >> 1) ^ p2;
  return !(p1 & 1u);
}


x86 assembly (clang, -O0):
<even_ones>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x10,%eax
xor    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shr    $0x8,%eax
xor    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shr    $0x4,%eax
xor    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
shr    $0x2,%eax
xor    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
shr    $0x1,%eax
xor    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<even_ones>:
mov    %edi,%eax
shr    $0x10,%eax
xor    %edi,%eax
mov    %eax,%ecx
shr    $0x8,%ecx
xor    %eax,%ecx
mov    %ecx,%eax
shr    $0x4,%eax
xor    %ecx,%eax
mov    %eax,%ecx
shr    $0x2,%ecx
xor    %eax,%ecx
mov    %ecx,%eax
shr    %eax
xor    %ecx,%eax
not    %eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @even_ones(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %2
%8 = load i32, i32* %2
%9 = lshr i32 %8, 16
%10 = load i32, i32* %2
%11 = xor i32 %9, %10
store i32 %11, i32* %3
%12 = load i32, i32* %3
%13 = lshr i32 %12, 8
%14 = load i32, i32* %3
%15 = xor i32 %13, %14
store i32 %15, i32* %4
%16 = load i32, i32* %4
%17 = lshr i32 %16, 4
%18 = load i32, i32* %4
%19 = xor i32 %17, %18
store i32 %19, i32* %5
%20 = load i32, i32* %5
%21 = lshr i32 %20, 2
%22 = load i32, i32* %5
%23 = xor i32 %21, %22
store i32 %23, i32* %6
%24 = load i32, i32* %6
%25 = lshr i32 %24, 1
%26 = load i32, i32* %6
%27 = xor i32 %25, %26
store i32 %27, i32* %7
%28 = load i32, i32* %7
%29 = and i32 %28, 1
%30 = icmp ne i32 %29, 0
%31 = xor i1 %30, true
%32 = zext i1 %31 to i32
ret i32 %32
}

LLVM IR (-O2):
define i32 @even_ones(i32 %0) {
%2 = lshr i32 %0, 16
%3 = xor i32 %2, %0
%4 = lshr i32 %3, 8
%5 = xor i32 %4, %3
%6 = lshr i32 %5, 4
%7 = xor i32 %6, %5
%8 = lshr i32 %7, 2
%9 = xor i32 %8, %7
%10 = lshr i32 %9, 1
%11 = xor i32 %10, %9
%12 = and i32 %11, 1
%13 = xor i32 %12, 1
ret i32 %13
}
int main() {
  int __lldb_expr_result = 2;
  int $$foo = 1;
  int R0 = 2;
  int $__lldb_expr_result = 11;
  int $foo = 12;
  int $R0 = 13;
  int $0 = 14;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
movl   $0x2,-0x10(%rbp)
movl   $0xb,-0x14(%rbp)
movl   $0xc,-0x18(%rbp)
movl   $0xd,-0x1c(%rbp)
movl   $0xe,-0x20(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %1
store i32 2, i32* %2
store i32 1, i32* %3
store i32 2, i32* %4
store i32 11, i32* %5
store i32 12, i32* %6
store i32 13, i32* %7
store i32 14, i32* %8
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
void *malloc(size_t);
void *smalloc(size_t size) {
  void *p;
  p = malloc(size);
  assert(p != NULL);
  return (p);
}


x86 assembly (clang, -O0):
<smalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<smalloc>:
push   %rbx
call   1040 <malloc@plt>
mov    %rax,%rbx
xor    %edi,%edi
test   %rax,%rax
setne  %dil
call   1030 <assert@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @smalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
%10 = load i8*, i8** %3
ret i8* %10
}

LLVM IR (-O2):
define noalias i8* @smalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp ne i8* %2, null
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
ret i8* %2
}
unsigned xrop3_136_1_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  stk1 = D & S;
  return (stk1 & (~S) & (~T)) | (D & S) | (D & T);
}


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

x86 assembly (clang, -O2):
<xrop3_136_1_1>:
mov    %edi,%eax
or     %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @xrop3_136_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = or i8 %1, %0
%4 = zext i8 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ *strchr(char *, char);
int isDir(char *s) {
  if ((strchr(s, '.')) == NULL)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<isDir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x2e,%esi
call   1030 <strchr@plt>
cmp    $0x0,%rax
jne    1140 <isDir+0x30>
movl   $0x1,-0x4(%rbp)
jmp    1147 <isDir+0x37>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isDir>:
push   %rax
mov    $0x2e,%esi
call   1030 <strchr@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @isDir(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i32* @strchr(i8* %4, i8 signext 46)
%6 = icmp eq i32* %5, null
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 1, i32* %2
br label %9
8: ; preds = %1
store i32 0, i32* %2
br label %9
9: ; preds = %8, %7
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
define i32 @isDir(i8* %0) {
%2 = tail call i32* @strchr(i8* %0, i8 signext 46)
%3 = icmp eq i32* %2, null
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
struct macan_key {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ klee_make_symbolic(int /*<<< orphan*/ *, size_t, char *);
void macan_aes_encrypt(const struct macan_key *key, size_t len, uint8_t *dst,
                       const uint8_t *src) {
  (void)key, (void)src;
  klee_make_symbolic(dst, len, "aes encryption");
}


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

x86 assembly (clang, -O2):
<macan_aes_encrypt>:
mov    %rdx,%rdi
lea    0xee6(%rip),%rdx
jmp    1030 <klee_make_symbolic@plt>

LLVM IR (-O0):
%struct.macan_key = type { i32 }
@.str = [15 x i8] c"aes encryption\00"
define void @macan_aes_encrypt(%struct.macan_key* %0, i64 %1, i32* %2, i32* %3) {
%5 = alloca %struct.macan_key*
%6 = alloca i64
%7 = alloca i32*
%8 = alloca i32*
store %struct.macan_key* %0, %struct.macan_key** %5
store i64 %1, i64* %6
store i32* %2, i32** %7
store i32* %3, i32** %8
%9 = load %struct.macan_key*, %struct.macan_key** %5
%10 = load i32*, i32** %8
%11 = load i32*, i32** %7
%12 = load i64, i64* %6
%13 = call i32 @klee_make_symbolic(i32* %11, i64 %12, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.macan_key = type { i32 }
@.str = [15 x i8] c"aes encryption\00"
define void @macan_aes_encrypt(%struct.macan_key* nocapture readnone %0, i64 %1, i32* %2, i32* nocapture readnone %3) {
%5 = tail call i32 @klee_make_symbolic(i32* %2, i64 %1, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}
int RGB_24to16(int red, int grn, int blu) {
  return (((red >> 3) << 11) | ((grn >> 2) << 5) | (blu >> 3));
}


x86 assembly (clang, -O0):
<RGB_24to16>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x3,%eax
shl    $0xb,%eax
mov    -0x8(%rbp),%ecx
sar    $0x2,%ecx
shl    $0x5,%ecx
or     %ecx,%eax
mov    -0xc(%rbp),%ecx
sar    $0x3,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<RGB_24to16>:
and    $0xfffffff8,%edi
shl    $0x8,%edi
lea    0x0(,%rsi,8),%eax
and    $0xffffffe0,%eax
or     %edi,%eax
sar    $0x3,%edx
or     %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @RGB_24to16(i32 %0, i32 %1, i32 %2) {
%4 = shl i32 %0, 8
%5 = and i32 %4, -2048
%6 = shl i32 %1, 3
%7 = and i32 %6, -32
%8 = or i32 %7, %5
%9 = ashr i32 %2, 3
%10 = or i32 %8, %9
ret i32 %10
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int /*<<< orphan*/ fb_write_cell(int, char, int, int /*<<< orphan*/);
void fb_clear_row(uint8_t row) {
  size_t i;
  for (i = 0; i < 80; i++) {
    fb_write_cell((row * 80) + i, ' ', 15, 0);
  }
}


x86 assembly (clang, -O0):
<fb_clear_row>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
cmpq   $0x50,-0x10(%rbp)
jae    115c <fb_clear_row+0x4c>
imul   $0x50,-0x4(%rbp),%eax
cltq
add    -0x10(%rbp),%rax
mov    %eax,%edi
mov    $0x20,%esi
mov    $0xf,%edx
xor    %ecx,%ecx
call   1030 <fb_write_cell@plt>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1123 <fb_clear_row+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fb_clear_row>:
push   %r14
push   %rbx
push   %rax
shl    $0x4,%edi
lea    (%rdi,%rdi,4),%r14d
xor    %ebx,%ebx
nopl   (%rax)
lea    (%r14,%rbx,1),%edi
mov    $0x20,%esi
mov    $0xf,%edx
xor    %ecx,%ecx
call   1030 <fb_write_cell@plt>
add    $0x1,%rbx
cmp    $0x50,%rbx
jne    1120 <fb_clear_row+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @fb_clear_row(i32 %0) {
%2 = alloca i32
%3 = alloca i64
store i32 %0, i32* %2
store i64 0, i64* %3
br label %4
4: ; preds = %15, %1
%5 = load i64, i64* %3
%6 = icmp ult i64 %5, 80
br i1 %6, label %7, label %18
7: ; preds = %4
%8 = load i32, i32* %2
%9 = mul nsw i32 %8, 80
%10 = sext i32 %9 to i64
%11 = load i64, i64* %3
%12 = add i64 %10, %11
%13 = trunc i64 %12 to i32
%14 = call i32 @fb_write_cell(i32 %13, i8 signext 32, i32 15, i32 0)
br label %15
15: ; preds = %7
%16 = load i64, i64* %3
%17 = add i64 %16, 1
store i64 %17, i64* %3
br label %4
18: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @fb_clear_row(i32 %0) {
%2 = mul nsw i32 %0, 80
br label %3
3: ; preds = %1, %3
%4 = phi i64 [ 0, %1 ], [ %8, %3 ]
%5 = trunc i64 %4 to i32
%6 = add i32 %2, %5
%7 = tail call i32 @fb_write_cell(i32 %6, i8 signext 32, i32 15, i32 0)
%8 = add nuw nsw i64 %4, 1
%9 = icmp eq i64 %8, 80
br i1 %9, label %10, label %3
10: ; preds = %3
ret void
}
/* Variables and functions */
int atoi(char *);
int ExtractMinute(const char *RawDate) {
  char RawMinute[3];
  int Temp;
  RawMinute[0] = RawDate[14];
  RawMinute[1] = RawDate[15];
  RawMinute[2] = 0;
  Temp = atoi(RawMinute);
  return Temp;
}


x86 assembly (clang, -O0):
<ExtractMinute>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0xe(%rax),%al
mov    %al,-0xb(%rbp)
mov    -0x8(%rbp),%rax
mov    0xf(%rax),%al
mov    %al,-0xa(%rbp)
movb   $0x0,-0x9(%rbp)
lea    -0xb(%rbp),%rdi
call   1030 <atoi@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ExtractMinute>:
push   %rax
mov    0xe(%rdi),%al
mov    %al,0x5(%rsp)
mov    0xf(%rdi),%al
mov    %al,0x6(%rsp)
movb   $0x0,0x7(%rsp)
lea    0x5(%rsp),%rdi
call   1030 <atoi@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @ExtractMinute(i8* nocapture %0) {
%2 = alloca [3 x i8]
%3 = getelementptr inbounds [3 x i8], [3 x i8]* %2, i64 0, i64 0
%4 = getelementptr inbounds i8, i8* %0, i64 14
%5 = load i8, i8* %4
store i8 %5, i8* %3
%6 = getelementptr inbounds i8, i8* %0, i64 15
%7 = load i8, i8* %6
%8 = getelementptr inbounds [3 x i8], [3 x i8]* %2, i64 0, i64 1
store i8 %7, i8* %8
%9 = getelementptr inbounds [3 x i8], [3 x i8]* %2, i64 0, i64 2
store i8 0, i8* %9
%10 = call i32 @atoi(i8* %3)
ret i32 %10
}
int CPUSupportsAVX() { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @CPUSupportsAVX() {
ret i32 1
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ p264_pixel_avg_w4_mmxext(int /*<<< orphan*/ *, int,
                                            int /*<<< orphan*/ *, int,
                                            int /*<<< orphan*/ *, int, int);
void p264_pixel_avg_4x8_mmxext(uint8_t *dst, int i_dst, uint8_t *src,
                               int i_src) {
  p264_pixel_avg_w4_mmxext(dst, i_dst, dst, i_dst, src, i_src, 8);
}


x86 assembly (clang, -O0):
<p264_pixel_avg_4x8_mmxext>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%rdx
mov    -0xc(%rbp),%ecx
mov    -0x18(%rbp),%r8
mov    -0x1c(%rbp),%r9d
movl   $0x8,(%rsp)
call   1030 <p264_pixel_avg_w4_mmxext@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<p264_pixel_avg_4x8_mmxext>:
push   %rax
mov    %ecx,%r9d
mov    %rdx,%r8
movl   $0x8,(%rsp)
mov    %rdi,%rdx
mov    %esi,%ecx
call   1030 <p264_pixel_avg_w4_mmxext@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @p264_pixel_avg_4x8_mmxext(i32* %0, i32 %1, i32* %2, i32 %3) {
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i32*
%8 = alloca i32
store i32* %0, i32** %5
store i32 %1, i32* %6
store i32* %2, i32** %7
store i32 %3, i32* %8
%9 = load i32*, i32** %5
%10 = load i32, i32* %6
%11 = load i32*, i32** %5
%12 = load i32, i32* %6
%13 = load i32*, i32** %7
%14 = load i32, i32* %8
%15 = call i32 @p264_pixel_avg_w4_mmxext(i32* %9, i32 %10, i32* %11, i32 %12, i32* %13, i32 %14, i32 8)
ret void
}

LLVM IR (-O2):
define void @p264_pixel_avg_4x8_mmxext(i32* %0, i32 %1, i32* %2, i32 %3) {
%5 = tail call i32 @p264_pixel_avg_w4_mmxext(i32* %0, i32 %1, i32* %0, i32 %1, i32* %2, i32 %3, i32 8)
ret void
}
struct _Locale_name_hint *_Locale_get_ctype_hint(struct _Locale_ctype *ctype
                                                 __attribute__((__unused__))) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct._Locale_name_hint = type opaque
%struct._Locale_ctype = type opaque
define %struct._Locale_name_hint* @_Locale_get_ctype_hint(%struct._Locale_ctype* %0) {
%2 = alloca %struct._Locale_ctype*
store %struct._Locale_ctype* %0, %struct._Locale_ctype** %2
ret %struct._Locale_name_hint* null
}

LLVM IR (-O2):
%struct._Locale_name_hint = type opaque
%struct._Locale_ctype = type opaque
define noalias %struct._Locale_name_hint* @_Locale_get_ctype_hint(%struct._Locale_ctype* nocapture readnone %0) {
ret %struct._Locale_name_hint* null
}