xunge/DecIR huggingface dataset:
char to_ascii(char c) {
  if (c >= 32 && c <= 126)
    return c;
  return '.';
}


x86 assembly (clang, -O0):
<to_ascii>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
cmp    $0x20,%eax
jl     112f <to_ascii+0x2f>
movsbl -0x2(%rbp),%eax
cmp    $0x7e,%eax
jg     112f <to_ascii+0x2f>
mov    -0x2(%rbp),%al
mov    %al,-0x1(%rbp)
jmp    1133 <to_ascii+0x33>
movb   $0x2e,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<to_ascii>:
lea    -0x20(%rdi),%eax
cmp    $0x5f,%al
mov    $0x2e,%eax
cmovb  %edi,%eax
ret

LLVM IR (-O0):
define signext i8 @to_ascii(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 32
br i1 %6, label %7, label %13
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 126
br i1 %10, label %11, label %13
11: ; preds = %7
%12 = load i8, i8* %3
store i8 %12, i8* %2
br label %14
13: ; preds = %7, %1
store i8 46, i8* %2
br label %14
14: ; preds = %13, %11
%15 = load i8, i8* %2
ret i8 %15
}

LLVM IR (-O2):
define signext i8 @to_ascii(i8 signext %0) {
%2 = add i8 %0, -32
%3 = icmp ult i8 %2, 95
%4 = select i1 %3, i8 %0, i8 46
ret i8 %4
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isgraph(int);
void t_isgraph_0xdd() {
  Assert_real((isgraph(221) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isgraph.c",
              1110, ("isgraph should be 0 for 0xdd"));
}


x86 assembly (clang, -O0):
<t_isgraph_0xdd>:
push   %rbp
mov    %rsp,%rbp
mov    $0xdd,%edi
call   1040 <isgraph@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x456,%edx
lea    0xf5b(%rip),%rcx
call   1030 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isgraph_0xdd>:
push   %rax
mov    $0xdd,%edi
call   1040 <isgraph@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x456,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0xdd\00"
define void @t_isgraph_0xdd() {
%1 = call i64 @isgraph(i32 221)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1110, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0xdd\00"
define void @t_isgraph_0xdd() {
%1 = tail call i64 @isgraph(i32 221)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1110, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int SAT_ADD(int a, int b, int m) {
  if (a + b > m) {
    return (m);
  }
  if (a + b < -m) {
    return (-m);
  }
  return (a + b);
}


x86 assembly (clang, -O0):
<SAT_ADD>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    1127 <SAT_ADD+0x27>
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1150 <SAT_ADD+0x50>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
xor    %ecx,%ecx
sub    -0x10(%rbp),%ecx
cmp    %ecx,%eax
jge    1147 <SAT_ADD+0x47>
xor    %eax,%eax
sub    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1150 <SAT_ADD+0x50>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SAT_ADD>:
add    %esi,%edi
mov    %edx,%eax
neg    %eax
cmp    %eax,%edi
cmovge %edi,%eax
cmp    %edx,%edi
cmovg  %edx,%eax
ret

LLVM IR (-O0):
define i32 @SAT_ADD(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = add nsw i32 %8, %9
%11 = load i32, i32* %7
%12 = icmp sgt i32 %10, %11
br i1 %12, label %13, label %15
13: ; preds = %3
%14 = load i32, i32* %7
store i32 %14, i32* %4
br label %29
15: ; preds = %3
%16 = load i32, i32* %5
%17 = load i32, i32* %6
%18 = add nsw i32 %16, %17
%19 = load i32, i32* %7
%20 = sub nsw i32 0, %19
%21 = icmp slt i32 %18, %20
br i1 %21, label %22, label %25
22: ; preds = %15
%23 = load i32, i32* %7
%24 = sub nsw i32 0, %23
store i32 %24, i32* %4
br label %29
25: ; preds = %15
%26 = load i32, i32* %5
%27 = load i32, i32* %6
%28 = add nsw i32 %26, %27
store i32 %28, i32* %4
br label %29
29: ; preds = %25, %22, %13
%30 = load i32, i32* %4
ret i32 %30
}

LLVM IR (-O2):
define i32 @SAT_ADD(i32 %0, i32 %1, i32 %2) {
%4 = add nsw i32 %1, %0
%5 = icmp sgt i32 %4, %2
%6 = sub nsw i32 0, %2
%7 = icmp slt i32 %4, %6
%8 = select i1 %7, i32 %6, i32 %4
%9 = select i1 %5, i32 %2, i32 %8
ret i32 %9
}
int main(void) {
  int a[5] = {1, 2, 3, 4, 5};
  *(&a[4]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    0xef5(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xef2(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xef0(%rip),%eax
mov    %eax,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@__const.main.a = [5 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5]
define i32 @main() {
%1 = alloca [5 x i32]
%2 = bitcast [5 x i32]* %1 to i8*
%3 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 4
%4 = load i32, i32* %3
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ v;

/* Variables and functions */
int sysctl(int const *, size_t, int *, size_t *, int /*<<< orphan*/ *,
           int /*<<< orphan*/);
int get_int_sysctl_by_mib(const int *mib, size_t miblen, int *error) {
  int v;
  size_t lv = sizeof(v);
  *error = sysctl(mib, miblen, &v, &lv, NULL, 0);
  return v;
}


x86 assembly (clang, -O0):
<get_int_sysctl_by_mib>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movq   $0x4,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x1c(%rbp),%rdx
lea    -0x28(%rbp),%rcx
xor    %eax,%eax
mov    %eax,%r8d
xor    %r9d,%r9d
call   1030 <sysctl@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x1c(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_int_sysctl_by_mib>:
push   %rbx
sub    $0x10,%rsp
mov    %rdx,%rbx
movq   $0x4,0x8(%rsp)
lea    0x4(%rsp),%rdx
lea    0x8(%rsp),%rcx
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1030 <sysctl@plt>
mov    %eax,(%rbx)
mov    0x4(%rsp),%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @get_int_sysctl_by_mib(i32* %0, i64 %1, i32* %2) {
%4 = alloca i32*
%5 = alloca i64
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i64
store i32* %0, i32** %4
store i64 %1, i64* %5
store i32* %2, i32** %6
store i64 4, i64* %8
%9 = load i32*, i32** %4
%10 = load i64, i64* %5
%11 = call i32 @sysctl(i32* %9, i64 %10, i32* %7, i64* %8, i32* null, i32 0)
%12 = load i32*, i32** %6
store i32 %11, i32* %12
%13 = load i32, i32* %7
ret i32 %13
}

LLVM IR (-O2):
define i32 @get_int_sysctl_by_mib(i32* %0, i64 %1, i32* nocapture writeonly %2) {
%4 = alloca i32
%5 = alloca i64
%6 = bitcast i32* %4 to i8*
%7 = bitcast i64* %5 to i8*
store i64 4, i64* %5
%8 = call i32 @sysctl(i32* %0, i64 %1, i32* %4, i64* %5, i32* null, i32 0)
store i32 %8, i32* %2
%9 = load i32, i32* %4
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, long long, long long);
void assert_int_equals(long long expected, long long actual) {
  if (expected != actual) {
    printf("Expected: %lld, but was %lld\n", expected, actual);
    exit(EXIT_FAILURE);
  }
}


x86 assembly (clang, -O0):
<assert_int_equals>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
je     1160 <assert_int_equals+0x40>
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e87(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<assert_int_equals>:
mov    %rsi,%rdx
cmp    %rsi,%rdi
jne    1129 <assert_int_equals+0x9>
ret
push   %rax
mov    %rdi,%rsi
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [30 x i8] c"Expected: %lld, but was %lld\0A\00"
@EXIT_FAILURE = global i32 0
define void @assert_int_equals(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp ne i64 %5, %6
br i1 %7, label %8, label %14
8: ; preds = %2
%9 = load i64, i64* %3
%10 = load i64, i64* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i64 %9, i64 %10)
%12 = load i32, i32* @EXIT_FAILURE
%13 = call i32 @exit(i32 %12)
unreachable
14: ; preds = %2
ret void
}

LLVM IR (-O2):
@.str = [30 x i8] c"Expected: %lld, but was %lld\0A\00"
@EXIT_FAILURE = global i32 0
define void @assert_int_equals(i64 %0, i64 %1) {
%3 = icmp eq i64 %0, %1
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = tail call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i64 %0, i64 %1)
%6 = load i32, i32* @EXIT_FAILURE
%7 = tail call i32 @exit(i32 %6)
unreachable
8: ; preds = %2
ret void
}
void Timer3B_Handler(void) {
  while (1) {
  }
}


x86 assembly (clang, -O0):
<Timer3B_Handler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <Timer3B_Handler+0x9>
jmp    1109 <Timer3B_Handler+0x9>

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

LLVM IR (-O0):
define void @Timer3B_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @Timer3B_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}
void foo496() {}


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

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

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

LLVM IR (-O2):
define void @foo496() {
ret void
}
/* Type definitions */
struct genlist {
  int dummy;
};
struct entry_list {
  int dummy;
};
struct entry {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ genlist_insert(struct genlist *, struct entry *, int);
void entry_list_insert(struct entry_list *tthis, struct entry *pfoo, int idx) {
  genlist_insert((struct genlist *)tthis, pfoo, idx);
}


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

x86 assembly (clang, -O2):
<entry_list_insert>:
jmp    1030 <genlist_insert@plt>

LLVM IR (-O0):
%struct.entry_list = type { i32 }
%struct.entry = type { i32 }
%struct.genlist = type { i32 }
define void @entry_list_insert(%struct.entry_list* %0, %struct.entry* %1, i32 %2) {
%4 = alloca %struct.entry_list*
%5 = alloca %struct.entry*
%6 = alloca i32
store %struct.entry_list* %0, %struct.entry_list** %4
store %struct.entry* %1, %struct.entry** %5
store i32 %2, i32* %6
%7 = load %struct.entry_list*, %struct.entry_list** %4
%8 = bitcast %struct.entry_list* %7 to %struct.genlist*
%9 = load %struct.entry*, %struct.entry** %5
%10 = load i32, i32* %6
%11 = call i32 @genlist_insert(%struct.genlist* %8, %struct.entry* %9, i32 %10)
ret void
}

LLVM IR (-O2):
%struct.entry_list = type { i32 }
%struct.entry = type { i32 }
%struct.genlist = type { i32 }
define void @entry_list_insert(%struct.entry_list* %0, %struct.entry* %1, i32 %2) {
%4 = bitcast %struct.entry_list* %0 to %struct.genlist*
%5 = tail call i32 @genlist_insert(%struct.genlist* %4, %struct.entry* %1, i32 %2)
ret void
}
int main() {
  __asm__("jmp cond");
  __asm__("myloop:");
  __asm__("inc %rax");
  __asm__("cond:");
  __asm__("jle myloop");
  __asm__("ret");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
jmp    110c <cond>

x86 assembly (clang, -O2):
<main>:
jmp    1105 <cond>

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

LLVM IR (-O2):
define i32 @main() {
tail call void asm sideeffect "jmp cond", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect "myloop:", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect "inc %rax", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect "cond:", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect "jle myloop", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect "ret", "~{dirflag},~{fpsr},~{flags}"()
ret i32 0
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void EPIConfigHB8Set(uint32_t ui32Base, uint32_t ui32Config,
                     uint32_t ui32MaxWait) {
  ;
  ;
  (*((volatile uint32_t *)(ui32Base + 0x00000014))) =
      ((ui32Config & 0x00000800) ? 0x04000000 : 0) |
      ((ui32Config & 0x00001600) << 15);
  ui32Config &= ~0x0000FF00;
  ui32Config |= ui32MaxWait << 8;
  (*((volatile uint32_t *)(ui32Base + 0x00000010))) = ui32Config;
}


x86 assembly (clang, -O0):
<EPIConfigHB8Set>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%edx
and    $0x800,%edx
xor    %ecx,%ecx
mov    $0x4000000,%eax
cmp    $0x0,%edx
cmovne %eax,%ecx
mov    -0x8(%rbp),%eax
and    $0x1600,%eax
shl    $0xf,%eax
or     %eax,%ecx
mov    -0x4(%rbp),%eax
add    $0x14,%eax
cltq
mov    %ecx,(%rax)
mov    -0x8(%rbp),%eax
and    $0xffff00ff,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x8,%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%ecx
mov    -0x4(%rbp),%eax
add    $0x10,%eax
cltq
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<EPIConfigHB8Set>:
mov    %esi,%eax
shl    $0xf,%eax
and    $0xf000000,%eax
movslq %edi,%rcx
mov    %eax,0x14(%rcx)
and    $0xffff00ff,%esi
shl    $0x8,%edx
or     %esi,%edx
mov    %edx,0x10(%rcx)
ret

LLVM IR (-O0):
define void @EPIConfigHB8Set(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %5
%8 = and i32 %7, 2048
%9 = icmp ne i32 %8, 0
%10 = zext i1 %9 to i64
%11 = select i1 %9, i32 67108864, i32 0
%12 = load i32, i32* %5
%13 = and i32 %12, 5632
%14 = shl i32 %13, 15
%15 = or i32 %11, %14
%16 = load i32, i32* %4
%17 = add nsw i32 %16, 20
%18 = sext i32 %17 to i64
%19 = inttoptr i64 %18 to i32*
store volatile i32 %15, i32* %19
%20 = load i32, i32* %5
%21 = and i32 %20, -65281
store i32 %21, i32* %5
%22 = load i32, i32* %6
%23 = shl i32 %22, 8
%24 = load i32, i32* %5
%25 = or i32 %24, %23
store i32 %25, i32* %5
%26 = load i32, i32* %5
%27 = load i32, i32* %4
%28 = add nsw i32 %27, 16
%29 = sext i32 %28 to i64
%30 = inttoptr i64 %29 to i32*
store volatile i32 %26, i32* %30
ret void
}

LLVM IR (-O2):
define void @EPIConfigHB8Set(i32 %0, i32 %1, i32 %2) {
%4 = shl i32 %1, 15
%5 = and i32 %4, 251658240
%6 = add nsw i32 %0, 20
%7 = sext i32 %6 to i64
%8 = inttoptr i64 %7 to i32*
store volatile i32 %5, i32* %8
%9 = and i32 %1, -65281
%10 = shl i32 %2, 8
%11 = or i32 %10, %9
%12 = add nsw i32 %0, 16
%13 = sext i32 %12 to i64
%14 = inttoptr i64 %13 to i32*
store volatile i32 %11, i32* %14
ret void
}
/* Variables and functions */
double exp(double);
float filt_gaussian(float x) {
  x = x * 1.5;
  return (1.0 / exp(x * x) - 1.0 / exp(1.5 * 1.5 * 1.5 * 1.5));
}


x86 assembly (clang, -O0):
<filt_gaussian>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xee2(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  0xea7(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xe9e(%rip),%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm2
movsd  -0x10(%rbp),%xmm0
movsd  0xe81(%rip),%xmm1
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<filt_gaussian>:
push   %rax
mulss  0xee7(%rip),%xmm0
mulss  %xmm0,%xmm0
cvtss2sd %xmm0,%xmm0
call   1030 <exp@plt>
movsd  0xeda(%rip),%xmm1
divsd  %xmm0,%xmm1
addsd  0xed6(%rip),%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @filt_gaussian(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = fmul double %4, 1.500000e+00
%6 = fptrunc double %5 to float
store float %6, float* %2
%7 = load float, float* %2
%8 = load float, float* %2
%9 = fmul float %7, %8
%10 = fpext float %9 to double
%11 = call double @exp(double %10)
%12 = fdiv double 1.000000e+00, %11
%13 = call double @exp(double 5.062500e+00)
%14 = fdiv double 1.000000e+00, %13
%15 = fsub double %12, %14
%16 = fptrunc double %15 to float
ret float %16
}

LLVM IR (-O2):
define float @filt_gaussian(float %0) {
%2 = fmul float %0, 1.500000e+00
%3 = fmul float %2, %2
%4 = fpext float %3 to double
%5 = tail call double @exp(double %4)
%6 = fdiv double 1.000000e+00, %5
%7 = fadd double %6, 0xBF79ED300C108A17
%8 = fptrunc double %7 to float
ret float %8
}
foo7() {}


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

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

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

LLVM IR (-O2):
define i32 @foo7() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(int *, int *, int);
int /*<<< orphan*/ top_down_merge_sorti_impl(int *, int /*<<< orphan*/, int,
                                             int *, int /*<<< orphan*/);
void top_down_merge_sorti(int arr[], int n, int temp[]) {
  memcpy(temp, arr, n * sizeof(int));
  top_down_merge_sorti_impl(temp, 0, n, arr, 0);
}


x86 assembly (clang, -O0):
<top_down_merge_sorti>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edx
call   1030 <memcpy@plt>
mov    -0x18(%rbp),%rdi
mov    -0xc(%rbp),%edx
mov    -0x8(%rbp),%rcx
xor    %r8d,%r8d
mov    %r8d,%esi
call   1040 <top_down_merge_sorti_impl@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<top_down_merge_sorti>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%rbx
mov    %esi,%r14d
mov    %rdi,%r15
lea    0x0(,%r14,4),%edx
mov    %rbx,%rdi
mov    %r15,%rsi
call   1030 <memcpy@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    %r14d,%edx
mov    %r15,%rcx
xor    %r8d,%r8d
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <top_down_merge_sorti_impl@plt>

LLVM IR (-O0):
define void @top_down_merge_sorti(i32* %0, i32 %1, i32* %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32*
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32* %2, i32** %6
%7 = load i32*, i32** %6
%8 = load i32*, i32** %4
%9 = load i32, i32* %5
%10 = sext i32 %9 to i64
%11 = mul i64 %10, 4
%12 = trunc i64 %11 to i32
%13 = call i32 @memcpy(i32* %7, i32* %8, i32 %12)
%14 = load i32*, i32** %6
%15 = load i32, i32* %5
%16 = load i32*, i32** %4
%17 = call i32 @top_down_merge_sorti_impl(i32* %14, i32 0, i32 %15, i32* %16, i32 0)
ret void
}

LLVM IR (-O2):
define void @top_down_merge_sorti(i32* %0, i32 %1, i32* %2) {
%4 = shl i32 %1, 2
%5 = tail call i32 @memcpy(i32* %2, i32* %0, i32 %4)
%6 = tail call i32 @top_down_merge_sorti_impl(i32* %2, i32 0, i32 %1, i32* %0, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int positive;
  scanf("%d\n", &positive);
  if (positive > 0) {
    printf("yes\n");
  } else {
    printf("no\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>
cmpl   $0x0,-0x8(%rbp)
jle    115a <main+0x3a>
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
jmp    1166 <main+0x46>
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
cmpl   $0x0,0x4(%rsp)
lea    0xec9(%rip),%rax
lea    0xebf(%rip),%rdi
cmovg  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
@str = [3 x i8] c"no\00"
@str.3 = [4 x i8] c"yes\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = icmp sgt i32 %4, 0
%6 = select i1 %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.3, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0)
%7 = call i32 @puts(i8* dereferenceable(1) %6)
ret i32 0
}
char *XDisplayString() {}


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

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

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

LLVM IR (-O2):
define noalias i8* @XDisplayString() {
ret i8* undef
}
/* Type definitions */
struct xdr_stream {
  int dummy;
};
typedef enum auth_stat { ____Placeholder_auth_stat } auth_stat;

/* Variables and functions */
int xdr_uint(struct xdr_stream *, int *);
int xdr_auth_stat(struct xdr_stream *stream, enum auth_stat *value) {
  return xdr_uint(stream, value);
}


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

x86 assembly (clang, -O2):
<xdr_auth_stat>:
jmp    1030 <xdr_uint@plt>

LLVM IR (-O0):
%struct.xdr_stream = type { i32 }
define i32 @xdr_auth_stat(%struct.xdr_stream* %0, i32* %1) {
%3 = alloca %struct.xdr_stream*
%4 = alloca i32*
store %struct.xdr_stream* %0, %struct.xdr_stream** %3
store i32* %1, i32** %4
%5 = load %struct.xdr_stream*, %struct.xdr_stream** %3
%6 = load i32*, i32** %4
%7 = call i32 @xdr_uint(%struct.xdr_stream* %5, i32* %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.xdr_stream = type { i32 }
define i32 @xdr_auth_stat(%struct.xdr_stream* %0, i32* %1) {
%3 = tail call i32 @xdr_uint(%struct.xdr_stream* %0, i32* %1)
ret i32 %3
}
/* Type definitions */
struct zint_symbol {
  int dummy;
};

/* Variables and functions */
int upca_cc(struct zint_symbol *, unsigned char const *, int, char *,
            int /*<<< orphan*/);
int upca(struct zint_symbol *symbol, const unsigned char source[], int length,
         char dest[]) {
  return upca_cc(symbol, source, length, dest, 0);
}


x86 assembly (clang, -O0):
<upca>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x20(%rbp),%rcx
xor    %r8d,%r8d
call   1030 <upca_cc@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<upca>:
xor    %r8d,%r8d
jmp    1030 <upca_cc@plt>

LLVM IR (-O0):
%struct.zint_symbol = type { i32 }
define i32 @upca(%struct.zint_symbol* %0, i8* %1, i32 %2, i8* %3) {
%5 = alloca %struct.zint_symbol*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
store %struct.zint_symbol* %0, %struct.zint_symbol** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i8* %3, i8** %8
%9 = load %struct.zint_symbol*, %struct.zint_symbol** %5
%10 = load i8*, i8** %6
%11 = load i32, i32* %7
%12 = load i8*, i8** %8
%13 = call i32 @upca_cc(%struct.zint_symbol* %9, i8* %10, i32 %11, i8* %12, i32 0)
ret i32 %13
}

LLVM IR (-O2):
%struct.zint_symbol = type { i32 }
define i32 @upca(%struct.zint_symbol* %0, i8* %1, i32 %2, i8* %3) {
%5 = tail call i32 @upca_cc(%struct.zint_symbol* %0, i8* %1, i32 %2, i8* %3, i32 0)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ _I8080_RST(int);
void do0xEF() { _I8080_RST(5); }


x86 assembly (clang, -O0):
<do0xEF>:
push   %rbp
mov    %rsp,%rbp
mov    $0x5,%edi
call   1030 <_I8080_RST@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<do0xEF>:
mov    $0x5,%edi
jmp    1030 <_I8080_RST@plt>

LLVM IR (-O0):
define void @do0xEF() {
%1 = call i32 @_I8080_RST(i32 5)
ret void
}

LLVM IR (-O2):
define void @do0xEF() {
%1 = tail call i32 @_I8080_RST(i32 5)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ GENERAL_SUBTREE;
typedef int /*<<< orphan*/ ASN1_VALUE;

/* Variables and functions */
int /*<<< orphan*/ ASN1_item_free(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ GENERAL_SUBTREE_it;
void GENERAL_SUBTREE_free(GENERAL_SUBTREE *a) {
  ASN1_item_free((ASN1_VALUE *)a, &GENERAL_SUBTREE_it);
}


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

x86 assembly (clang, -O2):
<GENERAL_SUBTREE_free>:
mov    0x2ed1(%rip),%rsi
jmp    1030 <ASN1_item_free@plt>

LLVM IR (-O0):
@GENERAL_SUBTREE_it = global i32 0
define void @GENERAL_SUBTREE_free(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @ASN1_item_free(i32* %3, i32* @GENERAL_SUBTREE_it)
ret void
}

LLVM IR (-O2):
@GENERAL_SUBTREE_it = global i32 0
define void @GENERAL_SUBTREE_free(i32* %0) {
%2 = tail call i32 @ASN1_item_free(i32* %0, i32* @GENERAL_SUBTREE_it)
ret void
}
int g(int i) { return i > (i + 2); }


x86 assembly (clang, -O0):
<g>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
add    $0x2,%ecx
cmp    %ecx,%eax
setg   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @g(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = add nsw i32 %4, 2
%6 = icmp sgt i32 %3, %5
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @g(i32 %0) {
ret i32 0
}
void driver_exit(void) {}


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

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

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

LLVM IR (-O2):
define void @driver_exit() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ OSRAMWriteByte(int);
int /*<<< orphan*/ OSRAMWriteFinal(int);
int /*<<< orphan*/ OSRAMWriteFirst(int);
void OSRAMDisplayOff(void) {
  OSRAMWriteFirst(0x80);
  OSRAMWriteByte(0xad);
  OSRAMWriteByte(0x80);
  OSRAMWriteByte(0x8a);
  OSRAMWriteByte(0x80);
  OSRAMWriteFinal(0xae);
}


x86 assembly (clang, -O0):
<OSRAMDisplayOff>:
push   %rbp
mov    %rsp,%rbp
mov    $0x80,%edi
call   1050 <OSRAMWriteFirst@plt>
mov    $0xad,%edi
call   1040 <OSRAMWriteByte@plt>
mov    $0x80,%edi
call   1040 <OSRAMWriteByte@plt>
mov    $0x8a,%edi
call   1040 <OSRAMWriteByte@plt>
mov    $0x80,%edi
call   1040 <OSRAMWriteByte@plt>
mov    $0xae,%edi
call   1030 <OSRAMWriteFinal@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<OSRAMDisplayOff>:
push   %rax
mov    $0x80,%edi
call   1050 <OSRAMWriteFirst@plt>
mov    $0xad,%edi
call   1040 <OSRAMWriteByte@plt>
mov    $0x80,%edi
call   1040 <OSRAMWriteByte@plt>
mov    $0x8a,%edi
call   1040 <OSRAMWriteByte@plt>
mov    $0x80,%edi
call   1040 <OSRAMWriteByte@plt>
mov    $0xae,%edi
pop    %rax
jmp    1030 <OSRAMWriteFinal@plt>

LLVM IR (-O0):
define void @OSRAMDisplayOff() {
%1 = call i32 @OSRAMWriteFirst(i32 128)
%2 = call i32 @OSRAMWriteByte(i32 173)
%3 = call i32 @OSRAMWriteByte(i32 128)
%4 = call i32 @OSRAMWriteByte(i32 138)
%5 = call i32 @OSRAMWriteByte(i32 128)
%6 = call i32 @OSRAMWriteFinal(i32 174)
ret void
}

LLVM IR (-O2):
define void @OSRAMDisplayOff() {
%1 = tail call i32 @OSRAMWriteFirst(i32 128)
%2 = tail call i32 @OSRAMWriteByte(i32 173)
%3 = tail call i32 @OSRAMWriteByte(i32 128)
%4 = tail call i32 @OSRAMWriteByte(i32 138)
%5 = tail call i32 @OSRAMWriteByte(i32 128)
%6 = tail call i32 @OSRAMWriteFinal(i32 174)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char *);
char *strstr(char *, char *);
int strtol(char *, char **, int);
int readInt(char *cmdResult) {
  char *jj;
  char ss[140];
  int nn;
  jj = strstr(cmdResult, "INTEGER:");
  strcpy(ss, (jj + 9));
  nn = strtol(ss, &jj, 10);
  return (nn);
}


x86 assembly (clang, -O0):
<readInt>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xeb6(%rip),%rsi
call   1050 <strstr@plt>
mov    %rax,-0x10(%rbp)
lea    -0xa0(%rbp),%rdi
mov    -0x10(%rbp),%rsi
add    $0x9,%rsi
call   1030 <strcpy@plt>
lea    -0xa0(%rbp),%rdi
lea    -0x10(%rbp),%rsi
mov    $0xa,%edx
call   1040 <strtol@plt>
mov    %eax,-0xa4(%rbp)
mov    -0xa4(%rbp),%eax
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readInt>:
push   %rbx
sub    $0xa0,%rsp
lea    0xec1(%rip),%rsi
call   1050 <strstr@plt>
mov    %rax,0x8(%rsp)
lea    0x9(%rax),%rsi
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
call   1030 <strcpy@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
mov    $0xa,%edx
call   1040 <strtol@plt>
add    $0xa0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"INTEGER:\00"
define i32 @readInt(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca [140 x i8]
%5 = alloca i32
store i8* %0, i8** %2
%6 = load i8*, i8** %2
%7 = call i8* @strstr(i8* %6, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
store i8* %7, i8** %3
%8 = getelementptr inbounds [140 x i8], [140 x i8]* %4, i64 0, i64 0
%9 = load i8*, i8** %3
%10 = getelementptr inbounds i8, i8* %9, i64 9
%11 = call i32 @strcpy(i8* %8, i8* %10)
%12 = getelementptr inbounds [140 x i8], [140 x i8]* %4, i64 0, i64 0
%13 = call i32 @strtol(i8* %12, i8** %3, i32 10)
store i32 %13, i32* %5
%14 = load i32, i32* %5
ret i32 %14
}

LLVM IR (-O2):
@.str = [9 x i8] c"INTEGER:\00"
define i32 @readInt(i8* %0) {
%2 = alloca i8*
%3 = alloca [140 x i8]
%4 = bitcast i8** %2 to i8*
%5 = getelementptr inbounds [140 x i8], [140 x i8]* %3, i64 0, i64 0
%6 = tail call i8* @strstr(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
store i8* %6, i8** %2
%7 = getelementptr inbounds i8, i8* %6, i64 9
%8 = call i32 @strcpy(i8* %5, i8* %7)
%9 = call i32 @strtol(i8* %5, i8** %2, i32 10)
ret i32 %9
}
int param_get_long(char *buffer, struct kernel_param *kp) { return 0; }


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

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

LLVM IR (-O0):
%struct.kernel_param = type opaque
define i32 @param_get_long(i8* %0, %struct.kernel_param* %1) {
%3 = alloca i8*
%4 = alloca %struct.kernel_param*
store i8* %0, i8** %3
store %struct.kernel_param* %1, %struct.kernel_param** %4
ret i32 0
}

LLVM IR (-O2):
%struct.kernel_param = type opaque
define i32 @param_get_long(i8* nocapture readnone %0, %struct.kernel_param* nocapture readnone %1) {
ret i32 0
}
unsigned len(unsigned *x) {
  unsigned i;
  for (i = 0; x[i]; i++)
    ;
  return i;
}


x86 assembly (clang, -O0):
<len>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
cmpl   $0x0,(%rax,%rcx,4)
je     1133 <len+0x33>
jmp    1125 <len+0x25>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <len+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<len>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpl   $0x0,(%rdi,%rax,4)
jne    1110 <len+0x10>
ret

LLVM IR (-O0):
define i32 @len(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
store i32 0, i32* %3
br label %4
4: ; preds = %12, %1
%5 = load i32*, i32** %2
%6 = load i32, i32* %3
%7 = zext i32 %6 to i64
%8 = getelementptr inbounds i32, i32* %5, i64 %7
%9 = load i32, i32* %8
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %15
11: ; preds = %4
br label %12
12: ; preds = %11
%13 = load i32, i32* %3
%14 = add i32 %13, 1
store i32 %14, i32* %3
br label %4
15: ; preds = %4
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
define i32 @len(i32* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ 0, %1 ], [ %8, %2 ]
%4 = zext i32 %3 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
%6 = load i32, i32* %5
%7 = icmp eq i32 %6, 0
%8 = add i32 %3, 1
br i1 %7, label %9, label %2
9: ; preds = %2
ret i32 %3
}
void numa_set_strict(int flag) {}


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

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

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

LLVM IR (-O2):
define void @numa_set_strict(i32 %0) {
ret void
}
/* Type definitions */
typedef scalar_t__ gid_t;

/* Variables and functions */
int /*<<< orphan*/ EINVAL;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
int setregid(int, scalar_t__);
int setegid(gid_t gid) {
  int result;
  if (gid == (gid_t)~0) {
    __set_errno(EINVAL);
    return -1;
  }
  result = setregid(-1, gid);
  return result;
}


x86 assembly (clang, -O0):
<setegid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0xffffffffffffffff,-0x10(%rbp)
jne    1151 <setegid+0x31>
mov    0x2ea2(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1168 <setegid+0x48>
mov    -0x10(%rbp),%rsi
mov    $0xffffffff,%edi
call   1040 <setregid@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setegid>:
cmp    $0xffffffffffffffff,%rdi
je     1133 <setegid+0x13>
mov    %rdi,%rsi
mov    $0xffffffff,%edi
jmp    1040 <setregid@plt>
push   %rax
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@EINVAL = global i32 0
define i32 @setegid(i64 %0) {
%2 = alloca i32
%3 = alloca i64
%4 = alloca i32
store i64 %0, i64* %3
%5 = load i64, i64* %3
%6 = icmp eq i64 %5, -1
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i32, i32* @EINVAL
%9 = call i32 @__set_errno(i32 %8)
store i32 -1, i32* %2
br label %14
10: ; preds = %1
%11 = load i64, i64* %3
%12 = call i32 @setregid(i32 -1, i64 %11)
store i32 %12, i32* %4
%13 = load i32, i32* %4
store i32 %13, i32* %2
br label %14
14: ; preds = %10, %7
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @setegid(i64 %0) {
%2 = icmp eq i64 %0, -1
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = load i32, i32* @EINVAL
%5 = tail call i32 @__set_errno(i32 %4)
br label %8
6: ; preds = %1
%7 = tail call i32 @setregid(i32 -1, i64 %0)
br label %8
8: ; preds = %6, %3
%9 = phi i32 [ -1, %3 ], [ %7, %6 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ HibernateWriteComplete();
void HibernateClockSelect(unsigned long ulClockInput) {

  ;
  (*((volatile unsigned long *)(0x400FC010))) =
      ulClockInput |
      ((*((volatile unsigned long *)(0x400FC010))) & ~0x00000004);
  HibernateWriteComplete();
}


x86 assembly (clang, -O0):
<HibernateClockSelect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
mov    $0x400fc010,%eax
mov    (%rax),%rax
and    $0xfffffffffffffffb,%rax
or     %rax,%rcx
mov    $0x400fc010,%eax
mov    %rcx,(%rax)
mov    $0x0,%al
call   1030 <HibernateWriteComplete@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<HibernateClockSelect>:
mov    0x400fc010,%rax
40
and    $0xfffffffffffffffb,%rax
or     %rdi,%rax
mov    %rax,0x400fc010
40
xor    %eax,%eax
jmp    1030 <HibernateWriteComplete@plt>

LLVM IR (-O0):
define void @HibernateClockSelect(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = load volatile i64, i64* inttoptr (i64 1074774032 to i64*)
%5 = and i64 %4, -5
%6 = or i64 %3, %5
store volatile i64 %6, i64* inttoptr (i64 1074774032 to i64*)
%7 = call i32 (...) @HibernateWriteComplete()
ret void
}

LLVM IR (-O2):
define void @HibernateClockSelect(i64 %0) {
%2 = load volatile i64, i64* inttoptr (i64 1074774032 to i64*)
%3 = and i64 %2, -5
%4 = or i64 %3, %0
store volatile i64 %4, i64* inttoptr (i64 1074774032 to i64*)
%5 = tail call i32 (...) @HibernateWriteComplete()
ret void
}
int main(void) {
  int i = 0;
  double d = 0.0;
  float f = 1.2f;
  if (d) {
    i = 42;
  } else if (f) {
    i = 32;
  }
  return i;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
movss  0xede(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1144 <main+0x44>
jp     1144 <main+0x44>
jmp    1150 <main+0x50>
movl   $0x2a,-0x8(%rbp)
jmp    1178 <main+0x78>
movss  -0x14(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    116c <main+0x6c>
jp     116c <main+0x6c>
jmp    1173 <main+0x73>
movl   $0x20,-0x8(%rbp)
jmp    1178 <main+0x78>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 32
}
/* Variables and functions */
int power(int, int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int n = 3, exp = 4;
  printf("power(3,4) = %d\n", power(n, exp));
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [17 x i8] c"power(3,4) = %d\0A\00"
define i32 @main() {
%1 = tail call i32 @power(i32 3, i32 4)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
scalar_t__ cbrt(double);
long double cbrtl(long double x) { return (long double)cbrt((double)x); }


x86 assembly (clang, -O0):
<cbrtl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fstpl  -0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
call   1030 <cbrt@plt>
mov    %rax,-0x18(%rbp)
fildll -0x18(%rbp)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cbrtl>:
sub    $0x18,%rsp
fldt   0x20(%rsp)
fstpl  0x8(%rsp)
movsd  0x8(%rsp),%xmm0
call   1030 <cbrt@plt>
mov    %rax,0x10(%rsp)
fildll 0x10(%rsp)
add    $0x18,%rsp
ret

LLVM IR (-O0):
define x86_fp80 @cbrtl(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = fptrunc x86_fp80 %3 to double
%5 = call i64 @cbrt(double %4)
%6 = sitofp i64 %5 to x86_fp80
ret x86_fp80 %6
}

LLVM IR (-O2):
define x86_fp80 @cbrtl(x86_fp80 %0) {
%2 = fptrunc x86_fp80 %0 to double
%3 = tail call i64 @cbrt(double %2)
%4 = sitofp i64 %3 to x86_fp80
ret x86_fp80 %4
}
/* Variables and functions */
char *scout_h16(char const *);
char const *scout_ipv6address_rh3(char const *);
const char *scout_ipv6address_rh4(const char *c) {
  if ((c = scout_h16(c)) == NULL)
    return NULL;
  if (*(c + 1) == ':')
    return scout_ipv6address_rh3(c + 2);
  return NULL;
}


x86 assembly (clang, -O0):
<scout_ipv6address_rh4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <scout_h16@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    1150 <scout_ipv6address_rh4+0x30>
movq   $0x0,-0x8(%rbp)
jmp    117f <scout_ipv6address_rh4+0x5f>
mov    -0x10(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x3a,%eax
jne    1177 <scout_ipv6address_rh4+0x57>
mov    -0x10(%rbp),%rdi
add    $0x2,%rdi
call   1040 <scout_ipv6address_rh3@plt>
mov    %rax,-0x8(%rbp)
jmp    117f <scout_ipv6address_rh4+0x5f>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<scout_ipv6address_rh4>:
push   %rax
call   1030 <scout_h16@plt>
test   %rax,%rax
je     113e <scout_ipv6address_rh4+0x1e>
cmpb   $0x3a,0x1(%rax)
jne    113e <scout_ipv6address_rh4+0x1e>
add    $0x2,%rax
mov    %rax,%rdi
pop    %rax
jmp    1040 <scout_ipv6address_rh3@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i8* @scout_ipv6address_rh4(i8* %0) {
%2 = tail call i8* @scout_h16(i8* %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %11, label %4
4: ; preds = %1
%5 = getelementptr inbounds i8, i8* %2, i64 1
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 58
br i1 %7, label %8, label %11
8: ; preds = %4
%9 = getelementptr inbounds i8, i8* %2, i64 2
%10 = tail call i8* @scout_ipv6address_rh3(i8* %9)
br label %11
11: ; preds = %4, %1, %8
%12 = phi i8* [ %10, %8 ], [ null, %1 ], [ null, %4 ]
ret i8* %12
}
/* Type definitions */
struct DBList {
  int dummy;
};

/* Variables and functions */
struct DBList *_dbGetList(char *);
struct DBList *dbGetList() {
  return _dbGetList("SELECT "
                    "id"
                    ", "
                    "date"
                    ", "
                    "purpose"
                    ", "
                    "expense"
                    " FROM "
                    "Expenses"
                    " ORDER BY "
                    "date");
}


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

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

LLVM IR (-O0):
%struct.DBList = type { i32 }
@.str = [62 x i8] c"SELECT id, date, purpose, expense FROM Expenses ORDER BY date\00"
define %struct.DBList* @dbGetList() {
%1 = call %struct.DBList* @_dbGetList(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0))
ret %struct.DBList* %1
}

LLVM IR (-O2):
%struct.DBList = type { i32 }
@.str = [62 x i8] c"SELECT id, date, purpose, expense FROM Expenses ORDER BY date\00"
define %struct.DBList* @dbGetList() {
%1 = tail call %struct.DBList* @_dbGetList(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0))
ret %struct.DBList* %1
}
/* Variables and functions */
char *strrchr(char const *, char);
const char *component_to_file(const char *component) {
  const char *file;
  if ((file = strrchr(component, '/'))) {
    file++;
  } else if ((file = strrchr(component, '\\'))) {
    file++;
  } else {
    file = component;
  }
  return file;
}


x86 assembly (clang, -O0):
<component_to_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2f,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
je     1149 <component_to_file+0x39>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1183 <component_to_file+0x73>
mov    -0x8(%rbp),%rdi
mov    $0x5c,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
je     1176 <component_to_file+0x66>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    117e <component_to_file+0x6e>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    1183 <component_to_file+0x73>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<component_to_file>:
push   %rbx
mov    %rdi,%rbx
mov    $0x2f,%esi
call   1030 <strrchr@plt>
test   %rax,%rax
je     1129 <component_to_file+0x19>
add    $0x1,%rax
pop    %rbx
ret
mov    %rbx,%rdi
mov    $0x5c,%esi
call   1030 <strrchr@plt>
mov    %rax,%rcx
add    $0x1,%rax
test   %rcx,%rcx
cmove  %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @component_to_file(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strrchr(i8* %4, i8 signext 47)
store i8* %5, i8** %3
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i8*, i8** %3
%9 = getelementptr inbounds i8, i8* %8, i32 1
store i8* %9, i8** %3
br label %20
10: ; preds = %1
%11 = load i8*, i8** %2
%12 = call i8* @strrchr(i8* %11, i8 signext 92)
store i8* %12, i8** %3
%13 = icmp ne i8* %12, null
br i1 %13, label %14, label %17
14: ; preds = %10
%15 = load i8*, i8** %3
%16 = getelementptr inbounds i8, i8* %15, i32 1
store i8* %16, i8** %3
br label %19
17: ; preds = %10
%18 = load i8*, i8** %2
store i8* %18, i8** %3
br label %19
19: ; preds = %17, %14
br label %20
20: ; preds = %19, %7
%21 = load i8*, i8** %3
ret i8* %21
}

LLVM IR (-O2):
define i8* @component_to_file(i8* %0) {
%2 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 47)
%3 = icmp eq i8* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = getelementptr inbounds i8, i8* %2, i64 1
br label %11
6: ; preds = %1
%7 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 92)
%8 = icmp eq i8* %7, null
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = select i1 %8, i8* %0, i8* %9
br label %11
11: ; preds = %6, %4
%12 = phi i8* [ %5, %4 ], [ %10, %6 ]
ret i8* %12
}