xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ shf_snprintf(char *, int, char *, char const *const);
char *plain_fmt_entry(char *buf, int buflen, int i, const void *arg) {
  shf_snprintf(buf, buflen, "%s", ((const char *const *)arg)[i]);
  return (buf);
}


x86 assembly (clang, -O0):
<plain_fmt_entry>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rcx
lea    0xec0(%rip),%rdx
call   1030 <shf_snprintf@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<plain_fmt_entry>:
push   %rbx
mov    %rdi,%rbx
movslq %edx,%rax
mov    (%rcx,%rax,8),%rcx
lea    0xede(%rip),%rdx
call   1030 <shf_snprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define i8* @plain_fmt_entry(i8* %0, i32 %1, i32 %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8*
store i8* %0, i8** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i8* %3, i8** %8
%9 = load i8*, i8** %5
%10 = load i32, i32* %6
%11 = load i8*, i8** %8
%12 = bitcast i8* %11 to i8**
%13 = load i32, i32* %7
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8*, i8** %12, i64 %14
%16 = load i8*, i8** %15
%17 = call i32 @shf_snprintf(i8* %9, i32 %10, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %16)
%18 = load i8*, i8** %5
ret i8* %18
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i8* @plain_fmt_entry(i8* returned %0, i32 %1, i32 %2, i8* nocapture %3) {
%5 = bitcast i8* %3 to i8**
%6 = sext i32 %2 to i64
%7 = getelementptr inbounds i8*, i8** %5, i64 %6
%8 = load i8*, i8** %7
%9 = tail call i32 @shf_snprintf(i8* %0, i32 %1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %8)
ret i8* %0
}
void f3(void) { static int a3; }


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

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

LLVM IR (-O0):
@f3.a3 = internal global i32 0
define void @f3() {
ret void
}

LLVM IR (-O2):
define void @f3() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(int iscompress) {
  if (iscompress)
    (void)fprintf(stderr, "usage: compress [-cfv] [-b bits] [file ...]\n");
  else
    (void)fprintf(stderr, "usage: uncompress [-c] [-b bits] [file ...]\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     114f <usage+0x2f>
mov    0x2ea4(%rip),%rax
mov    (%rax),%edi
lea    0xebb(%rip),%rsi
call   1030 <fprintf@plt>
jmp    1164 <usage+0x44>
mov    0x2e8a(%rip),%rax
mov    (%rax),%edi
lea    0xece(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
test   %edi,%edi
mov    0x2eb6(%rip),%rax
mov    (%rax),%edi
lea    0xefa(%rip),%rax
lea    0xec6(%rip),%rsi
cmove  %rax,%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [45 x i8] c"usage: compress [-cfv] [-b bits] [file ...]\0A\00"
@.str.1 = [45 x i8] c"usage: uncompress [-c] [-b bits] [file ...]\0A\00"
define void @usage(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* @stderr
%7 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
br label %11
8: ; preds = %1
%9 = load i32, i32* @stderr
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.1, i64 0, i64 0))
br label %11
11: ; preds = %8, %5
%12 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [45 x i8] c"usage: compress [-cfv] [-b bits] [file ...]\0A\00"
@.str.1 = [45 x i8] c"usage: uncompress [-c] [-b bits] [file ...]\0A\00"
define void @usage(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = load i32, i32* @stderr
%4 = select i1 %2, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0)
%5 = tail call i32 @fprintf(i32 %3, i8* %4)
%6 = tail call i32 @exit(i32 1)
unreachable
}
int btrfs_test_extent_io(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @btrfs_test_extent_io() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ a(int);
int main(void) { a(2); }


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @a(i32 2)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @a(i32 2)
ret i32 0
}
void fc231(int n) {
  {
    typedef int(*b)[n];
    {
      typedef int(*c)[n];
      0;
    }
    {
      typedef int(*d)[n];
      0;
    };
    typedef int(*e)[n];
    0;
  };
  {
    typedef int(*f)[n];
    {
      typedef int(*g)[n];
      0;
    };
  a : {
    typedef int(*h)[n];
    0;
  };
    ;
    typedef int(*i)[n];
    goto a;
    0;
  };
  ;
  typedef int(*j)[n];
  0;
}


x86 assembly (clang, -O0):
<fc231>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
jmp    1107 <fc231+0x7>

x86 assembly (clang, -O2):
<fc231>:
jmp    1100 <fc231>

LLVM IR (-O0):
define void @fc231(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = zext i32 %3 to i64
%5 = load i32, i32* %2
%6 = zext i32 %5 to i64
%7 = load i32, i32* %2
%8 = zext i32 %7 to i64
%9 = load i32, i32* %2
%10 = zext i32 %9 to i64
%11 = load i32, i32* %2
%12 = zext i32 %11 to i64
%13 = load i32, i32* %2
%14 = zext i32 %13 to i64
br label %15
15: ; preds = %15, %1
%16 = load i32, i32* %2
%17 = zext i32 %16 to i64
%18 = load i32, i32* %2
%19 = zext i32 %18 to i64
br label %15
20: ; No predecessors!
%21 = load i32, i32* %2
%22 = zext i32 %21 to i64
ret void
}

LLVM IR (-O2):
define void @fc231(i32 %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
/* Type definitions */
union i2c_smbus_data {
  unsigned char byte;
};

/* Variables and functions */
int /*<<< orphan*/ I2C_SMBUS_BYTE_DATA;
int /*<<< orphan*/ I2C_SMBUS_WRITE;
long i2c_smbus_access(int, int /*<<< orphan*/, unsigned char,
                      int /*<<< orphan*/, union i2c_smbus_data *);
long i2c_smbus_write_byte_data(int file, unsigned char command,
                               unsigned char value) {
  union i2c_smbus_data data;
  data.byte = value;
  return i2c_smbus_access(file, I2C_SMBUS_WRITE, command, I2C_SMBUS_BYTE_DATA,
                          &data);
}


x86 assembly (clang, -O0):
<i2c_smbus_write_byte_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dl,%al
mov    %sil,%cl
mov    %edi,-0x4(%rbp)
mov    %cl,-0x5(%rbp)
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
mov    %al,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ea2(%rip),%rax
mov    (%rax),%esi
mov    -0x5(%rbp),%al
mov    0x2ea6(%rip),%rcx
mov    (%rcx),%ecx
lea    -0x8(%rbp),%r8
movzbl %al,%edx
call   1030 <i2c_smbus_access@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2c_smbus_write_byte_data>:
push   %rax
mov    %esi,%eax
mov    %dl,(%rsp)
mov    0x2ebb(%rip),%rcx
mov    (%rcx),%esi
mov    0x2ec2(%rip),%rcx
mov    (%rcx),%ecx
mov    %rsp,%r8
mov    %eax,%edx
call   1030 <i2c_smbus_access@plt>
pop    %rcx
ret

LLVM IR (-O0):
%union.i2c_smbus_data = type { i8 }
@I2C_SMBUS_WRITE = global i32 0
@I2C_SMBUS_BYTE_DATA = global i32 0
define i64 @i2c_smbus_write_byte_data(i32 %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i32
%5 = alloca i8
%6 = alloca i8
%7 = alloca %union.i2c_smbus_data
store i32 %0, i32* %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%8 = load i8, i8* %6
%9 = bitcast %union.i2c_smbus_data* %7 to i8*
store i8 %8, i8* %9
%10 = load i32, i32* %4
%11 = load i32, i32* @I2C_SMBUS_WRITE
%12 = load i8, i8* %5
%13 = load i32, i32* @I2C_SMBUS_BYTE_DATA
%14 = call i64 @i2c_smbus_access(i32 %10, i32 %11, i8 zeroext %12, i32 %13, %union.i2c_smbus_data* %7)
ret i64 %14
}

LLVM IR (-O2):
%union.i2c_smbus_data = type { i8 }
@I2C_SMBUS_WRITE = global i32 0
@I2C_SMBUS_BYTE_DATA = global i32 0
define i64 @i2c_smbus_write_byte_data(i32 %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca %union.i2c_smbus_data
%5 = getelementptr inbounds %union.i2c_smbus_data, %union.i2c_smbus_data* %4, i64 0, i32 0
store i8 %2, i8* %5
%6 = load i32, i32* @I2C_SMBUS_WRITE
%7 = load i32, i32* @I2C_SMBUS_BYTE_DATA
%8 = call i64 @i2c_smbus_access(i32 %0, i32 %6, i8 zeroext %1, i32 %7, %union.i2c_smbus_data* %4)
ret i64 %8
}
/* Variables and functions */
int /*<<< orphan*/ LC_ALL;
int isxdigit(int);
int /*<<< orphan*/ setlocale(int /*<<< orphan*/, char *);
int ls_isxdigit(int c) {
  int ret;
  setlocale(LC_ALL, "");
  ret = isxdigit(c);
  setlocale(LC_ALL, "C");
  return ret;
}


x86 assembly (clang, -O0):
<ls_isxdigit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
lea    0xec6(%rip),%rsi
call   1030 <setlocale@plt>
mov    -0x4(%rbp),%edi
call   1040 <isxdigit@plt>
mov    %eax,-0x8(%rbp)
mov    0x2e8e(%rip),%rax
mov    (%rax),%edi
lea    0xea5(%rip),%rsi
call   1030 <setlocale@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ls_isxdigit>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
mov    0x2eb3(%rip),%r14
mov    (%r14),%edi
lea    0xeca(%rip),%rsi
call   1030 <setlocale@plt>
mov    %ebx,%edi
call   1040 <isxdigit@plt>
mov    %eax,%ebx
mov    (%r14),%edi
lea    0xeb1(%rip),%rsi
call   1030 <setlocale@plt>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@LC_ALL = global i32 0
@.str = [1 x i8] zeroinitializer
@.str.1 = [2 x i8] c"C\00"
define i32 @ls_isxdigit(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* @LC_ALL
%5 = call i32 @setlocale(i32 %4, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* %2
%7 = call i32 @isxdigit(i32 %6)
store i32 %7, i32* %3
%8 = load i32, i32* @LC_ALL
%9 = call i32 @setlocale(i32 %8, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%10 = load i32, i32* %3
ret i32 %10
}

LLVM IR (-O2):
@LC_ALL = global i32 0
@.str = [1 x i8] zeroinitializer
@.str.1 = [2 x i8] c"C\00"
define i32 @ls_isxdigit(i32 %0) {
%2 = load i32, i32* @LC_ALL
%3 = tail call i32 @setlocale(i32 %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @isxdigit(i32 %0)
%5 = load i32, i32* @LC_ALL
%6 = tail call i32 @setlocale(i32 %5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret i32 %4
}
/* Type definitions */
typedef size_t ptrdiff_t;

/* Variables and functions */
char *strcpy(char *dest, const char *src) {
  char c;
  char *s = (char *)src;
  const ptrdiff_t off = dest - s - 1;
  do {
    c = *s++;
    s[off] = c;
  } while (c != 0);
  return dest;
}


x86 assembly (clang, -O0):
<strcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x20(%rbp),%rcx
sub    %rcx,%rax
sub    $0x1,%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x20(%rbp)
mov    (%rax),%al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%dl
mov    -0x20(%rbp),%rax
mov    -0x28(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
movsbl -0x11(%rbp),%eax
cmp    $0x0,%eax
jne    1127 <strcpy+0x27>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpy>:
mov    %rdi,%rax
mov    %rdi,%rcx
sub    %rsi,%rcx
nopl   0x0(%rax)
movzbl (%rsi),%edx
mov    %dl,(%rsi,%rcx,1)
add    $0x1,%rsi
test   %dl,%dl
jne    1110 <strcpy+0x10>
ret

LLVM IR (-O0):
define i8* @strcpy(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8*
%7 = alloca i64
store i8* %0, i8** %3
store i8* %1, i8** %4
%8 = load i8*, i8** %4
store i8* %8, i8** %6
%9 = load i8*, i8** %3
%10 = load i8*, i8** %6
%11 = ptrtoint i8* %9 to i64
%12 = ptrtoint i8* %10 to i64
%13 = sub i64 %11, %12
%14 = sub nsw i64 %13, 1
store i64 %14, i64* %7
br label %15
15: ; preds = %23, %2
%16 = load i8*, i8** %6
%17 = getelementptr inbounds i8, i8* %16, i32 1
store i8* %17, i8** %6
%18 = load i8, i8* %16
store i8 %18, i8* %5
%19 = load i8, i8* %5
%20 = load i8*, i8** %6
%21 = load i64, i64* %7
%22 = getelementptr inbounds i8, i8* %20, i64 %21
store i8 %19, i8* %22
br label %23
23: ; preds = %15
%24 = load i8, i8* %5
%25 = sext i8 %24 to i32
%26 = icmp ne i32 %25, 0
br i1 %26, label %15, label %27
27: ; preds = %23
%28 = load i8*, i8** %3
ret i8* %28
}

LLVM IR (-O2):
define i8* @strcpy(i8* returned %0, i8* %1) {
%3 = ptrtoint i8* %0 to i64
%4 = ptrtoint i8* %1 to i64
%5 = xor i64 %4, -1
%6 = add i64 %5, %3
br label %7
7: ; preds = %7, %2
%8 = phi i8* [ %1, %2 ], [ %9, %7 ]
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = load i8, i8* %8
%11 = getelementptr inbounds i8, i8* %9, i64 %6
store i8 %10, i8* %11
%12 = icmp eq i8 %10, 0
br i1 %12, label %13, label %7
13: ; preds = %7
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ copy_int_array(int *, int *, int);
int *malloc(int);
int *clone_int_array(int a[], int length) {
  int *clone = malloc(sizeof(int) * length);
  copy_int_array(a, clone, length);
  return clone;
}


x86 assembly (clang, -O0):
<clone_int_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <copy_int_array@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clone_int_array>:
push   %r15
push   %r14
push   %rbx
mov    %esi,%r15d
mov    %rdi,%r14
lea    0x0(,%r15,4),%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    %r14,%rdi
mov    %rax,%rsi
mov    %r15d,%edx
call   1030 <copy_int_array@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32* @clone_int_array(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32*
store i32* %0, i32** %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = sext i32 %6 to i64
%8 = mul i64 4, %7
%9 = trunc i64 %8 to i32
%10 = call i32* @malloc(i32 %9)
store i32* %10, i32** %5
%11 = load i32*, i32** %3
%12 = load i32*, i32** %5
%13 = load i32, i32* %4
%14 = call i32 @copy_int_array(i32* %11, i32* %12, i32 %13)
%15 = load i32*, i32** %5
ret i32* %15
}

LLVM IR (-O2):
define i32* @clone_int_array(i32* %0, i32 %1) {
%3 = shl i32 %1, 2
%4 = tail call i32* @malloc(i32 %3)
%5 = tail call i32 @copy_int_array(i32* %0, i32* %4, i32 %1)
ret i32* %4
}
/* Variables and functions */
int /*<<< orphan*/ cat2(char *, char *);
char *cat3(int /*<<< orphan*/, int /*<<< orphan*/, char *);
char *cat5(char *str1, char *str2, char *str3, char *str4, char *str5) {
  return cat3(cat2(str1, str2), cat2(str3, str4), str5);
}


x86 assembly (clang, -O0):
<cat5>:
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    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <cat2@plt>
mov    %eax,-0x2c(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1040 <cat2@plt>
mov    -0x2c(%rbp),%edi
mov    %eax,%esi
mov    -0x28(%rbp),%rdx
call   1030 <cat3@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cat5>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %r8,%r14
mov    %rcx,%r15
mov    %rdx,%rbx
call   1040 <cat2@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
mov    %r15,%rsi
call   1040 <cat2@plt>
mov    %ebp,%edi
mov    %eax,%esi
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <cat3@plt>

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

LLVM IR (-O2):
define i8* @cat5(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4) {
%6 = tail call i32 @cat2(i8* %0, i8* %1)
%7 = tail call i32 @cat2(i8* %2, i8* %3)
%8 = tail call i8* @cat3(i32 %6, i32 %7, i8* %4)
ret i8* %8
}
/* Variables and functions */
int /*<<< orphan*/ print_hex1(unsigned int);
void print_hex8(unsigned v) {
  int i;
  for (i = 8; i; --i) {
    print_hex1((v >> 28) & 0xF);
    v <<= 4;
  }
}


x86 assembly (clang, -O0):
<print_hex8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x8,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1151 <print_hex8+0x41>
mov    -0x4(%rbp),%edi
shr    $0x1c,%edi
and    $0xf,%edi
call   1030 <print_hex1@plt>
mov    -0x4(%rbp),%eax
shl    $0x4,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <print_hex8+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_hex8>:
push   %rbx
mov    %edi,%ebx
shr    $0x1c,%edi
call   1030 <print_hex1@plt>
mov    %ebx,%edi
shr    $0x18,%edi
and    $0xf,%edi
call   1030 <print_hex1@plt>
mov    %ebx,%edi
shr    $0x14,%edi
and    $0xf,%edi
call   1030 <print_hex1@plt>
mov    %ebx,%edi
shr    $0x10,%edi
and    $0xf,%edi
call   1030 <print_hex1@plt>
mov    %ebx,%edi
shr    $0xc,%edi
and    $0xf,%edi
call   1030 <print_hex1@plt>
mov    %ebx,%edi
shr    $0x8,%edi
and    $0xf,%edi
call   1030 <print_hex1@plt>
mov    %ebx,%edi
shr    $0x4,%edi
and    $0xf,%edi
call   1030 <print_hex1@plt>
and    $0xf,%ebx
mov    %ebx,%edi
pop    %rbx
jmp    1030 <print_hex1@plt>

LLVM IR (-O0):
define void @print_hex8(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 8, i32* %3
br label %4
4: ; preds = %14, %1
%5 = load i32, i32* %3
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %17
7: ; preds = %4
%8 = load i32, i32* %2
%9 = lshr i32 %8, 28
%10 = and i32 %9, 15
%11 = call i32 @print_hex1(i32 %10)
%12 = load i32, i32* %2
%13 = shl i32 %12, 4
store i32 %13, i32* %2
br label %14
14: ; preds = %7
%15 = load i32, i32* %3
%16 = add nsw i32 %15, -1
store i32 %16, i32* %3
br label %4
17: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @print_hex8(i32 %0) {
%2 = lshr i32 %0, 28
%3 = tail call i32 @print_hex1(i32 %2)
%4 = lshr i32 %0, 24
%5 = and i32 %4, 15
%6 = tail call i32 @print_hex1(i32 %5)
%7 = lshr i32 %0, 20
%8 = and i32 %7, 15
%9 = tail call i32 @print_hex1(i32 %8)
%10 = lshr i32 %0, 16
%11 = and i32 %10, 15
%12 = tail call i32 @print_hex1(i32 %11)
%13 = lshr i32 %0, 12
%14 = and i32 %13, 15
%15 = tail call i32 @print_hex1(i32 %14)
%16 = lshr i32 %0, 8
%17 = and i32 %16, 15
%18 = tail call i32 @print_hex1(i32 %17)
%19 = lshr i32 %0, 4
%20 = and i32 %19, 15
%21 = tail call i32 @print_hex1(i32 %20)
%22 = and i32 %0, 15
%23 = tail call i32 @print_hex1(i32 %22)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ nondet_cancel();
void nondet_assume(int expr) {
  if (!expr) {
    nondet_cancel();
  }
}


x86 assembly (clang, -O0):
<nondet_assume>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    112c <nondet_assume+0x1c>
mov    $0x0,%al
call   1030 <nondet_cancel@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nondet_assume>:
test   %edi,%edi
je     1115 <nondet_assume+0x5>
ret
xor    %eax,%eax
jmp    1030 <nondet_cancel@plt>

LLVM IR (-O0):
define void @nondet_assume(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = call i32 (...) @nondet_cancel()
br label %7
7: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @nondet_assume(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 (...) @nondet_cancel()
br label %5
5: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
char *getprogname();
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "usage: %s [-dhnv] [-f file]\n", getprogname());
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2eb1(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <getprogname@plt>
mov    -0x4(%rbp),%edi
mov    %rax,%rdx
lea    0xeb8(%rip),%rsi
call   1040 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    0x2eb8(%rip),%rax
mov    (%rax),%ebx
xor    %eax,%eax
call   1030 <getprogname@plt>
lea    0xec8(%rip),%rsi
mov    %ebx,%edi
mov    %rax,%rdx
pop    %rbx
jmp    1040 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [29 x i8] c"usage: %s [-dhnv] [-f file]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i8* (...) @getprogname()
%3 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %2)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [29 x i8] c"usage: %s [-dhnv] [-f file]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i8* (...) @getprogname()
%3 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %2)
ret void
}
/* Variables and functions */
int atoi(char *);
char *getenv(char const *);
int getenv_int(const char *v, int *y) {
  char *x = getenv(v);
  if (!x)
    return 0;
  *y = atoi(x);
  return 1;
}


x86 assembly (clang, -O0):
<getenv_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1154 <getenv_int+0x34>
movl   $0x0,-0x4(%rbp)
jmp    116c <getenv_int+0x4c>
mov    -0x20(%rbp),%rdi
call   1040 <atoi@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getenv_int>:
push   %rbx
mov    %rsi,%rbx
call   1030 <getenv@plt>
test   %rax,%rax
je     113f <getenv_int+0x1f>
mov    %rax,%rdi
call   1040 <atoi@plt>
mov    %eax,(%rbx)
mov    $0x1,%eax
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @getenv_int(i8* nocapture %0, i32* nocapture writeonly %1) {
%3 = tail call i8* @getenv(i8* %0)
%4 = icmp eq i8* %3, null
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @atoi(i8* %3)
store i32 %6, i32* %1
br label %7
7: ; preds = %2, %5
%8 = phi i32 [ 1, %5 ], [ 0, %2 ]
ret i32 %8
}
void gtk_curve_type_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gtk_curve_type_get_type() {
ret void
}
/* Variables and functions */
size_t size_str_width(size_t x) {
  size_t width = 0;
  do {
    x /= 10;
    width++;
  } while (x);
  return width;
}


x86 assembly (clang, -O0):
<size_str_width>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    $0xa,%ecx
xor    %edx,%edx
div    %rcx
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1110 <size_str_width+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<size_str_width>:
xor    %ecx,%ecx
movabs $0xcccccccccccccccd,%rsi
cc cc cc
nopl   0x0(%rax)
mov    %rdi,%rax
mul    %rsi
shr    $0x3,%rdx
add    $0x1,%rcx
cmp    $0x9,%rdi
mov    %rdx,%rdi
ja     1110 <size_str_width+0x10>
mov    %rcx,%rax
ret

LLVM IR (-O0):
define i64 @size_str_width(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
store i64 0, i64* %3
br label %4
4: ; preds = %9, %1
%5 = load i64, i64* %2
%6 = udiv i64 %5, 10
store i64 %6, i64* %2
%7 = load i64, i64* %3
%8 = add i64 %7, 1
store i64 %8, i64* %3
br label %9
9: ; preds = %4
%10 = load i64, i64* %2
%11 = icmp ne i64 %10, 0
br i1 %11, label %4, label %12
12: ; preds = %9
%13 = load i64, i64* %3
ret i64 %13
}

LLVM IR (-O2):
define i64 @size_str_width(i64 %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %0, %1 ], [ %5, %2 ]
%4 = phi i64 [ 0, %1 ], [ %6, %2 ]
%5 = udiv i64 %3, 10
%6 = add i64 %4, 1
%7 = icmp ult i64 %3, 10
br i1 %7, label %8, label %2
8: ; preds = %2
ret i64 %6
}
void testClosureSLLrV(void (*closure)(short, long long), short a1,
                      long long a2) {
  (*closure)(a1, a2);
}


x86 assembly (clang, -O0):
<testClosureSLLrV>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xa(%rbp),%cx
mov    -0x18(%rbp),%rsi
movswl %cx,%edi
call   *%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testClosureSLLrV>:
mov    %rdi,%rax
mov    %esi,%edi
mov    %rdx,%rsi
jmp    *%rax

LLVM IR (-O0):
define void @testClosureSLLrV(void (i16, i64)* %0, i16 signext %1, i64 %2) {
%4 = alloca void (i16, i64)*
%5 = alloca i16
%6 = alloca i64
store void (i16, i64)* %0, void (i16, i64)** %4
store i16 %1, i16* %5
store i64 %2, i64* %6
%7 = load void (i16, i64)*, void (i16, i64)** %4
%8 = load i16, i16* %5
%9 = load i64, i64* %6
ret void
}

LLVM IR (-O2):
define void @testClosureSLLrV(void (i16, i64)* nocapture %0, i16 signext %1, i64 %2) {
tail call void %0(i16 signext %1, i64 %2)
ret void
}
/* Variables and functions */
int O_CREAT;
int /*<<< orphan*/ __fortify_fail(char *);
int __open(char const *, int);
int __open_2(const char *file, int oflag) {
  if (oflag & O_CREAT)
    __fortify_fail("invalid open call: O_CREAT without mode");
  return __open(file, oflag);
}


x86 assembly (clang, -O0):
<__open_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    0x2ebf(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     1150 <__open_2+0x30>
lea    0xeb5(%rip),%rdi
call   1040 <__fortify_fail@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <__open@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__open_2>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
mov    0x2ec8(%rip),%rax
test   %esi,(%rax)
je     1140 <__open_2+0x20>
lea    0xec5(%rip),%rdi
call   1040 <__fortify_fail@plt>
mov    %r14,%rdi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <__open@plt>

LLVM IR (-O0):
@O_CREAT = global i32 0
@.str = [40 x i8] c"invalid open call: O_CREAT without mode\00"
define i32 @__open_2(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32, i32* @O_CREAT
%7 = and i32 %5, %6
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = call i32 @__fortify_fail(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %9, %2
%12 = load i8*, i8** %3
%13 = load i32, i32* %4
%14 = call i32 @__open(i8* %12, i32 %13)
ret i32 %14
}

LLVM IR (-O2):
@O_CREAT = global i32 0
@.str = [40 x i8] c"invalid open call: O_CREAT without mode\00"
define i32 @__open_2(i8* %0, i32 %1) {
%3 = load i32, i32* @O_CREAT
%4 = and i32 %3, %1
%5 = icmp eq i32 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 @__fortify_fail(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %2
%9 = tail call i32 @__open(i8* %0, i32 %1)
ret i32 %9
}
/* Type definitions */
struct glx_context {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct glx_context *);
int /*<<< orphan*/ glx_term_context(struct glx_context *);
void glx_free_context(struct glx_context *ctx) {
  glx_term_context(ctx);
  free(ctx);
}


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

x86 assembly (clang, -O2):
<glx_free_context>:
push   %rbx
mov    %rdi,%rbx
call   1040 <glx_term_context@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.glx_context = type { i32 }
define void @glx_free_context(%struct.glx_context* %0) {
%2 = alloca %struct.glx_context*
store %struct.glx_context* %0, %struct.glx_context** %2
%3 = load %struct.glx_context*, %struct.glx_context** %2
%4 = call i32 @glx_term_context(%struct.glx_context* %3)
%5 = load %struct.glx_context*, %struct.glx_context** %2
%6 = call i32 @free(%struct.glx_context* %5)
ret void
}

LLVM IR (-O2):
%struct.glx_context = type { i32 }
define void @glx_free_context(%struct.glx_context* %0) {
%2 = tail call i32 @glx_term_context(%struct.glx_context* %0)
%3 = tail call i32 @free(%struct.glx_context* %0)
ret void
}
void RTFileAioCtxWait(void) {}


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

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

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

LLVM IR (-O2):
define void @RTFileAioCtxWait() {
ret void
}
int exynos_check_aud_pwr(void) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @exynos_check_aud_pwr() {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
void imprime_vetor(int n, double b[]) {
  int i;
  for (i = 0; i < n; i++) {
    printf("%.5e\n", b[i]);
  }
}


x86 assembly (clang, -O0):
<imprime_vetor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1159 <imprime_vetor+0x49>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1126 <imprime_vetor+0x16>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<imprime_vetor>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %edi,%edi
jle    1147 <imprime_vetor+0x37>
mov    %rsi,%r15
mov    %edi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r14
nopl   0x0(%rax,%rax,1)
movsd  (%r15,%rbx,8),%xmm0
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <imprime_vetor+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%.5e\0A\00"
define void @imprime_vetor(i32 %0, double* %1) {
%3 = alloca i32
%4 = alloca double*
%5 = alloca i32
store i32 %0, i32* %3
store double* %1, double** %4
store i32 0, i32* %5
br label %6
6: ; preds = %17, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %3
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %20
10: ; preds = %6
%11 = load double*, double** %4
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds double, double* %11, i64 %13
%15 = load double, double* %14
%16 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), double %15)
br label %17
17: ; preds = %10
%18 = load i32, i32* %5
%19 = add nsw i32 %18, 1
store i32 %19, i32* %5
br label %6
20: ; preds = %6
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"%.5e\0A\00"
define void @imprime_vetor(i32 %0, double* nocapture %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds double, double* %1, i64 %7
%9 = load double, double* %8
%10 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), double %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
ret void
}
void mDo(struct menu *m) { return; }


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

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

LLVM IR (-O0):
%struct.menu = type opaque
define void @mDo(%struct.menu* %0) {
%2 = alloca %struct.menu*
store %struct.menu* %0, %struct.menu** %2
ret void
}

LLVM IR (-O2):
%struct.menu = type opaque
define void @mDo(%struct.menu* nocapture %0) {
ret void
}
/* Variables and functions */
float smstr2nv_static(char *);
float smstr2nv(char *note, char *root) {
  return smstr2nv_static(note) - smstr2nv_static(root);
}


x86 assembly (clang, -O0):
<smstr2nv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <smstr2nv_static@plt>
movss  %xmm0,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <smstr2nv_static@plt>
movaps %xmm0,%xmm1
movss  -0x14(%rbp),%xmm0
subss  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<smstr2nv>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
call   1030 <smstr2nv_static@plt>
movss  %xmm0,0xc(%rsp)
mov    %rbx,%rdi
call   1030 <smstr2nv_static@plt>
movss  0xc(%rsp),%xmm1
subss  %xmm0,%xmm1
movaps %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define float @smstr2nv(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 = call float @smstr2nv_static(i8* %5)
%7 = load i8*, i8** %4
%8 = call float @smstr2nv_static(i8* %7)
%9 = fsub float %6, %8
ret float %9
}

LLVM IR (-O2):
define float @smstr2nv(i8* %0, i8* %1) {
%3 = tail call float @smstr2nv_static(i8* %0)
%4 = tail call float @smstr2nv_static(i8* %1)
%5 = fsub float %3, %4
ret float %5
}
OP(ed, d4) {}


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

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

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

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ Openspace();
int main() {
  Openspace();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <Openspace@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @Openspace()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @Openspace()
ret i32 0
}
void logState() {}


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

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

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

LLVM IR (-O2):
define void @logState() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ read_message(int *, int *);
int /*<<< orphan*/ reverse_message(int *, int *);
int main(void) {
  int message[81] = {0};
  int len = 0;
  int *chars = &len;
  read_message(message, chars);
  reverse_message(message, chars);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x160,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x150(%rbp),%rdi
xor    %esi,%esi
mov    $0x144,%edx
call   1040 <memset@plt>
movl   $0x0,-0x154(%rbp)
lea    -0x154(%rbp),%rax
mov    %rax,-0x160(%rbp)
lea    -0x150(%rbp),%rdi
mov    -0x160(%rbp),%rsi
call   1050 <read_message@plt>
lea    -0x150(%rbp),%rdi
mov    -0x160(%rbp),%rsi
call   1030 <reverse_message@plt>
xor    %eax,%eax
add    $0x160,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x158,%rsp
lea    0x10(%rsp),%rbx
mov    $0x144,%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1040 <memset@plt>
movl   $0x0,0xc(%rsp)
lea    0xc(%rsp),%r14
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <read_message@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <reverse_message@plt>
xor    %eax,%eax
add    $0x158,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [81 x i32]
%2 = alloca i32
%3 = bitcast [81 x i32]* %1 to i8*
%4 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%5 = getelementptr inbounds [81 x i32], [81 x i32]* %1, i64 0, i64 0
%6 = call i32 @read_message(i32* %5, i32* %2)
%7 = call i32 @reverse_message(i32* %5, i32* %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ set_io_bit(int, int);
void TOSH_MAKE_CC_FIFO_OUTPUT() { set_io_bit(-6, 2); }


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

x86 assembly (clang, -O2):
<TOSH_MAKE_CC_FIFO_OUTPUT>:
mov    $0xfffffffa,%edi
mov    $0x2,%esi
jmp    1030 <set_io_bit@plt>

LLVM IR (-O0):
define void @TOSH_MAKE_CC_FIFO_OUTPUT() {
%1 = call i32 @set_io_bit(i32 -6, i32 2)
ret void
}

LLVM IR (-O2):
define void @TOSH_MAKE_CC_FIFO_OUTPUT() {
%1 = tail call i32 @set_io_bit(i32 -6, i32 2)
ret void
}
/* Variables and functions */
int _strlen(char *);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, const char *argv[]) {
  int len;
  static char s[] = "It is";
  len = _strlen(s);
  printf("Length of s is %d\n", len);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0x2f08(%rip),%rdi
call   1030 <_strlen@plt>
lea    0xecc(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@main.s = internal global [6 x i8] c"It is\00"
@.str = [19 x i8] c"Length of s is %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 @_strlen(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @main.s, i64 0, i64 0))
store i32 %7, i32* %6
%8 = load i32, i32* %6
%9 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %8)
ret i32 0
}

LLVM IR (-O2):
@main.s = internal global [6 x i8] c"It is\00"
@.str = [19 x i8] c"Length of s is %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @_strlen(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @main.s, i64 0, i64 0))
%4 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
void prefetch_for_read(const void *addr) { __builtin_prefetch(addr, 0, 3); }


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

x86 assembly (clang, -O2):
<prefetch_for_read>:
prefetcht0 (%rdi)
ret

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

LLVM IR (-O2):
define void @prefetch_for_read(i8* nocapture %0) {
tail call void @llvm.prefetch.p0i8(i8* %0, i32 0, i32 3, i32 1)
ret void
}
int test_imm_A5uint64_midword_mem(unsigned long long *val) {
  return ((*val >> 16) & (0xA5 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_A5uint64_midword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
shr    $0x10,%rdx
and    $0xa5,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_A5uint64_midword_mem>:
testb  $0xa5,0x2(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_A5uint64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 10813440
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
double thm_get_integration_weight(double const, double **, char const);
double ksp_get_thm_integration_weight(const double omega,
                                      double tetrahedra_omegas[24][4],
                                      const char function) {
  return thm_get_integration_weight(omega, tetrahedra_omegas, function);
}


x86 assembly (clang, -O0):
<ksp_get_thm_integration_weight>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %sil,%al
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rdi
movsbl -0x11(%rbp),%esi
call   1030 <thm_get_integration_weight@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ksp_get_thm_integration_weight>:
jmp    1030 <thm_get_integration_weight@plt>

LLVM IR (-O0):
define double @ksp_get_thm_integration_weight(double %0, [4 x double]* %1, i8 signext %2) {
%4 = alloca double
%5 = alloca [4 x double]*
%6 = alloca i8
store double %0, double* %4
store [4 x double]* %1, [4 x double]** %5
store i8 %2, i8* %6
%7 = load double, double* %4
%8 = load [4 x double]*, [4 x double]** %5
%9 = bitcast [4 x double]* %8 to double**
%10 = load i8, i8* %6
%11 = call double @thm_get_integration_weight(double %7, double** %9, i8 signext %10)
ret double %11
}

LLVM IR (-O2):
define double @ksp_get_thm_integration_weight(double %0, [4 x double]* %1, i8 signext %2) {
%4 = bitcast [4 x double]* %1 to double**
%5 = tail call double @thm_get_integration_weight(double %0, double** %4, i8 signext %2)
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ fonction_recursive(int);
int main(void) {
  fonction_recursive(1);
  return (0);
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @fonction_recursive(i32 1)
ret i32 0
}
int add_func(int a, int b) { return (a + b); }


x86 assembly (clang, -O0):
<add_func>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_func>:
lea    (%rdi,%rsi,1),%eax
ret

LLVM IR (-O0):
define i32 @add_func(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = add nsw i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @add_func(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
/* Variables and functions */
char *str_replace(char *, char *, char *);
char *decode_crysis_val(char *val) {
  val = str_replace(val, "&quot;", "\"");
  return str_replace(val, "&amp;", "&");
}


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

x86 assembly (clang, -O2):
<decode_crysis_val>:
push   %rax
lea    0xee8(%rip),%rsi
lea    0xee8(%rip),%rdx
call   1030 <str_replace@plt>
lea    0xede(%rip),%rsi
lea    0xedd(%rip),%rdx
mov    %rax,%rdi
pop    %rax
jmp    1030 <str_replace@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"&quot;\00"
@.str.1 = [2 x i8] c"\22\00"
@.str.2 = [6 x i8] c"&amp;\00"
@.str.3 = [2 x i8] c"&\00"
define i8* @decode_crysis_val(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* @str_replace(i8* %3, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i8* %4, i8** %2
%5 = load i8*, i8** %2
%6 = call i8* @str_replace(i8* %5, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
ret i8* %6
}

LLVM IR (-O2):
@.str = [7 x i8] c"&quot;\00"
@.str.1 = [2 x i8] c"\22\00"
@.str.2 = [6 x i8] c"&amp;\00"
@.str.3 = [2 x i8] c"&\00"
define i8* @decode_crysis_val(i8* %0) {
%2 = tail call i8* @str_replace(i8* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i8* @str_replace(i8* %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
ret i8* %3
}
void rb_gc() {}


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

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

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

LLVM IR (-O2):
define void @rb_gc() {
ret void
}