xunge/DecIR huggingface dataset:
/* Variables and functions */
int __cxa_atexit(void (*)(void *), void *, void *);
int __attribute__((weak))
__aeabi_atexit_impl2(void *object, void (*destructor)(void *),
                     void *dso_handle) {
  return __cxa_atexit(destructor, object, dso_handle);
}


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

x86 assembly (clang, -O2):
<__aeabi_atexit_impl2>:
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
jmp    1030 <__cxa_atexit@plt>

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

LLVM IR (-O2):
define weak i32 @__aeabi_atexit_impl2(i8* %0, void (i8*)* %1, i8* %2) {
%4 = tail call i32 @__cxa_atexit(void (i8*)* %1, i8* %0, i8* %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ print(char *);
int /*<<< orphan*/ printid(int *);
int main() {
  int a[2] = {2, 3};
  a[1] /= a[0];
  print("a 2 1");
  printid(a);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%eax
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
lea    0xebb(%rip),%rdi
call   1030 <print@plt>
lea    -0xc(%rbp),%rdi
call   1040 <printid@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movabs $0x100000002,%rax
mov    %rax,(%rsp)
lea    0xeca(%rip),%rdi
call   1030 <print@plt>
mov    %rsp,%rdi
call   1040 <printid@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@__const.main.a = [2 x i32] [i32 2, i32 3]
@.str = [6 x i8] c"a 2 1\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [2 x i32]
store i32 0, i32* %1
%3 = bitcast [2 x i32]* %2 to i8*
%4 = getelementptr inbounds [2 x i32], [2 x i32]* %2, i64 0, i64 0
%5 = load i32, i32* %4
%6 = getelementptr inbounds [2 x i32], [2 x i32]* %2, i64 0, i64 1
%7 = load i32, i32* %6
%8 = sdiv i32 %7, %5
store i32 %8, i32* %6
%9 = call i32 @print(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%10 = getelementptr inbounds [2 x i32], [2 x i32]* %2, i64 0, i64 0
%11 = call i32 @printid(i32* %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"a 2 1\00"
define i32 @main() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
store i64 4294967298, i64* %1
%3 = bitcast i64* %1 to i32*
%4 = tail call i32 @print(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @printid(i32* %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int, int, int);
void pc2str644(long pc, char *pcstr) {
  int a;
  int b;
  int c;
  c = pc & 0x0F;
  b = (pc >> 4) & 0x0F;
  a = (pc >> 8) & 0x3F;
  sprintf(pcstr, "%d-%d-%d", a, b, c);
}


x86 assembly (clang, -O0):
<pc2str644>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
and    $0xf,%rax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
sar    $0x4,%rax
and    $0xf,%rax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
sar    $0x8,%rax
and    $0x3f,%rax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    -0x1c(%rbp),%r8d
lea    0xea2(%rip),%rsi
call   1030 <sprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pc2str644>:
mov    %rsi,%rax
mov    %rdi,%rdx
mov    %edx,%r8d
and    $0xf,%r8d
mov    %edx,%ecx
shr    $0x4,%ecx
and    $0xf,%ecx
shr    $0x8,%edx
and    $0x3f,%edx
lea    0xece(%rip),%rsi
mov    %rax,%rdi
jmp    1030 <sprintf@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"%d-%d-%d\00"
define void @pc2str644(i64 %0, i8* %1) {
%3 = alloca i64
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i64 %0, i64* %3
store i8* %1, i8** %4
%8 = load i64, i64* %3
%9 = and i64 %8, 15
%10 = trunc i64 %9 to i32
store i32 %10, i32* %7
%11 = load i64, i64* %3
%12 = ashr i64 %11, 4
%13 = and i64 %12, 15
%14 = trunc i64 %13 to i32
store i32 %14, i32* %6
%15 = load i64, i64* %3
%16 = ashr i64 %15, 8
%17 = and i64 %16, 63
%18 = trunc i64 %17 to i32
store i32 %18, i32* %5
%19 = load i8*, i8** %4
%20 = load i32, i32* %5
%21 = load i32, i32* %6
%22 = load i32, i32* %7
%23 = call i32 @sprintf(i8* %19, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %20, i32 %21, i32 %22)
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"%d-%d-%d\00"
define void @pc2str644(i64 %0, i8* nocapture writeonly %1) {
%3 = trunc i64 %0 to i32
%4 = and i32 %3, 15
%5 = lshr i32 %3, 4
%6 = and i32 %5, 15
%7 = lshr i32 %3, 8
%8 = and i32 %7, 63
%9 = tail call i32 @sprintf(i8* dereferenceable(1) %1, i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %8, i32 %6, i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ compare_set_baseline_pstate(int /*<<< orphan*/ *, void *);
void compare_pstate_end_cpu(void *report_data) {
  compare_set_baseline_pstate(NULL, report_data);
}


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

x86 assembly (clang, -O2):
<compare_pstate_end_cpu>:
mov    %rdi,%rsi
xor    %edi,%edi
jmp    1030 <compare_set_baseline_pstate@plt>

LLVM IR (-O0):
define void @compare_pstate_end_cpu(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @compare_set_baseline_pstate(i32* null, i8* %3)
ret void
}

LLVM IR (-O2):
define void @compare_pstate_end_cpu(i8* %0) {
%2 = tail call i32 @compare_set_baseline_pstate(i32* null, i8* %0)
ret void
}
/* Type definitions */
struct icmp {
  int icmp_code;
};

/* Variables and functions */
int get_icmp_code(struct icmp *self) { return self->icmp_code; }


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

x86 assembly (clang, -O2):
<get_icmp_code>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
%struct.icmp = type { i32 }
define i32 @get_icmp_code(%struct.icmp* %0) {
%2 = alloca %struct.icmp*
store %struct.icmp* %0, %struct.icmp** %2
%3 = load %struct.icmp*, %struct.icmp** %2
%4 = getelementptr inbounds %struct.icmp, %struct.icmp* %3, i32 0, i32 0
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
%struct.icmp = type { i32 }
define i32 @get_icmp_code(%struct.icmp* nocapture %0) {
%2 = getelementptr inbounds %struct.icmp, %struct.icmp* %0, i64 0, i32 0
%3 = load i32, i32* %2
ret i32 %3
}
/* Variables and functions */
char const *strrchr(char const *, char);
const char *tm_fs_basename(const char *pathname) {
  return strrchr(pathname, '/') + 1;
}


x86 assembly (clang, -O0):
<tm_fs_basename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2f,%esi
call   1030 <strrchr@plt>
add    $0x1,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tm_fs_basename>:
push   %rax
mov    $0x2f,%esi
call   1030 <strrchr@plt>
add    $0x1,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i8* @tm_fs_basename(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* @strrchr(i8* %3, i8 signext 47)
%5 = getelementptr inbounds i8, i8* %4, i64 1
ret i8* %5
}

LLVM IR (-O2):
define i8* @tm_fs_basename(i8* %0) {
%2 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 47)
%3 = getelementptr inbounds i8, i8* %2, i64 1
ret i8* %3
}
int plugin_init(void) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @plugin_init() {
ret i32 1
}
/* Variables and functions */
char *findChar(char *str, char c) {
  char *ptrStr = str;
  while (*ptrStr != '\0') {
    if (*ptrStr == c) {
      return ptrStr;
    }
    ptrStr++;
  }
  return NULL;
}


x86 assembly (clang, -O0):
<findChar>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1157 <findChar+0x57>
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
movsbl -0x11(%rbp),%ecx
cmp    %ecx,%eax
jne    1146 <findChar+0x46>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    115f <findChar+0x5f>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    1116 <findChar+0x16>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i8* @findChar(i8* %0, i8 signext %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %2, %9
%6 = phi i8 [ %11, %9 ], [ %3, %2 ]
%7 = phi i8* [ %10, %9 ], [ %0, %2 ]
%8 = icmp eq i8 %6, %1
br i1 %8, label %13, label %9
9: ; preds = %5
%10 = getelementptr inbounds i8, i8* %7, i64 1
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %9, %2
%14 = phi i8* [ null, %2 ], [ null, %9 ], [ %7, %5 ]
ret i8* %14
}
/* Variables and functions */
int fftw_first_divisor(int);
int fftw_is_prime(int n) { return (n > 1 && fftw_first_divisor(n) == n); }


x86 assembly (clang, -O0):
<fftw_is_prime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x1,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jle    113b <fftw_is_prime+0x2b>
mov    -0x4(%rbp),%edi
call   1030 <fftw_first_divisor@plt>
cmp    -0x4(%rbp),%eax
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fftw_is_prime>:
xor    %eax,%eax
cmp    $0x2,%edi
jl     1129 <fftw_is_prime+0x19>
push   %rbx
mov    %edi,%ebx
call   1030 <fftw_first_divisor@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    %ebx,%ecx
sete   %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @fftw_is_prime(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sgt i32 %3, 1
br i1 %4, label %5, label %10
5: ; preds = %1
%6 = load i32, i32* %2
%7 = call i32 @fftw_first_divisor(i32 %6)
%8 = load i32, i32* %2
%9 = icmp eq i32 %7, %8
br label %10
10: ; preds = %5, %1
%11 = phi i1 [ false, %1 ], [ %9, %5 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @fftw_is_prime(i32 %0) {
%2 = icmp sgt i32 %0, 1
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = tail call i32 @fftw_first_divisor(i32 %0)
%5 = icmp eq i32 %4, %0
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %1
%8 = phi i32 [ 0, %1 ], [ %6, %3 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ sgen(char *, char *, char *);
void cgstorgw(char *s) { sgen("%s\t%%rax,%s", "movq", s); }


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

x86 assembly (clang, -O2):
<cgstorgw>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
lea    0xeeb(%rip),%rsi
jmp    1030 <sgen@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"%s\09%%rax,%s\00"
@.str.1 = [5 x i8] c"movq\00"
define void @cgstorgw(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @sgen(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"%s\09%%rax,%s\00"
@.str.1 = [5 x i8] c"movq\00"
define void @cgstorgw(i8* %0) {
%2 = tail call i32 @sgen(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int syscall(int);
int sched_yield() { return syscall(158); }


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

x86 assembly (clang, -O2):
<sched_yield>:
mov    $0x9e,%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
define i32 @sched_yield() {
%1 = call i32 @syscall(i32 158)
ret i32 %1
}

LLVM IR (-O2):
define i32 @sched_yield() {
%1 = tail call i32 @syscall(i32 158)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ unban_ip();
int main() { unban_ip(); }


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @unban_ip()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
main() {
  int a, i;
  a = 1;
  while (a > 0) {
    a = a * 2;
    printf("%d\t", a);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    114d <main+0x3d>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0x1,%ebx
lea    0xee0(%rip),%r14
add    %ebx,%ebx
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
jmp    1120 <main+0x10>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\09\00"
define i32 @main() {
br label %1
1: ; preds = %1, %0
%2 = phi i32 [ 1, %0 ], [ %3, %1 ]
%3 = shl nsw i32 %2, 1
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
br label %1
}
char *dgettext__(domainname, msgid) const char *domainname;
const char *msgid;
{ return dcgettext__(domainname, msgid, 1729); }


x86 assembly (clang, -O0):
<dgettext__>:
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    $0x6c1,%edx
mov    $0x0,%al
call   1030 <dcgettext__@plt>
cltq
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dgettext__>:
push   %rax
mov    $0x6c1,%edx
xor    %eax,%eax
call   1030 <dcgettext__@plt>
cltq
pop    %rcx
ret

LLVM IR (-O0):
define i8* @dgettext__(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i32 (i8*, i8*, i32, ...) bitcast (i32 (...)* @dcgettext__ to i32 (i8*, i8*, i32, ...)*)(i8* %5, i8* %6, i32 1729)
%8 = sext i32 %7 to i64
%9 = inttoptr i64 %8 to i8*
ret i8* %9
}

LLVM IR (-O2):
define i8* @dgettext__(i8* %0, i8* %1) {
%3 = tail call i32 (i8*, i8*, i32, ...) bitcast (i32 (...)* @dcgettext__ to i32 (i8*, i8*, i32, ...)*)(i8* %0, i8* %1, i32 1729)
%4 = sext i32 %3 to i64
%5 = inttoptr i64 %4 to i8*
ret i8* %5
}
/* Type definitions */
struct cg_layoutnode_s {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ CG_RecurseExecuteLayoutThread(struct cg_layoutnode_s *);
void CG_ExecuteLayoutProgram(struct cg_layoutnode_s *rootnode) {
  CG_RecurseExecuteLayoutThread(rootnode);
}


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

x86 assembly (clang, -O2):
<CG_ExecuteLayoutProgram>:
jmp    1030 <CG_RecurseExecuteLayoutThread@plt>

LLVM IR (-O0):
%struct.cg_layoutnode_s = type { i32 }
define void @CG_ExecuteLayoutProgram(%struct.cg_layoutnode_s* %0) {
%2 = alloca %struct.cg_layoutnode_s*
store %struct.cg_layoutnode_s* %0, %struct.cg_layoutnode_s** %2
%3 = load %struct.cg_layoutnode_s*, %struct.cg_layoutnode_s** %2
%4 = call i32 @CG_RecurseExecuteLayoutThread(%struct.cg_layoutnode_s* %3)
ret void
}

LLVM IR (-O2):
%struct.cg_layoutnode_s = type { i32 }
define void @CG_ExecuteLayoutProgram(%struct.cg_layoutnode_s* %0) {
%2 = tail call i32 @CG_RecurseExecuteLayoutThread(%struct.cg_layoutnode_s* %0)
ret void
}
/* Type definitions */
struct event_base {
  int dummy;
};

/* Variables and functions */
int event_base_dispatch(struct event_base *);
int AMCEventBase_Dispatch(struct event_base *base) {
  return event_base_dispatch(base);
}


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

x86 assembly (clang, -O2):
<AMCEventBase_Dispatch>:
jmp    1030 <event_base_dispatch@plt>

LLVM IR (-O0):
%struct.event_base = type { i32 }
define i32 @AMCEventBase_Dispatch(%struct.event_base* %0) {
%2 = alloca %struct.event_base*
store %struct.event_base* %0, %struct.event_base** %2
%3 = load %struct.event_base*, %struct.event_base** %2
%4 = call i32 @event_base_dispatch(%struct.event_base* %3)
ret i32 %4
}

LLVM IR (-O2):
%struct.event_base = type { i32 }
define i32 @AMCEventBase_Dispatch(%struct.event_base* %0) {
%2 = tail call i32 @event_base_dispatch(%struct.event_base* %0)
ret i32 %2
}
/* Variables and functions */
int sc_lock_generic(int /*<<< orphan*/ *, int /*<<< orphan*/);
int sc_lock_global(void) { return sc_lock_generic(NULL, 0); }


x86 assembly (clang, -O0):
<sc_lock_global>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    %eax,%edi
xor    %esi,%esi
call   1030 <sc_lock_generic@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sc_lock_global>:
xor    %edi,%edi
xor    %esi,%esi
jmp    1030 <sc_lock_generic@plt>

LLVM IR (-O0):
define i32 @sc_lock_global() {
%1 = call i32 @sc_lock_generic(i32* null, i32 0)
ret i32 %1
}

LLVM IR (-O2):
define i32 @sc_lock_global() {
%1 = tail call i32 @sc_lock_generic(i32* null, i32 0)
ret i32 %1
}
unsigned short getShort(unsigned char *pt) { return ((pt[0] << 8) | pt[1]); }


x86 assembly (clang, -O0):
<getShort>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
or     %ecx,%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getShort>:
movzwl (%rdi),%eax
rol    $0x8,%ax
ret

LLVM IR (-O0):
define zeroext i16 @getShort(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = shl i32 %6, 8
%8 = load i8*, i8** %2
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = or i32 %7, %11
%13 = trunc i32 %12 to i16
ret i16 %13
}

LLVM IR (-O2):
define zeroext i16 @getShort(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i16
%4 = shl nuw i16 %3, 8
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = zext i8 %6 to i16
%8 = or i16 %4, %7
ret i16 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void printdate() { printf("now print the date of the server!\n"); }


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

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

LLVM IR (-O0):
@.str = [35 x i8] c"now print the date of the server!\0A\00"
define void @printdate() {
%1 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [34 x i8] c"now print the date of the server!\00"
define void @printdate() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
long __infer_nondet_long_int();
long int lroundl(long double x) { return __infer_nondet_long_int(); }


x86 assembly (clang, -O0):
<lroundl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
mov    $0x0,%al
call   1030 <__infer_nondet_long_int@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i64 @lroundl(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = call i64 (...) @__infer_nondet_long_int()
ret i64 %3
}

LLVM IR (-O2):
define i64 @lroundl(x86_fp80 %0) {
%2 = tail call i64 (...) @__infer_nondet_long_int()
ret i64 %2
}
int sys_getdtablesize(tcp)
struct tcb *tcp;
{
  return 0;
}


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

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

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

LLVM IR (-O2):
%struct.tcb = type opaque
define i32 @sys_getdtablesize(%struct.tcb* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int getnexttoken(char *, int);
scalar_t__ isspace(int);
int /*<<< orphan*/ undef(char *);
void process_undef(void) {
  int c;
  char token[1000];
  while (c != '\n' && isspace(c = getnexttoken(token, 1000)))
    ;
  undef(token);
}


x86 assembly (clang, -O0):
<process_undef>:
push   %rbp
mov    %rsp,%rbp
sub    $0x400,%rsp
xor    %eax,%eax
cmpl   $0xa,-0x4(%rbp)
mov    %al,-0x3f1(%rbp)
je     1175 <process_undef+0x45>
lea    -0x3f0(%rbp),%rdi
mov    $0x3e8,%esi
call   1050 <getnexttoken@plt>
mov    %eax,%edi
mov    %edi,-0x4(%rbp)
call   1040 <isspace@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x3f1(%rbp)
mov    -0x3f1(%rbp),%al
test   $0x1,%al
jne    1188 <process_undef+0x58>
jmp    118d <process_undef+0x5d>
jmp    113b <process_undef+0xb>
lea    -0x3f0(%rbp),%rdi
call   1030 <undef@plt>
add    $0x400,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<process_undef>:
sub    $0x3e8,%rsp
mov    %rsp,%rdi
call   1030 <undef@plt>
add    $0x3e8,%rsp
ret

LLVM IR (-O0):
define void @process_undef() {
%1 = alloca i32
%2 = alloca [1000 x i8]
br label %3
3: ; preds = %13, %0
%4 = load i32, i32* %1
%5 = icmp ne i32 %4, 10
br i1 %5, label %6, label %11
6: ; preds = %3
%7 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%8 = call i32 @getnexttoken(i8* %7, i32 1000)
store i32 %8, i32* %1
%9 = call i64 @isspace(i32 %8)
%10 = icmp ne i64 %9, 0
br label %11
11: ; preds = %6, %3
%12 = phi i1 [ false, %3 ], [ %10, %6 ]
br i1 %12, label %13, label %14
13: ; preds = %11
br label %3
14: ; preds = %11
%15 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%16 = call i32 @undef(i8* %15)
ret void
}

LLVM IR (-O2):
define void @process_undef() {
%1 = alloca [1000 x i8]
%2 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%3 = call i32 @undef(i8* %2)
ret void
}
unsigned short rgba_to_rgb565(unsigned int rgba) {
  return (((rgba & 0xf8000000) >> 16) | ((rgba & 0x00fc0000) >> 13) |
          ((rgba & 0x0000f800) >> 11));
}


x86 assembly (clang, -O0):
<rgba_to_rgb565>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xf8000000,%eax
shr    $0x10,%eax
mov    -0x4(%rbp),%ecx
and    $0xfc0000,%ecx
shr    $0xd,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
and    $0xf800,%ecx
shr    $0xb,%ecx
or     %ecx,%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rgba_to_rgb565>:
mov    %edi,%ecx
shr    $0x10,%ecx
and    $0xf800,%ecx
mov    %edi,%eax
shr    $0xd,%eax
and    $0x7e0,%eax
or     %ecx,%eax
shr    $0xb,%edi
and    $0x1f,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define zeroext i16 @rgba_to_rgb565(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, -134217728
%5 = lshr i32 %4, 16
%6 = load i32, i32* %2
%7 = and i32 %6, 16515072
%8 = lshr i32 %7, 13
%9 = or i32 %5, %8
%10 = load i32, i32* %2
%11 = and i32 %10, 63488
%12 = lshr i32 %11, 11
%13 = or i32 %9, %12
%14 = trunc i32 %13 to i16
ret i16 %14
}

LLVM IR (-O2):
define zeroext i16 @rgba_to_rgb565(i32 %0) {
%2 = lshr i32 %0, 16
%3 = and i32 %2, 63488
%4 = lshr i32 %0, 13
%5 = and i32 %4, 2016
%6 = or i32 %3, %5
%7 = lshr i32 %0, 11
%8 = and i32 %7, 31
%9 = or i32 %6, %8
%10 = trunc i32 %9 to i16
ret i16 %10
}
int local1() {
  int x;
  return x;
}


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

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

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

LLVM IR (-O2):
define i32 @local1() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ HeapCleanup();
int /*<<< orphan*/ IncludeCleanup();
int /*<<< orphan*/ LexCleanup();
int /*<<< orphan*/ ParseCleanup();
int /*<<< orphan*/ PlatformCleanup();
int /*<<< orphan*/ TableStrFree();
int /*<<< orphan*/ TypeCleanup();
int /*<<< orphan*/ VariableCleanup();
void PicocCleanup() {
  PlatformCleanup();
  IncludeCleanup();
  ParseCleanup();
  LexCleanup();
  VariableCleanup();
  TypeCleanup();
  TableStrFree();
  HeapCleanup();
}


x86 assembly (clang, -O0):
<PicocCleanup>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <PlatformCleanup@plt>
mov    $0x0,%al
call   1080 <IncludeCleanup@plt>
mov    $0x0,%al
call   1070 <ParseCleanup@plt>
mov    $0x0,%al
call   1040 <LexCleanup@plt>
mov    $0x0,%al
call   1060 <VariableCleanup@plt>
mov    $0x0,%al
call   10a0 <TypeCleanup@plt>
mov    $0x0,%al
call   1090 <TableStrFree@plt>
mov    $0x0,%al
call   1030 <HeapCleanup@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<PicocCleanup>:
push   %rax
xor    %eax,%eax
call   1050 <PlatformCleanup@plt>
xor    %eax,%eax
call   1080 <IncludeCleanup@plt>
xor    %eax,%eax
call   1070 <ParseCleanup@plt>
xor    %eax,%eax
call   1040 <LexCleanup@plt>
xor    %eax,%eax
call   1060 <VariableCleanup@plt>
xor    %eax,%eax
call   10a0 <TypeCleanup@plt>
xor    %eax,%eax
call   1090 <TableStrFree@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <HeapCleanup@plt>

LLVM IR (-O0):
define void @PicocCleanup() {
%1 = call i32 (...) @PlatformCleanup()
%2 = call i32 (...) @IncludeCleanup()
%3 = call i32 (...) @ParseCleanup()
%4 = call i32 (...) @LexCleanup()
%5 = call i32 (...) @VariableCleanup()
%6 = call i32 (...) @TypeCleanup()
%7 = call i32 (...) @TableStrFree()
%8 = call i32 (...) @HeapCleanup()
ret void
}

LLVM IR (-O2):
define void @PicocCleanup() {
%1 = tail call i32 (...) @PlatformCleanup()
%2 = tail call i32 (...) @IncludeCleanup()
%3 = tail call i32 (...) @ParseCleanup()
%4 = tail call i32 (...) @LexCleanup()
%5 = tail call i32 (...) @VariableCleanup()
%6 = tail call i32 (...) @TypeCleanup()
%7 = tail call i32 (...) @TableStrFree()
%8 = tail call i32 (...) @HeapCleanup()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SIGFPE;
int /*<<< orphan*/ raise(int /*<<< orphan*/);
void __div_by_zero(void) { raise(SIGFPE); }


x86 assembly (clang, -O0):
<__div_by_zero>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
call   1030 <raise@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<__div_by_zero>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
jmp    1030 <raise@plt>

LLVM IR (-O0):
@SIGFPE = global i32 0
define void @__div_by_zero() {
%1 = load i32, i32* @SIGFPE
%2 = call i32 @raise(i32 %1)
ret void
}

LLVM IR (-O2):
@SIGFPE = global i32 0
define void @__div_by_zero() {
%1 = load i32, i32* @SIGFPE
%2 = tail call i32 @raise(i32 %1)
ret void
}
/* Variables and functions */
int strlen(const char *a) {
  int i;
  for (i = 0; *a != '\0'; a++, i++)
    ;
  return i;
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     113e <strlen+0x3e>
jmp    1124 <strlen+0x24>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <strlen+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
cmpb   $0x0,(%rdi)
je     111c <strlen+0x1c>
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <strlen+0x10>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @strlen(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %10, %1
%5 = load i8*, i8** %2
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %15
9: ; preds = %4
br label %10
10: ; preds = %9
%11 = load i8*, i8** %2
%12 = getelementptr inbounds i8, i8* %11, i32 1
store i8* %12, i8** %2
%13 = load i32, i32* %3
%14 = add nsw 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 @strlen(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %8, %4 ], [ 0, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = add nuw nsw i32 %5, 1
%9 = load i8, i8* %7
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i32 [ 0, %1 ], [ %8, %4 ]
ret i32 %12
}
void asn1_set_choice_selector(void) {}


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

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

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

LLVM IR (-O2):
define void @asn1_set_choice_selector() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int fn_b() {
  printf("fn_b() called\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [14 x i8] c"fn_b() called\00"
define i32 @fn_b() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void SysCtlGPIOAHBEnable(uint32_t ui32GPIOPeripheral) {

  ;
  (*((volatile unsigned long *)(0x400FE06C))) |=
      (1 << (ui32GPIOPeripheral & 0xF));
}


x86 assembly (clang, -O0):
<SysCtlGPIOAHBEnable>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
and    $0xf,%ecx
mov    $0x1,%eax
shl    %cl,%eax
cltq
mov    $0x400fe06c,%ecx
mov    (%rcx),%rcx
or     %rax,%rcx
mov    $0x400fe06c,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<SysCtlGPIOAHBEnable>:
mov    %edi,%ecx
and    $0xf,%cl
mov    $0x1,%eax
shl    %cl,%eax
or     %rax,0x400fe06c
40
ret

LLVM IR (-O0):
define void @SysCtlGPIOAHBEnable(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 15
%5 = shl i32 1, %4
%6 = sext i32 %5 to i64
%7 = load volatile i64, i64* inttoptr (i64 1074782316 to i64*)
%8 = or i64 %7, %6
store volatile i64 %8, i64* inttoptr (i64 1074782316 to i64*)
ret void
}

LLVM IR (-O2):
define void @SysCtlGPIOAHBEnable(i32 %0) {
%2 = and i32 %0, 15
%3 = shl nuw nsw i32 1, %2
%4 = zext i32 %3 to i64
%5 = load volatile i64, i64* inttoptr (i64 1074782316 to i64*)
%6 = or i64 %5, %4
store volatile i64 %6, i64* inttoptr (i64 1074782316 to i64*)
ret void
}
float pspFpuMin(float fs1, float fs2) {
  register float fd;
  fd = (fs1 < fs2) ? fs1 : fs2;
  return (fd);
}


x86 assembly (clang, -O0):
<pspFpuMin>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1130 <pspFpuMin+0x30>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
jmp    113a <pspFpuMin+0x3a>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<pspFpuMin>:
minss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @pspFpuMin(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
store float %0, float* %3
store float %1, float* %4
%6 = load float, float* %3
%7 = load float, float* %4
%8 = fcmp olt float %6, %7
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load float, float* %3
br label %13
11: ; preds = %2
%12 = load float, float* %4
br label %13
13: ; preds = %11, %9
%14 = phi float [ %10, %9 ], [ %12, %11 ]
store float %14, float* %5
%15 = load float, float* %5
ret float %15
}

LLVM IR (-O2):
define float @pspFpuMin(float %0, float %1) {
%3 = fcmp olt float %0, %1
%4 = select i1 %3, float %0, float %1
ret float %4
}
/* Variables and functions */
int /*<<< orphan*/ setsyx(int, int);
void wrap_setsyx(int y, int x) { setsyx(y, x); }


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

x86 assembly (clang, -O2):
<wrap_setsyx>:
jmp    1030 <setsyx@plt>

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

LLVM IR (-O2):
define void @wrap_setsyx(i32 %0, i32 %1) {
%3 = tail call i32 @setsyx(i32 %0, i32 %1)
ret void
}
void Timer1_SaveConfig(void) {}


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

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

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

LLVM IR (-O2):
define void @Timer1_SaveConfig() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void tipka(unsigned char c, int x, int y) {
  if (c == 'q')
    exit(0);
}


x86 assembly (clang, -O0):
<tipka>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movzbl -0x1(%rbp),%eax
cmp    $0x71,%eax
jne    1138 <tipka+0x28>
xor    %edi,%edi
call   1030 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tipka>:
cmp    $0x71,%dil
je     1117 <tipka+0x7>
ret
push   %rax
xor    %edi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @tipka(i8 zeroext %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
%7 = load i8, i8* %4
%8 = zext i8 %7 to i32
%9 = icmp eq i32 %8, 113
br i1 %9, label %10, label %12
10: ; preds = %3
%11 = call i32 @exit(i32 0)
unreachable
12: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @tipka(i8 zeroext %0, i32 %1, i32 %2) {
%4 = icmp eq i8 %0, 113
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = tail call i32 @exit(i32 0)
unreachable
7: ; preds = %3
ret void
}
void XEnableAccessControl() {}


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

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

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

LLVM IR (-O2):
define void @XEnableAccessControl() {
ret void
}
/* Variables and functions */
int send_msg(int, char *);
int BAD_REQUEST(int fd) {
  return send_msg(fd, "HTTP/1.1 400 Bad Request\r\n\r\n");
}


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

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

LLVM IR (-O0):
@.str = [29 x i8] c"HTTP/1.1 400 Bad Request\0D\0A\0D\0A\00"
define i32 @BAD_REQUEST(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @send_msg(i32 %3, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
ret i32 %4
}

LLVM IR (-O2):
@.str = [29 x i8] c"HTTP/1.1 400 Bad Request\0D\0A\0D\0A\00"
define i32 @BAD_REQUEST(i32 %0) {
%2 = tail call i32 @send_msg(i32 %0, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
ret i32 %2
}
void setup_user_timer_offset(unsigned long addr) {}


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

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

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

LLVM IR (-O2):
define void @setup_user_timer_offset(i64 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int foo(void) {
  printf("Foo for the win!\n");
  return 1;
}


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

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

LLVM IR (-O0):
@.str = [18 x i8] c"Foo for the win!\0A\00"
define i32 @foo() {
%1 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@str = [17 x i8] c"Foo for the win!\00"
define i32 @foo() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
ret i32 1
}
void set_udex_param(double *a0, double *a1, double *a2, double *a3) {
  *a0 = 1.0;
  *a1 = 1.0;
  *a2 = 1.0;
  *a3 = 1.0;
}


x86 assembly (clang, -O0):
<set_udex_param>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rax
movsd  0xee0(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movsd  0xed0(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
movsd  0xec0(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
movsd  0xeb0(%rip),%xmm0
movsd  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_udex_param>:
movabs $0x3ff0000000000000,%rax
mov    %rax,(%rdi)
mov    %rax,(%rsi)
mov    %rax,(%rdx)
mov    %rax,(%rcx)
ret

LLVM IR (-O0):
define void @set_udex_param(double* %0, double* %1, double* %2, double* %3) {
%5 = alloca double*
%6 = alloca double*
%7 = alloca double*
%8 = alloca double*
store double* %0, double** %5
store double* %1, double** %6
store double* %2, double** %7
store double* %3, double** %8
%9 = load double*, double** %5
store double 1.000000e+00, double* %9
%10 = load double*, double** %6
store double 1.000000e+00, double* %10
%11 = load double*, double** %7
store double 1.000000e+00, double* %11
%12 = load double*, double** %8
store double 1.000000e+00, double* %12
ret void
}

LLVM IR (-O2):
define void @set_udex_param(double* nocapture writeonly %0, double* nocapture writeonly %1, double* nocapture writeonly %2, double* nocapture writeonly %3) {
store double 1.000000e+00, double* %0
store double 1.000000e+00, double* %1
store double 1.000000e+00, double* %2
store double 1.000000e+00, double* %3
ret void
}
void out_note_free(void *data) {}


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

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

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

LLVM IR (-O2):
define void @out_note_free(i8* nocapture %0) {
ret void
}
/* Variables and functions */
char *string_substring(char *, int, scalar_t__);
scalar_t__ strlen(char *);
char *string_substring_from(char *text, int start) {
  return string_substring(text, start, strlen(text) - start);
}


x86 assembly (clang, -O0):
<string_substring_from>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%esi
mov    %rax,%rdx
movslq -0xc(%rbp),%rax
sub    %rax,%rdx
call   1040 <string_substring@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_substring_from>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1030 <strlen@plt>
movslq %ebp,%rsi
sub    %rsi,%rax
mov    %rbx,%rdi
mov    %rax,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <string_substring@plt>

LLVM IR (-O0):
define i8* @string_substring_from(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = load i8*, i8** %3
%8 = call i64 @strlen(i8* %7)
%9 = load i32, i32* %4
%10 = sext i32 %9 to i64
%11 = sub nsw i64 %8, %10
%12 = call i8* @string_substring(i8* %5, i32 %6, i64 %11)
ret i8* %12
}

LLVM IR (-O2):
define i8* @string_substring_from(i8* %0, i32 %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = sext i32 %1 to i64
%5 = sub nsw i64 %3, %4
%6 = tail call i8* @string_substring(i8* %0, i32 %1, i64 %5)
ret i8* %6
}
int mod(int n, int m) {
  while (n < 0) {
    n += m;
  }
  return n % m;
}


x86 assembly (clang, -O0):
<mod>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    1122 <mod+0x22>
mov    -0x8(%rbp),%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    110a <mod+0xa>
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mod>:
mov    %edi,%eax
sub    %esi,%eax
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    %esi,%eax
js     1110 <mod+0x10>
cltd
idiv   %esi
mov    %edx,%eax
ret

LLVM IR (-O0):
define i32 @mod(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
br label %5
5: ; preds = %8, %2
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %5
%9 = load i32, i32* %4
%10 = load i32, i32* %3
%11 = add nsw i32 %10, %9
store i32 %11, i32* %3
br label %5
12: ; preds = %5
%13 = load i32, i32* %3
%14 = load i32, i32* %4
%15 = srem i32 %13, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @mod(i32 %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i32 [ %0, %2 ], [ %6, %3 ]
%5 = icmp slt i32 %4, 0
%6 = add nsw i32 %4, %1
br i1 %5, label %3, label %7
7: ; preds = %3
%8 = srem i32 %4, %1
ret i32 %8
}
/* Variables and functions */
int __isprint_impl(int);
int isprint(int c) { return __isprint_impl(c); }


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

x86 assembly (clang, -O2):
<isprint>:
jmp    1030 <__isprint_impl@plt>

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

LLVM IR (-O2):
define i32 @isprint(i32 %0) {
%2 = tail call i32 @__isprint_impl(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ check_popcnt(int, int, int);
int main() {
  check_popcnt(0, 0, 0);
  check_popcnt(1, 1, 1);
  check_popcnt(0x8000000000000000ULL, 0x0100000000000000ULL, 1);
  check_popcnt(0xffffffffffffffffULL, 0x0808080808080808ULL, 1);
  check_popcnt(0xff427e3800556bcdULL, 0x0802060300040505ULL, 1);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1030 <check_popcnt@plt>
mov    $0x1,%edi
mov    $0x1,%esi
mov    $0x1,%edx
call   1030 <check_popcnt@plt>
xor    %edi,%edi
xor    %esi,%esi
mov    $0x1,%edx
call   1030 <check_popcnt@plt>
mov    $0xffffffff,%edi
mov    $0x8080808,%esi
mov    $0x1,%edx
call   1030 <check_popcnt@plt>
mov    $0x556bcd,%edi
mov    $0x40505,%esi
mov    $0x1,%edx
call   1030 <check_popcnt@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @check_popcnt(i32 0, i32 0, i32 0)
%3 = call i32 @check_popcnt(i32 1, i32 1, i32 1)
%4 = call i32 @check_popcnt(i32 0, i32 0, i32 1)
%5 = call i32 @check_popcnt(i32 -1, i32 134744072, i32 1)
%6 = call i32 @check_popcnt(i32 5598157, i32 263429, i32 1)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @check_popcnt(i32 0, i32 0, i32 0)
%2 = tail call i32 @check_popcnt(i32 1, i32 1, i32 1)
%3 = tail call i32 @check_popcnt(i32 0, i32 0, i32 1)
%4 = tail call i32 @check_popcnt(i32 -1, i32 134744072, i32 1)
%5 = tail call i32 @check_popcnt(i32 5598157, i32 263429, i32 1)
ret i32 0
}