xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ xfree(void *);
void db_free_data(void *data) {
  if (data)
    xfree(data);
}


x86 assembly (clang, -O0):
<db_free_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <db_free_data+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <xfree@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<db_free_data>:
test   %rdi,%rdi
je     111a <db_free_data+0xa>
jmp    1030 <xfree@plt>
ret

LLVM IR (-O0):
define void @db_free_data(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i32 @xfree(i8* %6)
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @db_free_data(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @xfree(i8* %0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ new_lines_mark(char *, int /*<<< orphan*/);
void new_lines(char *line) { new_lines_mark(line, 0); }


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

x86 assembly (clang, -O2):
<new_lines>:
xor    %esi,%esi
jmp    1030 <new_lines_mark@plt>

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

LLVM IR (-O2):
define void @new_lines(i8* %0) {
%2 = tail call i32 @new_lines_mark(i8* %0, i32 0)
ret void
}
sleep(secs) int secs;
{
  sendtimer(secs * 1000000);
  waittimer();
}


x86 assembly (clang, -O0):
<sleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
imul   $0xf4240,-0x8(%rbp),%edi
mov    $0x0,%al
call   1040 <sendtimer@plt>
mov    $0x0,%al
call   1030 <waittimer@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sleep>:
push   %rax
imul   $0xf4240,%edi,%edi
xor    %eax,%eax
call   1040 <sendtimer@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <waittimer@plt>

LLVM IR (-O0):
define i32 @sleep(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = mul nsw i32 %4, 1000000
%6 = call i32 (i32, ...) bitcast (i32 (...)* @sendtimer to i32 (i32, ...)*)(i32 %5)
%7 = call i32 (...) @waittimer()
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
define i32 @sleep(i32 %0) {
%2 = mul nsw i32 %0, 1000000
%3 = tail call i32 (i32, ...) bitcast (i32 (...)* @sendtimer to i32 (i32, ...)*)(i32 %2)
%4 = tail call i32 (...) @waittimer()
ret i32 undef
}
/* Variables and functions */
int f0(int, int);
int f0_Skel(int *argTypes, void **args) {
  *(int *)args[0] = f0(*(int *)args[1], *(int *)args[2]);
  return 0;
}


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

x86 assembly (clang, -O2):
<f0_Skel>:
push   %rbx
mov    %rsi,%rbx
mov    0x8(%rsi),%rax
mov    0x10(%rsi),%rcx
mov    (%rax),%edi
mov    (%rcx),%esi
call   1030 <f0@plt>
mov    (%rbx),%rcx
mov    %eax,(%rcx)
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @f0_Skel(i32* %0, i8** %1) {
%3 = alloca i32*
%4 = alloca i8**
store i32* %0, i32** %3
store i8** %1, i8*** %4
%5 = load i8**, i8*** %4
%6 = getelementptr inbounds i8*, i8** %5, i64 1
%7 = load i8*, i8** %6
%8 = bitcast i8* %7 to i32*
%9 = load i32, i32* %8
%10 = load i8**, i8*** %4
%11 = getelementptr inbounds i8*, i8** %10, i64 2
%12 = load i8*, i8** %11
%13 = bitcast i8* %12 to i32*
%14 = load i32, i32* %13
%15 = call i32 @f0(i32 %9, i32 %14)
%16 = load i8**, i8*** %4
%17 = getelementptr inbounds i8*, i8** %16, i64 0
%18 = load i8*, i8** %17
%19 = bitcast i8* %18 to i32*
store i32 %15, i32* %19
ret i32 0
}

LLVM IR (-O2):
define i32 @f0_Skel(i32* nocapture readnone %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = bitcast i8** %3 to i32**
%5 = load i32*, i32** %4
%6 = load i32, i32* %5
%7 = getelementptr inbounds i8*, i8** %1, i64 2
%8 = bitcast i8** %7 to i32**
%9 = load i32*, i32** %8
%10 = load i32, i32* %9
%11 = tail call i32 @f0(i32 %6, i32 %10)
%12 = bitcast i8** %1 to i32**
%13 = load i32*, i32** %12
store i32 %11, i32* %13
ret i32 0
}
/* Variables and functions */
float _lerp(float, float, float);
float _bilinear_interpolate(float ll, float lr, float rl, float rr,
                            float lambda1, float lambda2) {
  float il = _lerp(ll, rl, lambda1);
  float ir = _lerp(lr, rr, lambda1);
  return _lerp(il, ir, lambda2);
}


x86 assembly (clang, -O0):
<_bilinear_interpolate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  %xmm4,-0x14(%rbp)
movss  %xmm5,-0x18(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
movss  -0x14(%rbp),%xmm2
call   1030 <_lerp@plt>
movss  %xmm0,-0x1c(%rbp)
movss  -0x8(%rbp),%xmm0
movss  -0x10(%rbp),%xmm1
movss  -0x14(%rbp),%xmm2
call   1030 <_lerp@plt>
movss  %xmm0,-0x20(%rbp)
movss  -0x1c(%rbp),%xmm0
movss  -0x20(%rbp),%xmm1
movss  -0x18(%rbp),%xmm2
call   1030 <_lerp@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_bilinear_interpolate>:
sub    $0x18,%rsp
movss  %xmm5,0x14(%rsp)
movss  %xmm4,0x4(%rsp)
movss  %xmm3,0x10(%rsp)
movss  %xmm1,0xc(%rsp)
movaps %xmm2,%xmm1
movaps %xmm4,%xmm2
call   1030 <_lerp@plt>
movss  %xmm0,0x8(%rsp)
movss  0xc(%rsp),%xmm0
movss  0x10(%rsp),%xmm1
movss  0x4(%rsp),%xmm2
call   1030 <_lerp@plt>
movaps %xmm0,%xmm1
movss  0x8(%rsp),%xmm0
movss  0x14(%rsp),%xmm2
add    $0x18,%rsp
jmp    1030 <_lerp@plt>

LLVM IR (-O0):
define float @_bilinear_interpolate(float %0, float %1, float %2, float %3, float %4, float %5) {
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = alloca float
%12 = alloca float
%13 = alloca float
%14 = alloca float
store float %0, float* %7
store float %1, float* %8
store float %2, float* %9
store float %3, float* %10
store float %4, float* %11
store float %5, float* %12
%15 = load float, float* %7
%16 = load float, float* %9
%17 = load float, float* %11
%18 = call float @_lerp(float %15, float %16, float %17)
store float %18, float* %13
%19 = load float, float* %8
%20 = load float, float* %10
%21 = load float, float* %11
%22 = call float @_lerp(float %19, float %20, float %21)
store float %22, float* %14
%23 = load float, float* %13
%24 = load float, float* %14
%25 = load float, float* %12
%26 = call float @_lerp(float %23, float %24, float %25)
ret float %26
}

LLVM IR (-O2):
define float @_bilinear_interpolate(float %0, float %1, float %2, float %3, float %4, float %5) {
%7 = tail call float @_lerp(float %0, float %2, float %4)
%8 = tail call float @_lerp(float %1, float %3, float %4)
%9 = tail call float @_lerp(float %7, float %8, float %5)
ret float %9
}
void LCDWin(void) {}


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

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

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

LLVM IR (-O2):
define void @LCDWin() {
ret void
}
/* Variables and functions */
double weibullhrf(double, int, int, int /*<<< orphan*/);
double overheat(double age) { return weibullhrf(age, 55, 4, 0); }


x86 assembly (clang, -O0):
<overheat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    $0x37,%edi
mov    $0x4,%esi
xor    %edx,%edx
call   1030 <weibullhrf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<overheat>:
mov    $0x37,%edi
mov    $0x4,%esi
xor    %edx,%edx
jmp    1030 <weibullhrf@plt>

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

LLVM IR (-O2):
define double @overheat(double %0) {
%2 = tail call double @weibullhrf(double %0, i32 55, i32 4, i32 0)
ret double %2
}
void swap_int(int *const a, int *const b) {
  if (a != b) {
    register int tmp = *a;
    *a = *b;
    *b = tmp;
  }
}


x86 assembly (clang, -O0):
<swap_int>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
je     1138 <swap_int+0x38>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap_int>:
cmp    %rsi,%rdi
je     110d <swap_int+0xd>
mov    (%rdi),%eax
mov    (%rsi),%ecx
mov    %ecx,(%rdi)
mov    %eax,(%rsi)
ret

LLVM IR (-O0):
define void @swap_int(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 = load i32*, i32** %4
%8 = icmp ne i32* %6, %7
br i1 %8, label %9, label %17
9: ; preds = %2
%10 = load i32*, i32** %3
%11 = load i32, i32* %10
store i32 %11, i32* %5
%12 = load i32*, i32** %4
%13 = load i32, i32* %12
%14 = load i32*, i32** %3
store i32 %13, i32* %14
%15 = load i32, i32* %5
%16 = load i32*, i32** %4
store i32 %15, i32* %16
br label %17
17: ; preds = %9, %2
ret void
}

LLVM IR (-O2):
define void @swap_int(i32* %0, i32* %1) {
%3 = icmp eq i32* %0, %1
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = load i32, i32* %0
%6 = load i32, i32* %1
store i32 %6, i32* %0
store i32 %5, i32* %1
br label %7
7: ; preds = %4, %2
ret void
}
/* Variables and functions */
int sscanf(char const *, char *, unsigned long *);
unsigned long s2u_long(const char *string) {
  unsigned long value;
  if (sscanf(string, "%lu", &value) < 1)
    return (0u);
  return (value);
}


x86 assembly (clang, -O0):
<s2u_long>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed9(%rip),%rsi
lea    -0x18(%rbp),%rdx
call   1030 <sscanf@plt>
cmp    $0x1,%eax
jge    1146 <s2u_long+0x36>
movq   $0x0,-0x8(%rbp)
jmp    114e <s2u_long+0x3e>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<s2u_long>:
push   %rax
lea    0xee8(%rip),%rsi
mov    %rsp,%rdx
call   1030 <sscanf@plt>
test   %eax,%eax
jle    112a <s2u_long+0x1a>
mov    (%rsp),%rax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%lu\00"
define i64 @s2u_long(i8* nocapture %0) {
%2 = alloca i64
%3 = bitcast i64* %2 to i8*
%4 = call i32 @sscanf(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64* %2)
%5 = icmp slt i32 %4, 1
%6 = load i64, i64* %2
%7 = select i1 %5, i64 0, i64 %6
ret i64 %7
}
float warp_max3f(float a, float b, float c) {
  return a > b ? (a > c ? a : b) : (b > c ? b : c);
}


x86 assembly (clang, -O0):
<warp_max3f>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    1159 <warp_max3f+0x59>
movss  -0x4(%rbp),%xmm0
ucomiss -0xc(%rbp),%xmm0
jbe    1140 <warp_max3f+0x40>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
jmp    114a <warp_max3f+0x4a>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    118b <warp_max3f+0x8b>
movss  -0x8(%rbp),%xmm0
ucomiss -0xc(%rbp),%xmm0
jbe    1177 <warp_max3f+0x77>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
jmp    1181 <warp_max3f+0x81>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x18(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define float @warp_max3f(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %4
%8 = load float, float* %5
%9 = fcmp ogt float %7, %8
br i1 %9, label %10, label %20
10: ; preds = %3
%11 = load float, float* %4
%12 = load float, float* %6
%13 = fcmp ogt float %11, %12
br i1 %13, label %14, label %16
14: ; preds = %10
%15 = load float, float* %4
br label %18
16: ; preds = %10
%17 = load float, float* %5
br label %18
18: ; preds = %16, %14
%19 = phi float [ %15, %14 ], [ %17, %16 ]
br label %30
20: ; preds = %3
%21 = load float, float* %5
%22 = load float, float* %6
%23 = fcmp ogt float %21, %22
br i1 %23, label %24, label %26
24: ; preds = %20
%25 = load float, float* %5
br label %28
26: ; preds = %20
%27 = load float, float* %6
br label %28
28: ; preds = %26, %24
%29 = phi float [ %25, %24 ], [ %27, %26 ]
br label %30
30: ; preds = %28, %18
%31 = phi float [ %19, %18 ], [ %29, %28 ]
ret float %31
}

LLVM IR (-O2):
define float @warp_max3f(float %0, float %1, float %2) {
%4 = fcmp ogt float %0, %1
%5 = fcmp ogt float %0, %2
%6 = select i1 %5, float %0, float %1
%7 = fcmp ogt float %1, %2
%8 = select i1 %7, float %1, float %2
%9 = select i1 %4, float %6, float %8
ret float %9
}
long grib_op_div(long a, long b) { return a / b; }


x86 assembly (clang, -O0):
<grib_op_div>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cqto
idivq  -0x10(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define i64 @grib_op_div(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 = sdiv i64 %5, %6
ret i64 %7
}

LLVM IR (-O2):
define i64 @grib_op_div(i64 %0, i64 %1) {
%3 = sdiv i64 %0, %1
ret i64 %3
}
unsigned int f(unsigned x) { return x * 2; }


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

x86 assembly (clang, -O2):
<f>:
lea    (%rdi,%rdi,1),%eax
ret

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

LLVM IR (-O2):
define i32 @f(i32 %0) {
%2 = shl i32 %0, 1
ret i32 %2
}
/* Type definitions */
struct Global {
  int dummy;
};

/* Variables and functions */
int get(struct Global *);
void skipnl(struct Global *global) {
  int c;
  do {
    c = get(global);
  } while (c != '\n' && c != 0);
  return;
}


x86 assembly (clang, -O0):
<skipnl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <get@plt>
mov    %eax,-0xc(%rbp)
xor    %eax,%eax
cmpl   $0xa,-0xc(%rbp)
mov    %al,-0xd(%rbp)
je     1141 <skipnl+0x31>
cmpl   $0x0,-0xc(%rbp)
setne  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    111c <skipnl+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skipnl>:
push   %rbx
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbx,%rdi
call   1030 <get@plt>
cmp    $0xa,%eax
je     1131 <skipnl+0x21>
test   %eax,%eax
jne    1120 <skipnl+0x10>
pop    %rbx
ret

LLVM IR (-O0):
%struct.Global = type { i32 }
define void @skipnl(%struct.Global* %0) {
%2 = alloca %struct.Global*
%3 = alloca i32
store %struct.Global* %0, %struct.Global** %2
br label %4
4: ; preds = %13, %1
%5 = load %struct.Global*, %struct.Global** %2
%6 = call i32 @get(%struct.Global* %5)
store i32 %6, i32* %3
br label %7
7: ; preds = %4
%8 = load i32, i32* %3
%9 = icmp ne i32 %8, 10
br i1 %9, label %10, label %13
10: ; preds = %7
%11 = load i32, i32* %3
%12 = icmp ne i32 %11, 0
br label %13
13: ; preds = %10, %7
%14 = phi i1 [ false, %7 ], [ %12, %10 ]
br i1 %14, label %4, label %15
15: ; preds = %13
ret void
}

LLVM IR (-O2):
%struct.Global = type { i32 }
define void @skipnl(%struct.Global* %0) {
br label %2
2: ; preds = %2, %1
%3 = tail call i32 @get(%struct.Global* %0)
switch i32 %3, label %2 [
i32 10, label %4
i32 0, label %4
]
4: ; preds = %2, %2
ret void
}
/* Variables and functions */
char *U_WMRCORENONE_set(char *);
char *U_WMR3E_set(void) { return U_WMRCORENONE_set("U_WMR3E"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"U_WMR3E\00"
define i8* @U_WMR3E_set() {
%1 = call i8* @U_WMRCORENONE_set(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMR3E\00"
define i8* @U_WMR3E_set() {
%1 = tail call i8* @U_WMRCORENONE_set(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *);
int /*<<< orphan*/ output_tab0(int /*<<< orphan*/ *, int);
void output_tab1(FILE *outptr, int level, char *tag) {
  output_tab0(outptr, level);
  fprintf(outptr, "%s", tag);
}


x86 assembly (clang, -O0):
<output_tab1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <output_tab0@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rdx
lea    0xeb2(%rip),%rsi
call   1040 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<output_tab1>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rdi,%rbx
call   1030 <output_tab0@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <fputs@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define void @output_tab1(i32* %0, i32 %1, i8* %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i8*
store i32* %0, i32** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i32*, i32** %4
%8 = load i32, i32* %5
%9 = call i32 @output_tab0(i32* %7, i32 %8)
%10 = load i32*, i32** %4
%11 = load i8*, i8** %6
%12 = call i32 @fprintf(i32* %10, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %11)
ret void
}

LLVM IR (-O2):
define void @output_tab1(i32* %0, i32 %1, i8* nocapture %2) {
%4 = tail call i32 @output_tab0(i32* %0, i32 %1)
%5 = tail call i32 @fputs(i8* %2, i32* %0)
ret void
}
/* Variables and functions */
scalar_t__ isdigit(char const);
unsigned int parse_unsigned_int(const char *str) {
  unsigned int value = 0;
  const char *p = str;
  while (isdigit(*p))
    value = value * 10 + (*p++ - '0');
  return value;
}


x86 assembly (clang, -O0):
<parse_unsigned_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     1164 <parse_unsigned_int+0x54>
imul   $0xa,-0xc(%rbp),%eax
mov    -0x18(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
movsbl (%rcx),%ecx
sub    $0x30,%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
jmp    112b <parse_unsigned_int+0x1b>
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_unsigned_int>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
movsbl (%rdi),%edi
call   1030 <isdigit@plt>
test   %rax,%rax
je     1153 <parse_unsigned_int+0x43>
add    $0x1,%rbx
xor    %r14d,%r14d
nopl   0x0(%rax,%rax,1)
lea    (%r14,%r14,4),%eax
movsbl -0x1(%rbx),%ecx
lea    (%rcx,%rax,2),%r14d
add    $0xffffffd0,%r14d
movsbl (%rbx),%edi
call   1030 <isdigit@plt>
add    $0x1,%rbx
test   %rax,%rax
jne    1130 <parse_unsigned_int+0x20>
jmp    1156 <parse_unsigned_int+0x46>
xor    %r14d,%r14d
mov    %r14d,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @parse_unsigned_int(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = tail call i64 @isdigit(i8 signext %2)
%4 = icmp eq i64 %3, 0
br i1 %4, label %17, label %5
5: ; preds = %1, %5
%6 = phi i8* [ %9, %5 ], [ %0, %1 ]
%7 = phi i32 [ %13, %5 ], [ 0, %1 ]
%8 = mul i32 %7, 10
%9 = getelementptr inbounds i8, i8* %6, i64 1
%10 = load i8, i8* %6
%11 = sext i8 %10 to i32
%12 = add i32 %8, -48
%13 = add i32 %12, %11
%14 = load i8, i8* %9
%15 = tail call i64 @isdigit(i8 signext %14)
%16 = icmp eq i64 %15, 0
br i1 %16, label %17, label %5
17: ; preds = %5, %1
%18 = phi i32 [ 0, %1 ], [ %13, %5 ]
ret i32 %18
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void gdbmiPrintHelpFiles() {
  printf("list -- List specified function or line\n");
}


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

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

LLVM IR (-O0):
@.str = [41 x i8] c"list -- List specified function or line\0A\00"
define void @gdbmiPrintHelpFiles() {
%1 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [40 x i8] c"list -- List specified function or line\00"
define void @gdbmiPrintHelpFiles() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str, i64 0, i64 0))
ret void
}
int utime(const char *path, const struct utimbuf *times) {
  anvil_syslog(0, "%s unimplemented\n", __FUNCTION__);
  while (1)
    ;
  return 0;
}


x86 assembly (clang, -O0):
<utime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %edi,%edi
lea    0xed7(%rip),%rsi
lea    0xee2(%rip),%rdx
mov    $0x0,%al
call   1030 <anvil_syslog@plt>
jmp    1137 <utime+0x27>

x86 assembly (clang, -O2):
<utime>:
push   %rax
lea    0xee8(%rip),%rsi
lea    0xef3(%rip),%rdx
xor    %edi,%edi
xor    %eax,%eax
call   1030 <anvil_syslog@plt>
nopl   0x0(%rax,%rax,1)
jmp    1130 <utime+0x20>

LLVM IR (-O0):
%struct.utimbuf = type opaque
@.str = [18 x i8] c"%s unimplemented\0A\00"
@__FUNCTION__.utime = [6 x i8] c"utime\00"
define i32 @utime(i8* %0, %struct.utimbuf* %1) {
%3 = alloca i8*
%4 = alloca %struct.utimbuf*
store i8* %0, i8** %3
store %struct.utimbuf* %1, %struct.utimbuf** %4
%5 = call i32 (i32, i8*, i8*, ...) bitcast (i32 (...)* @anvil_syslog to i32 (i32, i8*, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @__FUNCTION__.utime, i64 0, i64 0))
br label %6
6: ; preds = %2, %6
br label %6
}

LLVM IR (-O2):
%struct.utimbuf = type opaque
@.str = [18 x i8] c"%s unimplemented\0A\00"
@__FUNCTION__.utime = [6 x i8] c"utime\00"
define i32 @utime(i8* nocapture readnone %0, %struct.utimbuf* nocapture readnone %1) {
%3 = tail call i32 (i32, i8*, i8*, ...) bitcast (i32 (...)* @anvil_syslog to i32 (i32, i8*, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @__FUNCTION__.utime, i64 0, i64 0))
br label %4
4: ; preds = %2, %4
br label %4
}
int number_of_digits(int num) {
  int digits;
  for (digits = 0; num != 0; digits++) {
    num /= 10;
  }
  return digits;
}


x86 assembly (clang, -O0):
<number_of_digits>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1134 <number_of_digits+0x34>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <number_of_digits+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<number_of_digits>:
xor    %eax,%eax
test   %edi,%edi
je     1132 <number_of_digits+0x32>
cs nopw 0x0(%rax,%rax,1)
movslq %edi,%rcx
imul   $0x66666667,%rcx,%rdi
mov    %rdi,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rdi
add    %edx,%edi
add    $0x1,%eax
add    $0x9,%ecx
cmp    $0x12,%ecx
ja     1110 <number_of_digits+0x10>
ret

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

LLVM IR (-O2):
define i32 @number_of_digits(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %10, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 0, %1 ]
%5 = phi i32 [ %6, %3 ], [ %0, %1 ]
%6 = sdiv i32 %5, 10
%7 = add nuw nsw i32 %4, 1
%8 = add i32 %5, 9
%9 = icmp ult i32 %8, 19
br i1 %9, label %10, label %3
10: ; preds = %3, %1
%11 = phi i32 [ 0, %1 ], [ %7, %3 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ DebugBreak();
void CRASH() { DebugBreak(); }


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

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

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

LLVM IR (-O2):
define void @CRASH() {
%1 = tail call i32 (...) @DebugBreak()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm_storeu_si128(int /*<<< orphan*/ *, int /*<<< orphan*/);
void test_mm_storeu_si128(__m128i *A, __m128i B) { _mm_storeu_si128(A, B); }


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

x86 assembly (clang, -O2):
<test_mm_storeu_si128>:
jmp    1030 <_mm_storeu_si128@plt>

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

LLVM IR (-O2):
define void @test_mm_storeu_si128(i32* %0, i32 %1) {
%3 = tail call i32 @_mm_storeu_si128(i32* %0, i32 %1)
ret void
}
rectf_(x1, y1, x2, y2) float *x1, *y1, *x2, *y2;
{ rectf(*x1, *y1, *x2, *y2); }


x86 assembly (clang, -O0):
<rectf_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
cvtss2sd %xmm0,%xmm0
mov    -0x18(%rbp),%rax
movss  (%rax),%xmm1
cvtss2sd %xmm1,%xmm1
mov    -0x20(%rbp),%rax
movss  (%rax),%xmm2
cvtss2sd %xmm2,%xmm2
mov    -0x28(%rbp),%rax
movss  (%rax),%xmm3
cvtss2sd %xmm3,%xmm3
mov    $0x4,%al
call   1030 <rectf@plt>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rectf_>:
movss  (%rdi),%xmm0
cvtss2sd %xmm0,%xmm0
movss  (%rsi),%xmm1
cvtss2sd %xmm1,%xmm1
movss  (%rdx),%xmm2
cvtss2sd %xmm2,%xmm2
movss  (%rcx),%xmm3
cvtss2sd %xmm3,%xmm3
mov    $0x4,%al
jmp    1030 <rectf@plt>

LLVM IR (-O0):
define i32 @rectf_(float* %0, float* %1, float* %2, float* %3) {
%5 = alloca i32
%6 = alloca float*
%7 = alloca float*
%8 = alloca float*
%9 = alloca float*
store float* %0, float** %6
store float* %1, float** %7
store float* %2, float** %8
store float* %3, float** %9
%10 = load float*, float** %6
%11 = load float, float* %10
%12 = fpext float %11 to double
%13 = load float*, float** %7
%14 = load float, float* %13
%15 = fpext float %14 to double
%16 = load float*, float** %8
%17 = load float, float* %16
%18 = fpext float %17 to double
%19 = load float*, float** %9
%20 = load float, float* %19
%21 = fpext float %20 to double
%22 = call i32 (double, double, double, double, ...) bitcast (i32 (...)* @rectf to i32 (double, double, double, double, ...)*)(double %12, double %15, double %18, double %21)
%23 = load i32, i32* %5
ret i32 %23
}

LLVM IR (-O2):
define i32 @rectf_(float* nocapture %0, float* nocapture %1, float* nocapture %2, float* nocapture %3) {
%5 = load float, float* %0
%6 = fpext float %5 to double
%7 = load float, float* %1
%8 = fpext float %7 to double
%9 = load float, float* %2
%10 = fpext float %9 to double
%11 = load float, float* %3
%12 = fpext float %11 to double
%13 = tail call i32 (double, double, double, double, ...) bitcast (i32 (...)* @rectf to i32 (double, double, double, double, ...)*)(double %6, double %8, double %10, double %12)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ write(int, char *, int);
void under_off(void) { write(1, "\033[0m", 4); }


x86 assembly (clang, -O0):
<under_off>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
lea    0xee0(%rip),%rsi
mov    $0x4,%edx
call   1030 <write@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<under_off>:
lea    0xee9(%rip),%rsi
mov    $0x1,%edi
mov    $0x4,%edx
jmp    1030 <write@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"\1B[0m\00"
define void @under_off() {
%1 = call i32 @write(i32 1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 4)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"\1B[0m\00"
define void @under_off() {
%1 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 4)
ret void
}
void create_map() {}


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

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

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

LLVM IR (-O2):
define void @create_map() {
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t TimerLoadGet(uint32_t ui32Base, uint32_t ui32Timer) {
  ;
  ;
  return ((ui32Timer == 0x000000ff)
              ? (*((volatile uint32_t *)(ui32Base + 0x00000028)))
              : (*((volatile uint32_t *)(ui32Base + 0x0000002C))));
}


x86 assembly (clang, -O0):
<TimerLoadGet>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0xff,-0x8(%rbp)
jne    1129 <TimerLoadGet+0x29>
mov    -0x4(%rbp),%eax
add    $0x28,%eax
cltq
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
jmp    1136 <TimerLoadGet+0x36>
mov    -0x4(%rbp),%eax
add    $0x2c,%eax
cltq
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<TimerLoadGet>:
xor    %eax,%eax
cmp    $0xff,%esi
setne  %al
lea    0x28(,%rax,4),%eax
movslq %edi,%rcx
mov    (%rax,%rcx,1),%eax
ret

LLVM IR (-O0):
define i32 @TimerLoadGet(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 = icmp eq i32 %5, 255
br i1 %6, label %7, label %13
7: ; preds = %2
%8 = load i32, i32* %3
%9 = add nsw i32 %8, 40
%10 = sext i32 %9 to i64
%11 = inttoptr i64 %10 to i32*
%12 = load volatile i32, i32* %11
br label %19
13: ; preds = %2
%14 = load i32, i32* %3
%15 = add nsw i32 %14, 44
%16 = sext i32 %15 to i64
%17 = inttoptr i64 %16 to i32*
%18 = load volatile i32, i32* %17
br label %19
19: ; preds = %13, %7
%20 = phi i32 [ %12, %7 ], [ %18, %13 ]
ret i32 %20
}

LLVM IR (-O2):
define i32 @TimerLoadGet(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 255
%4 = select i1 %3, i32 40, i32 44
%5 = add nsw i32 %4, %0
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to i32*
%8 = load volatile i32, i32* %7
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ _aligned_free(void *);
void xy_free(void *p) { _aligned_free(p); }


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

x86 assembly (clang, -O2):
<xy_free>:
jmp    1030 <_aligned_free@plt>

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

LLVM IR (-O2):
define void @xy_free(i8* %0) {
%2 = tail call i32 @_aligned_free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print_help(char *argv0) {
  printf("%s [Option]\n", argv0);
  printf("Options:\n"
         " -h, --help        : Print help\n"
         " -l, --list <path> : Path to list input file (./list by default)\n"
         " -o, --out <path>  : Path to output files + file base name\n"
         " -r, --root        : Root directory to open resource files from\n");
}


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

x86 assembly (clang, -O2):
<print_help>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xed4(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"%s [Option]\0A\00"
@.str.1 = [230 x i8] c"Options:\0A -h, --help : Print help\0A -l, --list <path> : Path to list input file (./list by default)\0A -o, --out <path> : Path to output files + file base name\0A -r, --root : Root directory to open resource files from\0A\00"
define void @print_help(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([230 x i8], [230 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"%s [Option]\0A\00"
@str = [229 x i8] c"Options:\0A -h, --help : Print help\0A -l, --list <path> : Path to list input file (./list by default)\0A -o, --out <path> : Path to output files + file base name\0A -r, --root : Root directory to open resource files from\00"
define void @print_help(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([229 x i8], [229 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ allocate(size_t);
char *memcpy(int /*<<< orphan*/, char const *, size_t);
int strlen(char const *);
char *strallocate(char const *str) {
  size_t size;
  if (!str)
    return NULL;
  size = strlen(str) + 1;
  return memcpy(allocate(size), str, size);
}


x86 assembly (clang, -O0):
<strallocate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1154 <strallocate+0x24>
movq   $0x0,-0x8(%rbp)
jmp    1182 <strallocate+0x52>
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
add    $0x1,%eax
cltq
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1050 <allocate@plt>
mov    %eax,%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <memcpy@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strallocate>:
test   %rdi,%rdi
je     1163 <strallocate+0x33>
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <strlen@plt>
add    $0x1,%eax
movslq %eax,%r14
mov    %r14,%rdi
call   1050 <allocate@plt>
mov    %eax,%edi
mov    %rbx,%rsi
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <memcpy@plt>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i8* @strallocate(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %9, label %3
3: ; preds = %1
%4 = tail call i32 @strlen(i8* %0)
%5 = add nsw i32 %4, 1
%6 = sext i32 %5 to i64
%7 = tail call i32 @allocate(i64 %6)
%8 = tail call i8* @memcpy(i32 %7, i8* %0, i64 %6)
br label %9
9: ; preds = %1, %3
%10 = phi i8* [ %8, %3 ], [ null, %1 ]
ret i8* %10
}
/* Type definitions */
struct tm {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ _HibernateCalendarSet(int, struct tm *);
void HibernateCalendarSet(struct tm *psTime) {
  _HibernateCalendarSet(0x400FC310, psTime);
}


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

x86 assembly (clang, -O2):
<HibernateCalendarSet>:
mov    %rdi,%rsi
mov    $0x400fc310,%edi
jmp    1030 <_HibernateCalendarSet@plt>

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

LLVM IR (-O2):
%struct.tm = type { i32 }
define void @HibernateCalendarSet(%struct.tm* %0) {
%2 = tail call i32 @_HibernateCalendarSet(i32 1074774800, %struct.tm* %0)
ret void
}
/* Variables and functions */
int isascii(int);
int isAnyChar(int c) { return isascii(c); }


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

x86 assembly (clang, -O2):
<isAnyChar>:
xor    %eax,%eax
cmp    $0x80,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @isAnyChar(i32 %0) {
%2 = icmp ult i32 %0, 128
%3 = zext i1 %2 to i32
ret i32 %3
}
int dsp_sqr(int n) { return n * n; }


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

x86 assembly (clang, -O2):
<dsp_sqr>:
mov    %edi,%eax
imul   %edi,%eax
ret

LLVM IR (-O0):
define i32 @dsp_sqr(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = mul nsw i32 %3, %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @dsp_sqr(i32 %0) {
%2 = mul nsw i32 %0, %0
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void test2(unsigned int u1) {
  unsigned int y_final_1;
  signed short y_middle;
  unsigned int y_final_2;
  y_final_1 = (unsigned int)((signed short)(u1 << 1) * 3);
  y_middle = (signed short)(u1 << 1);
  y_final_2 = (unsigned int)(y_middle * 3);
  if (y_final_1 != y_final_2)
    abort();
}


x86 assembly (clang, -O0):
<test2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
cwtl
imul   $0x3,%eax,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
mov    %ax,-0xa(%rbp)
movswl -0xa(%rbp),%eax
imul   $0x3,%eax,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
je     114f <test2+0x3f>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @test2(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i16
%5 = alloca i32
store i32 %0, i32* %2
%6 = load i32, i32* %2
%7 = shl i32 %6, 1
%8 = trunc i32 %7 to i16
%9 = sext i16 %8 to i32
%10 = mul nsw i32 %9, 3
store i32 %10, i32* %3
%11 = load i32, i32* %2
%12 = shl i32 %11, 1
%13 = trunc i32 %12 to i16
store i16 %13, i16* %4
%14 = load i16, i16* %4
%15 = sext i16 %14 to i32
%16 = mul nsw i32 %15, 3
store i32 %16, i32* %5
%17 = load i32, i32* %3
%18 = load i32, i32* %5
%19 = icmp ne i32 %17, %18
br i1 %19, label %20, label %22
20: ; preds = %1
%21 = call i32 (...) @abort()
unreachable
22: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @test2(i32 %0) {
ret void
}
double dot3(double *restrict a, double *restrict b) {
  double r;
  r = *a++ * *b++;
  r += *a++ * *b++;
  r += *a * *b;
  return r;
}


x86 assembly (clang, -O0):
<dot3>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x8(%rbp)
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
mulsd  (%rax),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x8(%rbp)
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
movsd  (%rax),%xmm2
movsd  -0x18(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm2
movsd  -0x18(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<dot3>:
movsd  (%rdi),%xmm0
mulsd  (%rsi),%xmm0
movsd  0x8(%rdi),%xmm1
mulsd  0x8(%rsi),%xmm1
addsd  %xmm0,%xmm1
movsd  0x10(%rdi),%xmm0
mulsd  0x10(%rsi),%xmm0
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @dot3(double* noalias %0, double* noalias %1) {
%3 = alloca double*
%4 = alloca double*
%5 = alloca double
store double* %0, double** %3
store double* %1, double** %4
%6 = load double*, double** %3
%7 = getelementptr inbounds double, double* %6, i32 1
store double* %7, double** %3
%8 = load double, double* %6
%9 = load double*, double** %4
%10 = getelementptr inbounds double, double* %9, i32 1
store double* %10, double** %4
%11 = load double, double* %9
%12 = fmul double %8, %11
store double %12, double* %5
%13 = load double*, double** %3
%14 = getelementptr inbounds double, double* %13, i32 1
store double* %14, double** %3
%15 = load double, double* %13
%16 = load double*, double** %4
%17 = getelementptr inbounds double, double* %16, i32 1
store double* %17, double** %4
%18 = load double, double* %16
%19 = load double, double* %5
%20 = call double @llvm.fmuladd.f64(double %15, double %18, double %19)
store double %20, double* %5
%21 = load double*, double** %3
%22 = load double, double* %21
%23 = load double*, double** %4
%24 = load double, double* %23
%25 = load double, double* %5
%26 = call double @llvm.fmuladd.f64(double %22, double %24, double %25)
store double %26, double* %5
%27 = load double, double* %5
ret double %27
}

LLVM IR (-O2):
define double @dot3(double* noalias nocapture %0, double* noalias nocapture %1) {
%3 = getelementptr inbounds double, double* %0, i64 1
%4 = load double, double* %0
%5 = getelementptr inbounds double, double* %1, i64 1
%6 = load double, double* %1
%7 = fmul double %4, %6
%8 = getelementptr inbounds double, double* %0, i64 2
%9 = load double, double* %3
%10 = getelementptr inbounds double, double* %1, i64 2
%11 = load double, double* %5
%12 = tail call double @llvm.fmuladd.f64(double %9, double %11, double %7)
%13 = load double, double* %8
%14 = load double, double* %10
%15 = tail call double @llvm.fmuladd.f64(double %13, double %14, double %12)
ret double %15
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t xor128(void) {
  static uint32_t x = 123456789;
  static uint32_t y = 362436069;
  static uint32_t z = 521288629;
  static uint32_t w = 88675123;
  uint32_t t;
  t = x ^ (x << 11);
  x = y;
  y = z;
  z = w;
  return w = w ^ (w >> 19) ^ (t ^ (t >> 8));
}


x86 assembly (clang, -O0):
<xor128>:
push   %rbp
mov    %rsp,%rbp
mov    0x2f16(%rip),%eax
mov    0x2f10(%rip),%ecx
shl    $0xb,%ecx
xor    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    0x2f06(%rip),%eax
mov    %eax,0x2efc(%rip)
mov    0x2efe(%rip),%eax
mov    %eax,0x2ef4(%rip)
mov    0x2ef6(%rip),%eax
mov    %eax,0x2eec(%rip)
mov    0x2eea(%rip),%eax
mov    0x2ee4(%rip),%ecx
sar    $0x13,%ecx
xor    %ecx,%eax
mov    -0x4(%rbp),%ecx
mov    -0x4(%rbp),%edx
sar    $0x8,%edx
xor    %edx,%ecx
xor    %ecx,%eax
mov    %eax,0x2ecc(%rip)
pop    %rbp
ret

x86 assembly (clang, -O2):
<xor128>:
mov    0x2f1a(%rip),%ecx
mov    %ecx,%eax
shl    $0xb,%eax
xor    %ecx,%eax
mov    0x2f11(%rip),%ecx
mov    %ecx,0x2f07(%rip)
mov    0x2f09(%rip),%ecx
mov    %ecx,0x2eff(%rip)
mov    0x2f01(%rip),%ecx
mov    %ecx,0x2ef7(%rip)
mov    %eax,%edx
sar    $0x8,%edx
xor    %ecx,%eax
sar    $0x13,%ecx
xor    %edx,%eax
xor    %ecx,%eax
mov    %eax,0x2ee7(%rip)
ret

LLVM IR (-O0):
@xor128.x = internal global i32 123456789
@xor128.y = internal global i32 362436069
@xor128.z = internal global i32 521288629
@xor128.w = internal global i32 88675123
define i32 @xor128() {
%1 = alloca i32
%2 = load i32, i32* @xor128.x
%3 = load i32, i32* @xor128.x
%4 = shl i32 %3, 11
%5 = xor i32 %2, %4
store i32 %5, i32* %1
%6 = load i32, i32* @xor128.y
store i32 %6, i32* @xor128.x
%7 = load i32, i32* @xor128.z
store i32 %7, i32* @xor128.y
%8 = load i32, i32* @xor128.w
store i32 %8, i32* @xor128.z
%9 = load i32, i32* @xor128.w
%10 = load i32, i32* @xor128.w
%11 = ashr i32 %10, 19
%12 = xor i32 %9, %11
%13 = load i32, i32* %1
%14 = load i32, i32* %1
%15 = ashr i32 %14, 8
%16 = xor i32 %13, %15
%17 = xor i32 %12, %16
store i32 %17, i32* @xor128.w
ret i32 %17
}

LLVM IR (-O2):
@xor128.x = internal unnamed_addr global i32 123456789
@xor128.y = internal unnamed_addr global i32 362436069
@xor128.z = internal unnamed_addr global i32 521288629
@xor128.w = internal unnamed_addr global i32 88675123
define i32 @xor128() {
%1 = load i32, i32* @xor128.x
%2 = shl i32 %1, 11
%3 = xor i32 %2, %1
%4 = load i32, i32* @xor128.y
store i32 %4, i32* @xor128.x
%5 = load i32, i32* @xor128.z
store i32 %5, i32* @xor128.y
%6 = load i32, i32* @xor128.w
store i32 %6, i32* @xor128.z
%7 = ashr i32 %6, 19
%8 = ashr i32 %3, 8
%9 = xor i32 %8, %3
%10 = xor i32 %9, %6
%11 = xor i32 %10, %7
store i32 %11, i32* @xor128.w
ret i32 %11
}