xunge/DecIR huggingface dataset:
int get_pow_2(int in) {
  int out;
  int o2 = 1;
  for (out = 1; o2 <= in; out++) {
    o2 *= 2;
    if (o2 == in)
      return out;
  }
  return 0;
}


x86 assembly (clang, -O0):
<get_pow_2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x1,-0x10(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     1154 <get_pow_2+0x54>
mov    -0x10(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    1141 <get_pow_2+0x41>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    115b <get_pow_2+0x5b>
jmp    1146 <get_pow_2+0x46>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1115 <get_pow_2+0x15>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_pow_2>:
xor    %eax,%eax
test   %edi,%edi
jle    111d <get_pow_2+0x1d>
mov    $0x1,%ecx
mov    $0x1,%edx
add    %ecx,%ecx
cmp    %edi,%ecx
je     111e <get_pow_2+0x1e>
add    $0x1,%edx
cmp    %edi,%ecx
jle    1110 <get_pow_2+0x10>
ret
mov    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @get_pow_2(i32 %0) {
%2 = icmp slt i32 %0, 1
br i1 %2, label %11, label %3
3: ; preds = %1, %8
%4 = phi i32 [ %6, %8 ], [ 1, %1 ]
%5 = phi i32 [ %9, %8 ], [ 1, %1 ]
%6 = shl nsw i32 %4, 1
%7 = icmp eq i32 %6, %0
br i1 %7, label %11, label %8
8: ; preds = %3
%9 = add nuw nsw i32 %5, 1
%10 = icmp sgt i32 %6, %0
br i1 %10, label %11, label %3
11: ; preds = %3, %8, %1
%12 = phi i32 [ 0, %1 ], [ 0, %8 ], [ %5, %3 ]
ret i32 %12
}
void sub(unsigned int wc, unsigned long step, unsigned char *start) {
  do {
    start[--step] = wc;
    wc >>= 6;
  } while (step > 1);
}


x86 assembly (clang, -O0):
<sub>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    %al,%dl
mov    -0x18(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    %rcx,%rsi
add    $0xffffffffffffffff,%rsi
mov    %rsi,-0x10(%rbp)
mov    %dl,-0x1(%rax,%rcx,1)
mov    -0x4(%rbp),%eax
shr    $0x6,%eax
mov    %eax,-0x4(%rbp)
cmpq   $0x1,-0x10(%rbp)
ja     110f <sub+0xf>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sub>:
mov    %dil,-0x1(%rdx,%rsi,1)
add    $0xffffffffffffffff,%rsi
shr    $0x6,%edi
cmp    $0x1,%rsi
ja     1100 <sub>
ret

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

LLVM IR (-O2):
define void @sub(i32 %0, i64 %1, i8* nocapture writeonly %2) {
br label %4
4: ; preds = %4, %3
%5 = phi i64 [ %1, %3 ], [ %8, %4 ]
%6 = phi i32 [ %0, %3 ], [ %10, %4 ]
%7 = trunc i32 %6 to i8
%8 = add i64 %5, -1
%9 = getelementptr inbounds i8, i8* %2, i64 %8
store i8 %7, i8* %9
%10 = lshr i32 %6, 6
%11 = icmp ugt i64 %8, 1
br i1 %11, label %4, label %12
12: ; preds = %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ scanf(char *);
void clear() {
  scanf("%*[^\n]");
  scanf("%*c");
}


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

x86 assembly (clang, -O2):
<clear>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <scanf@plt>
lea    0xee3(%rip),%rdi
pop    %rax
jmp    1030 <scanf@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"%*[^\0A]\00"
@.str.1 = [4 x i8] c"%*c\00"
define void @clear() {
%1 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"%*[^\0A]\00"
@.str.1 = [4 x i8] c"%*c\00"
define void @clear() {
%1 = tail call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
double fabs(float);
int isNegative(float x) {
  if (fabs(x) <= 1.0E-6) {
    return 0;
  } else {
    return x >= 0 ? 1 : -1;
  }
}


x86 assembly (clang, -O0):
<isNegative>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
call   1030 <fabs@plt>
movaps %xmm0,%xmm1
movsd  0xece(%rip),%xmm0
ucomisd %xmm1,%xmm0
jb     1148 <isNegative+0x38>
movl   $0x0,-0x4(%rbp)
jmp    1163 <isNegative+0x53>
movss  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
mov    $0xffffffff,%eax
mov    $0x1,%ecx
ucomiss %xmm1,%xmm0
cmovae %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isNegative>:
push   %rax
movss  %xmm0,0x4(%rsp)
call   1030 <fabs@plt>
xorps  %xmm1,%xmm1
xor    %eax,%eax
movss  0x4(%rsp),%xmm2
ucomiss %xmm1,%xmm2
setae  %al
xor    %ecx,%ecx
movsd  0xec9(%rip),%xmm1
ucomisd %xmm0,%xmm1
lea    -0x1(%rax,%rax,1),%eax
cmovae %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @isNegative(float %0) {
%2 = alloca i32
%3 = alloca float
store float %0, float* %3
%4 = load float, float* %3
%5 = call double @fabs(float %4)
%6 = fcmp ole double %5, 0x3EB0C6F7A0B5ED8D
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 0, i32* %2
br label %13
8: ; preds = %1
%9 = load float, float* %3
%10 = fcmp oge float %9, 0.000000e+00
%11 = zext i1 %10 to i64
%12 = select i1 %10, i32 1, i32 -1
store i32 %12, i32* %2
br label %13
13: ; preds = %8, %7
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @isNegative(float %0) {
%2 = tail call double @fabs(float %0)
%3 = fcmp ugt double %2, 0x3EB0C6F7A0B5ED8D
%4 = fcmp oge float %0, 0.000000e+00
%5 = select i1 %4, i32 1, i32 -1
%6 = select i1 %3, i32 %5, i32 0
ret i32 %6
}
int f() {
  int x;
  int y;
  x = 0;
  y = 1;
  {
    x = x + y;
    {
      x = x + y;
      { x = x + y; }
    }
  }
  return x;
}


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

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

LLVM IR (-O0):
define i32 @f() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
%3 = load i32, i32* %1
%4 = load i32, i32* %2
%5 = add nsw i32 %3, %4
store i32 %5, i32* %1
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = add nsw i32 %6, %7
store i32 %8, i32* %1
%9 = load i32, i32* %1
%10 = load i32, i32* %2
%11 = add nsw i32 %9, %10
store i32 %11, i32* %1
%12 = load i32, i32* %1
ret i32 %12
}

LLVM IR (-O2):
define i32 @f() {
ret i32 3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int curse(int len) {
  for (; len != 0; len = len - 1) {
    printf("*");
  }
  printf("\a");
  return 0;
}


x86 assembly (clang, -O0):
<curse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     113f <curse+0x2f>
lea    0xed4(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111b <curse+0xb>
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<curse>:
push   %rbx
test   %edi,%edi
je     112f <curse+0x1f>
mov    %edi,%ebx
nopw   0x0(%rax,%rax,1)
mov    $0x2a,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1120 <curse+0x10>
mov    $0x7,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @curse(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %8, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ %0, %1 ]
%5 = tail call i32 @putchar(i32 42)
%6 = add nsw i32 %4, -1
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %3
8: ; preds = %3, %1
%9 = tail call i32 @putchar(i32 7)
ret i32 0
}
/* Variables and functions */
float glm_clamp_zo(float);
float glm_smooth(float);
__attribute((always_)) float glm_smoothstep(float edge0, float edge1, float x) {
  float t;
  t = glm_clamp_zo((x - edge0) / (edge1 - edge0));
  return glm_smooth(t);
}


x86 assembly (clang, -O0):
<glm_smoothstep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
subss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
subss  -0x4(%rbp),%xmm1
divss  %xmm1,%xmm0
call   1040 <glm_clamp_zo@plt>
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
call   1030 <glm_smooth@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<glm_smoothstep>:
push   %rax
subss  %xmm0,%xmm2
subss  %xmm0,%xmm1
divss  %xmm1,%xmm2
movaps %xmm2,%xmm0
call   1040 <glm_clamp_zo@plt>
pop    %rax
jmp    1030 <glm_smooth@plt>

LLVM IR (-O0):
define float @glm_smoothstep(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* %6
%9 = load float, float* %4
%10 = fsub float %8, %9
%11 = load float, float* %5
%12 = load float, float* %4
%13 = fsub float %11, %12
%14 = fdiv float %10, %13
%15 = call float @glm_clamp_zo(float %14)
store float %15, float* %7
%16 = load float, float* %7
%17 = call float @glm_smooth(float %16)
ret float %17
}

LLVM IR (-O2):
define float @glm_smoothstep(float %0, float %1, float %2) {
%4 = fsub float %2, %0
%5 = fsub float %1, %0
%6 = fdiv float %4, %5
%7 = tail call float @glm_clamp_zo(float %6)
%8 = tail call float @glm_smooth(float %7)
ret float %8
}
int __eqdf2(long long a1, long long a2) {
  return *(long long *)&a1 == *(long long *)&a2;
}


x86 assembly (clang, -O0):
<__eqdf2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__eqdf2>:
xor    %eax,%eax
cmp    %rsi,%rdi
sete   %al
ret

LLVM IR (-O0):
define i32 @__eqdf2(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 = icmp eq i64 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @__eqdf2(i64 %0, i64 %1) {
%3 = icmp eq i64 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
scalar_t__ strtoul(char const *, int /*<<< orphan*/, int);
char *strtoptr(const char *str) { return (char *)strtoul(str, 0, 16); }


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

x86 assembly (clang, -O2):
<strtoptr>:
xor    %esi,%esi
mov    $0x10,%edx
jmp    1030 <strtoul@plt>

LLVM IR (-O0):
define i8* @strtoptr(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @strtoul(i8* %3, i32 0, i32 16)
%5 = inttoptr i64 %4 to i8*
ret i8* %5
}

LLVM IR (-O2):
define i8* @strtoptr(i8* %0) {
%2 = tail call i64 @strtoul(i8* %0, i32 0, i32 16)
%3 = inttoptr i64 %2 to i8*
ret i8* %3
}
const char *ls_cost_nm3_name_in(int i) {
  switch (i) {
  case 0:
    return "i0";
  case 1:
    return "i1";
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<ls_cost_nm3_name_in>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
test   %eax,%eax
je     112b <ls_cost_nm3_name_in+0x2b>
jmp    111a <ls_cost_nm3_name_in+0x1a>
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
je     113b <ls_cost_nm3_name_in+0x3b>
jmp    114b <ls_cost_nm3_name_in+0x4b>
lea    0xece(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1153 <ls_cost_nm3_name_in+0x53>
lea    0xec1(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1153 <ls_cost_nm3_name_in+0x53>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ls_cost_nm3_name_in>:
xor    %ecx,%ecx
cmp    $0x1,%edi
lea    0xef7(%rip),%rax
cmove  %rax,%rcx
test   %edi,%edi
lea    0xee7(%rip),%rax
cmovne %rcx,%rax
ret

LLVM IR (-O0):
@.str = [3 x i8] c"i0\00"
@.str.1 = [3 x i8] c"i1\00"
define i8* @ls_cost_nm3_name_in(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %7 [
i32 0, label %5
i32 1, label %6
]
5: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %2
br label %8
6: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %8
7: ; preds = %1
store i8* null, i8** %2
br label %8
8: ; preds = %7, %6, %5
%9 = load i8*, i8** %2
ret i8* %9
}

LLVM IR (-O2):
@.str = [3 x i8] c"i0\00"
@.str.1 = [3 x i8] c"i1\00"
define i8* @ls_cost_nm3_name_in(i32 %0) {
%2 = icmp eq i32 %0, 1
%3 = select i1 %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* null
%4 = icmp eq i32 %0, 0
%5 = select i1 %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3
ret i8* %5
}
void test78_HostCallThruProtoBug_targetInit__I() {}


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

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

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

LLVM IR (-O2):
define void @test78_HostCallThruProtoBug_targetInit__I() {
ret void
}
const char *file_tail(const char *z) {
  const char *zTail = z;
  while (z[0]) {
    if (z[0] == '/')
      zTail = &z[1];
    z++;
  }
  return zTail;
}


x86 assembly (clang, -O0):
<file_tail>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     114a <file_tail+0x4a>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2f,%eax
jne    1139 <file_tail+0x39>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1110 <file_tail+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<file_tail>:
mov    %rdi,%rax
lea    0x1(%rdi),%rcx
jmp    1117 <file_tail+0x17>
nopl   0x0(%rax)
mov    %rcx,%rax
add    $0x1,%rcx
movzbl -0x1(%rcx),%edx
cmp    $0x2f,%dl
je     1110 <file_tail+0x10>
test   %dl,%dl
jne    1113 <file_tail+0x13>
ret

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

LLVM IR (-O2):
define i8* @file_tail(i8* %0) {
br label %2
2: ; preds = %8, %1
%3 = phi i8* [ %0, %1 ], [ %10, %8 ]
%4 = phi i8* [ %0, %1 ], [ %9, %8 ]
%5 = load i8, i8* %3
switch i8 %5, label %8 [
i8 0, label %11
i8 47, label %6
]
6: ; preds = %2
%7 = getelementptr inbounds i8, i8* %3, i64 1
br label %8
8: ; preds = %2, %6
%9 = phi i8* [ %7, %6 ], [ %4, %2 ]
%10 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
11: ; preds = %2
ret i8* %4
}
void testcase_assertion_startup_test() {}


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

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

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

LLVM IR (-O2):
define void @testcase_assertion_startup_test() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ A();
int /*<<< orphan*/ Translation(char);
void B(void) {
  Translation('t');
  A();
  Translation('d');
  A();
  return;
}


x86 assembly (clang, -O0):
<B>:
push   %rbp
mov    %rsp,%rbp
mov    $0x74,%edi
call   1040 <Translation@plt>
mov    $0x0,%al
call   1030 <A@plt>
mov    $0x64,%edi
call   1040 <Translation@plt>
mov    $0x0,%al
call   1030 <A@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<B>:
push   %rax
mov    $0x74,%edi
call   1040 <Translation@plt>
xor    %eax,%eax
call   1030 <A@plt>
mov    $0x64,%edi
call   1040 <Translation@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <A@plt>

LLVM IR (-O0):
define void @B() {
%1 = call i32 @Translation(i8 signext 116)
%2 = call i32 (...) @A()
%3 = call i32 @Translation(i8 signext 100)
%4 = call i32 (...) @A()
ret void
}

LLVM IR (-O2):
define void @B() {
%1 = tail call i32 @Translation(i8 signext 116)
%2 = tail call i32 (...) @A()
%3 = tail call i32 @Translation(i8 signext 100)
%4 = tail call i32 (...) @A()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ gid_t;

/* Variables and functions */
int /*<<< orphan*/ setpgid(int /*<<< orphan*/, int /*<<< orphan*/);
void c_setpgid_(gid_t *gid, gid_t *pgid) { setpgid(*gid, *pgid); }


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

x86 assembly (clang, -O2):
<c_setpgid_>:
mov    (%rdi),%edi
mov    (%rsi),%esi
jmp    1030 <setpgid@plt>

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

LLVM IR (-O2):
define void @c_setpgid_(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
%5 = tail call i32 @setpgid(i32 %3, i32 %4)
ret void
}
unsigned xrop3_132_0_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk2 = D ^ T;
  stk2 = ~stk2;
  stk1 = S & stk2;
  return stk1;
}


x86 assembly (clang, -O0):
<xrop3_132_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
xor    -0x10(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
and    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_132_0_0>:
mov    %edi,%ecx
shl    $0x8,%ecx
or     %edi,%ecx
mov    %esi,%eax
shl    $0x8,%eax
or     %esi,%eax
xor    $0xff00,%eax
and    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_132_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%10 = load i8, i8* %3
%11 = zext i8 %10 to i32
%12 = shl i32 %11, 8
%13 = load i8, i8* %3
%14 = zext i8 %13 to i32
%15 = or i32 %12, %14
store i32 %15, i32* %6
%16 = load i8, i8* %4
%17 = zext i8 %16 to i32
%18 = shl i32 %17, 8
%19 = load i8, i8* %4
%20 = zext i8 %19 to i32
%21 = or i32 %18, %20
store i32 %21, i32* %7
%22 = load i32, i32* %5
%23 = load i32, i32* %7
%24 = xor i32 %22, %23
store i32 %24, i32* %9
%25 = load i32, i32* %9
%26 = xor i32 %25, -1
store i32 %26, i32* %9
%27 = load i32, i32* %6
%28 = load i32, i32* %9
%29 = and i32 %27, %28
store i32 %29, i32* %8
%30 = load i32, i32* %8
ret i32 %30
}

LLVM IR (-O2):
define i32 @xrop3_132_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = xor i32 %6, 65280
%8 = and i32 %7, %4
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void printStar(int n) {
  int i;
  for (i = 0; i < n; i++)
    printf("*");
}


x86 assembly (clang, -O0):
<printStar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1148 <printStar+0x38>
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <printStar+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printStar>:
push   %rbx
test   %edi,%edi
jle    112f <printStar+0x1f>
mov    %edi,%ebx
nopw   0x0(%rax,%rax,1)
mov    $0x2a,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1120 <printStar+0x10>
pop    %rbx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"*\00"
define void @printStar(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* %3
%6 = load i32, i32* %2
%7 = icmp slt i32 %5, %6
br i1 %7, label %8, label %13
8: ; preds = %4
%9 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8
%11 = load i32, i32* %3
%12 = add nsw i32 %11, 1
store i32 %12, i32* %3
br label %4
13: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @printStar(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %8
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 0, %1 ]
%5 = tail call i32 @putchar(i32 42)
%6 = add nuw nsw i32 %4, 1
%7 = icmp eq i32 %6, %0
br i1 %7, label %8, label %3
8: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ctest1(int *);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char **argv) {
  int x;
  ctest1(&x);
  printf("Valx=%d\n", x);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x14(%rbp),%rdi
call   1040 <ctest1@plt>
mov    -0x14(%rbp),%esi
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0x4(%rsp),%rdi
call   1040 <ctest1@plt>
mov    0x4(%rsp),%esi
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"Valx=%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 = call i32 @ctest1(i32* %6)
%8 = load i32, i32* %6
%9 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"Valx=%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call i32 @ctest1(i32* %3)
%6 = load i32, i32* %3
%7 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i32 0
}
double KPHtoKTS(double KPH) {
  double KTS = 0.5399568 * KPH;
  return KTS;
}


x86 assembly (clang, -O0):
<KPHtoKTS>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<KPHtoKTS>:
mulsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @KPHtoKTS(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = fmul double 0x3FE147537BA8170B, %4
store double %5, double* %3
%6 = load double, double* %3
ret double %6
}

LLVM IR (-O2):
define double @KPHtoKTS(double %0) {
%2 = fmul double %0, 0x3FE147537BA8170B
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ finish();
GS_QDR_EMULATE_1() { finish(); }


x86 assembly (clang, -O0):
<GS_QDR_EMULATE_1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <finish@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @GS_QDR_EMULATE_1() {
%1 = alloca i32
%2 = call i32 (...) @finish()
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @GS_QDR_EMULATE_1() {
%1 = tail call i32 (...) @finish()
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void hello_from_c(void) { printf("Hello from C, called from assembly\n"); }


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

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

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

LLVM IR (-O2):
@str = [35 x i8] c"Hello from C, called from assembly\00"
define void @hello_from_c() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str, i64 0, i64 0))
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned long time;
};
typedef TYPE_1__ XEnterWindowEvent;

/* Variables and functions */
void set_XEnterWindowEvent_time(void *_p, unsigned long _v) {
  ((XEnterWindowEvent *)_p)->time = (unsigned long)_v;
}


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

x86 assembly (clang, -O2):
<set_XEnterWindowEvent_time>:
mov    %rsi,(%rdi)
ret

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

LLVM IR (-O2):
define void @set_XEnterWindowEvent_time(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ disp_str(char *);
int /*<<< orphan*/ milli_delay(int);
void TestB() {
  int i = 0x1000;
  while (1) {
    disp_str("B.");
    milli_delay(10);
  }
}


x86 assembly (clang, -O0):
<TestB>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1000,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <disp_str@plt>
mov    $0xa,%edi
call   1040 <milli_delay@plt>
jmp    112f <TestB+0xf>

x86 assembly (clang, -O2):
<TestB>:
push   %rbx
lea    0xed8(%rip),%rbx
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1030 <disp_str@plt>
mov    $0xa,%edi
call   1040 <milli_delay@plt>
jmp    1130 <TestB+0x10>

LLVM IR (-O0):
@.str = [3 x i8] c"B.\00"
define void @TestB() {
%1 = alloca i32
store i32 4096, i32* %1
br label %2
2: ; preds = %0, %2
%3 = call i32 @disp_str(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @milli_delay(i32 10)
br label %2
}

LLVM IR (-O2):
@.str = [3 x i8] c"B.\00"
define void @TestB() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 @disp_str(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @milli_delay(i32 10)
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *);
int /*<<< orphan*/ stderr;
void Error(char *FUNCTION, char *CAUSE) {
  fprintf(stderr, "*** Error in function %s. Cause: %s.\n", FUNCTION, CAUSE);
  exit(1);
}


x86 assembly (clang, -O0):
<Error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xeb8(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<Error>:
push   %rax
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    0x2eb2(%rip),%rax
mov    (%rax),%edi
lea    0xec9(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [38 x i8] c"*** Error in function %s. Cause: %s.\0A\00"
define void @Error(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %3
%7 = load i8*, i8** %4
%8 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* %6, i8* %7)
%9 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [38 x i8] c"*** Error in function %s. Cause: %s.\0A\00"
define void @Error(i8* %0, i8* %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
%5 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ print_ptr(int /*<<< orphan*/);
int /*<<< orphan*/ scheme_entry();
int main(int argc, const char *argv[]) {
  print_ptr(scheme_entry());
  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   1040 <scheme_entry@plt>
mov    %eax,%edi
call   1030 <print_ptr@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <scheme_entry@plt>
mov    %eax,%edi
call   1030 <print_ptr@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 (...) @scheme_entry()
%7 = call i32 @print_ptr(i32 %6)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @scheme_entry()
%4 = tail call i32 @print_ptr(i32 %3)
ret i32 0
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
void USBHostSuspend(uint32_t ui32Base) {
  ASSERT(ui32Base == 0x40050000);
  (*((volatile uint8_t *)(ui32Base + 0x00000001))) |= 0x00000002;
}


x86 assembly (clang, -O0):
<USBHostSuspend>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x40050000,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
cltq
mov    (%rax),%ecx
or     $0x2,%ecx
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<USBHostSuspend>:
push   %rbx
mov    %edi,%ebx
xor    %edi,%edi
cmp    $0x40050000,%ebx
sete   %dil
call   1030 <ASSERT@plt>
movslq %ebx,%rax
orl    $0x2,0x1(%rax)
pop    %rbx
ret

LLVM IR (-O0):
define void @USBHostSuspend(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 1074069504
%5 = zext i1 %4 to i32
%6 = call i32 @ASSERT(i32 %5)
%7 = load i32, i32* %2
%8 = add nsw i32 %7, 1
%9 = sext i32 %8 to i64
%10 = inttoptr i64 %9 to i32*
%11 = load volatile i32, i32* %10
%12 = or i32 %11, 2
store volatile i32 %12, i32* %10
ret void
}

LLVM IR (-O2):
define void @USBHostSuspend(i32 %0) {
%2 = icmp eq i32 %0, 1074069504
%3 = zext i1 %2 to i32
%4 = tail call i32 @ASSERT(i32 %3)
%5 = add nsw i32 %0, 1
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to i32*
%8 = load volatile i32, i32* %7
%9 = or i32 %8, 2
store volatile i32 %9, i32* %7
ret void
}
int merge_possible(const int v1, const int v2) { return v1 == v2; }


x86 assembly (clang, -O0):
<merge_possible>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<merge_possible>:
xor    %eax,%eax
cmp    %esi,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @merge_possible(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
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @merge_possible(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ draw_rectangle(int /*<<< orphan*/, int /*<<< orphan*/,
                                  char *);
int /*<<< orphan*/ to_point(int, int);
void draw_border() {
  draw_rectangle(to_point(-1, -1), to_point(10, 20),
                 "\033[1;47m"
                 "  ");
}


x86 assembly (clang, -O0):
<draw_border>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xffffffff,%esi
mov    %esi,%edi
call   1040 <to_point@plt>
mov    %eax,-0x4(%rbp)
mov    $0xa,%edi
mov    $0x14,%esi
call   1040 <to_point@plt>
mov    -0x4(%rbp),%edi
mov    %eax,%esi
lea    0xeae(%rip),%rdx
call   1030 <draw_rectangle@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<draw_border>:
push   %rbx
mov    $0xffffffff,%edi
mov    $0xffffffff,%esi
call   1040 <to_point@plt>
mov    %eax,%ebx
mov    $0xa,%edi
mov    $0x14,%esi
call   1040 <to_point@plt>
lea    0xeb8(%rip),%rdx
mov    %ebx,%edi
mov    %eax,%esi
pop    %rbx
jmp    1030 <draw_rectangle@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"\1B[1;47m \00"
define void @draw_border() {
%1 = call i32 @to_point(i32 -1, i32 -1)
%2 = call i32 @to_point(i32 10, i32 20)
%3 = call i32 @draw_rectangle(i32 %1, i32 %2, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"\1B[1;47m \00"
define void @draw_border() {
%1 = tail call i32 @to_point(i32 -1, i32 -1)
%2 = tail call i32 @to_point(i32 10, i32 20)
%3 = tail call i32 @draw_rectangle(i32 %1, i32 %2, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret void
}
long dgtsv(long N, long NRHS, double *DL, double *D, double *DU, double *B,
           long LDB) {
  extern void dgtsv_(const long *Np, const long *NRHSp, double *DL, double *D,
                     double *DU, double *B, const long *LDBp, long *INFOp);
  long info;
  dgtsv_(&N, &NRHS, DL, D, DU, B, &LDB, &info);
  return info;
}


x86 assembly (clang, -O0):
<dgtsv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%r9
lea    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
lea    0x10(%rbp),%r10
lea    -0x38(%rbp),%rax
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1030 <dgtsv_@plt>
mov    -0x38(%rbp),%rax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dgtsv>:
sub    $0x18,%rsp
mov    %rdi,0x10(%rsp)
mov    %rsi,0x8(%rsp)
mov    %rsp,%rax
lea    0x20(%rsp),%r10
lea    0x10(%rsp),%rdi
lea    0x8(%rsp),%rsi
push   %rax
push   %r10
call   1030 <dgtsv_@plt>
add    $0x10,%rsp
mov    (%rsp),%rax
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i64 @dgtsv(i64 %0, i64 %1, double* %2, double* %3, double* %4, double* %5, i64 %6) {
%8 = alloca i64
%9 = alloca i64
%10 = alloca double*
%11 = alloca double*
%12 = alloca double*
%13 = alloca double*
%14 = alloca i64
%15 = alloca i64
store i64 %0, i64* %8
store i64 %1, i64* %9
store double* %2, double** %10
store double* %3, double** %11
store double* %4, double** %12
store double* %5, double** %13
store i64 %6, i64* %14
%16 = load double*, double** %10
%17 = load double*, double** %11
%18 = load double*, double** %12
%19 = load double*, double** %13
%20 = load i64, i64* %15
ret i64 %20
}

LLVM IR (-O2):
define i64 @dgtsv(i64 %0, i64 %1, double* %2, double* %3, double* %4, double* %5, i64 %6) {
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
%11 = alloca i64
store i64 %0, i64* %8
store i64 %1, i64* %9
store i64 %6, i64* %10
%12 = bitcast i64* %11 to i8*
%13 = load i64, i64* %11
ret i64 %13
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int y_root;
};
struct TYPE_4__ {
  TYPE_1__ xcrossing;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
void set_XEvent_xcrossing_y_root(void *_p, int _v) {
  ((XEvent *)_p)->xcrossing.y_root = (int)_v;
}


x86 assembly (clang, -O0):
<set_XEvent_xcrossing_y_root>:
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):
<set_XEvent_xcrossing_y_root>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i32 }
define void @set_XEvent_xcrossing_y_root(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_4__*
%8 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %7, i32 0, i32 0
%9 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %8, i32 0, i32 0
store i32 %5, i32* %9
ret void
}

LLVM IR (-O2):
define void @set_XEvent_xcrossing_y_root(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Type definitions */
struct cec_msg {
  int *msg;
};
typedef int __u16;

/* Variables and functions */
void cec_ops_set_stream_path(const struct cec_msg *msg, __u16 *phys_addr) {
  *phys_addr = (msg->msg[2] << 8) | msg->msg[3];
}


x86 assembly (clang, -O0):
<cec_ops_set_stream_path>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    0x8(%rax),%ecx
shl    $0x8,%ecx
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
or     0xc(%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<cec_ops_set_stream_path>:
mov    (%rdi),%rax
mov    0x8(%rax),%ecx
shl    $0x8,%ecx
or     0xc(%rax),%ecx
mov    %ecx,(%rsi)
ret

LLVM IR (-O0):
%struct.cec_msg = type { i32* }
define void @cec_ops_set_stream_path(%struct.cec_msg* %0, i32* %1) {
%3 = alloca %struct.cec_msg*
%4 = alloca i32*
store %struct.cec_msg* %0, %struct.cec_msg** %3
store i32* %1, i32** %4
%5 = load %struct.cec_msg*, %struct.cec_msg** %3
%6 = getelementptr inbounds %struct.cec_msg, %struct.cec_msg* %5, i32 0, i32 0
%7 = load i32*, i32** %6
%8 = getelementptr inbounds i32, i32* %7, i64 2
%9 = load i32, i32* %8
%10 = shl i32 %9, 8
%11 = load %struct.cec_msg*, %struct.cec_msg** %3
%12 = getelementptr inbounds %struct.cec_msg, %struct.cec_msg* %11, i32 0, i32 0
%13 = load i32*, i32** %12
%14 = getelementptr inbounds i32, i32* %13, i64 3
%15 = load i32, i32* %14
%16 = or i32 %10, %15
%17 = load i32*, i32** %4
store i32 %16, i32* %17
ret void
}

LLVM IR (-O2):
%struct.cec_msg = type { i32* }
define void @cec_ops_set_stream_path(%struct.cec_msg* nocapture %0, i32* nocapture writeonly %1) {
%3 = getelementptr inbounds %struct.cec_msg, %struct.cec_msg* %0, i64 0, i32 0
%4 = load i32*, i32** %3
%5 = getelementptr inbounds i32, i32* %4, i64 2
%6 = load i32, i32* %5
%7 = shl i32 %6, 8
%8 = getelementptr inbounds i32, i32* %4, i64 3
%9 = load i32, i32* %8
%10 = or i32 %7, %9
store i32 %10, i32* %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128d;

/* Variables and functions */
int _mm_comigt_sd(int /*<<< orphan*/, int /*<<< orphan*/);
int test_mm_comigt_sd(__m128d A, __m128d B) { return _mm_comigt_sd(A, B); }


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

x86 assembly (clang, -O2):
<test_mm_comigt_sd>:
jmp    1030 <_mm_comigt_sd@plt>

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

LLVM IR (-O2):
define i32 @test_mm_comigt_sd(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_comigt_sd(i32 %0, i32 %1)
ret i32 %3
}
void gtk_menu_set_tearoff_state() {}


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

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

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

LLVM IR (-O2):
define void @gtk_menu_set_tearoff_state() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ InlineWords(int, int, int, int, int, int, int);
void DoSlashString(void) { InlineWords(6, 16, 18, 12, 40, 11, 41); }


x86 assembly (clang, -O0):
<DoSlashString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x6,%edi
mov    $0x10,%esi
mov    $0x12,%edx
mov    $0xc,%ecx
mov    $0x28,%r8d
mov    $0xb,%r9d
movl   $0x29,(%rsp)
call   1030 <InlineWords@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DoSlashString>:
push   %rax
movl   $0x29,(%rsp)
mov    $0x6,%edi
mov    $0x10,%esi
mov    $0x12,%edx
mov    $0xc,%ecx
mov    $0x28,%r8d
mov    $0xb,%r9d
call   1030 <InlineWords@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @DoSlashString() {
%1 = call i32 @InlineWords(i32 6, i32 16, i32 18, i32 12, i32 40, i32 11, i32 41)
ret void
}

LLVM IR (-O2):
define void @DoSlashString() {
%1 = tail call i32 @InlineWords(i32 6, i32 16, i32 18, i32 12, i32 40, i32 11, i32 41)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int allowedOp(int op) {
  assert(70 > 69 && 70 < 73);
  assert(72 > 69 && 72 < 73);
  assert(71 > 69 && 71 < 73);
  assert(73 == 69 + 4);
  return op == 65 || (op >= 69 && op <= 73);
}


x86 assembly (clang, -O0):
<allowedOp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%al
cmpl   $0x41,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     1171 <allowedOp+0x61>
xor    %eax,%eax
cmpl   $0x45,-0x4(%rbp)
mov    %al,-0x6(%rbp)
jl     116b <allowedOp+0x5b>
cmpl   $0x49,-0x4(%rbp)
setle  %al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<allowedOp>:
push   %rbx
mov    %edi,%ebx
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
cmp    $0x41,%ebx
sete   %al
add    $0xffffffbb,%ebx
cmp    $0x5,%ebx
setb   %cl
or     %al,%cl
movzbl %cl,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @allowedOp(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @assert(i32 1)
%4 = call i32 @assert(i32 1)
%5 = call i32 @assert(i32 1)
%6 = call i32 @assert(i32 1)
%7 = load i32, i32* %2
%8 = icmp eq i32 %7, 65
br i1 %8, label %17, label %9
9: ; preds = %1
%10 = load i32, i32* %2
%11 = icmp sge i32 %10, 69
br i1 %11, label %12, label %15
12: ; preds = %9
%13 = load i32, i32* %2
%14 = icmp sle i32 %13, 73
br label %15
15: ; preds = %12, %9
%16 = phi i1 [ false, %9 ], [ %14, %12 ]
br label %17
17: ; preds = %15, %1
%18 = phi i1 [ true, %1 ], [ %16, %15 ]
%19 = zext i1 %18 to i32
ret i32 %19
}

LLVM IR (-O2):
define i32 @allowedOp(i32 %0) {
%2 = tail call i32 @assert(i32 1)
%3 = tail call i32 @assert(i32 1)
%4 = tail call i32 @assert(i32 1)
%5 = tail call i32 @assert(i32 1)
%6 = icmp eq i32 %0, 65
%7 = add i32 %0, -69
%8 = icmp ult i32 %7, 5
%9 = or i1 %6, %8
%10 = zext i1 %9 to i32
ret i32 %10
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ member_0;
};

/* Variables and functions */
int /*<<< orphan*/ mkdir(char const *, int);
int stat(char const *, struct stat *);
void make_dir(const char *dir_name) {
  struct stat st = {0};
  if (stat(dir_name, &st) == -1) {
    mkdir(dir_name, 0755);
  }
}


x86 assembly (clang, -O0):
<make_dir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x10(%rbp),%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1040 <memset@plt>
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1050 <stat@plt>
cmp    $0xffffffff,%eax
jne    1170 <make_dir+0x40>
mov    -0x8(%rbp),%rdi
mov    $0x1ed,%esi
call   1030 <mkdir@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<make_dir>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
movl   $0x0,0x8(%rsp)
lea    0x8(%rsp),%rsi
call   1040 <stat@plt>
cmp    $0xffffffff,%eax
je     1145 <make_dir+0x25>
add    $0x10,%rsp
pop    %rbx
ret
mov    %rbx,%rdi
mov    $0x1ed,%esi
add    $0x10,%rsp
pop    %rbx
jmp    1030 <mkdir@plt>

LLVM IR (-O0):
%struct.stat = type { i32 }
define void @make_dir(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.stat
store i8* %0, i8** %2
%4 = bitcast %struct.stat* %3 to i8*
%5 = load i8*, i8** %2
%6 = call i32 @stat(i8* %5, %struct.stat* %3)
%7 = icmp eq i32 %6, -1
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i8*, i8** %2
%10 = call i32 @mkdir(i8* %9, i32 493)
br label %11
11: ; preds = %8, %1
ret void
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define void @make_dir(i8* nocapture %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
store i32 0, i32* %4
%5 = call i32 @stat(i8* %0, %struct.stat* %2)
%6 = icmp eq i32 %5, -1
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = tail call i32 @mkdir(i8* %0, i32 493)
br label %9
9: ; preds = %7, %1
ret void
}