xunge/DecIR huggingface dataset:
double gsl_fdiv(const double x, const double y) { return x / y; }


x86 assembly (clang, -O0):
<gsl_fdiv>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<gsl_fdiv>:
divsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @gsl_fdiv(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fdiv double %5, %6
ret double %7
}

LLVM IR (-O2):
define double @gsl_fdiv(double %0, double %1) {
%3 = fdiv double %0, %1
ret double %3
}
void atomic_add(int *mem, int val) { *mem += val; }


x86 assembly (clang, -O0):
<atomic_add>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
add    (%rax),%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<atomic_add>:
add    %esi,(%rdi)
ret

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

LLVM IR (-O2):
define void @atomic_add(i32* nocapture %0, i32 %1) {
%3 = load i32, i32* %0
%4 = add nsw i32 %3, %1
store i32 %4, i32* %0
ret void
}
/* Variables and functions */
scalar_t__ __NONDET__();
int /*<<< orphan*/ assert(int);
int main() {
  int x, y;
  x = 0;
  y = 0;
  while (__NONDET__()) {
    x++;
    y++;
  }
  while (x > 0) {
    x--;
    y--;
  }
  if (y != 0) {
    assert(1 == 0);
  }
  return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    $0x0,%al
call   1030 <__NONDET__@plt>
cmp    $0x0,%rax
je     1165 <main+0x45>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    113d <main+0x1d>
jmp    116a <main+0x4a>
cmpl   $0x0,-0x8(%rbp)
jle    118b <main+0x6b>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    116a <main+0x4a>
cmpl   $0x0,-0xc(%rbp)
je     119c <main+0x7c>
xor    %edi,%edi
call   1040 <assert@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <__NONDET__@plt>
test   %rax,%rax
jne    1120 <main+0x10>
mov    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 (...) @__NONDET__()
%2 = icmp eq i64 %1, 0
br i1 %2, label %6, label %3
3: ; preds = %0, %3
%4 = tail call i64 (...) @__NONDET__()
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %3
6: ; preds = %3, %0
ret i32 1
}
void mpp_sync_self() { int n; }


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

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

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

