xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
main() {
  int i = 0100;
  printf("\n%d", i);
}


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"\0A%d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 64)
ret i32 0
}
int config_WITH_LIBUSB(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @config_WITH_LIBUSB() {
ret i32 0
}
int f2_b() {
  int x;
  return ((1 + x) + 2 + ((x))) + 1 ? 1 : 2;
}


x86 assembly (clang, -O0):
<f2_b>:
push   %rbp
mov    %rsp,%rbp
mov    -0x4(%rbp),%edx
add    $0x1,%edx
add    $0x2,%edx
add    -0x4(%rbp),%edx
add    $0x1,%edx
mov    $0x2,%eax
mov    $0x1,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @f2_b() {
%1 = alloca i32
%2 = load i32, i32* %1
%3 = add nsw i32 1, %2
%4 = add nsw i32 %3, 2
%5 = load i32, i32* %1
%6 = add nsw i32 %4, %5
%7 = add nsw i32 %6, 1
%8 = icmp ne i32 %7, 0
%9 = zext i1 %8 to i64
%10 = select i1 %8, i32 1, i32 2
ret i32 %10
}

LLVM IR (-O2):
define i32 @f2_b() {
ret i32 2
}
void main(void) {
  int i = 123, j = 456;
  printf("%s("
         "%d,%d"
         ")\n",
         __func__, i, j);
  printf("%s("
         ""
         ")\n",
         __func__, 0);
  printf("N=%d\n", NP(1));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x7b,-0x4(%rbp)
movl   $0x1c8,-0x8(%rbp)
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%ecx
lea    0xebd(%rip),%rdi
lea    0xec1(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xeb8(%rip),%rdi
lea    0xeac(%rip),%rsi
xor    %edx,%edx
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
mov    $0x0,%al
call   1030 <NP@plt>
mov    %eax,%esi
lea    0xe99(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xed8(%rip),%rdi
lea    0xedc(%rip),%rbx
mov    %rbx,%rsi
mov    $0x7b,%edx
mov    $0x1c8,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xec6(%rip),%rdi
mov    %rbx,%rsi
xor    %edx,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1,%edi
xor    %eax,%eax
call   1030 <NP@plt>
lea    0xead(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
pop    %rbx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"%s(%d,%d)\0A\00"
@__func__.main = [5 x i8] c"main\00"
@.str.1 = [6 x i8] c"%s()\0A\00"
@.str.2 = [6 x i8] c"N=%d\0A\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
store i32 123, i32* %1
store i32 456, i32* %2
%3 = load i32, i32* %1
%4 = load i32, i32* %2
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @__func__.main, i64 0, i64 0), i32 %3, i32 %4)
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @__func__.main, i64 0, i64 0), i32 0)
%7 = call i32 (i32, ...) bitcast (i32 (...)* @NP to i32 (i32, ...)*)(i32 1)
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"%s(%d,%d)\0A\00"
@__func__.main = [5 x i8] c"main\00"
@.str.1 = [6 x i8] c"%s()\0A\00"
@.str.2 = [6 x i8] c"N=%d\0A\00"
define void @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @__func__.main, i64 0, i64 0), i32 123, i32 456)
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @__func__.main, i64 0, i64 0), i32 0)
%3 = tail call i32 (i32, ...) bitcast (i32 (...)* @NP to i32 (i32, ...)*)(i32 1)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dump_sizes();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ scan_symbols(int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
int main(int argc, char *argv[]) {
  scan_symbols(stdin);
  dump_sizes();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e9b(%rip),%rax
mov    (%rax),%edi
call   1030 <scan_symbols@plt>
mov    $0x0,%al
call   1040 <dump_sizes@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
call   1030 <scan_symbols@plt>
xor    %eax,%eax
call   1040 <dump_sizes@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stdin = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* @stdin
%7 = call i32 @scan_symbols(i32 %6)
%8 = call i32 (...) @dump_sizes()
%9 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@stdin = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @stdin
%4 = tail call i32 @scan_symbols(i32 %3)
%5 = tail call i32 (...) @dump_sizes()
%6 = tail call i32 @exit(i32 0)
unreachable
}
int test_4() {

#pragma GCC diagnostic ignored "-Wunused-variable"
  ;
  int x;
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @test_4() {
%1 = alloca i32
ret i32 0
}

LLVM IR (-O2):
define i32 @test_4() {
ret i32 0
}
void ASN1_INTEGER_cmp(void) {}


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

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

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

LLVM IR (-O2):
define void @ASN1_INTEGER_cmp() {
ret void
}
/* Type definitions */
struct timeval {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ select(int, int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                          int /*<<< orphan*/ *, struct timeval *);
void my_sleep(struct timeval sleeptimeval) {
  select(1, NULL, NULL, NULL, &sleeptimeval);
}


x86 assembly (clang, -O0):
<my_sleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    $0x1,%edi
xor    %eax,%eax
mov    %eax,%ecx
lea    -0x8(%rbp),%r8
mov    %rcx,%rsi
mov    %rcx,%rdx
call   1030 <select@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_sleep>:
push   %rax
mov    %edi,(%rsp)
mov    %rsp,%r8
mov    $0x1,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   1030 <select@plt>
pop    %rax
ret

LLVM IR (-O0):
%struct.timeval = type { i32 }
define void @my_sleep(i32 %0) {
%2 = alloca %struct.timeval
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i32 0, i32 0
store i32 %0, i32* %3
%4 = call i32 @select(i32 1, i32* null, i32* null, i32* null, %struct.timeval* %2)
ret void
}

LLVM IR (-O2):
%struct.timeval = type { i32 }
define void @my_sleep(i32 %0) {
%2 = alloca %struct.timeval
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i64 0, i32 0
store i32 %0, i32* %3
%4 = call i32 @select(i32 1, i32* null, i32* null, i32* null, %struct.timeval* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *,
                           char const *, char const *, char const *);
int /*<<< orphan*/ stderr;
void showusage(const char *progname) {
  fprintf(stderr,
          "usage: %s info <device>\n"
          "       %s read <device> <offset> <len> <dest-filename>\n"
          "       %s write <device> <offset> <len> <source-filename>\n"
          "       %s erase <device> <offset> <len>\n",
          progname, progname, progname, progname);
  exit(1);
}


x86 assembly (clang, -O0):
<showusage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x8(%rbp),%rcx
mov    -0x8(%rbp),%r8
mov    -0x8(%rbp),%r9
lea    0xeb4(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<showusage>:
push   %rax
mov    %rdi,%rcx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
mov    %rcx,%rdx
mov    %rcx,%r8
mov    %rcx,%r9
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [178 x i8] c"usage: %s info <device>\0A %s read <device> <offset> <len> <dest-filename>\0A %s write <device> <offset> <len> <source-filename>\0A %s erase <device> <offset> <len>\0A\00"
define void @showusage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = load i8*, i8** %2
%6 = load i8*, i8** %2
%7 = load i8*, i8** %2
%8 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([178 x i8], [178 x i8]* @.str, i64 0, i64 0), i8* %4, i8* %5, i8* %6, i8* %7)
%9 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [178 x i8] c"usage: %s info <device>\0A %s read <device> <offset> <len> <dest-filename>\0A %s write <device> <offset> <len> <source-filename>\0A %s erase <device> <offset> <len>\0A\00"
define void @showusage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([178 x i8], [178 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %0, i8* %0, i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
long InterlockedIncrement(long *p) { return ++(*p); }


x86 assembly (clang, -O0):
<InterlockedIncrement>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
mov    (%rcx),%rax
add    $0x1,%rax
mov    %rax,(%rcx)
pop    %rbp
ret

x86 assembly (clang, -O2):
<InterlockedIncrement>:
mov    (%rdi),%rax
add    $0x1,%rax
mov    %rax,(%rdi)
ret

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

LLVM IR (-O2):
define i64 @InterlockedIncrement(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = add nsw i64 %2, 1
store i64 %3, i64* %0
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
scalar_t__ scanf(char *, int *);
int main() {
  int n;
  while (scanf("%d", &n) > 0) {
    if (n == 42) {
      break;
    }
    printf("%d\n", n);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmp    $0x0,%rax
jle    116c <main+0x4c>
cmpl   $0x2a,-0x8(%rbp)
jne    1158 <main+0x38>
jmp    116c <main+0x4c>
mov    -0x8(%rbp),%esi
lea    0xea1(%rip),%rdi
call   1030 <printf@plt>
jmp    112f <main+0xf>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
lea    0xed0(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1040 <scanf@plt>
test   %rax,%rax
jle    1181 <main+0x61>
mov    0xc(%rsp),%esi
cmp    $0x2a,%esi
je     1181 <main+0x61>
lea    0xeb4(%rip),%r14
lea    0xeaa(%rip),%r15
lea    0xc(%rsp),%rbx
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
test   %rax,%rax
jle    1181 <main+0x61>
mov    0xc(%rsp),%esi
cmp    $0x2a,%esi
jne    1160 <main+0x40>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
br label %3
3: ; preds = %10, %0
%4 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%5 = icmp sgt i64 %4, 0
br i1 %5, label %6, label %13
6: ; preds = %3
%7 = load i32, i32* %2
%8 = icmp eq i32 %7, 42
br i1 %8, label %9, label %10
9: ; preds = %6
br label %13
10: ; preds = %6
%11 = load i32, i32* %2
%12 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %11)
br label %3
13: ; preds = %9, %3
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = icmp slt i64 %3, 1
%5 = load i32, i32* %1
%6 = icmp eq i32 %5, 42
%7 = select i1 %4, i1 true, i1 %6
br i1 %7, label %16, label %8
8: ; preds = %0, %8
%9 = phi i32 [ %13, %8 ], [ %5, %0 ]
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %9)
%11 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%12 = icmp slt i64 %11, 1
%13 = load i32, i32* %1
%14 = icmp eq i32 %13, 42
%15 = select i1 %12, i1 true, i1 %14
br i1 %15, label %16, label %8
16: ; preds = %8, %0
ret i32 0
}
void foo603(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo603(i32 %0) {
ret void
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_mode;
};

/* Variables and functions */
int /*<<< orphan*/ S_ISREG(int /*<<< orphan*/);
int stat(char const *, struct stat *);
int isfile(const char *filename) {
  struct stat st;
  return !(stat(filename, &st) == -1 || !S_ISREG(st.st_mode));
}


x86 assembly (clang, -O0):
<isfile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1030 <stat@plt>
mov    %eax,%ecx
mov    $0x1,%al
cmp    $0xffffffff,%ecx
mov    %al,-0x11(%rbp)
je     115c <isfile+0x3c>
mov    -0x10(%rbp),%edi
call   1040 <S_ISREG@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isfile>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
cmp    $0xffffffff,%eax
je     1141 <isfile+0x21>
mov    (%rsp),%edi
call   1040 <S_ISREG@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
setne  %al
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @isfile(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.stat
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @stat(i8* %4, %struct.stat* %3)
%6 = icmp eq i32 %5, -1
br i1 %6, label %13, label %7
7: ; preds = %1
%8 = getelementptr inbounds %struct.stat, %struct.stat* %3, i32 0, i32 0
%9 = load i32, i32* %8
%10 = call i32 @S_ISREG(i32 %9)
%11 = icmp ne i32 %10, 0
%12 = xor i1 %11, true
br label %13
13: ; preds = %7, %1
%14 = phi i1 [ true, %1 ], [ %12, %7 ]
%15 = xor i1 %14, true
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @isfile(i8* nocapture %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i32 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i32 %4, -1
br i1 %5, label %12, label %6
6: ; preds = %1
%7 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%8 = load i32, i32* %7
%9 = tail call i32 @S_ISREG(i32 %8)
%10 = icmp ne i32 %9, 0
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %6, %1
%13 = phi i32 [ 0, %1 ], [ %11, %6 ]
ret i32 %13
}
/* Variables and functions */
float pow(float, float);
float gamma_CCTF(float value, float gamma) {
  if (value == 0) {
    return 0;
  } else {
    return pow(value, gamma);
  }
}


x86 assembly (clang, -O0):
<gamma_CCTF>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    1146 <gamma_CCTF+0x36>
jp     1146 <gamma_CCTF+0x36>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    115a <gamma_CCTF+0x4a>
movss  -0x8(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
call   1030 <pow@plt>
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gamma_CCTF>:
xorps  %xmm2,%xmm2
ucomiss %xmm2,%xmm0
jne    111e <gamma_CCTF+0xe>
jp     111e <gamma_CCTF+0xe>
xorps  %xmm0,%xmm0
ret
jmp    1030 <pow@plt>

LLVM IR (-O0):
define float @gamma_CCTF(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
store float %0, float* %4
store float %1, float* %5
%6 = load float, float* %4
%7 = fcmp oeq float %6, 0.000000e+00
br i1 %7, label %8, label %9
8: ; preds = %2
store float 0.000000e+00, float* %3
br label %13
9: ; preds = %2
%10 = load float, float* %4
%11 = load float, float* %5
%12 = call float @pow(float %10, float %11)
store float %12, float* %3
br label %13
13: ; preds = %9, %8
%14 = load float, float* %3
ret float %14
}

LLVM IR (-O2):
define float @gamma_CCTF(float %0, float %1) {
%3 = fcmp oeq float %0, 0.000000e+00
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call float @pow(float %0, float %1)
br label %6
6: ; preds = %2, %4
%7 = phi float [ %5, %4 ], [ 0.000000e+00, %2 ]
ret float %7
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int (*add_pixel)(TYPE_2__ *, long);
};
struct TYPE_4__ {
  TYPE_1__ f;
};
typedef TYPE_2__ XImage;

/* Variables and functions */
void set_XImage_f_add_pixel(void *_p, void *_v) {
  ((XImage *)_p)->f.add_pixel = (int (*)(XImage *, long))_v;
}


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

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

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { {}* }
define void @set_XImage_f_add_pixel(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = bitcast i8* %5 to i32 (%struct.TYPE_4__*, i64)*
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to %struct.TYPE_4__*
%9 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %8, i32 0, i32 0
%10 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %9, i32 0, i32 0
%11 = bitcast {}** %10 to i32 (%struct.TYPE_4__*, i64)**
store i32 (%struct.TYPE_4__*, i64)* %6, i32 (%struct.TYPE_4__*, i64)** %11
ret void
}

LLVM IR (-O2):
define void @set_XImage_f_add_pixel(i8* nocapture writeonly %0, i8* %1) {
%3 = bitcast i8* %0 to i8**
store i8* %1, i8** %3
ret void
}
void fc101(int n) {
  {
    typedef int(*b)[n];
    {
      typedef int(*c)[n];
      0;
    }
    {
      typedef int(*d)[n];
      0;
    }
  a:
    goto a;
    ;
    typedef int(*e)[n];
    0;
  };
  {
    typedef int(*f)[n];
    {
      typedef int(*g)[n];
      0;
    };
    {
      typedef int(*h)[n];
      0;
    };
    ;
    typedef int(*i)[n];
    0;
  };
  ;
  typedef int(*j)[n];
  0;
}


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

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

LLVM IR (-O0):
define void @fc101(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
br label %9
9: ; preds = %9, %1
br label %9
10: ; No predecessors!
%11 = load i32, i32* %2
%12 = zext i32 %11 to i64
%13 = load i32, i32* %2
%14 = zext i32 %13 to i64
%15 = load i32, i32* %2
%16 = zext i32 %15 to i64
%17 = load i32, i32* %2
%18 = zext i32 %17 to i64
%19 = load i32, i32* %2
%20 = zext i32 %19 to i64
%21 = load i32, i32* %2
%22 = zext i32 %21 to i64
ret void
}

LLVM IR (-O2):
define void @fc101(i32 %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
void overflow(t) char *t;
{
  printf("\n! Sorry, %s capacity exceeded", t);
  fatal("", "");
}


x86 assembly (clang, -O0):
<overflow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed9(%rip),%rsi
mov    %rsi,%rdi
mov    $0x0,%al
call   1040 <fatal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<overflow>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee5(%rip),%rdi
mov    %rdi,%rsi
xor    %eax,%eax
pop    %rcx
jmp    1040 <fatal@plt>

LLVM IR (-O0):
@.str = [31 x i8] c"\0A! Sorry, %s capacity exceeded\00"
@.str.1 = [1 x i8] zeroinitializer
define void @overflow(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @fatal to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [31 x i8] c"\0A! Sorry, %s capacity exceeded\00"
@.str.1 = [1 x i8] zeroinitializer
define void @overflow(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @fatal to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dev_port_set(unsigned int, unsigned int);
int /*<<< orphan*/ log_f(char *, unsigned int, unsigned int);
void target_port_set(unsigned addr, unsigned value) {
  log_f("linux: port_set(0x%x,0x%02x)\n", addr, value);
  dev_port_set(addr, value);
}


x86 assembly (clang, -O0):
<target_port_set>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xec5(%rip),%rdi
call   1030 <log_f@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <dev_port_set@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<target_port_set>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
lea    0xed2(%rip),%rdi
mov    %ebp,%esi
mov    %ebx,%edx
call   1030 <log_f@plt>
mov    %ebp,%edi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <dev_port_set@plt>

LLVM IR (-O0):
@.str = [30 x i8] c"linux: port_set(0x%x,0x%02x)\0A\00"
define void @target_port_set(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 = call i32 @log_f(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = call i32 @dev_port_set(i32 %8, i32 %9)
ret void
}

LLVM IR (-O2):
@.str = [30 x i8] c"linux: port_set(0x%x,0x%02x)\0A\00"
define void @target_port_set(i32 %0, i32 %1) {
%3 = tail call i32 @log_f(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
%4 = tail call i32 @dev_port_set(i32 %0, i32 %1)
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int const uint16_t;

/* Variables and functions */
uint16_t h265hvcc_nalu_get_length(const uint8_t *p) {
  return (p[0] << 8) | p[1];
}


x86 assembly (clang, -O0):
<h265hvcc_nalu_get_length>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
or     0x4(%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<h265hvcc_nalu_get_length>:
mov    (%rdi),%eax
shl    $0x8,%eax
or     0x4(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @h265hvcc_nalu_get_length(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = shl i32 %2, 8
%4 = getelementptr inbounds i32, i32* %0, i64 1
%5 = load i32, i32* %4
%6 = or i32 %3, %5
ret i32 %6
}
int m_strnlen(const char *str, unsigned int max_len) {
  unsigned int i = 0;
  while (str[i] && (i < max_len)) {
    i++;
  }
  return i;
}


x86 assembly (clang, -O0):
<m_strnlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
movsbl (%rax,%rcx,1),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x11(%rbp)
je     1137 <m_strnlen+0x37>
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
setb   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1147 <m_strnlen+0x47>
jmp    1155 <m_strnlen+0x55>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1112 <m_strnlen+0x12>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<m_strnlen>:
mov    %esi,%ecx
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
lea    0x1(%rdx),%rax
cmpb   $0x0,(%rdi,%rdx,1)
je     1122 <m_strnlen+0x22>
cmp    %rcx,%rdx
mov    %rax,%rdx
jb     1110 <m_strnlen+0x10>
add    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @m_strnlen(i8* nocapture %0, i32 %1) {
%3 = zext i32 %1 to i64
br label %4
4: ; preds = %4, %2
%5 = phi i64 [ %11, %4 ], [ 0, %2 ]
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
%8 = icmp ne i8 %7, 0
%9 = icmp ult i64 %5, %3
%10 = select i1 %8, i1 %9, i1 false
%11 = add nuw nsw i64 %5, 1
br i1 %10, label %4, label %12
12: ; preds = %4
%13 = trunc i64 %5 to i32
ret i32 %13
}
/* Type definitions */
typedef int /*<<< orphan*/ DES_key_schedule;
typedef int /*<<< orphan*/ DES_cblock;

/* Variables and functions */
int /*<<< orphan*/ DES_ncbc_encrypt(unsigned char const *, unsigned char *,
                                    long, int /*<<< orphan*/ *,
                                    int /*<<< orphan*/ *, int);
void des_ncbc_encrypt(const unsigned char *i, unsigned char *o, long l,
                      DES_key_schedule k, DES_cblock *iv, int e) {
  DES_ncbc_encrypt(i, o, l, &k, iv, e);
}


x86 assembly (clang, -O0):
<des_ncbc_encrypt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x28(%rbp),%r8
mov    -0x2c(%rbp),%r9d
lea    -0x1c(%rbp),%rcx
call   1030 <DES_ncbc_encrypt@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<des_ncbc_encrypt>:
push   %rax
mov    %ecx,0x4(%rsp)
lea    0x4(%rsp),%rcx
call   1030 <DES_ncbc_encrypt@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @des_ncbc_encrypt(i8* %0, i8* %1, i64 %2, i32 %3, i32* %4, i32 %5) {
%7 = alloca i32
store i32 %3, i32* %7
%8 = call i32 @DES_ncbc_encrypt(i8* %0, i8* %1, i64 %2, i32* %7, i32* %4, i32 %5)
ret void
}
/* Variables and functions */
void *malloc(size_t);
void *KSI_malloc(size_t size) { return malloc(size); }


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

x86 assembly (clang, -O2):
<KSI_malloc>:
jmp    1030 <malloc@plt>

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

LLVM IR (-O2):
define noalias i8* @KSI_malloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ i2c1_write(unsigned char *, int);
void i2c1_writereg(unsigned char reg, unsigned char value) {
  unsigned char data[2] = {reg, value};
  i2c1_write(data, 2);
}


x86 assembly (clang, -O0):
<i2c1_writereg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
mov    -0x1(%rbp),%al
mov    %al,-0x4(%rbp)
mov    -0x2(%rbp),%al
mov    %al,-0x3(%rbp)
lea    -0x4(%rbp),%rdi
mov    $0x2,%esi
call   1030 <i2c1_write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2c1_writereg>:
push   %rax
mov    %dil,0x6(%rsp)
mov    %sil,0x7(%rsp)
lea    0x6(%rsp),%rdi
mov    $0x2,%esi
call   1030 <i2c1_write@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @i2c1_writereg(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca [2 x i8]
%4 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 0
store i8 %0, i8* %4
%5 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 1
store i8 %1, i8* %5
%6 = call i32 @i2c1_write(i8* %4, i32 2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ vector_nd_alloc(void **, int, int *, int);
void vector_3d_alloc(void **ptr, int element_size, int d1, int d2, int d3) {
  int dims[3];
  dims[0] = d1;
  dims[1] = d2;
  dims[2] = d3;
  vector_nd_alloc(ptr, element_size, dims, 3);
}


x86 assembly (clang, -O0):
<vector_3d_alloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    -0x24(%rbp),%rdx
mov    $0x3,%ecx
call   1030 <vector_nd_alloc@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vector_3d_alloc>:
sub    $0x18,%rsp
mov    %edx,0xc(%rsp)
mov    %ecx,0x10(%rsp)
mov    %r8d,0x14(%rsp)
lea    0xc(%rsp),%rdx
mov    $0x3,%ecx
call   1030 <vector_nd_alloc@plt>
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
define void @vector_3d_alloc(i8** %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca [3 x i32]
%7 = bitcast [3 x i32]* %6 to i8*
%8 = getelementptr inbounds [3 x i32], [3 x i32]* %6, i64 0, i64 0
store i32 %2, i32* %8
%9 = getelementptr inbounds [3 x i32], [3 x i32]* %6, i64 0, i64 1
store i32 %3, i32* %9
%10 = getelementptr inbounds [3 x i32], [3 x i32]* %6, i64 0, i64 2
store i32 %4, i32* %10
%11 = call i32 @vector_nd_alloc(i8** %0, i32 %1, i32* %8, i32 3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ delete_line();
int insert_mode();
int changeend(void) {
  if (!delete_line())
    return insert_mode();
  return 1;
}


x86 assembly (clang, -O0):
<changeend>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <delete_line@plt>
cmp    $0x0,%eax
jne    1147 <changeend+0x27>
mov    $0x0,%al
call   1030 <insert_mode@plt>
mov    %eax,-0x4(%rbp)
jmp    114e <changeend+0x2e>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<changeend>:
push   %rax
xor    %eax,%eax
call   1040 <delete_line@plt>
test   %eax,%eax
je     1133 <changeend+0x13>
mov    $0x1,%eax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
jmp    1030 <insert_mode@plt>

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

LLVM IR (-O2):
define i32 @changeend() {
%1 = tail call i32 (...) @delete_line()
%2 = icmp eq i32 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 (...) @insert_mode()
br label %5
5: ; preds = %0, %3
%6 = phi i32 [ %4, %3 ], [ 1, %0 ]
ret i32 %6
}
int main(int i) { return i; }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
unsigned help() {
  puts("Options:\n"
       "	-i				Set input file\n"
       "	-o				Set output file\n"
       "	-f / --formtat	Set output format (default format: scf)\n"
       "	-d / --debug	Set debug mode\n"
       "	-h / --help		Show 'help'\n"
       "	--about			Show 'about'\n");
  return 1;
}


x86 assembly (clang, -O0):
<help>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [190 x i8] c"Options:\0A\09-i\09\09\09\09Set input file\0A\09-o\09\09\09\09Set output file\0A\09-f / --formtat\09Set output format (default format: scf)\0A\09-d / --debug\09Set debug mode\0A\09-h / --help\09\09Show 'help'\0A\09--about\09\09\09Show 'about'\0A\00"
define i32 @help() {
%1 = call i32 @puts(i8* getelementptr inbounds ([190 x i8], [190 x i8]* @.str, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@.str = [190 x i8] c"Options:\0A\09-i\09\09\09\09Set input file\0A\09-o\09\09\09\09Set output file\0A\09-f / --formtat\09Set output format (default format: scf)\0A\09-d / --debug\09Set debug mode\0A\09-h / --help\09\09Show 'help'\0A\09--about\09\09\09Show 'about'\0A\00"
define i32 @help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([190 x i8], [190 x i8]* @.str, i64 0, i64 0))
ret i32 1
}
int main(int argc, char **argv) {
  int i;
  if (argc == 1)
    i = 0;
  else
    i = 1;
  return i;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    1128 <main+0x28>
movl   $0x0,-0x14(%rbp)
jmp    112f <main+0x2f>
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
xor    %eax,%eax
cmp    $0x1,%edi
setne  %al
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = icmp ne i32 %0, 1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ apple;

/* Variables and functions */
int getNumber(int *, int *, int);
int /*<<< orphan*/ printf(char *, int);
void main() {
  int apple[] = {7, 4, 5};
  int orange[] = {1, 10, 2};
  int len = sizeof(apple) / sizeof(apple[0]);
  int res = getNumber(apple, orange, len);
  printf("Max number of gifts = %d", res);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0xed1(%rip),%rax
mov    %rax,-0xc(%rbp)
mov    0xecf(%rip),%eax
mov    %eax,-0x4(%rbp)
mov    0xec9(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xec7(%rip),%eax
mov    %eax,-0x10(%rbp)
movl   $0x3,-0x1c(%rbp)
lea    -0xc(%rbp),%rdi
lea    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1040 <getNumber@plt>
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%esi
lea    0xea4(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
mov    0xede(%rip),%eax
mov    %eax,0x20(%rsp)
mov    0xecb(%rip),%rax
mov    %rax,0x18(%rsp)
mov    0xed4(%rip),%eax
mov    %eax,0x10(%rsp)
mov    0xec1(%rip),%rax
mov    %rax,0x8(%rsp)
lea    0x18(%rsp),%rdi
lea    0x8(%rsp),%rsi
mov    $0x3,%edx
call   1040 <getNumber@plt>
lea    0xead(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.main.apple = [3 x i32] [i32 7, i32 4, i32 5]
@__const.main.orange = [3 x i32] [i32 1, i32 10, i32 2]
@.str = [25 x i8] c"Max number of gifts = %d\00"
define void @main() {
%1 = alloca [3 x i32]
%2 = alloca [3 x i32]
%3 = alloca i32
%4 = alloca i32
%5 = bitcast [3 x i32]* %1 to i8*
%6 = bitcast [3 x i32]* %2 to i8*
store i32 3, i32* %3
%7 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 0
%8 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 0
%9 = load i32, i32* %3
%10 = call i32 @getNumber(i32* %7, i32* %8, i32 %9)
store i32 %10, i32* %4
%11 = load i32, i32* %4
%12 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %11)
ret void
}

LLVM IR (-O2):
@__const.main.apple = [3 x i32] [i32 7, i32 4, i32 5]
@__const.main.orange = [3 x i32] [i32 1, i32 10, i32 2]
@.str = [25 x i8] c"Max number of gifts = %d\00"
define void @main() {
%1 = alloca [3 x i32]
%2 = alloca [3 x i32]
%3 = bitcast [3 x i32]* %1 to i8*
%4 = bitcast [3 x i32]* %2 to i8*
%5 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 0
%6 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 0
%7 = call i32 @getNumber(i32* %5, i32* %6, i32 3)
%8 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %7)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int8_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
void print_int8(int8_t n) { printf("%hhd", n); }


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

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"%hhd\00"
define void @print_int8(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
void ff_hevc_put_hevc_bi_w_epel_h8_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_w_epel_h8_10_sse4() {
ret void
}
void vAssertCalled(unsigned long a_line, const char *const a_filename) {
  (void)a_line;
  (void)a_filename;
}


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

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

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

LLVM IR (-O2):
define void @vAssertCalled(i64 %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
scalar_t__ args_optmap_get_index(char const *);
int args_optmap_contains(const char *name) {
  return args_optmap_get_index(name) >= 0;
}


x86 assembly (clang, -O0):
<args_optmap_contains>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <args_optmap_get_index@plt>
cmp    $0x0,%rax
setge  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<args_optmap_contains>:
push   %rax
call   1030 <args_optmap_get_index@plt>
shr    $0x3f,%rax
xor    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @args_optmap_contains(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @args_optmap_get_index(i8* %3)
%5 = icmp sge i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @args_optmap_contains(i8* %0) {
%2 = tail call i64 @args_optmap_get_index(i8* %0)
%3 = lshr i64 %2, 63
%4 = trunc i64 %3 to i32
%5 = xor i32 %4, 1
ret i32 %5
}
/* Variables and functions */
int txtarray_write2(char const *, char const *, int, double *, int, double *,
                    int);
int txtarray_write_stress(const char *filename, const char *header,
                          int nstations, double *stations, double *stress) {
  return txtarray_write2(filename, header, nstations, stations, 3, stress, 6);
}


x86 assembly (clang, -O0):
<txtarray_write_stress>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r9
mov    $0x3,%r8d
movl   $0x6,(%rsp)
call   1030 <txtarray_write2@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<txtarray_write_stress>:
push   %rax
mov    %r8,%r9
movl   $0x6,(%rsp)
mov    $0x3,%r8d
call   1030 <txtarray_write2@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @txtarray_write_stress(i8* %0, i8* %1, i32 %2, double* %3, double* %4) {
%6 = tail call i32 @txtarray_write2(i8* %0, i8* %1, i32 %2, double* %3, i32 3, double* %4, i32 6)
ret i32 %6
}
void BIO_read(void) {}


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

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

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

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