xunge/DecIR huggingface dataset:
/* Variables and functions */
size_t divdown(size_t const a, size_t const b) { return a / b; }


x86 assembly (clang, -O0):
<divdown>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
xor    %ecx,%ecx
mov    %ecx,%edx
divq   -0x10(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<divdown>:
mov    %rdi,%rax
mov    %rdi,%rcx
or     %rsi,%rcx
shr    $0x20,%rcx
je     1115 <divdown+0x15>
xor    %edx,%edx
div    %rsi
ret
xor    %edx,%edx
div    %esi
ret

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

LLVM IR (-O2):
define i64 @divdown(i64 %0, i64 %1) {
%3 = udiv i64 %0, %1
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ foo();
int main(int argc, char *argv[]) {
  foo();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @foo()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @foo()
ret i32 0
}
/* Variables and functions */
float sinh(float);
float call_sinhf(float x) { return sinh((float)x); }


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

x86 assembly (clang, -O2):
<call_sinhf>:
jmp    1030 <sinh@plt>

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

LLVM IR (-O2):
define float @call_sinhf(float %0) {
%2 = tail call float @sinh(float %0)
ret float %2
}
/* Variables and functions */
int _dgr(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ _f2d(int);
int _fgr(int a, int b) { return _dgr(_f2d(a), _f2d(b)); }


x86 assembly (clang, -O0):
<_fgr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <_f2d@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <_f2d@plt>
mov    -0xc(%rbp),%edi
mov    %eax,%esi
call   1030 <_dgr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_fgr>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
call   1040 <_f2d@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1040 <_f2d@plt>
mov    %ebp,%edi
mov    %eax,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <_dgr@plt>

LLVM IR (-O0):
define i32 @_fgr(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 = call i32 @_f2d(i32 %5)
%7 = load i32, i32* %4
%8 = call i32 @_f2d(i32 %7)
%9 = call i32 @_dgr(i32 %6, i32 %8)
ret i32 %9
}

LLVM IR (-O2):
define i32 @_fgr(i32 %0, i32 %1) {
%3 = tail call i32 @_f2d(i32 %0)
%4 = tail call i32 @_f2d(i32 %1)
%5 = tail call i32 @_dgr(i32 %3, i32 %4)
ret i32 %5
}
void PDC_set_title(title) char *title;
{ return; }


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

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

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

LLVM IR (-O2):
define void @PDC_set_title(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_cvolume_snprint() {
  printf("NOT IMPLEMENTED:"
         "pa_cvolume_snprint"
         "\n");
}


x86 assembly (clang, -O0):
<pa_cvolume_snprint>:
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_cvolume_snprint>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

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

LLVM IR (-O2):
@str = [35 x i8] c"NOT IMPLEMENTED:pa_cvolume_snprint\00"
define i32 @pa_cvolume_snprint() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
f() { static int *p = 5; }


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

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

LLVM IR (-O0):
@f.p = internal global i32* inttoptr (i64 5 to i32*)
define i32 @f() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @f() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ fileWriteByte(int, char);
void *popNumber();
int /*<<< orphan*/ pushNumber(int /*<<< orphan*/);
void basWriteByte() {
  char c;
  int fileNum;
  c = popNumber();
  fileNum = popNumber();
  fileWriteByte(fileNum, c);
  pushNumber(0);
}


x86 assembly (clang, -O0):
<basWriteByte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <popNumber@plt>
mov    %al,-0x1(%rbp)
mov    $0x0,%al
call   1050 <popNumber@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
movsbl -0x1(%rbp),%esi
call   1030 <fileWriteByte@plt>
xor    %edi,%edi
call   1040 <pushNumber@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<basWriteByte>:
push   %rbx
xor    %eax,%eax
call   1050 <popNumber@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1050 <popNumber@plt>
movsbl %bl,%esi
mov    %eax,%edi
call   1030 <fileWriteByte@plt>
xor    %edi,%edi
pop    %rbx
jmp    1040 <pushNumber@plt>

LLVM IR (-O0):
define void @basWriteByte() {
%1 = alloca i8
%2 = alloca i32
%3 = call i8* (...) @popNumber()
%4 = ptrtoint i8* %3 to i8
store i8 %4, i8* %1
%5 = call i8* (...) @popNumber()
%6 = ptrtoint i8* %5 to i32
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = load i8, i8* %1
%9 = call i32 @fileWriteByte(i32 %7, i8 signext %8)
%10 = call i32 @pushNumber(i32 0)
ret void
}

LLVM IR (-O2):
define void @basWriteByte() {
%1 = tail call i8* (...) @popNumber()
%2 = ptrtoint i8* %1 to i64
%3 = trunc i64 %2 to i8
%4 = tail call i8* (...) @popNumber()
%5 = ptrtoint i8* %4 to i64
%6 = trunc i64 %5 to i32
%7 = tail call i32 @fileWriteByte(i32 %6, i8 signext %3)
%8 = tail call i32 @pushNumber(i32 0)
ret void
}
int fibonacci(int number) {
  if (number == 0) {
    return 0;
  }
  if (number == 1) {
    return 1;
  }
  return fibonacci(number - 1) + fibonacci(number - 2);
}


x86 assembly (clang, -O0):
<fibonacci>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1131 <fibonacci+0x21>
movl   $0x0,-0x4(%rbp)
jmp    116a <fibonacci+0x5a>
cmpl   $0x1,-0x8(%rbp)
jne    1147 <fibonacci+0x37>
movl   $0x1,-0x4(%rbp)
jmp    116a <fibonacci+0x5a>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <fibonacci@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x2,%edi
call   1030 <fibonacci@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fibonacci>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
xor    %ebp,%ebp
cmp    $0x2,%ebx
jb     1132 <fibonacci+0x22>
nopl   0x0(%rax)
lea    -0x1(%rbx),%edi
call   1030 <fibonacci@plt>
add    %eax,%ebp
add    $0xfffffffe,%ebx
cmp    $0x2,%ebx
jae    1120 <fibonacci+0x10>
add    %ebp,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @fibonacci(i32 %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i32 [ 0, %1 ], [ %10, %6 ]
%4 = phi i32 [ %0, %1 ], [ %9, %6 ]
%5 = icmp ult i32 %4, 2
br i1 %5, label %11, label %6
6: ; preds = %2
%7 = add nsw i32 %4, -1
%8 = tail call i32 @fibonacci(i32 %7)
%9 = add nsw i32 %4, -2
%10 = add nsw i32 %8, %3
br label %2
11: ; preds = %2
%12 = add nsw i32 %4, %3
ret i32 %12
}
int abs(int x) {
  if (x < 0)
    x *= -1;
  return x;
}


x86 assembly (clang, -O0):
<abs>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    1118 <abs+0x18>
imul   $0xffffffff,-0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<abs>:
mov    %edi,%eax
neg    %eax
cmovs  %edi,%eax
ret

LLVM IR (-O0):
define i32 @abs(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = mul nsw i32 %6, -1
store i32 %7, i32* %2
br label %8
8: ; preds = %5, %1
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
define i32 @abs(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
ret i32 %2
}
void mem_write(unsigned int addr, unsigned int value) {
  unsigned int *mem_p = (unsigned int *)addr;
  mem_p[0] = value;
}


x86 assembly (clang, -O0):
<mem_write>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<mem_write>:
mov    %edi,%eax
mov    %esi,(%rax)
ret

LLVM IR (-O0):
define void @mem_write(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32*
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = zext i32 %6 to i64
%8 = inttoptr i64 %7 to i32*
store i32* %8, i32** %5
%9 = load i32, i32* %4
%10 = load i32*, i32** %5
%11 = getelementptr inbounds i32, i32* %10, i64 0
store i32 %9, i32* %11
ret void
}

LLVM IR (-O2):
define void @mem_write(i32 %0, i32 %1) {
%3 = zext i32 %0 to i64
%4 = inttoptr i64 %3 to i32*
store i32 %1, i32* %4
ret void
}
/* Variables and functions */
float length(float *);
float length3(float *v) { return length(v); }


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

x86 assembly (clang, -O2):
<length3>:
jmp    1030 <length@plt>

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

LLVM IR (-O2):
define float @length3(float* %0) {
%2 = tail call float @length(float* %0)
ret float %2
}
void fc136(int n) {
a : {
  typedef int(*b)[n];
  {
    typedef int(*c)[n];
    0;
  }
  {
    typedef int(*d)[n];
    0;
  };
  typedef int(*e)[n];
  0;
};
  {
    typedef int(*f)[n];
    goto a;
    {
      typedef int(*g)[n];
      0;
    };
    {
      typedef int(*h)[n];
      0;
    };
    ;
    typedef int(*i)[n];
    0;
  };
  ;
  typedef int(*j)[n];
  0;
}


x86 assembly (clang, -O0):
<fc136>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
jmp    1107 <fc136+0x7>

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

LLVM IR (-O0):
define void @fc136(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %3, %1
%4 = load i32, i32* %2
%5 = zext i32 %4 to i64
%6 = load i32, i32* %2
%7 = zext i32 %6 to i64
%8 = load i32, i32* %2
%9 = zext i32 %8 to i64
%10 = load i32, i32* %2
%11 = zext i32 %10 to i64
%12 = load i32, i32* %2
%13 = zext i32 %12 to i64
br label %3
14: ; No predecessors!
%15 = load i32, i32* %2
%16 = zext i32 %15 to i64
%17 = load i32, i32* %2
%18 = zext i32 %17 to i64
%19 = load i32, i32* %2
%20 = zext i32 %19 to i64
%21 = load i32, i32* %2
%22 = zext i32 %21 to i64
ret void
}

LLVM IR (-O2):
define void @fc136(i32 %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ __print_float(float);
int /*<<< orphan*/ __print_int(int);
int main() {
  int *a;
  int b;
  int c;
  float *d;
  float e;
  a = &b;
  b = 7;
  __print_int(*a);
  c = 10;
  a = &c;
  __print_int(*a);
  d = &e;
  e = 56.34;
  __print_float(*d);
  __print_float(*&e);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x14(%rbp),%rax
mov    %rax,-0x10(%rbp)
movl   $0x7,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
call   1040 <__print_int@plt>
movl   $0xa,-0x18(%rbp)
lea    -0x18(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
call   1040 <__print_int@plt>
lea    -0x24(%rbp),%rax
mov    %rax,-0x20(%rbp)
movss  0xe8d(%rip),%xmm0
movss  %xmm0,-0x24(%rbp)
mov    -0x20(%rbp),%rax
movss  (%rax),%xmm0
call   1030 <__print_float@plt>
movss  -0x24(%rbp),%xmm0
call   1030 <__print_float@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x7,%edi
call   1040 <__print_int@plt>
mov    $0xa,%edi
call   1040 <__print_int@plt>
movss  0xec3(%rip),%xmm0
call   1030 <__print_float@plt>
movss  0xeb6(%rip),%xmm0
call   1030 <__print_float@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 float*
%6 = alloca float
store i32 0, i32* %1
store i32* %3, i32** %2
store i32 7, i32* %3
%7 = load i32*, i32** %2
%8 = load i32, i32* %7
%9 = call i32 @__print_int(i32 %8)
store i32 10, i32* %4
store i32* %4, i32** %2
%10 = load i32*, i32** %2
%11 = load i32, i32* %10
%12 = call i32 @__print_int(i32 %11)
store float* %6, float** %5
store float 0x404C2B8520000000, float* %6
%13 = load float*, float** %5
%14 = load float, float* %13
%15 = call i32 @__print_float(float %14)
%16 = load float, float* %6
%17 = call i32 @__print_float(float %16)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @__print_int(i32 7)
%2 = tail call i32 @__print_int(i32 10)
%3 = tail call i32 @__print_float(float 0x404C2B8520000000)
%4 = tail call i32 @__print_float(float 0x404C2B8520000000)
ret i32 0
}
/* Variables and functions */
int ds_get_boolean(int /*<<< orphan*/, int);
int snmp_get_full_objid(void) { return ds_get_boolean(0, 4); }


x86 assembly (clang, -O0):
<snmp_get_full_objid>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
mov    $0x4,%esi
call   1030 <ds_get_boolean@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<snmp_get_full_objid>:
xor    %edi,%edi
mov    $0x4,%esi
jmp    1030 <ds_get_boolean@plt>

LLVM IR (-O0):
define i32 @snmp_get_full_objid() {
%1 = call i32 @ds_get_boolean(i32 0, i32 4)
ret i32 %1
}

LLVM IR (-O2):
define i32 @snmp_get_full_objid() {
%1 = tail call i32 @ds_get_boolean(i32 0, i32 4)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ sched_yield();
void uhi_thread_yield(void) { sched_yield(); }


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

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

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

LLVM IR (-O2):
define void @uhi_thread_yield() {
%1 = tail call i32 (...) @sched_yield()
ret void
}
/* Variables and functions */
float pow(int, int);
float ExponentialEaseIn(float p) {
  return (p == 0.0) ? p : pow(2, 10 * (p - 1));
}


x86 assembly (clang, -O0):
<ExponentialEaseIn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1148 <ExponentialEaseIn+0x38>
jp     1148 <ExponentialEaseIn+0x38>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    1178 <ExponentialEaseIn+0x68>
movss  -0x4(%rbp),%xmm1
movss  0xeaf(%rip),%xmm0
subss  %xmm0,%xmm1
movss  0xe9f(%rip),%xmm0
mulss  %xmm1,%xmm0
cvttss2si %xmm0,%esi
mov    $0x2,%edi
call   1030 <pow@plt>
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ExponentialEaseIn>:
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    111b <ExponentialEaseIn+0xb>
jp     111b <ExponentialEaseIn+0xb>
ret
addss  0xedd(%rip),%xmm0
mulss  0xed9(%rip),%xmm0
cvttss2si %xmm0,%esi
mov    $0x2,%edi
jmp    1030 <pow@plt>

LLVM IR (-O0):
define float @ExponentialEaseIn(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = fcmp oeq double %4, 0.000000e+00
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = load float, float* %2
br label %14
8: ; preds = %1
%9 = load float, float* %2
%10 = fsub float %9, 1.000000e+00
%11 = fmul float 1.000000e+01, %10
%12 = fptosi float %11 to i32
%13 = call float @pow(i32 2, i32 %12)
br label %14
14: ; preds = %8, %6
%15 = phi float [ %7, %6 ], [ %13, %8 ]
ret float %15
}

LLVM IR (-O2):
define float @ExponentialEaseIn(float %0) {
%2 = fcmp oeq float %0, 0.000000e+00
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = fadd float %0, -1.000000e+00
%5 = fmul float %4, 1.000000e+01
%6 = fptosi float %5 to i32
%7 = tail call float @pow(i32 2, i32 %6)
br label %8
8: ; preds = %1, %3
%9 = phi float [ %7, %3 ], [ %0, %1 ]
ret float %9
}
/* Type definitions */
struct dict {
  int dummy;
};

/* Variables and functions */
int dictGenericDelete(struct dict *, void const *, int /*<<< orphan*/);
int dictDelete(struct dict *ht, const void *key) {
  return dictGenericDelete(ht, key, 0);
}


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

x86 assembly (clang, -O2):
<dictDelete>:
xor    %edx,%edx
jmp    1030 <dictGenericDelete@plt>

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

LLVM IR (-O2):
%struct.dict = type { i32 }
define i32 @dictDelete(%struct.dict* %0, i8* %1) {
%3 = tail call i32 @dictGenericDelete(%struct.dict* %0, i8* %1, i32 0)
ret i32 %3
}
unsigned short floor_log2_s_loop(register unsigned short x) {
  unsigned short result = 0;
  x = x >> 1;
  while (x != 0) {
    result++;
    x = x >> 1;
  }
  return result;
}


x86 assembly (clang, -O0):
<floor_log2_s_loop>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movw   $0x0,-0x4(%rbp)
movzwl -0x2(%rbp),%eax
sar    $0x1,%eax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
cmp    $0x0,%eax
je     1145 <floor_log2_s_loop+0x45>
mov    -0x4(%rbp),%ax
add    $0x1,%ax
mov    %ax,-0x4(%rbp)
movzwl -0x2(%rbp),%eax
sar    $0x1,%eax
mov    %ax,-0x2(%rbp)
jmp    111c <floor_log2_s_loop+0x1c>
movzwl -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<floor_log2_s_loop>:
xor    %eax,%eax
cmp    $0x2,%di
jb     1120 <floor_log2_s_loop+0x20>
nopl   0x0(%rax,%rax,1)
movzwl %di,%ecx
mov    %ecx,%edi
shr    %edi
add    $0x1,%eax
cmp    $0x3,%cx
ja     1110 <floor_log2_s_loop+0x10>
ret

LLVM IR (-O0):
define zeroext i16 @floor_log2_s_loop(i16 zeroext %0) {
%2 = alloca i16
%3 = alloca i16
store i16 %0, i16* %2
store i16 0, i16* %3
%4 = load i16, i16* %2
%5 = zext i16 %4 to i32
%6 = ashr i32 %5, 1
%7 = trunc i32 %6 to i16
store i16 %7, i16* %2
br label %8
8: ; preds = %12, %1
%9 = load i16, i16* %2
%10 = zext i16 %9 to i32
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %19
12: ; preds = %8
%13 = load i16, i16* %3
%14 = add i16 %13, 1
store i16 %14, i16* %3
%15 = load i16, i16* %2
%16 = zext i16 %15 to i32
%17 = ashr i32 %16, 1
%18 = trunc i32 %17 to i16
store i16 %18, i16* %2
br label %8
19: ; preds = %8
%20 = load i16, i16* %3
ret i16 %20
}

LLVM IR (-O2):
define zeroext i16 @floor_log2_s_loop(i16 zeroext %0) {
%2 = icmp ult i16 %0, 2
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i16 [ %7, %3 ], [ 0, %1 ]
%5 = phi i16 [ %6, %3 ], [ %0, %1 ]
%6 = lshr i16 %5, 1
%7 = add nuw nsw i16 %4, 1
%8 = icmp ult i16 %5, 4
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi i16 [ 0, %1 ], [ %7, %3 ]
ret i16 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
void write_reg16(volatile uint16_t *reg, uint16_t val) {
  (*((volatile uint32_t *)(reg))) = val;
}


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

x86 assembly (clang, -O2):
<write_reg16>:
mov    %esi,(%rdi)
ret

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

LLVM IR (-O2):
define void @write_reg16(i32* %0, i32 %1) {
store volatile i32 %1, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int const, int const);
void assert_int_equals(const int val1, const int val2) {
  if (val1 == val2)
    printf("\033[00;32mOK: Asserting that %d equals %d\033[00m\n", val1, val2);
  else
    printf("\033[31mKO: Asserting that %d equals %d\033[00m\n", val1, val2);
}


x86 assembly (clang, -O0):
<assert_int_equals>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    1141 <assert_int_equals+0x31>
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
jmp    1153 <assert_int_equals+0x43>
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xee0(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<assert_int_equals>:
mov    %esi,%edx
mov    %edi,%esi
cmp    %edx,%edi
jne    1126 <assert_int_equals+0x16>
lea    0xee1(%rip),%rdi
mov    %esi,%edx
jmp    1030 <printf@plt>
lea    0xf01(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [46 x i8] c"\1B[00;32mOK: Asserting that %d equals %d\1B[00m\0A\00"
@.str.1 = [43 x i8] c"\1B[31mKO: Asserting that %d equals %d\1B[00m\0A\00"
define void @assert_int_equals(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 %12
8: ; preds = %2
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %10)
br label %16
12: ; preds = %2
%13 = load i32, i32* %3
%14 = load i32, i32* %4
%15 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0), i32 %13, i32 %14)
br label %16
16: ; preds = %12, %8
ret void
}

LLVM IR (-O2):
@.str = [46 x i8] c"\1B[00;32mOK: Asserting that %d equals %d\1B[00m\0A\00"
@.str.1 = [43 x i8] c"\1B[31mKO: Asserting that %d equals %d\1B[00m\0A\00"
define void @assert_int_equals(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, %1
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %0)
br label %8
6: ; preds = %2
%7 = tail call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0), i32 %0, i32 %1)
br label %8
8: ; preds = %6, %4
ret void
}
int main() {
  int x = 1 << -1;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %eax,-0x8(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int EINVAL;
__attribute__((visibility("default"))) int
sd_bus_creds_get_cgroup(void *c, const char **ret) {
  return -EINVAL;
}


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

x86 assembly (clang, -O2):
<sd_bus_creds_get_cgroup>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@EINVAL = global i32 0
define i32 @sd_bus_creds_get_cgroup(i8* %0, i8** %1) {
%3 = alloca i8*
%4 = alloca i8**
store i8* %0, i8** %3
store i8** %1, i8*** %4
%5 = load i32, i32* @EINVAL
%6 = sub nsw i32 0, %5
ret i32 %6
}

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @sd_bus_creds_get_cgroup(i8* nocapture readnone %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @EINVAL
%4 = sub nsw i32 0, %3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ myprintf(char *, char const *);
int print(const char *file_name) {
  myprintf("%s\n", file_name);
  return 1;
}


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @print(i8* %0) {
%2 = tail call i32 @myprintf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 1
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
uint64_t mix64(uint64_t x) {
  x = (x ^ (x >> 30)) * (uint64_t)(0xbf58476d1ce4e5b9);
  x = (x ^ (x >> 27)) * (uint64_t)(0x94d049bb133111eb);
  x = x ^ (x >> 31);
  return x;
}


x86 assembly (clang, -O0):
<mix64>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
sar    $0x1e,%ecx
xor    %ecx,%eax
imul   $0x1ce4e5b9,%eax,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
sar    $0x1b,%ecx
xor    %ecx,%eax
imul   $0x133111eb,%eax,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
sar    $0x1f,%ecx
xor    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mix64>:
mov    %edi,%eax
sar    $0x1e,%eax
xor    %edi,%eax
imul   $0x1ce4e5b9,%eax,%eax
mov    %eax,%ecx
sar    $0x1b,%ecx
xor    %eax,%ecx
imul   $0x133111eb,%ecx,%ecx
mov    %ecx,%eax
sar    $0x1f,%eax
xor    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @mix64(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = ashr i32 %4, 30
%6 = xor i32 %3, %5
%7 = mul nsw i32 %6, 484763065
store i32 %7, i32* %2
%8 = load i32, i32* %2
%9 = load i32, i32* %2
%10 = ashr i32 %9, 27
%11 = xor i32 %8, %10
%12 = mul nsw i32 %11, 321982955
store i32 %12, i32* %2
%13 = load i32, i32* %2
%14 = load i32, i32* %2
%15 = ashr i32 %14, 31
%16 = xor i32 %13, %15
store i32 %16, i32* %2
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
define i32 @mix64(i32 %0) {
%2 = ashr i32 %0, 30
%3 = xor i32 %2, %0
%4 = mul nsw i32 %3, 484763065
%5 = ashr i32 %4, 27
%6 = xor i32 %5, %4
%7 = mul nsw i32 %6, 321982955
%8 = ashr i32 %7, 31
%9 = xor i32 %8, %7
ret i32 %9
}
float max3(float a, float b, float c) {
  float ret = a;
  if (b > a)
    ret = b;
  if (c > a)
    ret = c;
  return ret;
}


x86 assembly (clang, -O0):
<max3>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x8(%rbp),%xmm0
ucomiss -0x4(%rbp),%xmm0
jbe    1136 <max3+0x36>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0xc(%rbp),%xmm0
ucomiss -0x4(%rbp),%xmm0
jbe    114f <max3+0x4f>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<max3>:
maxss  %xmm0,%xmm1
cmpltss %xmm2,%xmm0
movaps %xmm0,%xmm3
andnps %xmm1,%xmm3
andps  %xmm2,%xmm0
orps   %xmm3,%xmm0
ret

LLVM IR (-O0):
define float @max3(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%8 = load float, float* %4
store float %8, float* %7
%9 = load float, float* %5
%10 = load float, float* %4
%11 = fcmp ogt float %9, %10
br i1 %11, label %12, label %14
12: ; preds = %3
%13 = load float, float* %5
store float %13, float* %7
br label %14
14: ; preds = %12, %3
%15 = load float, float* %6
%16 = load float, float* %4
%17 = fcmp ogt float %15, %16
br i1 %17, label %18, label %20
18: ; preds = %14
%19 = load float, float* %6
store float %19, float* %7
br label %20
20: ; preds = %18, %14
%21 = load float, float* %7
ret float %21
}

LLVM IR (-O2):
define float @max3(float %0, float %1, float %2) {
%4 = fcmp ogt float %1, %0
%5 = select i1 %4, float %1, float %0
%6 = fcmp ogt float %2, %0
%7 = select i1 %6, float %2, float %5
ret float %7
}
/* Variables and functions */
char *U_EMR_CORE5(int);
char *U_EMRABORTPATH_set(void) { return (U_EMR_CORE5(68)); }


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

x86 assembly (clang, -O2):
<U_EMRABORTPATH_set>:
mov    $0x44,%edi
jmp    1030 <U_EMR_CORE5@plt>

LLVM IR (-O0):
define i8* @U_EMRABORTPATH_set() {
%1 = call i8* @U_EMR_CORE5(i32 68)
ret i8* %1
}

LLVM IR (-O2):
define i8* @U_EMRABORTPATH_set() {
%1 = tail call i8* @U_EMR_CORE5(i32 68)
ret i8* %1
}
void checkCoders() {}


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

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

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

LLVM IR (-O2):
define void @checkCoders() {
ret void
}
__attribute__((always_)) void kmemcheck_mark_unallocated(void *address,
                                                         unsigned int n) {}


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

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

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

LLVM IR (-O2):
define void @kmemcheck_mark_unallocated(i8* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
void cs_free_ctrl_sock(int fd) { close(fd); }


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

x86 assembly (clang, -O2):
<cs_free_ctrl_sock>:
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define void @cs_free_ctrl_sock(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int rmdir(char *);
int main(int argc, char *argv[]) {
  int ret;
  if (argc != 2) {
    printf("rmdir: requires one argument\n");
    exit(0);
  }
  ret = rmdir(argv[1]);
  printf("rmdir returns %d\n", ret);
  exit(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)
cmpl   $0x2,-0x8(%rbp)
je     1165 <main+0x35>
lea    0xea9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %edi,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <rmdir@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xe9f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x2,%edi
jne    1166 <main+0x26>
mov    0x8(%rsi),%rdi
call   1040 <rmdir@plt>
lea    0xeaa(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %edi,%edi
call   1060 <exit@plt>
lea    0xea5(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [30 x i8] c"rmdir: requires one argument\0A\00"
@.str.1 = [18 x i8] c"rmdir returns %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = icmp ne i32 %7, 2
br i1 %8, label %9, label %12
9: ; preds = %2
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @exit(i32 0)
unreachable
12: ; preds = %2
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 1
%15 = load i8*, i8** %14
%16 = call i32 @rmdir(i8* %15)
store i32 %16, i32* %6
%17 = load i32, i32* %6
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 %17)
%19 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str.1 = [18 x i8] c"rmdir returns %d\0A\00"
@str = [29 x i8] c"rmdir: requires one argument\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 @exit(i32 0)
unreachable
7: ; preds = %2
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
%10 = tail call i32 @rmdir(i8* %9)
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 %10)
%12 = tail call i32 @exit(i32 0)
unreachable
}
int return_1() { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @return_1() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ assert(size_t *);
scalar_t__ malloc(int);
int /*<<< orphan*/ memset(size_t *, int /*<<< orphan*/, int);
size_t *stvector(int n) {
  size_t *vec = (size_t *)malloc(sizeof(size_t) * n);
  assert(vec);
  memset(vec, 0, n * sizeof(size_t));
  return vec;
}


x86 assembly (clang, -O0):
<stvector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <assert@plt>
mov    -0x10(%rbp),%rdi
movslq -0x4(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stvector>:
push   %rbp
push   %rbx
push   %rax
lea    0x0(,%rdi,8),%ebp
mov    %ebp,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <assert@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    %ebp,%edx
call   1030 <memset@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i64* @stvector(i32 %0) {
%2 = alloca i32
%3 = alloca i64*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = sext i32 %4 to i64
%6 = mul i64 8, %5
%7 = trunc i64 %6 to i32
%8 = call i64 @malloc(i32 %7)
%9 = inttoptr i64 %8 to i64*
store i64* %9, i64** %3
%10 = load i64*, i64** %3
%11 = call i32 @assert(i64* %10)
%12 = load i64*, i64** %3
%13 = load i32, i32* %2
%14 = sext i32 %13 to i64
%15 = mul i64 %14, 8
%16 = trunc i64 %15 to i32
%17 = call i32 @memset(i64* %12, i32 0, i32 %16)
%18 = load i64*, i64** %3
ret i64* %18
}

LLVM IR (-O2):
define i64* @stvector(i32 %0) {
%2 = shl i32 %0, 3
%3 = tail call i64 @malloc(i32 %2)
%4 = inttoptr i64 %3 to i64*
%5 = tail call i32 @assert(i64* %4)
%6 = tail call i32 @memset(i64* %4, i32 0, i32 %2)
ret i64* %4
}
/* Variables and functions */
short foo5(int);
__attribute__((no)) short int bar5(int x) { return foo5(x + 6); }


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

x86 assembly (clang, -O2):
<bar5>:
add    $0x6,%edi
jmp    1030 <foo5@plt>

LLVM IR (-O0):
define signext i16 @bar5(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 6
%5 = call signext i16 @foo5(i32 %4)
ret i16 %5
}

LLVM IR (-O2):
define signext i16 @bar5(i32 %0) {
%2 = add nsw i32 %0, 6
%3 = tail call signext i16 @foo5(i32 %2)
ret i16 %3
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
int /*<<< orphan*/ SysCtlDelay(int);
void LCDClockReset(uint32_t ui32Base, uint32_t ui32Clocks) {
  ASSERT(ui32Base == 0x44050000);
  ASSERT(!(ui32Clocks & ~(0x00000008 | 0x00000002 | 0x00000004 | 0x00000001)));
  (*((volatile uint32_t *)(0x44050000 + 0x70))) = ui32Clocks;
  SysCtlDelay(10);
  (*((volatile uint32_t *)(0x44050000 + 0x70))) = 0x00000000;
  SysCtlDelay(10);
}


x86 assembly (clang, -O0):
<LCDClockReset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x44050000,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <ASSERT@plt>
mov    -0x8(%rbp),%eax
and    $0xfffffff0,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <ASSERT@plt>
mov    -0x8(%rbp),%ecx
mov    $0x44050070,%eax
mov    %ecx,(%rax)
mov    $0xa,%edi
call   1030 <SysCtlDelay@plt>
mov    $0x44050070,%eax
movl   $0x0,(%rax)
mov    $0xa,%edi
call   1030 <SysCtlDelay@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LCDClockReset>:
push   %rbx
mov    %esi,%ebx
xor    %eax,%eax
cmp    $0x44050000,%edi
sete   %al
mov    %eax,%edi
call   1040 <ASSERT@plt>
xor    %edi,%edi
cmp    $0x10,%ebx
setb   %dil
call   1040 <ASSERT@plt>
mov    %ebx,0x44050070
mov    $0xa,%edi
call   1030 <SysCtlDelay@plt>
movl   $0x0,0x44050070
mov    $0xa,%edi
pop    %rbx
jmp    1030 <SysCtlDelay@plt>

LLVM IR (-O0):
define void @LCDClockReset(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 = icmp eq i32 %5, 1141178368
%7 = zext i1 %6 to i32
%8 = call i32 @ASSERT(i32 %7)
%9 = load i32, i32* %4
%10 = and i32 %9, -16
%11 = icmp ne i32 %10, 0
%12 = xor i1 %11, true
%13 = zext i1 %12 to i32
%14 = call i32 @ASSERT(i32 %13)
%15 = load i32, i32* %4
store volatile i32 %15, i32* inttoptr (i64 1141178480 to i32*)
%16 = call i32 @SysCtlDelay(i32 10)
store volatile i32 0, i32* inttoptr (i64 1141178480 to i32*)
%17 = call i32 @SysCtlDelay(i32 10)
ret void
}

LLVM IR (-O2):
define void @LCDClockReset(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 1141178368
%4 = zext i1 %3 to i32
%5 = tail call i32 @ASSERT(i32 %4)
%6 = icmp ult i32 %1, 16
%7 = zext i1 %6 to i32
%8 = tail call i32 @ASSERT(i32 %7)
store volatile i32 %1, i32* inttoptr (i64 1141178480 to i32*)
%9 = tail call i32 @SysCtlDelay(i32 10)
store volatile i32 0, i32* inttoptr (i64 1141178480 to i32*)
%10 = tail call i32 @SysCtlDelay(i32 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) { printf("Vida longa e próspera!\n"); }


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

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

LLVM IR (-O0):
@.str = [25 x i8] c"Vida longa e pr\C3\B3spera!\0A\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [24 x i8] c"Vida longa e pr\C3\B3spera!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
ret i32 0
}
char *GetPhyMode(int Mode) {
  switch (Mode) {
  case 0:
    return "CCK";
  case 1:
    return "OFDM";
  case 2:
    return "HTMIX";
  case 3:
    return "GREEN";
  default:
    return "N/A";
  }
}


x86 assembly (clang, -O0):
<GetPhyMode>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %rax,-0x18(%rbp)
sub    $0x3,%rax
ja     116c <GetPhyMode+0x6c>
mov    -0x18(%rbp),%rax
lea    0xedd(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xedd(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1177 <GetPhyMode+0x77>
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1177 <GetPhyMode+0x77>
lea    0xec6(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1177 <GetPhyMode+0x77>
lea    0xebc(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1177 <GetPhyMode+0x77>
lea    0xeb2(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetPhyMode>:
cmp    $0x3,%edi
ja     1117 <GetPhyMode+0x17>
movslq %edi,%rax
lea    0xf0d(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
ret
lea    0xef7(%rip),%rax
ret

LLVM IR (-O0):
@.str = [4 x i8] c"CCK\00"
@.str.1 = [5 x i8] c"OFDM\00"
@.str.2 = [6 x i8] c"HTMIX\00"
@.str.3 = [6 x i8] c"GREEN\00"
@.str.4 = [4 x i8] c"N/A\00"
define i8* @GetPhyMode(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %9 [
i32 0, label %5
i32 1, label %6
i32 2, label %7
i32 3, label %8
]
5: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %2
br label %10
6: ; preds = %1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %10
7: ; preds = %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %10
8: ; preds = %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %10
9: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8** %2
br label %10
10: ; preds = %9, %8, %7, %6, %5
%11 = load i8*, i8** %2
ret i8* %11
}

LLVM IR (-O2):
@.str = [4 x i8] c"CCK\00"
@.str.1 = [5 x i8] c"OFDM\00"
@.str.2 = [6 x i8] c"HTMIX\00"
@.str.3 = [6 x i8] c"GREEN\00"
@.str.4 = [4 x i8] c"N/A\00"
@reltable.GetPhyMode = [4 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @.str to i64), i64 ptrtoint ([4 x i32]* @reltable.GetPhyMode to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @.str.1 to i64), i64 ptrtoint ([4 x i32]* @reltable.GetPhyMode to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @.str.2 to i64), i64 ptrtoint ([4 x i32]* @reltable.GetPhyMode to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @.str.3 to i64), i64 ptrtoint ([4 x i32]* @reltable.GetPhyMode to i64)) to i32)]
define i8* @GetPhyMode(i32 %0) {
%2 = icmp ult i32 %0, 4
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = sext i32 %0 to i64
%5 = shl i64 %4, 2
%6 = call i8* @llvm.load.relative.i64(i8* bitcast ([4 x i32]* @reltable.GetPhyMode to i8*), i64 %5)
br label %7
7: ; preds = %1, %3
%8 = phi i8* [ %6, %3 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), %1 ]
ret i8* %8
}
void free_vector(v, n) float *v;
int n;
{ free((char *)(v + 1)); }


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

x86 assembly (clang, -O2):
<free_vector>:
add    $0x4,%rdi
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @free_vector(float* %0, i32 %1) {
%3 = alloca float*
%4 = alloca i32
store float* %0, float** %3
store i32 %1, i32* %4
%5 = load float*, float** %3
%6 = getelementptr inbounds float, float* %5, i64 1
%7 = bitcast float* %6 to i8*
ret void
}

LLVM IR (-O2):
define void @free_vector(float* nocapture %0, i32 %1) {
%3 = getelementptr inbounds float, float* %0, i64 1
%4 = bitcast float* %3 to i8*
tail call void @free(i8* %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ draw_line();
int closepl(void) {
  draw_line();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @closepl() {
%1 = tail call i32 (...) @draw_line()
ret i32 0
}
void P_programclose() {}


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

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

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

LLVM IR (-O2):
define void @P_programclose() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ popNarray(char *, unsigned int);
void popcomplex4array_(char *x, unsigned int *n) { popNarray(x, (*n * 4)); }


x86 assembly (clang, -O0):
<popcomplex4array_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
shl    $0x2,%esi
call   1030 <popNarray@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<popcomplex4array_>:
mov    (%rsi),%esi
shl    $0x2,%esi
jmp    1030 <popNarray@plt>

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

LLVM IR (-O2):
define void @popcomplex4array_(i8* %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = shl i32 %3, 2
%5 = tail call i32 @popNarray(i8* %0, i32 %4)
ret void
}
void __dns_ctors_init(void) {}


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

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

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

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