xunge/DecIR huggingface dataset:
cmd_echo(str) char *str;
{
  if (str)
    ldisplay("%s\n", str);
  else
    ldisplay("\n");
}


x86 assembly (clang, -O0):
<cmd_echo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     113e <cmd_echo+0x2e>
mov    -0x10(%rbp),%rsi
lea    0xece(%rip),%rdi
mov    $0x0,%al
call   1030 <ldisplay@plt>
jmp    114c <cmd_echo+0x3c>
lea    0xebd(%rip),%rdi
mov    $0x0,%al
call   1030 <ldisplay@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_echo>:
push   %rax
test   %rdi,%rdi
je     1129 <cmd_echo+0x19>
mov    %rdi,%rsi
lea    0xee0(%rip),%rdi
xor    %eax,%eax
call   1030 <ldisplay@plt>
pop    %rcx
ret
lea    0xed2(%rip),%rdi
xor    %eax,%eax
call   1030 <ldisplay@plt>
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [2 x i8] c"\0A\00"
define i32 @cmd_echo(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = icmp ne i8* %4, null
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i8*, i8** %3
%8 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @ldisplay to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %7)
br label %11
9: ; preds = %1
%10 = call i32 (i8*, ...) bitcast (i32 (...)* @ldisplay to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %11
11: ; preds = %9, %6
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [2 x i8] c"\0A\00"
define i32 @cmd_echo(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @ldisplay to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %7
5: ; preds = %1
%6 = tail call i32 (i8*, ...) bitcast (i32 (...)* @ldisplay to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %7
7: ; preds = %5, %3
ret i32 undef
}
/* Variables and functions */
float log(float);
int /*<<< orphan*/ print(char *);
int /*<<< orphan*/ printid(float);
int main() {
  float a = 2, b = 3;
  a = log(b);
  print("a 1.098612");
  printid(a);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movss  0xebd(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xeac(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
call   1050 <log@plt>
movss  %xmm0,-0x8(%rbp)
lea    0xe99(%rip),%rdi
call   1030 <print@plt>
movss  -0x8(%rbp),%xmm0
call   1040 <printid@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xedc(%rip),%rdi
call   1030 <print@plt>
movss  0xecb(%rip),%xmm0
call   1040 <printid@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"a 1.098612\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
store i32 0, i32* %1
store float 2.000000e+00, float* %2
store float 3.000000e+00, float* %3
%4 = load float, float* %3
%5 = call float @log(float %4)
store float %5, float* %2
%6 = call i32 @print(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%7 = load float, float* %2
%8 = call i32 @printid(float %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"a 1.098612\00"
define i32 @main() {
%1 = tail call i32 @print(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printid(float 0x3FF193EA80000000)
ret i32 0
}
int child(void) {
  for (;;)
    ;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @child() {
br label %1
1: ; preds = %1, %0
br label %1
}
void util_speak(const char *string) {}


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

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

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

LLVM IR (-O2):
define void @util_speak(i8* nocapture %0) {
ret void
}
unsigned long long clearBit_fun_ullong(unsigned long long x, unsigned i) {
  return x & ~(1 << i);
}


x86 assembly (clang, -O0):
<clearBit_fun_ullong>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
xor    $0xffffffff,%ecx
movslq %ecx,%rcx
and    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<clearBit_fun_ullong>:
mov    %esi,%ecx
mov    $0xfffffffe,%eax
rol    %cl,%eax
cltq
and    %rdi,%rax
ret

LLVM IR (-O0):
define i64 @clearBit_fun_ullong(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
store i64 %0, i64* %3
store i32 %1, i32* %4
%5 = load i64, i64* %3
%6 = load i32, i32* %4
%7 = shl i32 1, %6
%8 = xor i32 %7, -1
%9 = sext i32 %8 to i64
%10 = and i64 %5, %9
ret i64 %10
}

LLVM IR (-O2):
define i64 @clearBit_fun_ullong(i64 %0, i32 %1) {
%3 = shl nuw i32 1, %1
%4 = xor i32 %3, -1
%5 = sext i32 %4 to i64
%6 = and i64 %5, %0
ret i64 %6
}
/* Variables and functions */
int /*<<< orphan*/ r_cons_printf(char *, char const *);
scalar_t__ strlen(char *);
int /*<<< orphan*/ strncmp(char const *, char *, scalar_t__);
int sdbforcb(void *p, const char *k, const char *v) {
  if (!strncmp(v, "type", strlen("type") + 1))
    r_cons_printf("%s\n", k);
  return 1;
}


x86 assembly (clang, -O0):
<sdbforcb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
lea    0xead(%rip),%rdi
call   1050 <strlen@plt>
mov    -0x20(%rbp),%rdi
mov    %rax,%rdx
add    $0x1,%rdx
lea    0xe96(%rip),%rsi
call   1040 <strncmp@plt>
cmp    $0x0,%eax
jne    1188 <sdbforcb+0x58>
mov    -0x10(%rbp),%rsi
lea    0xe82(%rip),%rdi
call   1030 <r_cons_printf@plt>
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sdbforcb>:
push   %rbx
mov    %rdx,%rdi
mov    %rsi,%rbx
lea    0xed2(%rip),%rsi
mov    $0x5,%edx
call   1040 <strncmp@plt>
test   %eax,%eax
jne    114b <sdbforcb+0x2b>
lea    0xec2(%rip),%rdi
mov    %rbx,%rsi
call   1030 <r_cons_printf@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"type\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @sdbforcb(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %6
%8 = call i64 @strlen(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%9 = add nsw i64 %8, 1
%10 = call i32 @strncmp(i8* %7, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 %9)
%11 = icmp ne i32 %10, 0
br i1 %11, label %15, label %12
12: ; preds = %3
%13 = load i8*, i8** %5
%14 = call i32 @r_cons_printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %13)
br label %15
15: ; preds = %12, %3
ret i32 1
}

LLVM IR (-O2):
@.str = [5 x i8] c"type\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @sdbforcb(i8* nocapture readnone %0, i8* %1, i8* nocapture %2) {
%4 = tail call i32 @strncmp(i8* dereferenceable(1) %2, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 5)
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @r_cons_printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %1)
br label %8
8: ; preds = %6, %3
ret i32 1
}
/* Type definitions */
typedef int uint32_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int CK_Cross_freadInt32LE(int *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, int);
bool processTimeCount(FILE *fp) {
  uint32_t timecount;
  if (CK_Cross_freadInt32LE(&timecount, 1, fp) != 1)
    return false;
  printf("Timecount: %08X\n", timecount);
  return true;
}


x86 assembly (clang, -O0):
<processTimeCount>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdx
lea    -0x14(%rbp),%rdi
mov    $0x1,%esi
call   1040 <CK_Cross_freadInt32LE@plt>
cmp    $0x1,%eax
je     1153 <processTimeCount+0x33>
movl   $0x0,-0x4(%rbp)
jmp    1169 <processTimeCount+0x49>
mov    -0x14(%rbp),%esi
lea    0xea3(%rip),%rdi
call   1030 <printf@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<processTimeCount>:
push   %rax
mov    %rdi,%rdx
lea    0x4(%rsp),%rdi
mov    $0x1,%esi
call   1040 <CK_Cross_freadInt32LE@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x1,%ecx
jne    1151 <processTimeCount+0x31>
mov    0x4(%rsp),%esi
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [17 x i8] c"Timecount: %08X\0A\00"
define i32 @processTimeCount(i32* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @CK_Cross_freadInt32LE(i32* %2, i32 1, i32* %0)
%5 = icmp eq i32 %4, 1
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* %2
%8 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %7)
br label %9
9: ; preds = %1, %6
%10 = phi i32 [ 1, %6 ], [ 0, %1 ]
ret i32 %10
}
isprime(n) int n;
{
  int j;
  if (n == 2)
    return 1;
  if (n % 2 == 0)
    return 0;
  for (j = 3; j * j <= n; j += 2)
    if (n % j == 0)
      return 0;
  return 1;
}


x86 assembly (clang, -O0):
<isprime>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x2,-0x8(%rbp)
jne    111d <isprime+0x1d>
movl   $0x1,-0x4(%rbp)
jmp    118a <isprime+0x8a>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    113d <isprime+0x3d>
movl   $0x0,-0x4(%rbp)
jmp    118a <isprime+0x8a>
movl   $0x3,-0xc(%rbp)
mov    -0xc(%rbp),%eax
imul   -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     1183 <isprime+0x83>
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cmp    $0x0,%edx
jne    1170 <isprime+0x70>
movl   $0x0,-0x4(%rbp)
jmp    118a <isprime+0x8a>
jmp    1175 <isprime+0x75>
mov    -0xc(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0xc(%rbp)
jmp    1144 <isprime+0x44>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isprime>:
mov    $0x1,%ecx
cmp    $0x2,%edi
je     1135 <isprime+0x35>
test   $0x1,%dil
jne    1114 <isprime+0x14>
xor    %ecx,%ecx
jmp    1135 <isprime+0x35>
cmp    $0x9,%edi
jl     1135 <isprime+0x35>
mov    $0x3,%esi
xchg   %ax,%ax
mov    %edi,%eax
cltd
idiv   %esi
test   %edx,%edx
je     1110 <isprime+0x10>
add    $0x2,%esi
mov    %esi,%eax
imul   %esi,%eax
cmp    %edi,%eax
jle    1120 <isprime+0x20>
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @isprime(i32 %0) {
%2 = icmp eq i32 %0, 2
br i1 %2, label %16, label %3
3: ; preds = %1
%4 = and i32 %0, 1
%5 = icmp eq i32 %4, 0
br i1 %5, label %16, label %6
6: ; preds = %3
%7 = icmp slt i32 %0, 9
br i1 %7, label %16, label %11
8: ; preds = %11
%9 = mul nsw i32 %15, %15
%10 = icmp sgt i32 %9, %0
br i1 %10, label %16, label %11
11: ; preds = %6, %8
%12 = phi i32 [ %15, %8 ], [ 3, %6 ]
%13 = srem i32 %0, %12
%14 = icmp eq i32 %13, 0
%15 = add nuw nsw i32 %12, 2
br i1 %14, label %16, label %8
16: ; preds = %11, %8, %6, %3, %1
%17 = phi i32 [ 1, %1 ], [ 0, %3 ], [ 1, %6 ], [ 0, %11 ], [ 1, %8 ]
ret i32 %17
}
/* Variables and functions */
int /*<<< orphan*/ roamGetStatsThreshold(int /*<<< orphan*/, char **, int);
int /*<<< orphan*/ roamSetStatsThreshold(int, char **, int);
int roamSetRssiStatsThreshold(int argc, char *argv[]) {
  if (roamSetStatsThreshold(argc, argv, 1) == (0)) {
    roamGetStatsThreshold(0, argv, 1);
  }
  return (0);
}


x86 assembly (clang, -O0):
<roamSetRssiStatsThreshold>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    $0x1,%edx
call   1030 <roamSetStatsThreshold@plt>
cmp    $0x0,%eax
jne    1159 <roamSetRssiStatsThreshold+0x39>
mov    -0x10(%rbp),%rsi
xor    %edi,%edi
mov    $0x1,%edx
call   1040 <roamGetStatsThreshold@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<roamSetRssiStatsThreshold>:
push   %rbx
mov    %rsi,%rbx
mov    $0x1,%edx
call   1030 <roamSetStatsThreshold@plt>
test   %eax,%eax
jne    1141 <roamSetRssiStatsThreshold+0x21>
xor    %edi,%edi
mov    %rbx,%rsi
mov    $0x1,%edx
call   1040 <roamGetStatsThreshold@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @roamSetRssiStatsThreshold(i32 %0, i8** %1) {
%3 = tail call i32 @roamSetStatsThreshold(i32 %0, i8** %1, i32 1)
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @roamGetStatsThreshold(i32 0, i8** %1, i32 1)
br label %7
7: ; preds = %5, %2
ret i32 0
}
void strcpyArray(char *s, char *t) {
  int i;
  i = 0;
  while ((s[i] = t[i]) != '\0')
    i++;
}


x86 assembly (clang, -O0):
<strcpyArray>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    -0x8(%rbp),%rcx
movslq -0x14(%rbp),%rdx
mov    %al,(%rcx,%rdx,1)
movsbl %al,%eax
cmp    $0x0,%eax
je     1143 <strcpyArray+0x43>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <strcpyArray+0x13>
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpyArray>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rsi,%rax,1),%ecx
mov    %cl,(%rdi,%rax,1)
add    $0x1,%rax
test   %cl,%cl
jne    1110 <strcpyArray+0x10>
ret

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

LLVM IR (-O2):
define void @strcpyArray(i8* nocapture writeonly %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i64 [ %9, %3 ], [ 0, %2 ]
%5 = getelementptr inbounds i8, i8* %1, i64 %4
%6 = load i8, i8* %5
%7 = getelementptr inbounds i8, i8* %0, i64 %4
store i8 %6, i8* %7
%8 = icmp eq i8 %6, 0
%9 = add nuw i64 %4, 1
br i1 %8, label %10, label %3
10: ; preds = %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
char EOF;
char fgetc(int /*<<< orphan*/ *);
FILE *skip_past_newline(FILE *is) {
  char c;
  while ((c = fgetc(is)) != '\n' && c != EOF)
    ;
  return is;
}


x86 assembly (clang, -O0):
<skip_past_newline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <fgetc@plt>
mov    %al,-0x9(%rbp)
movsbl %al,%ecx
xor    %eax,%eax
cmp    $0xa,%ecx
mov    %al,-0xa(%rbp)
je     114f <skip_past_newline+0x3f>
movsbl -0x9(%rbp),%eax
mov    0x2ea4(%rip),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
setne  %al
mov    %al,-0xa(%rbp)
mov    -0xa(%rbp),%al
test   $0x1,%al
jne    115f <skip_past_newline+0x4f>
jmp    1164 <skip_past_newline+0x54>
jmp    111c <skip_past_newline+0xc>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_past_newline>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2eca(%rip),%r14
xchg   %ax,%ax
mov    %rbx,%rdi
call   1030 <fgetc@plt>
cmp    $0xa,%al
je     1131 <skip_past_newline+0x21>
cmp    (%r14),%al
jne    1120 <skip_past_newline+0x10>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@EOF = global i8 0
define i32* @skip_past_newline(i32* returned %0) {
br label %2
2: ; preds = %2, %1
%3 = tail call signext i8 @fgetc(i32* %0)
%4 = icmp ne i8 %3, 10
%5 = load i8, i8* @EOF
%6 = icmp ne i8 %3, %5
%7 = select i1 %4, i1 %6, i1 false
br i1 %7, label %2, label %8
8: ; preds = %2
ret i32* %0
}
double obliquity(double tdt) {
  double T;
  double obl;
  T = (tdt - (2451545.0)) / (36525.0);
  obl = 84381.448 + T * (-46.8150 + (T * (-0.00059 + (T * 0.001813))));
  obl = (((((obl) / 3600.0)) * ((3.14159265358979323846) / 180.0)));
  return (obl);
}


x86 assembly (clang, -O0):
<obliquity>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xf22(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xf0e(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm2
movsd  0xede(%rip),%xmm3
mulsd  %xmm3,%xmm2
movsd  0xeda(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
movsd  0xeba(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xea2(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  0xe84(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xe70(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<obliquity>:
addsd  0xef8(%rip),%xmm0
divsd  0xef8(%rip),%xmm0
movsd  0xef8(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xef4(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xef0(%rip),%xmm1
mulsd  %xmm1,%xmm0
addsd  0xeec(%rip),%xmm0
divsd  0xeec(%rip),%xmm0
mulsd  0xeec(%rip),%xmm0
ret

LLVM IR (-O0):
define double @obliquity(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %2
%5 = load double, double* %2
%6 = fsub double %5, 0x4142B42C80000000
%7 = fdiv double %6, 3.652500e+04
store double %7, double* %3
%8 = load double, double* %3
%9 = load double, double* %3
%10 = load double, double* %3
%11 = call double @llvm.fmuladd.f64(double %10, double 1.813000e-03, double -5.900000e-04)
%12 = call double @llvm.fmuladd.f64(double %9, double %11, double -4.681500e+01)
%13 = call double @llvm.fmuladd.f64(double %8, double %12, double 0x40F499D72B020C4A)
store double %13, double* %4
%14 = load double, double* %4
%15 = fdiv double %14, 3.600000e+03
%16 = fmul double %15, 0x3F91DF46A2529D39
store double %16, double* %4
%17 = load double, double* %4
ret double %17
}

LLVM IR (-O2):
define double @obliquity(double %0) {
%2 = fadd double %0, 0xC142B42C80000000
%3 = fdiv double %2, 3.652500e+04
%4 = tail call double @llvm.fmuladd.f64(double %3, double 1.813000e-03, double -5.900000e-04)
%5 = tail call double @llvm.fmuladd.f64(double %3, double %4, double -4.681500e+01)
%6 = tail call double @llvm.fmuladd.f64(double %3, double %5, double 0x40F499D72B020C4A)
%7 = fdiv double %6, 3.600000e+03
%8 = fmul double %7, 0x3F91DF46A2529D39
ret double %8
}
/* Variables and functions */
int const M_PI;
const double builder_make_theta(const int rotate) {
  return rotate * M_PI / 180.0;
}


x86 assembly (clang, -O0):
<builder_make_theta>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2ed7(%rip),%rcx
imul   (%rcx),%eax
cvtsi2sd %eax,%xmm0
movsd  0xee0(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<builder_make_theta>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
@M_PI = constant i32 0
define double @builder_make_theta(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @M_PI
%5 = mul nsw i32 %3, %4
%6 = sitofp i32 %5 to double
%7 = fdiv double %6, 1.800000e+02
ret double %7
}

LLVM IR (-O2):
@M_PI = constant i32 0
define double @builder_make_theta(i32 %0) {
ret double 0.000000e+00
}
void print_Z(char ch, int z) {
  int int_num = 1;
  __asm__("int $0x80" ::"a"(int_num), "b"(ch), "c"(z));
}


x86 assembly (clang, -O0):
<print_Z>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    %dil,%al
mov    %al,-0x9(%rbp)
mov    %esi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0x9(%rbp),%bl
mov    -0x10(%rbp),%ecx
int    $0x80
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_Z>:
push   %rbx
mov    %esi,%ecx
mov    %edi,%ebx
mov    $0x1,%eax
int    $0x80
pop    %rbx
ret

LLVM IR (-O0):
define void @print_Z(i8 signext %0, i32 %1) {
%3 = alloca i8
%4 = alloca i32
%5 = alloca i32
store i8 %0, i8* %3
store i32 %1, i32* %4
store i32 1, i32* %5
%6 = load i32, i32* %5
%7 = load i8, i8* %3
%8 = load i32, i32* %4
ret void
}

LLVM IR (-O2):
define void @print_Z(i8 signext %0, i32 %1) {
tail call void asm sideeffect "int $$0x80", "{ax},{bx},{cx},~{dirflag},~{fpsr},~{flags}"(i32 1, i8 %0, i32 %1)
ret void
}
/* Type definitions */
typedef int uint64_t;
typedef int uint32_t;

/* Variables and functions */
uint32_t bitCount_fun_uint64_t(uint64_t x) {
  uint32_t r = x & 1;
  while (x >>= 1)
    r += x & 1;
  return r;
}


x86 assembly (clang, -O0):
<bitCount_fun_uint64_t>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x4(%rbp)
cmp    $0x0,%eax
je     1133 <bitCount_fun_uint64_t+0x33>
mov    -0x4(%rbp),%eax
and    $0x1,%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1110 <bitCount_fun_uint64_t+0x10>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitCount_fun_uint64_t>:
mov    %edi,%eax
and    $0x1,%eax
cmp    $0x2,%edi
jb     1120 <bitCount_fun_uint64_t+0x20>
mov    %edi,%ecx
nopl   0x0(%rax)
sar    %ecx
mov    %ecx,%edx
and    $0x1,%edx
add    %edx,%eax
cmp    $0x3,%edi
mov    %ecx,%edi
ja     1110 <bitCount_fun_uint64_t+0x10>
ret

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

LLVM IR (-O2):
define i32 @bitCount_fun_uint64_t(i32 %0) {
%2 = and i32 %0, 1
%3 = icmp ult i32 %0, 2
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %7, %4 ], [ %0, %1 ]
%6 = phi i32 [ %9, %4 ], [ %2, %1 ]
%7 = ashr i32 %5, 1
%8 = and i32 %7, 1
%9 = add nuw nsw i32 %8, %6
%10 = icmp ult i32 %5, 4
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i32 [ %2, %1 ], [ %9, %4 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "Usage: conjoin srv-cmd mnt-cmd tst-cmd\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [40 x i8] c"Usage: conjoin srv-cmd mnt-cmd tst-cmd\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [40 x i8] c"Usage: conjoin srv-cmd mnt-cmd tst-cmd\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
void i2d_ASN1_TYPE(void) {}


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

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

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

LLVM IR (-O2):
define void @i2d_ASN1_TYPE() {
ret void
}
void Initialize(Array) double Array[];
{
  register int i;
  for (i = 0; i < 1000; i++)
    Array[i] = i + RandomInteger() / 8095.0;
}


x86 assembly (clang, -O0):
<Initialize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x3e8,-0xc(%rbp)
jge    1175 <Initialize+0x65>
cvtsi2sdl -0xc(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    $0x0,%al
call   1030 <RandomInteger@plt>
movsd  -0x18(%rbp),%xmm0
cvtsi2sd %eax,%xmm1
movsd  0xeae(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <Initialize+0x13>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Initialize>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %ebx,%ebx
nopl   0x0(%rax)
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1030 <RandomInteger@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
divsd  0xebe(%rip),%xmm0
addsd  (%rsp),%xmm0
movsd  %xmm0,(%r14,%rbx,8)
add    $0x1,%rbx
cmp    $0x3e8,%rbx
jne    1120 <Initialize+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @Initialize(double* %0) {
%2 = alloca double*
%3 = alloca i32
store double* %0, double** %2
store i32 0, i32* %3
br label %4
4: ; preds = %18, %1
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 1000
br i1 %6, label %7, label %21
7: ; preds = %4
%8 = load i32, i32* %3
%9 = sitofp i32 %8 to double
%10 = call i32 (...) @RandomInteger()
%11 = sitofp i32 %10 to double
%12 = fdiv double %11, 8.095000e+03
%13 = fadd double %9, %12
%14 = load double*, double** %2
%15 = load i32, i32* %3
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds double, double* %14, i64 %16
store double %13, double* %17
br label %18
18: ; preds = %7
%19 = load i32, i32* %3
%20 = add nsw i32 %19, 1
store i32 %20, i32* %3
br label %4
21: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @Initialize(double* nocapture writeonly %0) {
br label %2
2: ; preds = %1, %2
%3 = phi i64 [ 0, %1 ], [ %11, %2 ]
%4 = trunc i64 %3 to i32
%5 = sitofp i32 %4 to double
%6 = tail call i32 (...) @RandomInteger()
%7 = sitofp i32 %6 to double
%8 = fdiv double %7, 8.095000e+03
%9 = fadd double %8, %5
%10 = getelementptr inbounds double, double* %0, i64 %3
store double %9, double* %10
%11 = add nuw nsw i64 %3, 1
%12 = icmp eq i64 %11, 1000
br i1 %12, label %13, label %2
13: ; preds = %2
ret void
}
unsigned uDivTest5(unsigned X, unsigned Y) {
  return (X == Y ? ((unsigned)0) : Y);
}


x86 assembly (clang, -O0):
<uDivTest5>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    1120 <uDivTest5+0x20>
xor    %eax,%eax
mov    %eax,-0xc(%rbp)
jmp    1126 <uDivTest5+0x26>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<uDivTest5>:
xor    %eax,%eax
cmp    %esi,%edi
cmovne %esi,%eax
ret

LLVM IR (-O0):
define i32 @uDivTest5(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 = icmp eq i32 %5, %6
br i1 %7, label %8, label %9
8: ; preds = %2
br label %11
9: ; preds = %2
%10 = load i32, i32* %4
br label %11
11: ; preds = %9, %8
%12 = phi i32 [ 0, %8 ], [ %10, %9 ]
ret i32 %12
}

LLVM IR (-O2):
define i32 @uDivTest5(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, %1
%4 = select i1 %3, i32 0, i32 %1
ret i32 %4
}
/* Variables and functions */
int strlen(char const *);
void strlen_liveness(const char *x) {
  if (strlen(x) < 5)
    return;
  if (strlen(x) < 5)
    (void)*(char *)0;
}


x86 assembly (clang, -O0):
<strlen_liveness>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x5,%eax
jge    1133 <strlen_liveness+0x23>
jmp    1145 <strlen_liveness+0x35>
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x5,%eax
jge    1145 <strlen_liveness+0x35>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen_liveness>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
cmp    $0x5,%eax
jge    1120 <strlen_liveness+0x10>
pop    %rbx
ret
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <strlen@plt>

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

LLVM IR (-O2):
define void @strlen_liveness(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = icmp slt i32 %2, 5
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @strlen(i8* %0)
br label %6
6: ; preds = %4, %1
ret void
}
/* Type definitions */
struct sched_param {
  scalar_t__ __sched_priority;
};

/* Variables and functions */
int /*<<< orphan*/ SCHED_OTHER;
int /*<<< orphan*/ perror(char *);
int sched_setscheduler(int /*<<< orphan*/, int /*<<< orphan*/,
                       struct sched_param *);
void scheduler_standard() {
  struct sched_param p;
  p.__sched_priority = 0;
  if (sched_setscheduler(0, SCHED_OTHER, &p) == -1) {
    perror("Failed to switch to normal scheduler.");
  }
}


x86 assembly (clang, -O0):
<scheduler_standard>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x0,-0x8(%rbp)
mov    0x2ea9(%rip),%rax
mov    (%rax),%esi
xor    %edi,%edi
lea    -0x8(%rbp),%rdx
call   1030 <sched_setscheduler@plt>
cmp    $0xffffffff,%eax
jne    1159 <scheduler_standard+0x39>
lea    0xeac(%rip),%rdi
call   1040 <perror@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<scheduler_standard>:
push   %rax
movq   $0x0,(%rsp)
mov    0x2eb0(%rip),%rax
mov    (%rax),%esi
mov    %rsp,%rdx
xor    %edi,%edi
call   1030 <sched_setscheduler@plt>
cmp    $0xffffffff,%eax
je     1143 <scheduler_standard+0x23>
pop    %rax
ret
lea    0xeb6(%rip),%rdi
call   1040 <perror@plt>
pop    %rax
ret

LLVM IR (-O0):
%struct.sched_param = type { i64 }
@SCHED_OTHER = global i32 0
@.str = [38 x i8] c"Failed to switch to normal scheduler.\00"
define void @scheduler_standard() {
%1 = alloca %struct.sched_param
%2 = getelementptr inbounds %struct.sched_param, %struct.sched_param* %1, i32 0, i32 0
store i64 0, i64* %2
%3 = load i32, i32* @SCHED_OTHER
%4 = call i32 @sched_setscheduler(i32 0, i32 %3, %struct.sched_param* %1)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 @perror(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %0
ret void
}

LLVM IR (-O2):
%struct.sched_param = type { i64 }
@SCHED_OTHER = global i32 0
@.str = [38 x i8] c"Failed to switch to normal scheduler.\00"
define void @scheduler_standard() {
%1 = alloca %struct.sched_param
%2 = bitcast %struct.sched_param* %1 to i8*
%3 = getelementptr inbounds %struct.sched_param, %struct.sched_param* %1, i64 0, i32 0
store i64 0, i64* %3
%4 = load i32, i32* @SCHED_OTHER
%5 = call i32 @sched_setscheduler(i32 0, i32 %4, %struct.sched_param* %1)
%6 = icmp eq i32 %5, -1
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = call i32 @perror(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void catch_xcpu(int sig) { printf("XCPU\n"); }


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

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

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

LLVM IR (-O2):
@str = [5 x i8] c"XCPU\00"
define void @catch_xcpu(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
ret void
}
void generate_confirmation_file() {}


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

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

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

LLVM IR (-O2):
define void @generate_confirmation_file() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ closelog();
void CloseSyslog(void) { closelog(); }


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

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

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

LLVM IR (-O2):
define void @CloseSyslog() {
%1 = tail call i32 (...) @closelog()
ret void
}
void test_ar_1_INT(void *d, int n) {
  if (n == 0x7fffffff - 1)
    n = 0x7fffffff - 2;
  __builtin_memset(d, 0, n);
}


x86 assembly (clang, -O0):
<test_ar_1_INT>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x7ffffffe,-0xc(%rbp)
jne    1133 <test_ar_1_INT+0x23>
movl   $0x7ffffffd,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0xc(%rbp),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_ar_1_INT>:
cmp    $0x7ffffffe,%esi
mov    $0x7ffffffd,%eax
cmovne %esi,%eax
movslq %eax,%rdx
xor    %esi,%esi
jmp    1030 <memset@plt>

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

LLVM IR (-O2):
define void @test_ar_1_INT(i8* nocapture writeonly %0, i32 %1) {
%3 = icmp eq i32 %1, 2147483646
%4 = select i1 %3, i32 2147483645, i32 %1
%5 = sext i32 %4 to i64
tail call void @llvm.memset.p0i8.i64(i8* align 1 %0, i8 0, i64 %5, i1 false)
ret void
}
unsigned long b_mem_release(unsigned long *mem, unsigned long nbr) {
  unsigned long tlong;
  asm volatile("call *0x00100048" : "=c"(tlong) : "a"(*(mem)), "c"(nbr));
  return tlong;
}


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

x86 assembly (clang, -O2):
<b_mem_release>:
mov    %rsi,%rcx
mov    (%rdi),%rax
call   *0x100048
mov    %rcx,%rax
ret

LLVM IR (-O0):
define i64 @b_mem_release(i64* %0, i64 %1) {
%3 = alloca i64*
%4 = alloca i64
%5 = alloca i64
store i64* %0, i64** %3
store i64 %1, i64* %4
%6 = load i64*, i64** %3
%7 = load i64, i64* %6
%8 = load i64, i64* %4
%9 = call i64 asm sideeffect "call *0x00100048", "={cx},{ax},{cx},~{dirflag},~{fpsr},~{flags}"(i64 %7, i64 %8)
store i64 %9, i64* %5
%10 = load i64, i64* %5
ret i64 %10
}

LLVM IR (-O2):
define i64 @b_mem_release(i64* nocapture %0, i64 %1) {
%3 = load i64, i64* %0
%4 = tail call i64 asm sideeffect "call *0x00100048", "={cx},{ax},{cx},~{dirflag},~{fpsr},~{flags}"(i64 %3, i64 %1)
ret i64 %4
}
double fpei(x, y, p)
double x, y;
double *p;
{ return ((p[3] * x) - (p[4] * x * y)); }


x86 assembly (clang, -O0):
<fpei>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    %rdi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x18(%rax),%xmm0
movsd  -0x8(%rbp),%xmm2
mov    -0x18(%rbp),%rax
movsd  0x20(%rax),%xmm1
mulsd  -0x8(%rbp),%xmm1
mulsd  -0x10(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fpei>:
movsd  0x20(%rdi),%xmm2
mulsd  %xmm0,%xmm2
mulsd  %xmm1,%xmm2
mulsd  0x18(%rdi),%xmm0
subsd  %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @fpei(double %0, double %1, double* %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double*
store double %0, double* %4
store double %1, double* %5
store double* %2, double** %6
%7 = load double*, double** %6
%8 = getelementptr inbounds double, double* %7, i64 3
%9 = load double, double* %8
%10 = load double, double* %4
%11 = load double*, double** %6
%12 = getelementptr inbounds double, double* %11, i64 4
%13 = load double, double* %12
%14 = load double, double* %4
%15 = fmul double %13, %14
%16 = load double, double* %5
%17 = fmul double %15, %16
%18 = fneg double %17
%19 = call double @llvm.fmuladd.f64(double %9, double %10, double %18)
ret double %19
}

LLVM IR (-O2):
define double @fpei(double %0, double %1, double* nocapture %2) {
%4 = getelementptr inbounds double, double* %2, i64 3
%5 = load double, double* %4
%6 = getelementptr inbounds double, double* %2, i64 4
%7 = load double, double* %6
%8 = fneg double %7
%9 = fmul double %8, %0
%10 = fmul double %9, %1
%11 = tail call double @llvm.fmuladd.f64(double %5, double %0, double %10)
ret double %11
}
XForceScreenSaver() {}


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

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

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

LLVM IR (-O2):
define i32 @XForceScreenSaver() {
ret i32 undef
}
__attribute__((no, noclone)) int foo(int b) { return (((b ^ 5) | 1) ^ 5) | 1; }


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
xor    $0x5,%eax
or     $0x1,%eax
xor    $0x5,%eax
or     $0x1,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @foo(i32 %0) {
%2 = or i32 %0, 1
ret i32 %2
}
unsigned short swab16(unsigned short us) {
  return (us << 8) | ((us >> 8) & 0x00FF);
}


x86 assembly (clang, -O0):
<swab16>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
shl    $0x8,%eax
movzwl -0x2(%rbp),%ecx
sar    $0x8,%ecx
and    $0xff,%ecx
or     %ecx,%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<swab16>:
mov    %edi,%eax
rol    $0x8,%ax
ret

LLVM IR (-O0):
define zeroext i16 @swab16(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = shl i32 %4, 8
%6 = load i16, i16* %2
%7 = zext i16 %6 to i32
%8 = ashr i32 %7, 8
%9 = and i32 %8, 255
%10 = or i32 %5, %9
%11 = trunc i32 %10 to i16
ret i16 %11
}

LLVM IR (-O2):
define zeroext i16 @swab16(i16 zeroext %0) {
%2 = tail call i16 @llvm.bswap.i16(i16 %0)
ret i16 %2
}
/* Type definitions */
struct bitmask {
  int dummy;
};

/* Variables and functions */
struct bitmask *numa_allocate_nodemask();
int /*<<< orphan*/ numa_bind(struct bitmask *);
int /*<<< orphan*/ numa_bitmask_setbit(struct bitmask *, int);
int /*<<< orphan*/ numa_free_nodemask(struct bitmask *);
void bind2node_id(int node_id) {
  struct bitmask *bmp = numa_allocate_nodemask();
  numa_bitmask_setbit(bmp, node_id);
  numa_bind(bmp);
  numa_free_nodemask(bmp);
}


x86 assembly (clang, -O0):
<bind2node_id>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1050 <numa_allocate_nodemask@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%esi
call   1030 <numa_bitmask_setbit@plt>
mov    -0x10(%rbp),%rdi
call   1060 <numa_bind@plt>
mov    -0x10(%rbp),%rdi
call   1040 <numa_free_nodemask@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bind2node_id>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
xor    %eax,%eax
call   1050 <numa_allocate_nodemask@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %ebp,%esi
call   1030 <numa_bitmask_setbit@plt>
mov    %rbx,%rdi
call   1060 <numa_bind@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <numa_free_nodemask@plt>

LLVM IR (-O0):
%struct.bitmask = type { i32 }
define void @bind2node_id(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.bitmask*
store i32 %0, i32* %2
%4 = call %struct.bitmask* (...) @numa_allocate_nodemask()
store %struct.bitmask* %4, %struct.bitmask** %3
%5 = load %struct.bitmask*, %struct.bitmask** %3
%6 = load i32, i32* %2
%7 = call i32 @numa_bitmask_setbit(%struct.bitmask* %5, i32 %6)
%8 = load %struct.bitmask*, %struct.bitmask** %3
%9 = call i32 @numa_bind(%struct.bitmask* %8)
%10 = load %struct.bitmask*, %struct.bitmask** %3
%11 = call i32 @numa_free_nodemask(%struct.bitmask* %10)
ret void
}

LLVM IR (-O2):
%struct.bitmask = type { i32 }
define void @bind2node_id(i32 %0) {
%2 = tail call %struct.bitmask* (...) @numa_allocate_nodemask()
%3 = tail call i32 @numa_bitmask_setbit(%struct.bitmask* %2, i32 %0)
%4 = tail call i32 @numa_bind(%struct.bitmask* %2)
%5 = tail call i32 @numa_free_nodemask(%struct.bitmask* %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ SYS_read;
int /*<<< orphan*/ syscall3(int /*<<< orphan*/, int, uintptr_t, size_t);
ssize_t sys_read(int fd, void *buf, size_t count) {
  return syscall3(SYS_read, fd, (uintptr_t)buf, count);
}


x86 assembly (clang, -O0):
<sys_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2ebe(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
call   1030 <syscall3@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys_read>:
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %edi,%esi
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
jmp    1030 <syscall3@plt>

LLVM IR (-O0):
@SYS_read = global i32 0
define i32 @sys_read(i32 %0, i8* %1, i64 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64
store i32 %0, i32* %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i32, i32* @SYS_read
%8 = load i32, i32* %4
%9 = load i8*, i8** %5
%10 = ptrtoint i8* %9 to i64
%11 = load i64, i64* %6
%12 = call i32 @syscall3(i32 %7, i32 %8, i64 %10, i64 %11)
ret i32 %12
}

LLVM IR (-O2):
@SYS_read = global i32 0
define i32 @sys_read(i32 %0, i8* %1, i64 %2) {
%4 = load i32, i32* @SYS_read
%5 = ptrtoint i8* %1 to i64
%6 = tail call i32 @syscall3(i32 %4, i32 %0, i64 %5, i64 %2)
ret i32 %6
}
void *apply0(void *(*f)(void)) { return f(); }


x86 assembly (clang, -O0):
<apply0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
call   *-0x8(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<apply0>:
jmp    *%rdi

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

LLVM IR (-O2):
define i8* @apply0(i8* ()* nocapture %0) {
%2 = tail call i8* %0()
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_context_get_source_info_by_index() {
  printf("NOT IMPLEMENTED:"
         "pa_context_get_source_info_by_index"
         "\n");
}


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

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

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

LLVM IR (-O2):
@str = [52 x i8] c"NOT IMPLEMENTED:pa_context_get_source_info_by_index\00"
define i32 @pa_context_get_source_info_by_index() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @str, i64 0, i64 0))
ret i32 undef
}