xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void A() { printf("A\n"); }


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

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

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

LLVM IR (-O2):
@str = [2 x i8] c"A\00"
define void @A() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ lstat(char *, struct stat *);
scalar_t__ symlink(char *, char *);
int main(int argc, char **argv) {
  if (symlink("silly-me", "tmp/other-link"))
    return 1;
  struct stat st;
  lstat("tmp/other-link", &st);
  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    0xec3(%rip),%rdi
lea    0xec5(%rip),%rsi
call   1030 <symlink@plt>
cmp    $0x0,%rax
je     115f <main+0x3f>
movl   $0x1,-0x4(%rbp)
jmp    1176 <main+0x56>
lea    0xea3(%rip),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <lstat@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xeda(%rip),%rsi
call   1030 <symlink@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1143 <main+0x23>
pop    %rcx
ret
lea    0xebf(%rip),%rdi
mov    %rsp,%rsi
call   1040 <lstat@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
@.str = [9 x i8] c"silly-me\00"
@.str.1 = [15 x i8] c"tmp/other-link\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca %struct.stat
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i64 @symlink(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %2
store i32 1, i32* %3
br label %12
10: ; preds = %2
%11 = call i32 @lstat(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), %struct.stat* %6)
store i32 0, i32* %3
br label %12
12: ; preds = %10, %9
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
%struct.stat = type { i32 }
@.str = [9 x i8] c"silly-me\00"
@.str.1 = [15 x i8] c"tmp/other-link\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca %struct.stat
%4 = tail call i64 @symlink(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %2
%7 = bitcast %struct.stat* %3 to i8*
%8 = call i32 @lstat(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), %struct.stat* %3)
br label %9
9: ; preds = %2, %6
%10 = phi i32 [ 0, %6 ], [ 1, %2 ]
ret i32 %10
}
char *langRomTypeMegaSCSI128() { return "128kB MEGA-SCSI"; }