LLVM IR (-O2):
define void @mpp_sync_self() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr,
          "Host AP user space daemon for management functionality of "
          "Host AP kernel driver\n"
          "Copyright (c) 2002-2004, Jouni Malinen <jkmaline@cc.hut.fi>\n"
          "\n"
          "usage: hostapd [-hdB] <configuration file(s)>\n"
          "\n"
          "options:\n"
          "   -h   show this usage\n"
          "   -d   show more debug messages (-dd for even more)\n"
          "   -B   run daemon in the background\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 = [312 x i8] c"Host AP user space daemon for management functionality of Host AP kernel driver\0ACopyright (c) 2002-2004, Jouni Malinen <jkmaline@cc.hut.fi>\0A\0Ausage: hostapd [-hdB] <configuration file(s)>\0A\0Aoptions:\0A -h show this usage\0A -d show more debug messages (-dd for even more)\0A -B run daemon in the background\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([312 x i8], [312 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [312 x i8] c"Host AP user space daemon for management functionality of Host AP kernel driver\0ACopyright (c) 2002-2004, Jouni Malinen <jkmaline@cc.hut.fi>\0A\0Ausage: hostapd [-hdB] <configuration file(s)>\0A\0Aoptions:\0A -h show this usage\0A -d show more debug messages (-dd for even more)\0A -B run daemon in the background\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([312 x i8], [312 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
char *IntegerToString(int);
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, char *argv[]) {
  char *str = IntegerToString(1860);
  printf("%s\n", str);
  free(str);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x744,%edi
call   1050 <IntegerToString@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xea1(%rip),%rdi
call   1040 <printf@plt>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x744,%edi
call   1050 <IntegerToString@plt>
mov    %rax,%rbx
lea    0xebb(%rip),%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i8* @IntegerToString(i32 1860)
store i8* %7, i8** %6
%8 = load i8*, i8** %6
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %8)
%10 = load i8*, i8** %6
%11 = call i32 @free(i8* %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i8* @IntegerToString(i32 1860)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = tail call i32 @free(i8* %3)
ret i32 0
}
int f1(unsigned long long a) { return __builtin_popcountll(a); }


x86 assembly (clang, -O0):
<f1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
mov    %rcx,%rax
shr    %rax
movabs $0x5555555555555555,%rdx
55 55 55
and    %rdx,%rax
sub    %rax,%rcx
movabs $0x3333333333333333,%rdx
33 33 33
mov    %rcx,%rax
and    %rdx,%rax
shr    $0x2,%rcx
and    %rdx,%rcx
add    %rcx,%rax
mov    %rax,%rcx
shr    $0x4,%rcx
add    %rcx,%rax
movabs $0xf0f0f0f0f0f0f0f,%rcx
0f 0f 0f
and    %rcx,%rax
movabs $0x101010101010101,%rcx
01 01 01
imul   %rcx,%rax
shr    $0x38,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f1>:
mov    %rdi,%rax
shr    %rax
movabs $0x5555555555555555,%rcx
55 55 55
and    %rax,%rcx
sub    %rcx,%rdi
movabs $0x3333333333333333,%rax
33 33 33
mov    %rdi,%rcx
and    %rax,%rcx
shr    $0x2,%rdi
and    %rdi,%rax
add    %rcx,%rax
mov    %rax,%rcx
shr    $0x4,%rcx
add    %rax,%rcx
movabs $0xf0f0f0f0f0f0f0f,%rdx
0f 0f 0f
and    %rcx,%rdx
movabs $0x101010101010101,%rax
01 01 01
imul   %rdx,%rax
shr    $0x38,%rax
ret

LLVM IR (-O0):
define i32 @f1(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i64 @llvm.ctpop.i64(i64 %3)
%5 = trunc i64 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @f1(i64 %0) {
%2 = tail call i64 @llvm.ctpop.i64(i64 %0)
%3 = trunc i64 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *getpass(char *);
int /*<<< orphan*/ printf(char *, char *);
int main(void) {
  char *str;
  str = getpass("> ");
  printf("< %s\n", str);
  free(str);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1050 <getpass@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xea9(%rip),%rdi
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xec8(%rip),%rdi
call   1050 <getpass@plt>
mov    %rax,%rbx
lea    0xebc(%rip),%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"> \00"
@.str.1 = [6 x i8] c"< %s\0A\00"
define i32 @main() {
%1 = tail call i8* @getpass(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %1)
%3 = tail call i32 @free(i8* %1)
ret i32 0
}
/* Variables and functions */
double tan(double);
double qTan(double a) { return tan(a); }


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

x86 assembly (clang, -O2):
<qTan>:
jmp    1030 <tan@plt>

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

LLVM IR (-O2):
define double @qTan(double %0) {
%2 = tail call double @tan(double %0)
ret double %2
}
int bit_test(const unsigned char *bf, int n) {
  return !!(bf[n >> 3] & (1 << (n % 8)));
}


x86 assembly (clang, -O0):
<bit_test>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sar    $0x3,%ecx
movslq %ecx,%rcx
movzbl (%rax,%rcx,1),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    -0x10(%rbp),%eax
mov    %edx,%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bit_test>:
mov    %esi,%ecx
mov    %esi,%eax
sar    $0x3,%eax
cltq
movzbl (%rdi,%rax,1),%eax
and    $0x7,%cl
shr    %cl,%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @bit_test(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 = ashr i32 %6, 3
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %5, i64 %8
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = load i32, i32* %4
%13 = srem i32 %12, 8
%14 = shl i32 1, %13
%15 = and i32 %11, %14
%16 = icmp ne i32 %15, 0
%17 = xor i1 %16, true
%18 = xor i1 %17, true
%19 = zext i1 %18 to i32
ret i32 %19
}

LLVM IR (-O2):
define i32 @bit_test(i8* nocapture %0, i32 %1) {
%3 = ashr i32 %1, 3
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = and i32 %1, 7
%9 = lshr i32 %7, %8
%10 = and i32 %9, 1
ret i32 %10
}
int test_imm_0Aint8_reg(signed char val) {
  return ((val) & (0x0A << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_0Aint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
and    $0xa,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_0Aint8_reg(i8 signext %0) {
%2 = and i8 %0, 10
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void fa62(void) {
P0A:
  goto P0A;
  ({
    P01A:
      goto P01A;
      ({
        P012A:
          goto P012A;
          0;
      });
    P01B:
      goto P01B;
      ({
        p013A:
          goto p013A;
          goto a;
        P013A:
          goto P013A;
          0;
      });
    P01C:
      goto P01C;
      0;
  });
a:
  ({
    P02A:
      goto P02A;
      ({
        P024A:
          goto P024A;
          0;
      });
    P02B:
      goto P02B;
      ({
        P025A:
          goto P025A;
          0;
      });
    P02C:
      goto P02C;
      0;
  });
P0C:
  goto P0C;
  0;
P0D:
  goto P0D;
}


x86 assembly (clang, -O0):
<fa62>:
push   %rbp
mov    %rsp,%rbp
jmp    1104 <fa62+0x4>

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

LLVM IR (-O0):
define void @fa62() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
br label %7
7: ; preds = %7, %0
br label %7
8: ; No predecessors!
br label %9
9: ; preds = %9, %8
br label %9
10: ; No predecessors!
br label %11
11: ; preds = %11, %10
br label %11
12: ; preds = %12
br label %12
13: ; No predecessors!
br label %14
14: ; preds = %14, %13
br label %14
15: ; preds = %15
br label %15
16: ; preds = %16
br label %16
17: ; No predecessors!
br label %18
18: ; preds = %18, %17
br label %18
19: ; No predecessors!
br label %20
20: ; preds = %20, %19
br label %20
21: ; preds = %21
br label %21
22: ; No predecessors!
br label %23
23: ; preds = %23, %22
br label %23
24: ; preds = %24
br label %24
25: ; preds = %25
br label %25
26: ; preds = %26
br label %26
}

LLVM IR (-O2):
define void @fa62() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void pp(int num) { printf("the num is %d\n", num); }


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

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

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

LLVM IR (-O2):
@.str = [15 x i8] c"the num is %d\0A\00"
define void @pp(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
uint8_t __rleu08(uint8_t *buffer) { return buffer[0]; }


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

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

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

LLVM IR (-O2):
define i32 @__rleu08(i32* nocapture %0) {
%2 = load i32, i32* %0
ret i32 %2
}
void ang_sort_swap_hook_longs(void *u, void *v, int a, int b) {
  long *x = (long *)(u);
  long temp;
  (void)v;
  temp = x[a];
  x[a] = x[b];
  x[b] = temp;
}


x86 assembly (clang, -O0):
<ang_sort_swap_hook_longs>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
mov    -0x20(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x28(%rbp),%rdx
mov    -0x20(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ang_sort_swap_hook_longs>:
movslq %edx,%rax
mov    (%rdi,%rax,8),%rdx
movslq %ecx,%rcx
mov    (%rdi,%rcx,8),%rsi
mov    %rsi,(%rdi,%rax,8)
mov    %rdx,(%rdi,%rcx,8)
ret

LLVM IR (-O0):
define void @ang_sort_swap_hook_longs(i8* %0, i8* %1, i32 %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i64*
%10 = alloca i64
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%11 = load i8*, i8** %5
%12 = bitcast i8* %11 to i64*
store i64* %12, i64** %9
%13 = load i8*, i8** %6
%14 = load i64*, i64** %9
%15 = load i32, i32* %7
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i64, i64* %14, i64 %16
%18 = load i64, i64* %17
store i64 %18, i64* %10
%19 = load i64*, i64** %9
%20 = load i32, i32* %8
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds i64, i64* %19, i64 %21
%23 = load i64, i64* %22
%24 = load i64*, i64** %9
%25 = load i32, i32* %7
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds i64, i64* %24, i64 %26
store i64 %23, i64* %27
%28 = load i64, i64* %10
%29 = load i64*, i64** %9
%30 = load i32, i32* %8
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds i64, i64* %29, i64 %31
store i64 %28, i64* %32
ret void
}

LLVM IR (-O2):
define void @ang_sort_swap_hook_longs(i8* nocapture %0, i8* nocapture readnone %1, i32 %2, i32 %3) {
%5 = bitcast i8* %0 to i64*
%6 = sext i32 %2 to i64
%7 = getelementptr inbounds i64, i64* %5, i64 %6
%8 = load i64, i64* %7
%9 = sext i32 %3 to i64
%10 = getelementptr inbounds i64, i64* %5, i64 %9
%11 = load i64, i64* %10
store i64 %11, i64* %7
store i64 %8, i64* %10
ret void
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int syscon_retrieve_quaddobl_term(int i, int j, int n, int *exp, double *c) {
  int a[3], fail;
  a[0] = n;
  a[1] = i;
  a[2] = j;
  fail = _ada_use_c2phc4c(385, a, exp, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<syscon_retrieve_quaddobl_term>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x24(%rbp)
lea    -0x2c(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x181,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x30(%rbp)
mov    -0x30(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<syscon_retrieve_quaddobl_term>:
sub    $0x18,%rsp
mov    %edx,0xc(%rsp)
mov    %edi,0x10(%rsp)
mov    %esi,0x14(%rsp)
lea    0xc(%rsp),%rsi
mov    $0x181,%edi
mov    %rcx,%rdx
mov    %r8,%rcx
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
define i32 @syscon_retrieve_quaddobl_term(i32 %0, i32 %1, i32 %2, i32* %3, double* %4) {
%6 = alloca [3 x i32]
%7 = bitcast [3 x i32]* %6 to i8*
%8 = getelementptr inbounds [3 x i32], [3 x i32]* %6, i64 0, i64 0
store i32 %2, i32* %8
%9 = getelementptr inbounds [3 x i32], [3 x i32]* %6, i64 0, i64 1
store i32 %0, i32* %9
%10 = getelementptr inbounds [3 x i32], [3 x i32]* %6, i64 0, i64 2
store i32 %1, i32* %10
%11 = call i32 @_ada_use_c2phc4c(i32 385, i32* %8, i32* %3, double* %4, i32 0)
ret i32 %11
}
/* Type definitions */
struct timeval {
  long long tv_sec;
  long long tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
unsigned long long curTimeMs(void) {
  struct timeval tv;
  gettimeofday(&tv, NULL);
  return tv.tv_sec * 1000LL + tv.tv_usec / 1000LL;
}


x86 assembly (clang, -O0):
<curTimeMs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
imul   $0x3e8,-0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    $0x3e8,%ecx
cqto
idiv   %rcx
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
add    %rcx,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<curTimeMs>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
imul   $0x3e8,0x8(%rsp),%rcx
movabs $0x20c49ba5e353f7cf,%rax
9b c4 20
imulq  0x10(%rsp)
mov    %rdx,%rax
shr    $0x3f,%rax
sar    $0x7,%rdx
add    %rdx,%rax
add    %rcx,%rax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i64, i64 }
define i64 @curTimeMs() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%4 = load i64, i64* %3
%5 = mul nsw i64 %4, 1000
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%7 = load i64, i64* %6
%8 = sdiv i64 %7, 1000
%9 = add nsw i64 %5, %8
ret i64 %9
}

LLVM IR (-O2):
%struct.timeval = type { i64, i64 }
define i64 @curTimeMs() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%5 = load i64, i64* %4
%6 = mul nsw i64 %5, 1000
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%8 = load i64, i64* %7
%9 = sdiv i64 %8, 1000
%10 = add nsw i64 %9, %6
ret i64 %10
}
/* Variables and functions */
int /*<<< orphan*/ swap(int, int);
int main() {
  swap(12, 34);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0xc,%edi
mov    $0x22,%esi
call   1030 <swap@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xc,%edi
mov    $0x22,%esi
call   1030 <swap@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @swap(i32 12, i32 34)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @swap(i32 12, i32 34)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ueld_print(char *, char *);
void ueld_echo(char *msg) { ueld_print("%s\n", msg); }


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

x86 assembly (clang, -O2):
<ueld_echo>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <ueld_print@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @ueld_echo(i8* %0) {
%2 = tail call i32 @ueld_print(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int atoi(scalar_t__);
scalar_t__ strpbrk(char *, char *);
int get_int(char *s) { return atoi(strpbrk(s, ":") + 1); }


x86 assembly (clang, -O0):
<get_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1030 <strpbrk@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1040 <atoi@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_int>:
push   %rax
lea    0xed8(%rip),%rsi
call   1030 <strpbrk@plt>
lea    0x1(%rax),%rdi
pop    %rax
jmp    1040 <atoi@plt>

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

LLVM IR (-O2):
@.str = [2 x i8] c":\00"
define i32 @get_int(i8* %0) {
%2 = tail call i64 @strpbrk(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = add nsw i64 %2, 1
%4 = tail call i32 @atoi(i64 %3)
ret i32 %4
}
/* Variables and functions */
double sin(double);
double sinc(double x) {
  return (x == 0.0 ? 1.0
                   : sin(3.14159265358979323846264338327950288 * x) /
                         (3.14159265358979323846264338327950288 * x));
}


x86 assembly (clang, -O0):
<sinc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1147 <sinc+0x37>
jp     1147 <sinc+0x37>
movsd  0xecb(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    116f <sinc+0x5f>
movsd  0xeb1(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
call   1030 <sin@plt>
movsd  0xe9f(%rip),%xmm1
mulsd  -0x8(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sinc>:
push   %rax
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1127 <sinc+0x17>
jp     1127 <sinc+0x17>
movsd  0xedb(%rip),%xmm0
pop    %rax
ret
mulsd  0xed9(%rip),%xmm0
movsd  %xmm0,(%rsp)
call   1030 <sin@plt>
divsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @sinc(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp oeq double %3, 0.000000e+00
br i1 %4, label %5, label %6
5: ; preds = %1
br label %13
6: ; preds = %1
%7 = load double, double* %2
%8 = fmul double 0x400921FB54442D18, %7
%9 = call double @sin(double %8)
%10 = load double, double* %2
%11 = fmul double 0x400921FB54442D18, %10
%12 = fdiv double %9, %11
br label %13
13: ; preds = %6, %5
%14 = phi double [ 1.000000e+00, %5 ], [ %12, %6 ]
ret double %14
}

LLVM IR (-O2):
define double @sinc(double %0) {
%2 = fcmp oeq double %0, 0.000000e+00
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = fmul double %0, 0x400921FB54442D18
%5 = tail call double @sin(double %4)
%6 = fdiv double %5, %4
br label %7
7: ; preds = %1, %3
%8 = phi double [ %6, %3 ], [ 1.000000e+00, %1 ]
ret double %8
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int main() {
  int a = 123;
  a <<= 20;
  a |= 93;
  a &= 0xFF;
  assert(a == 93);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x7b,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x14,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
or     $0x5d,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0xff,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x5d,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 123, i32* %2
%3 = load i32, i32* %2
%4 = shl i32 %3, 20
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = or i32 %5, 93
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = and i32 %7, 255
store i32 %8, i32* %2
%9 = load i32, i32* %2
%10 = icmp eq i32 %9, 93
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assert(i32 1)
ret i32 0
}
systemError(msg, arg1, arg2, arg3) char *msg;
int arg1, arg2, arg3;
{
  error(msg, arg1, arg2, arg3);
  perror("Unix says");
  exit(1);
}


x86 assembly (clang, -O0):
<systemError>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
mov    $0x0,%al
call   1030 <error@plt>
lea    0xea0(%rip),%rdi
mov    $0x0,%al
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<systemError>:
push   %rax
xor    %eax,%eax
call   1030 <error@plt>
lea    0xec1(%rip),%rdi
xor    %eax,%eax
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"Unix says\00"
define i32 @systemError(i8* %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i8* %0, i8** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i8*, i8** %5
%10 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = load i32, i32* %8
%13 = call i32 (i8*, i32, i32, i32, ...) bitcast (i32 (...)* @error to i32 (i8*, i32, i32, i32, ...)*)(i8* %9, i32 %10, i32 %11, i32 %12)
%14 = call i32 (i8*, ...) bitcast (i32 (...)* @perror to i32 (i8*, ...)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
unreachable
}

LLVM IR (-O2):
@.str = [10 x i8] c"Unix says\00"
define i32 @systemError(i8* %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 (i8*, i32, i32, i32, ...) bitcast (i32 (...)* @error to i32 (i8*, i32, i32, i32, ...)*)(i8* %0, i32 %1, i32 %2, i32 %3)
%6 = tail call i32 (i8*, ...) bitcast (i32 (...)* @perror to i32 (i8*, ...)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
tail call void @exit(i32 1)
unreachable
}
void b43legacy_debugfs_add_device(struct b43legacy_wldev *dev) {}


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

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

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

LLVM IR (-O2):
%struct.b43legacy_wldev = type opaque
define void @b43legacy_debugfs_add_device(%struct.b43legacy_wldev* nocapture %0) {
ret void
}
/* Variables and functions */
char *ulltoa(long long, char *, int);
char *lltoa(long long value, char *result, int base) {
  char *cur, *uret;
  cur = result;
  if (0 > value) {
    *cur++ = '-';
    value *= -1;
  }
  uret = ulltoa(value, cur, base);
  if (NULL == uret)
    return NULL;
  return result;
}


x86 assembly (clang, -O0):
<lltoa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
xor    %eax,%eax
cmp    -0x10(%rbp),%rax
jle    1152 <lltoa+0x42>
mov    -0x28(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x28(%rbp)
movb   $0x2d,(%rax)
imul   $0xffffffffffffffff,-0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1030 <ulltoa@plt>
mov    %rax,-0x30(%rbp)
xor    %eax,%eax
cmp    -0x30(%rbp),%rax
jne    117f <lltoa+0x6f>
movq   $0x0,-0x8(%rbp)
jmp    1187 <lltoa+0x77>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lltoa>:
push   %rbx
mov    %rsi,%rbx
test   %rdi,%rdi
js     111e <lltoa+0xe>
mov    %rbx,%rsi
jmp    1128 <lltoa+0x18>
lea    0x1(%rbx),%rsi
movb   $0x2d,(%rbx)
neg    %rdi
call   1030 <ulltoa@plt>
test   %rax,%rax
cmovne %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @lltoa(i64 %0, i8* %1, i32 %2) {
%4 = icmp slt i64 %0, 0
br i1 %4, label %5, label %8
5: ; preds = %3
%6 = getelementptr inbounds i8, i8* %1, i64 1
store i8 45, i8* %1
%7 = sub nsw i64 0, %0
br label %8
8: ; preds = %5, %3
%9 = phi i64 [ %7, %5 ], [ %0, %3 ]
%10 = phi i8* [ %6, %5 ], [ %1, %3 ]
%11 = tail call i8* @ulltoa(i64 %9, i8* %10, i32 %2)
%12 = icmp eq i8* %11, null
%13 = select i1 %12, i8* null, i8* %1
ret i8* %13
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
int /*<<< orphan*/ IntDisable(int);
int /*<<< orphan*/ IntUnregister(int);
void AESIntUnregister(uint32_t ui32Base) {
  ASSERT(ui32Base == 0x44036000);
  IntDisable(111);
  IntUnregister(111);
}


x86 assembly (clang, -O0):
<AESIntUnregister>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x44036000,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <ASSERT@plt>
mov    $0x6f,%edi
call   1030 <IntDisable@plt>
mov    $0x6f,%edi
call   1050 <IntUnregister@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<AESIntUnregister>:
push   %rax
xor    %eax,%eax
cmp    $0x44036000,%edi
sete   %al
mov    %eax,%edi
call   1040 <ASSERT@plt>
mov    $0x6f,%edi
call   1030 <IntDisable@plt>
mov    $0x6f,%edi
pop    %rax
jmp    1050 <IntUnregister@plt>

LLVM IR (-O0):
define void @AESIntUnregister(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 1141071872
%5 = zext i1 %4 to i32
%6 = call i32 @ASSERT(i32 %5)
%7 = call i32 @IntDisable(i32 111)
%8 = call i32 @IntUnregister(i32 111)
ret void
}

LLVM IR (-O2):
define void @AESIntUnregister(i32 %0) {
%2 = icmp eq i32 %0, 1141071872
%3 = zext i1 %2 to i32
%4 = tail call i32 @ASSERT(i32 %3)
%5 = tail call i32 @IntDisable(i32 111)
%6 = tail call i32 @IntUnregister(i32 111)
ret void
}
void WebPInitSharpYUVNEON(void) {}


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

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

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

LLVM IR (-O2):
define void @WebPInitSharpYUVNEON() {
ret void
}
unsigned long sysfs_get_freq_hardware(unsigned int cpu) { return 0; }


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

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

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

LLVM IR (-O2):
define i64 @sysfs_get_freq_hardware(i32 %0) {
ret i64 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int EOF;
int fgetc(int /*<<< orphan*/ *);
int /*<<< orphan*/ is_whitespace(char);
int skip_field(FILE *fd) {
  int tmp_char;
  do {
    tmp_char = fgetc(fd);
  } while (tmp_char != EOF && !is_whitespace((char)tmp_char));
  return tmp_char;
}


x86 assembly (clang, -O0):
<skip_field>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <fgetc@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
xor    %eax,%eax
mov    0x2ea4(%rip),%rdx
cmp    (%rdx),%ecx
mov    %al,-0xd(%rbp)
je     1165 <skip_field+0x45>
mov    -0xc(%rbp),%eax
movsbl %al,%edi
call   1040 <is_whitespace@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    112c <skip_field+0xc>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_field>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%rbx
mov    0x2eba(%rip),%r14
xchg   %ax,%ax
mov    %rbx,%rdi
call   1030 <fgetc@plt>
mov    %eax,%ebp
cmp    (%r14),%eax
je     114c <skip_field+0x2c>
movsbl %bpl,%edi
call   1040 <is_whitespace@plt>
test   %eax,%eax
je     1130 <skip_field+0x10>
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
@EOF = global i32 0
define i32 @skip_field(i32* nocapture %0) {
br label %2
2: ; preds = %6, %1
%3 = tail call i32 @fgetc(i32* %0)
%4 = load i32, i32* @EOF
%5 = icmp eq i32 %3, %4
br i1 %5, label %10, label %6
6: ; preds = %2
%7 = trunc i32 %3 to i8
%8 = tail call i32 @is_whitespace(i8 signext %7)
%9 = icmp eq i32 %8, 0
br i1 %9, label %2, label %10
10: ; preds = %2, %6
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ __cpuid(int /*<<< orphan*/, int /*<<< orphan*/,
                           int /*<<< orphan*/, int /*<<< orphan*/,
                           int /*<<< orphan*/);
int main(void) {
  uint32_t eax, ebx, ecx, edx;
  __cpuid(0, eax, ebx, ecx, edx);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x14(%rbp),%r8d
xor    %edi,%edi
call   1030 <__cpuid@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @__cpuid(i32 0, i32 undef, i32 undef, i32 undef, i32 undef)
ret i32 0
}
/* Type definitions */
typedef struct dbuf const dbuf;

/* Variables and functions */
int /*<<< orphan*/ assert(struct dbuf const *);
int /*<<< orphan*/ dbuf_addmem(struct dbuf const *, int /*<<< orphan*/,
                               int /*<<< orphan*/);
int /*<<< orphan*/ dbuf_cdata(struct dbuf const *);
int /*<<< orphan*/ dbuf_size(struct dbuf const *);
void dbuf_addbuf(struct dbuf *b, const struct dbuf *o) {
  assert(b);
  assert(o);
  dbuf_addmem(b, dbuf_cdata(o), dbuf_size(o));
}


x86 assembly (clang, -O0):
<dbuf_addbuf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <assert@plt>
mov    -0x10(%rbp),%rdi
call   1050 <assert@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <dbuf_cdata@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1060 <dbuf_size@plt>
mov    -0x20(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    %eax,%edx
call   1040 <dbuf_addmem@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dbuf_addbuf>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%r14
call   1050 <assert@plt>
mov    %rbx,%rdi
call   1050 <assert@plt>
mov    %rbx,%rdi
call   1030 <dbuf_cdata@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1060 <dbuf_size@plt>
mov    %r14,%rdi
mov    %ebp,%esi
mov    %eax,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <dbuf_addmem@plt>

LLVM IR (-O0):
%struct.dbuf = type opaque
define void @dbuf_addbuf(%struct.dbuf* %0, %struct.dbuf* %1) {
%3 = alloca %struct.dbuf*
%4 = alloca %struct.dbuf*
store %struct.dbuf* %0, %struct.dbuf** %3
store %struct.dbuf* %1, %struct.dbuf** %4
%5 = load %struct.dbuf*, %struct.dbuf** %3
%6 = call i32 @assert(%struct.dbuf* %5)
%7 = load %struct.dbuf*, %struct.dbuf** %4
%8 = call i32 @assert(%struct.dbuf* %7)
%9 = load %struct.dbuf*, %struct.dbuf** %3
%10 = load %struct.dbuf*, %struct.dbuf** %4
%11 = call i32 @dbuf_cdata(%struct.dbuf* %10)
%12 = load %struct.dbuf*, %struct.dbuf** %4
%13 = call i32 @dbuf_size(%struct.dbuf* %12)
%14 = call i32 @dbuf_addmem(%struct.dbuf* %9, i32 %11, i32 %13)
ret void
}

LLVM IR (-O2):
%struct.dbuf = type opaque
define void @dbuf_addbuf(%struct.dbuf* %0, %struct.dbuf* %1) {
%3 = tail call i32 @assert(%struct.dbuf* %0)
%4 = tail call i32 @assert(%struct.dbuf* %1)
%5 = tail call i32 @dbuf_cdata(%struct.dbuf* %1)
%6 = tail call i32 @dbuf_size(%struct.dbuf* %1)
%7 = tail call i32 @dbuf_addmem(%struct.dbuf* %0, i32 %5, i32 %6)
ret void
}
char *XCar(char c, int nbr, char *s) {
  *(s + nbr) = 0;
  while (nbr)
    *(s + (--nbr)) = c;
  return (s);
}


x86 assembly (clang, -O0):
<XCar>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x8(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
cmpl   $0x0,-0x8(%rbp)
je     1142 <XCar+0x42>
mov    -0x1(%rbp),%dl
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x8(%rbp)
movslq %ecx,%rcx
mov    %dl,(%rax,%rcx,1)
jmp    111d <XCar+0x1d>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<XCar>:
push   %rbx
mov    %rdx,%rbx
movslq %esi,%rax
movb   $0x0,(%rdx,%rax,1)
test   %eax,%eax
je     1139 <XCar+0x29>
lea    -0x1(%rsi),%ecx
movslq %ecx,%rax
sub    %rcx,%rax
add    %rbx,%rax
mov    %esi,%edx
movzbl %dil,%esi
mov    %rax,%rdi
call   1030 <memset@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @XCar(i8 signext %0, i32 %1, i8* returned writeonly %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i8, i8* %2, i64 %4
store i8 0, i8* %5
%6 = icmp eq i32 %1, 0
br i1 %6, label %14, label %7
7: ; preds = %3
%8 = add i32 %1, -1
%9 = sext i32 %8 to i64
%10 = zext i32 %8 to i64
%11 = sub nsw i64 %9, %10
%12 = getelementptr i8, i8* %2, i64 %11
%13 = zext i32 %1 to i64
br label %14
14: ; preds = %7, %3
ret i8* %2
}
const char *log_level_string(int severity) {
  static const char *strings[] = {
      [0] = "DEBUG", [1] = "INFO", [2] = "WARNING", [3] = "ERROR"};
  return strings[severity];
}


x86 assembly (clang, -O0):
<log_level_string>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rcx
lea    0x2f1e(%rip),%rax
mov    (%rax,%rcx,8),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<log_level_string>:
movslq %edi,%rax
lea    0xef6(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
ret

LLVM IR (-O0):
@log_level_string.strings = internal global [4 x i8*] [i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i32 0, i32 0)]
@.str = [6 x i8] c"DEBUG\00"
@.str.1 = [5 x i8] c"INFO\00"
@.str.2 = [8 x i8] c"WARNING\00"
@.str.3 = [6 x i8] c"ERROR\00"
define i8* @log_level_string(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds [4 x i8*], [4 x i8*]* @log_level_string.strings, i64 0, i64 %4
%6 = load i8*, i8** %5
ret i8* %6
}

LLVM IR (-O2):
@reltable.log_level_string = internal unnamed_addr constant [4 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @.str to i64), i64 ptrtoint ([4 x i32]* @reltable.log_level_string to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @.str.1 to i64), i64 ptrtoint ([4 x i32]* @reltable.log_level_string to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([8 x i8]* @.str.2 to i64), i64 ptrtoint ([4 x i32]* @reltable.log_level_string to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @.str.3 to i64), i64 ptrtoint ([4 x i32]* @reltable.log_level_string to i64)) to i32)]
@.str = [6 x i8] c"DEBUG\00"
@.str.1 = [5 x i8] c"INFO\00"
@.str.2 = [8 x i8] c"WARNING\00"
@.str.3 = [6 x i8] c"ERROR\00"
define i8* @log_level_string(i32 %0) {
%2 = sext i32 %0 to i64
%3 = shl i64 %2, 2
%4 = call i8* @llvm.load.relative.i64(i8* bitcast ([4 x i32]* @reltable.log_level_string to i8*), i64 %3)
ret i8* %4
}
int __mp_stopleaktable(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @__mp_stopleaktable() {
ret i32 0
}