xunge/DecIR huggingface dataset:
int main(void) {
  int i = 0;
  !i;
  i = !(i && 5 || !3);
  &i;
  ++i;
  --i;
  i++;
  --i;
  int *ii = &i;
  i = *ii;
  float f = 7.8;
  float *ff = &f;
  f = *ff;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    $0x1,%al
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0x21(%rbp)
jne    112b <main+0x2b>
xor    %eax,%eax
mov    %al,-0x21(%rbp)
jmp    112b <main+0x2b>
mov    -0x21(%rbp),%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
movss  0xe8b(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
lea    -0x14(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0x14(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32*
%4 = alloca float
%5 = alloca float*
store i32 0, i32* %1
store i32 0, i32* %2
%6 = load i32, i32* %2
%7 = icmp ne i32 %6, 0
%8 = xor i1 %7, true
%9 = zext i1 %8 to i32
%10 = load i32, i32* %2
%11 = icmp ne i32 %10, 0
br i1 %11, label %13, label %12
12: ; preds = %0
br label %13
13: ; preds = %12, %0
%14 = phi i1 [ true, %0 ], [ false, %12 ]
%15 = xor i1 %14, true
%16 = zext i1 %15 to i32
store i32 %16, i32* %2
%17 = load i32, i32* %2
%18 = add nsw i32 %17, 1
store i32 %18, i32* %2
%19 = load i32, i32* %2
%20 = add nsw i32 %19, -1
store i32 %20, i32* %2
%21 = load i32, i32* %2
%22 = add nsw i32 %21, 1
store i32 %22, i32* %2
%23 = load i32, i32* %2
%24 = add nsw i32 %23, -1
store i32 %24, i32* %2
store i32* %2, i32** %3
%25 = load i32*, i32** %3
%26 = load i32, i32* %25
store i32 %26, i32* %2
store float 0x401F333340000000, float* %4
store float* %4, float** %5
%27 = load float*, float** %5
%28 = load float, float* %27
store float %28, float* %4
%29 = load i32, i32* %1
ret i32 %29
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
int gcd(int u, int v) {
  if (v == 0)
    return u;
  else
    return gcd(v, u - u / v * v);
}


x86 assembly (clang, -O0):
<gcd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1133 <gcd+0x23>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    114e <gcd+0x3e>
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
imul   -0xc(%rbp),%eax
sub    %eax,%esi
call   1030 <gcd@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gcd>:
mov    %edi,%eax
test   %esi,%esi
je     111d <gcd+0x1d>
mov    %esi,%edx
nopl   0x0(%rax,%rax,1)
mov    %edx,%ecx
cltd
idiv   %ecx
mov    %ecx,%eax
test   %edx,%edx
jne    1110 <gcd+0x10>
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @gcd(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %9, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %7, %4 ], [ %1, %2 ]
%6 = phi i32 [ %5, %4 ], [ %0, %2 ]
%7 = srem i32 %6, %5
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %4
9: ; preds = %4, %2
%10 = phi i32 [ %0, %2 ], [ %5, %4 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_eval(int);
scalar_t__ strncasecmp(char *, char *, int);
void strncasecmp_1() {
  char *x = "Bcd";
  char *y = "abc";
  clang_analyzer_eval(strncasecmp(x, y, 3) > 0);
}


x86 assembly (clang, -O0):
<strncasecmp_1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x3,%edx
call   1030 <strncasecmp@plt>
cmp    $0x0,%rax
setg   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <clang_analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strncasecmp_1>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xed5(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncasecmp@plt>
xor    %edi,%edi
test   %rax,%rax
setg   %dil
pop    %rax
jmp    1040 <clang_analyzer_eval@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"Bcd\00"
@.str.1 = [4 x i8] c"abc\00"
define void @strncasecmp_1() {
%1 = alloca i8*
%2 = alloca i8*
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %1
%4 = load i8*, i8** %2
%5 = call i64 @strncasecmp(i8* %3, i8* %4, i32 3)
%6 = icmp sgt i64 %5, 0
%7 = zext i1 %6 to i32
%8 = call i32 @clang_analyzer_eval(i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"Bcd\00"
@.str.1 = [4 x i8] c"abc\00"
define void @strncasecmp_1() {
%1 = tail call i64 @strncasecmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 3)
%2 = icmp sgt i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @clang_analyzer_eval(i32 %3)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ u_int32_t;

/* Variables and functions */
int /*<<< orphan*/ Interpolate_2(int /*<<< orphan*/, int, int /*<<< orphan*/,
                                 int, int);
u_int32_t Interp8(u_int32_t c1, u_int32_t c2) {
  return Interpolate_2(c1, 5, c2, 3, 3);
}


x86 assembly (clang, -O0):
<Interp8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%edx
mov    $0x5,%esi
mov    $0x3,%r8d
mov    %r8d,%ecx
call   1030 <Interpolate_2@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Interp8>:
mov    %esi,%edx
mov    $0x5,%esi
mov    $0x3,%ecx
mov    $0x3,%r8d
jmp    1030 <Interpolate_2@plt>

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

LLVM IR (-O2):
define i32 @Interp8(i32 %0, i32 %1) {
%3 = tail call i32 @Interpolate_2(i32 %0, i32 5, i32 %1, i32 3, i32 3)
ret i32 %3
}
float nvg__cross(float dx0, float dy0, float dx1, float dy1) {
  return dx1 * dy0 - dx0 * dy1;
}


x86 assembly (clang, -O0):
<nvg__cross>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  -0xc(%rbp),%xmm0
movss  -0x8(%rbp),%xmm2
movss  -0x4(%rbp),%xmm1
mulss  -0x10(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<nvg__cross>:
mulss  %xmm3,%xmm0
mulss  %xmm2,%xmm1
subss  %xmm0,%xmm1
movaps %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @nvg__cross(float %0, float %1, float %2, float %3) {
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
store float %3, float* %8
%9 = load float, float* %7
%10 = load float, float* %6
%11 = load float, float* %5
%12 = load float, float* %8
%13 = fmul float %11, %12
%14 = fneg float %13
%15 = call float @llvm.fmuladd.f32(float %9, float %10, float %14)
ret float %15
}

LLVM IR (-O2):
define float @nvg__cross(float %0, float %1, float %2, float %3) {
%5 = fneg float %0
%6 = fmul float %5, %3
%7 = tail call float @llvm.fmuladd.f32(float %2, float %1, float %6)
ret float %7
}
double square_test(double x, const void *a) {
  const double *a_ptr = (const double *)a;
  return x * x - (*a_ptr);
}


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

x86 assembly (clang, -O2):
<square_test>:
mulsd  %xmm0,%xmm0
subsd  (%rdi),%xmm0
ret

LLVM IR (-O0):
define double @square_test(double %0, i8* %1) {
%3 = alloca double
%4 = alloca i8*
%5 = alloca double*
store double %0, double* %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = bitcast i8* %6 to double*
store double* %7, double** %5
%8 = load double, double* %3
%9 = load double, double* %3
%10 = load double*, double** %5
%11 = load double, double* %10
%12 = fneg double %11
%13 = call double @llvm.fmuladd.f64(double %8, double %9, double %12)
ret double %13
}

LLVM IR (-O2):
define double @square_test(double %0, i8* nocapture %1) {
%3 = bitcast i8* %1 to double*
%4 = load double, double* %3
%5 = fneg double %4
%6 = tail call double @llvm.fmuladd.f64(double %0, double %0, double %5)
ret double %6
}
void USBHostPwrFaultConfig(unsigned long ulBase, unsigned long ulFlags) {
  ;

  ;
  (*((volatile unsigned short *)(ulBase + 0x00000400))) =
      (ulFlags | ((*((volatile unsigned short *)(ulBase + 0x00000400))) &
                  ~(0x00000300 | 0x00000040 | 0x00000020 | 0x00000003)));
}


x86 assembly (clang, -O0):
<USBHostPwrFaultConfig>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
mov    0x400(%rcx),%cx
movzwl %cx,%ecx
and    $0xfffffc9c,%ecx
movslq %ecx,%rcx
or     %rcx,%rax
mov    %ax,%cx
mov    -0x8(%rbp),%rax
mov    %cx,0x400(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<USBHostPwrFaultConfig>:
movzwl 0x400(%rdi),%eax
and    $0xfffffc9c,%eax
or     %eax,%esi
mov    %si,0x400(%rdi)
ret

LLVM IR (-O0):
define void @USBHostPwrFaultConfig(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i64, i64* %3
%7 = add i64 %6, 1024
%8 = inttoptr i64 %7 to i16*
%9 = load volatile i16, i16* %8
%10 = zext i16 %9 to i32
%11 = and i32 %10, -868
%12 = sext i32 %11 to i64
%13 = or i64 %5, %12
%14 = trunc i64 %13 to i16
%15 = load i64, i64* %3
%16 = add i64 %15, 1024
%17 = inttoptr i64 %16 to i16*
store volatile i16 %14, i16* %17
ret void
}

LLVM IR (-O2):
define void @USBHostPwrFaultConfig(i64 %0, i64 %1) {
%3 = add i64 %0, 1024
%4 = inttoptr i64 %3 to i16*
%5 = load volatile i16, i16* %4
%6 = and i16 %5, -868
%7 = trunc i64 %1 to i16
%8 = or i16 %6, %7
store volatile i16 %8, i16* %4
ret void
}
void freeParticle(struct Particle *p) {}


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

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

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

LLVM IR (-O2):
%struct.Particle = type opaque
define void @freeParticle(%struct.Particle* nocapture %0) {
ret void
}
/* Variables and functions */
int svtloleveltrapinstall(int, void (*)());
int svtlolevelirqinstall(int irqnr, void (*handler)()) {
  if (irqnr == 0 || irqnr >= 15) {
    return 0;
  }
  return svtloleveltrapinstall(irqnr + 0x10, handler);
}


x86 assembly (clang, -O0):
<svtlolevelirqinstall>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1133 <svtlolevelirqinstall+0x23>
cmpl   $0xf,-0x8(%rbp)
jl     113f <svtlolevelirqinstall+0x2f>
movl   $0x0,-0x4(%rbp)
jmp    1151 <svtlolevelirqinstall+0x41>
mov    -0x8(%rbp),%edi
add    $0x10,%edi
mov    -0x10(%rbp),%rsi
call   1030 <svtloleveltrapinstall@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<svtlolevelirqinstall>:
test   %edi,%edi
je     1121 <svtlolevelirqinstall+0x11>
cmp    $0xe,%edi
jg     1121 <svtlolevelirqinstall+0x11>
add    $0x10,%edi
jmp    1030 <svtloleveltrapinstall@plt>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @svtlolevelirqinstall(i32 %0, void (...)* %1) {
%3 = icmp eq i32 %0, 0
%4 = icmp sgt i32 %0, 14
%5 = or i1 %3, %4
br i1 %5, label %9, label %6
6: ; preds = %2
%7 = add nsw i32 %0, 16
%8 = tail call i32 @svtloleveltrapinstall(i32 %7, void (...)* %1)
br label %9
9: ; preds = %2, %6
%10 = phi i32 [ %8, %6 ], [ 0, %2 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ errAbort(char *);
int /*<<< orphan*/ printf(char *, char *, char *);
scalar_t__ strlen(char *);
void validateSeqs(char *seq1, char *seq2) {
  if (strlen(seq1) != strlen(seq2)) {
    printf("%s<br>%s<br>", seq1, seq2);
    errAbort(
        "The sequences are not properly aligned (different lengths)<br>\n");
  }
}


x86 assembly (clang, -O0):
<validateSeqs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
cmp    %rcx,%rax
je     1186 <validateSeqs+0x56>
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    0xe8b(%rip),%rdi
call   1040 <printf@plt>
lea    0xe8c(%rip),%rdi
call   1050 <errAbort@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<validateSeqs>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
call   1030 <strlen@plt>
mov    %rax,%rbx
mov    %r14,%rdi
call   1030 <strlen@plt>
cmp    %rax,%rbx
jne    1156 <validateSeqs+0x26>
pop    %rbx
pop    %r14
pop    %r15
ret
lea    0xea3(%rip),%rdi
mov    %r15,%rsi
mov    %r14,%rdx
call   1040 <printf@plt>
lea    0xe9e(%rip),%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1050 <errAbort@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"%s<br>%s<br>\00"
@.str.1 = [64 x i8] c"The sequences are not properly aligned (different lengths)<br>\0A\00"
define void @validateSeqs(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = call i64 @strlen(i8* %5)
%7 = load i8*, i8** %4
%8 = call i64 @strlen(i8* %7)
%9 = icmp ne i64 %6, %8
br i1 %9, label %10, label %15
10: ; preds = %2
%11 = load i8*, i8** %3
%12 = load i8*, i8** %4
%13 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %11, i8* %12)
%14 = call i32 @errAbort(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.1, i64 0, i64 0))
br label %15
15: ; preds = %10, %2
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"%s<br>%s<br>\00"
@.str.1 = [64 x i8] c"The sequences are not properly aligned (different lengths)<br>\0A\00"
define void @validateSeqs(i8* %0, i8* %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%5 = icmp eq i64 %3, %4
br i1 %5, label %9, label %6
6: ; preds = %2
%7 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
%8 = tail call i32 @errAbort(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.1, i64 0, i64 0))
br label %9
9: ; preds = %6, %2
ret void
}
void INT_P1(void) {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @xenbus_backend_bus_unregister() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ printf(char *, char *);
char *tpl_peek(int, char *);
int main() {
  char *fmt;
  fmt = tpl_peek((1 << 0), "test85.tpl");
  if (fmt) {
    printf("%s\n", fmt);
    free(fmt);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
lea    0xeb5(%rip),%rsi
call   1050 <tpl_peek@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1178 <main+0x48>
mov    -0x10(%rbp),%rsi
lea    0xea1(%rip),%rdi
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xec8(%rip),%rsi
mov    $0x1,%edi
call   1050 <tpl_peek@plt>
test   %rax,%rax
je     1161 <main+0x31>
mov    %rax,%rbx
lea    0xeba(%rip),%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [11 x i8] c"test85.tpl\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = tail call i8* @tpl_peek(i32 1, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i8* %1, null
br i1 %2, label %6, label %3
3: ; preds = %0
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %1)
%5 = tail call i32 @free(i8* %1)
br label %6
6: ; preds = %3, %0
ret i32 0
}
int test_imm_0Bint64_highword_mem(long long *val) {
  return ((*val >> 32) & (0x0B << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_0Bint64_highword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
sar    $0x20,%rdx
and    $0xb,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_0Bint64_highword_mem>:
testb  $0xb,0x4(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_0Bint64_highword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = ashr i64 %4, 32
%6 = and i64 %5, 11
%7 = icmp ne i64 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_0Bint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 47244640256
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int Tunnel_init();
int tunnel_module_init(void) { return Tunnel_init(); }


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

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

LLVM IR (-O0):
define i32 @tunnel_module_init() {
%1 = call i32 (...) @Tunnel_init()
ret i32 %1
}

LLVM IR (-O2):
define i32 @tunnel_module_init() {
%1 = tail call i32 (...) @Tunnel_init()
ret i32 %1
}
/* Variables and functions */
int test1();
int test2();
int main() {
  int r;
  r = test1();
  if (r)
    return r;
  r = test2();
  if (r)
    return r;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <test1@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     114e <main+0x2e>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1168 <main+0x48>
mov    $0x0,%al
call   1040 <test2@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1168 <main+0x48>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <test1@plt>
test   %eax,%eax
je     112e <main+0xe>
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
jmp    1040 <test2@plt>

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test1()
%2 = icmp eq i32 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 (...) @test2()
br label %5
5: ; preds = %3, %0
%6 = phi i32 [ %1, %0 ], [ %4, %3 ]
ret i32 %6
}
/* Variables and functions */
bool ell_lexer_is_whitespace(int c) {
  return !c || c == ' ' || c == '\t' || c == '\r';
}


x86 assembly (clang, -O0):
<ell_lexer_is_whitespace>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     113e <ell_lexer_is_whitespace+0x3e>
mov    $0x1,%al
cmpl   $0x20,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     113e <ell_lexer_is_whitespace+0x3e>
mov    $0x1,%al
cmpl   $0x9,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     113e <ell_lexer_is_whitespace+0x3e>
cmpl   $0xd,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ell_lexer_is_whitespace>:
cmp    $0x20,%edi
ja     111d <ell_lexer_is_whitespace+0x1d>
mov    $0x1,%eax
mov    %edi,%ecx
movabs $0x100000201,%rdx
bt     %rcx,%rdx
jae    111d <ell_lexer_is_whitespace+0x1d>
ret
xor    %eax,%eax
cmp    $0xd,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @ell_lexer_is_whitespace(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %14
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 32
br i1 %7, label %14, label %8
8: ; preds = %5
%9 = load i32, i32* %2
%10 = icmp eq i32 %9, 9
br i1 %10, label %14, label %11
11: ; preds = %8
%12 = load i32, i32* %2
%13 = icmp eq i32 %12, 13
br label %14
14: ; preds = %11, %8, %5, %1
%15 = phi i1 [ true, %8 ], [ true, %5 ], [ true, %1 ], [ %13, %11 ]
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @ell_lexer_is_whitespace(i32 %0) {
switch i32 %0, label %2 [
i32 32, label %5
i32 9, label %5
i32 0, label %5
]
2: ; preds = %1
%3 = icmp eq i32 %0, 13
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %6
}
int idl4_strlen2(const short *str) {
  int len = 1;
  while (*str++)
    len++;
  return len;
}


x86 assembly (clang, -O0):
<idl4_strlen2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x2,%rcx
mov    %rcx,-0x8(%rbp)
cmpw   $0x0,(%rax)
je     1136 <idl4_strlen2+0x36>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <idl4_strlen2+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<idl4_strlen2>:
cmpw   $0x0,(%rdi)
je     111c <idl4_strlen2+0x1c>
mov    $0x1,%eax
nopl   0x0(%rax,%rax,1)
cmpw   $0x0,(%rdi,%rax,2)
lea    0x1(%rax),%rax
jne    1110 <idl4_strlen2+0x10>
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @idl4_strlen2(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = icmp eq i16 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %8, %4 ], [ 1, %1 ]
%6 = phi i16* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i16, i16* %6, i64 1
%8 = add nuw nsw i32 %5, 1
%9 = load i16, i16* %7
%10 = icmp eq i16 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i32 [ 1, %1 ], [ %8, %4 ]
ret i32 %12
}
int smb347_get_charging_status(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @smb347_get_charging_status() {
ret i32 0
}
int isascii(int c) { return (c <= 0x7f); }


x86 assembly (clang, -O0):
<isascii>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x7f,-0x4(%rbp)
setle  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @isascii(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sle i32 %3, 127
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @isascii(i32 %0) {
%2 = icmp slt i32 %0, 128
%3 = zext i1 %2 to i32
ret i32 %3
}
void _cc3_delay_sccb() {
  volatile int x;
  for (x = 0; x < 25; x++)
    ;
}


x86 assembly (clang, -O0):
<_cc3_delay_sccb>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
cmp    $0x19,%eax
jge    112a <_cc3_delay_sccb+0x2a>
jmp    111c <_cc3_delay_sccb+0x1c>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110b <_cc3_delay_sccb+0xb>
pop    %rbp
ret

x86 assembly (clang, -O2):
<_cc3_delay_sccb>:
movl   $0x0,-0x4(%rsp)
mov    -0x4(%rsp),%eax
cmp    $0x18,%eax
jg     112e <_cc3_delay_sccb+0x2e>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
addl   $0x1,-0x4(%rsp)
mov    -0x4(%rsp),%eax
cmp    $0x19,%eax
jl     1120 <_cc3_delay_sccb+0x20>
ret

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

LLVM IR (-O2):
define void @_cc3_delay_sccb() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store volatile i32 0, i32* %1
%3 = load volatile i32, i32* %1
%4 = icmp slt i32 %3, 25
br i1 %4, label %5, label %10
5: ; preds = %0, %5
%6 = load volatile i32, i32* %1
%7 = add nsw i32 %6, 1
store volatile i32 %7, i32* %1
%8 = load volatile i32, i32* %1
%9 = icmp slt i32 %8, 25
br i1 %9, label %5, label %10
10: ; preds = %5, %0
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ cwd;

/* Variables and functions */
int /*<<< orphan*/ getcwd(char *, int);
char *Sys_Cwd(void) {
  static char cwd[256];
  getcwd(cwd, sizeof(cwd) - 1);
  cwd[256 - 1] = 0;
  return cwd;
}


x86 assembly (clang, -O0):
<Sys_Cwd>:
push   %rbp
mov    %rsp,%rbp
lea    0x2f25(%rip),%rdi
mov    $0xff,%esi
call   1030 <getcwd@plt>
movb   $0x0,0x3013(%rip)
lea    0x2f0d(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Sys_Cwd>:
push   %rbx
lea    0x2f28(%rip),%rbx
mov    %rbx,%rdi
mov    $0xff,%esi
call   1030 <getcwd@plt>
movb   $0x0,0x3013(%rip)
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@Sys_Cwd.cwd = internal global [256 x i8] zeroinitializer
define i8* @Sys_Cwd() {
%1 = call i32 @getcwd(i8* getelementptr inbounds ([256 x i8], [256 x i8]* @Sys_Cwd.cwd, i64 0, i64 0), i32 255)
store i8 0, i8* getelementptr inbounds ([256 x i8], [256 x i8]* @Sys_Cwd.cwd, i64 0, i64 255)
ret i8* getelementptr inbounds ([256 x i8], [256 x i8]* @Sys_Cwd.cwd, i64 0, i64 0)
}

LLVM IR (-O2):
@Sys_Cwd.cwd = internal global [256 x i8] zeroinitializer
define i8* @Sys_Cwd() {
%1 = tail call i32 @getcwd(i8* getelementptr inbounds ([256 x i8], [256 x i8]* @Sys_Cwd.cwd, i64 0, i64 0), i32 255)
store i8 0, i8* getelementptr inbounds ([256 x i8], [256 x i8]* @Sys_Cwd.cwd, i64 0, i64 255)
ret i8* getelementptr inbounds ([256 x i8], [256 x i8]* @Sys_Cwd.cwd, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void memrel_(void *src, size_t count) {
  if (src == NULL)
    return;
  free(src);
  src = NULL;
  return;
}


x86 assembly (clang, -O0):
<memrel_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1130 <memrel_+0x20>
jmp    1141 <memrel_+0x31>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
movq   $0x0,-0x8(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @memrel_(i8* %0, i64 %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 @free(i8* %0)
br label %6
6: ; preds = %2, %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ musicexists();
int /*<<< orphan*/ pushNumber(int /*<<< orphan*/);
void basMusicExists() { pushNumber(musicexists()); }


x86 assembly (clang, -O0):
<basMusicExists>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <musicexists@plt>
mov    %eax,%edi
call   1040 <pushNumber@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<basMusicExists>:
push   %rax
xor    %eax,%eax
call   1030 <musicexists@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <pushNumber@plt>

LLVM IR (-O0):
define void @basMusicExists() {
%1 = call i32 (...) @musicexists()
%2 = call i32 @pushNumber(i32 %1)
ret void
}

LLVM IR (-O2):
define void @basMusicExists() {
%1 = tail call i32 (...) @musicexists()
%2 = tail call i32 @pushNumber(i32 %1)
ret void
}
int is_deleted(unsigned char *key, int size) {
  for (int i = 0; i < size; i++) {
    if (*key != 255) {
      return 0;
    }
    key++;
  }
  return 1;
}


x86 assembly (clang, -O0):
<is_deleted>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1156 <is_deleted+0x56>
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
cmp    $0xff,%eax
je     113c <is_deleted+0x3c>
movl   $0x0,-0x4(%rbp)
jmp    115d <is_deleted+0x5d>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1112 <is_deleted+0x12>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_deleted>:
test   %esi,%esi
jle    110c <is_deleted+0xc>
xor    %eax,%eax
cmpb   $0xff,(%rdi)
je     1112 <is_deleted+0x12>
ret
mov    $0x1,%eax
ret
mov    %esi,%eax
mov    $0x1,%edx
nopl   0x0(%rax)
mov    %rdx,%rcx
cmp    %ecx,%eax
je     1131 <is_deleted+0x31>
lea    0x1(%rcx),%rdx
cmpb   $0xff,(%rdi,%rcx,1)
je     1120 <is_deleted+0x20>
xor    %eax,%eax
cmp    %esi,%ecx
setge  %al
ret

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

LLVM IR (-O2):
define i32 @is_deleted(i8* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %19
4: ; preds = %2
%5 = load i8, i8* %0
%6 = icmp eq i8 %5, -1
br i1 %6, label %10, label %19
7: ; preds = %10
%8 = load i8, i8* %13
%9 = icmp eq i8 %8, -1
br i1 %9, label %10, label %16
10: ; preds = %4, %7
%11 = phi i8* [ %13, %7 ], [ %0, %4 ]
%12 = phi i32 [ %14, %7 ], [ 0, %4 ]
%13 = getelementptr inbounds i8, i8* %11, i64 1
%14 = add nuw nsw i32 %12, 1
%15 = icmp eq i32 %14, %1
br i1 %15, label %16, label %7
16: ; preds = %10, %7
%17 = icmp sge i32 %14, %1
%18 = zext i1 %17 to i32
br label %19
19: ; preds = %16, %4, %2
%20 = phi i32 [ 1, %2 ], [ 0, %4 ], [ %18, %16 ]
ret i32 %20
}
/* Variables and functions */
scalar_t__ j1l(long double);
int /*<<< orphan*/ link_failure_j1l();
void test_j1l(long double ld) {
  if (j1l(ld) != j1l(ld))
    link_failure_j1l();
}


x86 assembly (clang, -O0):
<test_j1l>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1040 <j1l@plt>
mov    %rax,-0x18(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1040 <j1l@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
cmp    %rcx,%rax
je     1163 <test_j1l+0x43>
mov    $0x0,%al
call   1030 <link_failure_j1l@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_j1l>:
push   %rbx
sub    $0x20,%rsp
fldt   0x30(%rsp)
fld    %st(0)
fstpt  0x14(%rsp)
fstpt  (%rsp)
call   1040 <j1l@plt>
mov    %rax,%rbx
fldt   0x14(%rsp)
fstpt  (%rsp)
call   1040 <j1l@plt>
cmp    %rax,%rbx
jne    1151 <test_j1l+0x31>
add    $0x20,%rsp
pop    %rbx
ret
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
jmp    1030 <link_failure_j1l@plt>

LLVM IR (-O0):
define void @test_j1l(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = call i64 @j1l(x86_fp80 %3)
%5 = load x86_fp80, x86_fp80* %2
%6 = call i64 @j1l(x86_fp80 %5)
%7 = icmp ne i64 %4, %6
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 (...) @link_failure_j1l()
br label %10
10: ; preds = %8, %1
ret void
}

LLVM IR (-O2):
define void @test_j1l(x86_fp80 %0) {
%2 = tail call i64 @j1l(x86_fp80 %0)
%3 = tail call i64 @j1l(x86_fp80 %0)
%4 = icmp eq i64 %2, %3
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 (...) @link_failure_j1l()
br label %7
7: ; preds = %5, %1
ret void
}
/* Variables and functions */
int iabs(int);
int rshift_rnd_sign(int x, int a) {
  return (x > 0) ? ((x + (1 << (a - 1))) >> a)
                 : (-((iabs(x) + (1 << (a - 1))) >> a));
}


x86 assembly (clang, -O0):
<rshift_rnd_sign>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    1149 <rshift_rnd_sign+0x39>
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
add    %ecx,%eax
mov    -0x8(%rbp),%ecx
sar    %cl,%eax
mov    %eax,-0xc(%rbp)
jmp    1170 <rshift_rnd_sign+0x60>
mov    -0x4(%rbp),%edi
call   1030 <iabs@plt>
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
add    %ecx,%eax
mov    -0x8(%rbp),%ecx
sar    %cl,%eax
mov    %eax,%ecx
xor    %eax,%eax
sub    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rshift_rnd_sign>:
push   %rbx
mov    %esi,%ebx
test   %edi,%edi
jle    1129 <rshift_rnd_sign+0x19>
lea    -0x1(%rbx),%ecx
mov    $0x1,%eax
shl    %cl,%eax
add    %edi,%eax
mov    %ebx,%ecx
sar    %cl,%eax
pop    %rbx
ret
call   1030 <iabs@plt>
mov    %eax,%edx
lea    -0x1(%rbx),%ecx
mov    $0x1,%eax
shl    %cl,%eax
add    %edx,%eax
mov    %ebx,%ecx
sar    %cl,%eax
neg    %eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @rshift_rnd_sign(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %9
4: ; preds = %2
%5 = add nsw i32 %1, -1
%6 = shl nuw i32 1, %5
%7 = add nsw i32 %6, %0
%8 = ashr i32 %7, %1
br label %16
9: ; preds = %2
%10 = tail call i32 @iabs(i32 %0)
%11 = add nsw i32 %1, -1
%12 = shl nuw i32 1, %11
%13 = add nsw i32 %10, %12
%14 = ashr i32 %13, %1
%15 = sub nsw i32 0, %14
br label %16
16: ; preds = %9, %4
%17 = phi i32 [ %8, %4 ], [ %15, %9 ]
ret i32 %17
}
/* Variables and functions */
int /*<<< orphan*/ e_bne();
int /*<<< orphan*/ e_branch();
void e_bne_branch() {
  e_branch();
  e_bne();
}


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

x86 assembly (clang, -O2):
<e_bne_branch>:
push   %rax
xor    %eax,%eax
call   1030 <e_branch@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <e_bne@plt>

LLVM IR (-O0):
define void @e_bne_branch() {
%1 = call i32 (...) @e_branch()
%2 = call i32 (...) @e_bne()
ret void
}

LLVM IR (-O2):
define void @e_bne_branch() {
%1 = tail call i32 (...) @e_branch()
%2 = tail call i32 (...) @e_bne()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void main() {
  int a = 1, b = 2;
  a = a ^ b;
  b = a ^ b;
  a = a ^ b;
  printf("%d%d", a, b);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
mov    -0x4(%rbp),%eax
xor    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
xor    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
xor    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
lea    0xee9(%rip),%rdi
mov    $0x2,%esi
mov    $0x1,%edx
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"%d%d\00"
define void @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 2, i32 1)
ret void
}
/* Variables and functions */
float nearbyintf(float);
float test5f(float x) { return nearbyintf(x); }


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

x86 assembly (clang, -O2):
<test5f>:
jmp    1030 <nearbyintf@plt>

LLVM IR (-O0):
define float @test5f(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @llvm.nearbyint.f32(float %3)
ret float %4
}

LLVM IR (-O2):
define float @test5f(float %0) {
%2 = tail call float @llvm.nearbyint.f32(float %0)
ret float %2
}
/* Variables and functions */
scalar_t__ EFAULT;
int /*<<< orphan*/ abort();
scalar_t__ errno;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
int pipe(int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *);
int main(void) {
  if (pipe(NULL) != -1 || errno != EFAULT) {
    perror("pipe");
    abort();
  }
  printf("pass\n");
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1050 <pipe@plt>
cmp    $0xffffffff,%eax
jne    118b <main+0x3b>
mov    0x2e60(%rip),%rax
mov    (%rax),%rax
mov    0x2e76(%rip),%rcx
cmp    (%rcx),%rax
je     119e <main+0x4e>
lea    0xe6e(%rip),%rdi
call   1060 <perror@plt>
mov    $0x0,%al
call   1030 <abort@plt>
lea    0xe60(%rip),%rdi
call   1040 <printf@plt>
xor    %edi,%edi
call   1070 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1050 <pipe@plt>
cmp    $0xffffffff,%eax
jne    1186 <main+0x36>
mov    0x2e74(%rip),%rax
mov    (%rax),%rax
mov    0x2e8a(%rip),%rcx
cmp    (%rcx),%rax
jne    1186 <main+0x36>
lea    0xe8b(%rip),%rdi
call   1040 <puts@plt>
xor    %edi,%edi
call   1070 <exit@plt>
lea    0xe73(%rip),%rdi
call   1060 <perror@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@errno = global i64 0
@EFAULT = global i64 0
@.str = [5 x i8] c"pipe\00"
@.str.1 = [6 x i8] c"pass\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @pipe(i32* null)
%3 = icmp ne i32 %2, -1
br i1 %3, label %8, label %4
4: ; preds = %0
%5 = load i64, i64* @errno
%6 = load i64, i64* @EFAULT
%7 = icmp ne i64 %5, %6
br i1 %7, label %8, label %11
8: ; preds = %4, %0
%9 = call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%10 = call i32 (...) @abort()
unreachable
11: ; preds = %4
%12 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%13 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@errno = global i64 0
@EFAULT = global i64 0
@.str = [5 x i8] c"pipe\00"
@str = [5 x i8] c"pass\00"
define i32 @main() {
%1 = tail call i32 @pipe(i32* null)
%2 = icmp eq i32 %1, -1
br i1 %2, label %3, label %7
3: ; preds = %0
%4 = load i64, i64* @errno
%5 = load i64, i64* @EFAULT
%6 = icmp eq i64 %4, %5
br i1 %6, label %10, label %7
7: ; preds = %3, %0
%8 = tail call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%9 = tail call i32 (...) @abort()
unreachable
10: ; preds = %3
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
%12 = tail call i32 @exit(i32 0)
unreachable
}
void PORT2_IRQHandler(void) {
  while (1) {
  }
}


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

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

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

LLVM IR (-O2):
define void @PORT2_IRQHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}
Uniform11(iy, yfl) int iy;
float yfl;
{
  iy = (4855 * iy + 1731) & 8191;
  yfl = iy / 8192.0;
}


x86 assembly (clang, -O0):
<Uniform11>:
push   %rbp
mov    %rsp,%rbp
cvtsd2ss %xmm0,%xmm0
mov    %edi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
imul   $0x12f7,-0x8(%rbp),%eax
add    $0x6c3,%eax
and    $0x1fff,%eax
mov    %eax,-0x8(%rbp)
cvtsi2sdl -0x8(%rbp),%xmm0
movsd  0xecf(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @Uniform11(i32 %0, double %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca float
%6 = fptrunc double %1 to float
store i32 %0, i32* %4
store float %6, float* %5
%7 = load i32, i32* %4
%8 = mul nsw i32 4855, %7
%9 = add nsw i32 %8, 1731
%10 = and i32 %9, 8191
store i32 %10, i32* %4
%11 = load i32, i32* %4
%12 = sitofp i32 %11 to double
%13 = fdiv double %12, 8.192000e+03
%14 = fptrunc double %13 to float
store float %14, float* %5
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
define i32 @Uniform11(i32 %0, double %1) {
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ set_pin(int /*<<< orphan*/, int /*<<< orphan*/,
                           int /*<<< orphan*/, int, int);
void write_pin(uint8_t address, uint8_t pin, uint8_t value) {
  set_pin(address, pin, value, 0x12, 0x13);
}


x86 assembly (clang, -O0):
<write_pin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    $0x12,%ecx
mov    $0x13,%r8d
call   1030 <set_pin@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_pin>:
mov    $0x12,%ecx
mov    $0x13,%r8d
jmp    1030 <set_pin@plt>

LLVM IR (-O0):
define void @write_pin(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i32 @set_pin(i32 %7, i32 %8, i32 %9, i32 18, i32 19)
ret void
}

LLVM IR (-O2):
define void @write_pin(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @set_pin(i32 %0, i32 %1, i32 %2, i32 18, i32 19)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void cstrfree(char *s) {
  do {
    free(s);
    (s) = NULL;
  } while (0);
}


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

x86 assembly (clang, -O2):
<cstrfree>:
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @cstrfree(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %1
%4 = load i8*, i8** %2
%5 = call i32 @free(i8* %4)
store i8* null, i8** %2
br label %6
6: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @cstrfree(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}