x86 assembly (clang, -O0):
<langRomTypeMegaSCSI128>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<langRomTypeMegaSCSI128>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [16 x i8] c"128kB MEGA-SCSI\00"
define i8* @langRomTypeMegaSCSI128() {
ret i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [16 x i8] c"128kB MEGA-SCSI\00"
define i8* @langRomTypeMegaSCSI128() {
ret i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ test14();
int main(int argc, char **argv) {
  if (!test14())
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <test14@plt>
cmp    $0x0,%eax
jne    114d <main+0x2d>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <test14@plt>
test   %eax,%eax
je     1130 <main+0x10>
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @test14()
%7 = icmp ne i32 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %2
%9 = call i32 (...) @abort()
unreachable
10: ; preds = %2
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @test14()
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 (...) @abort()
unreachable
7: ; preds = %2
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ BrushlessGimbalSettingsHandle();
int /*<<< orphan*/ UAVObjUpdated(int /*<<< orphan*/);
void BrushlessGimbalSettingsUpdated() {
  UAVObjUpdated(BrushlessGimbalSettingsHandle());
}


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

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

LLVM IR (-O0):
define void @BrushlessGimbalSettingsUpdated() {
%1 = call i32 (...) @BrushlessGimbalSettingsHandle()
%2 = call i32 @UAVObjUpdated(i32 %1)
ret void
}

LLVM IR (-O2):
define void @BrushlessGimbalSettingsUpdated() {
%1 = tail call i32 (...) @BrushlessGimbalSettingsHandle()
%2 = tail call i32 @UAVObjUpdated(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ MIPS_CLEAR_BIT(int, int);
void xburst_cgm_ungate_des() { MIPS_CLEAR_BIT((0xB0000000 + 0x28), 13); }


x86 assembly (clang, -O0):
<xburst_cgm_ungate_des>:
push   %rbp
mov    %rsp,%rbp
mov    $0xb0000028,%edi
mov    $0xd,%esi
call   1030 <MIPS_CLEAR_BIT@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<xburst_cgm_ungate_des>:
mov    $0xb0000028,%edi
mov    $0xd,%esi
jmp    1030 <MIPS_CLEAR_BIT@plt>

LLVM IR (-O0):
define void @xburst_cgm_ungate_des() {
%1 = call i32 @MIPS_CLEAR_BIT(i32 -1342177240, i32 13)
ret void
}

LLVM IR (-O2):
define void @xburst_cgm_ungate_des() {
%1 = tail call i32 @MIPS_CLEAR_BIT(i32 -1342177240, i32 13)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _endhostdnsent();
int /*<<< orphan*/ _endhosthtent();
void endhostent(void) {
  _endhosthtent();
  _endhostdnsent();
}


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

x86 assembly (clang, -O2):
<endhostent>:
push   %rax
xor    %eax,%eax
call   1030 <_endhosthtent@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <_endhostdnsent@plt>

LLVM IR (-O0):
define void @endhostent() {
%1 = call i32 (...) @_endhosthtent()
%2 = call i32 (...) @_endhostdnsent()
ret void
}

LLVM IR (-O2):
define void @endhostent() {
%1 = tail call i32 (...) @_endhosthtent()
%2 = tail call i32 (...) @_endhostdnsent()
ret void
}
/* Variables and functions */
char *strchr(const char *s, int c) {
  char cb = c;
  while (*s != 0) {
    if (*s == cb) {
      return (char *)s;
    }
    s += 1;
  }
  return NULL;
}


x86 assembly (clang, -O0):
<strchr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %al,-0x15(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1152 <strchr+0x52>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
movsbl -0x15(%rbp),%ecx
cmp    %ecx,%eax
jne    1141 <strchr+0x41>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    115a <strchr+0x5a>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1111 <strchr+0x11>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strchr>:
mov    (%rdi),%cl
test   %cl,%cl
je     1123 <strchr+0x23>
mov    %rdi,%rax
movsbl %sil,%edx
nopl   (%rax)
movsbl %cl,%ecx
cmp    %ecx,%edx
je     1125 <strchr+0x25>
movzbl 0x1(%rax),%ecx
add    $0x1,%rax
test   %cl,%cl
jne    1110 <strchr+0x10>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i8* @strchr(i8* %0, i32 %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %17, label %5
5: ; preds = %2
%6 = shl i32 %1, 24
%7 = ashr exact i32 %6, 24
br label %8
8: ; preds = %5, %13
%9 = phi i8 [ %3, %5 ], [ %15, %13 ]
%10 = phi i8* [ %0, %5 ], [ %14, %13 ]
%11 = sext i8 %9 to i32
%12 = icmp eq i32 %7, %11
br i1 %12, label %17, label %13
13: ; preds = %8
%14 = getelementptr inbounds i8, i8* %10, i64 1
%15 = load i8, i8* %14
%16 = icmp eq i8 %15, 0
br i1 %16, label %17, label %8
17: ; preds = %8, %13, %2
%18 = phi i8* [ null, %2 ], [ null, %13 ], [ %10, %8 ]
ret i8* %18
}
void ExttParamTypeAuxTable(void) {}


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

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

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

LLVM IR (-O2):
define void @ExttParamTypeAuxTable() {
ret void
}
/* Variables and functions */
int strlen(char *);
void cb_get_kv_ex(void *kv, void **value) {
  char *key = (char *)kv;
  size_t keylen = strlen(key) + 1;
  *value = key + keylen;
}


x86 assembly (clang, -O0):
<cb_get_kv_ex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <strlen@plt>
add    $0x1,%eax
cltq
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rcx
add    -0x20(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cb_get_kv_ex>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <strlen@plt>
cltq
add    %rbx,%rax
add    $0x1,%rax
mov    %rax,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @cb_get_kv_ex(i8* %0, i8** %1) {
%3 = alloca i8*
%4 = alloca i8**
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %3
store i8** %1, i8*** %4
%7 = load i8*, i8** %3
store i8* %7, i8** %5
%8 = load i8*, i8** %5
%9 = call i32 @strlen(i8* %8)
%10 = add nsw i32 %9, 1
%11 = sext i32 %10 to i64
store i64 %11, i64* %6
%12 = load i8*, i8** %5
%13 = load i64, i64* %6
%14 = getelementptr inbounds i8, i8* %12, i64 %13
%15 = load i8**, i8*** %4
store i8* %14, i8** %15
ret void
}

LLVM IR (-O2):
define void @cb_get_kv_ex(i8* %0, i8** nocapture writeonly %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = add nsw i32 %3, 1
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds i8, i8* %0, i64 %5
store i8* %6, i8** %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
size_t write_FP_BE(int /*<<< orphan*/ *, int /*<<< orphan*/ const *, int);
size_t int64WriteToFP(FILE *fp, const int64_t *data) {
  return write_FP_BE(fp, data, sizeof(int64_t));
}


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

x86 assembly (clang, -O2):
<int64WriteToFP>:
mov    $0x4,%edx
jmp    1030 <write_FP_BE@plt>

LLVM IR (-O0):
define i64 @int64WriteToFP(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 i64 @write_FP_BE(i32* %5, i32* %6, i32 4)
ret i64 %7
}

LLVM IR (-O2):
define i64 @int64WriteToFP(i32* %0, i32* %1) {
%3 = tail call i64 @write_FP_BE(i32* %0, i32* %1, i32 4)
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ i2c_write(int, int, int);
void hmc5883_init(void) {
  i2c_write(0x3c, 0x00, 0x03 << 5 | 0x06 << 2 | 0x10);
  i2c_write(0x3c, 0x01, 0x40);
  i2c_write(0x3c, 0x02, 0x00);
}


x86 assembly (clang, -O0):
<hmc5883_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3c,%edi
xor    %esi,%esi
mov    $0x78,%edx
call   1030 <i2c_write@plt>
mov    $0x3c,%edi
mov    $0x1,%esi
mov    $0x40,%edx
call   1030 <i2c_write@plt>
mov    $0x3c,%edi
mov    $0x2,%esi
xor    %edx,%edx
call   1030 <i2c_write@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<hmc5883_init>:
push   %rax
mov    $0x3c,%edi
xor    %esi,%esi
mov    $0x78,%edx
call   1030 <i2c_write@plt>
mov    $0x3c,%edi
mov    $0x1,%esi
mov    $0x40,%edx
call   1030 <i2c_write@plt>
mov    $0x3c,%edi
mov    $0x2,%esi
xor    %edx,%edx
pop    %rax
jmp    1030 <i2c_write@plt>

LLVM IR (-O0):
define void @hmc5883_init() {
%1 = call i32 @i2c_write(i32 60, i32 0, i32 120)
%2 = call i32 @i2c_write(i32 60, i32 1, i32 64)
%3 = call i32 @i2c_write(i32 60, i32 2, i32 0)
ret void
}

LLVM IR (-O2):
define void @hmc5883_init() {
%1 = tail call i32 @i2c_write(i32 60, i32 0, i32 120)
%2 = tail call i32 @i2c_write(i32 60, i32 1, i32 64)
%3 = tail call i32 @i2c_write(i32 60, i32 2, i32 0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ cpu_set_t;
typedef int /*<<< orphan*/ cpu_bitmask;

/* Variables and functions */
int /*<<< orphan*/ CPU_SET(int, int /*<<< orphan*/ *);
int /*<<< orphan*/ CPU_ZERO(int /*<<< orphan*/ *);
int /*<<< orphan*/ getpid();
int /*<<< orphan*/ panic(char *);
int sched_setaffinity(int /*<<< orphan*/, int, int /*<<< orphan*/ *);
void cpu_affinity(int cpu) {
  int ret;
  cpu_set_t cpu_bitmask;
  CPU_ZERO(&cpu_bitmask);
  CPU_SET(cpu, &cpu_bitmask);
  ret = sched_setaffinity(getpid(), sizeof(cpu_bitmask), &cpu_bitmask);
  if (ret)
    panic("Can't set this cpu affinity!\n");
}


x86 assembly (clang, -O0):
<cpu_affinity>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    -0xc(%rbp),%rdi
call   1060 <CPU_ZERO@plt>
mov    -0x4(%rbp),%edi
lea    -0xc(%rbp),%rsi
call   1070 <CPU_SET@plt>
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,%edi
mov    $0x4,%esi
lea    -0xc(%rbp),%rdx
call   1050 <sched_setaffinity@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     11a0 <cpu_affinity+0x50>
lea    0xe65(%rip),%rdi
call   1040 <panic@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpu_affinity>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
lea    0x4(%rsp),%r14
mov    %r14,%rdi
call   1060 <CPU_ZERO@plt>
mov    %ebx,%edi
mov    %r14,%rsi
call   1070 <CPU_SET@plt>
xor    %eax,%eax
call   1030 <getpid@plt>
mov    %eax,%edi
mov    $0x4,%esi
mov    %r14,%rdx
call   1050 <sched_setaffinity@plt>
test   %eax,%eax
je     1193 <cpu_affinity+0x43>
lea    0xe72(%rip),%rdi
call   1040 <panic@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [30 x i8] c"Can't set this cpu affinity!\0A\00"
define void @cpu_affinity(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = call i32 @CPU_ZERO(i32* %4)
%6 = load i32, i32* %2
%7 = call i32 @CPU_SET(i32 %6, i32* %4)
%8 = call i32 (...) @getpid()
%9 = call i32 @sched_setaffinity(i32 %8, i32 4, i32* %4)
store i32 %9, i32* %3
%10 = load i32, i32* %3
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %1
%13 = call i32 @panic(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
br label %14
14: ; preds = %12, %1
ret void
}

LLVM IR (-O2):
@.str = [30 x i8] c"Can't set this cpu affinity!\0A\00"
define void @cpu_affinity(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @CPU_ZERO(i32* %2)
%5 = call i32 @CPU_SET(i32 %0, i32* %2)
%6 = call i32 (...) @getpid()
%7 = call i32 @sched_setaffinity(i32 %6, i32 4, i32* %2)
%8 = icmp eq i32 %7, 0
br i1 %8, label %11, label %9
9: ; preds = %1
%10 = call i32 @panic(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %9, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int c;
  printf("%c", c);
  return 1;
}


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 undef)
ret i32 1
}
void set_nothing_c(void) {}


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

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

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

LLVM IR (-O2):
define void @set_nothing_c() {
ret void
}
int test_imm_B4uint16_reg(unsigned short val) {
  return ((val) & (0xB4 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_B4uint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edx
and    $0xb4,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_B4uint16_reg(i16 zeroext %0) {
%2 = and i16 %0, 180
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void calc2_error(int regs[26], int *base, const char *s) {
  fprintf(stderr, "%s\n", s);
}


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

x86 assembly (clang, -O2):
<calc2_error>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @calc2_error(i32* %0, i32* %1, i8* %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i8*
store i32* %0, i32** %4
store i32* %1, i32** %5
store i8* %2, i8** %6
%7 = load i32, i32* @stderr
%8 = load i8*, i8** %6
%9 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %8)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @calc2_error(i32* nocapture readnone %0, i32* nocapture readnone %1, i8* %2) {
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
ret void
}
void gtk_tree_sortable_get_sort_column_id() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @DMA1_Channel1_IRQHandler() {
ret void
}
/* Type definitions */
struct stat {
  long st_size;
};

/* Variables and functions */
int stat(char const *, struct stat *);
long file_size(const char *filename) {
  struct stat buffer;
  int rc = stat(filename, &buffer);
  return rc == 0 ? buffer.st_size : -1;
}


x86 assembly (clang, -O0):
<file_size>:
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,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    1143 <file_size+0x33>
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
jmp    1153 <file_size+0x43>
mov    $0xffffffffffffffff,%rax
mov    %rax,-0x20(%rbp)
jmp    1153 <file_size+0x43>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<file_size>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
neg    %eax
sbb    %rax,%rax
or     (%rsp),%rax
pop    %rcx
ret

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

LLVM IR (-O2):
%struct.stat = type { i64 }
define i64 @file_size(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, 0
%6 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%7 = load i64, i64* %6
%8 = select i1 %5, i64 %7, i64 -1
ret i64 %8
}
/* Variables and functions */
void *compare_long_context(void) { return NULL; }


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

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

LLVM IR (-O0):
define i8* @compare_long_context() {
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @compare_long_context() {
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ sleep(int);
int main(void) {
  int i;
  i = 0;
  printf("STARTING\n");
  while (1) {
    printf("%d\n", i);
    i++;
    sleep(1);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
lea    0xec3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    %eax,-0x8(%rbp)
mov    $0x1,%edi
call   1040 <sleep@plt>
jmp    1144 <main+0x24>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
lea    0xeca(%rip),%rdi
call   1030 <puts@plt>
lea    0xeba(%rip),%rbx
xor    %ebp,%ebp
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%ebp
mov    $0x1,%edi
call   1050 <sleep@plt>
jmp    1150 <main+0x20>

LLVM IR (-O0):
@.str = [10 x i8] c"STARTING\0A\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
br label %4
4: ; preds = %0, %4
%5 = load i32, i32* %2
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %5)
%7 = load i32, i32* %2
%8 = add nsw i32 %7, 1
store i32 %8, i32* %2
%9 = call i32 @sleep(i32 1)
br label %4
}

LLVM IR (-O2):
@.str.1 = [4 x i8] c"%d\0A\00"
@str = [9 x i8] c"STARTING\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
br label %2
2: ; preds = %2, %0
%3 = phi i32 [ 0, %0 ], [ %5, %2 ]
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = add nuw nsw i32 %3, 1
%6 = tail call i32 @sleep(i32 1)
br label %2
}
/* Variables and functions */
int japi_messagebox(int, char *, char *);
int j_messagebox(int arg0, char *arg1, char *arg2) {
  return (japi_messagebox(arg0, arg1, arg2));
}


x86 assembly (clang, -O0):
<j_messagebox>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <japi_messagebox@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<j_messagebox>:
jmp    1030 <japi_messagebox@plt>

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

LLVM IR (-O2):
define i32 @j_messagebox(i32 %0, i8* %1, i8* %2) {
%4 = tail call i32 @japi_messagebox(i32 %0, i8* %1, i8* %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ getyx(int /*<<< orphan*/, int, int);
int /*<<< orphan*/ move(int, int);
int /*<<< orphan*/ mvaddch(int, int, int);
int /*<<< orphan*/ stdscr;
void scrnset(int start, int c, int n) {
  int y, x;
  getyx(stdscr, y, x);
  while (n--)
    mvaddch(y, start + n, c);
  move(y, x);
}


x86 assembly (clang, -O0):
<scrnset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
call   1030 <getyx@plt>
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0xc(%rbp)
cmp    $0x0,%eax
je     117f <scrnset+0x4f>
mov    -0x10(%rbp),%edi
mov    -0x4(%rbp),%esi
add    -0xc(%rbp),%esi
mov    -0x8(%rbp),%edx
call   1040 <mvaddch@plt>
jmp    1155 <scrnset+0x25>
mov    -0x10(%rbp),%edi
mov    -0x14(%rbp),%esi
call   1050 <move@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<scrnset>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebx
mov    %esi,%r14d
mov    %edi,%ebp
mov    0x2ea6(%rip),%rax
mov    (%rax),%edi
call   1030 <getyx@plt>
test   %ebx,%ebx
je     1160 <scrnset+0x30>
add    $0xffffffff,%ebp
lea    (%rbx,%rbp,1),%esi
mov    %r14d,%edx
call   1040 <mvaddch@plt>
add    $0xffffffff,%ebx
jne    1150 <scrnset+0x20>
pop    %rbx
pop    %r14
pop    %rbp
jmp    1050 <move@plt>

LLVM IR (-O0):
@stdscr = global i32 0
define void @scrnset(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%9 = load i32, i32* @stdscr
%10 = load i32, i32* %7
%11 = load i32, i32* %8
%12 = call i32 @getyx(i32 %9, i32 %10, i32 %11)
br label %13
13: ; preds = %17, %3
%14 = load i32, i32* %6
%15 = add nsw i32 %14, -1
store i32 %15, i32* %6
%16 = icmp ne i32 %14, 0
br i1 %16, label %17, label %24
17: ; preds = %13
%18 = load i32, i32* %7
%19 = load i32, i32* %4
%20 = load i32, i32* %6
%21 = add nsw i32 %19, %20
%22 = load i32, i32* %5
%23 = call i32 @mvaddch(i32 %18, i32 %21, i32 %22)
br label %13
24: ; preds = %13
%25 = load i32, i32* %7
%26 = load i32, i32* %8
%27 = call i32 @move(i32 %25, i32 %26)
ret void
}

LLVM IR (-O2):
@stdscr = global i32 0
define void @scrnset(i32 %0, i32 %1, i32 %2) {
%4 = load i32, i32* @stdscr
%5 = tail call i32 @getyx(i32 %4, i32 undef, i32 undef)
%6 = icmp eq i32 %2, 0
br i1 %6, label %13, label %7
7: ; preds = %3, %7
%8 = phi i32 [ %9, %7 ], [ %2, %3 ]
%9 = add nsw i32 %8, -1
%10 = add nsw i32 %9, %0
%11 = tail call i32 @mvaddch(i32 undef, i32 %10, i32 %1)
%12 = icmp eq i32 %9, 0
br i1 %12, label %13, label %7
13: ; preds = %7, %3
%14 = tail call i32 @move(i32 undef, i32 undef)
ret void
}
int chars_order(char c1, char c2) {
  if (c1 > c2)
    return -1;
  else if (c1 < c2)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<chars_order>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x5(%rbp)
mov    %al,-0x6(%rbp)
movsbl -0x5(%rbp),%eax
movsbl -0x6(%rbp),%ecx
cmp    %ecx,%eax
jle    112c <chars_order+0x2c>
movl   $0xffffffff,-0x4(%rbp)
jmp    114f <chars_order+0x4f>
movsbl -0x5(%rbp),%eax
movsbl -0x6(%rbp),%ecx
cmp    %ecx,%eax
jge    1148 <chars_order+0x48>
movl   $0x1,-0x4(%rbp)
jmp    114f <chars_order+0x4f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<chars_order>:
xor    %ecx,%ecx
cmp    %sil,%dil
setl   %cl
mov    $0xffffffff,%eax
cmovle %ecx,%eax
ret

LLVM IR (-O0):
define i32 @chars_order(i8 signext %0, i8 signext %1) {
%3 = alloca i32
%4 = alloca i8
%5 = alloca i8
store i8 %0, i8* %4
store i8 %1, i8* %5
%6 = load i8, i8* %4
%7 = sext i8 %6 to i32
%8 = load i8, i8* %5
%9 = sext i8 %8 to i32
%10 = icmp sgt i32 %7, %9
br i1 %10, label %11, label %12
11: ; preds = %2
store i32 -1, i32* %3
br label %20
12: ; preds = %2
%13 = load i8, i8* %4
%14 = sext i8 %13 to i32
%15 = load i8, i8* %5
%16 = sext i8 %15 to i32
%17 = icmp slt i32 %14, %16
br i1 %17, label %18, label %19
18: ; preds = %12
store i32 1, i32* %3
br label %20
19: ; preds = %12
store i32 0, i32* %3
br label %20
20: ; preds = %19, %18, %11
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
define i32 @chars_order(i8 signext %0, i8 signext %1) {
%3 = icmp sgt i8 %0, %1
%4 = icmp slt i8 %0, %1
%5 = zext i1 %4 to i32
%6 = select i1 %3, i32 -1, i32 %5
ret i32 %6
}
void activate_mm(struct mm_struct *prev, struct mm_struct *next) {}


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

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

LLVM IR (-O0):
%struct.mm_struct = type opaque
define void @activate_mm(%struct.mm_struct* %0, %struct.mm_struct* %1) {
%3 = alloca %struct.mm_struct*
%4 = alloca %struct.mm_struct*
store %struct.mm_struct* %0, %struct.mm_struct** %3
store %struct.mm_struct* %1, %struct.mm_struct** %4
ret void
}

LLVM IR (-O2):
%struct.mm_struct = type opaque
define void @activate_mm(%struct.mm_struct* nocapture %0, %struct.mm_struct* nocapture %1) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
uint64_t c_logger_read(void *opaque, int64_t offset, unsigned size) {
  return 0;
}


x86 assembly (clang, -O0):
<c_logger_read>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @c_logger_read(i8* nocapture readnone %0, i32 %1, i32 %2) {
ret i32 0
}
/* Variables and functions */
double mulsign(int, double);
double sign(double d) { return mulsign(1, d); }


x86 assembly (clang, -O0):
<sign>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    $0x1,%edi
call   1030 <mulsign@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sign>:
mov    $0x1,%edi
jmp    1030 <mulsign@plt>

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

LLVM IR (-O2):
define double @sign(double %0) {
%2 = tail call double @mulsign(i32 1, double %0)
ret double %2
}
int d_lt_rm1(double a1, double *a2) { return (((a1) < (*a2))); }


x86 assembly (clang, -O0):
<d_lt_rm1>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm1
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
ucomisd %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<d_lt_rm1>:
movsd  (%rdi),%xmm1
xor    %eax,%eax
ucomisd %xmm0,%xmm1
seta   %al
ret

LLVM IR (-O0):
define i32 @d_lt_rm1(double %0, double* %1) {
%3 = alloca double
%4 = alloca double*
store double %0, double* %3
store double* %1, double** %4
%5 = load double, double* %3
%6 = load double*, double** %4
%7 = load double, double* %6
%8 = fcmp olt double %5, %7
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @d_lt_rm1(double %0, double* nocapture %1) {
%3 = load double, double* %1
%4 = fcmp ogt double %3, %0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
scalar_t__ floor(long);
long random_double();
long random_integer(long n) { return (long)floor((n + 1) * random_double()); }


x86 assembly (clang, -O0):
<random_integer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1030 <random_double@plt>
mov    -0x10(%rbp),%rdi
imul   %rax,%rdi
call   1040 <floor@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<random_integer>:
push   %rbx
mov    %rdi,%rbx
add    $0x1,%rbx
xor    %eax,%eax
call   1030 <random_double@plt>
imul   %rax,%rbx
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <floor@plt>

LLVM IR (-O0):
define i64 @random_integer(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add nsw i64 %3, 1
%5 = call i64 (...) @random_double()
%6 = mul nsw i64 %4, %5
%7 = call i64 @floor(i64 %6)
ret i64 %7
}

LLVM IR (-O2):
define i64 @random_integer(i64 %0) {
%2 = add nsw i64 %0, 1
%3 = tail call i64 (...) @random_double()
%4 = mul nsw i64 %3, %2
%5 = tail call i64 @floor(i64 %4)
ret i64 %5
}
/* Variables and functions */
char *ft_strnew(int);
char *ft_initiate(int n) {
  char *new;
  if (n < 0) {
    new = ft_strnew(3);
    new[0] = '-';
    new[1] = -n + '0';
  } else {
    new = ft_strnew(2);
    new[0] = n + '0';
  }
  return (new);
}


x86 assembly (clang, -O0):
<ft_initiate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    1150 <ft_initiate+0x40>
mov    $0x3,%edi
call   1030 <ft_strnew@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movb   $0x2d,(%rax)
xor    %eax,%eax
sub    -0x4(%rbp),%eax
add    $0x30,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x1(%rax)
jmp    116c <ft_initiate+0x5c>
mov    $0x2,%edi
call   1030 <ft_strnew@plt>
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_initiate>:
push   %rbx
mov    %edi,%ebx
test   %edi,%edi
js     1128 <ft_initiate+0x18>
mov    $0x2,%edi
call   1030 <ft_strnew@plt>
add    $0x30,%bl
mov    %bl,(%rax)
pop    %rbx
ret
mov    $0x3,%edi
call   1030 <ft_strnew@plt>
movb   $0x2d,(%rax)
mov    $0x30,%cl
sub    %bl,%cl
mov    %cl,0x1(%rax)
pop    %rbx
ret

LLVM IR (-O0):
define i8* @ft_initiate(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %16
6: ; preds = %1
%7 = call i8* @ft_strnew(i32 3)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = getelementptr inbounds i8, i8* %8, i64 0
store i8 45, i8* %9
%10 = load i32, i32* %2
%11 = sub nsw i32 0, %10
%12 = add nsw i32 %11, 48
%13 = trunc i32 %12 to i8
%14 = load i8*, i8** %3
%15 = getelementptr inbounds i8, i8* %14, i64 1
store i8 %13, i8* %15
br label %23
16: ; preds = %1
%17 = call i8* @ft_strnew(i32 2)
store i8* %17, i8** %3
%18 = load i32, i32* %2
%19 = add nsw i32 %18, 48
%20 = trunc i32 %19 to i8
%21 = load i8*, i8** %3
%22 = getelementptr inbounds i8, i8* %21, i64 0
store i8 %20, i8* %22
br label %23
23: ; preds = %16, %6
%24 = load i8*, i8** %3
ret i8* %24
}

LLVM IR (-O2):
define i8* @ft_initiate(i32 %0) {
%2 = icmp slt i32 %0, 0
br i1 %2, label %3, label %8
3: ; preds = %1
%4 = tail call i8* @ft_strnew(i32 3)
store i8 45, i8* %4
%5 = trunc i32 %0 to i8
%6 = sub i8 48, %5
%7 = getelementptr inbounds i8, i8* %4, i64 1
store i8 %6, i8* %7
br label %12
8: ; preds = %1
%9 = tail call i8* @ft_strnew(i32 2)
%10 = trunc i32 %0 to i8
%11 = add i8 %10, 48
store i8 %11, i8* %9
br label %12
12: ; preds = %8, %3
%13 = phi i8* [ %4, %3 ], [ %9, %8 ]
ret i8* %13
}
/* Variables and functions */
int read_litteral(char *);
int parse_or_operator() { return read_litteral("||"); }


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

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

LLVM IR (-O0):
@.str = [3 x i8] c"||\00"
define i32 @parse_or_operator() {
%1 = call i32 @read_litteral(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [3 x i8] c"||\00"
define i32 @parse_or_operator() {
%1 = tail call i32 @read_litteral(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128d;

/* Variables and functions */
int _mm_ucomieq_sd(int /*<<< orphan*/, int /*<<< orphan*/);
int test_mm_ucomieq_sd(__m128d A, __m128d B) { return _mm_ucomieq_sd(A, B); }


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

x86 assembly (clang, -O2):
<test_mm_ucomieq_sd>:
jmp    1030 <_mm_ucomieq_sd@plt>

LLVM IR (-O0):
define i32 @test_mm_ucomieq_sd(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 @_mm_ucomieq_sd(i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @test_mm_ucomieq_sd(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_ucomieq_sd(i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
scalar_t__ cplIsSpace(char);
scalar_t__ cplSeparatorFind(char);
int cplIsEoi(char *p) {
  return (int)(!*p || cplIsSpace(*p) || cplSeparatorFind(*p));
}


x86 assembly (clang, -O0):
<cplIsEoi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
mov    $0x1,%al
cmpb   $0x0,(%rcx)
mov    %al,-0x9(%rbp)
je     1172 <cplIsEoi+0x52>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1040 <cplIsSpace@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x9(%rbp)
jne    1172 <cplIsEoi+0x52>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <cplSeparatorFind@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cplIsEoi>:
push   %r14
push   %rbx
push   %rax
mov    (%rdi),%al
mov    $0x1,%ebx
test   %al,%al
je     1150 <cplIsEoi+0x30>
mov    %rdi,%r14
movsbl %al,%edi
call   1040 <cplIsSpace@plt>
test   %rax,%rax
jne    1150 <cplIsEoi+0x30>
movsbl (%r14),%edi
call   1030 <cplSeparatorFind@plt>
xor    %ebx,%ebx
test   %rax,%rax
setne  %bl
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @cplIsEoi(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1
%5 = tail call i64 @cplIsSpace(i8 signext %2)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %4
%8 = load i8, i8* %0
%9 = tail call i64 @cplSeparatorFind(i8 signext %8)
%10 = icmp ne i64 %9, 0
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %7, %4, %1
%13 = phi i32 [ 1, %4 ], [ 1, %1 ], [ %11, %7 ]
ret i32 %13
}
void f1(a, b) int a, b;
{}


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

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

LLVM IR (-O0):
define void @f1(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
define void @f1(i32 %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ init();
void Actuator_Initialization() { init(); }


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

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

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

LLVM IR (-O2):
define void @Actuator_Initialization() {
%1 = tail call i32 (...) @init()
ret void
}
/* Variables and functions */
int str_fixup(void **, int);
int rpid_fixup(void **param, int param_no) {
  if (param_no == 1) {
    return str_fixup(param, 1);
  } else if (param_no == 2) {
    return str_fixup(param, 1);
  }
  return 0;
}


x86 assembly (clang, -O0):
<rpid_fixup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
cmpl   $0x1,-0x14(%rbp)
jne    113f <rpid_fixup+0x2f>
mov    -0x10(%rbp),%rdi
mov    $0x1,%esi
call   1030 <str_fixup@plt>
mov    %eax,-0x4(%rbp)
jmp    116b <rpid_fixup+0x5b>
cmpl   $0x2,-0x14(%rbp)
jne    115f <rpid_fixup+0x4f>
mov    -0x10(%rbp),%rdi
mov    $0x1,%esi
call   1030 <str_fixup@plt>
mov    %eax,-0x4(%rbp)
jmp    116b <rpid_fixup+0x5b>
jmp    1164 <rpid_fixup+0x54>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rpid_fixup>:
add    $0xffffffff,%esi
cmp    $0x1,%esi
ja     1122 <rpid_fixup+0x12>
mov    $0x1,%esi
jmp    1030 <str_fixup@plt>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @rpid_fixup(i8** %0, i32 %1) {
%3 = add i32 %1, -1
%4 = icmp ult i32 %3, 2
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @str_fixup(i8** %0, i32 1)
br label %7
7: ; preds = %2, %5
%8 = phi i32 [ 0, %2 ], [ %6, %5 ]
ret i32 %8
}
/* Variables and functions */
int cfg_processor_get_hex_int_attr(void *, char *);
int cfg_memory_get_area_begin_addr(void *area) {
  return cfg_processor_get_hex_int_attr(area, "begin");
}


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

x86 assembly (clang, -O2):
<cfg_memory_get_area_begin_addr>:
lea    0xee9(%rip),%rsi
jmp    1030 <cfg_processor_get_hex_int_attr@plt>

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

LLVM IR (-O2):
@.str = [6 x i8] c"begin\00"
define i32 @cfg_memory_get_area_begin_addr(i8* %0) {
%2 = tail call i32 @cfg_processor_get_hex_int_attr(i8* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void help(void) {
  puts("Usage: fatrace [options...] \n"
       "\n"
       "Options:\n"
       "  -c, --current-mount\t\tOnly record events on partition/mount of "
       "current directory.\n"
       "  -o FILE, --output=FILE\tWrite events to a file instead of standard "
       "output.\n"
       "  -s SECONDS, --seconds=SECONDS\tStop after the given number of "
       "seconds.\n"
       "  -t, --timestamp\t\tAdd timestamp to events. Give twice for seconds "
       "since the epoch.\n"
       "  -p PID, --ignore-pid PID\tIgnore events for this process ID. Can be "
       "specified multiple times.\n"
       "  -f PID, --filter-pid PID\tPrint events for only this particular "
       "process ID..\n"
       "  -h, --help\t\t\tShow help.");
}


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

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

LLVM IR (-O0):
@.str = [553 x i8] c"Usage: fatrace [options...] \0A\0AOptions:\0A -c, --current-mount\09\09Only record events on partition/mount of current directory.\0A -o FILE, --output=FILE\09Write events to a file instead of standard output.\0A -s SECONDS, --seconds=SECONDS\09Stop after the given number of seconds.\0A -t, --timestamp\09\09Add timestamp to events. Give twice for seconds since the epoch.\0A -p PID, --ignore-pid PID\09Ignore events for this process ID. Can be specified multiple times.\0A -f PID, --filter-pid PID\09Print events for only this particular process ID..\0A -h, --help\09\09\09Show help.\00"
define void @help() {
%1 = call i32 @puts(i8* getelementptr inbounds ([553 x i8], [553 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [553 x i8] c"Usage: fatrace [options...] \0A\0AOptions:\0A -c, --current-mount\09\09Only record events on partition/mount of current directory.\0A -o FILE, --output=FILE\09Write events to a file instead of standard output.\0A -s SECONDS, --seconds=SECONDS\09Stop after the given number of seconds.\0A -t, --timestamp\09\09Add timestamp to events. Give twice for seconds since the epoch.\0A -p PID, --ignore-pid PID\09Ignore events for this process ID. Can be specified multiple times.\0A -f PID, --filter-pid PID\09Print events for only this particular process ID..\0A -h, --help\09\09\09Show help.\00"
define void @help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([553 x i8], [553 x i8]* @.str, i64 0, i64 0))
ret void
}