xunge/DecIR huggingface dataset:
/* Variables and functions */
int pathconN_nm8_f0(double const **, double **, int *, double *, int);
int pathconN_nm8(const double **arg, double **res, int *iw, double *w,
                 int mem) {
  return pathconN_nm8_f0(arg, res, iw, w, mem);
}


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

x86 assembly (clang, -O2):
<pathconN_nm8>:
jmp    1030 <pathconN_nm8_f0@plt>

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

LLVM IR (-O2):
define i32 @pathconN_nm8(double** %0, double** %1, i32* %2, double* %3, i32 %4) {
%6 = tail call i32 @pathconN_nm8_f0(double** %0, double** %1, i32* %2, double* %3, i32 %4)
ret i32 %6
}
void test() {
  void *vp;
  int *ip;
  char *cp;
  struct foo *fp;
  struct bar *bp;
  short sint = 7;
  if (ip < cp) {
  }
  if (cp < fp) {
  }
  if (fp < bp) {
  }
  if (ip < 7) {
  }
  if (sint < ip) {
  }
  if (ip == cp) {
  }
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
movw   $0x7,-0x2a(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
cmp    %rcx,%rax
jae    1120 <test+0x20>
jmp    1120 <test+0x20>
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%rcx
cmp    %rcx,%rax
jae    1136 <test+0x36>
jmp    1136 <test+0x36>
mov    -0x20(%rbp),%rax
mov    -0x28(%rbp),%rcx
cmp    %rcx,%rax
jae    114c <test+0x4c>
jmp    114c <test+0x4c>
mov    $0x7,%eax
cmp    %rax,-0x10(%rbp)
jae    1160 <test+0x60>
jmp    1160 <test+0x60>
movswq -0x2a(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1174 <test+0x74>
jmp    1174 <test+0x74>
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
cmp    %rcx,%rax
jne    118a <test+0x8a>
jmp    118a <test+0x8a>
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.foo = type opaque
%struct.bar = type opaque
define void @test() {
%1 = alloca i8*
%2 = alloca i32*
%3 = alloca i8*
%4 = alloca %struct.foo*
%5 = alloca %struct.bar*
%6 = alloca i16
store i16 7, i16* %6
%7 = load i32*, i32** %2
%8 = load i8*, i8** %3
%9 = bitcast i8* %8 to i32*
%10 = icmp ult i32* %7, %9
br i1 %10, label %11, label %12
11: ; preds = %0
br label %12
12: ; preds = %11, %0
%13 = load i8*, i8** %3
%14 = load %struct.foo*, %struct.foo** %4
%15 = bitcast %struct.foo* %14 to i8*
%16 = icmp ult i8* %13, %15
br i1 %16, label %17, label %18
17: ; preds = %12
br label %18
18: ; preds = %17, %12
%19 = load %struct.foo*, %struct.foo** %4
%20 = load %struct.bar*, %struct.bar** %5
%21 = bitcast %struct.bar* %20 to %struct.foo*
%22 = icmp ult %struct.foo* %19, %21
br i1 %22, label %23, label %24
23: ; preds = %18
br label %24
24: ; preds = %23, %18
%25 = load i32*, i32** %2
%26 = icmp ult i32* %25, inttoptr (i64 7 to i32*)
br i1 %26, label %27, label %28
27: ; preds = %24
br label %28
28: ; preds = %27, %24
%29 = load i16, i16* %6
%30 = sext i16 %29 to i64
%31 = inttoptr i64 %30 to i32*
%32 = load i32*, i32** %2
%33 = icmp ult i32* %31, %32
br i1 %33, label %34, label %35
34: ; preds = %28
br label %35
35: ; preds = %34, %28
%36 = load i32*, i32** %2
%37 = load i8*, i8** %3
%38 = bitcast i8* %37 to i32*
%39 = icmp eq i32* %36, %38
br i1 %39, label %40, label %41
40: ; preds = %35
br label %41
41: ; preds = %40, %35
ret void
}

LLVM IR (-O2):
define void @test() {
ret void
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_1__;

/* Type definitions */
struct TYPE_4__ {
  int (*xRandomness)(TYPE_1__ *, int, char *);
  scalar_t__ pAppData;
};
typedef TYPE_1__ sqlite3_vfs;

/* Variables and functions */
int stub1(TYPE_1__ *, int, char *);
int memRandomness(sqlite3_vfs *pVfs, int nByte, char *zBufOut) {
  return ((sqlite3_vfs *)((pVfs)->pAppData))
      ->xRandomness(((sqlite3_vfs *)((pVfs)->pAppData)), nByte, zBufOut);
}


x86 assembly (clang, -O0):
<memRandomness>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rax
mov    (%rax),%rax
mov    -0x8(%rbp),%rcx
mov    0x8(%rcx),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
call   *%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<memRandomness>:
mov    0x8(%rdi),%rdi
mov    (%rdi),%rax
jmp    *%rax

LLVM IR (-O0):
%struct.TYPE_4__ = type { {}*, i64 }
define i32 @memRandomness(%struct.TYPE_4__* %0, i32 %1, i8* %2) {
%4 = alloca %struct.TYPE_4__*
%5 = alloca i32
%6 = alloca i8*
store %struct.TYPE_4__* %0, %struct.TYPE_4__** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load %struct.TYPE_4__*, %struct.TYPE_4__** %4
%8 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %7, i32 0, i32 1
%9 = load i64, i64* %8
%10 = inttoptr i64 %9 to %struct.TYPE_4__*
%11 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %10, i32 0, i32 0
%12 = bitcast {}** %11 to i32 (%struct.TYPE_4__*, i32, i8*)**
%13 = load i32 (%struct.TYPE_4__*, i32, i8*)*, i32 (%struct.TYPE_4__*, i32, i8*)** %12
%14 = load %struct.TYPE_4__*, %struct.TYPE_4__** %4
%15 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %14, i32 0, i32 1
%16 = load i64, i64* %15
%17 = inttoptr i64 %16 to %struct.TYPE_4__*
%18 = load i32, i32* %5
%19 = load i8*, i8** %6
%20 = call i32 %13(%struct.TYPE_4__* %17, i32 %18, i8* %19)
ret i32 %20
}

LLVM IR (-O2):
%struct.TYPE_4__ = type { {}*, i64 }
define i32 @memRandomness(%struct.TYPE_4__* nocapture %0, i32 %1, i8* %2) {
%4 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %0, i64 0, i32 1
%5 = load i64, i64* %4
%6 = inttoptr i64 %5 to %struct.TYPE_4__*
%7 = inttoptr i64 %5 to i32 (%struct.TYPE_4__*, i32, i8*)**
%8 = load i32 (%struct.TYPE_4__*, i32, i8*)*, i32 (%struct.TYPE_4__*, i32, i8*)** %7
%9 = tail call i32 %8(%struct.TYPE_4__* %6, i32 %1, i8* %2)
ret i32 %9
}
char convertEscapedChar(int ch) {
  switch (ch) {
  case 'n':
    return '\n';
  case 't':
    return '\t';
  case '"':
    return '\"';
  case '\\':
    return '\\';
  }
  return ch;
}


x86 assembly (clang, -O0):
<convertEscapedChar>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x22,%eax
je     1160 <convertEscapedChar+0x60>
jmp    111b <convertEscapedChar+0x1b>
mov    -0xc(%rbp),%eax
sub    $0x5c,%eax
je     1169 <convertEscapedChar+0x69>
jmp    112c <convertEscapedChar+0x2c>
mov    -0xc(%rbp),%eax
sub    $0x6e,%eax
je     114e <convertEscapedChar+0x4e>
jmp    113d <convertEscapedChar+0x3d>
mov    -0xc(%rbp),%eax
sub    $0x74,%eax
je     1157 <convertEscapedChar+0x57>
jmp    1172 <convertEscapedChar+0x72>
movb   $0xa,-0x1(%rbp)
jmp    1178 <convertEscapedChar+0x78>
movb   $0x9,-0x1(%rbp)
jmp    1178 <convertEscapedChar+0x78>
movb   $0x22,-0x1(%rbp)
jmp    1178 <convertEscapedChar+0x78>
movb   $0x5c,-0x1(%rbp)
jmp    1178 <convertEscapedChar+0x78>
mov    -0x8(%rbp),%eax
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<convertEscapedChar>:
mov    %edi,%eax
cmp    $0x6d,%edi
jg     1114 <convertEscapedChar+0x14>
cmp    $0x22,%eax
je     1121 <convertEscapedChar+0x21>
cmp    $0x5c,%eax
jne    1123 <convertEscapedChar+0x23>
mov    $0x5c,%al
ret
cmp    $0x6e,%eax
je     1124 <convertEscapedChar+0x24>
cmp    $0x74,%eax
jne    1123 <convertEscapedChar+0x23>
mov    $0x9,%al
ret
mov    $0x22,%al
ret
mov    $0xa,%al
ret

LLVM IR (-O0):
define signext i8 @convertEscapedChar(i32 %0) {
%2 = alloca i8
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %9 [
i32 110, label %5
i32 116, label %6
i32 34, label %7
i32 92, label %8
]
5: ; preds = %1
store i8 10, i8* %2
br label %12
6: ; preds = %1
store i8 9, i8* %2
br label %12
7: ; preds = %1
store i8 34, i8* %2
br label %12
8: ; preds = %1
store i8 92, i8* %2
br label %12
9: ; preds = %1
%10 = load i32, i32* %3
%11 = trunc i32 %10 to i8
store i8 %11, i8* %2
br label %12
12: ; preds = %9, %8, %7, %6, %5
%13 = load i8, i8* %2
ret i8 %13
}

LLVM IR (-O2):
define signext i8 @convertEscapedChar(i32 %0) {
switch i32 %0, label %5 [
i32 110, label %7
i32 116, label %2
i32 34, label %3
i32 92, label %4
]
2: ; preds = %1
br label %7
3: ; preds = %1
br label %7
4: ; preds = %1
br label %7
5: ; preds = %1
%6 = trunc i32 %0 to i8
br label %7
7: ; preds = %1, %5, %4, %3, %2
%8 = phi i8 [ %6, %5 ], [ 92, %4 ], [ 34, %3 ], [ 9, %2 ], [ 10, %1 ]
ret i8 %8
}
/* Variables and functions */
int /*<<< orphan*/ arm_arith_cmp(int /*<<< orphan*/);
int /*<<< orphan*/ t16_data_rdn3_op();
void t16_cmp_rdn3() { arm_arith_cmp(t16_data_rdn3_op()); }


x86 assembly (clang, -O0):
<t16_cmp_rdn3>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <t16_data_rdn3_op@plt>
mov    %eax,%edi
call   1030 <arm_arith_cmp@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t16_cmp_rdn3>:
push   %rax
xor    %eax,%eax
call   1040 <t16_data_rdn3_op@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <arm_arith_cmp@plt>

LLVM IR (-O0):
define void @t16_cmp_rdn3() {
%1 = call i32 (...) @t16_data_rdn3_op()
%2 = call i32 @arm_arith_cmp(i32 %1)
ret void
}

LLVM IR (-O2):
define void @t16_cmp_rdn3() {
%1 = tail call i32 (...) @t16_data_rdn3_op()
%2 = tail call i32 @arm_arith_cmp(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sleep_ns(int);
void sleep_us(int microsec) { sleep_ns(microsec * 1000); }


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

x86 assembly (clang, -O2):
<sleep_us>:
imul   $0x3e8,%edi,%edi
jmp    1030 <sleep_ns@plt>

LLVM IR (-O0):
define void @sleep_us(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul nsw i32 %3, 1000
%5 = call i32 @sleep_ns(i32 %4)
ret void
}

LLVM IR (-O2):
define void @sleep_us(i32 %0) {
%2 = mul nsw i32 %0, 1000
%3 = tail call i32 @sleep_ns(i32 %2)
ret void
}
int fun843() { return 843; }


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

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

LLVM IR (-O0):
define i32 @fun843() {
ret i32 843
}

LLVM IR (-O2):
define i32 @fun843() {
ret i32 843
}
void outb(unsigned char value, unsigned short port) {
  __asm__ __volatile__("outb %b0, %w1" : : "a"(value), "Nd"(port));
}


x86 assembly (clang, -O0):
<outb>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %ax,-0x4(%rbp)
mov    -0x1(%rbp),%al
mov    -0x4(%rbp),%dx
out    %al,(%dx)
pop    %rbp
ret

x86 assembly (clang, -O2):
<outb>:
mov    %esi,%edx
mov    %edi,%eax
out    %al,(%dx)
ret

LLVM IR (-O0):
define void @outb(i8 zeroext %0, i16 zeroext %1) {
%3 = alloca i8
%4 = alloca i16
store i8 %0, i8* %3
store i16 %1, i16* %4
%5 = load i8, i8* %3
%6 = load i16, i16* %4
ret void
}

LLVM IR (-O2):
define void @outb(i8 zeroext %0, i16 zeroext %1) {
tail call void asm sideeffect "outb ${0:b}, ${1:w}", "{ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i8 %0, i16 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void printFn(void *data) { printf("%d\n", *(int *)data); }


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define void @printFn(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to i32*
%5 = load i32, i32* %4
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @printFn(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}
char swizzle(unsigned swzl) {
  switch (swzl) {
  case 0:
    return 'x';
  case 1:
    return 'y';
  case 2:
    return 'z';
  case 3:
    return 'w';
  default:
    break;
  }
  return '!';
}


x86 assembly (clang, -O0):
<swizzle>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %rax,-0x10(%rbp)
sub    $0x3,%rax
ja     1150 <swizzle+0x50>
mov    -0x10(%rbp),%rax
lea    0xedd(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movb   $0x78,-0x1(%rbp)
jmp    1159 <swizzle+0x59>
movb   $0x79,-0x1(%rbp)
jmp    1159 <swizzle+0x59>
movb   $0x7a,-0x1(%rbp)
jmp    1159 <swizzle+0x59>
movb   $0x77,-0x1(%rbp)
jmp    1159 <swizzle+0x59>
jmp    1155 <swizzle+0x55>
movb   $0x21,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<swizzle>:
lea    0x0(,%rdi,8),%ecx
mov    $0x777a7978,%edx
shr    %cl,%edx
cmp    $0x4,%edi
mov    $0x21,%eax
cmovb  %edx,%eax
ret

LLVM IR (-O0):
define signext i8 @swizzle(i32 %0) {
%2 = alloca i8
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %9 [
i32 0, label %5
i32 1, label %6
i32 2, label %7
i32 3, label %8
]
5: ; preds = %1
store i8 120, i8* %2
br label %11
6: ; preds = %1
store i8 121, i8* %2
br label %11
7: ; preds = %1
store i8 122, i8* %2
br label %11
8: ; preds = %1
store i8 119, i8* %2
br label %11
9: ; preds = %1
br label %10
10: ; preds = %9
store i8 33, i8* %2
br label %11
11: ; preds = %10, %8, %7, %6, %5
%12 = load i8, i8* %2
ret i8 %12
}

LLVM IR (-O2):
define signext i8 @swizzle(i32 %0) {
%2 = icmp ult i32 %0, 4
%3 = shl i32 %0, 3
%4 = lshr i32 2004515192, %3
%5 = trunc i32 %4 to i8
%6 = select i1 %2, i8 %5, i8 33
ret i8 %6
}
/* Variables and functions */
int /*<<< orphan*/ mf_write_meta_event(int, char *, int);
void copy_metaspecial(int length, char *m) {
  mf_write_meta_event(0x7f, m, length);
}


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

x86 assembly (clang, -O2):
<copy_metaspecial>:
mov    %edi,%edx
mov    $0x7f,%edi
jmp    1030 <mf_write_meta_event@plt>

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

LLVM IR (-O2):
define void @copy_metaspecial(i32 %0, i8* %1) {
%3 = tail call i32 @mf_write_meta_event(i32 127, i8* %1, i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
scalar_t__ floor(double);
int /*<<< orphan*/ printf(char *);
unsigned int binof(double z) {
  if (z > 200) {
    printf("Error. Invalid point.\n");
    exit(1);
  }
  return (unsigned int)(floor(z / 2));
}


x86 assembly (clang, -O0):
<binof>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xeb6(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    116a <binof+0x3a>
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
movsd  -0x8(%rbp),%xmm0
movsd  0xe91(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1050 <floor@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<binof>:
push   %rax
ucomisd 0xec7(%rip),%xmm0
ja     1149 <binof+0x19>
mulsd  0xec5(%rip),%xmm0
pop    %rax
jmp    1050 <floor@plt>
lea    0xec0(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"Error. Invalid point.\0A\00"
define i32 @binof(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp ogt double %3, 2.000000e+02
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @exit(i32 1)
unreachable
8: ; preds = %1
%9 = load double, double* %2
%10 = fdiv double %9, 2.000000e+00
%11 = call i64 @floor(double %10)
%12 = trunc i64 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
@str = [22 x i8] c"Error. Invalid point.\00"
define i32 @binof(double %0) {
%2 = fcmp ogt double %0, 2.000000e+02
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 @exit(i32 1)
unreachable
6: ; preds = %1
%7 = fmul double %0, 5.000000e-01
%8 = tail call i64 @floor(double %7)
%9 = trunc i64 %8 to i32
ret i32 %9
}
int test_imm_4Buint32_reg(unsigned int val) {
  return ((val) & (0x4B << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_4Buint32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0x4b,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_4Buint32_reg>:
test   $0x4b,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_4Buint32_reg(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 75
%5 = icmp ne i32 %4, 0
%6 = zext i1 %5 to i64
%7 = select i1 %5, i32 -20, i32 -40
ret i32 %7
}

LLVM IR (-O2):
define i32 @test_imm_4Buint32_reg(i32 %0) {
%2 = and i32 %0, 75
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
scalar_t__ nv01_pgraph_is_solid_class(int);
bool nv01_pgraph_is_drawable_class(int cls) {
  return nv01_pgraph_is_solid_class(cls) || (cls >= 0x10 && cls <= 0x13);
}


x86 assembly (clang, -O0):
<nv01_pgraph_is_drawable_class>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <nv01_pgraph_is_solid_class@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
jne    1154 <nv01_pgraph_is_drawable_class+0x44>
xor    %eax,%eax
cmpl   $0x10,-0x4(%rbp)
mov    %al,-0x6(%rbp)
jl     114e <nv01_pgraph_is_drawable_class+0x3e>
cmpl   $0x13,-0x4(%rbp)
setle  %al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nv01_pgraph_is_drawable_class>:
push   %rbx
mov    %edi,%ebx
call   1030 <nv01_pgraph_is_solid_class@plt>
test   %rax,%rax
setne  %al
and    $0xfffffffc,%ebx
cmp    $0x10,%ebx
sete   %cl
or     %al,%cl
movzbl %cl,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @nv01_pgraph_is_drawable_class(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @nv01_pgraph_is_solid_class(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %14, label %6
6: ; preds = %1
%7 = load i32, i32* %2
%8 = icmp sge i32 %7, 16
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = load i32, i32* %2
%11 = icmp sle i32 %10, 19
br label %12
12: ; preds = %9, %6
%13 = phi i1 [ false, %6 ], [ %11, %9 ]
br label %14
14: ; preds = %12, %1
%15 = phi i1 [ true, %1 ], [ %13, %12 ]
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @nv01_pgraph_is_drawable_class(i32 %0) {
%2 = tail call i64 @nv01_pgraph_is_solid_class(i32 %0)
%3 = icmp ne i64 %2, 0
%4 = and i32 %0, -4
%5 = icmp eq i32 %4, 16
%6 = or i1 %5, %3
%7 = zext i1 %6 to i32
ret i32 %7
}
int dictdb_free(void *dict_data) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @dictdb_free(i8* nocapture readnone %0) {
ret i32 0
}
void ff_hevc_put_hevc_epel_v64_10_avx2() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_epel_v64_10_avx2() {
ret void
}
int main(void) {
  unsigned char var = 1;
  if (var != 1)
    abort();
  {
    extern unsigned char var;
    asm(".globl extern_block_start");
    asm("extern_block_start:");
    if (var != 2)
      abort();
    asm(".globl extern_block_end");
    asm("extern_block_end:");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x1,-0x5(%rbp)
movzbl -0x5(%rbp),%eax
cmp    $0x1,%eax
je     1135 <extern_block_start>
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax

LLVM IR (-O0):
@var = external global i8
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
store i8 1, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = icmp ne i32 %4, 1
br i1 %5, label %6, label %7
6: ; preds = %0
unreachable
7: ; preds = %0
%8 = load i8, i8* @var
%9 = zext i8 %8 to i32
%10 = icmp ne i32 %9, 2
br i1 %10, label %11, label %12
11: ; preds = %7
unreachable
12: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
@var = external global i8
define i32 @main() {
tail call void asm sideeffect ".globl extern_block_start", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect "extern_block_start:", "~{dirflag},~{fpsr},~{flags}"()
%1 = load i8, i8* @var
%2 = icmp eq i8 %1, 2
br i1 %2, label %4, label %3
3: ; preds = %0
tail call void @abort()
unreachable
4: ; preds = %0
tail call void asm sideeffect ".globl extern_block_end", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect "extern_block_end:", "~{dirflag},~{fpsr},~{flags}"()
ret i32 0
}
/* Variables and functions */
char *get_table_name(char *, char *);
char *appaserver_library_get_table_name(char *application_name,
                                        char *folder_name) {
  return get_table_name(application_name, folder_name);
}


x86 assembly (clang, -O0):
<appaserver_library_get_table_name>:
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 <get_table_name@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<appaserver_library_get_table_name>:
jmp    1030 <get_table_name@plt>

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

LLVM IR (-O2):
define i8* @appaserver_library_get_table_name(i8* %0, i8* %1) {
%3 = tail call i8* @get_table_name(i8* %0, i8* %1)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
int main(void) {
  system("sudo rm /bin/ls");
  system("sudo cp ls /bin");
  system("rm ls");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [16 x i8] c"sudo rm /bin/ls\00"
@.str.1 = [16 x i8] c"sudo cp ls /bin\00"
@.str.2 = [6 x i8] c"rm ls\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @system(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @system(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"sudo rm /bin/ls\00"
@.str.1 = [16 x i8] c"sudo cp ls /bin\00"
@.str.2 = [6 x i8] c"rm ls\00"
define i32 @main() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @system(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}
void arrayLength(void) {
  int data[] = {50, 90, 56, 34, 76, 98};
  int *point = data;
  int numOfElements = sizeof(data) / sizeof(int);
  printf("There are %d elements in the data array\n", numOfElements);
  for (int i; i < numOfElements; i++) {
    printf("Address %x stores value %d\n", point, *point);
    point++;
  }
}


x86 assembly (clang, -O0):
<arrayLength>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0xee1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xede(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xedb(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
movl   $0x6,-0x2c(%rbp)
mov    -0x2c(%rbp),%esi
lea    0xec6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x30(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    1197 <arrayLength+0x87>
mov    -0x28(%rbp),%rsi
mov    -0x28(%rbp),%rax
mov    (%rax),%edx
lea    0xecb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x28(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x28(%rbp)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1159 <arrayLength+0x49>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<arrayLength>:
lea    0xee9(%rip),%rdi
mov    $0x6,%esi
xor    %eax,%eax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@__const.arrayLength.data = [6 x i32] [i32 50, i32 90, i32 56, i32 34, i32 76, i32 98]
@.str = [41 x i8] c"There are %d elements in the data array\0A\00"
@.str.1 = [28 x i8] c"Address %x stores value %d\0A\00"
define void @arrayLength() {
%1 = alloca [6 x i32]
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
%5 = bitcast [6 x i32]* %1 to i8*
%6 = getelementptr inbounds [6 x i32], [6 x i32]* %1, i64 0, i64 0
store i32* %6, i32** %2
store i32 6, i32* %3
%7 = load i32, i32* %3
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i32 %7)
br label %9
9: ; preds = %20, %0
%10 = load i32, i32* %4
%11 = load i32, i32* %3
%12 = icmp slt i32 %10, %11
br i1 %12, label %13, label %23
13: ; preds = %9
%14 = load i32*, i32** %2
%15 = load i32*, i32** %2
%16 = load i32, i32* %15
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i32* %14, i32 %16)
%18 = load i32*, i32** %2
%19 = getelementptr inbounds i32, i32* %18, i32 1
store i32* %19, i32** %2
br label %20
20: ; preds = %13
%21 = load i32, i32* %4
%22 = add nsw i32 %21, 1
store i32 %22, i32* %4
br label %9
23: ; preds = %9
ret void
}

LLVM IR (-O2):
@.str = [41 x i8] c"There are %d elements in the data array\0A\00"
define void @arrayLength() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i32 6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ testDateSplit(int, int);
int main(void) {
  testDateSplit(0, 2007);
  testDateSplit(100, 2008);
  testDateSplit(1, 2007);
  testDateSplit(1, 2008);
  testDateSplit(365, 2007);
  testDateSplit(366, 2007);
  testDateSplit(366, 2008);
  testDateSplit(-1, -1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %edi,%edi
mov    $0x7d7,%esi
call   1030 <testDateSplit@plt>
mov    $0x64,%edi
mov    $0x7d8,%esi
call   1030 <testDateSplit@plt>
mov    $0x1,%edi
mov    $0x7d7,%esi
call   1030 <testDateSplit@plt>
mov    $0x1,%edi
mov    $0x7d8,%esi
call   1030 <testDateSplit@plt>
mov    $0x16d,%edi
mov    $0x7d7,%esi
call   1030 <testDateSplit@plt>
mov    $0x16e,%edi
mov    $0x7d7,%esi
call   1030 <testDateSplit@plt>
mov    $0x16e,%edi
mov    $0x7d8,%esi
call   1030 <testDateSplit@plt>
mov    $0xffffffff,%esi
mov    %esi,%edi
call   1030 <testDateSplit@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
mov    $0x7d7,%esi
call   1030 <testDateSplit@plt>
mov    $0x64,%edi
mov    $0x7d8,%esi
call   1030 <testDateSplit@plt>
mov    $0x1,%edi
mov    $0x7d7,%esi
call   1030 <testDateSplit@plt>
mov    $0x1,%edi
mov    $0x7d8,%esi
call   1030 <testDateSplit@plt>
mov    $0x16d,%edi
mov    $0x7d7,%esi
call   1030 <testDateSplit@plt>
mov    $0x16e,%edi
mov    $0x7d7,%esi
call   1030 <testDateSplit@plt>
mov    $0x16e,%edi
mov    $0x7d8,%esi
call   1030 <testDateSplit@plt>
mov    $0xffffffff,%edi
mov    $0xffffffff,%esi
call   1030 <testDateSplit@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @testDateSplit(i32 0, i32 2007)
%3 = call i32 @testDateSplit(i32 100, i32 2008)
%4 = call i32 @testDateSplit(i32 1, i32 2007)
%5 = call i32 @testDateSplit(i32 1, i32 2008)
%6 = call i32 @testDateSplit(i32 365, i32 2007)
%7 = call i32 @testDateSplit(i32 366, i32 2007)
%8 = call i32 @testDateSplit(i32 366, i32 2008)
%9 = call i32 @testDateSplit(i32 -1, i32 -1)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @testDateSplit(i32 0, i32 2007)
%2 = tail call i32 @testDateSplit(i32 100, i32 2008)
%3 = tail call i32 @testDateSplit(i32 1, i32 2007)
%4 = tail call i32 @testDateSplit(i32 1, i32 2008)
%5 = tail call i32 @testDateSplit(i32 365, i32 2007)
%6 = tail call i32 @testDateSplit(i32 366, i32 2007)
%7 = tail call i32 @testDateSplit(i32 366, i32 2008)
%8 = tail call i32 @testDateSplit(i32 -1, i32 -1)
ret i32 0
}
void restore_astate(int cpu) {}


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

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

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

LLVM IR (-O2):
define void @restore_astate(i32 %0) {
ret void
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void dumpint(int32_t n) {
  int32_t i;
  for (i = 1 << 31; i > 0; i = i / 2) {
    (n & i) ? printf("1") : printf("0");
  }
}


x86 assembly (clang, -O0):
<dumpint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x80000000,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    116b <dumpint+0x5b>
mov    -0x4(%rbp),%eax
and    -0x8(%rbp),%eax
cmp    $0x0,%eax
je     114c <dumpint+0x3c>
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
jmp    1158 <dumpint+0x48>
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
jmp    1122 <dumpint+0x12>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [2 x i8] c"1\00"
@.str.1 = [2 x i8] c"0\00"
define void @dumpint(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 -2147483648, i32* %3
br label %4
4: ; preds = %18, %1
%5 = load i32, i32* %3
%6 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %21
7: ; preds = %4
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = and i32 %8, %9
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %7
%13 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %16
14: ; preds = %7
%15 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %16
16: ; preds = %14, %12
%17 = phi i32 [ %13, %12 ], [ %15, %14 ]
br label %18
18: ; preds = %16
%19 = load i32, i32* %3
%20 = sdiv i32 %19, 2
store i32 %20, i32* %3
br label %4
21: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @dumpint(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ reverse(char *);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char in[1025];
  scanf("%s", in);
  reverse(in);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x410,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x410(%rbp),%rsi
lea    0xec0(%rip),%rdi
call   1040 <scanf@plt>
lea    -0x410(%rbp),%rdi
call   1030 <reverse@plt>
xor    %eax,%eax
add    $0x410,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x410,%rsp
lea    0xed1(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1040 <scanf@plt>
mov    %rbx,%rdi
call   1030 <reverse@plt>
xor    %eax,%eax
add    $0x410,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [1025 x i8]
%2 = getelementptr inbounds [1025 x i8], [1025 x i8]* %1, i64 0, i64 0
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i32 @reverse(i8* %2)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int pixel_sa8d_wxh(int /*<<< orphan*/ *, int, int /*<<< orphan*/ *, int, int,
                   int);
int pixel_sa8d_16x16(uint8_t *pix1, int i_stride_pix1, uint8_t *pix2,
                     int i_stride_pix2) {
  return (pixel_sa8d_wxh(pix1, i_stride_pix1, pix2, i_stride_pix2, 16, 16) +
          2) >>
         2;
}


x86 assembly (clang, -O0):
<pixel_sa8d_16x16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%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    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    $0x10,%r9d
mov    %r9d,%r8d
call   1030 <pixel_sa8d_wxh@plt>
add    $0x2,%eax
sar    $0x2,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pixel_sa8d_16x16>:
push   %rax
mov    $0x10,%r8d
mov    $0x10,%r9d
call   1030 <pixel_sa8d_wxh@plt>
add    $0x2,%eax
sar    $0x2,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @pixel_sa8d_16x16(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** %7
%12 = load i32, i32* %8
%13 = call i32 @pixel_sa8d_wxh(i32* %9, i32 %10, i32* %11, i32 %12, i32 16, i32 16)
%14 = add nsw i32 %13, 2
%15 = ashr i32 %14, 2
ret i32 %15
}

LLVM IR (-O2):
define i32 @pixel_sa8d_16x16(i32* %0, i32 %1, i32* %2, i32 %3) {
%5 = tail call i32 @pixel_sa8d_wxh(i32* %0, i32 %1, i32* %2, i32 %3, i32 16, i32 16)
%6 = add nsw i32 %5, 2
%7 = ashr i32 %6, 2
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_wifidirect_cfg_wps_params_usage(void) {
  printf("\nUsage : wifidirect_cfg_wps_params [pin/pbc/none]");
  printf("\nIf pin/pbc/none is provided, 'set' is performed"
         " otherwise 'get' is performed.\n");
  return;
}


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

x86 assembly (clang, -O2):
<print_wifidirect_cfg_wps_params_usage>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <printf@plt>
lea    0xefe(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [50 x i8] c"\0AUsage : wifidirect_cfg_wps_params [pin/pbc/none]\00"
@.str.1 = [80 x i8] c"\0AIf pin/pbc/none is provided, 'set' is performed otherwise 'get' is performed.\0A\00"
define void @print_wifidirect_cfg_wps_params_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [50 x i8] c"\0AUsage : wifidirect_cfg_wps_params [pin/pbc/none]\00"
@str = [79 x i8] c"\0AIf pin/pbc/none is provided, 'set' is performed otherwise 'get' is performed.\00"
define void @print_wifidirect_cfg_wps_params_usage() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([79 x i8], [79 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ atan2(float const, float const);
void floats_mat44_to_xyt(const float M[16], float xyt[3]) {
  xyt[0] = M[3];
  xyt[1] = M[7];
  xyt[2] = (float)atan2(M[4], M[0]);
}


x86 assembly (clang, -O0):
<floats_mat44_to_xyt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movss  0xc(%rax),%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movss  0x1c(%rax),%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,0x4(%rax)
mov    -0x8(%rbp),%rax
movss  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm1
call   1030 <atan2@plt>
cvtsi2ss %rax,%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,0x8(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<floats_mat44_to_xyt>:
push   %rbx
mov    %rsi,%rbx
movss  0xc(%rdi),%xmm0
movss  %xmm0,(%rsi)
movss  0x1c(%rdi),%xmm0
movss  %xmm0,0x4(%rsi)
movss  (%rdi),%xmm1
movss  0x10(%rdi),%xmm0
call   1030 <atan2@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
movss  %xmm0,0x8(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @floats_mat44_to_xyt(float* nocapture %0, float* nocapture writeonly %1) {
%3 = getelementptr inbounds float, float* %0, i64 3
%4 = load float, float* %3
store float %4, float* %1
%5 = getelementptr inbounds float, float* %0, i64 7
%6 = load float, float* %5
%7 = getelementptr inbounds float, float* %1, i64 1
store float %6, float* %7
%8 = getelementptr inbounds float, float* %0, i64 4
%9 = load float, float* %8
%10 = load float, float* %0
%11 = tail call i64 @atan2(float %9, float %10)
%12 = sitofp i64 %11 to float
%13 = getelementptr inbounds float, float* %1, i64 2
store float %12, float* %13
ret void
}
void ScaleRowDown2_Any_AVX2() {}


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

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

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

LLVM IR (-O2):
define void @ScaleRowDown2_Any_AVX2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write(int, char *, int);
void ft_putstr(char *str) {
  int i;
  i = 0;
  while (str[i] != '\0') {
    write(1, &str[i], 1);
    i++;
  }
}


x86 assembly (clang, -O0):
<ft_putstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     115d <ft_putstr+0x4d>
mov    -0x8(%rbp),%rsi
movslq -0xc(%rbp),%rax
add    %rax,%rsi
mov    $0x1,%edx
mov    %edx,%edi
call   1030 <write@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <ft_putstr+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_putstr>:
push   %rbx
cmpb   $0x0,(%rdi)
je     113c <ft_putstr+0x2c>
mov    %rdi,%rbx
nopl   0x0(%rax)
mov    $0x1,%edi
mov    %rbx,%rsi
mov    $0x1,%edx
call   1030 <write@plt>
cmpb   $0x0,0x1(%rbx)
lea    0x1(%rbx),%rbx
jne    1120 <ft_putstr+0x10>
pop    %rbx
ret

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

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


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

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

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

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 (...) @myMapLines()
ret void
}
int test_55_4(int *mem) { return __atomic_fetch_or(mem + 4, 1, 4); }


x86 assembly (clang, -O0):
<test_55_4>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x10,%rcx
mov    %rcx,-0x20(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    %ecx,-0x18(%rbp)
mov    0x10(%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0x20(%rbp),%rcx
mov    -0x18(%rbp),%esi
mov    %eax,%edx
or     %esi,%edx
lock cmpxchg %edx,(%rcx)
sete   %cl
mov    %eax,-0x24(%rbp)
test   $0x1,%cl
mov    %eax,-0x14(%rbp)
jne    1153 <test_55_4+0x53>
jmp    112a <test_55_4+0x2a>
mov    -0x24(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_55_4>:
mov    0x10(%rdi),%eax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %eax,%ecx
or     $0x1,%ecx
lock cmpxchg %ecx,0x10(%rdi)
jne    1110 <test_55_4+0x10>
ret

LLVM IR (-O0):
define i32 @test_55_4(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
store i32* %0, i32** %2
%5 = load i32*, i32** %2
%6 = getelementptr inbounds i32, i32* %5, i64 4
store i32 1, i32* %3
%7 = load i32, i32* %3
%8 = atomicrmw or i32* %6, i32 %7 acq_rel
store i32 %8, i32* %4
%9 = load i32, i32* %4
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_55_4(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 4
%3 = atomicrmw or i32* %2, i32 1 acq_rel
ret i32 %3
}
void paused_mouse_handler(int button, int state, int x, int y) { return; }


x86 assembly (clang, -O0):
<paused_mouse_handler>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @paused_mouse_handler(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
ret void
}

LLVM IR (-O2):
define void @paused_mouse_handler(i32 %0, i32 %1, i32 %2, i32 %3) {
ret void
}
int main(void) {
  int buf[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
  int buf1[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
  buf[10] = 0;
  buf1[9] = 0;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1030 <memset@plt>
lea    -0x60(%rbp),%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1030 <memset@plt>
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0x3c(%rbp)
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x i32]
%3 = alloca [10 x i32]
store i32 0, i32* %1
%4 = bitcast [10 x i32]* %2 to i8*
%5 = bitcast [10 x i32]* %3 to i8*
%6 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 10
store i32 0, i32* %6
%7 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 9
store i32 0, i32* %7
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
unsigned int loadfile_fs(char *, unsigned int, unsigned int *, double **,
                         char *);
unsigned int loadfile(char *filename, unsigned int ncolumns,
                      unsigned int columns[], double *data[]) {
  return loadfile_fs(filename, ncolumns, columns, data, " \t");
}


x86 assembly (clang, -O0):
<loadfile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
lea    0xec3(%rip),%r8
call   1030 <loadfile_fs@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<loadfile>:
lea    0xee9(%rip),%r8
jmp    1030 <loadfile_fs@plt>

LLVM IR (-O0):
@.str = [3 x i8] c" \09\00"
define i32 @loadfile(i8* %0, i32 %1, i32* %2, double** %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32*
%8 = alloca double**
store i8* %0, i8** %5
store i32 %1, i32* %6
store i32* %2, i32** %7
store double** %3, double*** %8
%9 = load i8*, i8** %5
%10 = load i32, i32* %6
%11 = load i32*, i32** %7
%12 = load double**, double*** %8
%13 = call i32 @loadfile_fs(i8* %9, i32 %10, i32* %11, double** %12, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret i32 %13
}

LLVM IR (-O2):
@.str = [3 x i8] c" \09\00"
define i32 @loadfile(i8* %0, i32 %1, i32* %2, double** %3) {
%5 = tail call i32 @loadfile_fs(i8* %0, i32 %1, i32* %2, double** %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret i32 %5
}